text
stringlengths
5
22M
id
stringlengths
12
177
metadata
dict
__index_level_0__
int64
0
1.37k
__include__: 'darts.yaml' # defaults are loaded from this file nas: eval: checkpoint: null resume: False trainer: apex: True epochs: 10 drop_path_prob: 0.0 aux_weight: 0.0 optimizer: type: "sgd" lr: 0.016 # init learning rate decay: 0.0 momentum: 0.9 # pytorch default is 0 nesterov: False warmup: null lr_schedule: type: 'one_cycle' max_lr: 0.5 decay: 0.064 momentum: 0.9 loader: cutout: 0 batch: 512
archai/confs/dawnbench.yaml/0
{ "file_path": "archai/confs/dawnbench.yaml", "repo_id": "archai", "token_count": 288 }
339
from archai.discrete_search.search_spaces.nlp.transformer_flex.search_space import TransformerFlexSearchSpace from archai.discrete_search.api.search_objectives import SearchObjectives from archai.discrete_search.evaluators.nlp.parameters import NonEmbeddingParamsProxy from archai.discrete_search.evaluators.nlp.transformer_flex_latency import TransformerFlexOnnxLatency from archai.discrete_search.evaluators.nlp.transformer_flex_memory import TransformerFlexOnnxMemory from archai.discrete_search.algos.evolution_pareto import EvolutionParetoSearch import argparse def main(): parser = argparse.ArgumentParser() parser.add_argument("--output_dir", type=str, default="nas_output", help="path to output data") args = parser.parse_args() space = TransformerFlexSearchSpace("gpt2") search_objectives = SearchObjectives() search_objectives.add_objective( "non_embedding_params", NonEmbeddingParamsProxy(), higher_is_better=True, compute_intensive=False, constraint=(1e6, 1e9), ) search_objectives.add_objective( "onnx_latency", TransformerFlexOnnxLatency(space), higher_is_better=False, compute_intensive=False, ) search_objectives.add_objective( "onnx_memory", TransformerFlexOnnxMemory(space), higher_is_better=False, compute_intensive=False, ) algo = EvolutionParetoSearch( space, search_objectives, None, args.output_dir, num_iters=3, init_num_models=10, save_pareto_model_weights=False, seed=1234, ) algo.search() if __name__ == "__main__": main()
archai/docs/advanced_guide/cloud/azure/notebooks/quickstart/main.py/0
{ "file_path": "archai/docs/advanced_guide/cloud/azure/notebooks/quickstart/main.py", "repo_id": "archai", "token_count": 690 }
340
<jupyter_start><jupyter_text>Creating CV-based DataIn this notebook, we will create CV-based data using PyTorch's `torchvision` library, which provides access to popular CV datasets, such as CIFAR10, MNIST, and ImageNet, among others. Loading the DataThe first step is to create an instance of the `MnistDatasetProvider`, which offers pre-loads the dataset and offers three methods to retrieve them: `get_train_dataset()`, `get_val_dataset()` and `get_test_dataset()`.<jupyter_code>from archai.datasets.cv.mnist_dataset_provider import MnistDatasetProvider dataset_provider = MnistDatasetProvider() train_dataset = dataset_provider.get_train_dataset() val_dataset = dataset_provider.get_val_dataset() print(train_dataset, val_dataset)<jupyter_output>Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz to dataroot\MNIST\raw\train-images-idx3-ubyte.gz<jupyter_text>Transforming the DataAdditionally, the `torchvision` library supports various data augmentation techniques, such as random cropping, flipping, and rotation, to increase the size and diversity of the dataset, leading to better model generalization and performance. This can be applied as a post-processing function or by passing the `transform` argument when retrieving the dataset.*By default, every dataset retrieved by the dataset providers use the `ToTensor()` transform.*<jupyter_code>from torchvision import transforms transform = transforms.Compose([ transforms.ToTensor(), transforms.Normalize((0.1307,), (0.3081,)) ]) transformed_train_dataset = dataset_provider.get_train_dataset(transform=transform) print(transformed_train_dataset)<jupyter_output>Dataset MNIST Number of datapoints: 60000 Root location: dataroot Split: Train StandardTransform Transform: Compose( ToTensor() Normalize(mean=(0.1307,), std=(0.3081,)) )
archai/docs/getting_started/notebooks/cv/cv_dataset_provider.ipynb/0
{ "file_path": "archai/docs/getting_started/notebooks/cv/cv_dataset_provider.ipynb", "repo_id": "archai", "token_count": 656 }
341
<jupyter_start><jupyter_text>Creating NLP-based DataIn this notebook, we will use a dataset provider-based abstraction that interfaces with `NVIDIA/DeepLearningExamples` to load and encode pre-defined/custom data. Loading and Encoding the DataThe first step is to create an instance of the `NvidiaDatasetProvider`, which offers pre-loads the dataset and offers three methods to retrieve them: `get_train_dataset()`, `get_val_dataset()` and `get_test_dataset()`. This is useful when loading pre-defined datasets, as well as loading custom-based (OLX prefix) data, which is composed by raw text files, such as `train.txt`, `valid.txt` and `test.txt`.Additionally, the `NvidiaDatasetProvider` already encodes and caches the data with a built-in tokenizer. One can change the following arguments according to desired needs:* `dataset_dir`: Dataset folder.* `cache_dir`: Path to the cache folder.* `vocab_type`: Type of vocabulary/tokenizer.* `vocab_size`: Vocabulary size.* `refresh_cache`: Whether cache should be refreshed.<jupyter_code>import os from archai.datasets.nlp.nvidia_dataset_provider import NvidiaDatasetProvider # In this example, we will create a dummy dataset with 3 splits os.makedirs("dataroot/olx_tmp", exist_ok=True) with open("dataroot/olx_tmp/train.txt", "w") as f: f.write("train") with open("dataroot/olx_tmp/valid.txt", "w") as f: f.write("valid") with open("dataroot/olx_tmp/test.txt", "w") as f: f.write("test") dataset_provider = NvidiaDatasetProvider("olx_tmp", dataset_dir="dataroot/olx_tmp", refresh_cache=True) train_dataset = dataset_provider.get_train_dataset() val_dataset = dataset_provider.get_val_dataset() test_dataset = dataset_provider.get_test_dataset() print(train_dataset, val_dataset, test_dataset)<jupyter_output>2023-03-21 15:12:37,792 - archai.datasets.nlp.nvidia_dataset_provider_utils β€” INFO β€” Refreshing cache ... 2023-03-21 15:12:37,793 - archai.datasets.nlp.nvidia_dataset_provider_utils β€” INFO β€” Clearing and rebuilding cache ... 2023-03-21 15:12:37,794 - archai.datasets.nlp.nvidia_dataset_provider_utils β€” INFO β€” Corpus: dataset = olx_tmp | vocab_type = gpt2 | vocab_size = None 2023-03-21 15:12:37,796 - archai.datasets.nlp.nvidia_dataset_provider_utils β€” INFO β€” Training vocabulary ... 2023-03-21 15:12:37,797 - archai.datasets.nlp.tokenizer_utils.bbpe_tokenizer β€” INFO β€” Training tokenizer with size = 50257 at c:\Users\gderosa\Projects\archai\docs\getting_started\notebooks\nlp\cache\olx_tmp\gpt2\None\vocab\bbpe_tokenizer.json ... 2023-03-21 15:12:37,798 - archai.datasets.nlp.tokenizer_utils.bbpe_tokenizer β€” INFO β€” Training tokenizer ... 2023-03-21 15:12:37,827 - archai.datasets.nlp.tokenizer_utils.bbpe_tokenizer β€” DEBUG β€” Tokenizer length: 264 2023-03-21 15:12:37,828 - archai.datasets.[...]
archai/docs/getting_started/notebooks/nlp/nvidia_dataset_provider.ipynb/0
{ "file_path": "archai/docs/getting_started/notebooks/nlp/nvidia_dataset_provider.ipynb", "repo_id": "archai", "token_count": 986 }
342
Tokenization Utilities ====================== Tokenizer (Base Class) ---------------------- .. automodule:: archai.datasets.nlp.tokenizer_utils.tokenizer_base :members: :undoc-members: Token Configuration ------------------- .. automodule:: archai.datasets.nlp.tokenizer_utils.token_config :members: :undoc-members: BBPE Tokenizer -------------- .. automodule:: archai.datasets.nlp.tokenizer_utils.bbpe_tokenizer :members: :undoc-members: GPT-2 Tokenizer --------------- .. automodule:: archai.datasets.nlp.tokenizer_utils.gpt2_tokenizer :members: :undoc-members: Word-Based Tokenizer -------------------- .. automodule:: archai.datasets.nlp.tokenizer_utils.word_tokenizer :members: :undoc-members:
archai/docs/reference/api/archai.datasets.nlp.tokenizer_utils.rst/0
{ "file_path": "archai/docs/reference/api/archai.datasets.nlp.tokenizer_utils.rst", "repo_id": "archai", "token_count": 259 }
343
Transformer-Flex ================ Search Space ------------ .. automodule:: archai.discrete_search.search_spaces.nlp.transformer_flex.search_space :members: :undoc-members: GPT-2 Flex ---------- .. automodule:: archai.discrete_search.search_spaces.nlp.transformer_flex.models.configuration_gpt2_flex :members: :undoc-members: .. automodule:: archai.discrete_search.search_spaces.nlp.transformer_flex.models.modeling_gpt2_flex :members: :undoc-members: NVIDIA Memory Transformer ------------------------- .. automodule:: archai.discrete_search.search_spaces.nlp.transformer_flex.models.configuration_mem_transformer :members: :undoc-members: .. automodule:: archai.discrete_search.search_spaces.nlp.transformer_flex.models.modeling_mem_transformer :members: :undoc-members:
archai/docs/reference/api/archai.discrete_search.search_spaces.nlp.transformer_flex.rst/0
{ "file_path": "archai/docs/reference/api/archai.discrete_search.search_spaces.nlp.transformer_flex.rst", "repo_id": "archai", "token_count": 288 }
344
Algorithms ========== .. toctree:: :maxdepth: 2 archai.supergraph.algos.darts archai.supergraph.algos.didarts archai.supergraph.algos.divnas archai.supergraph.algos.gumbelsoftmax archai.supergraph.algos.manual archai.supergraph.algos.nasbench101 archai.supergraph.algos.petridish archai.supergraph.algos.random archai.supergraph.algos.xnas
archai/docs/reference/api/archai.supergraph.algos.rst/0
{ "file_path": "archai/docs/reference/api/archai.supergraph.algos.rst", "repo_id": "archai", "token_count": 152 }
345
Frequently Asked Questions (FAQ) ================================ **Q:** What is Neural Architecture Search (NAS)? **A:** NAS is a machine learning technique that aims to automatically discover effective neural network architectures for a given task, without the need for human intervention or trial-and-error experimentation. By using algorithms to search the space of possible architectures, NAS can help identify novel and effective designs that may not have been discovered through traditional manual design methods. ---- **Q:** What is Archai and how does it relate to NAS? **A:** Archai is an open-source project that aims to accelerate NAS research and serve as a turnkey NAS framework for Microsoft and the broader machine learning community. Archai has made significant progress in both the research and engineering aspects of NAS, and is a generic platform that can be applied to a wide range of tasks and hardware targets. ---- **Q:** What are some of the open problems in NAS research? **A:** There are many open questions and challenges in the field of NAS, including: * **Search space design:** How much inductive bias should be included in the search space, and how can the search space be designed to balance the need for complexity and expressiveness with the need for efficiency and scalability? * **Algorithmic scalability:** How can NAS algorithms be scaled to handle the vast number of potential architectures, and how can they be made more efficient and effective in their search for the best architectures? * **Robustness and uncertainty:** How can NAS algorithms be made more robust to noise and uncertainty in the data, and how can they incorporate uncertainty estimates in their search and evaluation processes? * **Learning-based search:** How can NAS algorithms incorporate learned priors or meta-learning techniques to improve their search and evaluation, and how can they be integrated with other learning-based approaches to NAS? * **Novel search methods:** What are the next-generation search algorithms and techniques that will push the boundaries of NAS and enable the discovery of even more effective and efficient architectures? ---- **Q:** How can researchers get involved with Archai and NAS? **A:** Researchers interested in exploring the open problems in NAS and contributing to the Archai project are encouraged to join the community on `GitHub <https://github.com/microsoft/archai>`_. There are many opportunities for collaboration and research within the Archai community, including working on existing open problems, proposing new directions for research, and contributing to the development of the platform.
archai/docs/support/faq.rst/0
{ "file_path": "archai/docs/support/faq.rst", "repo_id": "archai", "token_count": 549 }
346
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from setuptools import find_packages, setup install_requires = [r.rstrip() for r in open("requirements.txt", "r").readlines()] setup( name="lm_eval_harness", version="0.0.1", author="Microsoft", url="https://github.com/microsoft/archai/research/lm_eval_harness", license="MIT", install_requires=install_requires, packages=find_packages(), include_package_data=True, )
archai/research/lm_eval_harness/setup.py/0
{ "file_path": "archai/research/lm_eval_harness/setup.py", "repo_id": "archai", "token_count": 167 }
347
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from torchvision import transforms from archai.common.config import Config from archai.common.ml_utils import channel_norm from archai.supergraph.datasets import data if __name__ == "__main__": conf = Config(config_filepath="confs/datasets/flower102.yaml") conf_dataset = conf["dataset"] ds_provider = data.create_dataset_provider(conf_dataset) train_ds, _ = ds_provider.get_datasets( True, False, transforms.Compose([transforms.Resize(256), transforms.CenterCrop(224), transforms.ToTensor()]), transforms.Compose([]), ) print(channel_norm(train_ds)) exit(0)
archai/scripts/supergraph/download_datasets/find_mean_std.py/0
{ "file_path": "archai/scripts/supergraph/download_datasets/find_mean_std.py", "repo_id": "archai", "token_count": 263 }
348
import base64 import pickle from collections import OrderedDict from typing import Dict import numpy as np from archai.common import utils from archai.supergraph.algos.nasbench101 import model_metrics_pb2 def eval_to_dict(e) -> dict: return { "training_time": e.training_time, "train_accuracy": e.train_accuracy, "validation_accuracy": e.validation_accuracy, "test_accuracy": e.test_accuracy, } def main(): in_dataset_file = utils.full_path("~/dataroot/nasbench_ds/nasbench_full.tfrecord.pkl") out_dataset_file = utils.full_path("~/dataroot/nasbench_ds/nasbench_full.pkl") stats: Dict[str, dict] = {} with open(in_dataset_file, "rb") as f: records = pickle.load(f) for module_hash, epochs, raw_adjacency, raw_operations, raw_metrics in records: dim = int(np.sqrt(len(raw_adjacency))) adjacency = np.array([int(e) for e in list(raw_adjacency)], dtype=np.int8) adjacency = np.reshape(adjacency, (dim, dim)) operations = raw_operations.split(",") metrics = model_metrics_pb2.ModelMetrics.FromString(base64.b64decode(raw_metrics)) if module_hash not in stats: stats[module_hash] = { "module_hash": module_hash, "module_adjacency": adjacency, "module_operations": operations, "trainable_parameters": metrics.trainable_parameters, "total_time": metrics.total_time, "metrics": {}, } entry = stats[module_hash] assert entry["module_hash"] == module_hash # assert entry['module_adjacency'] == adjacency assert entry["module_operations"] == operations assert entry["trainable_parameters"] == metrics.trainable_parameters if epochs not in entry["metrics"]: entry["metrics"][epochs] = [] entry["metrics"][epochs].append([eval_to_dict(e) for e in metrics.evaluation_data]) dataset = sorted(stats.values(), key=lambda d: np.mean([r[-1]["test_accuracy"] for r in d["metrics"][108]])) for i, d in enumerate(dataset): d["rank"] = i odict = OrderedDict((d["module_hash"], d) for d in dataset) with open(out_dataset_file, "wb") as f: pickle.dump(odict, f) if __name__ == "__main__": main()
archai/scripts/supergraph/nasbench101/pkl1_pkl2.py/0
{ "file_path": "archai/scripts/supergraph/nasbench101/pkl1_pkl2.py", "repo_id": "archai", "token_count": 1027 }
349
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import argparse import pathlib from archai.common import utils from archai.supergraph.nas.model_desc import ModelDesc from archai.supergraph.nas.vis_model_desc import draw_model_desc def main(): parser = argparse.ArgumentParser(description="Visualize model description") parser.add_argument( "-f", "--model-desc-file", type=str, default="models/final_model_desc5.yaml", help="Model desc file" ) args, extra_args = parser.parse_known_args() model_desc_filepath = utils.full_path(args.model_desc_file) model_desc = ModelDesc.load(model_desc_filepath) out_file = pathlib.Path(model_desc_filepath).with_suffix("") draw_model_desc(model_desc, str(out_file)) if __name__ == "__main__": main()
archai/scripts/supergraph/visualize_desc.py/0
{ "file_path": "archai/scripts/supergraph/visualize_desc.py", "repo_id": "archai", "token_count": 284 }
350
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os import json import sys from archai.common.store import ArchaiStore CONNECTION_NAME = 'MODEL_STORAGE_CONNECTION_STRING' def change_schema(store: ArchaiStore): """ Handy script for making batch changes to the azure table """ for e in store.get_all_status_entities(): status = e['status'] if status == 'preparing': e['status'] = 'complete' e['epochs'] = 1 name = e['name'] print(f'fixing {name}') store.merge_status_entity(e) if __name__ == '__main__': experiment_name = os.getenv("EXPERIMENT_NAME", "facesynthetics") con_str = os.getenv(CONNECTION_NAME) if not con_str: print(f"Please specify your {CONNECTION_NAME} environment variable.") sys.exit(1) storage_account_name, storage_account_key = ArchaiStore.parse_connection_string(con_str) store = ArchaiStore(storage_account_name, storage_account_key, table_name=experiment_name) change_schema(store)
archai/tasks/face_segmentation/aml/azure/change_schema.py/0
{ "file_path": "archai/tasks/face_segmentation/aml/azure/change_schema.py", "repo_id": "archai", "token_count": 421 }
351
FROM ubuntu:18.04 SHELL ["/bin/bash", "-c"] ARG SNPE_SDK_ZIP ARG SNPE_SDK_ROOT ARG ANDROID_NDK_ZIP ARG ANDROID_NDK_ROOT RUN apt-get update && apt-get install -y build-essential libtool autoconf cmake unzip wget git unzip curl python3 python3-dev python3-distutils python3-pip ffmpeg libsm6 libxext6 wget locales libjpeg-dev zlib1g zlib1g-dev libprotobuf-dev protobuf-compiler # need cmake 3.22 to build latest version of onnx-simplifier on Ubuntu 18 RUN apt update && \ apt install -y software-properties-common lsb-release && \ apt clean all RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null RUN apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6AF7F09730B3F0A4 RUN apt update && apt install -y cmake # build latest version of protobuf needed by onnx RUN git clone https://github.com/protocolbuffers/protobuf.git RUN cd protobuf && \ git checkout v3.19.4 && \ git submodule update --init --recursive && \ mkdir build_source && cd build_source && \ cmake ../cmake -Dprotobuf_BUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release && \ make -j$(nproc) && \ make install # have to ensure default locale is utf-8 otherwise python bails with this error: # UnicodeEncodeError: 'ascii' codec can't encode character '\xe7' in position 17: ordinal not in range(128) RUN locale-gen en_US.UTF-8 # copy and unzip the SNPE SDK WORKDIR /home/archai/snpe COPY "${SNPE_SDK_ZIP}" . RUN unzip "${SNPE_SDK_ZIP}" # Copy and unzip the Android NDK WORKDIR /home/archai/ndk COPY "${ANDROID_NDK_ZIP}" . RUN unzip "${ANDROID_NDK_ZIP}" WORKDIR /home/archai ENV AZUREML_CONDA_ENVIRONMENT_PATH="/home/archai/miniconda3/snap37" ENV SNPE_ROOT="/home/archai/snpe/$SNPE_SDK_ROOT" ENV SNPE_ANDROID_ROOT="/home/archai/snpe/$SNPE_SDK_ROOT" ENV ANDROID_NDK_ROOT="/home/archai/ndk/$ANDROID_NDK_ROOT" ENV PATH="/home/archai/miniconda3/bin:$PATH:/home/archai:/home/archai/ndk/tools/${PLATFORM_TOOLS_ROOT}:/home/archai/snpe/${SNPE_SDK_ROOT}/bin/x86_64-linux-clang" ENV LC_ALL="en_US.UTF-8" ENV PYTHONPATH="/home/archai/snpe/$SNPE_SDK_ROOT/lib/python" ENV LD_LIBRARY_PATH="${AZUREML_CONDA_ENVIRONMENT_PATH}/lib:${SNPE_SDK_ROOT}/lib/x86_64-linux-clang:${LD_LIBRARY_PATH}" RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh RUN bash Miniconda3-latest-Linux-x86_64.sh -b -p ./miniconda3 RUN conda init bash RUN conda create -y -n snap37 python=3.8 pip=20.2.4 ENV PATH="${AZUREML_CONDA_ENVIRONMENT_PATH}/bin:$PATH" RUN wget -O azcopy_v10.tar.gz https://aka.ms/downloadazcopy-v10-linux && tar -xf azcopy_v10.tar.gz --strip-components=1 # this echo is a trick to bypass docker build cache. # simply change the echo string every time you want docker build to pull down new bits. RUN echo '04/25/2023 12:22 PM' >/dev/null && git clone https://github.com/microsoft/archai.git RUN cd archai && pip install -e .[dev] RUN echo "using this pip version: " && which pip RUN echo "using this python version: " && which python RUN pushd /home/archai/archai/tasks/face_segmentation/aml && \ python --version && \ pip install -r requirements.txt RUN pip list # This container starts running immediately so that the kubernetes cluster simply scales # automatically based on how busy this script is (see HorizontalPodAutoscaler in quantizer.yaml). COPY run.sh /home/archai/run.sh RUN ls -al /home/archai RUN cat run.sh RUN chmod u+x /home/archai/run.sh CMD ["bash", "-c", "/home/archai/run.sh"]
archai/tasks/face_segmentation/aml/docker/quantizer/Dockerfile/0
{ "file_path": "archai/tasks/face_segmentation/aml/docker/quantizer/Dockerfile", "repo_id": "archai", "token_count": 1513 }
352
ο»Ώ<?xml version="1.0" encoding="utf-8"?> <DirectedGraph GraphDirection="TopToBottom" Layout="Sugiyama" Offset="-820.8108333333334,-384.5347442626953" ZoomLevel="1" xmlns="http://schemas.microsoft.com/vs/2009/dgml"> <Nodes> <Node Id="AmlTraining" Category="aml" Bounds="178.281669209798,-42.1863471113841,158.853333333333,78.924467010498" Label="aml training &#xD;&#xA;(AmlPartialTrainingEvaluator)" UseManualLocation="True" /> <Node Id="AzureMLPipelines" Category="aml" Bounds="455.9075,-19.9970294464111,120.336666666667,62.9644670104981" Label="Azure ML Pipelines" UseManualLocation="True" /> <Node Id="BlobStore(models)" Category="storage" Bounds="372.473597513835,72.9675375640869,116.526666666667,89.5813311767578" Label="blob store &#xD;&#xA;(models &amp; results)" UseManualLocation="True" /> <Node Id="RemoteDeviceInferenceTesting" Category="remote" Bounds="72.2816666666666,170.359651075872,206.316666666667,78.9244670104981" Label="remote device inference testing &#xD;&#xA;(RemoteAzureBenchmarkEvaluator)" UseManualLocation="True" /> <Node Id="Search" Category="search" Bounds="0,0,53.9833333333333,62.964467010498" Label="search" UseManualLocation="True" /> <Node Id="TableResults" Category="storage" Bounds="210.715582682292,66.738219899114,84.0966666666666,73.6213311767578" Label="table results" UseManualLocation="True" /> </Nodes> <Links> <Link Source="AmlTraining" Target="AzureMLPipelines" Bounds="337.135002543131,1.64407801566514,109.786077444833,6.03785408365997" /> <Link Source="AmlTraining" Target="BlobStore(models)" Bounds="314.38133986177,36.7381198991139,50.7064047608595,35.3076040473083" /> <Link Source="AmlTraining" Target="TableResults" Bounds="254.894834328378,36.7381198991139,0.977495669259497,21.0098250749297" /> <Link Source="AzureMLPipelines" Target="BlobStore(models)" Bounds="448.526763916016,42.9674377441406,44.100830078125,25.0390167236328" /> <Link Source="BlobStore(models)" Target="AzureMLPipelines" Bounds="451.671051025391,47.7068099975586,44.4396362304688,25.2607269287109" /> <Link Source="RemoteDeviceInferenceTesting" Target="TableResults" Bounds="204.152602969458,147.637053103474,16.5328942653301,22.7225979723975" /> <Link Source="Search" Target="AmlTraining" Bounds="53.9833333333333,10.3717085435882,115.395650767872,17.1087060975231" /> <Link Source="Search" Target="RemoteDeviceInferenceTesting" Bounds="52.7301876549027,62.403421700363,84.1039893644507,101.039033450549" /> <Link Source="TableResults" Target="Search" Bounds="62.5571377644598,42.8347555073116,148.158444917832,47.2922740456947" /> </Links> <Categories> <Category Id="aml" /> <Category Id="remote" /> <Category Id="search" /> <Category Id="storage" /> </Categories> <Properties> <Property Id="Bounds" DataType="System.Windows.Rect" /> <Property Id="Expression" DataType="System.String" /> <Property Id="GraphDirection" DataType="Microsoft.VisualStudio.Diagrams.Layout.LayoutOrientation" /> <Property Id="GroupLabel" DataType="System.String" /> <Property Id="IsEnabled" DataType="System.Boolean" /> <Property Id="Label" Label="Label" Description="Displayable label of an Annotatable object" DataType="System.String" /> <Property Id="Layout" DataType="System.String" /> <Property Id="Offset" DataType="System.String" /> <Property Id="TargetType" DataType="System.Type" /> <Property Id="UseManualLocation" DataType="System.Boolean" /> <Property Id="Value" DataType="System.String" /> <Property Id="ValueLabel" DataType="System.String" /> <Property Id="ZoomLevel" DataType="System.String" /> </Properties> <Styles> <Style TargetType="Node" GroupLabel="storage" ValueLabel="True"> <Condition Expression="HasCategory('storage')" /> <Setter Property="Icon" Value="pack://application:,,,/Microsoft.VisualStudio.Progression.GraphControl;component/Icons/Table.png" /> </Style> <Style TargetType="Node" GroupLabel="remote" ValueLabel="True"> <Condition Expression="HasCategory('remote')" /> <Setter Property="Icon" Value="pack://application:,,,/Microsoft.VisualStudio.Progression.GraphControl;component/Icons/CellPhone.png" /> </Style> <Style TargetType="Node" GroupLabel="search" ValueLabel="True"> <Condition Expression="HasCategory('search')" /> <Setter Property="Icon" Value="pack://application:,,,/Microsoft.VisualStudio.Progression.GraphControl;component/Icons/Gears.png" /> </Style> <Style TargetType="Node" GroupLabel="aml" ValueLabel="True"> <Condition Expression="HasCategory('aml')" /> <Setter Property="Icon" Value="pack://application:,,,/Microsoft.VisualStudio.Progression.GraphControl;component/Icons/Network.png" /> </Style> <Style TargetType="Node"> <Setter Property="HorizontalAlignment" Value="Center" /> <Setter Property="IconPlacement" Value="Top" /> </Style> </Styles> </DirectedGraph>
archai/tasks/face_segmentation/aml/images/system.dgml/0
{ "file_path": "archai/tasks/face_segmentation/aml/images/system.dgml", "repo_id": "archai", "token_count": 1830 }
353
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import argparse from datetime import datetime from pathlib import Path import csv import os import sys import time import tqdm import json import numpy as np SCRIPT_DIR = os.path.dirname(__file__) sys.path += [os.path.join(SCRIPT_DIR, '..', 'util')] from shell import Shell sys.path += [os.path.join(SCRIPT_DIR, '..', 'vision')] from collect_metrics import get_metrics from shutil import rmtree from onnxruntime import InferenceSession TASK = os.path.basename(os.getcwd()) MODEL = "model" TEST_IMAGES = os.path.join('data', 'test') VERBOSE = False MAX_BATCH_SIZE = 1000 DEVICE = None # device parameters # the /data mount on the device has 64GB available. DEVICE_WORKING_DIR = "/data/local/tmp" RANDOM_INPUTS = 'random_inputs' RANDOM_INPUT_LIST = 'random_raw_list.txt' SNPE_ROOT = None INPUT_LIST_FILENAME = 'input_list_for_device.txt' snpe_target_arch = None def set_device(device): global DEVICE DEVICE = device shell = Shell() shell.run(os.getcwd(), adb("root")) def get_device(): global DEVICE if DEVICE: return DEVICE else: raise Exception("Please specify the '--device' to use") def _get_input_layout(shape): # snpe-onnx-to-dlc supported input layouts are: # NCHW, NHWC, NFC, NCF, NTF, TNF, NF, NC, F, NONTRIVIAL # N = Batch, C = Channels, H = Height, W = Width, F = Feature, T = Time if shape[0] == 3: # then the RGB channel is first, so we are NCHW return 'NCHW' elif shape[-1] == 3: return 'NHWC' else: raise Exception(f"Cannot figure out input layout from shape: {shape}") def onnx_to_dlc(model, model_dir): sess = InferenceSession(model, providers=['CPUExecutionProvider']) if len(sess._sess.inputs_meta) > 1: raise Exception("Cannot handle models with more than one input") if len(sess._sess.outputs_meta) > 1: raise Exception("Cannot handle models more than one output") input_meta = sess._sess.inputs_meta[0] output_meta = sess._sess.outputs_meta[0] filename = os.path.basename(model) basename = os.path.splitext(filename)[0] print(f"==> Converting model {model} to .dlc...") shape = input_meta.shape if len(shape) == 4: shape = shape[1:] # trim off batch dimension layout = _get_input_layout(shape) input_shape = ",".join([str(i) for i in input_meta.shape]) output_dlc = f"{model_dir}/{basename}.dlc" # snpe-onnx-to-dlc changes the model input to NHWC. dlc_shape = shape if layout == 'NHWC' else [shape[1], shape[2], shape[0]] command = "snpe-onnx-to-dlc " + \ f"-i \"{model}\" " + \ f"-d {input_meta.name} \"{input_shape}\" " + \ f"--input_layout {input_meta.name} {layout} " + \ f"--out_node \"{output_meta.name}\" " + \ f"-o \"{output_dlc}\" " print(command) shell = Shell() rc = shell.run(os.getcwd(), command, True) if 'Conversion completed successfully' not in rc: raise Exception(rc) # the DLC model undoes the NCHW and results in a .dlc model that takes NHWC input. return [output_dlc, dlc_shape] def create_snpe_config(model_file, output_dir=None): sess = InferenceSession(model_file, providers=['CPUExecutionProvider']) if len(sess._sess.inputs_meta) > 1: raise Exception("Cannot handle models with more than one input") if len(sess._sess.outputs_meta) > 1: raise Exception("Cannot handle models more than one output") input_meta = sess._sess.inputs_meta[0] output_meta = sess._sess.outputs_meta[0] shape = input_meta.shape if len(shape) == 4: shape = shape[1:] # trim off batch dimension layout = _get_input_layout(shape) # snpe-onnx-to-dlc changes the model input to NHWC output_shape = output_meta.shape[1:] # stip off batch dimension output_shape = output_shape if layout == 'NHWC' else [output_shape[1], output_shape[2], output_shape[0]] config = { "io_config": { "input_names": [input_meta.name], "input_shapes": [input_meta.shape], "output_names": [output_meta.name], "output_shapes": [output_shape] }, "convert_options": { "input_layouts": [layout] }, "quantize_options": { "use_enhanced_quantizer": True } } if output_dir is not None: config_file = os.path.join(output_dir, 'snpe_config.json') with open(config_file, 'w', encoding='utf-8') as f: json.dump(config, f, indent=2) return config def convert_onnx_to_dlc(onnx_model, snpe_output_file): from olive.passes import SNPEConversion config = create_snpe_config(onnx_model.model_path, os.path.dirname(snpe_output_file)) convert_options = config['io_config'] convert_options["input_layouts"] = config['convert_options']["input_layouts"] snpe_conversion = SNPEConversion(convert_options, disable_search=True,) snpe_model = snpe_conversion.run(onnx_model, snpe_output_file) assert Path(snpe_model.model_path).is_file() dlc_model_path = snpe_model.model_path input_shape = snpe_model.io_config["input_shapes"][0] output_shape = snpe_model.io_config["output_shapes"][0] return dlc_model_path, input_shape, output_shape def convert_model(model, model_dir): """ Converts the given model from .onnx form to .dlc and returns the path to the .dlc file, the input shape, and an optional error message if something went wrong.""" if not os.path.isfile(model): print(f"model to convert not found in {model}") sys.exit(1) # make sure we run the downloaded model and not some old model # left over from a previous run. if os.path.isdir(model_dir): rmtree(model_dir) os.makedirs(model_dir) from olive.model import ONNXModel filename = os.path.basename(model) basename, ext = os.path.splitext(filename) if ext != ".onnx": print("convert_model was not provided with a valid .onnx model") sys.exit(1) try: onnx_model = ONNXModel(model, basename) snpe_output_file = f"{model_dir}/model.dlc" model, input_shape, output_shape = convert_onnx_to_dlc(onnx_model, snpe_output_file) return [model, input_shape[1:], output_shape[1:], None] except Exception as ex: return [None, None, str(ex)] def create_quant_dataloader(data_dir): from olive.snpe import SNPEProcessedDataLoader return SNPEProcessedDataLoader(data_dir, input_list_file="input_list.txt") def quantize_model(model, onnx_model, snpe_model_dir): """ Returns tuple containing the quantized model file and optional error message """ from olive.model import SNPEModel from olive.passes import SNPEQuantization snpe_model_dir = os.path.realpath(snpe_model_dir) # Olive requires the full path basename = os.path.splitext(os.path.basename(model))[0] output_model = os.path.join(snpe_model_dir, f"{basename}.quant.dlc") full_dlc_path = os.path.join(snpe_model_dir, f"{basename}.dlc") data_dir = os.path.join('data', 'quant') config = create_snpe_config(onnx_model, snpe_model_dir) if config is None: return [None, "### SNPE Configuration file could not be loaded"] snpe_model = SNPEModel(model_path=full_dlc_path, name=basename, **config["io_config"]) quant_options = { "use_enhanced_quantizer": True, "data_dir": data_dir, "dataloader_func": create_quant_dataloader } # tbd: what is "enable_htp": True snpe_quantization = SNPEQuantization(quant_options, disable_search=True) try: snpe_quantized_model = snpe_quantization.run(snpe_model, output_model) except Exception as ex: error = None for line in str(ex): if '[ERROR]' in line: error = line if not error: error = str(ex) return [None, error] if not Path(snpe_quantized_model.model_path).is_file(): return [None, "### Model conversion failed"] return [snpe_quantized_model.model_path, None] def adb(cmd): return f"adb -s {get_device()} {cmd}" def download_results(input_images, start, output_dir): shell = Shell() result = shell.run(os.getcwd(), adb(f"shell ls {DEVICE_WORKING_DIR}/{TASK}/{MODEL}/output"), False) if not os.path.isdir(output_dir): os.makedirs(output_dir) # Now download results from output folder full of 'Result_nnn' folders, copying the file to # down to match with the input image name, so the input image name might be 000000.bin, and # the downloaded file might be named 'Result_0/logits_0:1.raw' and this will become # the downloaded file named `000000.raw` in the 'snpe_output' folder. This makes it easier # to match the the output with the input later when we are analyzing the results. output_filename = None index = start for name in input_images: line = f"Result_{index}" if line in result: raw_file = os.path.splitext(name)[0] + '.raw' index += 1 if not output_filename: cmd = adb(f"shell ls {DEVICE_WORKING_DIR}/{TASK}/{MODEL}/output/{line}/") device_result = shell.run(os.getcwd(), cmd, False) output_filename = device_result.strip() print(f"{line}/{output_filename} ===> {raw_file}") device_result = f"{DEVICE_WORKING_DIR}/{TASK}/{MODEL}/output/{line}/{output_filename}" rc = shell.run(output_dir, adb(f"pull {device_result} {raw_file}"), False) if "error:" in rc: print("### error downloading results: " + rc) sys.exit(1) def get_target_arch(snpe_root): global SNPE_ROOT SNPE_ROOT = snpe_root if not os.path.isdir(snpe_root): print("SNPE_ROOT folder {} not found".format(snpe_root)) sys.exit(1) for name in os.listdir(os.path.join(snpe_root, 'lib')): if name.startswith('aarch64-android'): print(f"Using SNPE_TARGET_ARCH {name}") return name print("SNPE_ROOT folder {} missing aarch64-android-*".format(snpe_root)) sys.exit(1) def clear_images(): shell = Shell() target = f"{DEVICE_WORKING_DIR}/{TASK}/data/test" shell.run(os.getcwd(), adb(f"shell \"rm -rf {target}\"")) def copy_file(shell, folder, filename, target): rc = shell.run(folder, adb(f"push {filename} {target}"), False) if "error:" in rc: print(f"### Error copying file {filename}: {rc}") sys.exit(1) def setup_images(folder, batch): shell = Shell() target = f"{DEVICE_WORKING_DIR}/{TASK}/data/test" shell.run(os.getcwd(), adb(f"shell \"mkdir -p {target}\"")) # since we are doing a batch we have to generate the input_list_for_device.txt file. list_file = INPUT_LIST_FILENAME with open(list_file, 'w', encoding='utf-8') as f: for line in batch: f.write(f"{target}/{line}\n") copy_file(shell, os.getcwd(), list_file, target) # pushing the whole dir often fails for some reason, so we push individual files with a retry loop with tqdm.tqdm(total=len(batch)) as pbar: for file in batch: pbar.update(1) retries = 5 while retries > 0: try: copy_file(shell, folder, file, target) break except Exception as e: retries -= 1 print(f"Error {e}, retrying in 1 second ...") time.sleep(1) if retries == 0: raise Exception(f"Cannot copy file {file} to {target}") def get_setup(): global snpe_target_arch if not snpe_target_arch: print("snpe_target_arch is not set") sys.exit(1) lib_path = f"{DEVICE_WORKING_DIR}/dsp/lib;/system/lib/rfsa/adsp;/system/vendor/lib/rfsa/adsp;/dsp" setup = f"export SNPE_TARGET_ARCH={snpe_target_arch} && " + \ f"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{DEVICE_WORKING_DIR}/{snpe_target_arch}/lib && " + \ f"export PATH=$PATH:{DEVICE_WORKING_DIR}/{snpe_target_arch}/bin && " + \ f"export ADSP_LIBRARY_PATH='{lib_path}' && " + \ f"cd {DEVICE_WORKING_DIR}/{TASK}/{MODEL}" print("Using environment:") print(setup) return setup def upload_first_image(dataset): target = f"{DEVICE_WORKING_DIR}/{TASK}/data/test" shell = Shell() shell.run(os.getcwd(), adb(f"shell \"mkdir -p {target}\"")) files = os.listdir(dataset) files.sort() filename = files[0] print(f"Uploading image {filename}...") shell.run(dataset, adb(f"push {filename} {target}"), VERBOSE) return os.path.join(target, filename) def generate_random_inputs(count, shape): input_list_path = os.path.join(RANDOM_INPUTS, RANDOM_INPUT_LIST) meta = os.path.join(RANDOM_INPUTS, 'meta.json') if os.path.isfile(meta): with open(meta, 'r', encoding='utf-8') as f: info = json.load(f) if info['count'] == count and info['shape'] == str(shape): # then we can reuse these random inputs. return input_list_path if os.path.isdir(RANDOM_INPUTS): rmtree(RANDOM_INPUTS) os.makedirs(RANDOM_INPUTS) with open(meta, 'w', encoding='utf-8') as f: info = {'count': count, 'shape': str(shape)} json.dump(info, f, indent=2) random_data_dim = np.product(shape) with open(input_list_path, 'w', encoding='utf-8') as input_list: for i in range(count): rand_raw = np.random.uniform(-1.0, +1.0, random_data_dim).astype(np.float32) raw_filepath = os.path.join(RANDOM_INPUTS, 'random_input_' + str(i) + '.raw') input_list.write(raw_filepath + "\n") with open(raw_filepath, 'wb') as fid: fid.write(rand_raw) return input_list_path def get_memlog_usage(benchmark_dir): # find the memory usage # Uptime: 1738234338 Realtime: 1738234338 for i in range(1, 6): memlog = os.path.join(benchmark_dir, 'results', 'latest_results', 'mem', 'DSP_ub_tf8', f'Run{i}', 'MemLog.txt') if os.path.isfile(memlog): try: for line in open(memlog, 'r', encoding='utf-8').readlines(): if 'Realtime:' in line: parts = line.strip().split(' ') try: mem = int(parts[-1]) if mem != 0: return [mem, memlog] except: pass except: pass return [0, ''] def read_total_inference_avg(csvfile): col_index = 11 with open(csvfile, 'r', encoding='utf-8') as file: for data in csv.reader(file): for i in range(len(data)): col = data[i] if col.startswith('DSP_ub_tf8_timing'): col_index = i break if 'Total Inference Time' in data: return int(data[col_index]) return 0 def run_throughput(model, duration): if not model: print("### --run needs the --model parameter") sys.exit(1) shell = Shell() use_dsp = "--use_dsp" if 'quant' in model else '' setup = get_setup() dataset = os.path.join('data', 'test') filename = upload_first_image(dataset) print(f"Running throughput test for {duration} seconds...") rc = shell.run( os.getcwd(), adb(f"shell \"{setup} &&" + f"snpe-throughput-net-run --container ./{model} {use_dsp} --duration {duration} " + "--iterations 1 --perf_profile high_performance " + f"--input_raw {filename} \""), VERBOSE) lines = rc.split('\n') for out in lines: if "Total throughput:" in out: print(out) def compute_results(shape, num_classes, output_folder): if not os.path.isdir(output_folder): print("Folder not found: '{output_folder}'") return dataset = os.getenv("INPUT_DATASET") if not os.path.isdir(dataset): print("Please set your INPUT_DATASET environment variable") return return get_metrics(shape, False, dataset, output_folder, num_classes) def run_batches(onnx_model, dlc_model, images_dir, workspace_dir): from olive.snpe import ( SNPESessionOptions, SNPEInferenceSession, SNPEProcessedDataLoader ) input_dir = os.path.realpath(images_dir) snpe_model_dir = os.path.dirname(dlc_model) output_dir = os.path.join(workspace_dir, 'snpe-output') if os.path.isdir(output_dir): rmtree(output_dir) full_dlc_path = os.path.realpath(dlc_model) basename = os.path.splitext(os.path.basename(dlc_model))[0] options = SNPESessionOptions( android_target=get_device(), device="dsp" if 'quant' in basename else "cpu", workspace=workspace_dir, accumulate_outputs=True ) config = create_snpe_config(onnx_model, snpe_model_dir) if config is None: return [None, "### SNPE Configuration file could not be loaded"] io_config = config["io_config"] # More than 1000 test images can fill up the device and then we run out of memory. # So we run the inference session in batches here. data_loader = SNPEProcessedDataLoader(input_dir, input_list_file='input_list.txt', batch_size=100) output_folder = '' latencies = [] for i in range(data_loader.num_batches): print(f"Running SNPE inference batch {i} of {data_loader.num_batches}") batch_dir, batch_input_list, _ = data_loader.get_batch(i) session = SNPEInferenceSession(full_dlc_path, io_config, options) results = session.net_run(batch_input_list, batch_dir) output_folder = results['output_dir'] latencies += [results['latencies']] return output_folder, latencies def run_benchmark(onnx_model, dlc_model, images_dir, duration, workspace_dir): from olive.snpe import ( SNPESessionOptions, SNPEInferenceSession, SNPEProcessedDataLoader ) input_dir = os.path.realpath(images_dir) _ = os.path.join(input_dir, 'input_list.txt') snpe_model_dir = os.path.dirname(dlc_model) output_dir = os.path.join(workspace_dir, 'snpe-output') if os.path.isdir(output_dir): rmtree(output_dir) full_dlc_path = os.path.realpath(dlc_model) basename = os.path.splitext(os.path.basename(dlc_model))[0] # This mirrors what the snpe_bench.py script is doing. options = SNPESessionOptions( android_target=get_device(), device="dsp" if 'quant' in basename else "cpu", extra_args="--perf_profile high_performance --profiling_level basic", workspace=workspace_dir, accumulate_outputs=True ) config = create_snpe_config(onnx_model, snpe_model_dir) if config is None: return [None, "### SNPE Configuration file could not be loaded"] data_loader = SNPEProcessedDataLoader(images_dir, input_list_file='input_list.txt', batch_size=50) io_config = config["io_config"] output_folder = '' latencies = [] print("Running SNPE inference benchmark") batch_dir, batch_input_list, _ = data_loader.get_batch(0) session = SNPEInferenceSession(full_dlc_path, io_config, options) results = session.net_run(batch_input_list, batch_dir) output_folder = results['output_dir'] latencies += [results['latencies']] return (output_folder, latencies) def parse_command_line(): parser = argparse.ArgumentParser(description='Run a model on the QUALCOMM DSP using adb and SNPE SDK to quantize ' + 'the model') parser.add_argument('--device', '-d', help='The Android device id (as returned by adb devices)', default=None) parser.add_argument('--images', '-i', help='Location of local test image dataset (created with create_data.py)') parser.add_argument('--model', '-m', help='The path to the ONNX model to test') parser.add_argument('--dlc', help='The specific .dlc model to test, if not provided it will be converted from ' + '--model and stored in an snpe_models folder') parser.add_argument('--quantize', '-q', help='Quantize the given onnx or dlc model', action="store_true") parser.add_argument('--benchmark', '-b', help='Run a benchmark on the given model', action="store_true") parser.add_argument('--throughput', '-t', help='Run performance test of the given model', action="store_true") parser.add_argument('--duration', type=int, help='Duration of throughput and benchmark tests (default 10 seconds)', default=10) parser.add_argument('--verbose', '-v', help='Show all output (default false)', action="store_true") args = parser.parse_args() if not args.model: print("Please provide an onnx model as input") return None ndk = os.getenv("ANDROID_NDK_ROOT") if not ndk: print("you must have a ANDROID_NDK_ROOT installed, see the readme.md") return None args.ndk = ndk snpe = os.getenv("SNPE_ANDROID_ROOT") if not snpe: print("please set your SNPE_ANDROID_ROOT environment variable, see readme.md") return None snpe = os.getenv("SNPE_ROOT") if not snpe: print("please set your SNPE_ROOT environment variable, see readme.md") return None args.snpe = snpe return args def main(): global VERBOSE args = parse_command_line() if args is None: return 1 VERBOSE = args.verbose if args.device: set_device(args.device) model = args.model model_dir = "snpe_models" if args.dlc: dlc_model = args.dlc else: dlc_model, shape, output_shape, error = convert_model(args.model, model_dir) if error: print(error) return 1 config = create_snpe_config(args.model, '.') if args.quantize: quantized_model, error = quantize_model(model, model, model_dir) if error is not None: print(error) return 1 if args.throughput: run_throughput(model, args.duration) return 0 if args.benchmark: start = datetime.now() image_path = os.path.realpath(args.images) output_folder, latencies = run_benchmark(model, dlc_model, image_path, args.duration, '.') end = datetime.now() print(f"benchmark completed in {end-start} seconds, results in {output_folder}") for m in latencies: print(f"total_inference_time={m['total_inference_time']}") return 0 if args.images: start = datetime.now() output_folder, latencies = run_batches(model, dlc_model, args.images, '.') end = datetime.now() print(f"batch completed in {end-start} seconds, results in {output_folder}") for m in latencies: print(f"total_inference_time={m['total_inference_time']}") output_shape = config['io_config']['output_shapes'][0] compute_results(output_shape, output_folder) if __name__ == '__main__': sys.exit(main())
archai/tasks/face_segmentation/aml/snpe/test_snpe.py/0
{ "file_path": "archai/tasks/face_segmentation/aml/snpe/test_snpe.py", "repo_id": "archai", "token_count": 10078 }
354
search: search_space: name: hgnet params: num_classes: 18 img_size: [256, 256] # (w, h) in_channels: 3 op_subset: ['conv3x3', 'conv5x5', 'conv7x7'] stem_strides: [2] # Number of downsampling blocks (without counting stem conv) num_blocks: 5 # Maximum number of layers in downsampling blocks downsample_block_max_ops: 4 # Maximum number of layers in skip blocks skip_block_max_ops: 2 # Maximum number of layers in upsampling blocks upsample_block_max_ops: 4 # Maximum number of layers after the final upsampling layer post_upsample_max_ops: 2 algorithm: name: evolution_pareto params: num_iters: 20 init_num_models: 20 mutations_per_parent: 5 num_crossovers: 6 max_unseen_population: 20 num_random_mix: 6 max_parameters: 5e7 # we are training elsewhere, so tell the search not to try and save them locally! save_pareto_model_weights: false target: name: snp metric_key: mean max_retries: 15 retry_interval: 60 verbose: true training: # https://learn.microsoft.com/en-us/answers/questions/1215210/limited-gpu-ram batch_size: 16 learning_rate: 2e-4 partial_training_epochs: 1 metric_key: val_iou aml: connection_str: ${MODEL_STORAGE_CONNECTION_STRING} blob_container_name: models experiment_name: facesynthetics partition_key: main subscription_id: ${AZURE_SUBSCRIPTION_ID} resource_group: ${AML_RESOURCE_GROUP} workspace_name: ${AML_WORKSPACE_NAME} timeout: 18000 search_cluster: name: nas-cpu-cluster-D14-v2 size: Standard_D14_v2 location: westus2 training_cluster: name: nas-gpu-cluster-NC6 size: Standard_NC6 location: westus2 max_instances: 20 environment: name: facesynthetics-nas-env channels: - conda-forge - pytorch - nvidia dependencies: - python=3.10 - pip - pip: - azure-ai-ml==1.5.0 - azure-storage-blob - azure-data-tables - azure-identity - azureml-mlflow - matplotlib - mldesigner - mlflow - tqdm - tensorwatch - torch - torchvision - torchaudio - transformers==4.27.4 - xformers - archai[dev] @ git+https://github.com/microsoft/archai.git
archai/tasks/face_segmentation/confs/aml_search.yaml/0
{ "file_path": "archai/tasks/face_segmentation/confs/aml_search.yaml", "repo_id": "archai", "token_count": 1068 }
355
from pathlib import Path from typing import Tuple import torch from torch import nn import pytorch_lightning as pl from .metrics import get_confusion_matrix, get_iou, get_f1_scores class SegmentationTrainingLoop(pl.LightningModule): def __init__(self, model: nn.Module, lr: float = 2e-4, ignore_mask_value: int = 255): super().__init__() self.model = model self.num_classes = model.num_classes self.in_channels = model.in_channels self.ignore_mask_value = ignore_mask_value self.lr = lr self.save_hyperparameters(ignore=['model']) self.loss = torch.nn.CrossEntropyLoss(ignore_index=255) def forward(self, x): return self.model(x) def shared_step(self, batch, stage='train'): image = batch['image'] mask = batch['mask'] batch_size, _, height, width = image.shape assert image.ndim == 4 logits_mask = self.forward(image) # (N, C, H, W) logits_mask = logits_mask.view(batch_size, self.num_classes, -1) loss = self.loss(logits_mask, mask.view(batch_size, -1)) pred_classes = logits_mask.argmax(axis=1) confusion_matrix = get_confusion_matrix( pred_classes.cpu(), mask.cpu(), self.num_classes, self.ignore_mask_value ) iou_dict = get_iou(confusion_matrix) f1_dict = get_f1_scores(confusion_matrix) results = { f'{stage}_loss': loss, f'{stage}_mIOU': iou_dict['mIOU'], f'{stage}_macro_f1': f1_dict['macro_f1'], f'{stage}_weighted_f1': f1_dict['weighted_f1'] } return results def training_step(self, batch, batch_idx): results = self.shared_step(batch, stage='train') self.log_dict(results, sync_dist=True, on_step=True, on_epoch=True) return results['train_loss'] def validation_step(self, batch, batch_idx): results = self.shared_step(batch, stage='validation') self.log_dict(results, sync_dist=True, on_step=False, on_epoch=True) return results def predict(self, image): with torch.no_grad(): return self.model.predict(image) def configure_optimizers(self): optimizer = torch.optim.Adam(self.parameters(), lr=self.lr) return [optimizer]
archai/tasks/face_segmentation/training/pl_trainer.py/0
{ "file_path": "archai/tasks/face_segmentation/training/pl_trainer.py", "repo_id": "archai", "token_count": 1038 }
356
"""This is from torchvision source code: https://github.com/pytorch/vision/blob/main/references/classification/utils.py""" import copy import datetime import errno import hashlib import os import time from collections import defaultdict, deque, OrderedDict import torch import torch.distributed as dist class SmoothedValue: """Track a series of values and provide access to smoothed values over a window or the global series average. """ def __init__(self, window_size=20, fmt=None): if fmt is None: fmt = "{median:.4f} ({global_avg:.4f})" self.deque = deque(maxlen=window_size) self.total = 0.0 self.count = 0 self.fmt = fmt def update(self, value, n=1): self.deque.append(value) self.count += n self.total += value * n def synchronize_between_processes(self): """ Warning: does not synchronize the deque! """ t = reduce_across_processes([self.count, self.total]) t = t.tolist() self.count = int(t[0]) self.total = t[1] @property def median(self): d = torch.tensor(list(self.deque)) return d.median().item() @property def avg(self): d = torch.tensor(list(self.deque), dtype=torch.float32) return d.mean().item() @property def global_avg(self): return self.total / self.count @property def max(self): return max(self.deque) @property def value(self): return self.deque[-1] def __str__(self): return self.fmt.format( median=self.median, avg=self.avg, global_avg=self.global_avg, max=self.max, value=self.value ) class MetricLogger: def __init__(self, delimiter="\t"): self.meters = defaultdict(SmoothedValue) self.delimiter = delimiter def update(self, **kwargs): for k, v in kwargs.items(): if isinstance(v, torch.Tensor): v = v.item() assert isinstance(v, (float, int)) self.meters[k].update(v) def __getattr__(self, attr): if attr in self.meters: return self.meters[attr] if attr in self.__dict__: return self.__dict__[attr] raise AttributeError(f"'{type(self).__name__}' object has no attribute '{attr}'") def __str__(self): loss_str = [] for name, meter in self.meters.items(): loss_str.append(f"{name}: {str(meter)}") return self.delimiter.join(loss_str) def synchronize_between_processes(self): for meter in self.meters.values(): meter.synchronize_between_processes() def add_meter(self, name, meter): self.meters[name] = meter def log_every(self, iterable, print_freq, header=None): i = 0 if not header: header = "" start_time = time.time() end = time.time() iter_time = SmoothedValue(fmt="{avg:.4f}") data_time = SmoothedValue(fmt="{avg:.4f}") space_fmt = ":" + str(len(str(len(iterable)))) + "d" if torch.cuda.is_available(): log_msg = self.delimiter.join( [ header, "[{0" + space_fmt + "}/{1}]", "eta: {eta}", "{meters}", "time: {time}", "data: {data}", "max mem: {memory:.0f}", ] ) else: log_msg = self.delimiter.join( [header, "[{0" + space_fmt + "}/{1}]", "eta: {eta}", "{meters}", "time: {time}", "data: {data}"] ) MB = 1024.0 * 1024.0 for obj in iterable: data_time.update(time.time() - end) yield obj iter_time.update(time.time() - end) if i % print_freq == 0: eta_seconds = iter_time.global_avg * (len(iterable) - i) eta_string = str(datetime.timedelta(seconds=int(eta_seconds))) if torch.cuda.is_available(): print( log_msg.format( i, len(iterable), eta=eta_string, meters=str(self), time=str(iter_time), data=str(data_time), memory=torch.cuda.max_memory_allocated() / MB, ) ) else: print( log_msg.format( i, len(iterable), eta=eta_string, meters=str(self), time=str(iter_time), data=str(data_time) ) ) i += 1 end = time.time() total_time = time.time() - start_time total_time_str = str(datetime.timedelta(seconds=int(total_time))) print(f"{header} Total time: {total_time_str}") class ExponentialMovingAverage(torch.optim.swa_utils.AveragedModel): """Maintains moving averages of model parameters using an exponential decay. ``ema_avg = decay * avg_model_param + (1 - decay) * model_param`` `torch.optim.swa_utils.AveragedModel <https://pytorch.org/docs/stable/optim.html#custom-averaging-strategies>`_ is used to compute the EMA. """ def __init__(self, model, decay, device="cpu"): def ema_avg(avg_model_param, model_param, num_averaged): return decay * avg_model_param + (1 - decay) * model_param super().__init__(model, device, ema_avg) def update_parameters(self, model): for p_swa, p_model in zip(self.module.state_dict().values(), model.state_dict().values()): device = p_swa.device p_model_ = p_model.detach().to(device) if self.n_averaged == 0: p_swa.detach().copy_(p_model_) else: p_swa.detach().copy_(self.avg_fn(p_swa.detach(), p_model_, self.n_averaged.to(device))) self.n_averaged += 1 def accuracy(output, target, topk=(1,)): """Computes the accuracy over the k top predictions for the specified values of k""" with torch.inference_mode(): maxk = max(topk) batch_size = target.size(0) if target.ndim == 2: target = target.max(dim=1)[1] _, pred = output.topk(maxk, 1, True, True) pred = pred.t() correct = pred.eq(target[None]) res = [] for k in topk: correct_k = correct[:k].flatten().sum(dtype=torch.float32) res.append(correct_k * (100.0 / batch_size)) return res def mkdir(path): try: os.makedirs(path) except OSError as e: if e.errno != errno.EEXIST: raise def setup_for_distributed(is_master): """ This function disables printing when not in master process """ import builtins as __builtin__ builtin_print = __builtin__.print def print(*args, **kwargs): force = kwargs.pop("force", False) if is_master or force: builtin_print(*args, **kwargs) __builtin__.print = print def is_dist_avail_and_initialized(): if not dist.is_available(): return False if not dist.is_initialized(): return False return True def get_world_size(): if not is_dist_avail_and_initialized(): return 1 return dist.get_world_size() def get_rank(): if not is_dist_avail_and_initialized(): return 0 return dist.get_rank() def is_main_process(): return get_rank() == 0 def save_on_master(*args, **kwargs): if is_main_process(): torch.save(*args, **kwargs) def init_distributed_mode(args): if "RANK" in os.environ and "WORLD_SIZE" in os.environ: args.rank = int(os.environ["RANK"]) args.world_size = int(os.environ["WORLD_SIZE"]) args.gpu = int(os.environ["LOCAL_RANK"]) elif "SLURM_PROCID" in os.environ: args.rank = int(os.environ["SLURM_PROCID"]) args.gpu = args.rank % torch.cuda.device_count() elif hasattr(args, "rank"): pass else: print("Not using distributed mode") args.distributed = False return args.distributed = True torch.cuda.set_device(args.gpu) args.dist_backend = "nccl" print(f"| distributed init (rank {args.rank}): {args.dist_url}", flush=True) torch.distributed.init_process_group( backend=args.dist_backend, init_method=args.dist_url, world_size=args.world_size, rank=args.rank ) setup_for_distributed(args.rank == 0) def average_checkpoints(inputs): """Loads checkpoints from inputs and returns a model with averaged weights. Original implementation taken from: https://github.com/pytorch/fairseq/blob/a48f235636557b8d3bc4922a6fa90f3a0fa57955/scripts/average_checkpoints.py#L16 Args: inputs (List[str]): An iterable of string paths of checkpoints to load from. Returns: A dict of string keys mapping to various values. The 'model' key from the returned dict should correspond to an OrderedDict mapping string parameter names to torch Tensors. """ params_dict = OrderedDict() params_keys = None new_state = None num_models = len(inputs) for fpath in inputs: with open(fpath, "rb") as f: state = torch.load( f, map_location=(lambda s, _: torch.serialization.default_restore_location(s, "cpu")), ) # Copies over the settings from the first checkpoint if new_state is None: new_state = state model_params = state["model"] model_params_keys = list(model_params.keys()) if params_keys is None: params_keys = model_params_keys elif params_keys != model_params_keys: raise KeyError( f"For checkpoint {f}, expected list of params: {params_keys}, but found: {model_params_keys}" ) for k in params_keys: p = model_params[k] if isinstance(p, torch.HalfTensor): p = p.float() if k not in params_dict: params_dict[k] = p.clone() # NOTE: clone() is needed in case of p is a shared parameter else: params_dict[k] += p averaged_params = OrderedDict() for k, v in params_dict.items(): averaged_params[k] = v if averaged_params[k].is_floating_point(): averaged_params[k].div_(num_models) else: averaged_params[k] //= num_models new_state["model"] = averaged_params return new_state def store_model_weights(model, checkpoint_path, checkpoint_key="model", strict=True): """ This method can be used to prepare weights files for new models. It receives as input a model architecture and a checkpoint from the training script and produces a file with the weights ready for release. Examples: from torchvision import models as M # Classification model = M.mobilenet_v3_large(pretrained=False) print(store_model_weights(model, './class.pth')) # Quantized Classification model = M.quantization.mobilenet_v3_large(pretrained=False, quantize=False) model.fuse_model(is_qat=True) model.qconfig = torch.ao.quantization.get_default_qat_qconfig('qnnpack') _ = torch.ao.quantization.prepare_qat(model, inplace=True) print(store_model_weights(model, './qat.pth')) # Object Detection model = M.detection.fasterrcnn_mobilenet_v3_large_fpn(pretrained=False, pretrained_backbone=False) print(store_model_weights(model, './obj.pth')) # Segmentation model = M.segmentation.deeplabv3_mobilenet_v3_large(pretrained=False, pretrained_backbone=False, aux_loss=True) print(store_model_weights(model, './segm.pth', strict=False)) Args: model (pytorch.nn.Module): The model on which the weights will be loaded for validation purposes. checkpoint_path (str): The path of the checkpoint we will load. checkpoint_key (str, optional): The key of the checkpoint where the model weights are stored. Default: "model". strict (bool): whether to strictly enforce that the keys in :attr:`state_dict` match the keys returned by this module's :meth:`~torch.nn.Module.state_dict` function. Default: ``True`` Returns: output_path (str): The location where the weights are saved. """ # Store the new model next to the checkpoint_path checkpoint_path = os.path.abspath(checkpoint_path) output_dir = os.path.dirname(checkpoint_path) # Deep copy to avoid side-effects on the model object. model = copy.deepcopy(model) checkpoint = torch.load(checkpoint_path, map_location="cpu") # Load the weights to the model to validate that everything works # and remove unnecessary weights (such as auxiliaries, etc) if checkpoint_key == "model_ema": del checkpoint[checkpoint_key]["n_averaged"] torch.nn.modules.utils.consume_prefix_in_state_dict_if_present(checkpoint[checkpoint_key], "module.") model.load_state_dict(checkpoint[checkpoint_key], strict=strict) tmp_path = os.path.join(output_dir, str(model.__hash__())) torch.save(model.state_dict(), tmp_path) sha256_hash = hashlib.sha256() with open(tmp_path, "rb") as f: # Read and update hash string value in blocks of 4K for byte_block in iter(lambda: f.read(4096), b""): sha256_hash.update(byte_block) hh = sha256_hash.hexdigest() output_path = os.path.join(output_dir, "weights-" + str(hh[:8]) + ".pth") os.replace(tmp_path, output_path) return output_path def reduce_across_processes(val): if not is_dist_avail_and_initialized(): # nothing to sync, but we still convert to tensor for consistency with the distributed case. return torch.tensor(val) t = torch.tensor(val, device="cuda") dist.barrier() dist.all_reduce(t) return t
archai/tasks/facial_landmark_detection/utils.py/0
{ "file_path": "archai/tasks/facial_landmark_detection/utils.py", "repo_id": "archai", "token_count": 6512 }
357
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os import shutil import tempfile import torch from archai.common.file_utils import ( calculate_onnx_model_size, calculate_torch_model_size, check_available_checkpoint, copy_file, create_empty_file, create_file_name_identifier, create_file_with_string, get_full_path, TemporaryFiles, ) def test_calculate_onnx_model_size(): with tempfile.TemporaryFile() as tmp: tmp.write(b"a" * 10**6) tmp.seek(0) # Assert that the calculated size is correct size = calculate_onnx_model_size(tmp.name) assert size == 1.0 def test_calculate_torch_model_size(): model = torch.nn.Linear(10, 5) # Assert that the calculated size is correct size = calculate_torch_model_size(model) assert size > 0 def test_check_available_checkpoint(): with tempfile.TemporaryDirectory() as tmp_dir: # Assert that the folder is empty assert not check_available_checkpoint(tmp_dir) # Assert that the folder is not empty subfolder = os.path.join(tmp_dir, "checkpoint-1") os.mkdir(subfolder) assert check_available_checkpoint(tmp_dir) # Assert that the folder is empty again shutil.rmtree(subfolder) assert not check_available_checkpoint(tmp_dir) def test_create_file_name_identifier(): # Assert with a few different file names and identifiers assert create_file_name_identifier("file.txt", "-abc") == "file-abc.txt" assert create_file_name_identifier("/path/to/file.txt", "-abc") == "/path/to/file-abc.txt" assert create_file_name_identifier("/path/to/file.txt", "-123") == "/path/to/file-123.txt" def test_create_empty_file(): # Assert that the file is created and is empty file_path = "empty_file.txt" create_empty_file(file_path) assert os.path.exists(file_path) assert os.path.getsize(file_path) == 0 os.remove(file_path) def test_create_file_with_string(): # Assert that the file is created and contains the string file_path = "file_with_string.txt" content = "Hello World!" create_file_with_string(file_path, content) assert os.path.exists(file_path) assert os.path.getsize(file_path) > 0 with open(file_path, "r") as f: assert f.read() == content os.remove(file_path) def test_copy_file(): # Assert that the file is copied correctly src_file_path = "src_file.txt" dest_file_path = "dest_file.txt" content = "Hello World!" with open(src_file_path, "w") as f: f.write(content) copy_file(src_file_path, dest_file_path) assert os.path.exists(dest_file_path) assert os.path.getsize(dest_file_path) > 0 with open(dest_file_path, "r") as f: assert f.read() == content os.remove(src_file_path) os.remove(dest_file_path) def test_get_full_path(): # Assert that the path is correct path = "~/example_folder" full_path = get_full_path(path, create_folder=True) assert os.path.exists(full_path) os.rmdir(full_path) def test_temporary_files(): with TemporaryFiles() as tmp: name1 = tmp.get_temp_file() name2 = tmp.get_temp_file() with open(name1, 'w') as f: f.write("test1") with open(name2, 'w') as f: f.write("test2") with open(name1, 'r') as f: assert f.readline() == 'test1' with open(name2, 'r') as f: assert f.readline() == 'test2' assert not os.path.isfile(name1) assert not os.path.isfile(name2)
archai/tests/common/test_file_utils.py/0
{ "file_path": "archai/tests/common/test_file_utils.py", "repo_id": "archai", "token_count": 1489 }
358
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import json from random import Random from typing import List import numpy as np import pytest from overrides import overrides from archai.discrete_search.api.archai_model import ArchaiModel from archai.discrete_search.api.search_space import ( BayesOptSearchSpace, EvolutionarySearchSpace, ) class DummySearchSpace(EvolutionarySearchSpace, BayesOptSearchSpace): def __init__(self, seed: int = 10) -> None: self.rng = Random(seed) @overrides def random_sample(self) -> ArchaiModel: return ArchaiModel(None, archid=str(self.rng.randint(0, 100_000))) @overrides def mutate(self, arch: ArchaiModel) -> ArchaiModel: archid = arch.archid return ArchaiModel(None, str(int(archid) + self.rng.randint(-10, 10))) @overrides def crossover(self, arch_list: List[ArchaiModel]) -> ArchaiModel: m1, m2 = arch_list[:2] new_archid = int((int(m1.archid) + int(m2.archid)) / 2) return ArchaiModel(None, str(new_archid)) @overrides def save_arch(self, model: ArchaiModel, path: str) -> None: json.dump({"archid": model.archid}, open(path, "w")) @overrides def load_arch(self, path: str) -> ArchaiModel: return ArchaiModel(None, json.load(open(path))["archid"]) @overrides def load_model_weights(self, model: ArchaiModel, path: str) -> None: pass @overrides def save_model_weights(self, model: ArchaiModel, path: str) -> None: pass @overrides def encode(self, arch: ArchaiModel) -> np.ndarray: return np.array([int(arch.archid)]) @pytest.fixture def search_space(): return DummySearchSpace()
archai/tests/discrete_search/algos/fixtures/search_space.py/0
{ "file_path": "archai/tests/discrete_search/algos/fixtures/search_space.py", "repo_id": "archai", "token_count": 688 }
359
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import pytest from archai.discrete_search.evaluators.nlp.transformer_flex_latency import ( TransformerFlexOnnxLatency, ) from archai.discrete_search.search_spaces.nlp.transformer_flex.search_space import ( TransformerFlexSearchSpace, ) @pytest.fixture def search_space(): return TransformerFlexSearchSpace("gpt2") def test_transformer_flex_onnx_latency(search_space): arch = search_space.random_sample() objective = TransformerFlexOnnxLatency(search_space) # Assert that the returned latency is valid latency = objective.evaluate(arch) assert latency > 0.0
archai/tests/discrete_search/evaluators/nlp/test_transformer_flex_latency.py/0
{ "file_path": "archai/tests/discrete_search/evaluators/nlp/test_transformer_flex_latency.py", "repo_id": "archai", "token_count": 226 }
360
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from archai.onnx.optimization_utils.fusion_options import ( AttentionMaskFormat, FusionOptions, ) def test_attention_mask_format(): # Assert that the values of the enum are as expected assert AttentionMaskFormat.MaskIndexEnd == 0 assert AttentionMaskFormat.MaskIndexEndAndStart == 1 assert AttentionMaskFormat.AttentionMask == 2 assert AttentionMaskFormat.NoMask == 3 def test_fusion_options(): # Assert that the default values of the options are as expected fusion_options = FusionOptions("some_model_type") assert fusion_options.enable_shape_inference is True assert fusion_options.enable_qordered_matmul is True assert fusion_options.enable_gelu is True assert fusion_options.enable_bias_gelu is True assert fusion_options.enable_gelu_approximation is False assert fusion_options.enable_gemm_fast_gelu is False assert fusion_options.enable_layer_norm is True assert fusion_options.enable_embed_layer_norm is True assert fusion_options.enable_skip_layer_norm is True assert fusion_options.enable_bias_skip_layer_norm is True assert fusion_options.enable_attention is True assert fusion_options.use_multi_head_attention is False assert fusion_options.attention_mask_format == AttentionMaskFormat.AttentionMask def test_fusion_options_gpt2_model_type(): # Assert that the default values of the options are as expected for `gpt2` model type fusion_options = FusionOptions("gpt2") assert fusion_options.enable_embed_layer_norm is False assert fusion_options.enable_skip_layer_norm is False def test_fusion_options_use_raw_attention_mask(): fusion_options = FusionOptions("some_model_type") # Assert that the default value of the option is as expected fusion_options.use_raw_attention_mask() assert fusion_options.attention_mask_format == AttentionMaskFormat.AttentionMask # Assert that the value of the option is as expected fusion_options.use_raw_attention_mask(False) assert fusion_options.attention_mask_format == AttentionMaskFormat.MaskIndexEnd def test_fusion_options_disable_attention_mask(): fusion_options = FusionOptions("some_model_type") # Assert that the default value of the option is as expected fusion_options.disable_attention_mask() assert fusion_options.attention_mask_format == AttentionMaskFormat.NoMask
archai/tests/onnx/optimization_utils/test_fusion_options.py/0
{ "file_path": "archai/tests/onnx/optimization_utils/test_fusion_options.py", "repo_id": "archai", "token_count": 755 }
361
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import time import ray import torch from archai.common import common from archai.supergraph import models from archai.supergraph.datasets import data from archai.supergraph.utils.metrics import Metrics from archai.supergraph.utils.trainer import Trainer def train_test() -> Metrics: conf = common.get_conf() conf_eval = conf["nas"]["eval"] # region conf vars conf_loader = conf_eval["loader"] conf_trainer = conf_eval["trainer"] # endregion conf_trainer["validation"]["freq"] = 1 conf_trainer["epochs"] = 1 conf_loader["train_batch"] = 128 conf_loader["test_batch"] = 4096 conf_loader["cutout"] = 0 conf_trainer["drop_path_prob"] = 0.0 conf_trainer["grad_clip"] = 0.0 conf_trainer["aux_weight"] = 0.0 Net = models.resnet34 model = Net().to(torch.device("cuda")) # get data data_loaders = data.get_data(conf_loader) assert data_loaders.train_dl is not None and data_loaders.test_dl is not None trainer = Trainer(conf_trainer, model, None) trainer.fit(data_loaders) met = trainer.get_metrics() return met @ray.remote(num_gpus=1) def train_test_ray(common_state): common.init_from(common_state) return train_test() def train_test_dist(): start = time.time() result_ids = [train_test_ray.remote(common.get_state()) for x in range(2)] while len(result_ids): done_id, result_ids = ray.wait(result_ids) metrics: Metrics = ray.get(done_id[0]) print(f"result={metrics.run_metrics.epochs_metrics[-1].top1.avg}, " f"time={time.time()-start}") if __name__ == "__main__": ray.init(num_gpus=1) print("ray init done") common.common_init(config_filepath="confs/algos/darts.yaml", param_args=["--common.experiment_name", "resnet_test"]) train_test_dist() exit(0)
archai/tests/supergraph/test_ray.py/0
{ "file_path": "archai/tests/supergraph/test_ray.py", "repo_id": "archai", "token_count": 743 }
362
ο»Ώ# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- # Generated file, DO NOT EDIT # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- from msrest import Serializer, Deserializer from ...client import Client from ...v7_0.profile import models class ProfileClient(Client): """Profile :param str base_url: Service URL :param Authentication creds: Authenticated credentials. """ def __init__(self, base_url=None, creds=None): super(ProfileClient, self).__init__(base_url, creds) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) resource_area_identifier = '8ccfef3d-2b87-4e99-8ccb-66e343d2daa8' def get_profile(self, id, details=None, with_attributes=None, partition=None, core_attributes=None, force_refresh=None): """GetProfile. Gets a user profile. :param str id: The ID of the target user profile within the same organization, or 'me' to get the profile of the current authenticated user. :param bool details: Return public profile information such as display name, email address, country, etc. If false, the withAttributes parameter is ignored. :param bool with_attributes: If true, gets the attributes (named key-value pairs of arbitrary data) associated with the profile. The partition parameter must also have a value. :param str partition: The partition (named group) of attributes to return. :param str core_attributes: A comma-delimited list of core profile attributes to return. Valid values are Email, Avatar, DisplayName, and ContactWithOffers. :param bool force_refresh: Not used in this version of the API. :rtype: :class:`<Profile> <azure.devops.v7_0.profile.models.Profile>` """ route_values = {} if id is not None: route_values['id'] = self._serialize.url('id', id, 'str') query_parameters = {} if details is not None: query_parameters['details'] = self._serialize.query('details', details, 'bool') if with_attributes is not None: query_parameters['withAttributes'] = self._serialize.query('with_attributes', with_attributes, 'bool') if partition is not None: query_parameters['partition'] = self._serialize.query('partition', partition, 'str') if core_attributes is not None: query_parameters['coreAttributes'] = self._serialize.query('core_attributes', core_attributes, 'str') if force_refresh is not None: query_parameters['forceRefresh'] = self._serialize.query('force_refresh', force_refresh, 'bool') response = self._send(http_method='GET', location_id='f83735dc-483f-4238-a291-d45f6080a9af', version='7.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Profile', response)
azure-devops-python-api/azure-devops/azure/devops/released/profile/profile_client.py/0
{ "file_path": "azure-devops-python-api/azure-devops/azure/devops/released/profile/profile_client.py", "repo_id": "azure-devops-python-api", "token_count": 1211 }
363
ο»Ώ# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- # Generated file, DO NOT EDIT # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- from msrest import Serializer, Deserializer from ...client import Client from ...v7_0.task import models class TaskClient(Client): """Task :param str base_url: Service URL :param Authentication creds: Authenticated credentials. """ def __init__(self, base_url=None, creds=None): super(TaskClient, self).__init__(base_url, creds) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) resource_area_identifier = None def get_plan_attachments(self, scope_identifier, hub_name, plan_id, type): """GetPlanAttachments. :param str scope_identifier: The project GUID to scope the request :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server :param str plan_id: :param str type: :rtype: [TaskAttachment] """ route_values = {} if scope_identifier is not None: route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') if hub_name is not None: route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') if plan_id is not None: route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') if type is not None: route_values['type'] = self._serialize.url('type', type, 'str') response = self._send(http_method='GET', location_id='eb55e5d6-2f30-4295-b5ed-38da50b1fc52', version='7.0', route_values=route_values) return self._deserialize('[TaskAttachment]', self._unwrap_collection(response)) def create_attachment(self, upload_stream, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name, **kwargs): """CreateAttachment. :param object upload_stream: Stream to upload :param str scope_identifier: The project GUID to scope the request :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server :param str plan_id: :param str timeline_id: :param str record_id: :param str type: :param str name: :rtype: :class:`<TaskAttachment> <azure.devops.v7_0.task.models.TaskAttachment>` """ route_values = {} if scope_identifier is not None: route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') if hub_name is not None: route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') if plan_id is not None: route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') if timeline_id is not None: route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') if record_id is not None: route_values['recordId'] = self._serialize.url('record_id', record_id, 'str') if type is not None: route_values['type'] = self._serialize.url('type', type, 'str') if name is not None: route_values['name'] = self._serialize.url('name', name, 'str') if "callback" in kwargs: callback = kwargs["callback"] else: callback = None content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='PUT', location_id='7898f959-9cdf-4096-b29e-7f293031629e', version='7.0', route_values=route_values, content=content, media_type='application/octet-stream') return self._deserialize('TaskAttachment', response) def create_attachment_from_artifact(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name, artifact_hash, length): """CreateAttachmentFromArtifact. :param str scope_identifier: The project GUID to scope the request :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server :param str plan_id: :param str timeline_id: :param str record_id: :param str type: :param str name: :param str artifact_hash: :param long length: :rtype: :class:`<TaskAttachment> <azure.devops.v7_0.task.models.TaskAttachment>` """ route_values = {} if scope_identifier is not None: route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') if hub_name is not None: route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') if plan_id is not None: route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') if timeline_id is not None: route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') if record_id is not None: route_values['recordId'] = self._serialize.url('record_id', record_id, 'str') if type is not None: route_values['type'] = self._serialize.url('type', type, 'str') if name is not None: route_values['name'] = self._serialize.url('name', name, 'str') query_parameters = {} if artifact_hash is not None: query_parameters['artifactHash'] = self._serialize.query('artifact_hash', artifact_hash, 'str') if length is not None: query_parameters['length'] = self._serialize.query('length', length, 'long') response = self._send(http_method='PUT', location_id='7898f959-9cdf-4096-b29e-7f293031629e', version='7.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TaskAttachment', response) def get_attachment(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name): """GetAttachment. :param str scope_identifier: The project GUID to scope the request :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server :param str plan_id: :param str timeline_id: :param str record_id: :param str type: :param str name: :rtype: :class:`<TaskAttachment> <azure.devops.v7_0.task.models.TaskAttachment>` """ route_values = {} if scope_identifier is not None: route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') if hub_name is not None: route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') if plan_id is not None: route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') if timeline_id is not None: route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') if record_id is not None: route_values['recordId'] = self._serialize.url('record_id', record_id, 'str') if type is not None: route_values['type'] = self._serialize.url('type', type, 'str') if name is not None: route_values['name'] = self._serialize.url('name', name, 'str') response = self._send(http_method='GET', location_id='7898f959-9cdf-4096-b29e-7f293031629e', version='7.0', route_values=route_values) return self._deserialize('TaskAttachment', response) def get_attachment_content(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name, **kwargs): """GetAttachmentContent. :param str scope_identifier: The project GUID to scope the request :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server :param str plan_id: :param str timeline_id: :param str record_id: :param str type: :param str name: :rtype: object """ route_values = {} if scope_identifier is not None: route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') if hub_name is not None: route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') if plan_id is not None: route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') if timeline_id is not None: route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') if record_id is not None: route_values['recordId'] = self._serialize.url('record_id', record_id, 'str') if type is not None: route_values['type'] = self._serialize.url('type', type, 'str') if name is not None: route_values['name'] = self._serialize.url('name', name, 'str') response = self._send(http_method='GET', location_id='7898f959-9cdf-4096-b29e-7f293031629e', version='7.0', route_values=route_values, accept_media_type='application/octet-stream') if "callback" in kwargs: callback = kwargs["callback"] else: callback = None return self._client.stream_download(response, callback=callback) def get_attachments(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type): """GetAttachments. :param str scope_identifier: The project GUID to scope the request :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server :param str plan_id: :param str timeline_id: :param str record_id: :param str type: :rtype: [TaskAttachment] """ route_values = {} if scope_identifier is not None: route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') if hub_name is not None: route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') if plan_id is not None: route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') if timeline_id is not None: route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') if record_id is not None: route_values['recordId'] = self._serialize.url('record_id', record_id, 'str') if type is not None: route_values['type'] = self._serialize.url('type', type, 'str') response = self._send(http_method='GET', location_id='7898f959-9cdf-4096-b29e-7f293031629e', version='7.0', route_values=route_values) return self._deserialize('[TaskAttachment]', self._unwrap_collection(response)) def append_log_content(self, upload_stream, scope_identifier, hub_name, plan_id, log_id, **kwargs): """AppendLogContent. :param object upload_stream: Stream to upload :param str scope_identifier: The project GUID to scope the request :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server :param str plan_id: :param int log_id: :rtype: :class:`<TaskLog> <azure.devops.v7_0.task.models.TaskLog>` """ route_values = {} if scope_identifier is not None: route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') if hub_name is not None: route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') if plan_id is not None: route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') if log_id is not None: route_values['logId'] = self._serialize.url('log_id', log_id, 'int') if "callback" in kwargs: callback = kwargs["callback"] else: callback = None content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='POST', location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', version='7.0', route_values=route_values, content=content, media_type='application/octet-stream') return self._deserialize('TaskLog', response) def associate_log(self, scope_identifier, hub_name, plan_id, log_id, serialized_blob_id, line_count): """AssociateLog. :param str scope_identifier: The project GUID to scope the request :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server :param str plan_id: :param int log_id: :param str serialized_blob_id: :param int line_count: :rtype: :class:`<TaskLog> <azure.devops.v7_0.task.models.TaskLog>` """ route_values = {} if scope_identifier is not None: route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') if hub_name is not None: route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') if plan_id is not None: route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') if log_id is not None: route_values['logId'] = self._serialize.url('log_id', log_id, 'int') query_parameters = {} if serialized_blob_id is not None: query_parameters['serializedBlobId'] = self._serialize.query('serialized_blob_id', serialized_blob_id, 'str') if line_count is not None: query_parameters['lineCount'] = self._serialize.query('line_count', line_count, 'int') response = self._send(http_method='POST', location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', version='7.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('TaskLog', response) def create_log(self, log, scope_identifier, hub_name, plan_id): """CreateLog. :param :class:`<TaskLog> <azure.devops.v7_0.task.models.TaskLog>` log: :param str scope_identifier: The project GUID to scope the request :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server :param str plan_id: :rtype: :class:`<TaskLog> <azure.devops.v7_0.task.models.TaskLog>` """ route_values = {} if scope_identifier is not None: route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') if hub_name is not None: route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') if plan_id is not None: route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') content = self._serialize.body(log, 'TaskLog') response = self._send(http_method='POST', location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', version='7.0', route_values=route_values, content=content) return self._deserialize('TaskLog', response) def get_log(self, scope_identifier, hub_name, plan_id, log_id, start_line=None, end_line=None): """GetLog. :param str scope_identifier: The project GUID to scope the request :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server :param str plan_id: :param int log_id: :param long start_line: :param long end_line: :rtype: [str] """ route_values = {} if scope_identifier is not None: route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') if hub_name is not None: route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') if plan_id is not None: route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') if log_id is not None: route_values['logId'] = self._serialize.url('log_id', log_id, 'int') query_parameters = {} if start_line is not None: query_parameters['startLine'] = self._serialize.query('start_line', start_line, 'long') if end_line is not None: query_parameters['endLine'] = self._serialize.query('end_line', end_line, 'long') response = self._send(http_method='GET', location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', version='7.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[str]', self._unwrap_collection(response)) def get_logs(self, scope_identifier, hub_name, plan_id): """GetLogs. :param str scope_identifier: The project GUID to scope the request :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server :param str plan_id: :rtype: [TaskLog] """ route_values = {} if scope_identifier is not None: route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') if hub_name is not None: route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') if plan_id is not None: route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') response = self._send(http_method='GET', location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', version='7.0', route_values=route_values) return self._deserialize('[TaskLog]', self._unwrap_collection(response)) def get_records(self, scope_identifier, hub_name, plan_id, timeline_id, change_id=None): """GetRecords. :param str scope_identifier: The project GUID to scope the request :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server :param str plan_id: :param str timeline_id: :param int change_id: :rtype: [TimelineRecord] """ route_values = {} if scope_identifier is not None: route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') if hub_name is not None: route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') if plan_id is not None: route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') if timeline_id is not None: route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') query_parameters = {} if change_id is not None: query_parameters['changeId'] = self._serialize.query('change_id', change_id, 'int') response = self._send(http_method='GET', location_id='8893bc5b-35b2-4be7-83cb-99e683551db4', version='7.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TimelineRecord]', self._unwrap_collection(response)) def update_records(self, records, scope_identifier, hub_name, plan_id, timeline_id): """UpdateRecords. :param :class:`<VssJsonCollectionWrapper> <azure.devops.v7_0.task.models.VssJsonCollectionWrapper>` records: :param str scope_identifier: The project GUID to scope the request :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server :param str plan_id: :param str timeline_id: :rtype: [TimelineRecord] """ route_values = {} if scope_identifier is not None: route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') if hub_name is not None: route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') if plan_id is not None: route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') if timeline_id is not None: route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') content = self._serialize.body(records, 'VssJsonCollectionWrapper') response = self._send(http_method='PATCH', location_id='8893bc5b-35b2-4be7-83cb-99e683551db4', version='7.0', route_values=route_values, content=content) return self._deserialize('[TimelineRecord]', self._unwrap_collection(response)) def create_timeline(self, timeline, scope_identifier, hub_name, plan_id): """CreateTimeline. :param :class:`<Timeline> <azure.devops.v7_0.task.models.Timeline>` timeline: :param str scope_identifier: The project GUID to scope the request :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server :param str plan_id: :rtype: :class:`<Timeline> <azure.devops.v7_0.task.models.Timeline>` """ route_values = {} if scope_identifier is not None: route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') if hub_name is not None: route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') if plan_id is not None: route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') content = self._serialize.body(timeline, 'Timeline') response = self._send(http_method='POST', location_id='83597576-cc2c-453c-bea6-2882ae6a1653', version='7.0', route_values=route_values, content=content) return self._deserialize('Timeline', response) def delete_timeline(self, scope_identifier, hub_name, plan_id, timeline_id): """DeleteTimeline. :param str scope_identifier: The project GUID to scope the request :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server :param str plan_id: :param str timeline_id: """ route_values = {} if scope_identifier is not None: route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') if hub_name is not None: route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') if plan_id is not None: route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') if timeline_id is not None: route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') self._send(http_method='DELETE', location_id='83597576-cc2c-453c-bea6-2882ae6a1653', version='7.0', route_values=route_values) def get_timeline(self, scope_identifier, hub_name, plan_id, timeline_id, change_id=None, include_records=None): """GetTimeline. :param str scope_identifier: The project GUID to scope the request :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server :param str plan_id: :param str timeline_id: :param int change_id: :param bool include_records: :rtype: :class:`<Timeline> <azure.devops.v7_0.task.models.Timeline>` """ route_values = {} if scope_identifier is not None: route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') if hub_name is not None: route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') if plan_id is not None: route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') if timeline_id is not None: route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') query_parameters = {} if change_id is not None: query_parameters['changeId'] = self._serialize.query('change_id', change_id, 'int') if include_records is not None: query_parameters['includeRecords'] = self._serialize.query('include_records', include_records, 'bool') response = self._send(http_method='GET', location_id='83597576-cc2c-453c-bea6-2882ae6a1653', version='7.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Timeline', response) def get_timelines(self, scope_identifier, hub_name, plan_id): """GetTimelines. :param str scope_identifier: The project GUID to scope the request :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server :param str plan_id: :rtype: [Timeline] """ route_values = {} if scope_identifier is not None: route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') if hub_name is not None: route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') if plan_id is not None: route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') response = self._send(http_method='GET', location_id='83597576-cc2c-453c-bea6-2882ae6a1653', version='7.0', route_values=route_values) return self._deserialize('[Timeline]', self._unwrap_collection(response))
azure-devops-python-api/azure-devops/azure/devops/released/task/task_client.py/0
{ "file_path": "azure-devops-python-api/azure-devops/azure/devops/released/task/task_client.py", "repo_id": "azure-devops-python-api", "token_count": 12512 }
364
ο»Ώ# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- # Generated file, DO NOT EDIT # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- from msrest import Serializer, Deserializer from ...client import Client from ...v7_0.work import models class WorkClient(Client): """Work :param str base_url: Service URL :param Authentication creds: Authenticated credentials. """ def __init__(self, base_url=None, creds=None): super(WorkClient, self).__init__(base_url, creds) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) resource_area_identifier = '1d4f49f9-02b9-4e26-b826-2cdb6195f2a9' def get_backlog_configurations(self, team_context): """GetBacklogConfigurations. Gets backlog configuration for a team :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :rtype: :class:`<BacklogConfiguration> <azure.devops.v7_0.work.models.BacklogConfiguration>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') response = self._send(http_method='GET', location_id='7799f497-3cb5-4f16-ad4f-5cd06012db64', version='7.0', route_values=route_values) return self._deserialize('BacklogConfiguration', response) def get_backlog_level_work_items(self, team_context, backlog_id): """GetBacklogLevelWorkItems. Get a list of work items within a backlog level :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str backlog_id: :rtype: :class:`<BacklogLevelWorkItems> <azure.devops.v7_0.work.models.BacklogLevelWorkItems>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if backlog_id is not None: route_values['backlogId'] = self._serialize.url('backlog_id', backlog_id, 'str') response = self._send(http_method='GET', location_id='7c468d96-ab1d-4294-a360-92f07e9ccd98', version='7.0', route_values=route_values) return self._deserialize('BacklogLevelWorkItems', response) def get_backlog(self, team_context, id): """GetBacklog. Get a backlog level :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str id: The id of the backlog level :rtype: :class:`<BacklogLevelConfiguration> <azure.devops.v7_0.work.models.BacklogLevelConfiguration>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if id is not None: route_values['id'] = self._serialize.url('id', id, 'str') response = self._send(http_method='GET', location_id='a93726f9-7867-4e38-b4f2-0bfafc2f6a94', version='7.0', route_values=route_values) return self._deserialize('BacklogLevelConfiguration', response) def get_backlogs(self, team_context): """GetBacklogs. List all backlog levels :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :rtype: [BacklogLevelConfiguration] """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') response = self._send(http_method='GET', location_id='a93726f9-7867-4e38-b4f2-0bfafc2f6a94', version='7.0', route_values=route_values) return self._deserialize('[BacklogLevelConfiguration]', self._unwrap_collection(response)) def get_column_suggested_values(self, project=None): """GetColumnSuggestedValues. Get available board columns in a project :param str project: Project ID or project name :rtype: [BoardSuggestedValue] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='eb7ec5a3-1ba3-4fd1-b834-49a5a387e57d', version='7.0', route_values=route_values) return self._deserialize('[BoardSuggestedValue]', self._unwrap_collection(response)) def get_board_mapping_parent_items(self, team_context, child_backlog_context_category_ref_name, workitem_ids): """GetBoardMappingParentItems. Returns the list of parent field filter model for the given list of workitem ids :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str child_backlog_context_category_ref_name: :param [int] workitem_ids: :rtype: [ParentChildWIMap] """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') query_parameters = {} if child_backlog_context_category_ref_name is not None: query_parameters['childBacklogContextCategoryRefName'] = self._serialize.query('child_backlog_context_category_ref_name', child_backlog_context_category_ref_name, 'str') if workitem_ids is not None: workitem_ids = ",".join(map(str, workitem_ids)) query_parameters['workitemIds'] = self._serialize.query('workitem_ids', workitem_ids, 'str') response = self._send(http_method='GET', location_id='186abea3-5c35-432f-9e28-7a15b4312a0e', version='7.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ParentChildWIMap]', self._unwrap_collection(response)) def get_row_suggested_values(self, project=None): """GetRowSuggestedValues. Get available board rows in a project :param str project: Project ID or project name :rtype: [BoardSuggestedValue] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='bb494cc6-a0f5-4c6c-8dca-ea6912e79eb9', version='7.0', route_values=route_values) return self._deserialize('[BoardSuggestedValue]', self._unwrap_collection(response)) def get_board(self, team_context, id): """GetBoard. Get board :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str id: identifier for board, either board's backlog level name (Eg:"Stories") or Id :rtype: :class:`<Board> <azure.devops.v7_0.work.models.Board>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if id is not None: route_values['id'] = self._serialize.url('id', id, 'str') response = self._send(http_method='GET', location_id='23ad19fc-3b8e-4877-8462-b3f92bc06b40', version='7.0', route_values=route_values) return self._deserialize('Board', response) def get_boards(self, team_context): """GetBoards. Get boards :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :rtype: [BoardReference] """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') response = self._send(http_method='GET', location_id='23ad19fc-3b8e-4877-8462-b3f92bc06b40', version='7.0', route_values=route_values) return self._deserialize('[BoardReference]', self._unwrap_collection(response)) def set_board_options(self, options, team_context, id): """SetBoardOptions. Update board options :param {str} options: options to updated :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str id: identifier for board, either category plural name (Eg:"Stories") or guid :rtype: {str} """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if id is not None: route_values['id'] = self._serialize.url('id', id, 'str') content = self._serialize.body(options, '{str}') response = self._send(http_method='PUT', location_id='23ad19fc-3b8e-4877-8462-b3f92bc06b40', version='7.0', route_values=route_values, content=content) return self._deserialize('{str}', self._unwrap_collection(response)) def get_board_user_settings(self, team_context, board): """GetBoardUserSettings. Get board user settings for a board id :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str board: Board ID or Name :rtype: :class:`<BoardUserSettings> <azure.devops.v7_0.work.models.BoardUserSettings>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if board is not None: route_values['board'] = self._serialize.url('board', board, 'str') response = self._send(http_method='GET', location_id='b30d9f58-1891-4b0a-b168-c46408f919b0', version='7.0', route_values=route_values) return self._deserialize('BoardUserSettings', response) def update_board_user_settings(self, board_user_settings, team_context, board): """UpdateBoardUserSettings. Update board user settings for the board id :param {str} board_user_settings: :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str board: :rtype: :class:`<BoardUserSettings> <azure.devops.v7_0.work.models.BoardUserSettings>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if board is not None: route_values['board'] = self._serialize.url('board', board, 'str') content = self._serialize.body(board_user_settings, '{str}') response = self._send(http_method='PATCH', location_id='b30d9f58-1891-4b0a-b168-c46408f919b0', version='7.0', route_values=route_values, content=content) return self._deserialize('BoardUserSettings', response) def get_capacities_with_identity_ref_and_totals(self, team_context, iteration_id): """GetCapacitiesWithIdentityRefAndTotals. Get a team's capacity including total capacity and days off :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str iteration_id: ID of the iteration :rtype: :class:`<TeamCapacity> <azure.devops.v7_0.work.models.TeamCapacity>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if iteration_id is not None: route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') response = self._send(http_method='GET', location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', version='7.0', route_values=route_values) return self._deserialize('TeamCapacity', response) def get_capacity_with_identity_ref(self, team_context, iteration_id, team_member_id): """GetCapacityWithIdentityRef. Get a team member's capacity :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str iteration_id: ID of the iteration :param str team_member_id: ID of the team member :rtype: :class:`<TeamMemberCapacityIdentityRef> <azure.devops.v7_0.work.models.TeamMemberCapacityIdentityRef>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if iteration_id is not None: route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') if team_member_id is not None: route_values['teamMemberId'] = self._serialize.url('team_member_id', team_member_id, 'str') response = self._send(http_method='GET', location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', version='7.0', route_values=route_values) return self._deserialize('TeamMemberCapacityIdentityRef', response) def replace_capacities_with_identity_ref(self, capacities, team_context, iteration_id): """ReplaceCapacitiesWithIdentityRef. Replace a team's capacity :param [TeamMemberCapacityIdentityRef] capacities: Team capacity to replace :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str iteration_id: ID of the iteration :rtype: [TeamMemberCapacityIdentityRef] """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if iteration_id is not None: route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') content = self._serialize.body(capacities, '[TeamMemberCapacityIdentityRef]') response = self._send(http_method='PUT', location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', version='7.0', route_values=route_values, content=content) return self._deserialize('[TeamMemberCapacityIdentityRef]', self._unwrap_collection(response)) def update_capacity_with_identity_ref(self, patch, team_context, iteration_id, team_member_id): """UpdateCapacityWithIdentityRef. Update a team member's capacity :param :class:`<CapacityPatch> <azure.devops.v7_0.work.models.CapacityPatch>` patch: Updated capacity :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str iteration_id: ID of the iteration :param str team_member_id: ID of the team member :rtype: :class:`<TeamMemberCapacityIdentityRef> <azure.devops.v7_0.work.models.TeamMemberCapacityIdentityRef>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if iteration_id is not None: route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') if team_member_id is not None: route_values['teamMemberId'] = self._serialize.url('team_member_id', team_member_id, 'str') content = self._serialize.body(patch, 'CapacityPatch') response = self._send(http_method='PATCH', location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', version='7.0', route_values=route_values, content=content) return self._deserialize('TeamMemberCapacityIdentityRef', response) def get_board_card_rule_settings(self, team_context, board): """GetBoardCardRuleSettings. Get board card Rule settings for the board id or board by name :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str board: :rtype: :class:`<BoardCardRuleSettings> <azure.devops.v7_0.work.models.BoardCardRuleSettings>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if board is not None: route_values['board'] = self._serialize.url('board', board, 'str') response = self._send(http_method='GET', location_id='b044a3d9-02ea-49c7-91a1-b730949cc896', version='7.0', route_values=route_values) return self._deserialize('BoardCardRuleSettings', response) def update_board_card_rule_settings(self, board_card_rule_settings, team_context, board): """UpdateBoardCardRuleSettings. Update board card Rule settings for the board id or board by name :param :class:`<BoardCardRuleSettings> <azure.devops.v7_0.work.models.BoardCardRuleSettings>` board_card_rule_settings: :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str board: :rtype: :class:`<BoardCardRuleSettings> <azure.devops.v7_0.work.models.BoardCardRuleSettings>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if board is not None: route_values['board'] = self._serialize.url('board', board, 'str') content = self._serialize.body(board_card_rule_settings, 'BoardCardRuleSettings') response = self._send(http_method='PATCH', location_id='b044a3d9-02ea-49c7-91a1-b730949cc896', version='7.0', route_values=route_values, content=content) return self._deserialize('BoardCardRuleSettings', response) def update_taskboard_card_rule_settings(self, board_card_rule_settings, team_context): """UpdateTaskboardCardRuleSettings. Update taskboard card Rule settings :param :class:`<BoardCardRuleSettings> <azure.devops.v7_0.work.models.BoardCardRuleSettings>` board_card_rule_settings: :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') content = self._serialize.body(board_card_rule_settings, 'BoardCardRuleSettings') self._send(http_method='PATCH', location_id='3f84a8d1-1aab-423e-a94b-6dcbdcca511f', version='7.0', route_values=route_values, content=content) def get_board_card_settings(self, team_context, board): """GetBoardCardSettings. Get board card settings for the board id or board by name :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str board: :rtype: :class:`<BoardCardSettings> <azure.devops.v7_0.work.models.BoardCardSettings>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if board is not None: route_values['board'] = self._serialize.url('board', board, 'str') response = self._send(http_method='GET', location_id='07c3b467-bc60-4f05-8e34-599ce288fafc', version='7.0', route_values=route_values) return self._deserialize('BoardCardSettings', response) def update_board_card_settings(self, board_card_settings_to_save, team_context, board): """UpdateBoardCardSettings. Update board card settings for the board id or board by name :param :class:`<BoardCardSettings> <azure.devops.v7_0.work.models.BoardCardSettings>` board_card_settings_to_save: :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str board: :rtype: :class:`<BoardCardSettings> <azure.devops.v7_0.work.models.BoardCardSettings>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if board is not None: route_values['board'] = self._serialize.url('board', board, 'str') content = self._serialize.body(board_card_settings_to_save, 'BoardCardSettings') response = self._send(http_method='PUT', location_id='07c3b467-bc60-4f05-8e34-599ce288fafc', version='7.0', route_values=route_values, content=content) return self._deserialize('BoardCardSettings', response) def update_taskboard_card_settings(self, board_card_settings_to_save, team_context): """UpdateTaskboardCardSettings. Update taskboard card settings :param :class:`<BoardCardSettings> <azure.devops.v7_0.work.models.BoardCardSettings>` board_card_settings_to_save: :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') content = self._serialize.body(board_card_settings_to_save, 'BoardCardSettings') self._send(http_method='PUT', location_id='0d63745f-31f3-4cf3-9056-2a064e567637', version='7.0', route_values=route_values, content=content) def get_board_columns(self, team_context, board): """GetBoardColumns. Get columns on a board :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str board: Name or ID of the specific board :rtype: [BoardColumn] """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if board is not None: route_values['board'] = self._serialize.url('board', board, 'str') response = self._send(http_method='GET', location_id='c555d7ff-84e1-47df-9923-a3fe0cd8751b', version='7.0', route_values=route_values) return self._deserialize('[BoardColumn]', self._unwrap_collection(response)) def update_board_columns(self, board_columns, team_context, board): """UpdateBoardColumns. Update columns on a board :param [BoardColumn] board_columns: List of board columns to update :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str board: Name or ID of the specific board :rtype: [BoardColumn] """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if board is not None: route_values['board'] = self._serialize.url('board', board, 'str') content = self._serialize.body(board_columns, '[BoardColumn]') response = self._send(http_method='PUT', location_id='c555d7ff-84e1-47df-9923-a3fe0cd8751b', version='7.0', route_values=route_values, content=content) return self._deserialize('[BoardColumn]', self._unwrap_collection(response)) def get_delivery_timeline_data(self, project, id, revision=None, start_date=None, end_date=None): """GetDeliveryTimelineData. Get Delivery View Data :param str project: Project ID or project name :param str id: Identifier for delivery view :param int revision: Revision of the plan for which you want data. If the current plan is a different revision you will get an ViewRevisionMismatchException exception. If you do not supply a revision you will get data for the latest revision. :param datetime start_date: The start date of timeline :param datetime end_date: The end date of timeline :rtype: :class:`<DeliveryViewData> <azure.devops.v7_0.work.models.DeliveryViewData>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if id is not None: route_values['id'] = self._serialize.url('id', id, 'str') query_parameters = {} if revision is not None: query_parameters['revision'] = self._serialize.query('revision', revision, 'int') if start_date is not None: query_parameters['startDate'] = self._serialize.query('start_date', start_date, 'iso-8601') if end_date is not None: query_parameters['endDate'] = self._serialize.query('end_date', end_date, 'iso-8601') response = self._send(http_method='GET', location_id='bdd0834e-101f-49f0-a6ae-509f384a12b4', version='7.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('DeliveryViewData', response) def get_board_chart(self, team_context, board, name): """GetBoardChart. Get a board chart :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str board: Identifier for board, either board's backlog level name (Eg:"Stories") or Id :param str name: The chart name :rtype: :class:`<BoardChart> <azure.devops.v7_0.work.models.BoardChart>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if board is not None: route_values['board'] = self._serialize.url('board', board, 'str') if name is not None: route_values['name'] = self._serialize.url('name', name, 'str') response = self._send(http_method='GET', location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', version='7.0', route_values=route_values) return self._deserialize('BoardChart', response) def get_board_charts(self, team_context, board): """GetBoardCharts. Get board charts :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str board: Identifier for board, either board's backlog level name (Eg:"Stories") or Id :rtype: [BoardChartReference] """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if board is not None: route_values['board'] = self._serialize.url('board', board, 'str') response = self._send(http_method='GET', location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', version='7.0', route_values=route_values) return self._deserialize('[BoardChartReference]', self._unwrap_collection(response)) def update_board_chart(self, chart, team_context, board, name): """UpdateBoardChart. Update a board chart :param :class:`<BoardChart> <azure.devops.v7_0.work.models.BoardChart>` chart: :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str board: Identifier for board, either board's backlog level name (Eg:"Stories") or Id :param str name: The chart name :rtype: :class:`<BoardChart> <azure.devops.v7_0.work.models.BoardChart>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if board is not None: route_values['board'] = self._serialize.url('board', board, 'str') if name is not None: route_values['name'] = self._serialize.url('name', name, 'str') content = self._serialize.body(chart, 'BoardChart') response = self._send(http_method='PATCH', location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', version='7.0', route_values=route_values, content=content) return self._deserialize('BoardChart', response) def get_total_iteration_capacities(self, project, iteration_id): """GetTotalIterationCapacities. Get an iteration's capacity for all teams in iteration :param str project: Project ID or project name :param str iteration_id: ID of the iteration :rtype: :class:`<IterationCapacity> <azure.devops.v7_0.work.models.IterationCapacity>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if iteration_id is not None: route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') response = self._send(http_method='GET', location_id='1e385ce0-396b-4273-8171-d64562c18d37', version='7.0', route_values=route_values) return self._deserialize('IterationCapacity', response) def delete_team_iteration(self, team_context, id): """DeleteTeamIteration. Delete a team's iteration by iterationId :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str id: ID of the iteration """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if id is not None: route_values['id'] = self._serialize.url('id', id, 'str') self._send(http_method='DELETE', location_id='c9175577-28a1-4b06-9197-8636af9f64ad', version='7.0', route_values=route_values) def get_team_iteration(self, team_context, id): """GetTeamIteration. Get team's iteration by iterationId :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str id: ID of the iteration :rtype: :class:`<TeamSettingsIteration> <azure.devops.v7_0.work.models.TeamSettingsIteration>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if id is not None: route_values['id'] = self._serialize.url('id', id, 'str') response = self._send(http_method='GET', location_id='c9175577-28a1-4b06-9197-8636af9f64ad', version='7.0', route_values=route_values) return self._deserialize('TeamSettingsIteration', response) def get_team_iterations(self, team_context, timeframe=None): """GetTeamIterations. Get a team's iterations using timeframe filter :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str timeframe: A filter for which iterations are returned based on relative time. Only Current is supported currently. :rtype: [TeamSettingsIteration] """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') query_parameters = {} if timeframe is not None: query_parameters['$timeframe'] = self._serialize.query('timeframe', timeframe, 'str') response = self._send(http_method='GET', location_id='c9175577-28a1-4b06-9197-8636af9f64ad', version='7.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[TeamSettingsIteration]', self._unwrap_collection(response)) def post_team_iteration(self, iteration, team_context): """PostTeamIteration. Add an iteration to the team :param :class:`<TeamSettingsIteration> <azure.devops.v7_0.work.models.TeamSettingsIteration>` iteration: Iteration to add :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :rtype: :class:`<TeamSettingsIteration> <azure.devops.v7_0.work.models.TeamSettingsIteration>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') content = self._serialize.body(iteration, 'TeamSettingsIteration') response = self._send(http_method='POST', location_id='c9175577-28a1-4b06-9197-8636af9f64ad', version='7.0', route_values=route_values, content=content) return self._deserialize('TeamSettingsIteration', response) def create_plan(self, posted_plan, project): """CreatePlan. Add a new plan for the team :param :class:`<CreatePlan> <azure.devops.v7_0.work.models.CreatePlan>` posted_plan: Plan definition :param str project: Project ID or project name :rtype: :class:`<Plan> <azure.devops.v7_0.work.models.Plan>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') content = self._serialize.body(posted_plan, 'CreatePlan') response = self._send(http_method='POST', location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', version='7.0', route_values=route_values, content=content) return self._deserialize('Plan', response) def delete_plan(self, project, id): """DeletePlan. Delete the specified plan :param str project: Project ID or project name :param str id: Identifier of the plan """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if id is not None: route_values['id'] = self._serialize.url('id', id, 'str') self._send(http_method='DELETE', location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', version='7.0', route_values=route_values) def get_plan(self, project, id): """GetPlan. Get the information for the specified plan :param str project: Project ID or project name :param str id: Identifier of the plan :rtype: :class:`<Plan> <azure.devops.v7_0.work.models.Plan>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if id is not None: route_values['id'] = self._serialize.url('id', id, 'str') response = self._send(http_method='GET', location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', version='7.0', route_values=route_values) return self._deserialize('Plan', response) def get_plans(self, project): """GetPlans. Get the information for all the plans configured for the given team :param str project: Project ID or project name :rtype: [Plan] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', version='7.0', route_values=route_values) return self._deserialize('[Plan]', self._unwrap_collection(response)) def update_plan(self, updated_plan, project, id): """UpdatePlan. Update the information for the specified plan :param :class:`<UpdatePlan> <azure.devops.v7_0.work.models.UpdatePlan>` updated_plan: Plan definition to be updated :param str project: Project ID or project name :param str id: Identifier of the plan :rtype: :class:`<Plan> <azure.devops.v7_0.work.models.Plan>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if id is not None: route_values['id'] = self._serialize.url('id', id, 'str') content = self._serialize.body(updated_plan, 'UpdatePlan') response = self._send(http_method='PUT', location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', version='7.0', route_values=route_values, content=content) return self._deserialize('Plan', response) def get_process_configuration(self, project): """GetProcessConfiguration. Get process configuration :param str project: Project ID or project name :rtype: :class:`<ProcessConfiguration> <azure.devops.v7_0.work.models.ProcessConfiguration>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='f901ba42-86d2-4b0c-89c1-3f86d06daa84', version='7.0', route_values=route_values) return self._deserialize('ProcessConfiguration', response) def get_board_rows(self, team_context, board): """GetBoardRows. Get rows on a board :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str board: Name or ID of the specific board :rtype: [BoardRow] """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if board is not None: route_values['board'] = self._serialize.url('board', board, 'str') response = self._send(http_method='GET', location_id='0863355d-aefd-4d63-8669-984c9b7b0e78', version='7.0', route_values=route_values) return self._deserialize('[BoardRow]', self._unwrap_collection(response)) def update_board_rows(self, board_rows, team_context, board): """UpdateBoardRows. Update rows on a board :param [BoardRow] board_rows: List of board rows to update :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str board: Name or ID of the specific board :rtype: [BoardRow] """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if board is not None: route_values['board'] = self._serialize.url('board', board, 'str') content = self._serialize.body(board_rows, '[BoardRow]') response = self._send(http_method='PUT', location_id='0863355d-aefd-4d63-8669-984c9b7b0e78', version='7.0', route_values=route_values, content=content) return self._deserialize('[BoardRow]', self._unwrap_collection(response)) def get_columns(self, team_context): """GetColumns. :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :rtype: :class:`<TaskboardColumns> <azure.devops.v7_0.work.models.TaskboardColumns>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') response = self._send(http_method='GET', location_id='c6815dbe-8e7e-4ffe-9a79-e83ee712aa92', version='7.0', route_values=route_values) return self._deserialize('TaskboardColumns', response) def update_columns(self, update_columns, team_context): """UpdateColumns. :param [UpdateTaskboardColumn] update_columns: :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :rtype: :class:`<TaskboardColumns> <azure.devops.v7_0.work.models.TaskboardColumns>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') content = self._serialize.body(update_columns, '[UpdateTaskboardColumn]') response = self._send(http_method='PUT', location_id='c6815dbe-8e7e-4ffe-9a79-e83ee712aa92', version='7.0', route_values=route_values, content=content) return self._deserialize('TaskboardColumns', response) def get_work_item_columns(self, team_context, iteration_id): """GetWorkItemColumns. :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str iteration_id: :rtype: [TaskboardWorkItemColumn] """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if iteration_id is not None: route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') response = self._send(http_method='GET', location_id='1be23c36-8872-4abc-b57d-402cd6c669d9', version='7.0', route_values=route_values) return self._deserialize('[TaskboardWorkItemColumn]', self._unwrap_collection(response)) def update_work_item_column(self, update_column, team_context, iteration_id, work_item_id): """UpdateWorkItemColumn. :param :class:`<UpdateTaskboardWorkItemColumn> <azure.devops.v7_0.work.models.UpdateTaskboardWorkItemColumn>` update_column: :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str iteration_id: :param int work_item_id: """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if iteration_id is not None: route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') if work_item_id is not None: route_values['workItemId'] = self._serialize.url('work_item_id', work_item_id, 'int') content = self._serialize.body(update_column, 'UpdateTaskboardWorkItemColumn') self._send(http_method='PATCH', location_id='1be23c36-8872-4abc-b57d-402cd6c669d9', version='7.0', route_values=route_values, content=content) def get_team_days_off(self, team_context, iteration_id): """GetTeamDaysOff. Get team's days off for an iteration :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str iteration_id: ID of the iteration :rtype: :class:`<TeamSettingsDaysOff> <azure.devops.v7_0.work.models.TeamSettingsDaysOff>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if iteration_id is not None: route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') response = self._send(http_method='GET', location_id='2d4faa2e-9150-4cbf-a47a-932b1b4a0773', version='7.0', route_values=route_values) return self._deserialize('TeamSettingsDaysOff', response) def update_team_days_off(self, days_off_patch, team_context, iteration_id): """UpdateTeamDaysOff. Set a team's days off for an iteration :param :class:`<TeamSettingsDaysOffPatch> <azure.devops.v7_0.work.models.TeamSettingsDaysOffPatch>` days_off_patch: Team's days off patch containing a list of start and end dates :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str iteration_id: ID of the iteration :rtype: :class:`<TeamSettingsDaysOff> <azure.devops.v7_0.work.models.TeamSettingsDaysOff>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if iteration_id is not None: route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') content = self._serialize.body(days_off_patch, 'TeamSettingsDaysOffPatch') response = self._send(http_method='PATCH', location_id='2d4faa2e-9150-4cbf-a47a-932b1b4a0773', version='7.0', route_values=route_values, content=content) return self._deserialize('TeamSettingsDaysOff', response) def get_team_field_values(self, team_context): """GetTeamFieldValues. Get a collection of team field values :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :rtype: :class:`<TeamFieldValues> <azure.devops.v7_0.work.models.TeamFieldValues>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') response = self._send(http_method='GET', location_id='07ced576-58ed-49e6-9c1e-5cb53ab8bf2a', version='7.0', route_values=route_values) return self._deserialize('TeamFieldValues', response) def update_team_field_values(self, patch, team_context): """UpdateTeamFieldValues. Update team field values :param :class:`<TeamFieldValuesPatch> <azure.devops.v7_0.work.models.TeamFieldValuesPatch>` patch: :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :rtype: :class:`<TeamFieldValues> <azure.devops.v7_0.work.models.TeamFieldValues>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') content = self._serialize.body(patch, 'TeamFieldValuesPatch') response = self._send(http_method='PATCH', location_id='07ced576-58ed-49e6-9c1e-5cb53ab8bf2a', version='7.0', route_values=route_values, content=content) return self._deserialize('TeamFieldValues', response) def get_team_settings(self, team_context): """GetTeamSettings. Get a team's settings :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :rtype: :class:`<TeamSetting> <azure.devops.v7_0.work.models.TeamSetting>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') response = self._send(http_method='GET', location_id='c3c1012b-bea7-49d7-b45e-1664e566f84c', version='7.0', route_values=route_values) return self._deserialize('TeamSetting', response) def update_team_settings(self, team_settings_patch, team_context): """UpdateTeamSettings. Update a team's settings :param :class:`<TeamSettingsPatch> <azure.devops.v7_0.work.models.TeamSettingsPatch>` team_settings_patch: TeamSettings changes :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :rtype: :class:`<TeamSetting> <azure.devops.v7_0.work.models.TeamSetting>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') content = self._serialize.body(team_settings_patch, 'TeamSettingsPatch') response = self._send(http_method='PATCH', location_id='c3c1012b-bea7-49d7-b45e-1664e566f84c', version='7.0', route_values=route_values, content=content) return self._deserialize('TeamSetting', response) def get_iteration_work_items(self, team_context, iteration_id): """GetIterationWorkItems. Get work items for iteration :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str iteration_id: ID of the iteration :rtype: :class:`<IterationWorkItems> <azure.devops.v7_0.work.models.IterationWorkItems>` """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if iteration_id is not None: route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') response = self._send(http_method='GET', location_id='5b3ef1a6-d3ab-44cd-bafd-c7f45db850fa', version='7.0', route_values=route_values) return self._deserialize('IterationWorkItems', response) def reorder_backlog_work_items(self, operation, team_context): """ReorderBacklogWorkItems. Reorder Product Backlog/Boards Work Items :param :class:`<ReorderOperation> <azure.devops.v7_0.work.models.ReorderOperation>` operation: :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :rtype: [ReorderResult] """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') content = self._serialize.body(operation, 'ReorderOperation') response = self._send(http_method='PATCH', location_id='1c22b714-e7e4-41b9-85e0-56ee13ef55ed', version='7.0', route_values=route_values, content=content) return self._deserialize('[ReorderResult]', self._unwrap_collection(response)) def reorder_iteration_work_items(self, operation, team_context, iteration_id): """ReorderIterationWorkItems. Reorder Sprint Backlog/Taskboard Work Items :param :class:`<ReorderOperation> <azure.devops.v7_0.work.models.ReorderOperation>` operation: :param :class:`<TeamContext> <azure.devops.v7_0.work.models.TeamContext>` team_context: The team context for the operation :param str iteration_id: The id of the iteration :rtype: [ReorderResult] """ project = None team = None if team_context is not None: if team_context.project_id: project = team_context.project_id else: project = team_context.project if team_context.team_id: team = team_context.team_id else: team = team_context.team route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'string') if team is not None: route_values['team'] = self._serialize.url('team', team, 'string') if iteration_id is not None: route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') content = self._serialize.body(operation, 'ReorderOperation') response = self._send(http_method='PATCH', location_id='47755db2-d7eb-405a-8c25-675401525fc9', version='7.0', route_values=route_values, content=content) return self._deserialize('[ReorderResult]', self._unwrap_collection(response))
azure-devops-python-api/azure-devops/azure/devops/released/work/work_client.py/0
{ "file_path": "azure-devops-python-api/azure-devops/azure/devops/released/work/work_client.py", "repo_id": "azure-devops-python-api", "token_count": 36693 }
365
ο»Ώ# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- # Generated file, DO NOT EDIT # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- from msrest import Serializer, Deserializer from ...client import Client from . import models class WorkItemTrackingProcessClient(Client): """WorkItemTrackingProcess :param str base_url: Service URL :param Authentication creds: Authenticated credentials. """ def __init__(self, base_url=None, creds=None): super(WorkItemTrackingProcessClient, self).__init__(base_url, creds) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) resource_area_identifier = '5264459e-e5e0-4bd8-b118-0985e68a4ec5' def create_process_behavior(self, behavior, process_id): """CreateProcessBehavior. Creates a single behavior in the given process. :param :class:`<ProcessBehaviorCreateRequest> <azure.devops.v7_0.work_item_tracking_process.models.ProcessBehaviorCreateRequest>` behavior: :param str process_id: The ID of the process :rtype: :class:`<ProcessBehavior> <azure.devops.v7_0.work_item_tracking_process.models.ProcessBehavior>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') content = self._serialize.body(behavior, 'ProcessBehaviorCreateRequest') response = self._send(http_method='POST', location_id='d1800200-f184-4e75-a5f2-ad0b04b4373e', version='7.0', route_values=route_values, content=content) return self._deserialize('ProcessBehavior', response) def delete_process_behavior(self, process_id, behavior_ref_name): """DeleteProcessBehavior. Removes a behavior in the process. :param str process_id: The ID of the process :param str behavior_ref_name: The reference name of the behavior """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if behavior_ref_name is not None: route_values['behaviorRefName'] = self._serialize.url('behavior_ref_name', behavior_ref_name, 'str') self._send(http_method='DELETE', location_id='d1800200-f184-4e75-a5f2-ad0b04b4373e', version='7.0', route_values=route_values) def get_process_behavior(self, process_id, behavior_ref_name, expand=None): """GetProcessBehavior. Returns a behavior of the process. :param str process_id: The ID of the process :param str behavior_ref_name: The reference name of the behavior :param str expand: :rtype: :class:`<ProcessBehavior> <azure.devops.v7_0.work_item_tracking_process.models.ProcessBehavior>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if behavior_ref_name is not None: route_values['behaviorRefName'] = self._serialize.url('behavior_ref_name', behavior_ref_name, 'str') query_parameters = {} if expand is not None: query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='d1800200-f184-4e75-a5f2-ad0b04b4373e', version='7.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ProcessBehavior', response) def get_process_behaviors(self, process_id, expand=None): """GetProcessBehaviors. Returns a list of all behaviors in the process. :param str process_id: The ID of the process :param str expand: :rtype: [ProcessBehavior] """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') query_parameters = {} if expand is not None: query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='d1800200-f184-4e75-a5f2-ad0b04b4373e', version='7.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ProcessBehavior]', self._unwrap_collection(response)) def update_process_behavior(self, behavior_data, process_id, behavior_ref_name): """UpdateProcessBehavior. Replaces a behavior in the process. :param :class:`<ProcessBehaviorUpdateRequest> <azure.devops.v7_0.work_item_tracking_process.models.ProcessBehaviorUpdateRequest>` behavior_data: :param str process_id: The ID of the process :param str behavior_ref_name: The reference name of the behavior :rtype: :class:`<ProcessBehavior> <azure.devops.v7_0.work_item_tracking_process.models.ProcessBehavior>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if behavior_ref_name is not None: route_values['behaviorRefName'] = self._serialize.url('behavior_ref_name', behavior_ref_name, 'str') content = self._serialize.body(behavior_data, 'ProcessBehaviorUpdateRequest') response = self._send(http_method='PUT', location_id='d1800200-f184-4e75-a5f2-ad0b04b4373e', version='7.0', route_values=route_values, content=content) return self._deserialize('ProcessBehavior', response) def create_control_in_group(self, control, process_id, wit_ref_name, group_id): """CreateControlInGroup. Creates a control in a group. :param :class:`<Control> <azure.devops.v7_0.work_item_tracking_process.models.Control>` control: The control. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str group_id: The ID of the group to add the control to. :rtype: :class:`<Control> <azure.devops.v7_0.work_item_tracking_process.models.Control>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if group_id is not None: route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') content = self._serialize.body(control, 'Control') response = self._send(http_method='POST', location_id='1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58', version='7.0', route_values=route_values, content=content) return self._deserialize('Control', response) def move_control_to_group(self, control, process_id, wit_ref_name, group_id, control_id, remove_from_group_id=None): """MoveControlToGroup. Moves a control to a specified group. :param :class:`<Control> <azure.devops.v7_0.work_item_tracking_process.models.Control>` control: The control. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str group_id: The ID of the group to move the control to. :param str control_id: The ID of the control. :param str remove_from_group_id: The group ID to remove the control from. :rtype: :class:`<Control> <azure.devops.v7_0.work_item_tracking_process.models.Control>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if group_id is not None: route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') if control_id is not None: route_values['controlId'] = self._serialize.url('control_id', control_id, 'str') query_parameters = {} if remove_from_group_id is not None: query_parameters['removeFromGroupId'] = self._serialize.query('remove_from_group_id', remove_from_group_id, 'str') content = self._serialize.body(control, 'Control') response = self._send(http_method='PUT', location_id='1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58', version='7.0', route_values=route_values, query_parameters=query_parameters, content=content) return self._deserialize('Control', response) def remove_control_from_group(self, process_id, wit_ref_name, group_id, control_id): """RemoveControlFromGroup. Removes a control from the work item form. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str group_id: The ID of the group. :param str control_id: The ID of the control to remove. """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if group_id is not None: route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') if control_id is not None: route_values['controlId'] = self._serialize.url('control_id', control_id, 'str') self._send(http_method='DELETE', location_id='1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58', version='7.0', route_values=route_values) def update_control(self, control, process_id, wit_ref_name, group_id, control_id): """UpdateControl. Updates a control on the work item form. :param :class:`<Control> <azure.devops.v7_0.work_item_tracking_process.models.Control>` control: The updated control. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str group_id: The ID of the group. :param str control_id: The ID of the control. :rtype: :class:`<Control> <azure.devops.v7_0.work_item_tracking_process.models.Control>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if group_id is not None: route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') if control_id is not None: route_values['controlId'] = self._serialize.url('control_id', control_id, 'str') content = self._serialize.body(control, 'Control') response = self._send(http_method='PATCH', location_id='1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58', version='7.0', route_values=route_values, content=content) return self._deserialize('Control', response) def add_field_to_work_item_type(self, field, process_id, wit_ref_name): """AddFieldToWorkItemType. Adds a field to a work item type. :param :class:`<AddProcessWorkItemTypeFieldRequest> <azure.devops.v7_0.work_item_tracking_process.models.AddProcessWorkItemTypeFieldRequest>` field: :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :rtype: :class:`<ProcessWorkItemTypeField> <azure.devops.v7_0.work_item_tracking_process.models.ProcessWorkItemTypeField>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') content = self._serialize.body(field, 'AddProcessWorkItemTypeFieldRequest') response = self._send(http_method='POST', location_id='bc0ad8dc-e3f3-46b0-b06c-5bf861793196', version='7.0', route_values=route_values, content=content) return self._deserialize('ProcessWorkItemTypeField', response) def get_all_work_item_type_fields(self, process_id, wit_ref_name): """GetAllWorkItemTypeFields. Returns a list of all fields in a work item type. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :rtype: [ProcessWorkItemTypeField] """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') response = self._send(http_method='GET', location_id='bc0ad8dc-e3f3-46b0-b06c-5bf861793196', version='7.0', route_values=route_values) return self._deserialize('[ProcessWorkItemTypeField]', self._unwrap_collection(response)) def get_work_item_type_field(self, process_id, wit_ref_name, field_ref_name, expand=None): """GetWorkItemTypeField. Returns a field in a work item type. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str field_ref_name: The reference name of the field. :param str expand: :rtype: :class:`<ProcessWorkItemTypeField> <azure.devops.v7_0.work_item_tracking_process.models.ProcessWorkItemTypeField>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if field_ref_name is not None: route_values['fieldRefName'] = self._serialize.url('field_ref_name', field_ref_name, 'str') query_parameters = {} if expand is not None: query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='bc0ad8dc-e3f3-46b0-b06c-5bf861793196', version='7.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ProcessWorkItemTypeField', response) def remove_work_item_type_field(self, process_id, wit_ref_name, field_ref_name): """RemoveWorkItemTypeField. Removes a field from a work item type. Does not permanently delete the field. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str field_ref_name: The reference name of the field. """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if field_ref_name is not None: route_values['fieldRefName'] = self._serialize.url('field_ref_name', field_ref_name, 'str') self._send(http_method='DELETE', location_id='bc0ad8dc-e3f3-46b0-b06c-5bf861793196', version='7.0', route_values=route_values) def update_work_item_type_field(self, field, process_id, wit_ref_name, field_ref_name): """UpdateWorkItemTypeField. Updates a field in a work item type. :param :class:`<UpdateProcessWorkItemTypeFieldRequest> <azure.devops.v7_0.work_item_tracking_process.models.UpdateProcessWorkItemTypeFieldRequest>` field: :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str field_ref_name: The reference name of the field. :rtype: :class:`<ProcessWorkItemTypeField> <azure.devops.v7_0.work_item_tracking_process.models.ProcessWorkItemTypeField>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if field_ref_name is not None: route_values['fieldRefName'] = self._serialize.url('field_ref_name', field_ref_name, 'str') content = self._serialize.body(field, 'UpdateProcessWorkItemTypeFieldRequest') response = self._send(http_method='PATCH', location_id='bc0ad8dc-e3f3-46b0-b06c-5bf861793196', version='7.0', route_values=route_values, content=content) return self._deserialize('ProcessWorkItemTypeField', response) def add_group(self, group, process_id, wit_ref_name, page_id, section_id): """AddGroup. Adds a group to the work item form. :param :class:`<Group> <azure.devops.v7_0.work_item_tracking_process.models.Group>` group: The group. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str page_id: The ID of the page to add the group to. :param str section_id: The ID of the section to add the group to. :rtype: :class:`<Group> <azure.devops.v7_0.work_item_tracking_process.models.Group>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if page_id is not None: route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') if section_id is not None: route_values['sectionId'] = self._serialize.url('section_id', section_id, 'str') content = self._serialize.body(group, 'Group') response = self._send(http_method='POST', location_id='766e44e1-36a8-41d7-9050-c343ff02f7a5', version='7.0', route_values=route_values, content=content) return self._deserialize('Group', response) def move_group_to_page(self, group, process_id, wit_ref_name, page_id, section_id, group_id, remove_from_page_id, remove_from_section_id): """MoveGroupToPage. Moves a group to a different page and section. :param :class:`<Group> <azure.devops.v7_0.work_item_tracking_process.models.Group>` group: The updated group. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str page_id: The ID of the page the group is in. :param str section_id: The ID of the section the group is i.n :param str group_id: The ID of the group. :param str remove_from_page_id: ID of the page to remove the group from. :param str remove_from_section_id: ID of the section to remove the group from. :rtype: :class:`<Group> <azure.devops.v7_0.work_item_tracking_process.models.Group>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if page_id is not None: route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') if section_id is not None: route_values['sectionId'] = self._serialize.url('section_id', section_id, 'str') if group_id is not None: route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') query_parameters = {} if remove_from_page_id is not None: query_parameters['removeFromPageId'] = self._serialize.query('remove_from_page_id', remove_from_page_id, 'str') if remove_from_section_id is not None: query_parameters['removeFromSectionId'] = self._serialize.query('remove_from_section_id', remove_from_section_id, 'str') content = self._serialize.body(group, 'Group') response = self._send(http_method='PUT', location_id='766e44e1-36a8-41d7-9050-c343ff02f7a5', version='7.0', route_values=route_values, query_parameters=query_parameters, content=content) return self._deserialize('Group', response) def move_group_to_section(self, group, process_id, wit_ref_name, page_id, section_id, group_id, remove_from_section_id): """MoveGroupToSection. Moves a group to a different section. :param :class:`<Group> <azure.devops.v7_0.work_item_tracking_process.models.Group>` group: The updated group. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str page_id: The ID of the page the group is in. :param str section_id: The ID of the section the group is in. :param str group_id: The ID of the group. :param str remove_from_section_id: ID of the section to remove the group from. :rtype: :class:`<Group> <azure.devops.v7_0.work_item_tracking_process.models.Group>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if page_id is not None: route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') if section_id is not None: route_values['sectionId'] = self._serialize.url('section_id', section_id, 'str') if group_id is not None: route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') query_parameters = {} if remove_from_section_id is not None: query_parameters['removeFromSectionId'] = self._serialize.query('remove_from_section_id', remove_from_section_id, 'str') content = self._serialize.body(group, 'Group') response = self._send(http_method='PUT', location_id='766e44e1-36a8-41d7-9050-c343ff02f7a5', version='7.0', route_values=route_values, query_parameters=query_parameters, content=content) return self._deserialize('Group', response) def remove_group(self, process_id, wit_ref_name, page_id, section_id, group_id): """RemoveGroup. Removes a group from the work item form. :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :param str page_id: The ID of the page the group is in :param str section_id: The ID of the section to the group is in :param str group_id: The ID of the group """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if page_id is not None: route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') if section_id is not None: route_values['sectionId'] = self._serialize.url('section_id', section_id, 'str') if group_id is not None: route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') self._send(http_method='DELETE', location_id='766e44e1-36a8-41d7-9050-c343ff02f7a5', version='7.0', route_values=route_values) def update_group(self, group, process_id, wit_ref_name, page_id, section_id, group_id): """UpdateGroup. Updates a group in the work item form. :param :class:`<Group> <azure.devops.v7_0.work_item_tracking_process.models.Group>` group: The updated group. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str page_id: The ID of the page the group is in. :param str section_id: The ID of the section the group is in. :param str group_id: The ID of the group. :rtype: :class:`<Group> <azure.devops.v7_0.work_item_tracking_process.models.Group>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if page_id is not None: route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') if section_id is not None: route_values['sectionId'] = self._serialize.url('section_id', section_id, 'str') if group_id is not None: route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') content = self._serialize.body(group, 'Group') response = self._send(http_method='PATCH', location_id='766e44e1-36a8-41d7-9050-c343ff02f7a5', version='7.0', route_values=route_values, content=content) return self._deserialize('Group', response) def get_form_layout(self, process_id, wit_ref_name): """GetFormLayout. Gets the form layout. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :rtype: :class:`<FormLayout> <azure.devops.v7_0.work_item_tracking_process.models.FormLayout>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') response = self._send(http_method='GET', location_id='fa8646eb-43cd-4b71-9564-40106fd63e40', version='7.0', route_values=route_values) return self._deserialize('FormLayout', response) def create_list(self, picklist): """CreateList. Creates a picklist. :param :class:`<PickList> <azure.devops.v7_0.work_item_tracking_process.models.PickList>` picklist: Picklist :rtype: :class:`<PickList> <azure.devops.v7_0.work_item_tracking_process.models.PickList>` """ content = self._serialize.body(picklist, 'PickList') response = self._send(http_method='POST', location_id='01e15468-e27c-4e20-a974-bd957dcccebc', version='7.0', content=content) return self._deserialize('PickList', response) def delete_list(self, list_id): """DeleteList. Removes a picklist. :param str list_id: The ID of the list """ route_values = {} if list_id is not None: route_values['listId'] = self._serialize.url('list_id', list_id, 'str') self._send(http_method='DELETE', location_id='01e15468-e27c-4e20-a974-bd957dcccebc', version='7.0', route_values=route_values) def get_list(self, list_id): """GetList. Returns a picklist. :param str list_id: The ID of the list :rtype: :class:`<PickList> <azure.devops.v7_0.work_item_tracking_process.models.PickList>` """ route_values = {} if list_id is not None: route_values['listId'] = self._serialize.url('list_id', list_id, 'str') response = self._send(http_method='GET', location_id='01e15468-e27c-4e20-a974-bd957dcccebc', version='7.0', route_values=route_values) return self._deserialize('PickList', response) def get_lists_metadata(self): """GetListsMetadata. Returns meta data of the picklist. :rtype: [PickListMetadata] """ response = self._send(http_method='GET', location_id='01e15468-e27c-4e20-a974-bd957dcccebc', version='7.0') return self._deserialize('[PickListMetadata]', self._unwrap_collection(response)) def update_list(self, picklist, list_id): """UpdateList. Updates a list. :param :class:`<PickList> <azure.devops.v7_0.work_item_tracking_process.models.PickList>` picklist: :param str list_id: The ID of the list :rtype: :class:`<PickList> <azure.devops.v7_0.work_item_tracking_process.models.PickList>` """ route_values = {} if list_id is not None: route_values['listId'] = self._serialize.url('list_id', list_id, 'str') content = self._serialize.body(picklist, 'PickList') response = self._send(http_method='PUT', location_id='01e15468-e27c-4e20-a974-bd957dcccebc', version='7.0', route_values=route_values, content=content) return self._deserialize('PickList', response) def add_page(self, page, process_id, wit_ref_name): """AddPage. Adds a page to the work item form. :param :class:`<Page> <azure.devops.v7_0.work_item_tracking_process.models.Page>` page: The page. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :rtype: :class:`<Page> <azure.devops.v7_0.work_item_tracking_process.models.Page>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') content = self._serialize.body(page, 'Page') response = self._send(http_method='POST', location_id='1cc7b29f-6697-4d9d-b0a1-2650d3e1d584', version='7.0', route_values=route_values, content=content) return self._deserialize('Page', response) def remove_page(self, process_id, wit_ref_name, page_id): """RemovePage. Removes a page from the work item form :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :param str page_id: The ID of the page """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if page_id is not None: route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') self._send(http_method='DELETE', location_id='1cc7b29f-6697-4d9d-b0a1-2650d3e1d584', version='7.0', route_values=route_values) def update_page(self, page, process_id, wit_ref_name): """UpdatePage. Updates a page on the work item form :param :class:`<Page> <azure.devops.v7_0.work_item_tracking_process.models.Page>` page: The page :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :rtype: :class:`<Page> <azure.devops.v7_0.work_item_tracking_process.models.Page>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') content = self._serialize.body(page, 'Page') response = self._send(http_method='PATCH', location_id='1cc7b29f-6697-4d9d-b0a1-2650d3e1d584', version='7.0', route_values=route_values, content=content) return self._deserialize('Page', response) def create_new_process(self, create_request): """CreateNewProcess. Creates a process. :param :class:`<CreateProcessModel> <azure.devops.v7_0.work_item_tracking_process.models.CreateProcessModel>` create_request: CreateProcessModel. :rtype: :class:`<ProcessInfo> <azure.devops.v7_0.work_item_tracking_process.models.ProcessInfo>` """ content = self._serialize.body(create_request, 'CreateProcessModel') response = self._send(http_method='POST', location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', version='7.0', content=content) return self._deserialize('ProcessInfo', response) def delete_process_by_id(self, process_type_id): """DeleteProcessById. Removes a process of a specific ID. :param str process_type_id: """ route_values = {} if process_type_id is not None: route_values['processTypeId'] = self._serialize.url('process_type_id', process_type_id, 'str') self._send(http_method='DELETE', location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', version='7.0', route_values=route_values) def edit_process(self, update_request, process_type_id): """EditProcess. Edit a process of a specific ID. :param :class:`<UpdateProcessModel> <azure.devops.v7_0.work_item_tracking_process.models.UpdateProcessModel>` update_request: :param str process_type_id: :rtype: :class:`<ProcessInfo> <azure.devops.v7_0.work_item_tracking_process.models.ProcessInfo>` """ route_values = {} if process_type_id is not None: route_values['processTypeId'] = self._serialize.url('process_type_id', process_type_id, 'str') content = self._serialize.body(update_request, 'UpdateProcessModel') response = self._send(http_method='PATCH', location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', version='7.0', route_values=route_values, content=content) return self._deserialize('ProcessInfo', response) def get_list_of_processes(self, expand=None): """GetListOfProcesses. Get list of all processes including system and inherited. :param str expand: :rtype: [ProcessInfo] """ query_parameters = {} if expand is not None: query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', version='7.0', query_parameters=query_parameters) return self._deserialize('[ProcessInfo]', self._unwrap_collection(response)) def get_process_by_its_id(self, process_type_id, expand=None): """GetProcessByItsId. Get a single process of a specified ID. :param str process_type_id: :param str expand: :rtype: :class:`<ProcessInfo> <azure.devops.v7_0.work_item_tracking_process.models.ProcessInfo>` """ route_values = {} if process_type_id is not None: route_values['processTypeId'] = self._serialize.url('process_type_id', process_type_id, 'str') query_parameters = {} if expand is not None: query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', version='7.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ProcessInfo', response) def add_process_work_item_type_rule(self, process_rule_create, process_id, wit_ref_name): """AddProcessWorkItemTypeRule. Adds a rule to work item type in the process. :param :class:`<CreateProcessRuleRequest> <azure.devops.v7_0.work_item_tracking_process.models.CreateProcessRuleRequest>` process_rule_create: :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :rtype: :class:`<ProcessRule> <azure.devops.v7_0.work_item_tracking_process.models.ProcessRule>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') content = self._serialize.body(process_rule_create, 'CreateProcessRuleRequest') response = self._send(http_method='POST', location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', version='7.0', route_values=route_values, content=content) return self._deserialize('ProcessRule', response) def delete_process_work_item_type_rule(self, process_id, wit_ref_name, rule_id): """DeleteProcessWorkItemTypeRule. Removes a rule from the work item type in the process. :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :param str rule_id: The ID of the rule """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if rule_id is not None: route_values['ruleId'] = self._serialize.url('rule_id', rule_id, 'str') self._send(http_method='DELETE', location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', version='7.0', route_values=route_values) def get_process_work_item_type_rule(self, process_id, wit_ref_name, rule_id): """GetProcessWorkItemTypeRule. Returns a single rule in the work item type of the process. :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :param str rule_id: The ID of the rule :rtype: :class:`<ProcessRule> <azure.devops.v7_0.work_item_tracking_process.models.ProcessRule>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if rule_id is not None: route_values['ruleId'] = self._serialize.url('rule_id', rule_id, 'str') response = self._send(http_method='GET', location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', version='7.0', route_values=route_values) return self._deserialize('ProcessRule', response) def get_process_work_item_type_rules(self, process_id, wit_ref_name): """GetProcessWorkItemTypeRules. Returns a list of all rules in the work item type of the process. :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :rtype: [ProcessRule] """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') response = self._send(http_method='GET', location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', version='7.0', route_values=route_values) return self._deserialize('[ProcessRule]', self._unwrap_collection(response)) def update_process_work_item_type_rule(self, process_rule, process_id, wit_ref_name, rule_id): """UpdateProcessWorkItemTypeRule. Updates a rule in the work item type of the process. :param :class:`<UpdateProcessRuleRequest> <azure.devops.v7_0.work_item_tracking_process.models.UpdateProcessRuleRequest>` process_rule: :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :param str rule_id: The ID of the rule :rtype: :class:`<ProcessRule> <azure.devops.v7_0.work_item_tracking_process.models.ProcessRule>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if rule_id is not None: route_values['ruleId'] = self._serialize.url('rule_id', rule_id, 'str') content = self._serialize.body(process_rule, 'UpdateProcessRuleRequest') response = self._send(http_method='PUT', location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', version='7.0', route_values=route_values, content=content) return self._deserialize('ProcessRule', response) def create_state_definition(self, state_model, process_id, wit_ref_name): """CreateStateDefinition. Creates a state definition in the work item type of the process. :param :class:`<WorkItemStateInputModel> <azure.devops.v7_0.work_item_tracking_process.models.WorkItemStateInputModel>` state_model: :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :rtype: :class:`<WorkItemStateResultModel> <azure.devops.v7_0.work_item_tracking_process.models.WorkItemStateResultModel>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') content = self._serialize.body(state_model, 'WorkItemStateInputModel') response = self._send(http_method='POST', location_id='31015d57-2dff-4a46-adb3-2fb4ee3dcec9', version='7.0', route_values=route_values, content=content) return self._deserialize('WorkItemStateResultModel', response) def delete_state_definition(self, process_id, wit_ref_name, state_id): """DeleteStateDefinition. Removes a state definition in the work item type of the process. :param str process_id: ID of the process :param str wit_ref_name: The reference name of the work item type :param str state_id: ID of the state """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if state_id is not None: route_values['stateId'] = self._serialize.url('state_id', state_id, 'str') self._send(http_method='DELETE', location_id='31015d57-2dff-4a46-adb3-2fb4ee3dcec9', version='7.0', route_values=route_values) def get_state_definition(self, process_id, wit_ref_name, state_id): """GetStateDefinition. Returns a single state definition in a work item type of the process. :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :param str state_id: The ID of the state :rtype: :class:`<WorkItemStateResultModel> <azure.devops.v7_0.work_item_tracking_process.models.WorkItemStateResultModel>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if state_id is not None: route_values['stateId'] = self._serialize.url('state_id', state_id, 'str') response = self._send(http_method='GET', location_id='31015d57-2dff-4a46-adb3-2fb4ee3dcec9', version='7.0', route_values=route_values) return self._deserialize('WorkItemStateResultModel', response) def get_state_definitions(self, process_id, wit_ref_name): """GetStateDefinitions. Returns a list of all state definitions in a work item type of the process. :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :rtype: [WorkItemStateResultModel] """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') response = self._send(http_method='GET', location_id='31015d57-2dff-4a46-adb3-2fb4ee3dcec9', version='7.0', route_values=route_values) return self._deserialize('[WorkItemStateResultModel]', self._unwrap_collection(response)) def hide_state_definition(self, hide_state_model, process_id, wit_ref_name, state_id): """HideStateDefinition. Hides a state definition in the work item type of the process.Only states with customizationType:System can be hidden. :param :class:`<HideStateModel> <azure.devops.v7_0.work_item_tracking_process.models.HideStateModel>` hide_state_model: :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :param str state_id: The ID of the state :rtype: :class:`<WorkItemStateResultModel> <azure.devops.v7_0.work_item_tracking_process.models.WorkItemStateResultModel>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if state_id is not None: route_values['stateId'] = self._serialize.url('state_id', state_id, 'str') content = self._serialize.body(hide_state_model, 'HideStateModel') response = self._send(http_method='PUT', location_id='31015d57-2dff-4a46-adb3-2fb4ee3dcec9', version='7.0', route_values=route_values, content=content) return self._deserialize('WorkItemStateResultModel', response) def update_state_definition(self, state_model, process_id, wit_ref_name, state_id): """UpdateStateDefinition. Updates a given state definition in the work item type of the process. :param :class:`<WorkItemStateInputModel> <azure.devops.v7_0.work_item_tracking_process.models.WorkItemStateInputModel>` state_model: :param str process_id: ID of the process :param str wit_ref_name: The reference name of the work item type :param str state_id: ID of the state :rtype: :class:`<WorkItemStateResultModel> <azure.devops.v7_0.work_item_tracking_process.models.WorkItemStateResultModel>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if state_id is not None: route_values['stateId'] = self._serialize.url('state_id', state_id, 'str') content = self._serialize.body(state_model, 'WorkItemStateInputModel') response = self._send(http_method='PATCH', location_id='31015d57-2dff-4a46-adb3-2fb4ee3dcec9', version='7.0', route_values=route_values, content=content) return self._deserialize('WorkItemStateResultModel', response) def delete_system_control(self, process_id, wit_ref_name, control_id): """DeleteSystemControl. Deletes a system control modification on the work item form. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str control_id: The ID of the control. :rtype: [Control] """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if control_id is not None: route_values['controlId'] = self._serialize.url('control_id', control_id, 'str') response = self._send(http_method='DELETE', location_id='ff9a3d2c-32b7-4c6c-991c-d5a251fb9098', version='7.0', route_values=route_values) return self._deserialize('[Control]', self._unwrap_collection(response)) def get_system_controls(self, process_id, wit_ref_name): """GetSystemControls. Gets edited system controls for a work item type in a process. To get all system controls (base + edited) use layout API(s) :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :rtype: [Control] """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') response = self._send(http_method='GET', location_id='ff9a3d2c-32b7-4c6c-991c-d5a251fb9098', version='7.0', route_values=route_values) return self._deserialize('[Control]', self._unwrap_collection(response)) def update_system_control(self, control, process_id, wit_ref_name, control_id): """UpdateSystemControl. Updates/adds a system control on the work item form. :param :class:`<Control> <azure.devops.v7_0.work_item_tracking_process.models.Control>` control: :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. :param str control_id: The ID of the control. :rtype: :class:`<Control> <azure.devops.v7_0.work_item_tracking_process.models.Control>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') if control_id is not None: route_values['controlId'] = self._serialize.url('control_id', control_id, 'str') content = self._serialize.body(control, 'Control') response = self._send(http_method='PATCH', location_id='ff9a3d2c-32b7-4c6c-991c-d5a251fb9098', version='7.0', route_values=route_values, content=content) return self._deserialize('Control', response) def create_process_work_item_type(self, work_item_type, process_id): """CreateProcessWorkItemType. Creates a work item type in the process. :param :class:`<CreateProcessWorkItemTypeRequest> <azure.devops.v7_0.work_item_tracking_process.models.CreateProcessWorkItemTypeRequest>` work_item_type: :param str process_id: The ID of the process on which to create work item type. :rtype: :class:`<ProcessWorkItemType> <azure.devops.v7_0.work_item_tracking_process.models.ProcessWorkItemType>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') content = self._serialize.body(work_item_type, 'CreateProcessWorkItemTypeRequest') response = self._send(http_method='POST', location_id='e2e9d1a6-432d-4062-8870-bfcb8c324ad7', version='7.0', route_values=route_values, content=content) return self._deserialize('ProcessWorkItemType', response) def delete_process_work_item_type(self, process_id, wit_ref_name): """DeleteProcessWorkItemType. Removes a work itewm type in the process. :param str process_id: The ID of the process. :param str wit_ref_name: The reference name of the work item type. """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') self._send(http_method='DELETE', location_id='e2e9d1a6-432d-4062-8870-bfcb8c324ad7', version='7.0', route_values=route_values) def get_process_work_item_type(self, process_id, wit_ref_name, expand=None): """GetProcessWorkItemType. Returns a single work item type in a process. :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :param str expand: Flag to determine what properties of work item type to return :rtype: :class:`<ProcessWorkItemType> <azure.devops.v7_0.work_item_tracking_process.models.ProcessWorkItemType>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') query_parameters = {} if expand is not None: query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='e2e9d1a6-432d-4062-8870-bfcb8c324ad7', version='7.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('ProcessWorkItemType', response) def get_process_work_item_types(self, process_id, expand=None): """GetProcessWorkItemTypes. Returns a list of all work item types in a process. :param str process_id: The ID of the process :param str expand: Flag to determine what properties of work item type to return :rtype: [ProcessWorkItemType] """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') query_parameters = {} if expand is not None: query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='e2e9d1a6-432d-4062-8870-bfcb8c324ad7', version='7.0', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[ProcessWorkItemType]', self._unwrap_collection(response)) def update_process_work_item_type(self, work_item_type_update, process_id, wit_ref_name): """UpdateProcessWorkItemType. Updates a work item type of the process. :param :class:`<UpdateProcessWorkItemTypeRequest> <azure.devops.v7_0.work_item_tracking_process.models.UpdateProcessWorkItemTypeRequest>` work_item_type_update: :param str process_id: The ID of the process :param str wit_ref_name: The reference name of the work item type :rtype: :class:`<ProcessWorkItemType> <azure.devops.v7_0.work_item_tracking_process.models.ProcessWorkItemType>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name is not None: route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') content = self._serialize.body(work_item_type_update, 'UpdateProcessWorkItemTypeRequest') response = self._send(http_method='PATCH', location_id='e2e9d1a6-432d-4062-8870-bfcb8c324ad7', version='7.0', route_values=route_values, content=content) return self._deserialize('ProcessWorkItemType', response) def add_behavior_to_work_item_type(self, behavior, process_id, wit_ref_name_for_behaviors): """AddBehaviorToWorkItemType. Adds a behavior to the work item type of the process. :param :class:`<WorkItemTypeBehavior> <azure.devops.v7_0.work_item_tracking_process.models.WorkItemTypeBehavior>` behavior: :param str process_id: The ID of the process :param str wit_ref_name_for_behaviors: Work item type reference name for the behavior :rtype: :class:`<WorkItemTypeBehavior> <azure.devops.v7_0.work_item_tracking_process.models.WorkItemTypeBehavior>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name_for_behaviors is not None: route_values['witRefNameForBehaviors'] = self._serialize.url('wit_ref_name_for_behaviors', wit_ref_name_for_behaviors, 'str') content = self._serialize.body(behavior, 'WorkItemTypeBehavior') response = self._send(http_method='POST', location_id='6d765a2e-4e1b-4b11-be93-f953be676024', version='7.0', route_values=route_values, content=content) return self._deserialize('WorkItemTypeBehavior', response) def get_behavior_for_work_item_type(self, process_id, wit_ref_name_for_behaviors, behavior_ref_name): """GetBehaviorForWorkItemType. Returns a behavior for the work item type of the process. :param str process_id: The ID of the process :param str wit_ref_name_for_behaviors: Work item type reference name for the behavior :param str behavior_ref_name: The reference name of the behavior :rtype: :class:`<WorkItemTypeBehavior> <azure.devops.v7_0.work_item_tracking_process.models.WorkItemTypeBehavior>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name_for_behaviors is not None: route_values['witRefNameForBehaviors'] = self._serialize.url('wit_ref_name_for_behaviors', wit_ref_name_for_behaviors, 'str') if behavior_ref_name is not None: route_values['behaviorRefName'] = self._serialize.url('behavior_ref_name', behavior_ref_name, 'str') response = self._send(http_method='GET', location_id='6d765a2e-4e1b-4b11-be93-f953be676024', version='7.0', route_values=route_values) return self._deserialize('WorkItemTypeBehavior', response) def get_behaviors_for_work_item_type(self, process_id, wit_ref_name_for_behaviors): """GetBehaviorsForWorkItemType. Returns a list of all behaviors for the work item type of the process. :param str process_id: The ID of the process :param str wit_ref_name_for_behaviors: Work item type reference name for the behavior :rtype: [WorkItemTypeBehavior] """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name_for_behaviors is not None: route_values['witRefNameForBehaviors'] = self._serialize.url('wit_ref_name_for_behaviors', wit_ref_name_for_behaviors, 'str') response = self._send(http_method='GET', location_id='6d765a2e-4e1b-4b11-be93-f953be676024', version='7.0', route_values=route_values) return self._deserialize('[WorkItemTypeBehavior]', self._unwrap_collection(response)) def remove_behavior_from_work_item_type(self, process_id, wit_ref_name_for_behaviors, behavior_ref_name): """RemoveBehaviorFromWorkItemType. Removes a behavior for the work item type of the process. :param str process_id: The ID of the process :param str wit_ref_name_for_behaviors: Work item type reference name for the behavior :param str behavior_ref_name: The reference name of the behavior """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name_for_behaviors is not None: route_values['witRefNameForBehaviors'] = self._serialize.url('wit_ref_name_for_behaviors', wit_ref_name_for_behaviors, 'str') if behavior_ref_name is not None: route_values['behaviorRefName'] = self._serialize.url('behavior_ref_name', behavior_ref_name, 'str') self._send(http_method='DELETE', location_id='6d765a2e-4e1b-4b11-be93-f953be676024', version='7.0', route_values=route_values) def update_behavior_to_work_item_type(self, behavior, process_id, wit_ref_name_for_behaviors): """UpdateBehaviorToWorkItemType. Updates a behavior for the work item type of the process. :param :class:`<WorkItemTypeBehavior> <azure.devops.v7_0.work_item_tracking_process.models.WorkItemTypeBehavior>` behavior: :param str process_id: The ID of the process :param str wit_ref_name_for_behaviors: Work item type reference name for the behavior :rtype: :class:`<WorkItemTypeBehavior> <azure.devops.v7_0.work_item_tracking_process.models.WorkItemTypeBehavior>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') if wit_ref_name_for_behaviors is not None: route_values['witRefNameForBehaviors'] = self._serialize.url('wit_ref_name_for_behaviors', wit_ref_name_for_behaviors, 'str') content = self._serialize.body(behavior, 'WorkItemTypeBehavior') response = self._send(http_method='PATCH', location_id='6d765a2e-4e1b-4b11-be93-f953be676024', version='7.0', route_values=route_values, content=content) return self._deserialize('WorkItemTypeBehavior', response)
azure-devops-python-api/azure-devops/azure/devops/v7_0/work_item_tracking_process/work_item_tracking_process_client.py/0
{ "file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/work_item_tracking_process/work_item_tracking_process_client.py", "repo_id": "azure-devops-python-api", "token_count": 31294 }
366
ο»Ώ# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- # Generated file, DO NOT EDIT # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- from msrest.serialization import Model class ConfigurationFile(Model): """ :param content: The content of the file. :type content: str :param is_base64_encoded: Indicates if the content is base64 encoded. :type is_base64_encoded: bool :param path: The full path of the file, relative to the root of the repository. :type path: str """ _attribute_map = { 'content': {'key': 'content', 'type': 'str'}, 'is_base64_encoded': {'key': 'isBase64Encoded', 'type': 'bool'}, 'path': {'key': 'path', 'type': 'str'} } def __init__(self, content=None, is_base64_encoded=None, path=None): super(ConfigurationFile, self).__init__() self.content = content self.is_base64_encoded = is_base64_encoded self.path = path class CreatedResources(Model): """ :param resources: :type resources: dict """ _attribute_map = { 'resources': {'key': 'resources', 'type': '{object}'} } def __init__(self, resources=None): super(CreatedResources, self).__init__() self.resources = resources class CreatePipelineConnectionInputs(Model): """ This class is used to create a pipeline connection within the team project provided. If the team project does not exist, it will be created. :param project: The team project settings for an existing team project or for a new team project. :type project: :class:`TeamProject <azure.devops.v7_1.pipelines.models.TeamProject>` :param provider_data: This dictionary contains information that is specific to the provider. This data is opaque to the rest of the Pipelines infrastructure and does NOT contribute to the resources Token. The format of the string and its contents depend on the implementation of the provider. :type provider_data: dict :param provider_id: The external source provider id for which the connection is being made. :type provider_id: str :param redirect_url: If provided, this will be the URL returned with the PipelineConnection. This will override any other redirect URL that would have been generated for the connection. :type redirect_url: str :param request_source: Where the request to create the pipeline originated (such as 'GitHub Marketplace' or 'Azure DevOps') :type request_source: str """ _attribute_map = { 'project': {'key': 'project', 'type': 'TeamProject'}, 'provider_data': {'key': 'providerData', 'type': '{str}'}, 'provider_id': {'key': 'providerId', 'type': 'str'}, 'redirect_url': {'key': 'redirectUrl', 'type': 'str'}, 'request_source': {'key': 'requestSource', 'type': 'str'} } def __init__(self, project=None, provider_data=None, provider_id=None, redirect_url=None, request_source=None): super(CreatePipelineConnectionInputs, self).__init__() self.project = project self.provider_data = provider_data self.provider_id = provider_id self.redirect_url = redirect_url self.request_source = request_source class DetectedBuildFramework(Model): """ :param build_targets: List of build targets discovered for the framework to act upon. :type build_targets: list of :class:`DetectedBuildTarget <azure.devops.v7_1.pipelines.models.DetectedBuildTarget>` :param id: The unique identifier of the build framework. :type id: str :param settings: Additional detected settings for the build framework. :type settings: dict :param version: The version of the framework if it can be determined from the sources. :type version: str """ _attribute_map = { 'build_targets': {'key': 'buildTargets', 'type': '[DetectedBuildTarget]'}, 'id': {'key': 'id', 'type': 'str'}, 'settings': {'key': 'settings', 'type': '{str}'}, 'version': {'key': 'version', 'type': 'str'} } def __init__(self, build_targets=None, id=None, settings=None, version=None): super(DetectedBuildFramework, self).__init__() self.build_targets = build_targets self.id = id self.settings = settings self.version = version class DetectedBuildTarget(Model): """ :param path: :type path: str :param settings: :type settings: dict :param type: :type type: str """ _attribute_map = { 'path': {'key': 'path', 'type': 'str'}, 'settings': {'key': 'settings', 'type': '{str}'}, 'type': {'key': 'type', 'type': 'str'} } def __init__(self, path=None, settings=None, type=None): super(DetectedBuildTarget, self).__init__() self.path = path self.settings = settings self.type = type class OperationReference(Model): """ Reference for an async operation. :param id: Unique identifier for the operation. :type id: str :param plugin_id: Unique identifier for the plugin. :type plugin_id: str :param status: The current status of the operation. :type status: object :param url: URL to get the full operation object. :type url: str """ _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'plugin_id': {'key': 'pluginId', 'type': 'str'}, 'status': {'key': 'status', 'type': 'object'}, 'url': {'key': 'url', 'type': 'str'} } def __init__(self, id=None, plugin_id=None, status=None, url=None): super(OperationReference, self).__init__() self.id = id self.plugin_id = plugin_id self.status = status self.url = url class OperationResultReference(Model): """ :param result_url: URL to the operation result. :type result_url: str """ _attribute_map = { 'result_url': {'key': 'resultUrl', 'type': 'str'} } def __init__(self, result_url=None): super(OperationResultReference, self).__init__() self.result_url = result_url class PipelineConnection(Model): """ :param account_id: The account id that contains the team project for the connection. :type account_id: str :param definition_id: The definition id that was created for the connection. :type definition_id: int :param redirect_url: This is the URL that the user should be taken to in order to continue setup. :type redirect_url: str :param service_endpoint_id: The service endpoint that was created for the connection. :type service_endpoint_id: str :param team_project_id: The team project that contains the definition for the connection. :type team_project_id: str """ _attribute_map = { 'account_id': {'key': 'accountId', 'type': 'str'}, 'definition_id': {'key': 'definitionId', 'type': 'int'}, 'redirect_url': {'key': 'redirectUrl', 'type': 'str'}, 'service_endpoint_id': {'key': 'serviceEndpointId', 'type': 'str'}, 'team_project_id': {'key': 'teamProjectId', 'type': 'str'} } def __init__(self, account_id=None, definition_id=None, redirect_url=None, service_endpoint_id=None, team_project_id=None): super(PipelineConnection, self).__init__() self.account_id = account_id self.definition_id = definition_id self.redirect_url = redirect_url self.service_endpoint_id = service_endpoint_id self.team_project_id = team_project_id class ReferenceLinks(Model): """ The class to represent a collection of REST reference links. :param links: The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only. :type links: dict """ _attribute_map = { 'links': {'key': 'links', 'type': '{object}'} } def __init__(self, links=None): super(ReferenceLinks, self).__init__() self.links = links class ResourceCreationParameter(Model): """ :param resource_to_create: :type resource_to_create: :class:`object <azure.devops.v7_1.pipelines.models.object>` :param type: :type type: str """ _attribute_map = { 'resource_to_create': {'key': 'resourceToCreate', 'type': 'object'}, 'type': {'key': 'type', 'type': 'str'} } def __init__(self, resource_to_create=None, type=None): super(ResourceCreationParameter, self).__init__() self.resource_to_create = resource_to_create self.type = type class TeamProjectReference(Model): """ Represents a shallow reference to a TeamProject. :param abbreviation: Project abbreviation. :type abbreviation: str :param default_team_image_url: Url to default team identity image. :type default_team_image_url: str :param description: The project's description (if any). :type description: str :param id: Project identifier. :type id: str :param last_update_time: Project last update time. :type last_update_time: datetime :param name: Project name. :type name: str :param revision: Project revision. :type revision: long :param state: Project state. :type state: object :param url: Url to the full version of the object. :type url: str :param visibility: Project visibility. :type visibility: object """ _attribute_map = { 'abbreviation': {'key': 'abbreviation', 'type': 'str'}, 'default_team_image_url': {'key': 'defaultTeamImageUrl', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, 'name': {'key': 'name', 'type': 'str'}, 'revision': {'key': 'revision', 'type': 'long'}, 'state': {'key': 'state', 'type': 'object'}, 'url': {'key': 'url', 'type': 'str'}, 'visibility': {'key': 'visibility', 'type': 'object'} } def __init__(self, abbreviation=None, default_team_image_url=None, description=None, id=None, last_update_time=None, name=None, revision=None, state=None, url=None, visibility=None): super(TeamProjectReference, self).__init__() self.abbreviation = abbreviation self.default_team_image_url = default_team_image_url self.description = description self.id = id self.last_update_time = last_update_time self.name = name self.revision = revision self.state = state self.url = url self.visibility = visibility class WebApiTeamRef(Model): """ :param id: Team (Identity) Guid. A Team Foundation ID. :type id: str :param name: Team name :type name: str :param url: Team REST API Url :type url: str """ _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'} } def __init__(self, id=None, name=None, url=None): super(WebApiTeamRef, self).__init__() self.id = id self.name = name self.url = url class Operation(OperationReference): """ Contains information about the progress or result of an async operation. :param id: Unique identifier for the operation. :type id: str :param plugin_id: Unique identifier for the plugin. :type plugin_id: str :param status: The current status of the operation. :type status: object :param url: URL to get the full operation object. :type url: str :param _links: Links to other related objects. :type _links: :class:`ReferenceLinks <azure.devops.v7_1.microsoft._visual_studio._services._web_api.models.ReferenceLinks>` :param detailed_message: Detailed messaged about the status of an operation. :type detailed_message: str :param result_message: Result message for an operation. :type result_message: str :param result_url: URL to the operation result. :type result_url: :class:`OperationResultReference <azure.devops.v7_1.microsoft._visual_studio._services._web_api.models.OperationResultReference>` """ _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'plugin_id': {'key': 'pluginId', 'type': 'str'}, 'status': {'key': 'status', 'type': 'object'}, 'url': {'key': 'url', 'type': 'str'}, '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'detailed_message': {'key': 'detailedMessage', 'type': 'str'}, 'result_message': {'key': 'resultMessage', 'type': 'str'}, 'result_url': {'key': 'resultUrl', 'type': 'OperationResultReference'} } def __init__(self, id=None, plugin_id=None, status=None, url=None, _links=None, detailed_message=None, result_message=None, result_url=None): super(Operation, self).__init__(id=id, plugin_id=plugin_id, status=status, url=url) self._links = _links self.detailed_message = detailed_message self.result_message = result_message self.result_url = result_url class TeamProject(TeamProjectReference): """ Represents a Team Project object. :param abbreviation: Project abbreviation. :type abbreviation: str :param default_team_image_url: Url to default team identity image. :type default_team_image_url: str :param description: The project's description (if any). :type description: str :param id: Project identifier. :type id: str :param last_update_time: Project last update time. :type last_update_time: datetime :param name: Project name. :type name: str :param revision: Project revision. :type revision: long :param state: Project state. :type state: object :param url: Url to the full version of the object. :type url: str :param visibility: Project visibility. :type visibility: object :param _links: The links to other objects related to this object. :type _links: :class:`ReferenceLinks <azure.devops.v7_1.microsoft._team_foundation._core._web_api.models.ReferenceLinks>` :param capabilities: Set of capabilities this project has (such as process template & version control). :type capabilities: dict :param default_team: The shallow ref to the default team. :type default_team: :class:`WebApiTeamRef <azure.devops.v7_1.microsoft._team_foundation._core._web_api.models.WebApiTeamRef>` """ _attribute_map = { 'abbreviation': {'key': 'abbreviation', 'type': 'str'}, 'default_team_image_url': {'key': 'defaultTeamImageUrl', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'last_update_time': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, 'name': {'key': 'name', 'type': 'str'}, 'revision': {'key': 'revision', 'type': 'long'}, 'state': {'key': 'state', 'type': 'object'}, 'url': {'key': 'url', 'type': 'str'}, 'visibility': {'key': 'visibility', 'type': 'object'}, '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'capabilities': {'key': 'capabilities', 'type': '{{str}}'}, 'default_team': {'key': 'defaultTeam', 'type': 'WebApiTeamRef'} } def __init__(self, abbreviation=None, default_team_image_url=None, description=None, id=None, last_update_time=None, name=None, revision=None, state=None, url=None, visibility=None, _links=None, capabilities=None, default_team=None): super(TeamProject, self).__init__(abbreviation=abbreviation, default_team_image_url=default_team_image_url, description=description, id=id, last_update_time=last_update_time, name=name, revision=revision, state=state, url=url, visibility=visibility) self._links = _links self.capabilities = capabilities self.default_team = default_team __all__ = [ 'ConfigurationFile', 'CreatedResources', 'CreatePipelineConnectionInputs', 'DetectedBuildFramework', 'DetectedBuildTarget', 'OperationReference', 'OperationResultReference', 'PipelineConnection', 'ReferenceLinks', 'ResourceCreationParameter', 'TeamProjectReference', 'WebApiTeamRef', 'Operation', 'TeamProject', ]
azure-devops-python-api/azure-devops/azure/devops/v7_1/cix/models.py/0
{ "file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/cix/models.py", "repo_id": "azure-devops-python-api", "token_count": 6158 }
367
ο»Ώ# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- # Generated file, DO NOT EDIT # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- from msrest.serialization import Model class CopyDashboardOptions(Model): """ Copy options of a Dashboard. :param copy_dashboard_scope: Dashboard Scope. Can be either Project or Project_Team :type copy_dashboard_scope: object :param copy_queries_flag: When this flag is set to true,option to select the folder to copy Queries of copy dashboard will appear. :type copy_queries_flag: bool :param description: Description of the dashboard :type description: str :param name: Name of the dashboard :type name: str :param project_id: ID of the project. Provided by service at creation time. :type project_id: str :param query_folder_path: Path to which the queries should be copied of copy dashboard :type query_folder_path: str :param refresh_interval: Refresh interval of dashboard :type refresh_interval: int :param team_id: ID of the team. Provided by service at creation time :type team_id: str """ _attribute_map = { 'copy_dashboard_scope': {'key': 'copyDashboardScope', 'type': 'object'}, 'copy_queries_flag': {'key': 'copyQueriesFlag', 'type': 'bool'}, 'description': {'key': 'description', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'project_id': {'key': 'projectId', 'type': 'str'}, 'query_folder_path': {'key': 'queryFolderPath', 'type': 'str'}, 'refresh_interval': {'key': 'refreshInterval', 'type': 'int'}, 'team_id': {'key': 'teamId', 'type': 'str'} } def __init__(self, copy_dashboard_scope=None, copy_queries_flag=None, description=None, name=None, project_id=None, query_folder_path=None, refresh_interval=None, team_id=None): super(CopyDashboardOptions, self).__init__() self.copy_dashboard_scope = copy_dashboard_scope self.copy_queries_flag = copy_queries_flag self.description = description self.name = name self.project_id = project_id self.query_folder_path = query_folder_path self.refresh_interval = refresh_interval self.team_id = team_id class CopyDashboardResponse(Model): """ :param copied_dashboard: Copied Dashboard :type copied_dashboard: :class:`Dashboard <azure.devops.v7_1.dashboard.models.Dashboard>` :param copy_dashboard_options: Copy Dashboard options :type copy_dashboard_options: :class:`CopyDashboardOptions <azure.devops.v7_1.dashboard.models.CopyDashboardOptions>` """ _attribute_map = { 'copied_dashboard': {'key': 'copiedDashboard', 'type': 'Dashboard'}, 'copy_dashboard_options': {'key': 'copyDashboardOptions', 'type': 'CopyDashboardOptions'} } def __init__(self, copied_dashboard=None, copy_dashboard_options=None): super(CopyDashboardResponse, self).__init__() self.copied_dashboard = copied_dashboard self.copy_dashboard_options = copy_dashboard_options class Dashboard(Model): """ Model of a Dashboard. :param _links: :type _links: :class:`ReferenceLinks <azure.devops.v7_1.dashboard.models.ReferenceLinks>` :param dashboard_scope: Entity to which the dashboard is scoped. :type dashboard_scope: object :param description: Description of the dashboard. :type description: str :param eTag: Server defined version tracking value, used for edit collision detection. :type eTag: str :param group_id: ID of the group for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards this property is empty. :type group_id: str :param id: ID of the Dashboard. Provided by service at creation time. :type id: str :param last_accessed_date: Dashboard Last Accessed Date. :type last_accessed_date: datetime :param modified_by: Id of the person who modified Dashboard. :type modified_by: str :param modified_date: Dashboard's last modified date. :type modified_date: datetime :param name: Name of the Dashboard. :type name: str :param owner_id: ID of the owner for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards, this is the unique identifier for the user identity associated with the dashboard. :type owner_id: str :param position: Position of the dashboard, within a dashboard group. If unset at creation time, position is decided by the service. :type position: int :param refresh_interval: Interval for client to automatically refresh the dashboard. Expressed in minutes. :type refresh_interval: int :param url: :type url: str :param widgets: The set of Widgets on the dashboard. :type widgets: list of :class:`Widget <azure.devops.v7_1.dashboard.models.Widget>` """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'dashboard_scope': {'key': 'dashboardScope', 'type': 'object'}, 'description': {'key': 'description', 'type': 'str'}, 'eTag': {'key': 'eTag', 'type': 'str'}, 'group_id': {'key': 'groupId', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'last_accessed_date': {'key': 'lastAccessedDate', 'type': 'iso-8601'}, 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, 'name': {'key': 'name', 'type': 'str'}, 'owner_id': {'key': 'ownerId', 'type': 'str'}, 'position': {'key': 'position', 'type': 'int'}, 'refresh_interval': {'key': 'refreshInterval', 'type': 'int'}, 'url': {'key': 'url', 'type': 'str'}, 'widgets': {'key': 'widgets', 'type': '[Widget]'} } def __init__(self, _links=None, dashboard_scope=None, description=None, eTag=None, group_id=None, id=None, last_accessed_date=None, modified_by=None, modified_date=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): super(Dashboard, self).__init__() self._links = _links self.dashboard_scope = dashboard_scope self.description = description self.eTag = eTag self.group_id = group_id self.id = id self.last_accessed_date = last_accessed_date self.modified_by = modified_by self.modified_date = modified_date self.name = name self.owner_id = owner_id self.position = position self.refresh_interval = refresh_interval self.url = url self.widgets = widgets class DashboardGroup(Model): """ Describes a list of dashboards associated to an owner. Currently, teams own dashboard groups. :param _links: :type _links: :class:`ReferenceLinks <azure.devops.v7_1.dashboard.models.ReferenceLinks>` :param dashboard_entries: A list of Dashboards held by the Dashboard Group :type dashboard_entries: list of :class:`DashboardGroupEntry <azure.devops.v7_1.dashboard.models.DashboardGroupEntry>` :param permission: Deprecated: The old permission model describing the level of permissions for the current team. Pre-M125. :type permission: object :param team_dashboard_permission: A permissions bit mask describing the security permissions of the current team for dashboards. When this permission is the value None, use GroupMemberPermission. Permissions are evaluated based on the presence of a value other than None, else the GroupMemberPermission will be saved. :type team_dashboard_permission: object :param url: :type url: str """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'dashboard_entries': {'key': 'dashboardEntries', 'type': '[DashboardGroupEntry]'}, 'permission': {'key': 'permission', 'type': 'object'}, 'team_dashboard_permission': {'key': 'teamDashboardPermission', 'type': 'object'}, 'url': {'key': 'url', 'type': 'str'} } def __init__(self, _links=None, dashboard_entries=None, permission=None, team_dashboard_permission=None, url=None): super(DashboardGroup, self).__init__() self._links = _links self.dashboard_entries = dashboard_entries self.permission = permission self.team_dashboard_permission = team_dashboard_permission self.url = url class DashboardGroupEntry(Dashboard): """ Dashboard group entry, wrapping around Dashboard (needed?) :param _links: :type _links: :class:`ReferenceLinks <azure.devops.v7_1.dashboard.models.ReferenceLinks>` :param dashboard_scope: Entity to which the dashboard is scoped. :type dashboard_scope: object :param description: Description of the dashboard. :type description: str :param eTag: Server defined version tracking value, used for edit collision detection. :type eTag: str :param group_id: ID of the group for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards this property is empty. :type group_id: str :param id: ID of the Dashboard. Provided by service at creation time. :type id: str :param last_accessed_date: Dashboard Last Accessed Date. :type last_accessed_date: datetime :param modified_by: Id of the person who modified Dashboard. :type modified_by: str :param modified_date: Dashboard's last modified date. :type modified_date: datetime :param name: Name of the Dashboard. :type name: str :param owner_id: ID of the owner for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards, this is the unique identifier for the user identity associated with the dashboard. :type owner_id: str :param position: Position of the dashboard, within a dashboard group. If unset at creation time, position is decided by the service. :type position: int :param refresh_interval: Interval for client to automatically refresh the dashboard. Expressed in minutes. :type refresh_interval: int :param url: :type url: str :param widgets: The set of Widgets on the dashboard. :type widgets: list of :class:`Widget <azure.devops.v7_1.dashboard.models.Widget>` """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'dashboard_scope': {'key': 'dashboardScope', 'type': 'object'}, 'description': {'key': 'description', 'type': 'str'}, 'eTag': {'key': 'eTag', 'type': 'str'}, 'group_id': {'key': 'groupId', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'last_accessed_date': {'key': 'lastAccessedDate', 'type': 'iso-8601'}, 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, 'name': {'key': 'name', 'type': 'str'}, 'owner_id': {'key': 'ownerId', 'type': 'str'}, 'position': {'key': 'position', 'type': 'int'}, 'refresh_interval': {'key': 'refreshInterval', 'type': 'int'}, 'url': {'key': 'url', 'type': 'str'}, 'widgets': {'key': 'widgets', 'type': '[Widget]'}, } def __init__(self, _links=None, dashboard_scope=None, description=None, eTag=None, group_id=None, id=None, last_accessed_date=None, modified_by=None, modified_date=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): super(DashboardGroupEntry, self).__init__(_links=_links, dashboard_scope=dashboard_scope, description=description, eTag=eTag, group_id=group_id, id=id, last_accessed_date=last_accessed_date, modified_by=modified_by, modified_date=modified_date, name=name, owner_id=owner_id, position=position, refresh_interval=refresh_interval, url=url, widgets=widgets) class DashboardGroupEntryResponse(DashboardGroupEntry): """ Response from RestAPI when saving and editing DashboardGroupEntry :param _links: :type _links: :class:`ReferenceLinks <azure.devops.v7_1.dashboard.models.ReferenceLinks>` :param dashboard_scope: Entity to which the dashboard is scoped. :type dashboard_scope: object :param description: Description of the dashboard. :type description: str :param eTag: Server defined version tracking value, used for edit collision detection. :type eTag: str :param group_id: ID of the group for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards this property is empty. :type group_id: str :param id: ID of the Dashboard. Provided by service at creation time. :type id: str :param last_accessed_date: Dashboard Last Accessed Date. :type last_accessed_date: datetime :param modified_by: Id of the person who modified Dashboard. :type modified_by: str :param modified_date: Dashboard's last modified date. :type modified_date: datetime :param name: Name of the Dashboard. :type name: str :param owner_id: ID of the owner for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards, this is the unique identifier for the user identity associated with the dashboard. :type owner_id: str :param position: Position of the dashboard, within a dashboard group. If unset at creation time, position is decided by the service. :type position: int :param refresh_interval: Interval for client to automatically refresh the dashboard. Expressed in minutes. :type refresh_interval: int :param url: :type url: str :param widgets: The set of Widgets on the dashboard. :type widgets: list of :class:`Widget <azure.devops.v7_1.dashboard.models.Widget>` """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'dashboard_scope': {'key': 'dashboardScope', 'type': 'object'}, 'description': {'key': 'description', 'type': 'str'}, 'eTag': {'key': 'eTag', 'type': 'str'}, 'group_id': {'key': 'groupId', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'last_accessed_date': {'key': 'lastAccessedDate', 'type': 'iso-8601'}, 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, 'name': {'key': 'name', 'type': 'str'}, 'owner_id': {'key': 'ownerId', 'type': 'str'}, 'position': {'key': 'position', 'type': 'int'}, 'refresh_interval': {'key': 'refreshInterval', 'type': 'int'}, 'url': {'key': 'url', 'type': 'str'}, 'widgets': {'key': 'widgets', 'type': '[Widget]'}, } def __init__(self, _links=None, dashboard_scope=None, description=None, eTag=None, group_id=None, id=None, last_accessed_date=None, modified_by=None, modified_date=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): super(DashboardGroupEntryResponse, self).__init__(_links=_links, dashboard_scope=dashboard_scope, description=description, eTag=eTag, group_id=group_id, id=id, last_accessed_date=last_accessed_date, modified_by=modified_by, modified_date=modified_date, name=name, owner_id=owner_id, position=position, refresh_interval=refresh_interval, url=url, widgets=widgets) class DashboardResponse(DashboardGroupEntry): """ :param _links: :type _links: :class:`ReferenceLinks <azure.devops.v7_1.dashboard.models.ReferenceLinks>` :param dashboard_scope: Entity to which the dashboard is scoped. :type dashboard_scope: object :param description: Description of the dashboard. :type description: str :param eTag: Server defined version tracking value, used for edit collision detection. :type eTag: str :param group_id: ID of the group for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards this property is empty. :type group_id: str :param id: ID of the Dashboard. Provided by service at creation time. :type id: str :param last_accessed_date: Dashboard Last Accessed Date. :type last_accessed_date: datetime :param modified_by: Id of the person who modified Dashboard. :type modified_by: str :param modified_date: Dashboard's last modified date. :type modified_date: datetime :param name: Name of the Dashboard. :type name: str :param owner_id: ID of the owner for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards, this is the unique identifier for the user identity associated with the dashboard. :type owner_id: str :param position: Position of the dashboard, within a dashboard group. If unset at creation time, position is decided by the service. :type position: int :param refresh_interval: Interval for client to automatically refresh the dashboard. Expressed in minutes. :type refresh_interval: int :param url: :type url: str :param widgets: The set of Widgets on the dashboard. :type widgets: list of :class:`Widget <azure.devops.v7_1.dashboard.models.Widget>` """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'dashboard_scope': {'key': 'dashboardScope', 'type': 'object'}, 'description': {'key': 'description', 'type': 'str'}, 'eTag': {'key': 'eTag', 'type': 'str'}, 'group_id': {'key': 'groupId', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'last_accessed_date': {'key': 'lastAccessedDate', 'type': 'iso-8601'}, 'modified_by': {'key': 'modifiedBy', 'type': 'str'}, 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, 'name': {'key': 'name', 'type': 'str'}, 'owner_id': {'key': 'ownerId', 'type': 'str'}, 'position': {'key': 'position', 'type': 'int'}, 'refresh_interval': {'key': 'refreshInterval', 'type': 'int'}, 'url': {'key': 'url', 'type': 'str'}, 'widgets': {'key': 'widgets', 'type': '[Widget]'}, } def __init__(self, _links=None, dashboard_scope=None, description=None, eTag=None, group_id=None, id=None, last_accessed_date=None, modified_by=None, modified_date=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): super(DashboardResponse, self).__init__(_links=_links, dashboard_scope=dashboard_scope, description=description, eTag=eTag, group_id=group_id, id=id, last_accessed_date=last_accessed_date, modified_by=modified_by, modified_date=modified_date, name=name, owner_id=owner_id, position=position, refresh_interval=refresh_interval, url=url, widgets=widgets) class LightboxOptions(Model): """ Lightbox configuration :param height: Height of desired lightbox, in pixels :type height: int :param resizable: True to allow lightbox resizing, false to disallow lightbox resizing, defaults to false. :type resizable: bool :param width: Width of desired lightbox, in pixels :type width: int """ _attribute_map = { 'height': {'key': 'height', 'type': 'int'}, 'resizable': {'key': 'resizable', 'type': 'bool'}, 'width': {'key': 'width', 'type': 'int'} } def __init__(self, height=None, resizable=None, width=None): super(LightboxOptions, self).__init__() self.height = height self.resizable = resizable self.width = width class ReferenceLinks(Model): """ The class to represent a collection of REST reference links. :param links: The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only. :type links: dict """ _attribute_map = { 'links': {'key': 'links', 'type': '{object}'} } def __init__(self, links=None): super(ReferenceLinks, self).__init__() self.links = links class SemanticVersion(Model): """ versioning for an artifact as described at: http://semver.org/, of the form major.minor.patch. :param major: Major version when you make incompatible API changes :type major: int :param minor: Minor version when you add functionality in a backwards-compatible manner :type minor: int :param patch: Patch version when you make backwards-compatible bug fixes :type patch: int """ _attribute_map = { 'major': {'key': 'major', 'type': 'int'}, 'minor': {'key': 'minor', 'type': 'int'}, 'patch': {'key': 'patch', 'type': 'int'} } def __init__(self, major=None, minor=None, patch=None): super(SemanticVersion, self).__init__() self.major = major self.minor = minor self.patch = patch class TeamContext(Model): """ The Team Context for an operation. :param project: The team project Id or name. Ignored if ProjectId is set. :type project: str :param project_id: The Team Project ID. Required if Project is not set. :type project_id: str :param team: The Team Id or name. Ignored if TeamId is set. :type team: str :param team_id: The Team Id :type team_id: str """ _attribute_map = { 'project': {'key': 'project', 'type': 'str'}, 'project_id': {'key': 'projectId', 'type': 'str'}, 'team': {'key': 'team', 'type': 'str'}, 'team_id': {'key': 'teamId', 'type': 'str'} } def __init__(self, project=None, project_id=None, team=None, team_id=None): super(TeamContext, self).__init__() self.project = project self.project_id = project_id self.team = team self.team_id = team_id class Widget(Model): """ Widget data :param _links: :type _links: :class:`ReferenceLinks <azure.devops.v7_1.dashboard.models.ReferenceLinks>` :param allowed_sizes: Refers to the allowed sizes for the widget. This gets populated when user wants to configure the widget :type allowed_sizes: list of :class:`WidgetSize <azure.devops.v7_1.dashboard.models.WidgetSize>` :param are_settings_blocked_for_user: Read-Only Property from Dashboard Service. Indicates if settings are blocked for the current user. :type are_settings_blocked_for_user: bool :param artifact_id: Refers to unique identifier of a feature artifact. Used for pinning+unpinning a specific artifact. :type artifact_id: str :param configuration_contribution_id: :type configuration_contribution_id: str :param configuration_contribution_relative_id: :type configuration_contribution_relative_id: str :param content_uri: :type content_uri: str :param contribution_id: The id of the underlying contribution defining the supplied Widget Configuration. :type contribution_id: str :param dashboard: Optional partial dashboard content, to support exchanging dashboard-level version ETag for widget-level APIs :type dashboard: :class:`Dashboard <azure.devops.v7_1.dashboard.models.Dashboard>` :param eTag: :type eTag: str :param id: :type id: str :param is_enabled: :type is_enabled: bool :param is_name_configurable: :type is_name_configurable: bool :param lightbox_options: :type lightbox_options: :class:`LightboxOptions <azure.devops.v7_1.dashboard.models.LightboxOptions>` :param loading_image_url: :type loading_image_url: str :param name: :type name: str :param position: :type position: :class:`WidgetPosition <azure.devops.v7_1.dashboard.models.WidgetPosition>` :param settings: :type settings: str :param settings_version: :type settings_version: :class:`SemanticVersion <azure.devops.v7_1.dashboard.models.SemanticVersion>` :param size: :type size: :class:`WidgetSize <azure.devops.v7_1.dashboard.models.WidgetSize>` :param type_id: :type type_id: str :param url: :type url: str """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'allowed_sizes': {'key': 'allowedSizes', 'type': '[WidgetSize]'}, 'are_settings_blocked_for_user': {'key': 'areSettingsBlockedForUser', 'type': 'bool'}, 'artifact_id': {'key': 'artifactId', 'type': 'str'}, 'configuration_contribution_id': {'key': 'configurationContributionId', 'type': 'str'}, 'configuration_contribution_relative_id': {'key': 'configurationContributionRelativeId', 'type': 'str'}, 'content_uri': {'key': 'contentUri', 'type': 'str'}, 'contribution_id': {'key': 'contributionId', 'type': 'str'}, 'dashboard': {'key': 'dashboard', 'type': 'Dashboard'}, 'eTag': {'key': 'eTag', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, 'is_name_configurable': {'key': 'isNameConfigurable', 'type': 'bool'}, 'lightbox_options': {'key': 'lightboxOptions', 'type': 'LightboxOptions'}, 'loading_image_url': {'key': 'loadingImageUrl', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'position': {'key': 'position', 'type': 'WidgetPosition'}, 'settings': {'key': 'settings', 'type': 'str'}, 'settings_version': {'key': 'settingsVersion', 'type': 'SemanticVersion'}, 'size': {'key': 'size', 'type': 'WidgetSize'}, 'type_id': {'key': 'typeId', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'} } def __init__(self, _links=None, allowed_sizes=None, are_settings_blocked_for_user=None, artifact_id=None, configuration_contribution_id=None, configuration_contribution_relative_id=None, content_uri=None, contribution_id=None, dashboard=None, eTag=None, id=None, is_enabled=None, is_name_configurable=None, lightbox_options=None, loading_image_url=None, name=None, position=None, settings=None, settings_version=None, size=None, type_id=None, url=None): super(Widget, self).__init__() self._links = _links self.allowed_sizes = allowed_sizes self.are_settings_blocked_for_user = are_settings_blocked_for_user self.artifact_id = artifact_id self.configuration_contribution_id = configuration_contribution_id self.configuration_contribution_relative_id = configuration_contribution_relative_id self.content_uri = content_uri self.contribution_id = contribution_id self.dashboard = dashboard self.eTag = eTag self.id = id self.is_enabled = is_enabled self.is_name_configurable = is_name_configurable self.lightbox_options = lightbox_options self.loading_image_url = loading_image_url self.name = name self.position = position self.settings = settings self.settings_version = settings_version self.size = size self.type_id = type_id self.url = url class WidgetMetadata(Model): """ Contribution based information describing Dashboard Widgets. :param allowed_sizes: Sizes supported by the Widget. :type allowed_sizes: list of :class:`WidgetSize <azure.devops.v7_1.dashboard.models.WidgetSize>` :param analytics_service_required: Opt-in boolean that indicates if the widget requires the Analytics Service to function. Widgets requiring the analytics service are hidden from the catalog if the Analytics Service is not available. :type analytics_service_required: bool :param catalog_icon_url: Resource for an icon in the widget catalog. :type catalog_icon_url: str :param catalog_info_url: Opt-in URL string pointing at widget information. Defaults to extension marketplace URL if omitted :type catalog_info_url: str :param configuration_contribution_id: The id of the underlying contribution defining the supplied Widget custom configuration UI. Null if custom configuration UI is not available. :type configuration_contribution_id: str :param configuration_contribution_relative_id: The relative id of the underlying contribution defining the supplied Widget custom configuration UI. Null if custom configuration UI is not available. :type configuration_contribution_relative_id: str :param configuration_required: Indicates if the widget requires configuration before being added to dashboard. :type configuration_required: bool :param content_uri: Uri for the widget content to be loaded from . :type content_uri: str :param contribution_id: The id of the underlying contribution defining the supplied Widget. :type contribution_id: str :param default_settings: Optional default settings to be copied into widget settings. :type default_settings: str :param description: Summary information describing the widget. :type description: str :param is_enabled: Widgets can be disabled by the app store. We'll need to gracefully handle for: - persistence (Allow) - Requests (Tag as disabled, and provide context) :type is_enabled: bool :param is_name_configurable: Opt-out boolean that indicates if the widget supports widget name/title configuration. Widgets ignoring the name should set it to false in the manifest. :type is_name_configurable: bool :param is_visible_from_catalog: Opt-out boolean indicating if the widget is hidden from the catalog. Commonly, this is used to allow developers to disable creation of a deprecated widget. A widget must have a functional default state, or have a configuration experience, in order to be visible from the catalog. :type is_visible_from_catalog: bool :param keywords: Keywords associated with this widget, non-filterable and invisible :type keywords: list of str :param lightbox_options: Opt-in properties for customizing widget presentation in a "lightbox" dialog. :type lightbox_options: :class:`LightboxOptions <azure.devops.v7_1.dashboard.models.LightboxOptions>` :param loading_image_url: Resource for a loading placeholder image on dashboard :type loading_image_url: str :param name: User facing name of the widget type. Each widget must use a unique value here. :type name: str :param publisher_name: Publisher Name of this kind of widget. :type publisher_name: str :param supported_scopes: Data contract required for the widget to function and to work in its container. :type supported_scopes: list of WidgetScope :param tags: Tags associated with this widget, visible on each widget and filterable. :type tags: list of str :param targets: Contribution target IDs :type targets: list of str :param type_id: Deprecated: locally unique developer-facing id of this kind of widget. ContributionId provides a globally unique identifier for widget types. :type type_id: str """ _attribute_map = { 'allowed_sizes': {'key': 'allowedSizes', 'type': '[WidgetSize]'}, 'analytics_service_required': {'key': 'analyticsServiceRequired', 'type': 'bool'}, 'catalog_icon_url': {'key': 'catalogIconUrl', 'type': 'str'}, 'catalog_info_url': {'key': 'catalogInfoUrl', 'type': 'str'}, 'configuration_contribution_id': {'key': 'configurationContributionId', 'type': 'str'}, 'configuration_contribution_relative_id': {'key': 'configurationContributionRelativeId', 'type': 'str'}, 'configuration_required': {'key': 'configurationRequired', 'type': 'bool'}, 'content_uri': {'key': 'contentUri', 'type': 'str'}, 'contribution_id': {'key': 'contributionId', 'type': 'str'}, 'default_settings': {'key': 'defaultSettings', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, 'is_name_configurable': {'key': 'isNameConfigurable', 'type': 'bool'}, 'is_visible_from_catalog': {'key': 'isVisibleFromCatalog', 'type': 'bool'}, 'keywords': {'key': 'keywords', 'type': '[str]'}, 'lightbox_options': {'key': 'lightboxOptions', 'type': 'LightboxOptions'}, 'loading_image_url': {'key': 'loadingImageUrl', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'publisher_name': {'key': 'publisherName', 'type': 'str'}, 'supported_scopes': {'key': 'supportedScopes', 'type': '[object]'}, 'tags': {'key': 'tags', 'type': '[str]'}, 'targets': {'key': 'targets', 'type': '[str]'}, 'type_id': {'key': 'typeId', 'type': 'str'} } def __init__(self, allowed_sizes=None, analytics_service_required=None, catalog_icon_url=None, catalog_info_url=None, configuration_contribution_id=None, configuration_contribution_relative_id=None, configuration_required=None, content_uri=None, contribution_id=None, default_settings=None, description=None, is_enabled=None, is_name_configurable=None, is_visible_from_catalog=None, keywords=None, lightbox_options=None, loading_image_url=None, name=None, publisher_name=None, supported_scopes=None, tags=None, targets=None, type_id=None): super(WidgetMetadata, self).__init__() self.allowed_sizes = allowed_sizes self.analytics_service_required = analytics_service_required self.catalog_icon_url = catalog_icon_url self.catalog_info_url = catalog_info_url self.configuration_contribution_id = configuration_contribution_id self.configuration_contribution_relative_id = configuration_contribution_relative_id self.configuration_required = configuration_required self.content_uri = content_uri self.contribution_id = contribution_id self.default_settings = default_settings self.description = description self.is_enabled = is_enabled self.is_name_configurable = is_name_configurable self.is_visible_from_catalog = is_visible_from_catalog self.keywords = keywords self.lightbox_options = lightbox_options self.loading_image_url = loading_image_url self.name = name self.publisher_name = publisher_name self.supported_scopes = supported_scopes self.tags = tags self.targets = targets self.type_id = type_id class WidgetMetadataResponse(Model): """ :param uri: :type uri: str :param widget_metadata: :type widget_metadata: :class:`WidgetMetadata <azure.devops.v7_1.dashboard.models.WidgetMetadata>` """ _attribute_map = { 'uri': {'key': 'uri', 'type': 'str'}, 'widget_metadata': {'key': 'widgetMetadata', 'type': 'WidgetMetadata'} } def __init__(self, uri=None, widget_metadata=None): super(WidgetMetadataResponse, self).__init__() self.uri = uri self.widget_metadata = widget_metadata class WidgetPosition(Model): """ :param column: :type column: int :param row: :type row: int """ _attribute_map = { 'column': {'key': 'column', 'type': 'int'}, 'row': {'key': 'row', 'type': 'int'} } def __init__(self, column=None, row=None): super(WidgetPosition, self).__init__() self.column = column self.row = row class WidgetResponse(Widget): """ Response from RestAPI when saving and editing Widget :param _links: :type _links: :class:`ReferenceLinks <azure.devops.v7_1.dashboard.models.ReferenceLinks>` :param allowed_sizes: Refers to the allowed sizes for the widget. This gets populated when user wants to configure the widget :type allowed_sizes: list of :class:`WidgetSize <azure.devops.v7_1.dashboard.models.WidgetSize>` :param are_settings_blocked_for_user: Read-Only Property from Dashboard Service. Indicates if settings are blocked for the current user. :type are_settings_blocked_for_user: bool :param artifact_id: Refers to unique identifier of a feature artifact. Used for pinning+unpinning a specific artifact. :type artifact_id: str :param configuration_contribution_id: :type configuration_contribution_id: str :param configuration_contribution_relative_id: :type configuration_contribution_relative_id: str :param content_uri: :type content_uri: str :param contribution_id: The id of the underlying contribution defining the supplied Widget Configuration. :type contribution_id: str :param dashboard: Optional partial dashboard content, to support exchanging dashboard-level version ETag for widget-level APIs :type dashboard: :class:`Dashboard <azure.devops.v7_1.dashboard.models.Dashboard>` :param eTag: :type eTag: str :param id: :type id: str :param is_enabled: :type is_enabled: bool :param is_name_configurable: :type is_name_configurable: bool :param lightbox_options: :type lightbox_options: :class:`LightboxOptions <azure.devops.v7_1.dashboard.models.LightboxOptions>` :param loading_image_url: :type loading_image_url: str :param name: :type name: str :param position: :type position: :class:`WidgetPosition <azure.devops.v7_1.dashboard.models.WidgetPosition>` :param settings: :type settings: str :param settings_version: :type settings_version: :class:`SemanticVersion <azure.devops.v7_1.dashboard.models.SemanticVersion>` :param size: :type size: :class:`WidgetSize <azure.devops.v7_1.dashboard.models.WidgetSize>` :param type_id: :type type_id: str :param url: :type url: str """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'allowed_sizes': {'key': 'allowedSizes', 'type': '[WidgetSize]'}, 'are_settings_blocked_for_user': {'key': 'areSettingsBlockedForUser', 'type': 'bool'}, 'artifact_id': {'key': 'artifactId', 'type': 'str'}, 'configuration_contribution_id': {'key': 'configurationContributionId', 'type': 'str'}, 'configuration_contribution_relative_id': {'key': 'configurationContributionRelativeId', 'type': 'str'}, 'content_uri': {'key': 'contentUri', 'type': 'str'}, 'contribution_id': {'key': 'contributionId', 'type': 'str'}, 'dashboard': {'key': 'dashboard', 'type': 'Dashboard'}, 'eTag': {'key': 'eTag', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, 'is_name_configurable': {'key': 'isNameConfigurable', 'type': 'bool'}, 'lightbox_options': {'key': 'lightboxOptions', 'type': 'LightboxOptions'}, 'loading_image_url': {'key': 'loadingImageUrl', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'position': {'key': 'position', 'type': 'WidgetPosition'}, 'settings': {'key': 'settings', 'type': 'str'}, 'settings_version': {'key': 'settingsVersion', 'type': 'SemanticVersion'}, 'size': {'key': 'size', 'type': 'WidgetSize'}, 'type_id': {'key': 'typeId', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, } def __init__(self, _links=None, allowed_sizes=None, are_settings_blocked_for_user=None, artifact_id=None, configuration_contribution_id=None, configuration_contribution_relative_id=None, content_uri=None, contribution_id=None, dashboard=None, eTag=None, id=None, is_enabled=None, is_name_configurable=None, lightbox_options=None, loading_image_url=None, name=None, position=None, settings=None, settings_version=None, size=None, type_id=None, url=None): super(WidgetResponse, self).__init__(_links=_links, allowed_sizes=allowed_sizes, are_settings_blocked_for_user=are_settings_blocked_for_user, artifact_id=artifact_id, configuration_contribution_id=configuration_contribution_id, configuration_contribution_relative_id=configuration_contribution_relative_id, content_uri=content_uri, contribution_id=contribution_id, dashboard=dashboard, eTag=eTag, id=id, is_enabled=is_enabled, is_name_configurable=is_name_configurable, lightbox_options=lightbox_options, loading_image_url=loading_image_url, name=name, position=position, settings=settings, settings_version=settings_version, size=size, type_id=type_id, url=url) class WidgetSize(Model): """ :param column_span: The Width of the widget, expressed in dashboard grid columns. :type column_span: int :param row_span: The height of the widget, expressed in dashboard grid rows. :type row_span: int """ _attribute_map = { 'column_span': {'key': 'columnSpan', 'type': 'int'}, 'row_span': {'key': 'rowSpan', 'type': 'int'} } def __init__(self, column_span=None, row_span=None): super(WidgetSize, self).__init__() self.column_span = column_span self.row_span = row_span class WidgetsVersionedList(Model): """ Wrapper class to support HTTP header generation using CreateResponse, ClientHeaderParameter and ClientResponseType in WidgetV2Controller :param eTag: :type eTag: list of str :param widgets: :type widgets: list of :class:`Widget <azure.devops.v7_1.dashboard.models.Widget>` """ _attribute_map = { 'eTag': {'key': 'eTag', 'type': '[str]'}, 'widgets': {'key': 'widgets', 'type': '[Widget]'} } def __init__(self, eTag=None, widgets=None): super(WidgetsVersionedList, self).__init__() self.eTag = eTag self.widgets = widgets class WidgetTypesResponse(Model): """ :param _links: :type _links: :class:`ReferenceLinks <azure.devops.v7_1.dashboard.models.ReferenceLinks>` :param uri: :type uri: str :param widget_types: :type widget_types: list of :class:`WidgetMetadata <azure.devops.v7_1.dashboard.models.WidgetMetadata>` """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'uri': {'key': 'uri', 'type': 'str'}, 'widget_types': {'key': 'widgetTypes', 'type': '[WidgetMetadata]'} } def __init__(self, _links=None, uri=None, widget_types=None): super(WidgetTypesResponse, self).__init__() self._links = _links self.uri = uri self.widget_types = widget_types __all__ = [ 'CopyDashboardOptions', 'CopyDashboardResponse', 'Dashboard', 'DashboardGroup', 'DashboardGroupEntry', 'DashboardGroupEntryResponse', 'DashboardResponse', 'LightboxOptions', 'ReferenceLinks', 'SemanticVersion', 'TeamContext', 'Widget', 'WidgetMetadata', 'WidgetMetadataResponse', 'WidgetPosition', 'WidgetResponse', 'WidgetSize', 'WidgetsVersionedList', 'WidgetTypesResponse', ]
azure-devops-python-api/azure-devops/azure/devops/v7_1/dashboard/models.py/0
{ "file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/dashboard/models.py", "repo_id": "azure-devops-python-api", "token_count": 15597 }
368
ο»Ώ# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- # Generated file, DO NOT EDIT # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- from msrest import Serializer, Deserializer from ...client import Client from . import models class PolicyClient(Client): """Policy :param str base_url: Service URL :param Authentication creds: Authenticated credentials. """ def __init__(self, base_url=None, creds=None): super(PolicyClient, self).__init__(base_url, creds) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) resource_area_identifier = 'fb13a388-40dd-4a04-b530-013a739c72ef' def create_policy_configuration(self, configuration, project): """CreatePolicyConfiguration. [Preview API] Create a policy configuration of a given policy type. :param :class:`<PolicyConfiguration> <azure.devops.v7_1.policy.models.PolicyConfiguration>` configuration: The policy configuration to create. :param str project: Project ID or project name :rtype: :class:`<PolicyConfiguration> <azure.devops.v7_1.policy.models.PolicyConfiguration>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') content = self._serialize.body(configuration, 'PolicyConfiguration') response = self._send(http_method='POST', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', version='7.1-preview.1', route_values=route_values, content=content) return self._deserialize('PolicyConfiguration', response) def delete_policy_configuration(self, project, configuration_id): """DeletePolicyConfiguration. [Preview API] Delete a policy configuration by its ID. :param str project: Project ID or project name :param int configuration_id: ID of the policy configuration to delete. """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if configuration_id is not None: route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') self._send(http_method='DELETE', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', version='7.1-preview.1', route_values=route_values) def get_policy_configuration(self, project, configuration_id): """GetPolicyConfiguration. [Preview API] Get a policy configuration by its ID. :param str project: Project ID or project name :param int configuration_id: ID of the policy configuration :rtype: :class:`<PolicyConfiguration> <azure.devops.v7_1.policy.models.PolicyConfiguration>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if configuration_id is not None: route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') response = self._send(http_method='GET', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', version='7.1-preview.1', route_values=route_values) return self._deserialize('PolicyConfiguration', response) def get_policy_configurations(self, project, scope=None, top=None, continuation_token=None, policy_type=None): """GetPolicyConfigurations. [Preview API] Get a list of policy configurations in a project. :param str project: Project ID or project name :param str scope: [Provided for legacy reasons] The scope on which a subset of policies is defined. :param int top: Maximum number of policies to return. :param str continuation_token: The continuation token used for pagination. :param str policy_type: Filter returned policies to only this type :rtype: :class:`<[PolicyConfiguration]> <azure.devops.v7_1.policy.models.[PolicyConfiguration]>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if scope is not None: query_parameters['scope'] = self._serialize.query('scope', scope, 'str') if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') if continuation_token is not None: query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') if policy_type is not None: query_parameters['policyType'] = self._serialize.query('policy_type', policy_type, 'str') response = self._send(http_method='GET', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', version='7.1-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[PolicyConfiguration]', self._unwrap_collection(response)) def update_policy_configuration(self, configuration, project, configuration_id): """UpdatePolicyConfiguration. [Preview API] Update a policy configuration by its ID. :param :class:`<PolicyConfiguration> <azure.devops.v7_1.policy.models.PolicyConfiguration>` configuration: The policy configuration to update. :param str project: Project ID or project name :param int configuration_id: ID of the existing policy configuration to be updated. :rtype: :class:`<PolicyConfiguration> <azure.devops.v7_1.policy.models.PolicyConfiguration>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if configuration_id is not None: route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') content = self._serialize.body(configuration, 'PolicyConfiguration') response = self._send(http_method='PUT', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', version='7.1-preview.1', route_values=route_values, content=content) return self._deserialize('PolicyConfiguration', response) def get_policy_evaluation(self, project, evaluation_id): """GetPolicyEvaluation. [Preview API] Gets the present evaluation state of a policy. :param str project: Project ID or project name :param str evaluation_id: ID of the policy evaluation to be retrieved. :rtype: :class:`<PolicyEvaluationRecord> <azure.devops.v7_1.policy.models.PolicyEvaluationRecord>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if evaluation_id is not None: route_values['evaluationId'] = self._serialize.url('evaluation_id', evaluation_id, 'str') response = self._send(http_method='GET', location_id='46aecb7a-5d2c-4647-897b-0209505a9fe4', version='7.1-preview.1', route_values=route_values) return self._deserialize('PolicyEvaluationRecord', response) def requeue_policy_evaluation(self, project, evaluation_id): """RequeuePolicyEvaluation. [Preview API] Requeue the policy evaluation. :param str project: Project ID or project name :param str evaluation_id: ID of the policy evaluation to be retrieved. :rtype: :class:`<PolicyEvaluationRecord> <azure.devops.v7_1.policy.models.PolicyEvaluationRecord>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if evaluation_id is not None: route_values['evaluationId'] = self._serialize.url('evaluation_id', evaluation_id, 'str') response = self._send(http_method='PATCH', location_id='46aecb7a-5d2c-4647-897b-0209505a9fe4', version='7.1-preview.1', route_values=route_values) return self._deserialize('PolicyEvaluationRecord', response) def get_policy_evaluations(self, project, artifact_id, include_not_applicable=None, top=None, skip=None): """GetPolicyEvaluations. [Preview API] Retrieves a list of all the policy evaluation statuses for a specific pull request. :param str project: Project ID or project name :param str artifact_id: A string which uniquely identifies the target of a policy evaluation. :param bool include_not_applicable: Some policies might determine that they do not apply to a specific pull request. Setting this parameter to true will return evaluation records even for policies which don't apply to this pull request. :param int top: The number of policy evaluation records to retrieve. :param int skip: The number of policy evaluation records to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. :rtype: [PolicyEvaluationRecord] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if artifact_id is not None: query_parameters['artifactId'] = self._serialize.query('artifact_id', artifact_id, 'str') if include_not_applicable is not None: query_parameters['includeNotApplicable'] = self._serialize.query('include_not_applicable', include_not_applicable, 'bool') if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') if skip is not None: query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='c23ddff5-229c-4d04-a80b-0fdce9f360c8', version='7.1-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[PolicyEvaluationRecord]', self._unwrap_collection(response)) def get_policy_configuration_revision(self, project, configuration_id, revision_id): """GetPolicyConfigurationRevision. [Preview API] Retrieve a specific revision of a given policy by ID. :param str project: Project ID or project name :param int configuration_id: The policy configuration ID. :param int revision_id: The revision ID. :rtype: :class:`<PolicyConfiguration> <azure.devops.v7_1.policy.models.PolicyConfiguration>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if configuration_id is not None: route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') if revision_id is not None: route_values['revisionId'] = self._serialize.url('revision_id', revision_id, 'int') response = self._send(http_method='GET', location_id='fe1e68a2-60d3-43cb-855b-85e41ae97c95', version='7.1-preview.1', route_values=route_values) return self._deserialize('PolicyConfiguration', response) def get_policy_configuration_revisions(self, project, configuration_id, top=None, skip=None): """GetPolicyConfigurationRevisions. [Preview API] Retrieve all revisions for a given policy. :param str project: Project ID or project name :param int configuration_id: The policy configuration ID. :param int top: The number of revisions to retrieve. :param int skip: The number of revisions to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. :rtype: [PolicyConfiguration] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if configuration_id is not None: route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') if skip is not None: query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='fe1e68a2-60d3-43cb-855b-85e41ae97c95', version='7.1-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('[PolicyConfiguration]', self._unwrap_collection(response)) def get_policy_type(self, project, type_id): """GetPolicyType. [Preview API] Retrieve a specific policy type by ID. :param str project: Project ID or project name :param str type_id: The policy ID. :rtype: :class:`<PolicyType> <azure.devops.v7_1.policy.models.PolicyType>` """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') if type_id is not None: route_values['typeId'] = self._serialize.url('type_id', type_id, 'str') response = self._send(http_method='GET', location_id='44096322-2d3d-466a-bb30-d1b7de69f61f', version='7.1-preview.1', route_values=route_values) return self._deserialize('PolicyType', response) def get_policy_types(self, project): """GetPolicyTypes. [Preview API] Retrieve all available policy types. :param str project: Project ID or project name :rtype: [PolicyType] """ route_values = {} if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='44096322-2d3d-466a-bb30-d1b7de69f61f', version='7.1-preview.1', route_values=route_values) return self._deserialize('[PolicyType]', self._unwrap_collection(response))
azure-devops-python-api/azure-devops/azure/devops/v7_1/policy/policy_client.py/0
{ "file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/policy/policy_client.py", "repo_id": "azure-devops-python-api", "token_count": 6479 }
369
ο»Ώ# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- # Generated file, DO NOT EDIT # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- from .models import * from .release_client import ReleaseClient __all__ = [ 'AgentArtifactDefinition', 'ApprovalOptions', 'Artifact', 'ArtifactMetadata', 'ArtifactSourceReference', 'ArtifactTriggerConfiguration', 'ArtifactTypeDefinition', 'ArtifactVersion', 'ArtifactVersionQueryResult', 'AuthorizationHeader', 'AutoTriggerIssue', 'BuildVersion', 'ComplianceSettings', 'Condition', 'ConfigurationVariableValue', 'DataSourceBindingBase', 'DefinitionEnvironmentReference', 'Deployment', 'DeploymentAttempt', 'DeploymentJob', 'DeploymentQueryParameters', 'EmailRecipients', 'EnvironmentExecutionPolicy', 'EnvironmentOptions', 'EnvironmentRetentionPolicy', 'EnvironmentTrigger', 'FavoriteItem', 'Folder', 'GateUpdateMetadata', 'GraphSubjectBase', 'Change', 'IdentityRef', 'IgnoredGate', 'InputDescriptor', 'InputValidation', 'InputValue', 'InputValues', 'InputValuesError', 'InputValuesQuery', 'Issue', 'MailMessage', 'ManualIntervention', 'ManualInterventionUpdateMetadata', 'Metric', 'OrgPipelineReleaseSettings', 'OrgPipelineReleaseSettingsUpdateParameters', 'PipelineProcess', 'ProcessParameters', 'ProjectPipelineReleaseSettings', 'ProjectPipelineReleaseSettingsUpdateParameters', 'ProjectReference', 'QueuedReleaseData', 'ReferenceLinks', 'Release', 'ReleaseApproval', 'ReleaseApprovalHistory', 'ReleaseCondition', 'ReleaseDefinition', 'ReleaseDefinitionApprovals', 'ReleaseDefinitionApprovalStep', 'ReleaseDefinitionDeployStep', 'ReleaseDefinitionEnvironment', 'ReleaseDefinitionEnvironmentStep', 'ReleaseDefinitionEnvironmentSummary', 'ReleaseDefinitionEnvironmentTemplate', 'ReleaseDefinitionGate', 'ReleaseDefinitionGatesOptions', 'ReleaseDefinitionGatesStep', 'ReleaseDefinitionRevision', 'ReleaseDefinitionShallowReference', 'ReleaseDefinitionSummary', 'ReleaseDefinitionUndeleteParameter', 'ReleaseDeployPhase', 'ReleaseEnvironment', 'ReleaseEnvironmentShallowReference', 'ReleaseEnvironmentUpdateMetadata', 'ReleaseGates', 'ReleaseReference', 'ReleaseRevision', 'ReleaseSettings', 'ReleaseShallowReference', 'ReleaseSchedule', 'ReleaseStartEnvironmentMetadata', 'ReleaseStartMetadata', 'ReleaseTask', 'ReleaseTaskAttachment', 'ReleaseUpdateMetadata', 'ReleaseWorkItemRef', 'RetentionPolicy', 'RetentionSettings', 'SourcePullRequestVersion', 'SummaryMailSection', 'TaskInputDefinitionBase', 'TaskInputValidation', 'TaskSourceDefinitionBase', 'VariableGroup', 'VariableGroupProjectReference', 'VariableGroupProviderData', 'VariableValue', 'WorkflowTask', 'WorkflowTaskReference', 'ReleaseClient' ]
azure-devops-python-api/azure-devops/azure/devops/v7_1/release/__init__.py/0
{ "file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/release/__init__.py", "repo_id": "azure-devops-python-api", "token_count": 1068 }
370
ο»Ώ# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- # Generated file, DO NOT EDIT # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- from msrest.serialization import Model class Consumer(Model): """ Defines the data contract of a consumer. :param _links: Reference Links :type _links: :class:`ReferenceLinks <azure.devops.v7_1.service_hooks.models.ReferenceLinks>` :param actions: Gets this consumer's actions. :type actions: list of :class:`ConsumerAction <azure.devops.v7_1.service_hooks.models.ConsumerAction>` :param authentication_type: Gets or sets this consumer's authentication type. :type authentication_type: object :param description: Gets or sets this consumer's localized description. :type description: str :param external_configuration: Non-null only if subscriptions for this consumer are configured externally. :type external_configuration: :class:`ExternalConfigurationDescriptor <azure.devops.v7_1.service_hooks.models.ExternalConfigurationDescriptor>` :param id: Gets or sets this consumer's identifier. :type id: str :param image_url: Gets or sets this consumer's image URL, if any. :type image_url: str :param information_url: Gets or sets this consumer's information URL, if any. :type information_url: str :param input_descriptors: Gets or sets this consumer's input descriptors. :type input_descriptors: list of :class:`InputDescriptor <azure.devops.v7_1.service_hooks.models.InputDescriptor>` :param name: Gets or sets this consumer's localized name. :type name: str :param url: The url for this resource :type url: str """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'actions': {'key': 'actions', 'type': '[ConsumerAction]'}, 'authentication_type': {'key': 'authenticationType', 'type': 'object'}, 'description': {'key': 'description', 'type': 'str'}, 'external_configuration': {'key': 'externalConfiguration', 'type': 'ExternalConfigurationDescriptor'}, 'id': {'key': 'id', 'type': 'str'}, 'image_url': {'key': 'imageUrl', 'type': 'str'}, 'information_url': {'key': 'informationUrl', 'type': 'str'}, 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, 'name': {'key': 'name', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'} } def __init__(self, _links=None, actions=None, authentication_type=None, description=None, external_configuration=None, id=None, image_url=None, information_url=None, input_descriptors=None, name=None, url=None): super(Consumer, self).__init__() self._links = _links self.actions = actions self.authentication_type = authentication_type self.description = description self.external_configuration = external_configuration self.id = id self.image_url = image_url self.information_url = information_url self.input_descriptors = input_descriptors self.name = name self.url = url class ConsumerAction(Model): """ Defines the data contract of a consumer action. :param _links: Reference Links :type _links: :class:`ReferenceLinks <azure.devops.v7_1.service_hooks.models.ReferenceLinks>` :param allow_resource_version_override: Gets or sets the flag indicating if resource version can be overridden when creating or editing a subscription. :type allow_resource_version_override: bool :param consumer_id: Gets or sets the identifier of the consumer to which this action belongs. :type consumer_id: str :param description: Gets or sets this action's localized description. :type description: str :param id: Gets or sets this action's identifier. :type id: str :param input_descriptors: Gets or sets this action's input descriptors. :type input_descriptors: list of :class:`InputDescriptor <azure.devops.v7_1.service_hooks.models.InputDescriptor>` :param name: Gets or sets this action's localized name. :type name: str :param supported_event_types: Gets or sets this action's supported event identifiers. :type supported_event_types: list of str :param supported_resource_versions: Gets or sets this action's supported resource versions. :type supported_resource_versions: dict :param url: The url for this resource :type url: str """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'allow_resource_version_override': {'key': 'allowResourceVersionOverride', 'type': 'bool'}, 'consumer_id': {'key': 'consumerId', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, 'name': {'key': 'name', 'type': 'str'}, 'supported_event_types': {'key': 'supportedEventTypes', 'type': '[str]'}, 'supported_resource_versions': {'key': 'supportedResourceVersions', 'type': '{[str]}'}, 'url': {'key': 'url', 'type': 'str'} } def __init__(self, _links=None, allow_resource_version_override=None, consumer_id=None, description=None, id=None, input_descriptors=None, name=None, supported_event_types=None, supported_resource_versions=None, url=None): super(ConsumerAction, self).__init__() self._links = _links self.allow_resource_version_override = allow_resource_version_override self.consumer_id = consumer_id self.description = description self.id = id self.input_descriptors = input_descriptors self.name = name self.supported_event_types = supported_event_types self.supported_resource_versions = supported_resource_versions self.url = url class Event(Model): """ Encapsulates the properties of an event. :param created_date: Gets or sets the UTC-based date and time that this event was created. :type created_date: datetime :param detailed_message: Gets or sets the detailed message associated with this event. :type detailed_message: :class:`FormattedEventMessage <azure.devops.v7_1.service_hooks.models.FormattedEventMessage>` :param event_type: Gets or sets the type of this event. :type event_type: str :param id: Gets or sets the unique identifier of this event. :type id: str :param message: Gets or sets the (brief) message associated with this event. :type message: :class:`FormattedEventMessage <azure.devops.v7_1.service_hooks.models.FormattedEventMessage>` :param publisher_id: Gets or sets the identifier of the publisher that raised this event. :type publisher_id: str :param resource: Gets or sets the data associated with this event. :type resource: object :param resource_containers: Gets or sets the resource containers. :type resource_containers: dict :param resource_version: Gets or sets the version of the data associated with this event. :type resource_version: str :param session_token: Gets or sets the Session Token that can be used in further interactions :type session_token: :class:`SessionToken <azure.devops.v7_1.service_hooks.models.SessionToken>` """ _attribute_map = { 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, 'detailed_message': {'key': 'detailedMessage', 'type': 'FormattedEventMessage'}, 'event_type': {'key': 'eventType', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'message': {'key': 'message', 'type': 'FormattedEventMessage'}, 'publisher_id': {'key': 'publisherId', 'type': 'str'}, 'resource': {'key': 'resource', 'type': 'object'}, 'resource_containers': {'key': 'resourceContainers', 'type': '{ResourceContainer}'}, 'resource_version': {'key': 'resourceVersion', 'type': 'str'}, 'session_token': {'key': 'sessionToken', 'type': 'SessionToken'} } def __init__(self, created_date=None, detailed_message=None, event_type=None, id=None, message=None, publisher_id=None, resource=None, resource_containers=None, resource_version=None, session_token=None): super(Event, self).__init__() self.created_date = created_date self.detailed_message = detailed_message self.event_type = event_type self.id = id self.message = message self.publisher_id = publisher_id self.resource = resource self.resource_containers = resource_containers self.resource_version = resource_version self.session_token = session_token class EventTypeDescriptor(Model): """ Describes a type of event :param description: A localized description of the event type :type description: str :param id: A unique id for the event type :type id: str :param input_descriptors: Event-specific inputs :type input_descriptors: list of :class:`InputDescriptor <azure.devops.v7_1.service_hooks.models.InputDescriptor>` :param name: A localized friendly name for the event type :type name: str :param publisher_id: A unique id for the publisher of this event type :type publisher_id: str :param supported_resource_versions: Supported versions for the event's resource payloads. :type supported_resource_versions: list of str :param url: The url for this resource :type url: str """ _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, 'name': {'key': 'name', 'type': 'str'}, 'publisher_id': {'key': 'publisherId', 'type': 'str'}, 'supported_resource_versions': {'key': 'supportedResourceVersions', 'type': '[str]'}, 'url': {'key': 'url', 'type': 'str'} } def __init__(self, description=None, id=None, input_descriptors=None, name=None, publisher_id=None, supported_resource_versions=None, url=None): super(EventTypeDescriptor, self).__init__() self.description = description self.id = id self.input_descriptors = input_descriptors self.name = name self.publisher_id = publisher_id self.supported_resource_versions = supported_resource_versions self.url = url class ExternalConfigurationDescriptor(Model): """ Describes how to configure a subscription that is managed externally. :param create_subscription_url: Url of the site to create this type of subscription. :type create_subscription_url: str :param edit_subscription_property_name: The name of an input property that contains the URL to edit a subscription. :type edit_subscription_property_name: str :param hosted_only: True if the external configuration applies only to hosted. :type hosted_only: bool """ _attribute_map = { 'create_subscription_url': {'key': 'createSubscriptionUrl', 'type': 'str'}, 'edit_subscription_property_name': {'key': 'editSubscriptionPropertyName', 'type': 'str'}, 'hosted_only': {'key': 'hostedOnly', 'type': 'bool'} } def __init__(self, create_subscription_url=None, edit_subscription_property_name=None, hosted_only=None): super(ExternalConfigurationDescriptor, self).__init__() self.create_subscription_url = create_subscription_url self.edit_subscription_property_name = edit_subscription_property_name self.hosted_only = hosted_only class FormattedEventMessage(Model): """ Provides different formats of an event message :param html: Gets or sets the html format of the message :type html: str :param markdown: Gets or sets the markdown format of the message :type markdown: str :param text: Gets or sets the raw text of the message :type text: str """ _attribute_map = { 'html': {'key': 'html', 'type': 'str'}, 'markdown': {'key': 'markdown', 'type': 'str'}, 'text': {'key': 'text', 'type': 'str'} } def __init__(self, html=None, markdown=None, text=None): super(FormattedEventMessage, self).__init__() self.html = html self.markdown = markdown self.text = text class GraphSubjectBase(Model): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. :type _links: :class:`ReferenceLinks <azure.devops.v7_1.microsoft._visual_studio._services._web_api.models.ReferenceLinks>` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. :type display_name: str :param url: This url is the full route to the source resource of this graph subject. :type url: str """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'descriptor': {'key': 'descriptor', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'} } def __init__(self, _links=None, descriptor=None, display_name=None, url=None): super(GraphSubjectBase, self).__init__() self._links = _links self.descriptor = descriptor self.display_name = display_name self.url = url class IdentityRef(GraphSubjectBase): """ :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. :type _links: :class:`ReferenceLinks <azure.devops.v7_1.microsoft._visual_studio._services._web_api.models.ReferenceLinks>` :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. :type descriptor: str :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. :type display_name: str :param url: This url is the full route to the source resource of this graph subject. :type url: str :param directory_alias: Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary :type directory_alias: str :param id: :type id: str :param image_url: Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary :type image_url: str :param inactive: Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary :type inactive: bool :param is_aad_identity: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType) :type is_aad_identity: bool :param is_container: Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType) :type is_container: bool :param is_deleted_in_origin: :type is_deleted_in_origin: bool :param profile_url: Deprecated - not in use in most preexisting implementations of ToIdentityRef :type profile_url: str :param unique_name: Deprecated - use Domain+PrincipalName instead :type unique_name: str """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'descriptor': {'key': 'descriptor', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'image_url': {'key': 'imageUrl', 'type': 'str'}, 'inactive': {'key': 'inactive', 'type': 'bool'}, 'is_aad_identity': {'key': 'isAadIdentity', 'type': 'bool'}, 'is_container': {'key': 'isContainer', 'type': 'bool'}, 'is_deleted_in_origin': {'key': 'isDeletedInOrigin', 'type': 'bool'}, 'profile_url': {'key': 'profileUrl', 'type': 'str'}, 'unique_name': {'key': 'uniqueName', 'type': 'str'} } def __init__(self, _links=None, descriptor=None, display_name=None, url=None, directory_alias=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, is_deleted_in_origin=None, profile_url=None, unique_name=None): super(IdentityRef, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url) self.directory_alias = directory_alias self.id = id self.image_url = image_url self.inactive = inactive self.is_aad_identity = is_aad_identity self.is_container = is_container self.is_deleted_in_origin = is_deleted_in_origin self.profile_url = profile_url self.unique_name = unique_name class InputDescriptor(Model): """ Describes an input for subscriptions. :param dependency_input_ids: The ids of all inputs that the value of this input is dependent on. :type dependency_input_ids: list of str :param description: Description of what this input is used for :type description: str :param group_name: The group localized name to which this input belongs and can be shown as a header for the container that will include all the inputs in the group. :type group_name: str :param has_dynamic_value_information: If true, the value information for this input is dynamic and should be fetched when the value of dependency inputs change. :type has_dynamic_value_information: bool :param id: Identifier for the subscription input :type id: str :param input_mode: Mode in which the value of this input should be entered :type input_mode: object :param is_confidential: Gets whether this input is confidential, such as for a password or application key :type is_confidential: bool :param name: Localized name which can be shown as a label for the subscription input :type name: str :param properties: Custom properties for the input which can be used by the service provider :type properties: dict :param type: Underlying data type for the input value. When this value is specified, InputMode, Validation and Values are optional. :type type: str :param use_in_default_description: Gets whether this input is included in the default generated action description. :type use_in_default_description: bool :param validation: Information to use to validate this input's value :type validation: :class:`InputValidation <azure.devops.v7_1.microsoft._visual_studio._services._web_api.models.InputValidation>` :param value_hint: A hint for input value. It can be used in the UI as the input placeholder. :type value_hint: str :param values: Information about possible values for this input :type values: :class:`InputValues <azure.devops.v7_1.microsoft._visual_studio._services._web_api.models.InputValues>` """ _attribute_map = { 'dependency_input_ids': {'key': 'dependencyInputIds', 'type': '[str]'}, 'description': {'key': 'description', 'type': 'str'}, 'group_name': {'key': 'groupName', 'type': 'str'}, 'has_dynamic_value_information': {'key': 'hasDynamicValueInformation', 'type': 'bool'}, 'id': {'key': 'id', 'type': 'str'}, 'input_mode': {'key': 'inputMode', 'type': 'object'}, 'is_confidential': {'key': 'isConfidential', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, 'properties': {'key': 'properties', 'type': '{object}'}, 'type': {'key': 'type', 'type': 'str'}, 'use_in_default_description': {'key': 'useInDefaultDescription', 'type': 'bool'}, 'validation': {'key': 'validation', 'type': 'InputValidation'}, 'value_hint': {'key': 'valueHint', 'type': 'str'}, 'values': {'key': 'values', 'type': 'InputValues'} } def __init__(self, dependency_input_ids=None, description=None, group_name=None, has_dynamic_value_information=None, id=None, input_mode=None, is_confidential=None, name=None, properties=None, type=None, use_in_default_description=None, validation=None, value_hint=None, values=None): super(InputDescriptor, self).__init__() self.dependency_input_ids = dependency_input_ids self.description = description self.group_name = group_name self.has_dynamic_value_information = has_dynamic_value_information self.id = id self.input_mode = input_mode self.is_confidential = is_confidential self.name = name self.properties = properties self.type = type self.use_in_default_description = use_in_default_description self.validation = validation self.value_hint = value_hint self.values = values class InputFilter(Model): """ Defines a filter for subscription inputs. The filter matches a set of inputs if any (one or more) of the groups evaluates to true. :param conditions: Groups of input filter expressions. This filter matches a set of inputs if any (one or more) of the groups evaluates to true. :type conditions: list of :class:`InputFilterCondition <azure.devops.v7_1.microsoft._visual_studio._services._web_api.models.InputFilterCondition>` """ _attribute_map = { 'conditions': {'key': 'conditions', 'type': '[InputFilterCondition]'} } def __init__(self, conditions=None): super(InputFilter, self).__init__() self.conditions = conditions class InputFilterCondition(Model): """ An expression which can be applied to filter a list of subscription inputs :param case_sensitive: Whether or not to do a case sensitive match :type case_sensitive: bool :param input_id: The Id of the input to filter on :type input_id: str :param input_value: The "expected" input value to compare with the actual input value :type input_value: str :param operator: The operator applied between the expected and actual input value :type operator: object """ _attribute_map = { 'case_sensitive': {'key': 'caseSensitive', 'type': 'bool'}, 'input_id': {'key': 'inputId', 'type': 'str'}, 'input_value': {'key': 'inputValue', 'type': 'str'}, 'operator': {'key': 'operator', 'type': 'object'} } def __init__(self, case_sensitive=None, input_id=None, input_value=None, operator=None): super(InputFilterCondition, self).__init__() self.case_sensitive = case_sensitive self.input_id = input_id self.input_value = input_value self.operator = operator class InputValidation(Model): """ Describes what values are valid for a subscription input :param data_type: Gets or sets the data type to validate. :type data_type: object :param is_required: Gets or sets if this is a required field. :type is_required: bool :param max_length: Gets or sets the maximum length of this descriptor. :type max_length: int :param max_value: Gets or sets the minimum value for this descriptor. :type max_value: decimal :param min_length: Gets or sets the minimum length of this descriptor. :type min_length: int :param min_value: Gets or sets the minimum value for this descriptor. :type min_value: decimal :param pattern: Gets or sets the pattern to validate. :type pattern: str :param pattern_mismatch_error_message: Gets or sets the error on pattern mismatch. :type pattern_mismatch_error_message: str """ _attribute_map = { 'data_type': {'key': 'dataType', 'type': 'object'}, 'is_required': {'key': 'isRequired', 'type': 'bool'}, 'max_length': {'key': 'maxLength', 'type': 'int'}, 'max_value': {'key': 'maxValue', 'type': 'decimal'}, 'min_length': {'key': 'minLength', 'type': 'int'}, 'min_value': {'key': 'minValue', 'type': 'decimal'}, 'pattern': {'key': 'pattern', 'type': 'str'}, 'pattern_mismatch_error_message': {'key': 'patternMismatchErrorMessage', 'type': 'str'} } def __init__(self, data_type=None, is_required=None, max_length=None, max_value=None, min_length=None, min_value=None, pattern=None, pattern_mismatch_error_message=None): super(InputValidation, self).__init__() self.data_type = data_type self.is_required = is_required self.max_length = max_length self.max_value = max_value self.min_length = min_length self.min_value = min_value self.pattern = pattern self.pattern_mismatch_error_message = pattern_mismatch_error_message class InputValue(Model): """ Information about a single value for an input :param data: Any other data about this input :type data: dict :param display_value: The text to show for the display of this value :type display_value: str :param value: The value to store for this input :type value: str """ _attribute_map = { 'data': {'key': 'data', 'type': '{object}'}, 'display_value': {'key': 'displayValue', 'type': 'str'}, 'value': {'key': 'value', 'type': 'str'} } def __init__(self, data=None, display_value=None, value=None): super(InputValue, self).__init__() self.data = data self.display_value = display_value self.value = value class InputValues(Model): """ Information about the possible/allowed values for a given subscription input :param default_value: The default value to use for this input :type default_value: str :param error: Errors encountered while computing dynamic values. :type error: :class:`InputValuesError <azure.devops.v7_1.microsoft._visual_studio._services._web_api.models.InputValuesError>` :param input_id: The id of the input :type input_id: str :param is_disabled: Should this input be disabled :type is_disabled: bool :param is_limited_to_possible_values: Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False) :type is_limited_to_possible_values: bool :param is_read_only: Should this input be made read-only :type is_read_only: bool :param possible_values: Possible values that this input can take :type possible_values: list of :class:`InputValue <azure.devops.v7_1.microsoft._visual_studio._services._web_api.models.InputValue>` """ _attribute_map = { 'default_value': {'key': 'defaultValue', 'type': 'str'}, 'error': {'key': 'error', 'type': 'InputValuesError'}, 'input_id': {'key': 'inputId', 'type': 'str'}, 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, 'is_limited_to_possible_values': {'key': 'isLimitedToPossibleValues', 'type': 'bool'}, 'is_read_only': {'key': 'isReadOnly', 'type': 'bool'}, 'possible_values': {'key': 'possibleValues', 'type': '[InputValue]'} } def __init__(self, default_value=None, error=None, input_id=None, is_disabled=None, is_limited_to_possible_values=None, is_read_only=None, possible_values=None): super(InputValues, self).__init__() self.default_value = default_value self.error = error self.input_id = input_id self.is_disabled = is_disabled self.is_limited_to_possible_values = is_limited_to_possible_values self.is_read_only = is_read_only self.possible_values = possible_values class InputValuesError(Model): """ Error information related to a subscription input value. :param message: The error message. :type message: str """ _attribute_map = { 'message': {'key': 'message', 'type': 'str'} } def __init__(self, message=None): super(InputValuesError, self).__init__() self.message = message class InputValuesQuery(Model): """ :param current_values: :type current_values: dict :param input_values: The input values to return on input, and the result from the consumer on output. :type input_values: list of :class:`InputValues <azure.devops.v7_1.microsoft._visual_studio._services._web_api.models.InputValues>` :param resource: Subscription containing information about the publisher/consumer and the current input values :type resource: object """ _attribute_map = { 'current_values': {'key': 'currentValues', 'type': '{str}'}, 'input_values': {'key': 'inputValues', 'type': '[InputValues]'}, 'resource': {'key': 'resource', 'type': 'object'} } def __init__(self, current_values=None, input_values=None, resource=None): super(InputValuesQuery, self).__init__() self.current_values = current_values self.input_values = input_values self.resource = resource class Notification(Model): """ Defines the data contract of the result of processing an event for a subscription. :param created_date: Gets or sets date and time that this result was created. :type created_date: datetime :param details: Details about this notification (if available) :type details: :class:`NotificationDetails <azure.devops.v7_1.service_hooks.models.NotificationDetails>` :param event_id: The event id associated with this notification :type event_id: str :param id: The notification id :type id: int :param modified_date: Gets or sets date and time that this result was last modified. :type modified_date: datetime :param result: Result of the notification :type result: object :param status: Status of the notification :type status: object :param subscriber_id: The subscriber Id associated with this notification. This is the last identity who touched in the subscription. In case of test notifications it can be the tester if the subscription is not created yet. :type subscriber_id: str :param subscription_id: The subscription id associated with this notification :type subscription_id: str """ _attribute_map = { 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, 'details': {'key': 'details', 'type': 'NotificationDetails'}, 'event_id': {'key': 'eventId', 'type': 'str'}, 'id': {'key': 'id', 'type': 'int'}, 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, 'result': {'key': 'result', 'type': 'object'}, 'status': {'key': 'status', 'type': 'object'}, 'subscriber_id': {'key': 'subscriberId', 'type': 'str'}, 'subscription_id': {'key': 'subscriptionId', 'type': 'str'} } def __init__(self, created_date=None, details=None, event_id=None, id=None, modified_date=None, result=None, status=None, subscriber_id=None, subscription_id=None): super(Notification, self).__init__() self.created_date = created_date self.details = details self.event_id = event_id self.id = id self.modified_date = modified_date self.result = result self.status = status self.subscriber_id = subscriber_id self.subscription_id = subscription_id class NotificationDetails(Model): """ Defines the data contract of notification details. :param completed_date: Gets or sets the time that this notification was completed (response received from the consumer) :type completed_date: datetime :param consumer_action_id: Gets or sets this notification detail's consumer action identifier. :type consumer_action_id: str :param consumer_id: Gets or sets this notification detail's consumer identifier. :type consumer_id: str :param consumer_inputs: Gets or sets this notification detail's consumer inputs. :type consumer_inputs: dict :param dequeued_date: Gets or sets the time that this notification was dequeued for processing :type dequeued_date: datetime :param error_detail: Gets or sets this notification detail's error detail. :type error_detail: str :param error_message: Gets or sets this notification detail's error message. :type error_message: str :param event: Gets or sets this notification detail's event content. :type event: :class:`Event <azure.devops.v7_1.service_hooks.models.Event>` :param event_type: Gets or sets this notification detail's event type. :type event_type: str :param processed_date: Gets or sets the time that this notification was finished processing (just before the request is sent to the consumer) :type processed_date: datetime :param publisher_id: Gets or sets this notification detail's publisher identifier. :type publisher_id: str :param publisher_inputs: Gets or sets this notification detail's publisher inputs. :type publisher_inputs: dict :param queued_date: Gets or sets the time that this notification was queued (created) :type queued_date: datetime :param request: Gets or sets this notification detail's request. :type request: str :param request_attempts: Number of requests attempted to be sent to the consumer :type request_attempts: int :param request_duration: Duration of the request to the consumer in seconds :type request_duration: float :param response: Gets or sets this notification detail's response. :type response: str """ _attribute_map = { 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, 'consumer_action_id': {'key': 'consumerActionId', 'type': 'str'}, 'consumer_id': {'key': 'consumerId', 'type': 'str'}, 'consumer_inputs': {'key': 'consumerInputs', 'type': '{str}'}, 'dequeued_date': {'key': 'dequeuedDate', 'type': 'iso-8601'}, 'error_detail': {'key': 'errorDetail', 'type': 'str'}, 'error_message': {'key': 'errorMessage', 'type': 'str'}, 'event': {'key': 'event', 'type': 'Event'}, 'event_type': {'key': 'eventType', 'type': 'str'}, 'processed_date': {'key': 'processedDate', 'type': 'iso-8601'}, 'publisher_id': {'key': 'publisherId', 'type': 'str'}, 'publisher_inputs': {'key': 'publisherInputs', 'type': '{str}'}, 'queued_date': {'key': 'queuedDate', 'type': 'iso-8601'}, 'request': {'key': 'request', 'type': 'str'}, 'request_attempts': {'key': 'requestAttempts', 'type': 'int'}, 'request_duration': {'key': 'requestDuration', 'type': 'float'}, 'response': {'key': 'response', 'type': 'str'} } def __init__(self, completed_date=None, consumer_action_id=None, consumer_id=None, consumer_inputs=None, dequeued_date=None, error_detail=None, error_message=None, event=None, event_type=None, processed_date=None, publisher_id=None, publisher_inputs=None, queued_date=None, request=None, request_attempts=None, request_duration=None, response=None): super(NotificationDetails, self).__init__() self.completed_date = completed_date self.consumer_action_id = consumer_action_id self.consumer_id = consumer_id self.consumer_inputs = consumer_inputs self.dequeued_date = dequeued_date self.error_detail = error_detail self.error_message = error_message self.event = event self.event_type = event_type self.processed_date = processed_date self.publisher_id = publisher_id self.publisher_inputs = publisher_inputs self.queued_date = queued_date self.request = request self.request_attempts = request_attempts self.request_duration = request_duration self.response = response class NotificationResultsSummaryDetail(Model): """ Summary of a particular result and count. :param notification_count: Count of notification sent out with a matching result. :type notification_count: int :param result: Result of the notification :type result: object """ _attribute_map = { 'notification_count': {'key': 'notificationCount', 'type': 'int'}, 'result': {'key': 'result', 'type': 'object'} } def __init__(self, notification_count=None, result=None): super(NotificationResultsSummaryDetail, self).__init__() self.notification_count = notification_count self.result = result class NotificationsQuery(Model): """ Defines a query for service hook notifications. :param associated_subscriptions: The subscriptions associated with the notifications returned from the query :type associated_subscriptions: list of :class:`Subscription <azure.devops.v7_1.service_hooks.models.Subscription>` :param include_details: If true, we will return all notification history for the query provided; otherwise, the summary is returned. :type include_details: bool :param max_created_date: Optional maximum date at which the notification was created :type max_created_date: datetime :param max_results: Optional maximum number of overall results to include :type max_results: int :param max_results_per_subscription: Optional maximum number of results for each subscription. Only takes effect when a list of subscription ids is supplied in the query. :type max_results_per_subscription: int :param min_created_date: Optional minimum date at which the notification was created :type min_created_date: datetime :param publisher_id: Optional publisher id to restrict the results to :type publisher_id: str :param results: Results from the query :type results: list of :class:`Notification <azure.devops.v7_1.service_hooks.models.Notification>` :param result_type: Optional notification result type to filter results to :type result_type: object :param status: Optional notification status to filter results to :type status: object :param subscription_ids: Optional list of subscription ids to restrict the results to :type subscription_ids: list of str :param summary: Summary of notifications - the count of each result type (success, fail, ..). :type summary: list of :class:`NotificationSummary <azure.devops.v7_1.service_hooks.models.NotificationSummary>` """ _attribute_map = { 'associated_subscriptions': {'key': 'associatedSubscriptions', 'type': '[Subscription]'}, 'include_details': {'key': 'includeDetails', 'type': 'bool'}, 'max_created_date': {'key': 'maxCreatedDate', 'type': 'iso-8601'}, 'max_results': {'key': 'maxResults', 'type': 'int'}, 'max_results_per_subscription': {'key': 'maxResultsPerSubscription', 'type': 'int'}, 'min_created_date': {'key': 'minCreatedDate', 'type': 'iso-8601'}, 'publisher_id': {'key': 'publisherId', 'type': 'str'}, 'results': {'key': 'results', 'type': '[Notification]'}, 'result_type': {'key': 'resultType', 'type': 'object'}, 'status': {'key': 'status', 'type': 'object'}, 'subscription_ids': {'key': 'subscriptionIds', 'type': '[str]'}, 'summary': {'key': 'summary', 'type': '[NotificationSummary]'} } def __init__(self, associated_subscriptions=None, include_details=None, max_created_date=None, max_results=None, max_results_per_subscription=None, min_created_date=None, publisher_id=None, results=None, result_type=None, status=None, subscription_ids=None, summary=None): super(NotificationsQuery, self).__init__() self.associated_subscriptions = associated_subscriptions self.include_details = include_details self.max_created_date = max_created_date self.max_results = max_results self.max_results_per_subscription = max_results_per_subscription self.min_created_date = min_created_date self.publisher_id = publisher_id self.results = results self.result_type = result_type self.status = status self.subscription_ids = subscription_ids self.summary = summary class NotificationSummary(Model): """ Summary of the notifications for a subscription. :param results: The notification results for this particular subscription. :type results: list of :class:`NotificationResultsSummaryDetail <azure.devops.v7_1.service_hooks.models.NotificationResultsSummaryDetail>` :param subscription_id: The subscription id associated with this notification :type subscription_id: str """ _attribute_map = { 'results': {'key': 'results', 'type': '[NotificationResultsSummaryDetail]'}, 'subscription_id': {'key': 'subscriptionId', 'type': 'str'} } def __init__(self, results=None, subscription_id=None): super(NotificationSummary, self).__init__() self.results = results self.subscription_id = subscription_id class Publisher(Model): """ Defines the data contract of an event publisher. :param _links: Reference Links :type _links: :class:`ReferenceLinks <azure.devops.v7_1.service_hooks.models.ReferenceLinks>` :param description: Gets this publisher's localized description. :type description: str :param id: Gets this publisher's identifier. :type id: str :param input_descriptors: Publisher-specific inputs :type input_descriptors: list of :class:`InputDescriptor <azure.devops.v7_1.service_hooks.models.InputDescriptor>` :param name: Gets this publisher's localized name. :type name: str :param service_instance_type: The service instance type of the first party publisher. :type service_instance_type: str :param supported_events: Gets this publisher's supported event types. :type supported_events: list of :class:`EventTypeDescriptor <azure.devops.v7_1.service_hooks.models.EventTypeDescriptor>` :param url: The url for this resource :type url: str """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'description': {'key': 'description', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, 'name': {'key': 'name', 'type': 'str'}, 'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'}, 'supported_events': {'key': 'supportedEvents', 'type': '[EventTypeDescriptor]'}, 'url': {'key': 'url', 'type': 'str'} } def __init__(self, _links=None, description=None, id=None, input_descriptors=None, name=None, service_instance_type=None, supported_events=None, url=None): super(Publisher, self).__init__() self._links = _links self.description = description self.id = id self.input_descriptors = input_descriptors self.name = name self.service_instance_type = service_instance_type self.supported_events = supported_events self.url = url class PublisherEvent(Model): """ Wrapper around an event which is being published :param diagnostics: Add key/value pairs which will be stored with a published notification in the SH service DB. This key/value pairs are for diagnostic purposes only and will have not effect on the delivery of a notification. :type diagnostics: dict :param event: The event being published :type event: :class:`Event <azure.devops.v7_1.service_hooks.models.Event>` :param is_filtered_event: Gets or sets flag for filtered events :type is_filtered_event: bool :param notification_data: Additional data that needs to be sent as part of notification to complement the Resource data in the Event :type notification_data: dict :param other_resource_versions: Gets or sets the array of older supported resource versions. :type other_resource_versions: list of :class:`VersionedResource <azure.devops.v7_1.service_hooks.models.VersionedResource>` :param publisher_input_filters: Optional publisher-input filters which restricts the set of subscriptions which are triggered by the event :type publisher_input_filters: list of :class:`InputFilter <azure.devops.v7_1.service_hooks.models.InputFilter>` :param subscription: Gets or sets matched hooks subscription which caused this event. :type subscription: :class:`Subscription <azure.devops.v7_1.service_hooks.models.Subscription>` """ _attribute_map = { 'diagnostics': {'key': 'diagnostics', 'type': '{str}'}, 'event': {'key': 'event', 'type': 'Event'}, 'is_filtered_event': {'key': 'isFilteredEvent', 'type': 'bool'}, 'notification_data': {'key': 'notificationData', 'type': '{str}'}, 'other_resource_versions': {'key': 'otherResourceVersions', 'type': '[VersionedResource]'}, 'publisher_input_filters': {'key': 'publisherInputFilters', 'type': '[InputFilter]'}, 'subscription': {'key': 'subscription', 'type': 'Subscription'} } def __init__(self, diagnostics=None, event=None, is_filtered_event=None, notification_data=None, other_resource_versions=None, publisher_input_filters=None, subscription=None): super(PublisherEvent, self).__init__() self.diagnostics = diagnostics self.event = event self.is_filtered_event = is_filtered_event self.notification_data = notification_data self.other_resource_versions = other_resource_versions self.publisher_input_filters = publisher_input_filters self.subscription = subscription class PublishersQuery(Model): """ Defines a query for service hook publishers. :param publisher_ids: Optional list of publisher ids to restrict the results to :type publisher_ids: list of str :param publisher_inputs: Filter for publisher inputs :type publisher_inputs: dict :param results: Results from the query :type results: list of :class:`Publisher <azure.devops.v7_1.service_hooks.models.Publisher>` """ _attribute_map = { 'publisher_ids': {'key': 'publisherIds', 'type': '[str]'}, 'publisher_inputs': {'key': 'publisherInputs', 'type': '{str}'}, 'results': {'key': 'results', 'type': '[Publisher]'} } def __init__(self, publisher_ids=None, publisher_inputs=None, results=None): super(PublishersQuery, self).__init__() self.publisher_ids = publisher_ids self.publisher_inputs = publisher_inputs self.results = results class ReferenceLinks(Model): """ The class to represent a collection of REST reference links. :param links: The readonly view of the links. Because Reference links are readonly, we only want to expose them as read only. :type links: dict """ _attribute_map = { 'links': {'key': 'links', 'type': '{object}'} } def __init__(self, links=None): super(ReferenceLinks, self).__init__() self.links = links class ResourceContainer(Model): """ The base class for all resource containers, i.e. Account, Collection, Project :param base_url: Gets or sets the container's base URL, i.e. the URL of the host (collection, application, or deployment) containing the container resource. :type base_url: str :param id: Gets or sets the container's specific Id. :type id: str :param name: Gets or sets the container's name. :type name: str :param url: Gets or sets the container's REST API URL. :type url: str """ _attribute_map = { 'base_url': {'key': 'baseUrl', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'} } def __init__(self, base_url=None, id=None, name=None, url=None): super(ResourceContainer, self).__init__() self.base_url = base_url self.id = id self.name = name self.url = url class SessionToken(Model): """ Represents a session token to be attached in Events for Consumer actions that need it. :param error: The error message in case of error :type error: str :param token: The access token :type token: str :param valid_to: The expiration date in UTC :type valid_to: datetime """ _attribute_map = { 'error': {'key': 'error', 'type': 'str'}, 'token': {'key': 'token', 'type': 'str'}, 'valid_to': {'key': 'validTo', 'type': 'iso-8601'} } def __init__(self, error=None, token=None, valid_to=None): super(SessionToken, self).__init__() self.error = error self.token = token self.valid_to = valid_to class Subscription(Model): """ Encapsulates an event subscription. :param _links: Reference Links :type _links: :class:`ReferenceLinks <azure.devops.v7_1.service_hooks.models.ReferenceLinks>` :param action_description: :type action_description: str :param consumer_action_id: :type consumer_action_id: str :param consumer_id: :type consumer_id: str :param consumer_inputs: Consumer input values :type consumer_inputs: dict :param created_by: :type created_by: :class:`IdentityRef <azure.devops.v7_1.service_hooks.models.IdentityRef>` :param created_date: :type created_date: datetime :param event_description: :type event_description: str :param event_type: :type event_type: str :param id: :type id: str :param last_probation_retry_date: :type last_probation_retry_date: datetime :param modified_by: :type modified_by: :class:`IdentityRef <azure.devops.v7_1.service_hooks.models.IdentityRef>` :param modified_date: :type modified_date: datetime :param probation_retries: :type probation_retries: str :param publisher_id: :type publisher_id: str :param publisher_inputs: Publisher input values :type publisher_inputs: dict :param resource_version: :type resource_version: str :param status: :type status: object :param subscriber: :type subscriber: :class:`IdentityRef <azure.devops.v7_1.service_hooks.models.IdentityRef>` :param url: :type url: str """ _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'action_description': {'key': 'actionDescription', 'type': 'str'}, 'consumer_action_id': {'key': 'consumerActionId', 'type': 'str'}, 'consumer_id': {'key': 'consumerId', 'type': 'str'}, 'consumer_inputs': {'key': 'consumerInputs', 'type': '{str}'}, 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, 'event_description': {'key': 'eventDescription', 'type': 'str'}, 'event_type': {'key': 'eventType', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'last_probation_retry_date': {'key': 'lastProbationRetryDate', 'type': 'iso-8601'}, 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, 'probation_retries': {'key': 'probationRetries', 'type': 'str'}, 'publisher_id': {'key': 'publisherId', 'type': 'str'}, 'publisher_inputs': {'key': 'publisherInputs', 'type': '{str}'}, 'resource_version': {'key': 'resourceVersion', 'type': 'str'}, 'status': {'key': 'status', 'type': 'object'}, 'subscriber': {'key': 'subscriber', 'type': 'IdentityRef'}, 'url': {'key': 'url', 'type': 'str'} } def __init__(self, _links=None, action_description=None, consumer_action_id=None, consumer_id=None, consumer_inputs=None, created_by=None, created_date=None, event_description=None, event_type=None, id=None, last_probation_retry_date=None, modified_by=None, modified_date=None, probation_retries=None, publisher_id=None, publisher_inputs=None, resource_version=None, status=None, subscriber=None, url=None): super(Subscription, self).__init__() self._links = _links self.action_description = action_description self.consumer_action_id = consumer_action_id self.consumer_id = consumer_id self.consumer_inputs = consumer_inputs self.created_by = created_by self.created_date = created_date self.event_description = event_description self.event_type = event_type self.id = id self.last_probation_retry_date = last_probation_retry_date self.modified_by = modified_by self.modified_date = modified_date self.probation_retries = probation_retries self.publisher_id = publisher_id self.publisher_inputs = publisher_inputs self.resource_version = resource_version self.status = status self.subscriber = subscriber self.url = url class SubscriptionDiagnostics(Model): """ Contains all the diagnostics settings for a subscription. :param delivery_results: Diagnostics settings for retaining delivery results. Used for Service Hooks subscriptions. :type delivery_results: :class:`SubscriptionTracing <azure.devops.v7_1.microsoft._visual_studio._services._notifications._web_api.models.SubscriptionTracing>` :param delivery_tracing: Diagnostics settings for troubleshooting notification delivery. :type delivery_tracing: :class:`SubscriptionTracing <azure.devops.v7_1.microsoft._visual_studio._services._notifications._web_api.models.SubscriptionTracing>` :param evaluation_tracing: Diagnostics settings for troubleshooting event matching. :type evaluation_tracing: :class:`SubscriptionTracing <azure.devops.v7_1.microsoft._visual_studio._services._notifications._web_api.models.SubscriptionTracing>` """ _attribute_map = { 'delivery_results': {'key': 'deliveryResults', 'type': 'SubscriptionTracing'}, 'delivery_tracing': {'key': 'deliveryTracing', 'type': 'SubscriptionTracing'}, 'evaluation_tracing': {'key': 'evaluationTracing', 'type': 'SubscriptionTracing'} } def __init__(self, delivery_results=None, delivery_tracing=None, evaluation_tracing=None): super(SubscriptionDiagnostics, self).__init__() self.delivery_results = delivery_results self.delivery_tracing = delivery_tracing self.evaluation_tracing = evaluation_tracing class SubscriptionInputValuesQuery(Model): """ Query for obtaining information about the possible/allowed values for one or more subscription inputs :param input_values: The input values to return on input, and the result from the consumer on output. :type input_values: list of :class:`InputValues <azure.devops.v7_1.service_hooks.models.InputValues>` :param scope: The scope at which the properties to query belong :type scope: object :param subscription: Subscription containing information about the publisher/consumer and the current input values :type subscription: :class:`Subscription <azure.devops.v7_1.service_hooks.models.Subscription>` """ _attribute_map = { 'input_values': {'key': 'inputValues', 'type': '[InputValues]'}, 'scope': {'key': 'scope', 'type': 'object'}, 'subscription': {'key': 'subscription', 'type': 'Subscription'} } def __init__(self, input_values=None, scope=None, subscription=None): super(SubscriptionInputValuesQuery, self).__init__() self.input_values = input_values self.scope = scope self.subscription = subscription class SubscriptionsQuery(Model): """ Defines a query for service hook subscriptions. :param consumer_action_id: Optional consumer action id to restrict the results to (null for any) :type consumer_action_id: str :param consumer_id: Optional consumer id to restrict the results to (null for any) :type consumer_id: str :param consumer_input_filters: Filter for subscription consumer inputs :type consumer_input_filters: list of :class:`InputFilter <azure.devops.v7_1.service_hooks.models.InputFilter>` :param event_type: Optional event type id to restrict the results to (null for any) :type event_type: str :param publisher_id: Optional publisher id to restrict the results to (null for any) :type publisher_id: str :param publisher_input_filters: Filter for subscription publisher inputs :type publisher_input_filters: list of :class:`InputFilter <azure.devops.v7_1.service_hooks.models.InputFilter>` :param results: Results from the query :type results: list of :class:`Subscription <azure.devops.v7_1.service_hooks.models.Subscription>` :param subscriber_id: Optional subscriber filter. :type subscriber_id: str """ _attribute_map = { 'consumer_action_id': {'key': 'consumerActionId', 'type': 'str'}, 'consumer_id': {'key': 'consumerId', 'type': 'str'}, 'consumer_input_filters': {'key': 'consumerInputFilters', 'type': '[InputFilter]'}, 'event_type': {'key': 'eventType', 'type': 'str'}, 'publisher_id': {'key': 'publisherId', 'type': 'str'}, 'publisher_input_filters': {'key': 'publisherInputFilters', 'type': '[InputFilter]'}, 'results': {'key': 'results', 'type': '[Subscription]'}, 'subscriber_id': {'key': 'subscriberId', 'type': 'str'} } def __init__(self, consumer_action_id=None, consumer_id=None, consumer_input_filters=None, event_type=None, publisher_id=None, publisher_input_filters=None, results=None, subscriber_id=None): super(SubscriptionsQuery, self).__init__() self.consumer_action_id = consumer_action_id self.consumer_id = consumer_id self.consumer_input_filters = consumer_input_filters self.event_type = event_type self.publisher_id = publisher_id self.publisher_input_filters = publisher_input_filters self.results = results self.subscriber_id = subscriber_id class SubscriptionTracing(Model): """ Data controlling a single diagnostic setting for a subscription. :param enabled: Indicates whether the diagnostic tracing is enabled or not. :type enabled: bool :param end_date: Trace until the specified end date. :type end_date: datetime :param max_traced_entries: The maximum number of result details to trace. :type max_traced_entries: int :param start_date: The date and time tracing started. :type start_date: datetime :param traced_entries: Trace until remaining count reaches 0. :type traced_entries: int """ _attribute_map = { 'enabled': {'key': 'enabled', 'type': 'bool'}, 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, 'max_traced_entries': {'key': 'maxTracedEntries', 'type': 'int'}, 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, 'traced_entries': {'key': 'tracedEntries', 'type': 'int'} } def __init__(self, enabled=None, end_date=None, max_traced_entries=None, start_date=None, traced_entries=None): super(SubscriptionTracing, self).__init__() self.enabled = enabled self.end_date = end_date self.max_traced_entries = max_traced_entries self.start_date = start_date self.traced_entries = traced_entries class UpdateSubscripitonDiagnosticsParameters(Model): """ Parameters to update diagnostics settings for a subscription. :param delivery_results: Diagnostics settings for retaining delivery results. Used for Service Hooks subscriptions. :type delivery_results: :class:`UpdateSubscripitonTracingParameters <azure.devops.v7_1.microsoft._visual_studio._services._notifications._web_api.models.UpdateSubscripitonTracingParameters>` :param delivery_tracing: Diagnostics settings for troubleshooting notification delivery. :type delivery_tracing: :class:`UpdateSubscripitonTracingParameters <azure.devops.v7_1.microsoft._visual_studio._services._notifications._web_api.models.UpdateSubscripitonTracingParameters>` :param evaluation_tracing: Diagnostics settings for troubleshooting event matching. :type evaluation_tracing: :class:`UpdateSubscripitonTracingParameters <azure.devops.v7_1.microsoft._visual_studio._services._notifications._web_api.models.UpdateSubscripitonTracingParameters>` """ _attribute_map = { 'delivery_results': {'key': 'deliveryResults', 'type': 'UpdateSubscripitonTracingParameters'}, 'delivery_tracing': {'key': 'deliveryTracing', 'type': 'UpdateSubscripitonTracingParameters'}, 'evaluation_tracing': {'key': 'evaluationTracing', 'type': 'UpdateSubscripitonTracingParameters'} } def __init__(self, delivery_results=None, delivery_tracing=None, evaluation_tracing=None): super(UpdateSubscripitonDiagnosticsParameters, self).__init__() self.delivery_results = delivery_results self.delivery_tracing = delivery_tracing self.evaluation_tracing = evaluation_tracing class UpdateSubscripitonTracingParameters(Model): """ Parameters to update a specific diagnostic setting. :param enabled: Indicates whether to enable to disable the diagnostic tracing. :type enabled: bool """ _attribute_map = { 'enabled': {'key': 'enabled', 'type': 'bool'} } def __init__(self, enabled=None): super(UpdateSubscripitonTracingParameters, self).__init__() self.enabled = enabled class VersionedResource(Model): """ Encapsulates the resource version and its data or reference to the compatible version. Only one of the two last fields should be not null. :param compatible_with: Gets or sets the reference to the compatible version. :type compatible_with: str :param resource: Gets or sets the resource data. :type resource: object :param resource_version: Gets or sets the version of the resource data. :type resource_version: str """ _attribute_map = { 'compatible_with': {'key': 'compatibleWith', 'type': 'str'}, 'resource': {'key': 'resource', 'type': 'object'}, 'resource_version': {'key': 'resourceVersion', 'type': 'str'} } def __init__(self, compatible_with=None, resource=None, resource_version=None): super(VersionedResource, self).__init__() self.compatible_with = compatible_with self.resource = resource self.resource_version = resource_version __all__ = [ 'Consumer', 'ConsumerAction', 'Event', 'EventTypeDescriptor', 'ExternalConfigurationDescriptor', 'FormattedEventMessage', 'GraphSubjectBase', 'IdentityRef', 'InputDescriptor', 'InputFilter', 'InputFilterCondition', 'InputValidation', 'InputValue', 'InputValues', 'InputValuesError', 'InputValuesQuery', 'Notification', 'NotificationDetails', 'NotificationResultsSummaryDetail', 'NotificationsQuery', 'NotificationSummary', 'Publisher', 'PublisherEvent', 'PublishersQuery', 'ReferenceLinks', 'ResourceContainer', 'SessionToken', 'Subscription', 'SubscriptionDiagnostics', 'SubscriptionInputValuesQuery', 'SubscriptionsQuery', 'SubscriptionTracing', 'UpdateSubscripitonDiagnosticsParameters', 'UpdateSubscripitonTracingParameters', 'VersionedResource', ]
azure-devops-python-api/azure-devops/azure/devops/v7_1/service_hooks/models.py/0
{ "file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/service_hooks/models.py", "repo_id": "azure-devops-python-api", "token_count": 22758 }
371
ο»Ώ# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- # Generated file, DO NOT EDIT # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- from .models import * from .test_plan_client import TestPlanClient __all__ = [ 'BuildDefinitionReference', 'CloneOperationCommonResponse', 'CloneOptions', 'CloneStatistics', 'CloneTestCaseOperationInformation', 'CloneTestCaseOptions', 'CloneTestCaseParams', 'CloneTestPlanOperationInformation', 'CloneTestPlanParams', 'CloneTestSuiteOperationInformation', 'CloneTestSuiteParams', 'Configuration', 'DestinationTestPlanCloneParams', 'DestinationTestSuiteInfo', 'GraphSubjectBase', 'IdentityRef', 'LastResultDetails', 'LibraryWorkItemsData', 'LibraryWorkItemsDataProviderRequest', 'NameValuePair', 'PointAssignment', 'ReferenceLinks', 'ReleaseEnvironmentDefinitionReference', 'Results', 'SourceTestPlanInfo', 'SourceTestplanResponse', 'SourceTestSuiteInfo', 'SourceTestSuiteResponse', 'SuiteEntry', 'SuiteEntryUpdateParams', 'SuiteTestCaseCreateUpdateParameters', 'TeamProjectReference', 'TestCase', 'TestCaseAssociatedResult', 'TestCaseReference', 'TestCaseResultsData', 'TestConfiguration', 'TestConfigurationCreateUpdateParameters', 'TestConfigurationReference', 'TestEntityCount', 'TestEnvironment', 'TestOutcomeSettings', 'TestPlan', 'TestPlanCreateParams', 'TestPlanDetailedReference', 'TestPlanReference', 'TestPlansHubRefreshData', 'TestPlansLibraryWorkItemFilter', 'TestPlanUpdateParams', 'TestPoint', 'TestPointDetailedReference', 'TestPointResults', 'TestPointUpdateParams', 'TestSettings', 'TestSuite', 'TestSuiteCreateParams', 'TestSuiteCreateUpdateCommonParams', 'TestSuiteReference', 'TestSuiteReferenceWithProject', 'TestSuiteUpdateParams', 'TestVariable', 'TestVariableCreateUpdateParameters', 'WorkItem', 'WorkItemDetails', 'TestPlanClient' ]
azure-devops-python-api/azure-devops/azure/devops/v7_1/test_plan/__init__.py/0
{ "file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/test_plan/__init__.py", "repo_id": "azure-devops-python-api", "token_count": 767 }
372
ο»Ώ# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- # Generated file, DO NOT EDIT # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- from msrest.serialization import Model class UPackLimitedPackageMetadata(Model): """ :param description: :type description: str :param version: :type version: str """ _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, 'version': {'key': 'version', 'type': 'str'} } def __init__(self, description=None, version=None): super(UPackLimitedPackageMetadata, self).__init__() self.description = description self.version = version class UPackLimitedPackageMetadataListResponse(Model): """ :param count: :type count: int :param value: :type value: list of :class:`UPackLimitedPackageMetadata <azure.devops.v7_1.upack.models.UPackLimitedPackageMetadata>` """ _attribute_map = { 'count': {'key': 'count', 'type': 'int'}, 'value': {'key': 'value', 'type': '[UPackLimitedPackageMetadata]'} } def __init__(self, count=None, value=None): super(UPackLimitedPackageMetadataListResponse, self).__init__() self.count = count self.value = value class UPackPackageMetadata(Model): """ :param description: :type description: str :param manifest_id: :type manifest_id: str :param package_size: :type package_size: long :param super_root_id: :type super_root_id: str :param version: :type version: str """ _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, 'manifest_id': {'key': 'manifestId', 'type': 'str'}, 'package_size': {'key': 'packageSize', 'type': 'long'}, 'super_root_id': {'key': 'superRootId', 'type': 'str'}, 'version': {'key': 'version', 'type': 'str'} } def __init__(self, description=None, manifest_id=None, package_size=None, super_root_id=None, version=None): super(UPackPackageMetadata, self).__init__() self.description = description self.manifest_id = manifest_id self.package_size = package_size self.super_root_id = super_root_id self.version = version class UPackPackagePushMetadata(Model): """ Contains the parameters for adding a new Universal Package to the feed, except for name and version which are transmitted in the URL :param description: :type description: str :param manifest_id: :type manifest_id: str :param proof_nodes: :type proof_nodes: list of str :param super_root_id: :type super_root_id: str """ _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, 'manifest_id': {'key': 'manifestId', 'type': 'str'}, 'proof_nodes': {'key': 'proofNodes', 'type': '[str]'}, 'super_root_id': {'key': 'superRootId', 'type': 'str'} } def __init__(self, description=None, manifest_id=None, proof_nodes=None, super_root_id=None): super(UPackPackagePushMetadata, self).__init__() self.description = description self.manifest_id = manifest_id self.proof_nodes = proof_nodes self.super_root_id = super_root_id class UPackPackageVersionDeletionState(Model): """ Deletion state of a Universal package. :param deleted_date: UTC date the package was deleted. :type deleted_date: datetime :param name: Name of the package. :type name: str :param version: Version of the package. :type version: str """ _attribute_map = { 'deleted_date': {'key': 'deletedDate', 'type': 'iso-8601'}, 'name': {'key': 'name', 'type': 'str'}, 'version': {'key': 'version', 'type': 'str'} } def __init__(self, deleted_date=None, name=None, version=None): super(UPackPackageVersionDeletionState, self).__init__() self.deleted_date = deleted_date self.name = name self.version = version __all__ = [ 'UPackLimitedPackageMetadata', 'UPackLimitedPackageMetadataListResponse', 'UPackPackageMetadata', 'UPackPackagePushMetadata', 'UPackPackageVersionDeletionState', ]
azure-devops-python-api/azure-devops/azure/devops/v7_1/upack_packaging/models.py/0
{ "file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/upack_packaging/models.py", "repo_id": "azure-devops-python-api", "token_count": 1703 }
373
ο»Ώ# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- # Generated file, DO NOT EDIT # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- from msrest import Serializer, Deserializer from ...client import Client from . import models class WorkItemTrackingProcessTemplateClient(Client): """WorkItemTrackingProcessTemplate :param str base_url: Service URL :param Authentication creds: Authenticated credentials. """ def __init__(self, base_url=None, creds=None): super(WorkItemTrackingProcessTemplateClient, self).__init__(base_url, creds) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) resource_area_identifier = '5264459e-e5e0-4bd8-b118-0985e68a4ec5' def get_behavior(self, process_id, behavior_ref_name): """GetBehavior. [Preview API] Returns a behavior for the process. :param str process_id: The ID of the process :param str behavior_ref_name: The reference name of the behavior :rtype: :class:`<AdminBehavior> <azure.devops.v7_1.work_item_tracking_process_template.models.AdminBehavior>` """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') query_parameters = {} if behavior_ref_name is not None: query_parameters['behaviorRefName'] = self._serialize.query('behavior_ref_name', behavior_ref_name, 'str') response = self._send(http_method='GET', location_id='90bf9317-3571-487b-bc8c-a523ba0e05d7', version='7.1-preview.1', route_values=route_values, query_parameters=query_parameters) return self._deserialize('AdminBehavior', response) def get_behaviors(self, process_id): """GetBehaviors. [Preview API] Returns a list of behaviors for the process. :param str process_id: The ID of the process :rtype: [AdminBehavior] """ route_values = {} if process_id is not None: route_values['processId'] = self._serialize.url('process_id', process_id, 'str') response = self._send(http_method='GET', location_id='90bf9317-3571-487b-bc8c-a523ba0e05d7', version='7.1-preview.1', route_values=route_values) return self._deserialize('[AdminBehavior]', self._unwrap_collection(response)) def export_process_template(self, id, **kwargs): """ExportProcessTemplate. [Preview API] Returns requested process template. :param str id: The ID of the process :rtype: object """ route_values = {} if id is not None: route_values['id'] = self._serialize.url('id', id, 'str') route_values['action'] = 'Export' response = self._send(http_method='GET', location_id='29e1f38d-9e9c-4358-86a5-cdf9896a5759', version='7.1-preview.1', route_values=route_values, accept_media_type='application/zip') if "callback" in kwargs: callback = kwargs["callback"] else: callback = None return self._client.stream_download(response, callback=callback) def import_process_template(self, upload_stream, ignore_warnings=None, replace_existing_template=None, **kwargs): """ImportProcessTemplate. [Preview API] Imports a process from zip file. :param object upload_stream: Stream to upload :param bool ignore_warnings: Ignores validation warnings. Default value is false. :param bool replace_existing_template: Replaces the existing template. Default value is true. :rtype: :class:`<ProcessImportResult> <azure.devops.v7_1.work_item_tracking_process_template.models.ProcessImportResult>` """ route_values = {} route_values['action'] = 'Import' query_parameters = {} if ignore_warnings is not None: query_parameters['ignoreWarnings'] = self._serialize.query('ignore_warnings', ignore_warnings, 'bool') if replace_existing_template is not None: query_parameters['replaceExistingTemplate'] = self._serialize.query('replace_existing_template', replace_existing_template, 'bool') if "callback" in kwargs: callback = kwargs["callback"] else: callback = None content = self._client.stream_upload(upload_stream, callback=callback) response = self._send(http_method='POST', location_id='29e1f38d-9e9c-4358-86a5-cdf9896a5759', version='7.1-preview.1', route_values=route_values, query_parameters=query_parameters, content=content, media_type='application/octet-stream') return self._deserialize('ProcessImportResult', response) def import_process_template_status(self, id): """ImportProcessTemplateStatus. [Preview API] Tells whether promote has completed for the specified promote job ID. :param str id: The ID of the promote job operation :rtype: :class:`<ProcessPromoteStatus> <azure.devops.v7_1.work_item_tracking_process_template.models.ProcessPromoteStatus>` """ route_values = {} if id is not None: route_values['id'] = self._serialize.url('id', id, 'str') route_values['action'] = 'Status' response = self._send(http_method='GET', location_id='29e1f38d-9e9c-4358-86a5-cdf9896a5759', version='7.1-preview.1', route_values=route_values) return self._deserialize('ProcessPromoteStatus', response)
azure-devops-python-api/azure-devops/azure/devops/v7_1/work_item_tracking_process_template/work_item_tracking_process_template_client.py/0
{ "file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/work_item_tracking_process_template/work_item_tracking_process_template_client.py", "repo_id": "azure-devops-python-api", "token_count": 2796 }
374
trigger: none pr: none parameters: - name: Release_Type displayName: Release Type (major.minor.patch) type: string values: - major - minor - patch default: 'patch' - name: Build_Type displayName: Build Type (major.minor.patch[.rc|.dev]) type: string values: - dev - rc - stable default: 'dev' - name: Publish_Python_Package_To_Build_Artifacts displayName: Publish Python package to Build's Artifacts type: boolean default: True - name: Create_GitHub_Release displayName: Create GitHub-Release type: boolean default: False - name: Publish_Python_Package_To_PyPi displayName: Publish Python package to PyPi type: boolean default: False variables: - name: OwnerPersonalAlias value: 'billti' jobs: - job: "Build_Azure_Quantum_Python" displayName: Build "azure-quantum" package pool: vmImage: 'windows-latest' steps: - task: UsePythonVersion@0 inputs: versionSpec: '3.11' displayName: Set Python version - script: | pip install wheel displayName: Install wheel - script: | pip freeze displayName: List installed packages - script: | python set_version.py env: BUILD_TYPE: ${{ parameters.Build_Type }} RELEASE_TYPE: ${{ parameters.Release_Type }} displayName: Set "azure-quantum" package version - script: | cd $(Build.SourcesDirectory)/azure-quantum python setup.py sdist --dist-dir=target/wheels python setup.py bdist_wheel --dist-dir=target/wheels displayName: Build "azure-quantum" package - publish: $(Build.SourcesDirectory)/azure-quantum/target/wheels/ artifact: azure-quantum-wheels displayName: Upload "azure-quantum" artifacts - job: "Test_Azure_Quantum_Python" displayName: Test "azure-quantum" package pool: vmImage: 'windows-latest' steps: - task: UsePythonVersion@0 inputs: versionSpec: '3.11' displayName: Set Python version - script: | pip install pytest pytest-azurepipelines pytest-cov displayName: Install pytest dependencies - script: | pip freeze displayName: List installed packages - script: | cd $(Build.SourcesDirectory)/azure-quantum pip install .[all] pytest --cov-report term --cov=azure.quantum --junitxml test-output-azure-quantum.xml $(Build.SourcesDirectory)/azure-quantum displayName: Run Unit-tests - task: PublishTestResults@2 displayName: 'Publish test results (python)' condition: succeededOrFailed() inputs: testResultsFormat: 'JUnit' testResultsFiles: '**/test-*.xml' testRunTitle: 'Azure Quantum Python Tests' - job: "Approval" displayName: Release approval dependsOn: - "Build_Azure_Quantum_Python" - "Test_Azure_Quantum_Python" pool: server timeoutInMinutes: 1440 # job times out in 1 day steps: - task: ManualValidation@0 displayName: Manual release approval timeoutInMinutes: 1440 # task times out in 1 day inputs: notifyUsers: '' instructions: 'Please verify artifacts and approve the release' onTimeout: 'reject' - job: "Publish_Python_Packages" displayName: Publish "azure-quantum" package dependsOn: Approval pool: vmImage: 'windows-latest' steps: - task: UsePythonVersion@0 inputs: versionSpec: '3.11' displayName: Set Python version - script: | python set_version.py env: BUILD_TYPE: ${{ parameters.Build_Type }} RELEASE_TYPE: ${{ parameters.Release_Type }} displayName: Set "azure-quantum" package version - download: current artifact: azure-quantum-wheels displayName: Download azure-quantum artifacts - task: CopyFiles@2 condition: | or( ${{ parameters.Publish_Python_Package_To_Build_Artifacts }}, ${{ parameters.Publish_Python_Package_To_PyPi }} ) displayName: Copy built "azure-quantum" package artifacts inputs: SourceFolder: '$(Pipeline.Workspace)/azure-quantum-wheels' Contents: '**' TargetFolder: '$(Build.ArtifactStagingDirectory)/target/wheels' - script: | ls $(Build.ArtifactStagingDirectory)/target/wheels/* displayName: List Py Artifacts to publish - task: GitHubRelease@1 condition: ${{ parameters.Create_GitHub_Release }} displayName: Create GitHub Release inputs: gitHubConnection: AzureQuantumOauth repositoryName: Microsoft/azure-quantum-python action: create tagSource: 'userSpecifiedTag' tag: azure-quantum_v$(PYTHON_VERSION) isDraft: True isPreRelease: ${{ ne(parameters.Build_Type, 'stable') }} target: $(Build.SourceVersion) addChangeLog: False assets: | $(Build.ArtifactStagingDirectory)/target/wheels/* - task: EsrpRelease@4 condition: ${{ parameters.Publish_Python_Package_To_PyPi }} displayName: Publish "azure-quantum" package to PyPi inputs: ConnectedServiceName: 'ESRP_Release' Intent: 'PackageDistribution' ContentType: 'PyPi' FolderLocation: '$(Build.ArtifactStagingDirectory)/target/wheels' Owners: '$(OwnerPersonalAlias)@microsoft.com' # NB: Group email here fails the task with non-actionable output. Approvers: '[email protected]' # Auto-inserted Debugging defaults: ServiceEndpointUrl: 'https://api.esrp.microsoft.com' MainPublisher: 'QuantumDevelpmentKit' # ESRP Team's Correction (including the critical typo "Develpm"). DomainTenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47'
azure-quantum-python/.ado/publish.yml/0
{ "file_path": "azure-quantum-python/.ado/publish.yml", "repo_id": "azure-quantum-python", "token_count": 2145 }
375
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import logging import re from typing import Optional import urllib3 from azure.core.credentials import AccessToken from azure.identity import ( AzurePowerShellCredential, EnvironmentCredential, ManagedIdentityCredential, AzureCliCredential, VisualStudioCodeCredential, InteractiveBrowserCredential, DeviceCodeCredential, _internal as AzureIdentityInternals, ) from ._chained import _ChainedTokenCredential from ._token import _TokenFileCredential from azure.quantum._constants import ConnectionConstants _LOGGER = logging.getLogger(__name__) WWW_AUTHENTICATE_REGEX = re.compile( r""" ^ Bearer\sauthorization_uri=" https://(?P<authority>[^/]*)/ (?P<tenant_id>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) " """, re.VERBOSE | re.IGNORECASE) WWW_AUTHENTICATE_HEADER_NAME = "WWW-Authenticate" class _DefaultAzureCredential(_ChainedTokenCredential): """ Based on Azure.Identity.DefaultAzureCredential from: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/identity/azure-identity/azure/identity/_credentials/default.py The three key differences are: 1) Inherit from _ChainedTokenCredential, which has more aggressive error handling than ChainedTokenCredential 2) Instantiate the internal credentials the first time the get_token gets called such that we can get the tenant_id if it was not passed by the user (but we don't want to do that in the constructor). We automatically identify the user's tenant_id for a given subscription so that users with MSA accounts don't need to pass it. This is a mitigation for bug https://github.com/Azure/azure-sdk-for-python/issues/18975 We need the following parameters to enable auto-detection of tenant_id - subscription_id - arm_endpoint (defaults to the production url "https://management.azure.com/") 3) Add custom TokenFileCredential as first method to attempt, which will look for a local access token. """ def __init__( self, arm_endpoint: str, subscription_id: str, client_id: Optional[str] = None, tenant_id: Optional[str] = None, authority: Optional[str] = None, ): if arm_endpoint is None: raise ValueError("arm_endpoint is mandatory parameter") if subscription_id is None: raise ValueError("subscription_id is mandatory parameter") self.authority = self._authority_or_default( authority=authority, arm_endpoint=arm_endpoint) self.tenant_id = tenant_id self.subscription_id = subscription_id self.arm_endpoint = arm_endpoint self.client_id = client_id # credentials will be created lazy on the first call to get_token super(_DefaultAzureCredential, self).__init__() def _authority_or_default(self, authority: str, arm_endpoint: str): if authority: return AzureIdentityInternals.normalize_authority(authority) if arm_endpoint == ConnectionConstants.ARM_DOGFOOD_ENDPOINT: return ConnectionConstants.DOGFOOD_AUTHORITY return ConnectionConstants.AUTHORITY def _initialize_credentials(self): self._discover_tenant_id_( arm_endpoint=self.arm_endpoint, subscription_id=self.subscription_id) credentials = [] credentials.append(_TokenFileCredential()) credentials.append(EnvironmentCredential()) if self.client_id: credentials.append(ManagedIdentityCredential(client_id=self.client_id)) if self.authority and self.tenant_id: credentials.append(VisualStudioCodeCredential(authority=self.authority, tenant_id=self.tenant_id)) credentials.append(AzureCliCredential(tenant_id=self.tenant_id)) credentials.append(AzurePowerShellCredential(tenant_id=self.tenant_id)) credentials.append(InteractiveBrowserCredential(authority=self.authority, tenant_id=self.tenant_id)) if self.client_id: credentials.append(DeviceCodeCredential(authority=self.authority, client_id=self.client_id, tenant_id=self.tenant_id)) self.credentials = credentials def get_token(self, *scopes: str, **kwargs) -> AccessToken: """ Request an access token for `scopes`. This method is called automatically by Azure SDK clients. :param str scopes: desired scopes for the access token. This method requires at least one scope. :raises ~azure.core.exceptions.ClientAuthenticationError:authentication failed. The exception has a `message` attribute listing each authentication attempt and its error message. """ # lazy-initialize the credentials if self.credentials is None or len(self.credentials) == 0: self._initialize_credentials() return super(_DefaultAzureCredential, self).get_token(*scopes, **kwargs) def _discover_tenant_id_(self, arm_endpoint:str, subscription_id:str): """ If the tenant_id was not given, try to obtain it by calling the management endpoint for the subscription_id, or by applying default values. """ if self.tenant_id: return try: url = ( f"{arm_endpoint.rstrip('/')}/subscriptions/" + f"{subscription_id}?api-version=2018-01-01" + "&discover-tenant-id" # used by the test recording infrastructure ) http = urllib3.PoolManager() response = http.request( method="GET", url=url, ) if WWW_AUTHENTICATE_HEADER_NAME in response.headers: www_authenticate = response.headers[WWW_AUTHENTICATE_HEADER_NAME] match = re.search(WWW_AUTHENTICATE_REGEX, www_authenticate) if match: self.tenant_id = match.group("tenant_id") # pylint: disable=broad-exception-caught except Exception as ex: _LOGGER.error(ex) # apply default values self.tenant_id = self.tenant_id or ConnectionConstants.MSA_TENANT_ID
azure-quantum-python/azure-quantum/azure/quantum/_authentication/_default.py/0
{ "file_path": "azure-quantum-python/azure-quantum/azure/quantum/_authentication/_default.py", "repo_id": "azure-quantum-python", "token_count": 2675 }
376
## # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. ## from enum import Enum from azure.identity._constants import EnvironmentVariables as SdkEnvironmentVariables from azure.identity import _internal as AzureIdentityInternals class EnvironmentVariables: USER_AGENT_APPID = "AZURE_QUANTUM_PYTHON_APPID" QUANTUM_LOCATION = "AZURE_QUANTUM_WORKSPACE_LOCATION" LOCATION = "LOCATION" QUANTUM_RESOURCE_GROUP = "AZURE_QUANTUM_WORKSPACE_RG" RESOURCE_GROUP = "RESOURCE_GROUP" QUANTUM_SUBSCRIPTION_ID = "AZURE_QUANTUM_SUBSCRIPTION_ID" SUBSCRIPTION_ID = "SUBSCRIPTION_ID" WORKSPACE_NAME = "AZURE_QUANTUM_WORKSPACE_NAME" QUANTUM_ENV = "AZURE_QUANTUM_ENV" AZURE_CLIENT_ID = SdkEnvironmentVariables.AZURE_CLIENT_ID AZURE_CLIENT_SECRET = SdkEnvironmentVariables.AZURE_CLIENT_SECRET AZURE_TENANT_ID = SdkEnvironmentVariables.AZURE_TENANT_ID QUANTUM_TOKEN_FILE = "AZURE_QUANTUM_TOKEN_FILE" CONNECTION_STRING = "AZURE_QUANTUM_CONNECTION_STRING" ALL = [ USER_AGENT_APPID, QUANTUM_LOCATION, LOCATION, QUANTUM_RESOURCE_GROUP, RESOURCE_GROUP, QUANTUM_SUBSCRIPTION_ID, SUBSCRIPTION_ID, WORKSPACE_NAME, QUANTUM_ENV, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID, QUANTUM_TOKEN_FILE, CONNECTION_STRING, ] class EnvironmentKind(Enum): PRODUCTION = 1, CANARY = 2, DOGFOOD = 3 class ConnectionConstants: DATA_PLANE_CREDENTIAL_SCOPE = "https://quantum.microsoft.com/.default" ARM_CREDENTIAL_SCOPE = "https://management.azure.com/.default" MSA_TENANT_ID = "9188040d-6c67-4c5b-b112-36a304b66dad" AUTHORITY = AzureIdentityInternals.get_default_authority() DOGFOOD_AUTHORITY = "login.windows-ppe.net" # pylint: disable=unnecessary-lambda-assignment GET_QUANTUM_PRODUCTION_ENDPOINT = \ lambda location: f"https://{location}.quantum.azure.com/" GET_QUANTUM_CANARY_ENDPOINT = \ lambda location: f"https://{location or 'eastus2euap'}.quantum.azure.com/" GET_QUANTUM_DOGFOOD_ENDPOINT = \ lambda location: f"https://{location}.quantum-test.azure.com/" ARM_PRODUCTION_ENDPOINT = "https://management.azure.com/" ARM_DOGFOOD_ENDPOINT = "https://api-dogfood.resources.windows-int.net/" VALID_RESOURCE_ID = ( lambda subscription_id, resource_group, workspace_name: f"/subscriptions/{subscription_id}" + f"/resourceGroups/{resource_group}" + "/providers/Microsoft.Quantum/" + f"Workspaces/{workspace_name}" ) VALID_CONNECTION_STRING = ( lambda subscription_id, resource_group, workspace_name, api_key, quantum_endpoint: f"SubscriptionId={subscription_id};" + f"ResourceGroupName={resource_group};" + f"WorkspaceName={workspace_name};" + f"ApiKey={api_key};" + f"QuantumEndpoint={quantum_endpoint};" ) QUANTUM_API_KEY_HEADER = "x-ms-quantum-api-key" GUID_REGEX_PATTERN = ( r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" )
azure-quantum-python/azure-quantum/azure/quantum/_constants.py/0
{ "file_path": "azure-quantum-python/azure-quantum/azure/quantum/_constants.py", "repo_id": "azure-quantum-python", "token_count": 1412 }
377
import json from typing import Any, Dict, Union class JobFailedWithResultsError(RuntimeError): """Error produced when Job completes with status "Failed" and the Job supports producing failure results. The failure results can be accessed with get_failure_results() method. """ def __init__(self, message: str, failure_results: Any, *args: object) -> None: """Initializes error produced when Job completes with status "Failed" and the Job supports producing failure results. :param message: Error message. :type message: str :param failure_results: Failure results produced by the job. :type failure_results: Any """ self._set_error_details(message, failure_results) super().__init__(message, *args) def _set_error_details(self, message: str, failure_results: Any) -> None: self._message = message try: decoded_failure_results = failure_results.decode("utf8") self._failure_results: Dict[str, Any] = json.loads(decoded_failure_results) except: self._failure_results = failure_results def get_message(self) -> str: """ Get error message. """ return self._message def get_failure_results(self) -> Union[Dict[str, Any], str]: """ Get failure results produced by the job. """ return self._failure_results def __str__(self) -> str: return f"{self._message}\nFailure results: {self._failure_results}"
azure-quantum-python/azure-quantum/azure/quantum/job/job_failed_with_results_error.py/0
{ "file_path": "azure-quantum-python/azure-quantum/azure/quantum/job/job_failed_with_results_error.py", "repo_id": "azure-quantum-python", "token_count": 591 }
378
## # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. ## import logging from typing import Any, Dict from azure.core import exceptions from azure.storage.blob import ( BlobServiceClient, ContainerClient, BlobClient, BlobSasPermissions, ContentSettings, generate_blob_sas, generate_container_sas, BlobType, BlobProperties ) from datetime import datetime, timedelta from enum import Enum logger = logging.getLogger(__name__) def create_container( connection_string: str, container_name: str ) -> ContainerClient: """ Creates and initialize a container; returns the client needed to access it. """ blob_service_client = BlobServiceClient.from_connection_string( connection_string ) logger.info( f'{"Initializing storage client for account:"}' + f"{blob_service_client.account_name}" ) container_client = blob_service_client.get_container_client(container_name) create_container_using_client(container_client) return container_client def create_container_using_client(container_client: ContainerClient): """ Creates the container if it doesn't already exist. """ if not container_client.exists(): logger.debug( f'{" - uploading to **new** container:"}' f"{container_client.container_name}" ) container_client.create_container() def get_container_uri(connection_string: str, container_name: str) -> str: """ Creates and initialize a container; returns a URI with a SAS read/write token to access it. """ container = create_container(connection_string, container_name) logger.info( f'{"Creating SAS token for container"}' + f"'{container_name}' on account: '{container.account_name}'" ) sas_token = generate_container_sas( container.account_name, container.container_name, account_key=container.credential.account_key, permission=BlobSasPermissions( read=True, add=True, write=True, create=True ), expiry=datetime.utcnow() + timedelta(days=14), ) uri = container.url + "?" + sas_token logger.debug(f" - container url: '{uri}'.") return uri def upload_blob( container: ContainerClient, blob_name: str, content_type: str, content_encoding: str, data: Any, return_sas_token: bool = True, ) -> str: """ Uploads the given data to a blob record. If a blob with the given name already exist, it throws an error. Returns a uri with a SAS token to access the newly created blob. """ create_container_using_client(container) logger.info( f"Uploading blob '{blob_name}'" + f"to container '{container.container_name}'" + f"on account: '{container.account_name}'" ) content_settings = ContentSettings( content_type=content_type, content_encoding=content_encoding ) blob = container.get_blob_client(blob_name) blob.upload_blob(data, content_settings=content_settings) logger.debug(f" - blob '{blob_name}' uploaded. generating sas token.") if return_sas_token: uri = get_blob_uri_with_sas_token(blob) else: uri = remove_sas_token(blob.url) logger.debug(f" - blob access url: '{uri}'.") return uri def append_blob( container: ContainerClient, blob_name: str, content_type: str, content_encoding: str, data: Any, return_sas_token: bool = True, metadata: Dict[str, str] = None, ) -> str: """ Uploads the given data to a blob record. If a blob with the given name already exist, it throws an error. Returns a uri with a SAS token to access the newly created blob. """ create_container_using_client(container) logger.info( f"Appending data to blob '{blob_name}'" + f"in container '{container.container_name}'" + f"on account: '{container.account_name}'" ) content_settings = ContentSettings( content_type=content_type, content_encoding=content_encoding ) blob = container.get_blob_client(blob_name) try: props = blob.get_blob_properties() if props.blob_type != BlobType.AppendBlob: raise Exception("blob must be an append blob") except exceptions.ResourceNotFoundError: props = blob.create_append_blob( content_settings=content_settings, metadata=metadata ) blob.append_block(data, len(data)) logger.debug(f" - blob '{blob_name}' appended. generating sas token.") if return_sas_token: uri = get_blob_uri_with_sas_token(blob) else: uri = remove_sas_token(blob.url) logger.debug(f" - blob access url: '{uri}'.") return uri def get_blob_uri_with_sas_token(blob: BlobClient): """Returns a URI for the given blob that contains a SAS Token""" sas_token = generate_blob_sas( blob.account_name, blob.container_name, blob.blob_name, account_key=blob.credential.account_key, permission=BlobSasPermissions(read=True), expiry=datetime.utcnow() + timedelta(days=14), ) return blob.url + "?" + sas_token def download_blob(blob_url: str) -> Any: """ Downloads the given blob from the container. """ blob_client = BlobClient.from_blob_url(blob_url) logger.info( f"Downloading blob '{blob_client.blob_name}'" + f"from container '{blob_client.container_name}'" + f"on account: '{blob_client.account_name}'" ) response = blob_client.download_blob().readall() logger.debug(response) return response def download_blob_properties(blob_url: str) -> BlobProperties: """Downloads the blob properties from Azure for the given blob URI""" blob_client = BlobClient.from_blob_url(blob_url) logger.info( f"Downloading blob properties '{blob_client.blob_name}'" + f"from container '{blob_client.container_name}'" + f"on account: '{blob_client.account_name}'" ) response = blob_client.get_blob_properties() logger.debug(response) return response def download_blob_metadata(blob_url: str) -> Dict[str, str]: """Downloads the blob metadata from the blob properties in Azure for the given blob URI""" return download_blob_properties(blob_url).metadata def set_blob_metadata(blob_url: str, metadata: Dict[str, str]): """Sets the provided dictionary as the metadata on the Azure blob""" blob_client = BlobClient.from_blob_url(blob_url) logger.info( f"Setting blob properties '{blob_client.blob_name}'" + f"from container '{blob_client.container_name}' on account:" + f"'{blob_client.account_name}'" ) return blob_client.set_blob_metadata(metadata=metadata) def remove_sas_token(sas_uri: str) -> str: """Removes the SAS Token from the given URI if it contains one""" index = sas_uri.find("?") if index != -1: sas_uri = sas_uri[0:index] return sas_uri def init_blob_for_streaming_upload( container: ContainerClient, blob_name: str, content_type: str, content_encoding: str, data: Any, return_sas_token: bool = True, ) -> str: """ Uploads the given data to a blob record. If a blob with the given name already exist, it throws an error. Returns a uri with a SAS token to access the newly created blob. """ create_container_using_client(container) logger.info( f"Streaming blob '{blob_name}'" + f"to container '{container.container_name}' on account:" + f"'{container.account_name}'" ) content_settings = ContentSettings( content_type=content_type, content_encoding=content_encoding ) blob = container.get_blob_client(blob_name) blob.stage_block() blob.commit_block_list() blob.upload_blob(data, content_settings=content_settings) logger.debug(f" - blob '{blob_name}' uploaded. generating sas token.") if return_sas_token: sas_token = generate_blob_sas( blob.account_name, blob.container_name, blob.blob_name, account_key=blob.credential.account_key, permission=BlobSasPermissions(read=True), expiry=datetime.utcnow() + timedelta(days=14), ) uri = blob.url + "?" + sas_token else: uri = remove_sas_token(blob.url) logger.debug(f" - blob access url: '{uri}'.") return uri class StreamedBlobState(str, Enum): not_initialized = 0 uploading = 1 committed = 2 class StreamedBlob: """Class that provides a state machine for writing blobs using the Azure Block Blob API Internally implements a state machine for uploading blob data. To use, start calling `upload_data()` to add data blocks. Each call to `upload_data()` will synchronously upload an individual block to Azure. Once all blocks have been added, call `commit()` to commit the blocks and make the blob available/readable. :param container: The container client that the blob will be uploaded to :param blob_name: The name of the blob (including optional path) within the blob container :param content_type: The HTTP content type to apply to the blob metadata :param content_encoding: The HTTP content encoding to apply to the blob metadata """ def __init__( self, container: ContainerClient, blob_name: str, content_type: str, content_encoding: str, ): self.container = container self.blob_name = blob_name self.content_settings = ContentSettings( content_type=content_type, content_encoding=content_encoding ) self.state = StreamedBlobState.not_initialized self.blob = container.get_blob_client(blob_name) self.blocks = [] def upload_data(self, data): """Synchronously uploads a block to the given block blob in Azure :param data: The data to be uploaded as a block. :type data: Union[Iterable[AnyStr], IO[AnyStr]] """ if self.state == StreamedBlobState.not_initialized: create_container_using_client(self.container) logger.info( f"Streaming blob '{self.blob_name}' to container" + f"'{self.container.container_name}'" + f"on account: '{self.container.account_name}'" ) self.initialized = True self.state = StreamedBlobState.uploading id = self._get_next_block_id() logger.debug(f"Uploading block '{id}' to {self.blob_name}") self.blob.stage_block(id, data, length=len(data)) self.blocks.append(id) def commit(self, metadata: Dict[str, str] = None): """Synchronously commits all previously uploaded blobs to the block blob :param metadata: Optional dictionary of metadata to be applied to the block blob """ if self.state == StreamedBlobState.not_initialized: raise Exception("StreamedBlob cannot commit before uploading data") elif self.state == StreamedBlobState.committed: raise Exception("StreamedBlob is already committed") logger.debug(f"Committing {len(self.blocks)} blocks {self.blob_name}") self.blob.commit_block_list( self.blocks, content_settings=self.content_settings, metadata=metadata, ) self.state = StreamedBlobState.committed logger.debug(f"Committed {self.blob_name}") def getUri(self, with_sas_token: bool = False): """Gets the full Azure Storage URI for the uploaded blob after it has been committed""" if self.state != StreamedBlobState.committed: raise Exception("Can only retrieve sas token for committed blob") if with_sas_token: return get_blob_uri_with_sas_token(self.blob) return remove_sas_token(self.blob.url) def _get_next_block_id(self): return f"{len(self.blocks):10}"
azure-quantum-python/azure-quantum/azure/quantum/storage.py/0
{ "file_path": "azure-quantum-python/azure-quantum/azure/quantum/storage.py", "repo_id": "azure-quantum-python", "token_count": 4876 }
379
"""Defines targets and helper functions for the Rigetti provider""" ## # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. ## __all__ = [ "InputParams", "Readout", "Result", "Rigetti", "RigettiTarget", ] from .result import Readout, Result from .target import InputParams, Rigetti, RigettiTarget
azure-quantum-python/azure-quantum/azure/quantum/target/rigetti/__init__.py/0
{ "file_path": "azure-quantum-python/azure-quantum/azure/quantum/target/rigetti/__init__.py", "repo_id": "azure-quantum-python", "token_count": 117 }
380
// QASM file for RQFTMultiplier with 8 bit // (see https://github.com/microsoft/Quantum/blob/main/samples/azure-quantum/resource-estimation/estimation-qiskit.ipynb) OPENQASM 2.0; include "qelib1.inc"; qreg a[8]; qreg b[8]; qreg out[16]; rz(32*pi) b[0]; rz(64*pi) b[1]; rz(128*pi) b[2]; rz(256*pi) b[3]; rz(512*pi) b[4]; rz(1024*pi) b[5]; rz(2048*pi) b[6]; rz(4096*pi) b[7]; h out[15]; rz(pi/4) out[15]; cx out[15],out[14]; rz(-pi/4) out[14]; cx out[15],out[14]; rz(pi/4) out[14]; h out[14]; rz(pi/4) out[14]; rz(pi/8) out[15]; cx out[15],out[13]; rz(-pi/8) out[13]; cx out[15],out[13]; rz(pi/8) out[13]; cx out[14],out[13]; rz(-pi/4) out[13]; cx out[14],out[13]; rz(pi/4) out[13]; h out[13]; rz(pi/4) out[13]; rz(pi/8) out[14]; rz(pi/16) out[15]; cx out[15],out[12]; rz(-pi/16) out[12]; cx out[15],out[12]; rz(pi/16) out[12]; cx out[14],out[12]; rz(-pi/8) out[12]; cx out[14],out[12]; rz(pi/8) out[12]; cx out[13],out[12]; rz(-pi/4) out[12]; cx out[13],out[12]; rz(pi/4) out[12]; h out[12]; rz(pi/4) out[12]; rz(pi/8) out[13]; rz(pi/16) out[14]; rz(pi/32) out[15]; cx out[15],out[11]; rz(-pi/32) out[11]; cx out[15],out[11]; rz(pi/32) out[11]; cx out[14],out[11]; rz(-pi/16) out[11]; cx out[14],out[11]; rz(pi/16) out[11]; cx out[13],out[11]; rz(-pi/8) out[11]; cx out[13],out[11]; rz(pi/8) out[11]; cx out[12],out[11]; rz(-pi/4) out[11]; cx out[12],out[11]; rz(pi/4) out[11]; h out[11]; rz(pi/4) out[11]; rz(pi/8) out[12]; rz(pi/16) out[13]; rz(pi/32) out[14]; rz(pi/64) out[15]; cx out[15],out[10]; rz(-pi/64) out[10]; cx out[15],out[10]; rz(pi/64) out[10]; cx out[14],out[10]; rz(-pi/32) out[10]; cx out[14],out[10]; rz(pi/32) out[10]; cx out[13],out[10]; rz(-pi/16) out[10]; cx out[13],out[10]; rz(pi/16) out[10]; cx out[12],out[10]; rz(-pi/8) out[10]; cx out[12],out[10]; rz(pi/8) out[10]; cx out[11],out[10]; rz(-pi/4) out[10]; cx out[11],out[10]; rz(pi/4) out[10]; h out[10]; rz(pi/4) out[10]; rz(pi/8) out[11]; rz(pi/16) out[12]; rz(pi/32) out[13]; rz(pi/64) out[14]; rz(pi/128) out[15]; cx out[15],out[9]; rz(-pi/128) out[9]; cx out[15],out[9]; rz(pi/256) out[15]; cx out[15],out[8]; rz(-pi/256) out[8]; cx out[15],out[8]; rz(pi/512) out[15]; cx out[15],out[7]; rz(-pi/512) out[7]; cx out[15],out[7]; rz(pi/1024) out[15]; cx out[15],out[6]; rz(-pi/1024) out[6]; cx out[15],out[6]; rz(pi/2048) out[15]; cx out[15],out[5]; rz(-pi/2048) out[5]; cx out[15],out[5]; rz(pi/4096) out[15]; cx out[15],out[4]; rz(-pi/4096) out[4]; cx out[15],out[4]; rz(pi/8192) out[15]; cx out[15],out[3]; rz(-pi/8192) out[3]; cx out[15],out[3]; rz(pi/16384) out[15]; cx out[15],out[2]; rz(-pi/16384) out[2]; cx out[15],out[2]; rz(pi/32768) out[15]; cx out[15],out[1]; rz(-pi/32768) out[1]; cx out[15],out[1]; rz(pi/32768) out[1]; rz(pi/65536) out[15]; cx out[15],out[0]; rz(-pi/65536) out[0]; cx out[15],out[0]; rz(pi/65536) out[0]; rz(pi/16384) out[2]; rz(pi/8192) out[3]; rz(pi/4096) out[4]; rz(pi/2048) out[5]; rz(pi/1024) out[6]; rz(pi/512) out[7]; rz(pi/256) out[8]; rz(pi/128) out[9]; cx out[14],out[9]; rz(-pi/64) out[9]; cx out[14],out[9]; rz(pi/128) out[14]; cx out[14],out[8]; rz(-pi/128) out[8]; cx out[14],out[8]; rz(pi/256) out[14]; cx out[14],out[7]; rz(-pi/256) out[7]; cx out[14],out[7]; rz(pi/512) out[14]; cx out[14],out[6]; rz(-pi/512) out[6]; cx out[14],out[6]; rz(pi/1024) out[14]; cx out[14],out[5]; rz(-pi/1024) out[5]; cx out[14],out[5]; rz(pi/2048) out[14]; cx out[14],out[4]; rz(-pi/2048) out[4]; cx out[14],out[4]; rz(pi/4096) out[14]; cx out[14],out[3]; rz(-pi/4096) out[3]; cx out[14],out[3]; rz(pi/8192) out[14]; cx out[14],out[2]; rz(-pi/8192) out[2]; cx out[14],out[2]; rz(pi/16384) out[14]; cx out[14],out[1]; rz(-pi/16384) out[1]; cx out[14],out[1]; rz(pi/16384) out[1]; rz(pi/32768) out[14]; cx out[14],out[0]; rz(-pi/32768) out[0]; cx out[14],out[0]; rz(pi/32768) out[0]; rz(pi/8192) out[2]; rz(pi/4096) out[3]; rz(pi/2048) out[4]; rz(pi/1024) out[5]; rz(pi/512) out[6]; rz(pi/256) out[7]; rz(pi/128) out[8]; rz(pi/64) out[9]; cx out[13],out[9]; rz(-pi/32) out[9]; cx out[13],out[9]; rz(pi/64) out[13]; cx out[13],out[8]; rz(-pi/64) out[8]; cx out[13],out[8]; rz(pi/128) out[13]; cx out[13],out[7]; rz(-pi/128) out[7]; cx out[13],out[7]; rz(pi/256) out[13]; cx out[13],out[6]; rz(-pi/256) out[6]; cx out[13],out[6]; rz(pi/512) out[13]; cx out[13],out[5]; rz(-pi/512) out[5]; cx out[13],out[5]; rz(pi/1024) out[13]; cx out[13],out[4]; rz(-pi/1024) out[4]; cx out[13],out[4]; rz(pi/2048) out[13]; cx out[13],out[3]; rz(-pi/2048) out[3]; cx out[13],out[3]; rz(pi/4096) out[13]; cx out[13],out[2]; rz(-pi/4096) out[2]; cx out[13],out[2]; rz(pi/8192) out[13]; cx out[13],out[1]; rz(-pi/8192) out[1]; cx out[13],out[1]; rz(pi/8192) out[1]; rz(pi/16384) out[13]; cx out[13],out[0]; rz(-pi/16384) out[0]; cx out[13],out[0]; rz(pi/16384) out[0]; rz(pi/4096) out[2]; rz(pi/2048) out[3]; rz(pi/1024) out[4]; rz(pi/512) out[5]; rz(pi/256) out[6]; rz(pi/128) out[7]; rz(pi/64) out[8]; rz(pi/32) out[9]; cx out[12],out[9]; rz(-pi/16) out[9]; cx out[12],out[9]; rz(pi/32) out[12]; cx out[12],out[8]; rz(-pi/32) out[8]; cx out[12],out[8]; rz(pi/64) out[12]; cx out[12],out[7]; rz(-pi/64) out[7]; cx out[12],out[7]; rz(pi/128) out[12]; cx out[12],out[6]; rz(-pi/128) out[6]; cx out[12],out[6]; rz(pi/256) out[12]; cx out[12],out[5]; rz(-pi/256) out[5]; cx out[12],out[5]; rz(pi/512) out[12]; cx out[12],out[4]; rz(-pi/512) out[4]; cx out[12],out[4]; rz(pi/1024) out[12]; cx out[12],out[3]; rz(-pi/1024) out[3]; cx out[12],out[3]; rz(pi/2048) out[12]; cx out[12],out[2]; rz(-pi/2048) out[2]; cx out[12],out[2]; rz(pi/4096) out[12]; cx out[12],out[1]; rz(-pi/4096) out[1]; cx out[12],out[1]; rz(pi/4096) out[1]; rz(pi/8192) out[12]; cx out[12],out[0]; rz(-pi/8192) out[0]; cx out[12],out[0]; rz(pi/8192) out[0]; rz(pi/2048) out[2]; rz(pi/1024) out[3]; rz(pi/512) out[4]; rz(pi/256) out[5]; rz(pi/128) out[6]; rz(pi/64) out[7]; rz(pi/32) out[8]; rz(pi/16) out[9]; cx out[11],out[9]; rz(-pi/8) out[9]; cx out[11],out[9]; rz(pi/16) out[11]; cx out[11],out[8]; rz(-pi/16) out[8]; cx out[11],out[8]; rz(pi/32) out[11]; cx out[11],out[7]; rz(-pi/32) out[7]; cx out[11],out[7]; rz(pi/64) out[11]; cx out[11],out[6]; rz(-pi/64) out[6]; cx out[11],out[6]; rz(pi/128) out[11]; cx out[11],out[5]; rz(-pi/128) out[5]; cx out[11],out[5]; rz(pi/256) out[11]; cx out[11],out[4]; rz(-pi/256) out[4]; cx out[11],out[4]; rz(pi/512) out[11]; cx out[11],out[3]; rz(-pi/512) out[3]; cx out[11],out[3]; rz(pi/1024) out[11]; cx out[11],out[2]; rz(-pi/1024) out[2]; cx out[11],out[2]; rz(pi/2048) out[11]; cx out[11],out[1]; rz(-pi/2048) out[1]; cx out[11],out[1]; rz(pi/2048) out[1]; rz(pi/4096) out[11]; cx out[11],out[0]; rz(-pi/4096) out[0]; cx out[11],out[0]; rz(pi/4096) out[0]; rz(pi/1024) out[2]; rz(pi/512) out[3]; rz(pi/256) out[4]; rz(pi/128) out[5]; rz(pi/64) out[6]; rz(pi/32) out[7]; rz(pi/16) out[8]; rz(pi/8) out[9]; cx out[10],out[9]; rz(-pi/4) out[9]; cx out[10],out[9]; rz(pi/8) out[10]; cx out[10],out[8]; rz(-pi/8) out[8]; cx out[10],out[8]; rz(pi/16) out[10]; cx out[10],out[7]; rz(-pi/16) out[7]; cx out[10],out[7]; rz(pi/32) out[10]; cx out[10],out[6]; rz(-pi/32) out[6]; cx out[10],out[6]; rz(pi/64) out[10]; cx out[10],out[5]; rz(-pi/64) out[5]; cx out[10],out[5]; rz(pi/128) out[10]; cx out[10],out[4]; rz(-pi/128) out[4]; cx out[10],out[4]; rz(pi/256) out[10]; cx out[10],out[3]; rz(-pi/256) out[3]; cx out[10],out[3]; rz(pi/512) out[10]; cx out[10],out[2]; rz(-pi/512) out[2]; cx out[10],out[2]; rz(pi/1024) out[10]; cx out[10],out[1]; rz(-pi/1024) out[1]; cx out[10],out[1]; rz(pi/1024) out[1]; rz(pi/2048) out[10]; cx out[10],out[0]; rz(-pi/2048) out[0]; cx out[10],out[0]; rz(pi/2048) out[0]; rz(pi/512) out[2]; rz(pi/256) out[3]; rz(pi/128) out[4]; rz(pi/64) out[5]; rz(pi/32) out[6]; rz(pi/16) out[7]; rz(pi/8) out[8]; rz(pi/4) out[9]; h out[9]; rz(pi/4) out[9]; cx out[9],out[8]; rz(-pi/4) out[8]; cx out[9],out[8]; rz(pi/4) out[8]; h out[8]; rz(pi/4) out[8]; rz(pi/8) out[9]; cx out[9],out[7]; rz(-pi/8) out[7]; cx out[9],out[7]; rz(pi/8) out[7]; cx out[8],out[7]; rz(-pi/4) out[7]; cx out[8],out[7]; rz(pi/4) out[7]; h out[7]; rz(pi/4) out[7]; rz(pi/8) out[8]; rz(pi/16) out[9]; cx out[9],out[6]; rz(-pi/16) out[6]; cx out[9],out[6]; rz(pi/16) out[6]; cx out[8],out[6]; rz(-pi/8) out[6]; cx out[8],out[6]; rz(pi/8) out[6]; cx out[7],out[6]; rz(-pi/4) out[6]; cx out[7],out[6]; rz(pi/4) out[6]; h out[6]; rz(pi/4) out[6]; rz(pi/8) out[7]; rz(pi/16) out[8]; rz(pi/32) out[9]; cx out[9],out[5]; rz(-pi/32) out[5]; cx out[9],out[5]; rz(pi/32) out[5]; cx out[8],out[5]; rz(-pi/16) out[5]; cx out[8],out[5]; rz(pi/16) out[5]; cx out[7],out[5]; rz(-pi/8) out[5]; cx out[7],out[5]; rz(pi/8) out[5]; cx out[6],out[5]; rz(-pi/4) out[5]; cx out[6],out[5]; rz(pi/4) out[5]; h out[5]; rz(pi/4) out[5]; rz(pi/8) out[6]; rz(pi/16) out[7]; rz(pi/32) out[8]; rz(pi/64) out[9]; cx out[9],out[4]; rz(-pi/64) out[4]; cx out[9],out[4]; rz(pi/64) out[4]; cx out[8],out[4]; rz(-pi/32) out[4]; cx out[8],out[4]; rz(pi/32) out[4]; cx out[7],out[4]; rz(-pi/16) out[4]; cx out[7],out[4]; rz(pi/16) out[4]; cx out[6],out[4]; rz(-pi/8) out[4]; cx out[6],out[4]; rz(pi/8) out[4]; cx out[5],out[4]; rz(-pi/4) out[4]; cx out[5],out[4]; rz(pi/4) out[4]; h out[4]; rz(pi/4) out[4]; rz(pi/8) out[5]; rz(pi/16) out[6]; rz(pi/32) out[7]; rz(pi/64) out[8]; rz(pi/128) out[9]; cx out[9],out[3]; rz(-pi/128) out[3]; cx out[9],out[3]; rz(pi/128) out[3]; cx out[8],out[3]; rz(-pi/64) out[3]; cx out[8],out[3]; rz(pi/64) out[3]; cx out[7],out[3]; rz(-pi/32) out[3]; cx out[7],out[3]; rz(pi/32) out[3]; cx out[6],out[3]; rz(-pi/16) out[3]; cx out[6],out[3]; rz(pi/16) out[3]; cx out[5],out[3]; rz(-pi/8) out[3]; cx out[5],out[3]; rz(pi/8) out[3]; cx out[4],out[3]; rz(-pi/4) out[3]; cx out[4],out[3]; rz(pi/4) out[3]; h out[3]; rz(pi/4) out[3]; rz(pi/8) out[4]; rz(pi/16) out[5]; rz(pi/32) out[6]; rz(pi/64) out[7]; rz(pi/128) out[8]; rz(pi/256) out[9]; cx out[9],out[2]; rz(-pi/256) out[2]; cx out[9],out[2]; rz(pi/256) out[2]; cx out[8],out[2]; rz(-pi/128) out[2]; cx out[8],out[2]; rz(pi/128) out[2]; cx out[7],out[2]; rz(-pi/64) out[2]; cx out[7],out[2]; rz(pi/64) out[2]; cx out[6],out[2]; rz(-pi/32) out[2]; cx out[6],out[2]; rz(pi/32) out[2]; cx out[5],out[2]; rz(-pi/16) out[2]; cx out[5],out[2]; rz(pi/16) out[2]; cx out[4],out[2]; rz(-pi/8) out[2]; cx out[4],out[2]; rz(pi/8) out[2]; cx out[3],out[2]; rz(-pi/4) out[2]; cx out[3],out[2]; rz(pi/4) out[2]; h out[2]; rz(pi/4) out[2]; rz(pi/8) out[3]; rz(pi/16) out[4]; rz(pi/32) out[5]; rz(pi/64) out[6]; rz(pi/128) out[7]; rz(pi/256) out[8]; rz(pi/512) out[9]; cx out[9],out[1]; rz(-pi/512) out[1]; cx out[9],out[1]; rz(pi/512) out[1]; cx out[8],out[1]; rz(-pi/256) out[1]; cx out[8],out[1]; rz(pi/256) out[1]; cx out[7],out[1]; rz(-pi/128) out[1]; cx out[7],out[1]; rz(pi/128) out[1]; cx out[6],out[1]; rz(-pi/64) out[1]; cx out[6],out[1]; rz(pi/64) out[1]; cx out[5],out[1]; rz(-pi/32) out[1]; cx out[5],out[1]; rz(pi/32) out[1]; cx out[4],out[1]; rz(-pi/16) out[1]; cx out[4],out[1]; rz(pi/16) out[1]; cx out[3],out[1]; rz(-pi/8) out[1]; cx out[3],out[1]; rz(pi/8) out[1]; cx out[2],out[1]; rz(-pi/4) out[1]; cx out[2],out[1]; rz(pi/4) out[1]; h out[1]; rz(pi/4) out[1]; rz(pi/8) out[2]; rz(pi/16) out[3]; rz(pi/32) out[4]; rz(pi/64) out[5]; rz(pi/128) out[6]; rz(pi/256) out[7]; rz(pi/512) out[8]; rz(pi/1024) out[9]; cx out[9],out[0]; rz(-pi/1024) out[0]; cx out[9],out[0]; rz(pi/1024) out[0]; cx out[8],out[0]; rz(-pi/512) out[0]; cx out[8],out[0]; rz(pi/512) out[0]; cx out[7],out[0]; rz(-pi/256) out[0]; cx out[7],out[0]; rz(pi/256) out[0]; cx out[6],out[0]; rz(-pi/128) out[0]; cx out[6],out[0]; rz(pi/128) out[0]; cx out[5],out[0]; rz(-pi/64) out[0]; cx out[5],out[0]; rz(pi/64) out[0]; cx out[4],out[0]; rz(-pi/32) out[0]; cx out[4],out[0]; rz(pi/32) out[0]; cx out[3],out[0]; rz(-pi/16) out[0]; cx out[3],out[0]; rz(pi/16) out[0]; cx out[2],out[0]; rz(-pi/8) out[0]; cx out[2],out[0]; rz(pi/8) out[0]; cx out[1],out[0]; rz(-pi/4) out[0]; cx out[1],out[0]; rz(pi/4) out[0]; h out[0]; cx b[7],out[0]; rz(-4096*pi) out[0]; cx b[7],out[0]; rz(4096*pi) out[0]; cx b[7],a[7]; rz(-4096*pi) a[7]; cx a[7],out[0]; rz(4096*pi) out[0]; cx a[7],out[0]; rz(-4096*pi) out[0]; cx b[7],a[7]; rz(4096*pi) a[7]; cx a[7],out[0]; rz(-4096*pi) out[0]; cx a[7],out[0]; rz(4096*pi) out[0]; cx b[6],out[0]; rz(-2048*pi) out[0]; cx b[6],out[0]; rz(2048*pi) out[0]; rz(2048*pi) b[7]; cx b[7],out[1]; rz(-2048*pi) out[1]; cx b[7],out[1]; rz(2048*pi) out[1]; cx b[7],a[7]; rz(-2048*pi) a[7]; cx a[7],out[1]; rz(2048*pi) out[1]; cx a[7],out[1]; rz(-2048*pi) out[1]; cx b[7],a[7]; rz(2048*pi) a[7]; cx a[7],out[1]; rz(-2048*pi) out[1]; cx a[7],out[1]; rz(2048*pi) out[1]; rz(1024*pi) b[7]; cx b[7],out[2]; rz(-1024*pi) out[2]; cx b[7],out[2]; rz(1024*pi) out[2]; cx b[7],a[7]; rz(-1024*pi) a[7]; cx a[7],out[2]; rz(1024*pi) out[2]; cx a[7],out[2]; rz(-1024*pi) out[2]; cx b[7],a[7]; rz(1024*pi) a[7]; cx a[7],out[2]; rz(-1024*pi) out[2]; cx a[7],out[2]; rz(1024*pi) out[2]; rz(512*pi) b[7]; cx b[7],out[3]; rz(-512*pi) out[3]; cx b[7],out[3]; rz(512*pi) out[3]; cx b[7],a[7]; rz(-512*pi) a[7]; cx a[7],out[3]; rz(512*pi) out[3]; cx a[7],out[3]; rz(-512*pi) out[3]; cx b[7],a[7]; rz(512*pi) a[7]; cx a[7],out[3]; rz(-512*pi) out[3]; cx a[7],out[3]; rz(512*pi) out[3]; rz(256*pi) b[7]; cx b[7],out[4]; rz(-256*pi) out[4]; cx b[7],out[4]; rz(256*pi) out[4]; cx b[7],a[7]; rz(-256*pi) a[7]; cx a[7],out[4]; rz(256*pi) out[4]; cx a[7],out[4]; rz(-256*pi) out[4]; cx b[7],a[7]; rz(256*pi) a[7]; cx a[7],out[4]; rz(-256*pi) out[4]; cx a[7],out[4]; rz(256*pi) out[4]; rz(128*pi) b[7]; cx b[7],out[5]; rz(-128*pi) out[5]; cx b[7],out[5]; rz(128*pi) out[5]; cx b[7],a[7]; rz(-128*pi) a[7]; cx a[7],out[5]; rz(128*pi) out[5]; cx a[7],out[5]; rz(-128*pi) out[5]; cx b[7],a[7]; rz(128*pi) a[7]; cx a[7],out[5]; rz(-128*pi) out[5]; cx a[7],out[5]; rz(128*pi) out[5]; rz(64*pi) b[7]; cx b[7],out[6]; rz(-64*pi) out[6]; cx b[7],out[6]; rz(64*pi) out[6]; cx b[7],a[7]; rz(-64*pi) a[7]; cx a[7],out[6]; rz(64*pi) out[6]; cx a[7],out[6]; rz(-64*pi) out[6]; cx b[7],a[7]; rz(64*pi) a[7]; cx a[7],out[6]; rz(-64*pi) out[6]; cx a[7],out[6]; rz(64*pi) out[6]; rz(32*pi) b[7]; cx b[7],out[7]; rz(-32*pi) out[7]; cx b[7],out[7]; rz(32*pi) out[7]; cx b[7],a[7]; rz(-32*pi) a[7]; cx a[7],out[7]; rz(32*pi) out[7]; cx a[7],out[7]; rz(-32*pi) out[7]; cx b[7],a[7]; rz(32*pi) a[7]; cx a[7],out[7]; rz(-32*pi) out[7]; cx a[7],out[7]; rz(32*pi) out[7]; rz(16*pi) b[7]; cx b[7],out[8]; rz(-16*pi) out[8]; cx b[7],out[8]; rz(16*pi) out[8]; cx b[7],a[7]; rz(-16*pi) a[7]; cx a[7],out[8]; rz(16*pi) out[8]; cx a[7],out[8]; rz(-16*pi) out[8]; cx b[7],a[7]; rz(16*pi) a[7]; cx a[7],out[8]; rz(-16*pi) out[8]; cx a[7],out[8]; rz(16*pi) out[8]; rz(8*pi) b[7]; cx b[7],out[9]; rz(-8*pi) out[9]; cx b[7],out[9]; rz(8*pi) out[9]; cx b[7],a[7]; rz(-8*pi) a[7]; cx a[7],out[9]; rz(8*pi) out[9]; cx a[7],out[9]; rz(-8*pi) out[9]; cx b[7],a[7]; rz(8*pi) a[7]; cx a[7],out[9]; rz(-8*pi) out[9]; cx a[7],out[9]; rz(8*pi) out[9]; rz(4*pi) b[7]; cx b[7],out[10]; rz(-4*pi) out[10]; cx b[7],out[10]; rz(4*pi) out[10]; cx b[7],a[7]; rz(-4*pi) a[7]; cx a[7],out[10]; rz(4*pi) out[10]; cx a[7],out[10]; rz(-4*pi) out[10]; cx b[7],a[7]; rz(4*pi) a[7]; cx a[7],out[10]; rz(-4*pi) out[10]; cx a[7],out[10]; rz(4*pi) out[10]; rz(2*pi) b[7]; cx b[7],out[11]; rz(-2*pi) out[11]; cx b[7],out[11]; rz(2*pi) out[11]; cx b[7],a[7]; rz(-2*pi) a[7]; cx a[7],out[11]; rz(2*pi) out[11]; cx a[7],out[11]; rz(-2*pi) out[11]; cx b[7],a[7]; rz(2*pi) a[7]; cx a[7],out[11]; rz(-2*pi) out[11]; cx a[7],out[11]; rz(2*pi) out[11]; rz(pi) b[7]; cx b[7],out[12]; rz(-pi) out[12]; cx b[7],out[12]; rz(pi) out[12]; cx b[7],a[7]; rz(-pi) a[7]; cx a[7],out[12]; rz(pi) out[12]; cx a[7],out[12]; rz(-pi) out[12]; cx b[7],a[7]; rz(pi) a[7]; cx a[7],out[12]; rz(-pi) out[12]; cx a[7],out[12]; rz(pi) out[12]; rz(pi/2) b[7]; cx b[7],out[13]; rz(-pi/2) out[13]; cx b[7],out[13]; rz(pi/2) out[13]; cx b[7],a[7]; rz(-pi/2) a[7]; cx a[7],out[13]; rz(pi/2) out[13]; cx a[7],out[13]; rz(-pi/2) out[13]; cx b[7],a[7]; rz(pi/2) a[7]; cx a[7],out[13]; rz(-pi/2) out[13]; cx a[7],out[13]; rz(pi/2) out[13]; rz(pi/4) b[7]; cx b[7],out[14]; rz(-pi/4) out[14]; cx b[7],out[14]; rz(pi/4) out[14]; cx b[7],a[7]; rz(-pi/4) a[7]; cx a[7],out[14]; rz(pi/4) out[14]; cx a[7],out[14]; rz(-pi/4) out[14]; cx b[7],a[7]; rz(pi/4) a[7]; cx a[7],out[14]; rz(-pi/4) out[14]; cx a[7],out[14]; rz(pi/4) out[14]; rz(pi/8) b[7]; cx b[7],out[15]; rz(-pi/8) out[15]; cx b[7],out[15]; rz(pi/8) out[15]; cx b[7],a[7]; rz(-pi/8) a[7]; cx a[7],out[15]; rz(pi/8) out[15]; cx a[7],out[15]; rz(-pi/8) out[15]; cx b[7],a[7]; rz(pi/8) a[7]; cx a[7],out[15]; rz(-pi/8) out[15]; cx a[7],out[15]; rz(pi/8) out[15]; cx b[6],a[7]; rz(-2048*pi) a[7]; cx a[7],out[0]; rz(2048*pi) out[0]; cx a[7],out[0]; rz(-2048*pi) out[0]; cx b[6],a[7]; rz(2048*pi) a[7]; cx a[7],out[0]; rz(-2048*pi) out[0]; cx a[7],out[0]; rz(2048*pi) out[0]; cx b[5],out[0]; rz(-1024*pi) out[0]; cx b[5],out[0]; rz(1024*pi) out[0]; rz(1024*pi) b[6]; cx b[6],out[1]; rz(-1024*pi) out[1]; cx b[6],out[1]; rz(1024*pi) out[1]; cx b[6],a[7]; rz(-1024*pi) a[7]; cx a[7],out[1]; rz(1024*pi) out[1]; cx a[7],out[1]; rz(-1024*pi) out[1]; cx b[6],a[7]; rz(1024*pi) a[7]; cx a[7],out[1]; rz(-1024*pi) out[1]; cx a[7],out[1]; rz(1024*pi) out[1]; rz(512*pi) b[6]; cx b[6],out[2]; rz(-512*pi) out[2]; cx b[6],out[2]; rz(512*pi) out[2]; cx b[6],a[7]; rz(-512*pi) a[7]; cx a[7],out[2]; rz(512*pi) out[2]; cx a[7],out[2]; rz(-512*pi) out[2]; cx b[6],a[7]; rz(512*pi) a[7]; cx a[7],out[2]; rz(-512*pi) out[2]; cx a[7],out[2]; rz(512*pi) out[2]; rz(256*pi) b[6]; cx b[6],out[3]; rz(-256*pi) out[3]; cx b[6],out[3]; rz(256*pi) out[3]; cx b[6],a[7]; rz(-256*pi) a[7]; cx a[7],out[3]; rz(256*pi) out[3]; cx a[7],out[3]; rz(-256*pi) out[3]; cx b[6],a[7]; rz(256*pi) a[7]; cx a[7],out[3]; rz(-256*pi) out[3]; cx a[7],out[3]; rz(256*pi) out[3]; rz(128*pi) b[6]; cx b[6],out[4]; rz(-128*pi) out[4]; cx b[6],out[4]; rz(128*pi) out[4]; cx b[6],a[7]; rz(-128*pi) a[7]; cx a[7],out[4]; rz(128*pi) out[4]; cx a[7],out[4]; rz(-128*pi) out[4]; cx b[6],a[7]; rz(128*pi) a[7]; cx a[7],out[4]; rz(-128*pi) out[4]; cx a[7],out[4]; rz(128*pi) out[4]; rz(64*pi) b[6]; cx b[6],out[5]; rz(-64*pi) out[5]; cx b[6],out[5]; rz(64*pi) out[5]; cx b[6],a[7]; rz(-64*pi) a[7]; cx a[7],out[5]; rz(64*pi) out[5]; cx a[7],out[5]; rz(-64*pi) out[5]; cx b[6],a[7]; rz(64*pi) a[7]; cx a[7],out[5]; rz(-64*pi) out[5]; cx a[7],out[5]; rz(64*pi) out[5]; rz(32*pi) b[6]; cx b[6],out[6]; rz(-32*pi) out[6]; cx b[6],out[6]; rz(32*pi) out[6]; cx b[6],a[7]; rz(-32*pi) a[7]; cx a[7],out[6]; rz(32*pi) out[6]; cx a[7],out[6]; rz(-32*pi) out[6]; cx b[6],a[7]; rz(32*pi) a[7]; cx a[7],out[6]; rz(-32*pi) out[6]; cx a[7],out[6]; rz(32*pi) out[6]; rz(16*pi) b[6]; cx b[6],out[7]; rz(-16*pi) out[7]; cx b[6],out[7]; rz(16*pi) out[7]; cx b[6],a[7]; rz(-16*pi) a[7]; cx a[7],out[7]; rz(16*pi) out[7]; cx a[7],out[7]; rz(-16*pi) out[7]; cx b[6],a[7]; rz(16*pi) a[7]; cx a[7],out[7]; rz(-16*pi) out[7]; cx a[7],out[7]; rz(16*pi) out[7]; rz(8*pi) b[6]; cx b[6],out[8]; rz(-8*pi) out[8]; cx b[6],out[8]; rz(8*pi) out[8]; cx b[6],a[7]; rz(-8*pi) a[7]; cx a[7],out[8]; rz(8*pi) out[8]; cx a[7],out[8]; rz(-8*pi) out[8]; cx b[6],a[7]; rz(8*pi) a[7]; cx a[7],out[8]; rz(-8*pi) out[8]; cx a[7],out[8]; rz(8*pi) out[8]; rz(4*pi) b[6]; cx b[6],out[9]; rz(-4*pi) out[9]; cx b[6],out[9]; rz(4*pi) out[9]; cx b[6],a[7]; rz(-4*pi) a[7]; cx a[7],out[9]; rz(4*pi) out[9]; cx a[7],out[9]; rz(-4*pi) out[9]; cx b[6],a[7]; rz(4*pi) a[7]; cx a[7],out[9]; rz(-4*pi) out[9]; cx a[7],out[9]; rz(4*pi) out[9]; rz(2*pi) b[6]; cx b[6],out[10]; rz(-2*pi) out[10]; cx b[6],out[10]; rz(2*pi) out[10]; cx b[6],a[7]; rz(-2*pi) a[7]; cx a[7],out[10]; rz(2*pi) out[10]; cx a[7],out[10]; rz(-2*pi) out[10]; cx b[6],a[7]; rz(2*pi) a[7]; cx a[7],out[10]; rz(-2*pi) out[10]; cx a[7],out[10]; rz(2*pi) out[10]; rz(pi) b[6]; cx b[6],out[11]; rz(-pi) out[11]; cx b[6],out[11]; rz(pi) out[11]; cx b[6],a[7]; rz(-pi) a[7]; cx a[7],out[11]; rz(pi) out[11]; cx a[7],out[11]; rz(-pi) out[11]; cx b[6],a[7]; rz(pi) a[7]; cx a[7],out[11]; rz(-pi) out[11]; cx a[7],out[11]; rz(pi) out[11]; rz(pi/2) b[6]; cx b[6],out[12]; rz(-pi/2) out[12]; cx b[6],out[12]; rz(pi/2) out[12]; cx b[6],a[7]; rz(-pi/2) a[7]; cx a[7],out[12]; rz(pi/2) out[12]; cx a[7],out[12]; rz(-pi/2) out[12]; cx b[6],a[7]; rz(pi/2) a[7]; cx a[7],out[12]; rz(-pi/2) out[12]; cx a[7],out[12]; rz(pi/2) out[12]; rz(pi/4) b[6]; cx b[6],out[13]; rz(-pi/4) out[13]; cx b[6],out[13]; rz(pi/4) out[13]; cx b[6],a[7]; rz(-pi/4) a[7]; cx a[7],out[13]; rz(pi/4) out[13]; cx a[7],out[13]; rz(-pi/4) out[13]; cx b[6],a[7]; rz(pi/4) a[7]; cx a[7],out[13]; rz(-pi/4) out[13]; cx a[7],out[13]; rz(pi/4) out[13]; rz(pi/8) b[6]; cx b[6],out[14]; rz(-pi/8) out[14]; cx b[6],out[14]; rz(pi/8) out[14]; cx b[6],a[7]; rz(-pi/8) a[7]; cx a[7],out[14]; rz(pi/8) out[14]; cx a[7],out[14]; rz(-pi/8) out[14]; cx b[6],a[7]; rz(pi/8) a[7]; cx a[7],out[14]; rz(-pi/8) out[14]; cx a[7],out[14]; rz(pi/8) out[14]; rz(pi/16) b[6]; cx b[6],out[15]; rz(-pi/16) out[15]; cx b[6],out[15]; rz(pi/16) out[15]; cx b[6],a[7]; rz(-pi/16) a[7]; cx a[7],out[15]; rz(pi/16) out[15]; cx a[7],out[15]; rz(-pi/16) out[15]; cx b[6],a[7]; rz(pi/16) a[7]; cx a[7],out[15]; rz(-pi/16) out[15]; cx a[7],out[15]; rz(pi/16) out[15]; cx b[5],a[7]; rz(-1024*pi) a[7]; cx a[7],out[0]; rz(1024*pi) out[0]; cx a[7],out[0]; rz(-1024*pi) out[0]; cx b[5],a[7]; rz(1024*pi) a[7]; cx a[7],out[0]; rz(-1024*pi) out[0]; cx a[7],out[0]; rz(1024*pi) out[0]; cx b[4],out[0]; rz(-512*pi) out[0]; cx b[4],out[0]; rz(512*pi) out[0]; rz(512*pi) b[5]; cx b[5],out[1]; rz(-512*pi) out[1]; cx b[5],out[1]; rz(512*pi) out[1]; cx b[5],a[7]; rz(-512*pi) a[7]; cx a[7],out[1]; rz(512*pi) out[1]; cx a[7],out[1]; rz(-512*pi) out[1]; cx b[5],a[7]; rz(512*pi) a[7]; cx a[7],out[1]; rz(-512*pi) out[1]; cx a[7],out[1]; rz(512*pi) out[1]; rz(256*pi) b[5]; cx b[5],out[2]; rz(-256*pi) out[2]; cx b[5],out[2]; rz(256*pi) out[2]; cx b[5],a[7]; rz(-256*pi) a[7]; cx a[7],out[2]; rz(256*pi) out[2]; cx a[7],out[2]; rz(-256*pi) out[2]; cx b[5],a[7]; rz(256*pi) a[7]; cx a[7],out[2]; rz(-256*pi) out[2]; cx a[7],out[2]; rz(256*pi) out[2]; rz(128*pi) b[5]; cx b[5],out[3]; rz(-128*pi) out[3]; cx b[5],out[3]; rz(128*pi) out[3]; cx b[5],a[7]; rz(-128*pi) a[7]; cx a[7],out[3]; rz(128*pi) out[3]; cx a[7],out[3]; rz(-128*pi) out[3]; cx b[5],a[7]; rz(128*pi) a[7]; cx a[7],out[3]; rz(-128*pi) out[3]; cx a[7],out[3]; rz(128*pi) out[3]; rz(64*pi) b[5]; cx b[5],out[4]; rz(-64*pi) out[4]; cx b[5],out[4]; rz(64*pi) out[4]; cx b[5],a[7]; rz(-64*pi) a[7]; cx a[7],out[4]; rz(64*pi) out[4]; cx a[7],out[4]; rz(-64*pi) out[4]; cx b[5],a[7]; rz(64*pi) a[7]; cx a[7],out[4]; rz(-64*pi) out[4]; cx a[7],out[4]; rz(64*pi) out[4]; rz(32*pi) b[5]; cx b[5],out[5]; rz(-32*pi) out[5]; cx b[5],out[5]; rz(32*pi) out[5]; cx b[5],a[7]; rz(-32*pi) a[7]; cx a[7],out[5]; rz(32*pi) out[5]; cx a[7],out[5]; rz(-32*pi) out[5]; cx b[5],a[7]; rz(32*pi) a[7]; cx a[7],out[5]; rz(-32*pi) out[5]; cx a[7],out[5]; rz(32*pi) out[5]; rz(16*pi) b[5]; cx b[5],out[6]; rz(-16*pi) out[6]; cx b[5],out[6]; rz(16*pi) out[6]; cx b[5],a[7]; rz(-16*pi) a[7]; cx a[7],out[6]; rz(16*pi) out[6]; cx a[7],out[6]; rz(-16*pi) out[6]; cx b[5],a[7]; rz(16*pi) a[7]; cx a[7],out[6]; rz(-16*pi) out[6]; cx a[7],out[6]; rz(16*pi) out[6]; rz(8*pi) b[5]; cx b[5],out[7]; rz(-8*pi) out[7]; cx b[5],out[7]; rz(8*pi) out[7]; cx b[5],a[7]; rz(-8*pi) a[7]; cx a[7],out[7]; rz(8*pi) out[7]; cx a[7],out[7]; rz(-8*pi) out[7]; cx b[5],a[7]; rz(8*pi) a[7]; cx a[7],out[7]; rz(-8*pi) out[7]; cx a[7],out[7]; rz(8*pi) out[7]; rz(4*pi) b[5]; cx b[5],out[8]; rz(-4*pi) out[8]; cx b[5],out[8]; rz(4*pi) out[8]; cx b[5],a[7]; rz(-4*pi) a[7]; cx a[7],out[8]; rz(4*pi) out[8]; cx a[7],out[8]; rz(-4*pi) out[8]; cx b[5],a[7]; rz(4*pi) a[7]; cx a[7],out[8]; rz(-4*pi) out[8]; cx a[7],out[8]; rz(4*pi) out[8]; rz(2*pi) b[5]; cx b[5],out[9]; rz(-2*pi) out[9]; cx b[5],out[9]; rz(2*pi) out[9]; cx b[5],a[7]; rz(-2*pi) a[7]; cx a[7],out[9]; rz(2*pi) out[9]; cx a[7],out[9]; rz(-2*pi) out[9]; cx b[5],a[7]; rz(2*pi) a[7]; cx a[7],out[9]; rz(-2*pi) out[9]; cx a[7],out[9]; rz(2*pi) out[9]; rz(pi) b[5]; cx b[5],out[10]; rz(-pi) out[10]; cx b[5],out[10]; rz(pi) out[10]; cx b[5],a[7]; rz(-pi) a[7]; cx a[7],out[10]; rz(pi) out[10]; cx a[7],out[10]; rz(-pi) out[10]; cx b[5],a[7]; rz(pi) a[7]; cx a[7],out[10]; rz(-pi) out[10]; cx a[7],out[10]; rz(pi) out[10]; rz(pi/2) b[5]; cx b[5],out[11]; rz(-pi/2) out[11]; cx b[5],out[11]; rz(pi/2) out[11]; cx b[5],a[7]; rz(-pi/2) a[7]; cx a[7],out[11]; rz(pi/2) out[11]; cx a[7],out[11]; rz(-pi/2) out[11]; cx b[5],a[7]; rz(pi/2) a[7]; cx a[7],out[11]; rz(-pi/2) out[11]; cx a[7],out[11]; rz(pi/2) out[11]; rz(pi/4) b[5]; cx b[5],out[12]; rz(-pi/4) out[12]; cx b[5],out[12]; rz(pi/4) out[12]; cx b[5],a[7]; rz(-pi/4) a[7]; cx a[7],out[12]; rz(pi/4) out[12]; cx a[7],out[12]; rz(-pi/4) out[12]; cx b[5],a[7]; rz(pi/4) a[7]; cx a[7],out[12]; rz(-pi/4) out[12]; cx a[7],out[12]; rz(pi/4) out[12]; rz(pi/8) b[5]; cx b[5],out[13]; rz(-pi/8) out[13]; cx b[5],out[13]; rz(pi/8) out[13]; cx b[5],a[7]; rz(-pi/8) a[7]; cx a[7],out[13]; rz(pi/8) out[13]; cx a[7],out[13]; rz(-pi/8) out[13]; cx b[5],a[7]; rz(pi/8) a[7]; cx a[7],out[13]; rz(-pi/8) out[13]; cx a[7],out[13]; rz(pi/8) out[13]; rz(pi/16) b[5]; cx b[5],out[14]; rz(-pi/16) out[14]; cx b[5],out[14]; rz(pi/16) out[14]; cx b[5],a[7]; rz(-pi/16) a[7]; cx a[7],out[14]; rz(pi/16) out[14]; cx a[7],out[14]; rz(-pi/16) out[14]; cx b[5],a[7]; rz(pi/16) a[7]; cx a[7],out[14]; rz(-pi/16) out[14]; cx a[7],out[14]; rz(pi/16) out[14]; rz(pi/32) b[5]; cx b[5],out[15]; rz(-pi/32) out[15]; cx b[5],out[15]; rz(pi/32) out[15]; cx b[5],a[7]; rz(-pi/32) a[7]; cx a[7],out[15]; rz(pi/32) out[15]; cx a[7],out[15]; rz(-pi/32) out[15]; cx b[5],a[7]; rz(pi/32) a[7]; cx a[7],out[15]; rz(-pi/32) out[15]; cx a[7],out[15]; rz(pi/32) out[15]; cx b[4],a[7]; rz(-512*pi) a[7]; cx a[7],out[0]; rz(512*pi) out[0]; cx a[7],out[0]; rz(-512*pi) out[0]; cx b[4],a[7]; rz(512*pi) a[7]; cx a[7],out[0]; rz(-512*pi) out[0]; cx a[7],out[0]; rz(512*pi) out[0]; cx b[3],out[0]; rz(-256*pi) out[0]; cx b[3],out[0]; rz(256*pi) out[0]; rz(256*pi) b[4]; cx b[4],out[1]; rz(-256*pi) out[1]; cx b[4],out[1]; rz(256*pi) out[1]; cx b[4],a[7]; rz(-256*pi) a[7]; cx a[7],out[1]; rz(256*pi) out[1]; cx a[7],out[1]; rz(-256*pi) out[1]; cx b[4],a[7]; rz(256*pi) a[7]; cx a[7],out[1]; rz(-256*pi) out[1]; cx a[7],out[1]; rz(256*pi) out[1]; rz(128*pi) b[4]; cx b[4],out[2]; rz(-128*pi) out[2]; cx b[4],out[2]; rz(128*pi) out[2]; cx b[4],a[7]; rz(-128*pi) a[7]; cx a[7],out[2]; rz(128*pi) out[2]; cx a[7],out[2]; rz(-128*pi) out[2]; cx b[4],a[7]; rz(128*pi) a[7]; cx a[7],out[2]; rz(-128*pi) out[2]; cx a[7],out[2]; rz(128*pi) out[2]; rz(64*pi) b[4]; cx b[4],out[3]; rz(-64*pi) out[3]; cx b[4],out[3]; rz(64*pi) out[3]; cx b[4],a[7]; rz(-64*pi) a[7]; cx a[7],out[3]; rz(64*pi) out[3]; cx a[7],out[3]; rz(-64*pi) out[3]; cx b[4],a[7]; rz(64*pi) a[7]; cx a[7],out[3]; rz(-64*pi) out[3]; cx a[7],out[3]; rz(64*pi) out[3]; rz(32*pi) b[4]; cx b[4],out[4]; rz(-32*pi) out[4]; cx b[4],out[4]; rz(32*pi) out[4]; cx b[4],a[7]; rz(-32*pi) a[7]; cx a[7],out[4]; rz(32*pi) out[4]; cx a[7],out[4]; rz(-32*pi) out[4]; cx b[4],a[7]; rz(32*pi) a[7]; cx a[7],out[4]; rz(-32*pi) out[4]; cx a[7],out[4]; rz(32*pi) out[4]; rz(16*pi) b[4]; cx b[4],out[5]; rz(-16*pi) out[5]; cx b[4],out[5]; rz(16*pi) out[5]; cx b[4],a[7]; rz(-16*pi) a[7]; cx a[7],out[5]; rz(16*pi) out[5]; cx a[7],out[5]; rz(-16*pi) out[5]; cx b[4],a[7]; rz(16*pi) a[7]; cx a[7],out[5]; rz(-16*pi) out[5]; cx a[7],out[5]; rz(16*pi) out[5]; rz(8*pi) b[4]; cx b[4],out[6]; rz(-8*pi) out[6]; cx b[4],out[6]; rz(8*pi) out[6]; cx b[4],a[7]; rz(-8*pi) a[7]; cx a[7],out[6]; rz(8*pi) out[6]; cx a[7],out[6]; rz(-8*pi) out[6]; cx b[4],a[7]; rz(8*pi) a[7]; cx a[7],out[6]; rz(-8*pi) out[6]; cx a[7],out[6]; rz(8*pi) out[6]; rz(4*pi) b[4]; cx b[4],out[7]; rz(-4*pi) out[7]; cx b[4],out[7]; rz(4*pi) out[7]; cx b[4],a[7]; rz(-4*pi) a[7]; cx a[7],out[7]; rz(4*pi) out[7]; cx a[7],out[7]; rz(-4*pi) out[7]; cx b[4],a[7]; rz(4*pi) a[7]; cx a[7],out[7]; rz(-4*pi) out[7]; cx a[7],out[7]; rz(4*pi) out[7]; rz(2*pi) b[4]; cx b[4],out[8]; rz(-2*pi) out[8]; cx b[4],out[8]; rz(2*pi) out[8]; cx b[4],a[7]; rz(-2*pi) a[7]; cx a[7],out[8]; rz(2*pi) out[8]; cx a[7],out[8]; rz(-2*pi) out[8]; cx b[4],a[7]; rz(2*pi) a[7]; cx a[7],out[8]; rz(-2*pi) out[8]; cx a[7],out[8]; rz(2*pi) out[8]; rz(pi) b[4]; cx b[4],out[9]; rz(-pi) out[9]; cx b[4],out[9]; rz(pi) out[9]; cx b[4],a[7]; rz(-pi) a[7]; cx a[7],out[9]; rz(pi) out[9]; cx a[7],out[9]; rz(-pi) out[9]; cx b[4],a[7]; rz(pi) a[7]; cx a[7],out[9]; rz(-pi) out[9]; cx a[7],out[9]; rz(pi) out[9]; rz(pi/2) b[4]; cx b[4],out[10]; rz(-pi/2) out[10]; cx b[4],out[10]; rz(pi/2) out[10]; cx b[4],a[7]; rz(-pi/2) a[7]; cx a[7],out[10]; rz(pi/2) out[10]; cx a[7],out[10]; rz(-pi/2) out[10]; cx b[4],a[7]; rz(pi/2) a[7]; cx a[7],out[10]; rz(-pi/2) out[10]; cx a[7],out[10]; rz(pi/2) out[10]; rz(pi/4) b[4]; cx b[4],out[11]; rz(-pi/4) out[11]; cx b[4],out[11]; rz(pi/4) out[11]; cx b[4],a[7]; rz(-pi/4) a[7]; cx a[7],out[11]; rz(pi/4) out[11]; cx a[7],out[11]; rz(-pi/4) out[11]; cx b[4],a[7]; rz(pi/4) a[7]; cx a[7],out[11]; rz(-pi/4) out[11]; cx a[7],out[11]; rz(pi/4) out[11]; rz(pi/8) b[4]; cx b[4],out[12]; rz(-pi/8) out[12]; cx b[4],out[12]; rz(pi/8) out[12]; cx b[4],a[7]; rz(-pi/8) a[7]; cx a[7],out[12]; rz(pi/8) out[12]; cx a[7],out[12]; rz(-pi/8) out[12]; cx b[4],a[7]; rz(pi/8) a[7]; cx a[7],out[12]; rz(-pi/8) out[12]; cx a[7],out[12]; rz(pi/8) out[12]; rz(pi/16) b[4]; cx b[4],out[13]; rz(-pi/16) out[13]; cx b[4],out[13]; rz(pi/16) out[13]; cx b[4],a[7]; rz(-pi/16) a[7]; cx a[7],out[13]; rz(pi/16) out[13]; cx a[7],out[13]; rz(-pi/16) out[13]; cx b[4],a[7]; rz(pi/16) a[7]; cx a[7],out[13]; rz(-pi/16) out[13]; cx a[7],out[13]; rz(pi/16) out[13]; rz(pi/32) b[4]; cx b[4],out[14]; rz(-pi/32) out[14]; cx b[4],out[14]; rz(pi/32) out[14]; cx b[4],a[7]; rz(-pi/32) a[7]; cx a[7],out[14]; rz(pi/32) out[14]; cx a[7],out[14]; rz(-pi/32) out[14]; cx b[4],a[7]; rz(pi/32) a[7]; cx a[7],out[14]; rz(-pi/32) out[14]; cx a[7],out[14]; rz(pi/32) out[14]; rz(pi/64) b[4]; cx b[4],out[15]; rz(-pi/64) out[15]; cx b[4],out[15]; rz(pi/64) out[15]; cx b[4],a[7]; rz(-pi/64) a[7]; cx a[7],out[15]; rz(pi/64) out[15]; cx a[7],out[15]; rz(-pi/64) out[15]; cx b[4],a[7]; rz(pi/64) a[7]; cx a[7],out[15]; rz(-pi/64) out[15]; cx a[7],out[15]; rz(pi/64) out[15]; cx b[3],a[7]; rz(-256*pi) a[7]; cx a[7],out[0]; rz(256*pi) out[0]; cx a[7],out[0]; rz(-256*pi) out[0]; cx b[3],a[7]; rz(256*pi) a[7]; cx a[7],out[0]; rz(-256*pi) out[0]; cx a[7],out[0]; rz(256*pi) out[0]; cx b[2],out[0]; rz(-128*pi) out[0]; cx b[2],out[0]; rz(128*pi) out[0]; rz(128*pi) b[3]; cx b[3],out[1]; rz(-128*pi) out[1]; cx b[3],out[1]; rz(128*pi) out[1]; cx b[3],a[7]; rz(-128*pi) a[7]; cx a[7],out[1]; rz(128*pi) out[1]; cx a[7],out[1]; rz(-128*pi) out[1]; cx b[3],a[7]; rz(128*pi) a[7]; cx a[7],out[1]; rz(-128*pi) out[1]; cx a[7],out[1]; rz(128*pi) out[1]; rz(64*pi) b[3]; cx b[3],out[2]; rz(-64*pi) out[2]; cx b[3],out[2]; rz(64*pi) out[2]; cx b[3],a[7]; rz(-64*pi) a[7]; cx a[7],out[2]; rz(64*pi) out[2]; cx a[7],out[2]; rz(-64*pi) out[2]; cx b[3],a[7]; rz(64*pi) a[7]; cx a[7],out[2]; rz(-64*pi) out[2]; cx a[7],out[2]; rz(64*pi) out[2]; rz(32*pi) b[3]; cx b[3],out[3]; rz(-32*pi) out[3]; cx b[3],out[3]; rz(32*pi) out[3]; cx b[3],a[7]; rz(-32*pi) a[7]; cx a[7],out[3]; rz(32*pi) out[3]; cx a[7],out[3]; rz(-32*pi) out[3]; cx b[3],a[7]; rz(32*pi) a[7]; cx a[7],out[3]; rz(-32*pi) out[3]; cx a[7],out[3]; rz(32*pi) out[3]; rz(16*pi) b[3]; cx b[3],out[4]; rz(-16*pi) out[4]; cx b[3],out[4]; rz(16*pi) out[4]; cx b[3],a[7]; rz(-16*pi) a[7]; cx a[7],out[4]; rz(16*pi) out[4]; cx a[7],out[4]; rz(-16*pi) out[4]; cx b[3],a[7]; rz(16*pi) a[7]; cx a[7],out[4]; rz(-16*pi) out[4]; cx a[7],out[4]; rz(16*pi) out[4]; rz(8*pi) b[3]; cx b[3],out[5]; rz(-8*pi) out[5]; cx b[3],out[5]; rz(8*pi) out[5]; cx b[3],a[7]; rz(-8*pi) a[7]; cx a[7],out[5]; rz(8*pi) out[5]; cx a[7],out[5]; rz(-8*pi) out[5]; cx b[3],a[7]; rz(8*pi) a[7]; cx a[7],out[5]; rz(-8*pi) out[5]; cx a[7],out[5]; rz(8*pi) out[5]; rz(4*pi) b[3]; cx b[3],out[6]; rz(-4*pi) out[6]; cx b[3],out[6]; rz(4*pi) out[6]; cx b[3],a[7]; rz(-4*pi) a[7]; cx a[7],out[6]; rz(4*pi) out[6]; cx a[7],out[6]; rz(-4*pi) out[6]; cx b[3],a[7]; rz(4*pi) a[7]; cx a[7],out[6]; rz(-4*pi) out[6]; cx a[7],out[6]; rz(4*pi) out[6]; rz(2*pi) b[3]; cx b[3],out[7]; rz(-2*pi) out[7]; cx b[3],out[7]; rz(2*pi) out[7]; cx b[3],a[7]; rz(-2*pi) a[7]; cx a[7],out[7]; rz(2*pi) out[7]; cx a[7],out[7]; rz(-2*pi) out[7]; cx b[3],a[7]; rz(2*pi) a[7]; cx a[7],out[7]; rz(-2*pi) out[7]; cx a[7],out[7]; rz(2*pi) out[7]; rz(pi) b[3]; cx b[3],out[8]; rz(-pi) out[8]; cx b[3],out[8]; rz(pi) out[8]; cx b[3],a[7]; rz(-pi) a[7]; cx a[7],out[8]; rz(pi) out[8]; cx a[7],out[8]; rz(-pi) out[8]; cx b[3],a[7]; rz(pi) a[7]; cx a[7],out[8]; rz(-pi) out[8]; cx a[7],out[8]; rz(pi) out[8]; rz(pi/2) b[3]; cx b[3],out[9]; rz(-pi/2) out[9]; cx b[3],out[9]; rz(pi/2) out[9]; cx b[3],a[7]; rz(-pi/2) a[7]; cx a[7],out[9]; rz(pi/2) out[9]; cx a[7],out[9]; rz(-pi/2) out[9]; cx b[3],a[7]; rz(pi/2) a[7]; cx a[7],out[9]; rz(-pi/2) out[9]; cx a[7],out[9]; rz(pi/2) out[9]; rz(pi/4) b[3]; cx b[3],out[10]; rz(-pi/4) out[10]; cx b[3],out[10]; rz(pi/4) out[10]; cx b[3],a[7]; rz(-pi/4) a[7]; cx a[7],out[10]; rz(pi/4) out[10]; cx a[7],out[10]; rz(-pi/4) out[10]; cx b[3],a[7]; rz(pi/4) a[7]; cx a[7],out[10]; rz(-pi/4) out[10]; cx a[7],out[10]; rz(pi/4) out[10]; rz(pi/8) b[3]; cx b[3],out[11]; rz(-pi/8) out[11]; cx b[3],out[11]; rz(pi/8) out[11]; cx b[3],a[7]; rz(-pi/8) a[7]; cx a[7],out[11]; rz(pi/8) out[11]; cx a[7],out[11]; rz(-pi/8) out[11]; cx b[3],a[7]; rz(pi/8) a[7]; cx a[7],out[11]; rz(-pi/8) out[11]; cx a[7],out[11]; rz(pi/8) out[11]; rz(pi/16) b[3]; cx b[3],out[12]; rz(-pi/16) out[12]; cx b[3],out[12]; rz(pi/16) out[12]; cx b[3],a[7]; rz(-pi/16) a[7]; cx a[7],out[12]; rz(pi/16) out[12]; cx a[7],out[12]; rz(-pi/16) out[12]; cx b[3],a[7]; rz(pi/16) a[7]; cx a[7],out[12]; rz(-pi/16) out[12]; cx a[7],out[12]; rz(pi/16) out[12]; rz(pi/32) b[3]; cx b[3],out[13]; rz(-pi/32) out[13]; cx b[3],out[13]; rz(pi/32) out[13]; cx b[3],a[7]; rz(-pi/32) a[7]; cx a[7],out[13]; rz(pi/32) out[13]; cx a[7],out[13]; rz(-pi/32) out[13]; cx b[3],a[7]; rz(pi/32) a[7]; cx a[7],out[13]; rz(-pi/32) out[13]; cx a[7],out[13]; rz(pi/32) out[13]; rz(pi/64) b[3]; cx b[3],out[14]; rz(-pi/64) out[14]; cx b[3],out[14]; rz(pi/64) out[14]; cx b[3],a[7]; rz(-pi/64) a[7]; cx a[7],out[14]; rz(pi/64) out[14]; cx a[7],out[14]; rz(-pi/64) out[14]; cx b[3],a[7]; rz(pi/64) a[7]; cx a[7],out[14]; rz(-pi/64) out[14]; cx a[7],out[14]; rz(pi/64) out[14]; rz(pi/128) b[3]; cx b[3],out[15]; rz(-pi/128) out[15]; cx b[3],out[15]; rz(pi/128) out[15]; cx b[3],a[7]; rz(-pi/128) a[7]; cx a[7],out[15]; rz(pi/128) out[15]; cx a[7],out[15]; rz(-pi/128) out[15]; cx b[3],a[7]; rz(pi/128) a[7]; cx a[7],out[15]; rz(-pi/128) out[15]; cx a[7],out[15]; rz(pi/128) out[15]; cx b[2],a[7]; rz(-128*pi) a[7]; cx a[7],out[0]; rz(128*pi) out[0]; cx a[7],out[0]; rz(-128*pi) out[0]; cx b[2],a[7]; rz(128*pi) a[7]; cx a[7],out[0]; rz(-128*pi) out[0]; cx a[7],out[0]; rz(128*pi) out[0]; cx b[1],out[0]; rz(-64*pi) out[0]; cx b[1],out[0]; rz(64*pi) out[0]; rz(64*pi) b[2]; cx b[2],out[1]; rz(-64*pi) out[1]; cx b[2],out[1]; rz(64*pi) out[1]; cx b[2],a[7]; rz(-64*pi) a[7]; cx a[7],out[1]; rz(64*pi) out[1]; cx a[7],out[1]; rz(-64*pi) out[1]; cx b[2],a[7]; rz(64*pi) a[7]; cx a[7],out[1]; rz(-64*pi) out[1]; cx a[7],out[1]; rz(64*pi) out[1]; rz(32*pi) b[2]; cx b[2],out[2]; rz(-32*pi) out[2]; cx b[2],out[2]; rz(32*pi) out[2]; cx b[2],a[7]; rz(-32*pi) a[7]; cx a[7],out[2]; rz(32*pi) out[2]; cx a[7],out[2]; rz(-32*pi) out[2]; cx b[2],a[7]; rz(32*pi) a[7]; cx a[7],out[2]; rz(-32*pi) out[2]; cx a[7],out[2]; rz(32*pi) out[2]; rz(16*pi) b[2]; cx b[2],out[3]; rz(-16*pi) out[3]; cx b[2],out[3]; rz(16*pi) out[3]; cx b[2],a[7]; rz(-16*pi) a[7]; cx a[7],out[3]; rz(16*pi) out[3]; cx a[7],out[3]; rz(-16*pi) out[3]; cx b[2],a[7]; rz(16*pi) a[7]; cx a[7],out[3]; rz(-16*pi) out[3]; cx a[7],out[3]; rz(16*pi) out[3]; rz(8*pi) b[2]; cx b[2],out[4]; rz(-8*pi) out[4]; cx b[2],out[4]; rz(8*pi) out[4]; cx b[2],a[7]; rz(-8*pi) a[7]; cx a[7],out[4]; rz(8*pi) out[4]; cx a[7],out[4]; rz(-8*pi) out[4]; cx b[2],a[7]; rz(8*pi) a[7]; cx a[7],out[4]; rz(-8*pi) out[4]; cx a[7],out[4]; rz(8*pi) out[4]; rz(4*pi) b[2]; cx b[2],out[5]; rz(-4*pi) out[5]; cx b[2],out[5]; rz(4*pi) out[5]; cx b[2],a[7]; rz(-4*pi) a[7]; cx a[7],out[5]; rz(4*pi) out[5]; cx a[7],out[5]; rz(-4*pi) out[5]; cx b[2],a[7]; rz(4*pi) a[7]; cx a[7],out[5]; rz(-4*pi) out[5]; cx a[7],out[5]; rz(4*pi) out[5]; rz(2*pi) b[2]; cx b[2],out[6]; rz(-2*pi) out[6]; cx b[2],out[6]; rz(2*pi) out[6]; cx b[2],a[7]; rz(-2*pi) a[7]; cx a[7],out[6]; rz(2*pi) out[6]; cx a[7],out[6]; rz(-2*pi) out[6]; cx b[2],a[7]; rz(2*pi) a[7]; cx a[7],out[6]; rz(-2*pi) out[6]; cx a[7],out[6]; rz(2*pi) out[6]; rz(pi) b[2]; cx b[2],out[7]; rz(-pi) out[7]; cx b[2],out[7]; rz(pi) out[7]; cx b[2],a[7]; rz(-pi) a[7]; cx a[7],out[7]; rz(pi) out[7]; cx a[7],out[7]; rz(-pi) out[7]; cx b[2],a[7]; rz(pi) a[7]; cx a[7],out[7]; rz(-pi) out[7]; cx a[7],out[7]; rz(pi) out[7]; rz(pi/2) b[2]; cx b[2],out[8]; rz(-pi/2) out[8]; cx b[2],out[8]; rz(pi/2) out[8]; cx b[2],a[7]; rz(-pi/2) a[7]; cx a[7],out[8]; rz(pi/2) out[8]; cx a[7],out[8]; rz(-pi/2) out[8]; cx b[2],a[7]; rz(pi/2) a[7]; cx a[7],out[8]; rz(-pi/2) out[8]; cx a[7],out[8]; rz(pi/2) out[8]; rz(pi/4) b[2]; cx b[2],out[9]; rz(-pi/4) out[9]; cx b[2],out[9]; rz(pi/4) out[9]; cx b[2],a[7]; rz(-pi/4) a[7]; cx a[7],out[9]; rz(pi/4) out[9]; cx a[7],out[9]; rz(-pi/4) out[9]; cx b[2],a[7]; rz(pi/4) a[7]; cx a[7],out[9]; rz(-pi/4) out[9]; cx a[7],out[9]; rz(pi/4) out[9]; rz(pi/8) b[2]; cx b[2],out[10]; rz(-pi/8) out[10]; cx b[2],out[10]; rz(pi/8) out[10]; cx b[2],a[7]; rz(-pi/8) a[7]; cx a[7],out[10]; rz(pi/8) out[10]; cx a[7],out[10]; rz(-pi/8) out[10]; cx b[2],a[7]; rz(pi/8) a[7]; cx a[7],out[10]; rz(-pi/8) out[10]; cx a[7],out[10]; rz(pi/8) out[10]; rz(pi/16) b[2]; cx b[2],out[11]; rz(-pi/16) out[11]; cx b[2],out[11]; rz(pi/16) out[11]; cx b[2],a[7]; rz(-pi/16) a[7]; cx a[7],out[11]; rz(pi/16) out[11]; cx a[7],out[11]; rz(-pi/16) out[11]; cx b[2],a[7]; rz(pi/16) a[7]; cx a[7],out[11]; rz(-pi/16) out[11]; cx a[7],out[11]; rz(pi/16) out[11]; rz(pi/32) b[2]; cx b[2],out[12]; rz(-pi/32) out[12]; cx b[2],out[12]; rz(pi/32) out[12]; cx b[2],a[7]; rz(-pi/32) a[7]; cx a[7],out[12]; rz(pi/32) out[12]; cx a[7],out[12]; rz(-pi/32) out[12]; cx b[2],a[7]; rz(pi/32) a[7]; cx a[7],out[12]; rz(-pi/32) out[12]; cx a[7],out[12]; rz(pi/32) out[12]; rz(pi/64) b[2]; cx b[2],out[13]; rz(-pi/64) out[13]; cx b[2],out[13]; rz(pi/64) out[13]; cx b[2],a[7]; rz(-pi/64) a[7]; cx a[7],out[13]; rz(pi/64) out[13]; cx a[7],out[13]; rz(-pi/64) out[13]; cx b[2],a[7]; rz(pi/64) a[7]; cx a[7],out[13]; rz(-pi/64) out[13]; cx a[7],out[13]; rz(pi/64) out[13]; rz(pi/128) b[2]; cx b[2],out[14]; rz(-pi/128) out[14]; cx b[2],out[14]; rz(pi/128) out[14]; cx b[2],a[7]; rz(-pi/128) a[7]; cx a[7],out[14]; rz(pi/128) out[14]; cx a[7],out[14]; rz(-pi/128) out[14]; cx b[2],a[7]; rz(pi/128) a[7]; cx a[7],out[14]; rz(-pi/128) out[14]; cx a[7],out[14]; rz(pi/128) out[14]; rz(pi/256) b[2]; cx b[2],out[15]; rz(-pi/256) out[15]; cx b[2],out[15]; rz(pi/256) out[15]; cx b[2],a[7]; rz(-pi/256) a[7]; cx a[7],out[15]; rz(pi/256) out[15]; cx a[7],out[15]; rz(-pi/256) out[15]; cx b[2],a[7]; rz(pi/256) a[7]; cx a[7],out[15]; rz(-pi/256) out[15]; cx a[7],out[15]; rz(pi/256) out[15]; cx b[1],a[7]; rz(-64*pi) a[7]; cx a[7],out[0]; rz(64*pi) out[0]; cx a[7],out[0]; rz(-64*pi) out[0]; cx b[1],a[7]; rz(64*pi) a[7]; cx a[7],out[0]; rz(-64*pi) out[0]; cx a[7],out[0]; rz(64*pi) out[0]; cx b[0],out[0]; rz(-32*pi) out[0]; cx b[0],out[0]; rz(32*pi) out[0]; rz(32*pi) b[1]; cx b[1],out[1]; rz(-32*pi) out[1]; cx b[1],out[1]; rz(32*pi) out[1]; cx b[1],a[7]; rz(-32*pi) a[7]; cx a[7],out[1]; rz(32*pi) out[1]; cx a[7],out[1]; rz(-32*pi) out[1]; cx b[1],a[7]; rz(32*pi) a[7]; cx a[7],out[1]; rz(-32*pi) out[1]; cx a[7],out[1]; rz(32*pi) out[1]; rz(16*pi) b[1]; cx b[1],out[2]; rz(-16*pi) out[2]; cx b[1],out[2]; rz(16*pi) out[2]; cx b[1],a[7]; rz(-16*pi) a[7]; cx a[7],out[2]; rz(16*pi) out[2]; cx a[7],out[2]; rz(-16*pi) out[2]; cx b[1],a[7]; rz(16*pi) a[7]; cx a[7],out[2]; rz(-16*pi) out[2]; cx a[7],out[2]; rz(16*pi) out[2]; rz(8*pi) b[1]; cx b[1],out[3]; rz(-8*pi) out[3]; cx b[1],out[3]; rz(8*pi) out[3]; cx b[1],a[7]; rz(-8*pi) a[7]; cx a[7],out[3]; rz(8*pi) out[3]; cx a[7],out[3]; rz(-8*pi) out[3]; cx b[1],a[7]; rz(8*pi) a[7]; cx a[7],out[3]; rz(-8*pi) out[3]; cx a[7],out[3]; rz(8*pi) out[3]; rz(4*pi) b[1]; cx b[1],out[4]; rz(-4*pi) out[4]; cx b[1],out[4]; rz(4*pi) out[4]; cx b[1],a[7]; rz(-4*pi) a[7]; cx a[7],out[4]; rz(4*pi) out[4]; cx a[7],out[4]; rz(-4*pi) out[4]; cx b[1],a[7]; rz(4*pi) a[7]; cx a[7],out[4]; rz(-4*pi) out[4]; cx a[7],out[4]; rz(4*pi) out[4]; rz(2*pi) b[1]; cx b[1],out[5]; rz(-2*pi) out[5]; cx b[1],out[5]; rz(2*pi) out[5]; cx b[1],a[7]; rz(-2*pi) a[7]; cx a[7],out[5]; rz(2*pi) out[5]; cx a[7],out[5]; rz(-2*pi) out[5]; cx b[1],a[7]; rz(2*pi) a[7]; cx a[7],out[5]; rz(-2*pi) out[5]; cx a[7],out[5]; rz(2*pi) out[5]; rz(pi) b[1]; cx b[1],out[6]; rz(-pi) out[6]; cx b[1],out[6]; rz(pi) out[6]; cx b[1],a[7]; rz(-pi) a[7]; cx a[7],out[6]; rz(pi) out[6]; cx a[7],out[6]; rz(-pi) out[6]; cx b[1],a[7]; rz(pi) a[7]; cx a[7],out[6]; rz(-pi) out[6]; cx a[7],out[6]; rz(pi) out[6]; rz(pi/2) b[1]; cx b[1],out[7]; rz(-pi/2) out[7]; cx b[1],out[7]; rz(pi/2) out[7]; cx b[1],a[7]; rz(-pi/2) a[7]; cx a[7],out[7]; rz(pi/2) out[7]; cx a[7],out[7]; rz(-pi/2) out[7]; cx b[1],a[7]; rz(pi/2) a[7]; cx a[7],out[7]; rz(-pi/2) out[7]; cx a[7],out[7]; rz(pi/2) out[7]; rz(pi/4) b[1]; cx b[1],out[8]; rz(-pi/4) out[8]; cx b[1],out[8]; rz(pi/4) out[8]; cx b[1],a[7]; rz(-pi/4) a[7]; cx a[7],out[8]; rz(pi/4) out[8]; cx a[7],out[8]; rz(-pi/4) out[8]; cx b[1],a[7]; rz(pi/4) a[7]; cx a[7],out[8]; rz(-pi/4) out[8]; cx a[7],out[8]; rz(pi/4) out[8]; rz(pi/8) b[1]; cx b[1],out[9]; rz(-pi/8) out[9]; cx b[1],out[9]; rz(pi/8) out[9]; cx b[1],a[7]; rz(-pi/8) a[7]; cx a[7],out[9]; rz(pi/8) out[9]; cx a[7],out[9]; rz(-pi/8) out[9]; cx b[1],a[7]; rz(pi/8) a[7]; cx a[7],out[9]; rz(-pi/8) out[9]; cx a[7],out[9]; rz(pi/8) out[9]; rz(pi/16) b[1]; cx b[1],out[10]; rz(-pi/16) out[10]; cx b[1],out[10]; rz(pi/16) out[10]; cx b[1],a[7]; rz(-pi/16) a[7]; cx a[7],out[10]; rz(pi/16) out[10]; cx a[7],out[10]; rz(-pi/16) out[10]; cx b[1],a[7]; rz(pi/16) a[7]; cx a[7],out[10]; rz(-pi/16) out[10]; cx a[7],out[10]; rz(pi/16) out[10]; rz(pi/32) b[1]; cx b[1],out[11]; rz(-pi/32) out[11]; cx b[1],out[11]; rz(pi/32) out[11]; cx b[1],a[7]; rz(-pi/32) a[7]; cx a[7],out[11]; rz(pi/32) out[11]; cx a[7],out[11]; rz(-pi/32) out[11]; cx b[1],a[7]; rz(pi/32) a[7]; cx a[7],out[11]; rz(-pi/32) out[11]; cx a[7],out[11]; rz(pi/32) out[11]; rz(pi/64) b[1]; cx b[1],out[12]; rz(-pi/64) out[12]; cx b[1],out[12]; rz(pi/64) out[12]; cx b[1],a[7]; rz(-pi/64) a[7]; cx a[7],out[12]; rz(pi/64) out[12]; cx a[7],out[12]; rz(-pi/64) out[12]; cx b[1],a[7]; rz(pi/64) a[7]; cx a[7],out[12]; rz(-pi/64) out[12]; cx a[7],out[12]; rz(pi/64) out[12]; rz(pi/128) b[1]; cx b[1],out[13]; rz(-pi/128) out[13]; cx b[1],out[13]; rz(pi/128) out[13]; cx b[1],a[7]; rz(-pi/128) a[7]; cx a[7],out[13]; rz(pi/128) out[13]; cx a[7],out[13]; rz(-pi/128) out[13]; cx b[1],a[7]; rz(pi/128) a[7]; cx a[7],out[13]; rz(-pi/128) out[13]; cx a[7],out[13]; rz(pi/128) out[13]; rz(pi/256) b[1]; cx b[1],out[14]; rz(-pi/256) out[14]; cx b[1],out[14]; rz(pi/256) out[14]; cx b[1],a[7]; rz(-pi/256) a[7]; cx a[7],out[14]; rz(pi/256) out[14]; cx a[7],out[14]; rz(-pi/256) out[14]; cx b[1],a[7]; rz(pi/256) a[7]; cx a[7],out[14]; rz(-pi/256) out[14]; cx a[7],out[14]; rz(pi/256) out[14]; rz(pi/512) b[1]; cx b[1],out[15]; rz(-pi/512) out[15]; cx b[1],out[15]; rz(pi/512) out[15]; cx b[1],a[7]; rz(-pi/512) a[7]; cx a[7],out[15]; rz(pi/512) out[15]; cx a[7],out[15]; rz(-pi/512) out[15]; cx b[1],a[7]; rz(pi/512) a[7]; cx a[7],out[15]; rz(-pi/512) out[15]; cx a[7],out[15]; rz(pi/512) out[15]; cx b[0],a[7]; rz(-32*pi) a[7]; cx a[7],out[0]; rz(32*pi) out[0]; cx a[7],out[0]; rz(-32*pi) out[0]; cx b[0],a[7]; rz(32*pi) a[7]; cx a[7],out[0]; rz(-32*pi) out[0]; cx a[7],out[0]; rz(32*pi) out[0]; rz(16*pi) b[0]; cx b[0],out[1]; rz(-16*pi) out[1]; cx b[0],out[1]; rz(16*pi) out[1]; cx b[0],a[7]; rz(-16*pi) a[7]; cx a[7],out[1]; rz(16*pi) out[1]; cx a[7],out[1]; rz(-16*pi) out[1]; cx b[0],a[7]; rz(16*pi) a[7]; cx a[7],out[1]; rz(-16*pi) out[1]; cx a[7],out[1]; rz(16*pi) out[1]; rz(8*pi) b[0]; cx b[0],out[2]; rz(-8*pi) out[2]; cx b[0],out[2]; rz(8*pi) out[2]; cx b[0],a[7]; rz(-8*pi) a[7]; cx a[7],out[2]; rz(8*pi) out[2]; cx a[7],out[2]; rz(-8*pi) out[2]; cx b[0],a[7]; rz(8*pi) a[7]; cx a[7],out[2]; rz(-8*pi) out[2]; cx a[7],out[2]; rz(8*pi) out[2]; rz(4*pi) b[0]; cx b[0],out[3]; rz(-4*pi) out[3]; cx b[0],out[3]; rz(4*pi) out[3]; cx b[0],a[7]; rz(-4*pi) a[7]; cx a[7],out[3]; rz(4*pi) out[3]; cx a[7],out[3]; rz(-4*pi) out[3]; cx b[0],a[7]; rz(4*pi) a[7]; cx a[7],out[3]; rz(-4*pi) out[3]; cx a[7],out[3]; rz(4*pi) out[3]; rz(2*pi) b[0]; cx b[0],out[4]; rz(-2*pi) out[4]; cx b[0],out[4]; rz(2*pi) out[4]; cx b[0],a[7]; rz(-2*pi) a[7]; cx a[7],out[4]; rz(2*pi) out[4]; cx a[7],out[4]; rz(-2*pi) out[4]; cx b[0],a[7]; rz(2*pi) a[7]; cx a[7],out[4]; rz(-2*pi) out[4]; cx a[7],out[4]; rz(2*pi) out[4]; rz(pi) b[0]; cx b[0],out[5]; rz(-pi) out[5]; cx b[0],out[5]; rz(pi) out[5]; cx b[0],a[7]; rz(-pi) a[7]; cx a[7],out[5]; rz(pi) out[5]; cx a[7],out[5]; rz(-pi) out[5]; cx b[0],a[7]; rz(pi) a[7]; cx a[7],out[5]; rz(-pi) out[5]; cx a[7],out[5]; rz(pi) out[5]; rz(pi/2) b[0]; cx b[0],out[6]; rz(-pi/2) out[6]; cx b[0],out[6]; rz(pi/2) out[6]; cx b[0],a[7]; rz(-pi/2) a[7]; cx a[7],out[6]; rz(pi/2) out[6]; cx a[7],out[6]; rz(-pi/2) out[6]; cx b[0],a[7]; rz(pi/2) a[7]; cx a[7],out[6]; rz(-pi/2) out[6]; cx a[7],out[6]; rz(pi/2) out[6]; rz(pi/4) b[0]; cx b[0],out[7]; rz(-pi/4) out[7]; cx b[0],out[7]; rz(pi/4) out[7]; cx b[0],a[7]; rz(-pi/4) a[7]; cx a[7],out[7]; rz(pi/4) out[7]; cx a[7],out[7]; rz(-pi/4) out[7]; cx b[0],a[7]; rz(pi/4) a[7]; cx a[7],out[7]; rz(-pi/4) out[7]; cx a[7],out[7]; rz(pi/4) out[7]; rz(pi/8) b[0]; cx b[0],out[8]; rz(-pi/8) out[8]; cx b[0],out[8]; rz(pi/8) out[8]; cx b[0],a[7]; rz(-pi/8) a[7]; cx a[7],out[8]; rz(pi/8) out[8]; cx a[7],out[8]; rz(-pi/8) out[8]; cx b[0],a[7]; rz(pi/8) a[7]; cx a[7],out[8]; rz(-pi/8) out[8]; cx a[7],out[8]; rz(pi/8) out[8]; rz(pi/16) b[0]; cx b[0],out[9]; rz(-pi/16) out[9]; cx b[0],out[9]; rz(pi/16) out[9]; cx b[0],a[7]; rz(-pi/16) a[7]; cx a[7],out[9]; rz(pi/16) out[9]; cx a[7],out[9]; rz(-pi/16) out[9]; cx b[0],a[7]; rz(pi/16) a[7]; cx a[7],out[9]; rz(-pi/16) out[9]; cx a[7],out[9]; rz(pi/16) out[9]; rz(pi/32) b[0]; cx b[0],out[10]; rz(-pi/32) out[10]; cx b[0],out[10]; rz(pi/32) out[10]; cx b[0],a[7]; rz(-pi/32) a[7]; cx a[7],out[10]; rz(pi/32) out[10]; cx a[7],out[10]; rz(-pi/32) out[10]; cx b[0],a[7]; rz(pi/32) a[7]; cx a[7],out[10]; rz(-pi/32) out[10]; cx a[7],out[10]; rz(pi/32) out[10]; rz(pi/64) b[0]; cx b[0],out[11]; rz(-pi/64) out[11]; cx b[0],out[11]; rz(pi/64) out[11]; cx b[0],a[7]; rz(-pi/64) a[7]; cx a[7],out[11]; rz(pi/64) out[11]; cx a[7],out[11]; rz(-pi/64) out[11]; cx b[0],a[7]; rz(pi/64) a[7]; cx a[7],out[11]; rz(-pi/64) out[11]; cx a[7],out[11]; rz(pi/64) out[11]; rz(pi/128) b[0]; cx b[0],out[12]; rz(-pi/128) out[12]; cx b[0],out[12]; rz(pi/128) out[12]; cx b[0],a[7]; rz(-pi/128) a[7]; cx a[7],out[12]; rz(pi/128) out[12]; cx a[7],out[12]; rz(-pi/128) out[12]; cx b[0],a[7]; rz(pi/128) a[7]; cx a[7],out[12]; rz(-pi/128) out[12]; cx a[7],out[12]; rz(pi/128) out[12]; rz(pi/256) b[0]; cx b[0],out[13]; rz(-pi/256) out[13]; cx b[0],out[13]; rz(pi/256) out[13]; cx b[0],a[7]; rz(-pi/256) a[7]; cx a[7],out[13]; rz(pi/256) out[13]; cx a[7],out[13]; rz(-pi/256) out[13]; cx b[0],a[7]; rz(pi/256) a[7]; cx a[7],out[13]; rz(-pi/256) out[13]; cx a[7],out[13]; rz(pi/256) out[13]; rz(pi/512) b[0]; cx b[0],out[14]; rz(-pi/512) out[14]; cx b[0],out[14]; rz(pi/512) out[14]; cx b[0],a[7]; rz(-pi/512) a[7]; cx a[7],out[14]; rz(pi/512) out[14]; cx a[7],out[14]; rz(-pi/512) out[14]; cx b[0],a[7]; rz(pi/512) a[7]; cx a[7],out[14]; rz(-pi/512) out[14]; cx a[7],out[14]; rz(pi/512) out[14]; rz(pi/1024) b[0]; cx b[0],out[15]; rz(-pi/1024) out[15]; cx b[0],out[15]; rz(pi/1024) out[15]; cx b[0],a[7]; rz(-pi/1024) a[7]; cx a[7],out[15]; rz(pi/1024) out[15]; cx a[7],out[15]; rz(-pi/1024) out[15]; cx b[0],a[7]; rz(pi/1024) a[7]; cx a[7],out[15]; rz(-pi/1024) out[15]; cx a[7],out[15]; rz(pi/1024) out[15]; rz(16*pi) b[0]; rz(32*pi) b[1]; rz(64*pi) b[2]; rz(128*pi) b[3]; rz(256*pi) b[4]; rz(512*pi) b[5]; rz(1024*pi) b[6]; rz(2048*pi) b[7]; cx b[7],out[0]; rz(-2048*pi) out[0]; cx b[7],out[0]; rz(2048*pi) out[0]; cx b[7],a[6]; rz(-2048*pi) a[6]; cx a[6],out[0]; rz(2048*pi) out[0]; cx a[6],out[0]; rz(-2048*pi) out[0]; cx b[7],a[6]; rz(2048*pi) a[6]; cx a[6],out[0]; rz(-2048*pi) out[0]; cx a[6],out[0]; rz(2048*pi) out[0]; cx b[6],out[0]; rz(-1024*pi) out[0]; cx b[6],out[0]; rz(1024*pi) out[0]; rz(1024*pi) b[7]; cx b[7],out[1]; rz(-1024*pi) out[1]; cx b[7],out[1]; rz(1024*pi) out[1]; cx b[7],a[6]; rz(-1024*pi) a[6]; cx a[6],out[1]; rz(1024*pi) out[1]; cx a[6],out[1]; rz(-1024*pi) out[1]; cx b[7],a[6]; rz(1024*pi) a[6]; cx a[6],out[1]; rz(-1024*pi) out[1]; cx a[6],out[1]; rz(1024*pi) out[1]; rz(512*pi) b[7]; cx b[7],out[2]; rz(-512*pi) out[2]; cx b[7],out[2]; rz(512*pi) out[2]; cx b[7],a[6]; rz(-512*pi) a[6]; cx a[6],out[2]; rz(512*pi) out[2]; cx a[6],out[2]; rz(-512*pi) out[2]; cx b[7],a[6]; rz(512*pi) a[6]; cx a[6],out[2]; rz(-512*pi) out[2]; cx a[6],out[2]; rz(512*pi) out[2]; rz(256*pi) b[7]; cx b[7],out[3]; rz(-256*pi) out[3]; cx b[7],out[3]; rz(256*pi) out[3]; cx b[7],a[6]; rz(-256*pi) a[6]; cx a[6],out[3]; rz(256*pi) out[3]; cx a[6],out[3]; rz(-256*pi) out[3]; cx b[7],a[6]; rz(256*pi) a[6]; cx a[6],out[3]; rz(-256*pi) out[3]; cx a[6],out[3]; rz(256*pi) out[3]; rz(128*pi) b[7]; cx b[7],out[4]; rz(-128*pi) out[4]; cx b[7],out[4]; rz(128*pi) out[4]; cx b[7],a[6]; rz(-128*pi) a[6]; cx a[6],out[4]; rz(128*pi) out[4]; cx a[6],out[4]; rz(-128*pi) out[4]; cx b[7],a[6]; rz(128*pi) a[6]; cx a[6],out[4]; rz(-128*pi) out[4]; cx a[6],out[4]; rz(128*pi) out[4]; rz(64*pi) b[7]; cx b[7],out[5]; rz(-64*pi) out[5]; cx b[7],out[5]; rz(64*pi) out[5]; cx b[7],a[6]; rz(-64*pi) a[6]; cx a[6],out[5]; rz(64*pi) out[5]; cx a[6],out[5]; rz(-64*pi) out[5]; cx b[7],a[6]; rz(64*pi) a[6]; cx a[6],out[5]; rz(-64*pi) out[5]; cx a[6],out[5]; rz(64*pi) out[5]; rz(32*pi) b[7]; cx b[7],out[6]; rz(-32*pi) out[6]; cx b[7],out[6]; rz(32*pi) out[6]; cx b[7],a[6]; rz(-32*pi) a[6]; cx a[6],out[6]; rz(32*pi) out[6]; cx a[6],out[6]; rz(-32*pi) out[6]; cx b[7],a[6]; rz(32*pi) a[6]; cx a[6],out[6]; rz(-32*pi) out[6]; cx a[6],out[6]; rz(32*pi) out[6]; rz(16*pi) b[7]; cx b[7],out[7]; rz(-16*pi) out[7]; cx b[7],out[7]; rz(16*pi) out[7]; cx b[7],a[6]; rz(-16*pi) a[6]; cx a[6],out[7]; rz(16*pi) out[7]; cx a[6],out[7]; rz(-16*pi) out[7]; cx b[7],a[6]; rz(16*pi) a[6]; cx a[6],out[7]; rz(-16*pi) out[7]; cx a[6],out[7]; rz(16*pi) out[7]; rz(8*pi) b[7]; cx b[7],out[8]; rz(-8*pi) out[8]; cx b[7],out[8]; rz(8*pi) out[8]; cx b[7],a[6]; rz(-8*pi) a[6]; cx a[6],out[8]; rz(8*pi) out[8]; cx a[6],out[8]; rz(-8*pi) out[8]; cx b[7],a[6]; rz(8*pi) a[6]; cx a[6],out[8]; rz(-8*pi) out[8]; cx a[6],out[8]; rz(8*pi) out[8]; rz(4*pi) b[7]; cx b[7],out[9]; rz(-4*pi) out[9]; cx b[7],out[9]; rz(4*pi) out[9]; cx b[7],a[6]; rz(-4*pi) a[6]; cx a[6],out[9]; rz(4*pi) out[9]; cx a[6],out[9]; rz(-4*pi) out[9]; cx b[7],a[6]; rz(4*pi) a[6]; cx a[6],out[9]; rz(-4*pi) out[9]; cx a[6],out[9]; rz(4*pi) out[9]; rz(2*pi) b[7]; cx b[7],out[10]; rz(-2*pi) out[10]; cx b[7],out[10]; rz(2*pi) out[10]; cx b[7],a[6]; rz(-2*pi) a[6]; cx a[6],out[10]; rz(2*pi) out[10]; cx a[6],out[10]; rz(-2*pi) out[10]; cx b[7],a[6]; rz(2*pi) a[6]; cx a[6],out[10]; rz(-2*pi) out[10]; cx a[6],out[10]; rz(2*pi) out[10]; rz(pi) b[7]; cx b[7],out[11]; rz(-pi) out[11]; cx b[7],out[11]; rz(pi) out[11]; cx b[7],a[6]; rz(-pi) a[6]; cx a[6],out[11]; rz(pi) out[11]; cx a[6],out[11]; rz(-pi) out[11]; cx b[7],a[6]; rz(pi) a[6]; cx a[6],out[11]; rz(-pi) out[11]; cx a[6],out[11]; rz(pi) out[11]; rz(pi/2) b[7]; cx b[7],out[12]; rz(-pi/2) out[12]; cx b[7],out[12]; rz(pi/2) out[12]; cx b[7],a[6]; rz(-pi/2) a[6]; cx a[6],out[12]; rz(pi/2) out[12]; cx a[6],out[12]; rz(-pi/2) out[12]; cx b[7],a[6]; rz(pi/2) a[6]; cx a[6],out[12]; rz(-pi/2) out[12]; cx a[6],out[12]; rz(pi/2) out[12]; rz(pi/4) b[7]; cx b[7],out[13]; rz(-pi/4) out[13]; cx b[7],out[13]; rz(pi/4) out[13]; cx b[7],a[6]; rz(-pi/4) a[6]; cx a[6],out[13]; rz(pi/4) out[13]; cx a[6],out[13]; rz(-pi/4) out[13]; cx b[7],a[6]; rz(pi/4) a[6]; cx a[6],out[13]; rz(-pi/4) out[13]; cx a[6],out[13]; rz(pi/4) out[13]; rz(pi/8) b[7]; cx b[7],out[14]; rz(-pi/8) out[14]; cx b[7],out[14]; rz(pi/8) out[14]; cx b[7],a[6]; rz(-pi/8) a[6]; cx a[6],out[14]; rz(pi/8) out[14]; cx a[6],out[14]; rz(-pi/8) out[14]; cx b[7],a[6]; rz(pi/8) a[6]; cx a[6],out[14]; rz(-pi/8) out[14]; cx a[6],out[14]; rz(pi/8) out[14]; rz(pi/16) b[7]; cx b[7],out[15]; rz(-pi/16) out[15]; cx b[7],out[15]; rz(pi/16) out[15]; cx b[7],a[6]; rz(-pi/16) a[6]; cx a[6],out[15]; rz(pi/16) out[15]; cx a[6],out[15]; rz(-pi/16) out[15]; cx b[7],a[6]; rz(pi/16) a[6]; cx a[6],out[15]; rz(-pi/16) out[15]; cx a[6],out[15]; rz(pi/16) out[15]; cx b[6],a[6]; rz(-1024*pi) a[6]; cx a[6],out[0]; rz(1024*pi) out[0]; cx a[6],out[0]; rz(-1024*pi) out[0]; cx b[6],a[6]; rz(1024*pi) a[6]; cx a[6],out[0]; rz(-1024*pi) out[0]; cx a[6],out[0]; rz(1024*pi) out[0]; cx b[5],out[0]; rz(-512*pi) out[0]; cx b[5],out[0]; rz(512*pi) out[0]; rz(512*pi) b[6]; cx b[6],out[1]; rz(-512*pi) out[1]; cx b[6],out[1]; rz(512*pi) out[1]; cx b[6],a[6]; rz(-512*pi) a[6]; cx a[6],out[1]; rz(512*pi) out[1]; cx a[6],out[1]; rz(-512*pi) out[1]; cx b[6],a[6]; rz(512*pi) a[6]; cx a[6],out[1]; rz(-512*pi) out[1]; cx a[6],out[1]; rz(512*pi) out[1]; rz(256*pi) b[6]; cx b[6],out[2]; rz(-256*pi) out[2]; cx b[6],out[2]; rz(256*pi) out[2]; cx b[6],a[6]; rz(-256*pi) a[6]; cx a[6],out[2]; rz(256*pi) out[2]; cx a[6],out[2]; rz(-256*pi) out[2]; cx b[6],a[6]; rz(256*pi) a[6]; cx a[6],out[2]; rz(-256*pi) out[2]; cx a[6],out[2]; rz(256*pi) out[2]; rz(128*pi) b[6]; cx b[6],out[3]; rz(-128*pi) out[3]; cx b[6],out[3]; rz(128*pi) out[3]; cx b[6],a[6]; rz(-128*pi) a[6]; cx a[6],out[3]; rz(128*pi) out[3]; cx a[6],out[3]; rz(-128*pi) out[3]; cx b[6],a[6]; rz(128*pi) a[6]; cx a[6],out[3]; rz(-128*pi) out[3]; cx a[6],out[3]; rz(128*pi) out[3]; rz(64*pi) b[6]; cx b[6],out[4]; rz(-64*pi) out[4]; cx b[6],out[4]; rz(64*pi) out[4]; cx b[6],a[6]; rz(-64*pi) a[6]; cx a[6],out[4]; rz(64*pi) out[4]; cx a[6],out[4]; rz(-64*pi) out[4]; cx b[6],a[6]; rz(64*pi) a[6]; cx a[6],out[4]; rz(-64*pi) out[4]; cx a[6],out[4]; rz(64*pi) out[4]; rz(32*pi) b[6]; cx b[6],out[5]; rz(-32*pi) out[5]; cx b[6],out[5]; rz(32*pi) out[5]; cx b[6],a[6]; rz(-32*pi) a[6]; cx a[6],out[5]; rz(32*pi) out[5]; cx a[6],out[5]; rz(-32*pi) out[5]; cx b[6],a[6]; rz(32*pi) a[6]; cx a[6],out[5]; rz(-32*pi) out[5]; cx a[6],out[5]; rz(32*pi) out[5]; rz(16*pi) b[6]; cx b[6],out[6]; rz(-16*pi) out[6]; cx b[6],out[6]; rz(16*pi) out[6]; cx b[6],a[6]; rz(-16*pi) a[6]; cx a[6],out[6]; rz(16*pi) out[6]; cx a[6],out[6]; rz(-16*pi) out[6]; cx b[6],a[6]; rz(16*pi) a[6]; cx a[6],out[6]; rz(-16*pi) out[6]; cx a[6],out[6]; rz(16*pi) out[6]; rz(8*pi) b[6]; cx b[6],out[7]; rz(-8*pi) out[7]; cx b[6],out[7]; rz(8*pi) out[7]; cx b[6],a[6]; rz(-8*pi) a[6]; cx a[6],out[7]; rz(8*pi) out[7]; cx a[6],out[7]; rz(-8*pi) out[7]; cx b[6],a[6]; rz(8*pi) a[6]; cx a[6],out[7]; rz(-8*pi) out[7]; cx a[6],out[7]; rz(8*pi) out[7]; rz(4*pi) b[6]; cx b[6],out[8]; rz(-4*pi) out[8]; cx b[6],out[8]; rz(4*pi) out[8]; cx b[6],a[6]; rz(-4*pi) a[6]; cx a[6],out[8]; rz(4*pi) out[8]; cx a[6],out[8]; rz(-4*pi) out[8]; cx b[6],a[6]; rz(4*pi) a[6]; cx a[6],out[8]; rz(-4*pi) out[8]; cx a[6],out[8]; rz(4*pi) out[8]; rz(2*pi) b[6]; cx b[6],out[9]; rz(-2*pi) out[9]; cx b[6],out[9]; rz(2*pi) out[9]; cx b[6],a[6]; rz(-2*pi) a[6]; cx a[6],out[9]; rz(2*pi) out[9]; cx a[6],out[9]; rz(-2*pi) out[9]; cx b[6],a[6]; rz(2*pi) a[6]; cx a[6],out[9]; rz(-2*pi) out[9]; cx a[6],out[9]; rz(2*pi) out[9]; rz(pi) b[6]; cx b[6],out[10]; rz(-pi) out[10]; cx b[6],out[10]; rz(pi) out[10]; cx b[6],a[6]; rz(-pi) a[6]; cx a[6],out[10]; rz(pi) out[10]; cx a[6],out[10]; rz(-pi) out[10]; cx b[6],a[6]; rz(pi) a[6]; cx a[6],out[10]; rz(-pi) out[10]; cx a[6],out[10]; rz(pi) out[10]; rz(pi/2) b[6]; cx b[6],out[11]; rz(-pi/2) out[11]; cx b[6],out[11]; rz(pi/2) out[11]; cx b[6],a[6]; rz(-pi/2) a[6]; cx a[6],out[11]; rz(pi/2) out[11]; cx a[6],out[11]; rz(-pi/2) out[11]; cx b[6],a[6]; rz(pi/2) a[6]; cx a[6],out[11]; rz(-pi/2) out[11]; cx a[6],out[11]; rz(pi/2) out[11]; rz(pi/4) b[6]; cx b[6],out[12]; rz(-pi/4) out[12]; cx b[6],out[12]; rz(pi/4) out[12]; cx b[6],a[6]; rz(-pi/4) a[6]; cx a[6],out[12]; rz(pi/4) out[12]; cx a[6],out[12]; rz(-pi/4) out[12]; cx b[6],a[6]; rz(pi/4) a[6]; cx a[6],out[12]; rz(-pi/4) out[12]; cx a[6],out[12]; rz(pi/4) out[12]; rz(pi/8) b[6]; cx b[6],out[13]; rz(-pi/8) out[13]; cx b[6],out[13]; rz(pi/8) out[13]; cx b[6],a[6]; rz(-pi/8) a[6]; cx a[6],out[13]; rz(pi/8) out[13]; cx a[6],out[13]; rz(-pi/8) out[13]; cx b[6],a[6]; rz(pi/8) a[6]; cx a[6],out[13]; rz(-pi/8) out[13]; cx a[6],out[13]; rz(pi/8) out[13]; rz(pi/16) b[6]; cx b[6],out[14]; rz(-pi/16) out[14]; cx b[6],out[14]; rz(pi/16) out[14]; cx b[6],a[6]; rz(-pi/16) a[6]; cx a[6],out[14]; rz(pi/16) out[14]; cx a[6],out[14]; rz(-pi/16) out[14]; cx b[6],a[6]; rz(pi/16) a[6]; cx a[6],out[14]; rz(-pi/16) out[14]; cx a[6],out[14]; rz(pi/16) out[14]; rz(pi/32) b[6]; cx b[6],out[15]; rz(-pi/32) out[15]; cx b[6],out[15]; rz(pi/32) out[15]; cx b[6],a[6]; rz(-pi/32) a[6]; cx a[6],out[15]; rz(pi/32) out[15]; cx a[6],out[15]; rz(-pi/32) out[15]; cx b[6],a[6]; rz(pi/32) a[6]; cx a[6],out[15]; rz(-pi/32) out[15]; cx a[6],out[15]; rz(pi/32) out[15]; cx b[5],a[6]; rz(-512*pi) a[6]; cx a[6],out[0]; rz(512*pi) out[0]; cx a[6],out[0]; rz(-512*pi) out[0]; cx b[5],a[6]; rz(512*pi) a[6]; cx a[6],out[0]; rz(-512*pi) out[0]; cx a[6],out[0]; rz(512*pi) out[0]; cx b[4],out[0]; rz(-256*pi) out[0]; cx b[4],out[0]; rz(256*pi) out[0]; rz(256*pi) b[5]; cx b[5],out[1]; rz(-256*pi) out[1]; cx b[5],out[1]; rz(256*pi) out[1]; cx b[5],a[6]; rz(-256*pi) a[6]; cx a[6],out[1]; rz(256*pi) out[1]; cx a[6],out[1]; rz(-256*pi) out[1]; cx b[5],a[6]; rz(256*pi) a[6]; cx a[6],out[1]; rz(-256*pi) out[1]; cx a[6],out[1]; rz(256*pi) out[1]; rz(128*pi) b[5]; cx b[5],out[2]; rz(-128*pi) out[2]; cx b[5],out[2]; rz(128*pi) out[2]; cx b[5],a[6]; rz(-128*pi) a[6]; cx a[6],out[2]; rz(128*pi) out[2]; cx a[6],out[2]; rz(-128*pi) out[2]; cx b[5],a[6]; rz(128*pi) a[6]; cx a[6],out[2]; rz(-128*pi) out[2]; cx a[6],out[2]; rz(128*pi) out[2]; rz(64*pi) b[5]; cx b[5],out[3]; rz(-64*pi) out[3]; cx b[5],out[3]; rz(64*pi) out[3]; cx b[5],a[6]; rz(-64*pi) a[6]; cx a[6],out[3]; rz(64*pi) out[3]; cx a[6],out[3]; rz(-64*pi) out[3]; cx b[5],a[6]; rz(64*pi) a[6]; cx a[6],out[3]; rz(-64*pi) out[3]; cx a[6],out[3]; rz(64*pi) out[3]; rz(32*pi) b[5]; cx b[5],out[4]; rz(-32*pi) out[4]; cx b[5],out[4]; rz(32*pi) out[4]; cx b[5],a[6]; rz(-32*pi) a[6]; cx a[6],out[4]; rz(32*pi) out[4]; cx a[6],out[4]; rz(-32*pi) out[4]; cx b[5],a[6]; rz(32*pi) a[6]; cx a[6],out[4]; rz(-32*pi) out[4]; cx a[6],out[4]; rz(32*pi) out[4]; rz(16*pi) b[5]; cx b[5],out[5]; rz(-16*pi) out[5]; cx b[5],out[5]; rz(16*pi) out[5]; cx b[5],a[6]; rz(-16*pi) a[6]; cx a[6],out[5]; rz(16*pi) out[5]; cx a[6],out[5]; rz(-16*pi) out[5]; cx b[5],a[6]; rz(16*pi) a[6]; cx a[6],out[5]; rz(-16*pi) out[5]; cx a[6],out[5]; rz(16*pi) out[5]; rz(8*pi) b[5]; cx b[5],out[6]; rz(-8*pi) out[6]; cx b[5],out[6]; rz(8*pi) out[6]; cx b[5],a[6]; rz(-8*pi) a[6]; cx a[6],out[6]; rz(8*pi) out[6]; cx a[6],out[6]; rz(-8*pi) out[6]; cx b[5],a[6]; rz(8*pi) a[6]; cx a[6],out[6]; rz(-8*pi) out[6]; cx a[6],out[6]; rz(8*pi) out[6]; rz(4*pi) b[5]; cx b[5],out[7]; rz(-4*pi) out[7]; cx b[5],out[7]; rz(4*pi) out[7]; cx b[5],a[6]; rz(-4*pi) a[6]; cx a[6],out[7]; rz(4*pi) out[7]; cx a[6],out[7]; rz(-4*pi) out[7]; cx b[5],a[6]; rz(4*pi) a[6]; cx a[6],out[7]; rz(-4*pi) out[7]; cx a[6],out[7]; rz(4*pi) out[7]; rz(2*pi) b[5]; cx b[5],out[8]; rz(-2*pi) out[8]; cx b[5],out[8]; rz(2*pi) out[8]; cx b[5],a[6]; rz(-2*pi) a[6]; cx a[6],out[8]; rz(2*pi) out[8]; cx a[6],out[8]; rz(-2*pi) out[8]; cx b[5],a[6]; rz(2*pi) a[6]; cx a[6],out[8]; rz(-2*pi) out[8]; cx a[6],out[8]; rz(2*pi) out[8]; rz(pi) b[5]; cx b[5],out[9]; rz(-pi) out[9]; cx b[5],out[9]; rz(pi) out[9]; cx b[5],a[6]; rz(-pi) a[6]; cx a[6],out[9]; rz(pi) out[9]; cx a[6],out[9]; rz(-pi) out[9]; cx b[5],a[6]; rz(pi) a[6]; cx a[6],out[9]; rz(-pi) out[9]; cx a[6],out[9]; rz(pi) out[9]; rz(pi/2) b[5]; cx b[5],out[10]; rz(-pi/2) out[10]; cx b[5],out[10]; rz(pi/2) out[10]; cx b[5],a[6]; rz(-pi/2) a[6]; cx a[6],out[10]; rz(pi/2) out[10]; cx a[6],out[10]; rz(-pi/2) out[10]; cx b[5],a[6]; rz(pi/2) a[6]; cx a[6],out[10]; rz(-pi/2) out[10]; cx a[6],out[10]; rz(pi/2) out[10]; rz(pi/4) b[5]; cx b[5],out[11]; rz(-pi/4) out[11]; cx b[5],out[11]; rz(pi/4) out[11]; cx b[5],a[6]; rz(-pi/4) a[6]; cx a[6],out[11]; rz(pi/4) out[11]; cx a[6],out[11]; rz(-pi/4) out[11]; cx b[5],a[6]; rz(pi/4) a[6]; cx a[6],out[11]; rz(-pi/4) out[11]; cx a[6],out[11]; rz(pi/4) out[11]; rz(pi/8) b[5]; cx b[5],out[12]; rz(-pi/8) out[12]; cx b[5],out[12]; rz(pi/8) out[12]; cx b[5],a[6]; rz(-pi/8) a[6]; cx a[6],out[12]; rz(pi/8) out[12]; cx a[6],out[12]; rz(-pi/8) out[12]; cx b[5],a[6]; rz(pi/8) a[6]; cx a[6],out[12]; rz(-pi/8) out[12]; cx a[6],out[12]; rz(pi/8) out[12]; rz(pi/16) b[5]; cx b[5],out[13]; rz(-pi/16) out[13]; cx b[5],out[13]; rz(pi/16) out[13]; cx b[5],a[6]; rz(-pi/16) a[6]; cx a[6],out[13]; rz(pi/16) out[13]; cx a[6],out[13]; rz(-pi/16) out[13]; cx b[5],a[6]; rz(pi/16) a[6]; cx a[6],out[13]; rz(-pi/16) out[13]; cx a[6],out[13]; rz(pi/16) out[13]; rz(pi/32) b[5]; cx b[5],out[14]; rz(-pi/32) out[14]; cx b[5],out[14]; rz(pi/32) out[14]; cx b[5],a[6]; rz(-pi/32) a[6]; cx a[6],out[14]; rz(pi/32) out[14]; cx a[6],out[14]; rz(-pi/32) out[14]; cx b[5],a[6]; rz(pi/32) a[6]; cx a[6],out[14]; rz(-pi/32) out[14]; cx a[6],out[14]; rz(pi/32) out[14]; rz(pi/64) b[5]; cx b[5],out[15]; rz(-pi/64) out[15]; cx b[5],out[15]; rz(pi/64) out[15]; cx b[5],a[6]; rz(-pi/64) a[6]; cx a[6],out[15]; rz(pi/64) out[15]; cx a[6],out[15]; rz(-pi/64) out[15]; cx b[5],a[6]; rz(pi/64) a[6]; cx a[6],out[15]; rz(-pi/64) out[15]; cx a[6],out[15]; rz(pi/64) out[15]; cx b[4],a[6]; rz(-256*pi) a[6]; cx a[6],out[0]; rz(256*pi) out[0]; cx a[6],out[0]; rz(-256*pi) out[0]; cx b[4],a[6]; rz(256*pi) a[6]; cx a[6],out[0]; rz(-256*pi) out[0]; cx a[6],out[0]; rz(256*pi) out[0]; cx b[3],out[0]; rz(-128*pi) out[0]; cx b[3],out[0]; rz(128*pi) out[0]; rz(128*pi) b[4]; cx b[4],out[1]; rz(-128*pi) out[1]; cx b[4],out[1]; rz(128*pi) out[1]; cx b[4],a[6]; rz(-128*pi) a[6]; cx a[6],out[1]; rz(128*pi) out[1]; cx a[6],out[1]; rz(-128*pi) out[1]; cx b[4],a[6]; rz(128*pi) a[6]; cx a[6],out[1]; rz(-128*pi) out[1]; cx a[6],out[1]; rz(128*pi) out[1]; rz(64*pi) b[4]; cx b[4],out[2]; rz(-64*pi) out[2]; cx b[4],out[2]; rz(64*pi) out[2]; cx b[4],a[6]; rz(-64*pi) a[6]; cx a[6],out[2]; rz(64*pi) out[2]; cx a[6],out[2]; rz(-64*pi) out[2]; cx b[4],a[6]; rz(64*pi) a[6]; cx a[6],out[2]; rz(-64*pi) out[2]; cx a[6],out[2]; rz(64*pi) out[2]; rz(32*pi) b[4]; cx b[4],out[3]; rz(-32*pi) out[3]; cx b[4],out[3]; rz(32*pi) out[3]; cx b[4],a[6]; rz(-32*pi) a[6]; cx a[6],out[3]; rz(32*pi) out[3]; cx a[6],out[3]; rz(-32*pi) out[3]; cx b[4],a[6]; rz(32*pi) a[6]; cx a[6],out[3]; rz(-32*pi) out[3]; cx a[6],out[3]; rz(32*pi) out[3]; rz(16*pi) b[4]; cx b[4],out[4]; rz(-16*pi) out[4]; cx b[4],out[4]; rz(16*pi) out[4]; cx b[4],a[6]; rz(-16*pi) a[6]; cx a[6],out[4]; rz(16*pi) out[4]; cx a[6],out[4]; rz(-16*pi) out[4]; cx b[4],a[6]; rz(16*pi) a[6]; cx a[6],out[4]; rz(-16*pi) out[4]; cx a[6],out[4]; rz(16*pi) out[4]; rz(8*pi) b[4]; cx b[4],out[5]; rz(-8*pi) out[5]; cx b[4],out[5]; rz(8*pi) out[5]; cx b[4],a[6]; rz(-8*pi) a[6]; cx a[6],out[5]; rz(8*pi) out[5]; cx a[6],out[5]; rz(-8*pi) out[5]; cx b[4],a[6]; rz(8*pi) a[6]; cx a[6],out[5]; rz(-8*pi) out[5]; cx a[6],out[5]; rz(8*pi) out[5]; rz(4*pi) b[4]; cx b[4],out[6]; rz(-4*pi) out[6]; cx b[4],out[6]; rz(4*pi) out[6]; cx b[4],a[6]; rz(-4*pi) a[6]; cx a[6],out[6]; rz(4*pi) out[6]; cx a[6],out[6]; rz(-4*pi) out[6]; cx b[4],a[6]; rz(4*pi) a[6]; cx a[6],out[6]; rz(-4*pi) out[6]; cx a[6],out[6]; rz(4*pi) out[6]; rz(2*pi) b[4]; cx b[4],out[7]; rz(-2*pi) out[7]; cx b[4],out[7]; rz(2*pi) out[7]; cx b[4],a[6]; rz(-2*pi) a[6]; cx a[6],out[7]; rz(2*pi) out[7]; cx a[6],out[7]; rz(-2*pi) out[7]; cx b[4],a[6]; rz(2*pi) a[6]; cx a[6],out[7]; rz(-2*pi) out[7]; cx a[6],out[7]; rz(2*pi) out[7]; rz(pi) b[4]; cx b[4],out[8]; rz(-pi) out[8]; cx b[4],out[8]; rz(pi) out[8]; cx b[4],a[6]; rz(-pi) a[6]; cx a[6],out[8]; rz(pi) out[8]; cx a[6],out[8]; rz(-pi) out[8]; cx b[4],a[6]; rz(pi) a[6]; cx a[6],out[8]; rz(-pi) out[8]; cx a[6],out[8]; rz(pi) out[8]; rz(pi/2) b[4]; cx b[4],out[9]; rz(-pi/2) out[9]; cx b[4],out[9]; rz(pi/2) out[9]; cx b[4],a[6]; rz(-pi/2) a[6]; cx a[6],out[9]; rz(pi/2) out[9]; cx a[6],out[9]; rz(-pi/2) out[9]; cx b[4],a[6]; rz(pi/2) a[6]; cx a[6],out[9]; rz(-pi/2) out[9]; cx a[6],out[9]; rz(pi/2) out[9]; rz(pi/4) b[4]; cx b[4],out[10]; rz(-pi/4) out[10]; cx b[4],out[10]; rz(pi/4) out[10]; cx b[4],a[6]; rz(-pi/4) a[6]; cx a[6],out[10]; rz(pi/4) out[10]; cx a[6],out[10]; rz(-pi/4) out[10]; cx b[4],a[6]; rz(pi/4) a[6]; cx a[6],out[10]; rz(-pi/4) out[10]; cx a[6],out[10]; rz(pi/4) out[10]; rz(pi/8) b[4]; cx b[4],out[11]; rz(-pi/8) out[11]; cx b[4],out[11]; rz(pi/8) out[11]; cx b[4],a[6]; rz(-pi/8) a[6]; cx a[6],out[11]; rz(pi/8) out[11]; cx a[6],out[11]; rz(-pi/8) out[11]; cx b[4],a[6]; rz(pi/8) a[6]; cx a[6],out[11]; rz(-pi/8) out[11]; cx a[6],out[11]; rz(pi/8) out[11]; rz(pi/16) b[4]; cx b[4],out[12]; rz(-pi/16) out[12]; cx b[4],out[12]; rz(pi/16) out[12]; cx b[4],a[6]; rz(-pi/16) a[6]; cx a[6],out[12]; rz(pi/16) out[12]; cx a[6],out[12]; rz(-pi/16) out[12]; cx b[4],a[6]; rz(pi/16) a[6]; cx a[6],out[12]; rz(-pi/16) out[12]; cx a[6],out[12]; rz(pi/16) out[12]; rz(pi/32) b[4]; cx b[4],out[13]; rz(-pi/32) out[13]; cx b[4],out[13]; rz(pi/32) out[13]; cx b[4],a[6]; rz(-pi/32) a[6]; cx a[6],out[13]; rz(pi/32) out[13]; cx a[6],out[13]; rz(-pi/32) out[13]; cx b[4],a[6]; rz(pi/32) a[6]; cx a[6],out[13]; rz(-pi/32) out[13]; cx a[6],out[13]; rz(pi/32) out[13]; rz(pi/64) b[4]; cx b[4],out[14]; rz(-pi/64) out[14]; cx b[4],out[14]; rz(pi/64) out[14]; cx b[4],a[6]; rz(-pi/64) a[6]; cx a[6],out[14]; rz(pi/64) out[14]; cx a[6],out[14]; rz(-pi/64) out[14]; cx b[4],a[6]; rz(pi/64) a[6]; cx a[6],out[14]; rz(-pi/64) out[14]; cx a[6],out[14]; rz(pi/64) out[14]; rz(pi/128) b[4]; cx b[4],out[15]; rz(-pi/128) out[15]; cx b[4],out[15]; rz(pi/128) out[15]; cx b[4],a[6]; rz(-pi/128) a[6]; cx a[6],out[15]; rz(pi/128) out[15]; cx a[6],out[15]; rz(-pi/128) out[15]; cx b[4],a[6]; rz(pi/128) a[6]; cx a[6],out[15]; rz(-pi/128) out[15]; cx a[6],out[15]; rz(pi/128) out[15]; cx b[3],a[6]; rz(-128*pi) a[6]; cx a[6],out[0]; rz(128*pi) out[0]; cx a[6],out[0]; rz(-128*pi) out[0]; cx b[3],a[6]; rz(128*pi) a[6]; cx a[6],out[0]; rz(-128*pi) out[0]; cx a[6],out[0]; rz(128*pi) out[0]; cx b[2],out[0]; rz(-64*pi) out[0]; cx b[2],out[0]; rz(64*pi) out[0]; rz(64*pi) b[3]; cx b[3],out[1]; rz(-64*pi) out[1]; cx b[3],out[1]; rz(64*pi) out[1]; cx b[3],a[6]; rz(-64*pi) a[6]; cx a[6],out[1]; rz(64*pi) out[1]; cx a[6],out[1]; rz(-64*pi) out[1]; cx b[3],a[6]; rz(64*pi) a[6]; cx a[6],out[1]; rz(-64*pi) out[1]; cx a[6],out[1]; rz(64*pi) out[1]; rz(32*pi) b[3]; cx b[3],out[2]; rz(-32*pi) out[2]; cx b[3],out[2]; rz(32*pi) out[2]; cx b[3],a[6]; rz(-32*pi) a[6]; cx a[6],out[2]; rz(32*pi) out[2]; cx a[6],out[2]; rz(-32*pi) out[2]; cx b[3],a[6]; rz(32*pi) a[6]; cx a[6],out[2]; rz(-32*pi) out[2]; cx a[6],out[2]; rz(32*pi) out[2]; rz(16*pi) b[3]; cx b[3],out[3]; rz(-16*pi) out[3]; cx b[3],out[3]; rz(16*pi) out[3]; cx b[3],a[6]; rz(-16*pi) a[6]; cx a[6],out[3]; rz(16*pi) out[3]; cx a[6],out[3]; rz(-16*pi) out[3]; cx b[3],a[6]; rz(16*pi) a[6]; cx a[6],out[3]; rz(-16*pi) out[3]; cx a[6],out[3]; rz(16*pi) out[3]; rz(8*pi) b[3]; cx b[3],out[4]; rz(-8*pi) out[4]; cx b[3],out[4]; rz(8*pi) out[4]; cx b[3],a[6]; rz(-8*pi) a[6]; cx a[6],out[4]; rz(8*pi) out[4]; cx a[6],out[4]; rz(-8*pi) out[4]; cx b[3],a[6]; rz(8*pi) a[6]; cx a[6],out[4]; rz(-8*pi) out[4]; cx a[6],out[4]; rz(8*pi) out[4]; rz(4*pi) b[3]; cx b[3],out[5]; rz(-4*pi) out[5]; cx b[3],out[5]; rz(4*pi) out[5]; cx b[3],a[6]; rz(-4*pi) a[6]; cx a[6],out[5]; rz(4*pi) out[5]; cx a[6],out[5]; rz(-4*pi) out[5]; cx b[3],a[6]; rz(4*pi) a[6]; cx a[6],out[5]; rz(-4*pi) out[5]; cx a[6],out[5]; rz(4*pi) out[5]; rz(2*pi) b[3]; cx b[3],out[6]; rz(-2*pi) out[6]; cx b[3],out[6]; rz(2*pi) out[6]; cx b[3],a[6]; rz(-2*pi) a[6]; cx a[6],out[6]; rz(2*pi) out[6]; cx a[6],out[6]; rz(-2*pi) out[6]; cx b[3],a[6]; rz(2*pi) a[6]; cx a[6],out[6]; rz(-2*pi) out[6]; cx a[6],out[6]; rz(2*pi) out[6]; rz(pi) b[3]; cx b[3],out[7]; rz(-pi) out[7]; cx b[3],out[7]; rz(pi) out[7]; cx b[3],a[6]; rz(-pi) a[6]; cx a[6],out[7]; rz(pi) out[7]; cx a[6],out[7]; rz(-pi) out[7]; cx b[3],a[6]; rz(pi) a[6]; cx a[6],out[7]; rz(-pi) out[7]; cx a[6],out[7]; rz(pi) out[7]; rz(pi/2) b[3]; cx b[3],out[8]; rz(-pi/2) out[8]; cx b[3],out[8]; rz(pi/2) out[8]; cx b[3],a[6]; rz(-pi/2) a[6]; cx a[6],out[8]; rz(pi/2) out[8]; cx a[6],out[8]; rz(-pi/2) out[8]; cx b[3],a[6]; rz(pi/2) a[6]; cx a[6],out[8]; rz(-pi/2) out[8]; cx a[6],out[8]; rz(pi/2) out[8]; rz(pi/4) b[3]; cx b[3],out[9]; rz(-pi/4) out[9]; cx b[3],out[9]; rz(pi/4) out[9]; cx b[3],a[6]; rz(-pi/4) a[6]; cx a[6],out[9]; rz(pi/4) out[9]; cx a[6],out[9]; rz(-pi/4) out[9]; cx b[3],a[6]; rz(pi/4) a[6]; cx a[6],out[9]; rz(-pi/4) out[9]; cx a[6],out[9]; rz(pi/4) out[9]; rz(pi/8) b[3]; cx b[3],out[10]; rz(-pi/8) out[10]; cx b[3],out[10]; rz(pi/8) out[10]; cx b[3],a[6]; rz(-pi/8) a[6]; cx a[6],out[10]; rz(pi/8) out[10]; cx a[6],out[10]; rz(-pi/8) out[10]; cx b[3],a[6]; rz(pi/8) a[6]; cx a[6],out[10]; rz(-pi/8) out[10]; cx a[6],out[10]; rz(pi/8) out[10]; rz(pi/16) b[3]; cx b[3],out[11]; rz(-pi/16) out[11]; cx b[3],out[11]; rz(pi/16) out[11]; cx b[3],a[6]; rz(-pi/16) a[6]; cx a[6],out[11]; rz(pi/16) out[11]; cx a[6],out[11]; rz(-pi/16) out[11]; cx b[3],a[6]; rz(pi/16) a[6]; cx a[6],out[11]; rz(-pi/16) out[11]; cx a[6],out[11]; rz(pi/16) out[11]; rz(pi/32) b[3]; cx b[3],out[12]; rz(-pi/32) out[12]; cx b[3],out[12]; rz(pi/32) out[12]; cx b[3],a[6]; rz(-pi/32) a[6]; cx a[6],out[12]; rz(pi/32) out[12]; cx a[6],out[12]; rz(-pi/32) out[12]; cx b[3],a[6]; rz(pi/32) a[6]; cx a[6],out[12]; rz(-pi/32) out[12]; cx a[6],out[12]; rz(pi/32) out[12]; rz(pi/64) b[3]; cx b[3],out[13]; rz(-pi/64) out[13]; cx b[3],out[13]; rz(pi/64) out[13]; cx b[3],a[6]; rz(-pi/64) a[6]; cx a[6],out[13]; rz(pi/64) out[13]; cx a[6],out[13]; rz(-pi/64) out[13]; cx b[3],a[6]; rz(pi/64) a[6]; cx a[6],out[13]; rz(-pi/64) out[13]; cx a[6],out[13]; rz(pi/64) out[13]; rz(pi/128) b[3]; cx b[3],out[14]; rz(-pi/128) out[14]; cx b[3],out[14]; rz(pi/128) out[14]; cx b[3],a[6]; rz(-pi/128) a[6]; cx a[6],out[14]; rz(pi/128) out[14]; cx a[6],out[14]; rz(-pi/128) out[14]; cx b[3],a[6]; rz(pi/128) a[6]; cx a[6],out[14]; rz(-pi/128) out[14]; cx a[6],out[14]; rz(pi/128) out[14]; rz(pi/256) b[3]; cx b[3],out[15]; rz(-pi/256) out[15]; cx b[3],out[15]; rz(pi/256) out[15]; cx b[3],a[6]; rz(-pi/256) a[6]; cx a[6],out[15]; rz(pi/256) out[15]; cx a[6],out[15]; rz(-pi/256) out[15]; cx b[3],a[6]; rz(pi/256) a[6]; cx a[6],out[15]; rz(-pi/256) out[15]; cx a[6],out[15]; rz(pi/256) out[15]; cx b[2],a[6]; rz(-64*pi) a[6]; cx a[6],out[0]; rz(64*pi) out[0]; cx a[6],out[0]; rz(-64*pi) out[0]; cx b[2],a[6]; rz(64*pi) a[6]; cx a[6],out[0]; rz(-64*pi) out[0]; cx a[6],out[0]; rz(64*pi) out[0]; cx b[1],out[0]; rz(-32*pi) out[0]; cx b[1],out[0]; rz(32*pi) out[0]; rz(32*pi) b[2]; cx b[2],out[1]; rz(-32*pi) out[1]; cx b[2],out[1]; rz(32*pi) out[1]; cx b[2],a[6]; rz(-32*pi) a[6]; cx a[6],out[1]; rz(32*pi) out[1]; cx a[6],out[1]; rz(-32*pi) out[1]; cx b[2],a[6]; rz(32*pi) a[6]; cx a[6],out[1]; rz(-32*pi) out[1]; cx a[6],out[1]; rz(32*pi) out[1]; rz(16*pi) b[2]; cx b[2],out[2]; rz(-16*pi) out[2]; cx b[2],out[2]; rz(16*pi) out[2]; cx b[2],a[6]; rz(-16*pi) a[6]; cx a[6],out[2]; rz(16*pi) out[2]; cx a[6],out[2]; rz(-16*pi) out[2]; cx b[2],a[6]; rz(16*pi) a[6]; cx a[6],out[2]; rz(-16*pi) out[2]; cx a[6],out[2]; rz(16*pi) out[2]; rz(8*pi) b[2]; cx b[2],out[3]; rz(-8*pi) out[3]; cx b[2],out[3]; rz(8*pi) out[3]; cx b[2],a[6]; rz(-8*pi) a[6]; cx a[6],out[3]; rz(8*pi) out[3]; cx a[6],out[3]; rz(-8*pi) out[3]; cx b[2],a[6]; rz(8*pi) a[6]; cx a[6],out[3]; rz(-8*pi) out[3]; cx a[6],out[3]; rz(8*pi) out[3]; rz(4*pi) b[2]; cx b[2],out[4]; rz(-4*pi) out[4]; cx b[2],out[4]; rz(4*pi) out[4]; cx b[2],a[6]; rz(-4*pi) a[6]; cx a[6],out[4]; rz(4*pi) out[4]; cx a[6],out[4]; rz(-4*pi) out[4]; cx b[2],a[6]; rz(4*pi) a[6]; cx a[6],out[4]; rz(-4*pi) out[4]; cx a[6],out[4]; rz(4*pi) out[4]; rz(2*pi) b[2]; cx b[2],out[5]; rz(-2*pi) out[5]; cx b[2],out[5]; rz(2*pi) out[5]; cx b[2],a[6]; rz(-2*pi) a[6]; cx a[6],out[5]; rz(2*pi) out[5]; cx a[6],out[5]; rz(-2*pi) out[5]; cx b[2],a[6]; rz(2*pi) a[6]; cx a[6],out[5]; rz(-2*pi) out[5]; cx a[6],out[5]; rz(2*pi) out[5]; rz(pi) b[2]; cx b[2],out[6]; rz(-pi) out[6]; cx b[2],out[6]; rz(pi) out[6]; cx b[2],a[6]; rz(-pi) a[6]; cx a[6],out[6]; rz(pi) out[6]; cx a[6],out[6]; rz(-pi) out[6]; cx b[2],a[6]; rz(pi) a[6]; cx a[6],out[6]; rz(-pi) out[6]; cx a[6],out[6]; rz(pi) out[6]; rz(pi/2) b[2]; cx b[2],out[7]; rz(-pi/2) out[7]; cx b[2],out[7]; rz(pi/2) out[7]; cx b[2],a[6]; rz(-pi/2) a[6]; cx a[6],out[7]; rz(pi/2) out[7]; cx a[6],out[7]; rz(-pi/2) out[7]; cx b[2],a[6]; rz(pi/2) a[6]; cx a[6],out[7]; rz(-pi/2) out[7]; cx a[6],out[7]; rz(pi/2) out[7]; rz(pi/4) b[2]; cx b[2],out[8]; rz(-pi/4) out[8]; cx b[2],out[8]; rz(pi/4) out[8]; cx b[2],a[6]; rz(-pi/4) a[6]; cx a[6],out[8]; rz(pi/4) out[8]; cx a[6],out[8]; rz(-pi/4) out[8]; cx b[2],a[6]; rz(pi/4) a[6]; cx a[6],out[8]; rz(-pi/4) out[8]; cx a[6],out[8]; rz(pi/4) out[8]; rz(pi/8) b[2]; cx b[2],out[9]; rz(-pi/8) out[9]; cx b[2],out[9]; rz(pi/8) out[9]; cx b[2],a[6]; rz(-pi/8) a[6]; cx a[6],out[9]; rz(pi/8) out[9]; cx a[6],out[9]; rz(-pi/8) out[9]; cx b[2],a[6]; rz(pi/8) a[6]; cx a[6],out[9]; rz(-pi/8) out[9]; cx a[6],out[9]; rz(pi/8) out[9]; rz(pi/16) b[2]; cx b[2],out[10]; rz(-pi/16) out[10]; cx b[2],out[10]; rz(pi/16) out[10]; cx b[2],a[6]; rz(-pi/16) a[6]; cx a[6],out[10]; rz(pi/16) out[10]; cx a[6],out[10]; rz(-pi/16) out[10]; cx b[2],a[6]; rz(pi/16) a[6]; cx a[6],out[10]; rz(-pi/16) out[10]; cx a[6],out[10]; rz(pi/16) out[10]; rz(pi/32) b[2]; cx b[2],out[11]; rz(-pi/32) out[11]; cx b[2],out[11]; rz(pi/32) out[11]; cx b[2],a[6]; rz(-pi/32) a[6]; cx a[6],out[11]; rz(pi/32) out[11]; cx a[6],out[11]; rz(-pi/32) out[11]; cx b[2],a[6]; rz(pi/32) a[6]; cx a[6],out[11]; rz(-pi/32) out[11]; cx a[6],out[11]; rz(pi/32) out[11]; rz(pi/64) b[2]; cx b[2],out[12]; rz(-pi/64) out[12]; cx b[2],out[12]; rz(pi/64) out[12]; cx b[2],a[6]; rz(-pi/64) a[6]; cx a[6],out[12]; rz(pi/64) out[12]; cx a[6],out[12]; rz(-pi/64) out[12]; cx b[2],a[6]; rz(pi/64) a[6]; cx a[6],out[12]; rz(-pi/64) out[12]; cx a[6],out[12]; rz(pi/64) out[12]; rz(pi/128) b[2]; cx b[2],out[13]; rz(-pi/128) out[13]; cx b[2],out[13]; rz(pi/128) out[13]; cx b[2],a[6]; rz(-pi/128) a[6]; cx a[6],out[13]; rz(pi/128) out[13]; cx a[6],out[13]; rz(-pi/128) out[13]; cx b[2],a[6]; rz(pi/128) a[6]; cx a[6],out[13]; rz(-pi/128) out[13]; cx a[6],out[13]; rz(pi/128) out[13]; rz(pi/256) b[2]; cx b[2],out[14]; rz(-pi/256) out[14]; cx b[2],out[14]; rz(pi/256) out[14]; cx b[2],a[6]; rz(-pi/256) a[6]; cx a[6],out[14]; rz(pi/256) out[14]; cx a[6],out[14]; rz(-pi/256) out[14]; cx b[2],a[6]; rz(pi/256) a[6]; cx a[6],out[14]; rz(-pi/256) out[14]; cx a[6],out[14]; rz(pi/256) out[14]; rz(pi/512) b[2]; cx b[2],out[15]; rz(-pi/512) out[15]; cx b[2],out[15]; rz(pi/512) out[15]; cx b[2],a[6]; rz(-pi/512) a[6]; cx a[6],out[15]; rz(pi/512) out[15]; cx a[6],out[15]; rz(-pi/512) out[15]; cx b[2],a[6]; rz(pi/512) a[6]; cx a[6],out[15]; rz(-pi/512) out[15]; cx a[6],out[15]; rz(pi/512) out[15]; cx b[1],a[6]; rz(-32*pi) a[6]; cx a[6],out[0]; rz(32*pi) out[0]; cx a[6],out[0]; rz(-32*pi) out[0]; cx b[1],a[6]; rz(32*pi) a[6]; cx a[6],out[0]; rz(-32*pi) out[0]; cx a[6],out[0]; rz(32*pi) out[0]; cx b[0],out[0]; rz(-16*pi) out[0]; cx b[0],out[0]; rz(16*pi) out[0]; rz(16*pi) b[1]; cx b[1],out[1]; rz(-16*pi) out[1]; cx b[1],out[1]; rz(16*pi) out[1]; cx b[1],a[6]; rz(-16*pi) a[6]; cx a[6],out[1]; rz(16*pi) out[1]; cx a[6],out[1]; rz(-16*pi) out[1]; cx b[1],a[6]; rz(16*pi) a[6]; cx a[6],out[1]; rz(-16*pi) out[1]; cx a[6],out[1]; rz(16*pi) out[1]; rz(8*pi) b[1]; cx b[1],out[2]; rz(-8*pi) out[2]; cx b[1],out[2]; rz(8*pi) out[2]; cx b[1],a[6]; rz(-8*pi) a[6]; cx a[6],out[2]; rz(8*pi) out[2]; cx a[6],out[2]; rz(-8*pi) out[2]; cx b[1],a[6]; rz(8*pi) a[6]; cx a[6],out[2]; rz(-8*pi) out[2]; cx a[6],out[2]; rz(8*pi) out[2]; rz(4*pi) b[1]; cx b[1],out[3]; rz(-4*pi) out[3]; cx b[1],out[3]; rz(4*pi) out[3]; cx b[1],a[6]; rz(-4*pi) a[6]; cx a[6],out[3]; rz(4*pi) out[3]; cx a[6],out[3]; rz(-4*pi) out[3]; cx b[1],a[6]; rz(4*pi) a[6]; cx a[6],out[3]; rz(-4*pi) out[3]; cx a[6],out[3]; rz(4*pi) out[3]; rz(2*pi) b[1]; cx b[1],out[4]; rz(-2*pi) out[4]; cx b[1],out[4]; rz(2*pi) out[4]; cx b[1],a[6]; rz(-2*pi) a[6]; cx a[6],out[4]; rz(2*pi) out[4]; cx a[6],out[4]; rz(-2*pi) out[4]; cx b[1],a[6]; rz(2*pi) a[6]; cx a[6],out[4]; rz(-2*pi) out[4]; cx a[6],out[4]; rz(2*pi) out[4]; rz(pi) b[1]; cx b[1],out[5]; rz(-pi) out[5]; cx b[1],out[5]; rz(pi) out[5]; cx b[1],a[6]; rz(-pi) a[6]; cx a[6],out[5]; rz(pi) out[5]; cx a[6],out[5]; rz(-pi) out[5]; cx b[1],a[6]; rz(pi) a[6]; cx a[6],out[5]; rz(-pi) out[5]; cx a[6],out[5]; rz(pi) out[5]; rz(pi/2) b[1]; cx b[1],out[6]; rz(-pi/2) out[6]; cx b[1],out[6]; rz(pi/2) out[6]; cx b[1],a[6]; rz(-pi/2) a[6]; cx a[6],out[6]; rz(pi/2) out[6]; cx a[6],out[6]; rz(-pi/2) out[6]; cx b[1],a[6]; rz(pi/2) a[6]; cx a[6],out[6]; rz(-pi/2) out[6]; cx a[6],out[6]; rz(pi/2) out[6]; rz(pi/4) b[1]; cx b[1],out[7]; rz(-pi/4) out[7]; cx b[1],out[7]; rz(pi/4) out[7]; cx b[1],a[6]; rz(-pi/4) a[6]; cx a[6],out[7]; rz(pi/4) out[7]; cx a[6],out[7]; rz(-pi/4) out[7]; cx b[1],a[6]; rz(pi/4) a[6]; cx a[6],out[7]; rz(-pi/4) out[7]; cx a[6],out[7]; rz(pi/4) out[7]; rz(pi/8) b[1]; cx b[1],out[8]; rz(-pi/8) out[8]; cx b[1],out[8]; rz(pi/8) out[8]; cx b[1],a[6]; rz(-pi/8) a[6]; cx a[6],out[8]; rz(pi/8) out[8]; cx a[6],out[8]; rz(-pi/8) out[8]; cx b[1],a[6]; rz(pi/8) a[6]; cx a[6],out[8]; rz(-pi/8) out[8]; cx a[6],out[8]; rz(pi/8) out[8]; rz(pi/16) b[1]; cx b[1],out[9]; rz(-pi/16) out[9]; cx b[1],out[9]; rz(pi/16) out[9]; cx b[1],a[6]; rz(-pi/16) a[6]; cx a[6],out[9]; rz(pi/16) out[9]; cx a[6],out[9]; rz(-pi/16) out[9]; cx b[1],a[6]; rz(pi/16) a[6]; cx a[6],out[9]; rz(-pi/16) out[9]; cx a[6],out[9]; rz(pi/16) out[9]; rz(pi/32) b[1]; cx b[1],out[10]; rz(-pi/32) out[10]; cx b[1],out[10]; rz(pi/32) out[10]; cx b[1],a[6]; rz(-pi/32) a[6]; cx a[6],out[10]; rz(pi/32) out[10]; cx a[6],out[10]; rz(-pi/32) out[10]; cx b[1],a[6]; rz(pi/32) a[6]; cx a[6],out[10]; rz(-pi/32) out[10]; cx a[6],out[10]; rz(pi/32) out[10]; rz(pi/64) b[1]; cx b[1],out[11]; rz(-pi/64) out[11]; cx b[1],out[11]; rz(pi/64) out[11]; cx b[1],a[6]; rz(-pi/64) a[6]; cx a[6],out[11]; rz(pi/64) out[11]; cx a[6],out[11]; rz(-pi/64) out[11]; cx b[1],a[6]; rz(pi/64) a[6]; cx a[6],out[11]; rz(-pi/64) out[11]; cx a[6],out[11]; rz(pi/64) out[11]; rz(pi/128) b[1]; cx b[1],out[12]; rz(-pi/128) out[12]; cx b[1],out[12]; rz(pi/128) out[12]; cx b[1],a[6]; rz(-pi/128) a[6]; cx a[6],out[12]; rz(pi/128) out[12]; cx a[6],out[12]; rz(-pi/128) out[12]; cx b[1],a[6]; rz(pi/128) a[6]; cx a[6],out[12]; rz(-pi/128) out[12]; cx a[6],out[12]; rz(pi/128) out[12]; rz(pi/256) b[1]; cx b[1],out[13]; rz(-pi/256) out[13]; cx b[1],out[13]; rz(pi/256) out[13]; cx b[1],a[6]; rz(-pi/256) a[6]; cx a[6],out[13]; rz(pi/256) out[13]; cx a[6],out[13]; rz(-pi/256) out[13]; cx b[1],a[6]; rz(pi/256) a[6]; cx a[6],out[13]; rz(-pi/256) out[13]; cx a[6],out[13]; rz(pi/256) out[13]; rz(pi/512) b[1]; cx b[1],out[14]; rz(-pi/512) out[14]; cx b[1],out[14]; rz(pi/512) out[14]; cx b[1],a[6]; rz(-pi/512) a[6]; cx a[6],out[14]; rz(pi/512) out[14]; cx a[6],out[14]; rz(-pi/512) out[14]; cx b[1],a[6]; rz(pi/512) a[6]; cx a[6],out[14]; rz(-pi/512) out[14]; cx a[6],out[14]; rz(pi/512) out[14]; rz(pi/1024) b[1]; cx b[1],out[15]; rz(-pi/1024) out[15]; cx b[1],out[15]; rz(pi/1024) out[15]; cx b[1],a[6]; rz(-pi/1024) a[6]; cx a[6],out[15]; rz(pi/1024) out[15]; cx a[6],out[15]; rz(-pi/1024) out[15]; cx b[1],a[6]; rz(pi/1024) a[6]; cx a[6],out[15]; rz(-pi/1024) out[15]; cx a[6],out[15]; rz(pi/1024) out[15]; cx b[0],a[6]; rz(-16*pi) a[6]; cx a[6],out[0]; rz(16*pi) out[0]; cx a[6],out[0]; rz(-16*pi) out[0]; cx b[0],a[6]; rz(16*pi) a[6]; cx a[6],out[0]; rz(-16*pi) out[0]; cx a[6],out[0]; rz(16*pi) out[0]; rz(8*pi) b[0]; cx b[0],out[1]; rz(-8*pi) out[1]; cx b[0],out[1]; rz(8*pi) out[1]; cx b[0],a[6]; rz(-8*pi) a[6]; cx a[6],out[1]; rz(8*pi) out[1]; cx a[6],out[1]; rz(-8*pi) out[1]; cx b[0],a[6]; rz(8*pi) a[6]; cx a[6],out[1]; rz(-8*pi) out[1]; cx a[6],out[1]; rz(8*pi) out[1]; rz(4*pi) b[0]; cx b[0],out[2]; rz(-4*pi) out[2]; cx b[0],out[2]; rz(4*pi) out[2]; cx b[0],a[6]; rz(-4*pi) a[6]; cx a[6],out[2]; rz(4*pi) out[2]; cx a[6],out[2]; rz(-4*pi) out[2]; cx b[0],a[6]; rz(4*pi) a[6]; cx a[6],out[2]; rz(-4*pi) out[2]; cx a[6],out[2]; rz(4*pi) out[2]; rz(2*pi) b[0]; cx b[0],out[3]; rz(-2*pi) out[3]; cx b[0],out[3]; rz(2*pi) out[3]; cx b[0],a[6]; rz(-2*pi) a[6]; cx a[6],out[3]; rz(2*pi) out[3]; cx a[6],out[3]; rz(-2*pi) out[3]; cx b[0],a[6]; rz(2*pi) a[6]; cx a[6],out[3]; rz(-2*pi) out[3]; cx a[6],out[3]; rz(2*pi) out[3]; rz(pi) b[0]; cx b[0],out[4]; rz(-pi) out[4]; cx b[0],out[4]; rz(pi) out[4]; cx b[0],a[6]; rz(-pi) a[6]; cx a[6],out[4]; rz(pi) out[4]; cx a[6],out[4]; rz(-pi) out[4]; cx b[0],a[6]; rz(pi) a[6]; cx a[6],out[4]; rz(-pi) out[4]; cx a[6],out[4]; rz(pi) out[4]; rz(pi/2) b[0]; cx b[0],out[5]; rz(-pi/2) out[5]; cx b[0],out[5]; rz(pi/2) out[5]; cx b[0],a[6]; rz(-pi/2) a[6]; cx a[6],out[5]; rz(pi/2) out[5]; cx a[6],out[5]; rz(-pi/2) out[5]; cx b[0],a[6]; rz(pi/2) a[6]; cx a[6],out[5]; rz(-pi/2) out[5]; cx a[6],out[5]; rz(pi/2) out[5]; rz(pi/4) b[0]; cx b[0],out[6]; rz(-pi/4) out[6]; cx b[0],out[6]; rz(pi/4) out[6]; cx b[0],a[6]; rz(-pi/4) a[6]; cx a[6],out[6]; rz(pi/4) out[6]; cx a[6],out[6]; rz(-pi/4) out[6]; cx b[0],a[6]; rz(pi/4) a[6]; cx a[6],out[6]; rz(-pi/4) out[6]; cx a[6],out[6]; rz(pi/4) out[6]; rz(pi/8) b[0]; cx b[0],out[7]; rz(-pi/8) out[7]; cx b[0],out[7]; rz(pi/8) out[7]; cx b[0],a[6]; rz(-pi/8) a[6]; cx a[6],out[7]; rz(pi/8) out[7]; cx a[6],out[7]; rz(-pi/8) out[7]; cx b[0],a[6]; rz(pi/8) a[6]; cx a[6],out[7]; rz(-pi/8) out[7]; cx a[6],out[7]; rz(pi/8) out[7]; rz(pi/16) b[0]; cx b[0],out[8]; rz(-pi/16) out[8]; cx b[0],out[8]; rz(pi/16) out[8]; cx b[0],a[6]; rz(-pi/16) a[6]; cx a[6],out[8]; rz(pi/16) out[8]; cx a[6],out[8]; rz(-pi/16) out[8]; cx b[0],a[6]; rz(pi/16) a[6]; cx a[6],out[8]; rz(-pi/16) out[8]; cx a[6],out[8]; rz(pi/16) out[8]; rz(pi/32) b[0]; cx b[0],out[9]; rz(-pi/32) out[9]; cx b[0],out[9]; rz(pi/32) out[9]; cx b[0],a[6]; rz(-pi/32) a[6]; cx a[6],out[9]; rz(pi/32) out[9]; cx a[6],out[9]; rz(-pi/32) out[9]; cx b[0],a[6]; rz(pi/32) a[6]; cx a[6],out[9]; rz(-pi/32) out[9]; cx a[6],out[9]; rz(pi/32) out[9]; rz(pi/64) b[0]; cx b[0],out[10]; rz(-pi/64) out[10]; cx b[0],out[10]; rz(pi/64) out[10]; cx b[0],a[6]; rz(-pi/64) a[6]; cx a[6],out[10]; rz(pi/64) out[10]; cx a[6],out[10]; rz(-pi/64) out[10]; cx b[0],a[6]; rz(pi/64) a[6]; cx a[6],out[10]; rz(-pi/64) out[10]; cx a[6],out[10]; rz(pi/64) out[10]; rz(pi/128) b[0]; cx b[0],out[11]; rz(-pi/128) out[11]; cx b[0],out[11]; rz(pi/128) out[11]; cx b[0],a[6]; rz(-pi/128) a[6]; cx a[6],out[11]; rz(pi/128) out[11]; cx a[6],out[11]; rz(-pi/128) out[11]; cx b[0],a[6]; rz(pi/128) a[6]; cx a[6],out[11]; rz(-pi/128) out[11]; cx a[6],out[11]; rz(pi/128) out[11]; rz(pi/256) b[0]; cx b[0],out[12]; rz(-pi/256) out[12]; cx b[0],out[12]; rz(pi/256) out[12]; cx b[0],a[6]; rz(-pi/256) a[6]; cx a[6],out[12]; rz(pi/256) out[12]; cx a[6],out[12]; rz(-pi/256) out[12]; cx b[0],a[6]; rz(pi/256) a[6]; cx a[6],out[12]; rz(-pi/256) out[12]; cx a[6],out[12]; rz(pi/256) out[12]; rz(pi/512) b[0]; cx b[0],out[13]; rz(-pi/512) out[13]; cx b[0],out[13]; rz(pi/512) out[13]; cx b[0],a[6]; rz(-pi/512) a[6]; cx a[6],out[13]; rz(pi/512) out[13]; cx a[6],out[13]; rz(-pi/512) out[13]; cx b[0],a[6]; rz(pi/512) a[6]; cx a[6],out[13]; rz(-pi/512) out[13]; cx a[6],out[13]; rz(pi/512) out[13]; rz(pi/1024) b[0]; cx b[0],out[14]; rz(-pi/1024) out[14]; cx b[0],out[14]; rz(pi/1024) out[14]; cx b[0],a[6]; rz(-pi/1024) a[6]; cx a[6],out[14]; rz(pi/1024) out[14]; cx a[6],out[14]; rz(-pi/1024) out[14]; cx b[0],a[6]; rz(pi/1024) a[6]; cx a[6],out[14]; rz(-pi/1024) out[14]; cx a[6],out[14]; rz(pi/1024) out[14]; rz(pi/2048) b[0]; cx b[0],out[15]; rz(-pi/2048) out[15]; cx b[0],out[15]; rz(pi/2048) out[15]; cx b[0],a[6]; rz(-pi/2048) a[6]; cx a[6],out[15]; rz(pi/2048) out[15]; cx a[6],out[15]; rz(-pi/2048) out[15]; cx b[0],a[6]; rz(pi/2048) a[6]; cx a[6],out[15]; rz(-pi/2048) out[15]; cx a[6],out[15]; rz(pi/2048) out[15]; rz(8*pi) b[0]; rz(16*pi) b[1]; rz(32*pi) b[2]; rz(64*pi) b[3]; rz(128*pi) b[4]; rz(256*pi) b[5]; rz(512*pi) b[6]; rz(1024*pi) b[7]; cx b[7],out[0]; rz(-1024*pi) out[0]; cx b[7],out[0]; rz(1024*pi) out[0]; cx b[7],a[5]; rz(-1024*pi) a[5]; cx a[5],out[0]; rz(1024*pi) out[0]; cx a[5],out[0]; rz(-1024*pi) out[0]; cx b[7],a[5]; rz(1024*pi) a[5]; cx a[5],out[0]; rz(-1024*pi) out[0]; cx a[5],out[0]; rz(1024*pi) out[0]; cx b[6],out[0]; rz(-512*pi) out[0]; cx b[6],out[0]; rz(512*pi) out[0]; rz(512*pi) b[7]; cx b[7],out[1]; rz(-512*pi) out[1]; cx b[7],out[1]; rz(512*pi) out[1]; cx b[7],a[5]; rz(-512*pi) a[5]; cx a[5],out[1]; rz(512*pi) out[1]; cx a[5],out[1]; rz(-512*pi) out[1]; cx b[7],a[5]; rz(512*pi) a[5]; cx a[5],out[1]; rz(-512*pi) out[1]; cx a[5],out[1]; rz(512*pi) out[1]; rz(256*pi) b[7]; cx b[7],out[2]; rz(-256*pi) out[2]; cx b[7],out[2]; rz(256*pi) out[2]; cx b[7],a[5]; rz(-256*pi) a[5]; cx a[5],out[2]; rz(256*pi) out[2]; cx a[5],out[2]; rz(-256*pi) out[2]; cx b[7],a[5]; rz(256*pi) a[5]; cx a[5],out[2]; rz(-256*pi) out[2]; cx a[5],out[2]; rz(256*pi) out[2]; rz(128*pi) b[7]; cx b[7],out[3]; rz(-128*pi) out[3]; cx b[7],out[3]; rz(128*pi) out[3]; cx b[7],a[5]; rz(-128*pi) a[5]; cx a[5],out[3]; rz(128*pi) out[3]; cx a[5],out[3]; rz(-128*pi) out[3]; cx b[7],a[5]; rz(128*pi) a[5]; cx a[5],out[3]; rz(-128*pi) out[3]; cx a[5],out[3]; rz(128*pi) out[3]; rz(64*pi) b[7]; cx b[7],out[4]; rz(-64*pi) out[4]; cx b[7],out[4]; rz(64*pi) out[4]; cx b[7],a[5]; rz(-64*pi) a[5]; cx a[5],out[4]; rz(64*pi) out[4]; cx a[5],out[4]; rz(-64*pi) out[4]; cx b[7],a[5]; rz(64*pi) a[5]; cx a[5],out[4]; rz(-64*pi) out[4]; cx a[5],out[4]; rz(64*pi) out[4]; rz(32*pi) b[7]; cx b[7],out[5]; rz(-32*pi) out[5]; cx b[7],out[5]; rz(32*pi) out[5]; cx b[7],a[5]; rz(-32*pi) a[5]; cx a[5],out[5]; rz(32*pi) out[5]; cx a[5],out[5]; rz(-32*pi) out[5]; cx b[7],a[5]; rz(32*pi) a[5]; cx a[5],out[5]; rz(-32*pi) out[5]; cx a[5],out[5]; rz(32*pi) out[5]; rz(16*pi) b[7]; cx b[7],out[6]; rz(-16*pi) out[6]; cx b[7],out[6]; rz(16*pi) out[6]; cx b[7],a[5]; rz(-16*pi) a[5]; cx a[5],out[6]; rz(16*pi) out[6]; cx a[5],out[6]; rz(-16*pi) out[6]; cx b[7],a[5]; rz(16*pi) a[5]; cx a[5],out[6]; rz(-16*pi) out[6]; cx a[5],out[6]; rz(16*pi) out[6]; rz(8*pi) b[7]; cx b[7],out[7]; rz(-8*pi) out[7]; cx b[7],out[7]; rz(8*pi) out[7]; cx b[7],a[5]; rz(-8*pi) a[5]; cx a[5],out[7]; rz(8*pi) out[7]; cx a[5],out[7]; rz(-8*pi) out[7]; cx b[7],a[5]; rz(8*pi) a[5]; cx a[5],out[7]; rz(-8*pi) out[7]; cx a[5],out[7]; rz(8*pi) out[7]; rz(4*pi) b[7]; cx b[7],out[8]; rz(-4*pi) out[8]; cx b[7],out[8]; rz(4*pi) out[8]; cx b[7],a[5]; rz(-4*pi) a[5]; cx a[5],out[8]; rz(4*pi) out[8]; cx a[5],out[8]; rz(-4*pi) out[8]; cx b[7],a[5]; rz(4*pi) a[5]; cx a[5],out[8]; rz(-4*pi) out[8]; cx a[5],out[8]; rz(4*pi) out[8]; rz(2*pi) b[7]; cx b[7],out[9]; rz(-2*pi) out[9]; cx b[7],out[9]; rz(2*pi) out[9]; cx b[7],a[5]; rz(-2*pi) a[5]; cx a[5],out[9]; rz(2*pi) out[9]; cx a[5],out[9]; rz(-2*pi) out[9]; cx b[7],a[5]; rz(2*pi) a[5]; cx a[5],out[9]; rz(-2*pi) out[9]; cx a[5],out[9]; rz(2*pi) out[9]; rz(pi) b[7]; cx b[7],out[10]; rz(-pi) out[10]; cx b[7],out[10]; rz(pi) out[10]; cx b[7],a[5]; rz(-pi) a[5]; cx a[5],out[10]; rz(pi) out[10]; cx a[5],out[10]; rz(-pi) out[10]; cx b[7],a[5]; rz(pi) a[5]; cx a[5],out[10]; rz(-pi) out[10]; cx a[5],out[10]; rz(pi) out[10]; rz(pi/2) b[7]; cx b[7],out[11]; rz(-pi/2) out[11]; cx b[7],out[11]; rz(pi/2) out[11]; cx b[7],a[5]; rz(-pi/2) a[5]; cx a[5],out[11]; rz(pi/2) out[11]; cx a[5],out[11]; rz(-pi/2) out[11]; cx b[7],a[5]; rz(pi/2) a[5]; cx a[5],out[11]; rz(-pi/2) out[11]; cx a[5],out[11]; rz(pi/2) out[11]; rz(pi/4) b[7]; cx b[7],out[12]; rz(-pi/4) out[12]; cx b[7],out[12]; rz(pi/4) out[12]; cx b[7],a[5]; rz(-pi/4) a[5]; cx a[5],out[12]; rz(pi/4) out[12]; cx a[5],out[12]; rz(-pi/4) out[12]; cx b[7],a[5]; rz(pi/4) a[5]; cx a[5],out[12]; rz(-pi/4) out[12]; cx a[5],out[12]; rz(pi/4) out[12]; rz(pi/8) b[7]; cx b[7],out[13]; rz(-pi/8) out[13]; cx b[7],out[13]; rz(pi/8) out[13]; cx b[7],a[5]; rz(-pi/8) a[5]; cx a[5],out[13]; rz(pi/8) out[13]; cx a[5],out[13]; rz(-pi/8) out[13]; cx b[7],a[5]; rz(pi/8) a[5]; cx a[5],out[13]; rz(-pi/8) out[13]; cx a[5],out[13]; rz(pi/8) out[13]; rz(pi/16) b[7]; cx b[7],out[14]; rz(-pi/16) out[14]; cx b[7],out[14]; rz(pi/16) out[14]; cx b[7],a[5]; rz(-pi/16) a[5]; cx a[5],out[14]; rz(pi/16) out[14]; cx a[5],out[14]; rz(-pi/16) out[14]; cx b[7],a[5]; rz(pi/16) a[5]; cx a[5],out[14]; rz(-pi/16) out[14]; cx a[5],out[14]; rz(pi/16) out[14]; rz(pi/32) b[7]; cx b[7],out[15]; rz(-pi/32) out[15]; cx b[7],out[15]; rz(pi/32) out[15]; cx b[7],a[5]; rz(-pi/32) a[5]; cx a[5],out[15]; rz(pi/32) out[15]; cx a[5],out[15]; rz(-pi/32) out[15]; cx b[7],a[5]; rz(pi/32) a[5]; cx a[5],out[15]; rz(-pi/32) out[15]; cx a[5],out[15]; rz(pi/32) out[15]; cx b[6],a[5]; rz(-512*pi) a[5]; cx a[5],out[0]; rz(512*pi) out[0]; cx a[5],out[0]; rz(-512*pi) out[0]; cx b[6],a[5]; rz(512*pi) a[5]; cx a[5],out[0]; rz(-512*pi) out[0]; cx a[5],out[0]; rz(512*pi) out[0]; cx b[5],out[0]; rz(-256*pi) out[0]; cx b[5],out[0]; rz(256*pi) out[0]; rz(256*pi) b[6]; cx b[6],out[1]; rz(-256*pi) out[1]; cx b[6],out[1]; rz(256*pi) out[1]; cx b[6],a[5]; rz(-256*pi) a[5]; cx a[5],out[1]; rz(256*pi) out[1]; cx a[5],out[1]; rz(-256*pi) out[1]; cx b[6],a[5]; rz(256*pi) a[5]; cx a[5],out[1]; rz(-256*pi) out[1]; cx a[5],out[1]; rz(256*pi) out[1]; rz(128*pi) b[6]; cx b[6],out[2]; rz(-128*pi) out[2]; cx b[6],out[2]; rz(128*pi) out[2]; cx b[6],a[5]; rz(-128*pi) a[5]; cx a[5],out[2]; rz(128*pi) out[2]; cx a[5],out[2]; rz(-128*pi) out[2]; cx b[6],a[5]; rz(128*pi) a[5]; cx a[5],out[2]; rz(-128*pi) out[2]; cx a[5],out[2]; rz(128*pi) out[2]; rz(64*pi) b[6]; cx b[6],out[3]; rz(-64*pi) out[3]; cx b[6],out[3]; rz(64*pi) out[3]; cx b[6],a[5]; rz(-64*pi) a[5]; cx a[5],out[3]; rz(64*pi) out[3]; cx a[5],out[3]; rz(-64*pi) out[3]; cx b[6],a[5]; rz(64*pi) a[5]; cx a[5],out[3]; rz(-64*pi) out[3]; cx a[5],out[3]; rz(64*pi) out[3]; rz(32*pi) b[6]; cx b[6],out[4]; rz(-32*pi) out[4]; cx b[6],out[4]; rz(32*pi) out[4]; cx b[6],a[5]; rz(-32*pi) a[5]; cx a[5],out[4]; rz(32*pi) out[4]; cx a[5],out[4]; rz(-32*pi) out[4]; cx b[6],a[5]; rz(32*pi) a[5]; cx a[5],out[4]; rz(-32*pi) out[4]; cx a[5],out[4]; rz(32*pi) out[4]; rz(16*pi) b[6]; cx b[6],out[5]; rz(-16*pi) out[5]; cx b[6],out[5]; rz(16*pi) out[5]; cx b[6],a[5]; rz(-16*pi) a[5]; cx a[5],out[5]; rz(16*pi) out[5]; cx a[5],out[5]; rz(-16*pi) out[5]; cx b[6],a[5]; rz(16*pi) a[5]; cx a[5],out[5]; rz(-16*pi) out[5]; cx a[5],out[5]; rz(16*pi) out[5]; rz(8*pi) b[6]; cx b[6],out[6]; rz(-8*pi) out[6]; cx b[6],out[6]; rz(8*pi) out[6]; cx b[6],a[5]; rz(-8*pi) a[5]; cx a[5],out[6]; rz(8*pi) out[6]; cx a[5],out[6]; rz(-8*pi) out[6]; cx b[6],a[5]; rz(8*pi) a[5]; cx a[5],out[6]; rz(-8*pi) out[6]; cx a[5],out[6]; rz(8*pi) out[6]; rz(4*pi) b[6]; cx b[6],out[7]; rz(-4*pi) out[7]; cx b[6],out[7]; rz(4*pi) out[7]; cx b[6],a[5]; rz(-4*pi) a[5]; cx a[5],out[7]; rz(4*pi) out[7]; cx a[5],out[7]; rz(-4*pi) out[7]; cx b[6],a[5]; rz(4*pi) a[5]; cx a[5],out[7]; rz(-4*pi) out[7]; cx a[5],out[7]; rz(4*pi) out[7]; rz(2*pi) b[6]; cx b[6],out[8]; rz(-2*pi) out[8]; cx b[6],out[8]; rz(2*pi) out[8]; cx b[6],a[5]; rz(-2*pi) a[5]; cx a[5],out[8]; rz(2*pi) out[8]; cx a[5],out[8]; rz(-2*pi) out[8]; cx b[6],a[5]; rz(2*pi) a[5]; cx a[5],out[8]; rz(-2*pi) out[8]; cx a[5],out[8]; rz(2*pi) out[8]; rz(pi) b[6]; cx b[6],out[9]; rz(-pi) out[9]; cx b[6],out[9]; rz(pi) out[9]; cx b[6],a[5]; rz(-pi) a[5]; cx a[5],out[9]; rz(pi) out[9]; cx a[5],out[9]; rz(-pi) out[9]; cx b[6],a[5]; rz(pi) a[5]; cx a[5],out[9]; rz(-pi) out[9]; cx a[5],out[9]; rz(pi) out[9]; rz(pi/2) b[6]; cx b[6],out[10]; rz(-pi/2) out[10]; cx b[6],out[10]; rz(pi/2) out[10]; cx b[6],a[5]; rz(-pi/2) a[5]; cx a[5],out[10]; rz(pi/2) out[10]; cx a[5],out[10]; rz(-pi/2) out[10]; cx b[6],a[5]; rz(pi/2) a[5]; cx a[5],out[10]; rz(-pi/2) out[10]; cx a[5],out[10]; rz(pi/2) out[10]; rz(pi/4) b[6]; cx b[6],out[11]; rz(-pi/4) out[11]; cx b[6],out[11]; rz(pi/4) out[11]; cx b[6],a[5]; rz(-pi/4) a[5]; cx a[5],out[11]; rz(pi/4) out[11]; cx a[5],out[11]; rz(-pi/4) out[11]; cx b[6],a[5]; rz(pi/4) a[5]; cx a[5],out[11]; rz(-pi/4) out[11]; cx a[5],out[11]; rz(pi/4) out[11]; rz(pi/8) b[6]; cx b[6],out[12]; rz(-pi/8) out[12]; cx b[6],out[12]; rz(pi/8) out[12]; cx b[6],a[5]; rz(-pi/8) a[5]; cx a[5],out[12]; rz(pi/8) out[12]; cx a[5],out[12]; rz(-pi/8) out[12]; cx b[6],a[5]; rz(pi/8) a[5]; cx a[5],out[12]; rz(-pi/8) out[12]; cx a[5],out[12]; rz(pi/8) out[12]; rz(pi/16) b[6]; cx b[6],out[13]; rz(-pi/16) out[13]; cx b[6],out[13]; rz(pi/16) out[13]; cx b[6],a[5]; rz(-pi/16) a[5]; cx a[5],out[13]; rz(pi/16) out[13]; cx a[5],out[13]; rz(-pi/16) out[13]; cx b[6],a[5]; rz(pi/16) a[5]; cx a[5],out[13]; rz(-pi/16) out[13]; cx a[5],out[13]; rz(pi/16) out[13]; rz(pi/32) b[6]; cx b[6],out[14]; rz(-pi/32) out[14]; cx b[6],out[14]; rz(pi/32) out[14]; cx b[6],a[5]; rz(-pi/32) a[5]; cx a[5],out[14]; rz(pi/32) out[14]; cx a[5],out[14]; rz(-pi/32) out[14]; cx b[6],a[5]; rz(pi/32) a[5]; cx a[5],out[14]; rz(-pi/32) out[14]; cx a[5],out[14]; rz(pi/32) out[14]; rz(pi/64) b[6]; cx b[6],out[15]; rz(-pi/64) out[15]; cx b[6],out[15]; rz(pi/64) out[15]; cx b[6],a[5]; rz(-pi/64) a[5]; cx a[5],out[15]; rz(pi/64) out[15]; cx a[5],out[15]; rz(-pi/64) out[15]; cx b[6],a[5]; rz(pi/64) a[5]; cx a[5],out[15]; rz(-pi/64) out[15]; cx a[5],out[15]; rz(pi/64) out[15]; cx b[5],a[5]; rz(-256*pi) a[5]; cx a[5],out[0]; rz(256*pi) out[0]; cx a[5],out[0]; rz(-256*pi) out[0]; cx b[5],a[5]; rz(256*pi) a[5]; cx a[5],out[0]; rz(-256*pi) out[0]; cx a[5],out[0]; rz(256*pi) out[0]; cx b[4],out[0]; rz(-128*pi) out[0]; cx b[4],out[0]; rz(128*pi) out[0]; rz(128*pi) b[5]; cx b[5],out[1]; rz(-128*pi) out[1]; cx b[5],out[1]; rz(128*pi) out[1]; cx b[5],a[5]; rz(-128*pi) a[5]; cx a[5],out[1]; rz(128*pi) out[1]; cx a[5],out[1]; rz(-128*pi) out[1]; cx b[5],a[5]; rz(128*pi) a[5]; cx a[5],out[1]; rz(-128*pi) out[1]; cx a[5],out[1]; rz(128*pi) out[1]; rz(64*pi) b[5]; cx b[5],out[2]; rz(-64*pi) out[2]; cx b[5],out[2]; rz(64*pi) out[2]; cx b[5],a[5]; rz(-64*pi) a[5]; cx a[5],out[2]; rz(64*pi) out[2]; cx a[5],out[2]; rz(-64*pi) out[2]; cx b[5],a[5]; rz(64*pi) a[5]; cx a[5],out[2]; rz(-64*pi) out[2]; cx a[5],out[2]; rz(64*pi) out[2]; rz(32*pi) b[5]; cx b[5],out[3]; rz(-32*pi) out[3]; cx b[5],out[3]; rz(32*pi) out[3]; cx b[5],a[5]; rz(-32*pi) a[5]; cx a[5],out[3]; rz(32*pi) out[3]; cx a[5],out[3]; rz(-32*pi) out[3]; cx b[5],a[5]; rz(32*pi) a[5]; cx a[5],out[3]; rz(-32*pi) out[3]; cx a[5],out[3]; rz(32*pi) out[3]; rz(16*pi) b[5]; cx b[5],out[4]; rz(-16*pi) out[4]; cx b[5],out[4]; rz(16*pi) out[4]; cx b[5],a[5]; rz(-16*pi) a[5]; cx a[5],out[4]; rz(16*pi) out[4]; cx a[5],out[4]; rz(-16*pi) out[4]; cx b[5],a[5]; rz(16*pi) a[5]; cx a[5],out[4]; rz(-16*pi) out[4]; cx a[5],out[4]; rz(16*pi) out[4]; rz(8*pi) b[5]; cx b[5],out[5]; rz(-8*pi) out[5]; cx b[5],out[5]; rz(8*pi) out[5]; cx b[5],a[5]; rz(-8*pi) a[5]; cx a[5],out[5]; rz(8*pi) out[5]; cx a[5],out[5]; rz(-8*pi) out[5]; cx b[5],a[5]; rz(8*pi) a[5]; cx a[5],out[5]; rz(-8*pi) out[5]; cx a[5],out[5]; rz(8*pi) out[5]; rz(4*pi) b[5]; cx b[5],out[6]; rz(-4*pi) out[6]; cx b[5],out[6]; rz(4*pi) out[6]; cx b[5],a[5]; rz(-4*pi) a[5]; cx a[5],out[6]; rz(4*pi) out[6]; cx a[5],out[6]; rz(-4*pi) out[6]; cx b[5],a[5]; rz(4*pi) a[5]; cx a[5],out[6]; rz(-4*pi) out[6]; cx a[5],out[6]; rz(4*pi) out[6]; rz(2*pi) b[5]; cx b[5],out[7]; rz(-2*pi) out[7]; cx b[5],out[7]; rz(2*pi) out[7]; cx b[5],a[5]; rz(-2*pi) a[5]; cx a[5],out[7]; rz(2*pi) out[7]; cx a[5],out[7]; rz(-2*pi) out[7]; cx b[5],a[5]; rz(2*pi) a[5]; cx a[5],out[7]; rz(-2*pi) out[7]; cx a[5],out[7]; rz(2*pi) out[7]; rz(pi) b[5]; cx b[5],out[8]; rz(-pi) out[8]; cx b[5],out[8]; rz(pi) out[8]; cx b[5],a[5]; rz(-pi) a[5]; cx a[5],out[8]; rz(pi) out[8]; cx a[5],out[8]; rz(-pi) out[8]; cx b[5],a[5]; rz(pi) a[5]; cx a[5],out[8]; rz(-pi) out[8]; cx a[5],out[8]; rz(pi) out[8]; rz(pi/2) b[5]; cx b[5],out[9]; rz(-pi/2) out[9]; cx b[5],out[9]; rz(pi/2) out[9]; cx b[5],a[5]; rz(-pi/2) a[5]; cx a[5],out[9]; rz(pi/2) out[9]; cx a[5],out[9]; rz(-pi/2) out[9]; cx b[5],a[5]; rz(pi/2) a[5]; cx a[5],out[9]; rz(-pi/2) out[9]; cx a[5],out[9]; rz(pi/2) out[9]; rz(pi/4) b[5]; cx b[5],out[10]; rz(-pi/4) out[10]; cx b[5],out[10]; rz(pi/4) out[10]; cx b[5],a[5]; rz(-pi/4) a[5]; cx a[5],out[10]; rz(pi/4) out[10]; cx a[5],out[10]; rz(-pi/4) out[10]; cx b[5],a[5]; rz(pi/4) a[5]; cx a[5],out[10]; rz(-pi/4) out[10]; cx a[5],out[10]; rz(pi/4) out[10]; rz(pi/8) b[5]; cx b[5],out[11]; rz(-pi/8) out[11]; cx b[5],out[11]; rz(pi/8) out[11]; cx b[5],a[5]; rz(-pi/8) a[5]; cx a[5],out[11]; rz(pi/8) out[11]; cx a[5],out[11]; rz(-pi/8) out[11]; cx b[5],a[5]; rz(pi/8) a[5]; cx a[5],out[11]; rz(-pi/8) out[11]; cx a[5],out[11]; rz(pi/8) out[11]; rz(pi/16) b[5]; cx b[5],out[12]; rz(-pi/16) out[12]; cx b[5],out[12]; rz(pi/16) out[12]; cx b[5],a[5]; rz(-pi/16) a[5]; cx a[5],out[12]; rz(pi/16) out[12]; cx a[5],out[12]; rz(-pi/16) out[12]; cx b[5],a[5]; rz(pi/16) a[5]; cx a[5],out[12]; rz(-pi/16) out[12]; cx a[5],out[12]; rz(pi/16) out[12]; rz(pi/32) b[5]; cx b[5],out[13]; rz(-pi/32) out[13]; cx b[5],out[13]; rz(pi/32) out[13]; cx b[5],a[5]; rz(-pi/32) a[5]; cx a[5],out[13]; rz(pi/32) out[13]; cx a[5],out[13]; rz(-pi/32) out[13]; cx b[5],a[5]; rz(pi/32) a[5]; cx a[5],out[13]; rz(-pi/32) out[13]; cx a[5],out[13]; rz(pi/32) out[13]; rz(pi/64) b[5]; cx b[5],out[14]; rz(-pi/64) out[14]; cx b[5],out[14]; rz(pi/64) out[14]; cx b[5],a[5]; rz(-pi/64) a[5]; cx a[5],out[14]; rz(pi/64) out[14]; cx a[5],out[14]; rz(-pi/64) out[14]; cx b[5],a[5]; rz(pi/64) a[5]; cx a[5],out[14]; rz(-pi/64) out[14]; cx a[5],out[14]; rz(pi/64) out[14]; rz(pi/128) b[5]; cx b[5],out[15]; rz(-pi/128) out[15]; cx b[5],out[15]; rz(pi/128) out[15]; cx b[5],a[5]; rz(-pi/128) a[5]; cx a[5],out[15]; rz(pi/128) out[15]; cx a[5],out[15]; rz(-pi/128) out[15]; cx b[5],a[5]; rz(pi/128) a[5]; cx a[5],out[15]; rz(-pi/128) out[15]; cx a[5],out[15]; rz(pi/128) out[15]; cx b[4],a[5]; rz(-128*pi) a[5]; cx a[5],out[0]; rz(128*pi) out[0]; cx a[5],out[0]; rz(-128*pi) out[0]; cx b[4],a[5]; rz(128*pi) a[5]; cx a[5],out[0]; rz(-128*pi) out[0]; cx a[5],out[0]; rz(128*pi) out[0]; cx b[3],out[0]; rz(-64*pi) out[0]; cx b[3],out[0]; rz(64*pi) out[0]; rz(64*pi) b[4]; cx b[4],out[1]; rz(-64*pi) out[1]; cx b[4],out[1]; rz(64*pi) out[1]; cx b[4],a[5]; rz(-64*pi) a[5]; cx a[5],out[1]; rz(64*pi) out[1]; cx a[5],out[1]; rz(-64*pi) out[1]; cx b[4],a[5]; rz(64*pi) a[5]; cx a[5],out[1]; rz(-64*pi) out[1]; cx a[5],out[1]; rz(64*pi) out[1]; rz(32*pi) b[4]; cx b[4],out[2]; rz(-32*pi) out[2]; cx b[4],out[2]; rz(32*pi) out[2]; cx b[4],a[5]; rz(-32*pi) a[5]; cx a[5],out[2]; rz(32*pi) out[2]; cx a[5],out[2]; rz(-32*pi) out[2]; cx b[4],a[5]; rz(32*pi) a[5]; cx a[5],out[2]; rz(-32*pi) out[2]; cx a[5],out[2]; rz(32*pi) out[2]; rz(16*pi) b[4]; cx b[4],out[3]; rz(-16*pi) out[3]; cx b[4],out[3]; rz(16*pi) out[3]; cx b[4],a[5]; rz(-16*pi) a[5]; cx a[5],out[3]; rz(16*pi) out[3]; cx a[5],out[3]; rz(-16*pi) out[3]; cx b[4],a[5]; rz(16*pi) a[5]; cx a[5],out[3]; rz(-16*pi) out[3]; cx a[5],out[3]; rz(16*pi) out[3]; rz(8*pi) b[4]; cx b[4],out[4]; rz(-8*pi) out[4]; cx b[4],out[4]; rz(8*pi) out[4]; cx b[4],a[5]; rz(-8*pi) a[5]; cx a[5],out[4]; rz(8*pi) out[4]; cx a[5],out[4]; rz(-8*pi) out[4]; cx b[4],a[5]; rz(8*pi) a[5]; cx a[5],out[4]; rz(-8*pi) out[4]; cx a[5],out[4]; rz(8*pi) out[4]; rz(4*pi) b[4]; cx b[4],out[5]; rz(-4*pi) out[5]; cx b[4],out[5]; rz(4*pi) out[5]; cx b[4],a[5]; rz(-4*pi) a[5]; cx a[5],out[5]; rz(4*pi) out[5]; cx a[5],out[5]; rz(-4*pi) out[5]; cx b[4],a[5]; rz(4*pi) a[5]; cx a[5],out[5]; rz(-4*pi) out[5]; cx a[5],out[5]; rz(4*pi) out[5]; rz(2*pi) b[4]; cx b[4],out[6]; rz(-2*pi) out[6]; cx b[4],out[6]; rz(2*pi) out[6]; cx b[4],a[5]; rz(-2*pi) a[5]; cx a[5],out[6]; rz(2*pi) out[6]; cx a[5],out[6]; rz(-2*pi) out[6]; cx b[4],a[5]; rz(2*pi) a[5]; cx a[5],out[6]; rz(-2*pi) out[6]; cx a[5],out[6]; rz(2*pi) out[6]; rz(pi) b[4]; cx b[4],out[7]; rz(-pi) out[7]; cx b[4],out[7]; rz(pi) out[7]; cx b[4],a[5]; rz(-pi) a[5]; cx a[5],out[7]; rz(pi) out[7]; cx a[5],out[7]; rz(-pi) out[7]; cx b[4],a[5]; rz(pi) a[5]; cx a[5],out[7]; rz(-pi) out[7]; cx a[5],out[7]; rz(pi) out[7]; rz(pi/2) b[4]; cx b[4],out[8]; rz(-pi/2) out[8]; cx b[4],out[8]; rz(pi/2) out[8]; cx b[4],a[5]; rz(-pi/2) a[5]; cx a[5],out[8]; rz(pi/2) out[8]; cx a[5],out[8]; rz(-pi/2) out[8]; cx b[4],a[5]; rz(pi/2) a[5]; cx a[5],out[8]; rz(-pi/2) out[8]; cx a[5],out[8]; rz(pi/2) out[8]; rz(pi/4) b[4]; cx b[4],out[9]; rz(-pi/4) out[9]; cx b[4],out[9]; rz(pi/4) out[9]; cx b[4],a[5]; rz(-pi/4) a[5]; cx a[5],out[9]; rz(pi/4) out[9]; cx a[5],out[9]; rz(-pi/4) out[9]; cx b[4],a[5]; rz(pi/4) a[5]; cx a[5],out[9]; rz(-pi/4) out[9]; cx a[5],out[9]; rz(pi/4) out[9]; rz(pi/8) b[4]; cx b[4],out[10]; rz(-pi/8) out[10]; cx b[4],out[10]; rz(pi/8) out[10]; cx b[4],a[5]; rz(-pi/8) a[5]; cx a[5],out[10]; rz(pi/8) out[10]; cx a[5],out[10]; rz(-pi/8) out[10]; cx b[4],a[5]; rz(pi/8) a[5]; cx a[5],out[10]; rz(-pi/8) out[10]; cx a[5],out[10]; rz(pi/8) out[10]; rz(pi/16) b[4]; cx b[4],out[11]; rz(-pi/16) out[11]; cx b[4],out[11]; rz(pi/16) out[11]; cx b[4],a[5]; rz(-pi/16) a[5]; cx a[5],out[11]; rz(pi/16) out[11]; cx a[5],out[11]; rz(-pi/16) out[11]; cx b[4],a[5]; rz(pi/16) a[5]; cx a[5],out[11]; rz(-pi/16) out[11]; cx a[5],out[11]; rz(pi/16) out[11]; rz(pi/32) b[4]; cx b[4],out[12]; rz(-pi/32) out[12]; cx b[4],out[12]; rz(pi/32) out[12]; cx b[4],a[5]; rz(-pi/32) a[5]; cx a[5],out[12]; rz(pi/32) out[12]; cx a[5],out[12]; rz(-pi/32) out[12]; cx b[4],a[5]; rz(pi/32) a[5]; cx a[5],out[12]; rz(-pi/32) out[12]; cx a[5],out[12]; rz(pi/32) out[12]; rz(pi/64) b[4]; cx b[4],out[13]; rz(-pi/64) out[13]; cx b[4],out[13]; rz(pi/64) out[13]; cx b[4],a[5]; rz(-pi/64) a[5]; cx a[5],out[13]; rz(pi/64) out[13]; cx a[5],out[13]; rz(-pi/64) out[13]; cx b[4],a[5]; rz(pi/64) a[5]; cx a[5],out[13]; rz(-pi/64) out[13]; cx a[5],out[13]; rz(pi/64) out[13]; rz(pi/128) b[4]; cx b[4],out[14]; rz(-pi/128) out[14]; cx b[4],out[14]; rz(pi/128) out[14]; cx b[4],a[5]; rz(-pi/128) a[5]; cx a[5],out[14]; rz(pi/128) out[14]; cx a[5],out[14]; rz(-pi/128) out[14]; cx b[4],a[5]; rz(pi/128) a[5]; cx a[5],out[14]; rz(-pi/128) out[14]; cx a[5],out[14]; rz(pi/128) out[14]; rz(pi/256) b[4]; cx b[4],out[15]; rz(-pi/256) out[15]; cx b[4],out[15]; rz(pi/256) out[15]; cx b[4],a[5]; rz(-pi/256) a[5]; cx a[5],out[15]; rz(pi/256) out[15]; cx a[5],out[15]; rz(-pi/256) out[15]; cx b[4],a[5]; rz(pi/256) a[5]; cx a[5],out[15]; rz(-pi/256) out[15]; cx a[5],out[15]; rz(pi/256) out[15]; cx b[3],a[5]; rz(-64*pi) a[5]; cx a[5],out[0]; rz(64*pi) out[0]; cx a[5],out[0]; rz(-64*pi) out[0]; cx b[3],a[5]; rz(64*pi) a[5]; cx a[5],out[0]; rz(-64*pi) out[0]; cx a[5],out[0]; rz(64*pi) out[0]; cx b[2],out[0]; rz(-32*pi) out[0]; cx b[2],out[0]; rz(32*pi) out[0]; rz(32*pi) b[3]; cx b[3],out[1]; rz(-32*pi) out[1]; cx b[3],out[1]; rz(32*pi) out[1]; cx b[3],a[5]; rz(-32*pi) a[5]; cx a[5],out[1]; rz(32*pi) out[1]; cx a[5],out[1]; rz(-32*pi) out[1]; cx b[3],a[5]; rz(32*pi) a[5]; cx a[5],out[1]; rz(-32*pi) out[1]; cx a[5],out[1]; rz(32*pi) out[1]; rz(16*pi) b[3]; cx b[3],out[2]; rz(-16*pi) out[2]; cx b[3],out[2]; rz(16*pi) out[2]; cx b[3],a[5]; rz(-16*pi) a[5]; cx a[5],out[2]; rz(16*pi) out[2]; cx a[5],out[2]; rz(-16*pi) out[2]; cx b[3],a[5]; rz(16*pi) a[5]; cx a[5],out[2]; rz(-16*pi) out[2]; cx a[5],out[2]; rz(16*pi) out[2]; rz(8*pi) b[3]; cx b[3],out[3]; rz(-8*pi) out[3]; cx b[3],out[3]; rz(8*pi) out[3]; cx b[3],a[5]; rz(-8*pi) a[5]; cx a[5],out[3]; rz(8*pi) out[3]; cx a[5],out[3]; rz(-8*pi) out[3]; cx b[3],a[5]; rz(8*pi) a[5]; cx a[5],out[3]; rz(-8*pi) out[3]; cx a[5],out[3]; rz(8*pi) out[3]; rz(4*pi) b[3]; cx b[3],out[4]; rz(-4*pi) out[4]; cx b[3],out[4]; rz(4*pi) out[4]; cx b[3],a[5]; rz(-4*pi) a[5]; cx a[5],out[4]; rz(4*pi) out[4]; cx a[5],out[4]; rz(-4*pi) out[4]; cx b[3],a[5]; rz(4*pi) a[5]; cx a[5],out[4]; rz(-4*pi) out[4]; cx a[5],out[4]; rz(4*pi) out[4]; rz(2*pi) b[3]; cx b[3],out[5]; rz(-2*pi) out[5]; cx b[3],out[5]; rz(2*pi) out[5]; cx b[3],a[5]; rz(-2*pi) a[5]; cx a[5],out[5]; rz(2*pi) out[5]; cx a[5],out[5]; rz(-2*pi) out[5]; cx b[3],a[5]; rz(2*pi) a[5]; cx a[5],out[5]; rz(-2*pi) out[5]; cx a[5],out[5]; rz(2*pi) out[5]; rz(pi) b[3]; cx b[3],out[6]; rz(-pi) out[6]; cx b[3],out[6]; rz(pi) out[6]; cx b[3],a[5]; rz(-pi) a[5]; cx a[5],out[6]; rz(pi) out[6]; cx a[5],out[6]; rz(-pi) out[6]; cx b[3],a[5]; rz(pi) a[5]; cx a[5],out[6]; rz(-pi) out[6]; cx a[5],out[6]; rz(pi) out[6]; rz(pi/2) b[3]; cx b[3],out[7]; rz(-pi/2) out[7]; cx b[3],out[7]; rz(pi/2) out[7]; cx b[3],a[5]; rz(-pi/2) a[5]; cx a[5],out[7]; rz(pi/2) out[7]; cx a[5],out[7]; rz(-pi/2) out[7]; cx b[3],a[5]; rz(pi/2) a[5]; cx a[5],out[7]; rz(-pi/2) out[7]; cx a[5],out[7]; rz(pi/2) out[7]; rz(pi/4) b[3]; cx b[3],out[8]; rz(-pi/4) out[8]; cx b[3],out[8]; rz(pi/4) out[8]; cx b[3],a[5]; rz(-pi/4) a[5]; cx a[5],out[8]; rz(pi/4) out[8]; cx a[5],out[8]; rz(-pi/4) out[8]; cx b[3],a[5]; rz(pi/4) a[5]; cx a[5],out[8]; rz(-pi/4) out[8]; cx a[5],out[8]; rz(pi/4) out[8]; rz(pi/8) b[3]; cx b[3],out[9]; rz(-pi/8) out[9]; cx b[3],out[9]; rz(pi/8) out[9]; cx b[3],a[5]; rz(-pi/8) a[5]; cx a[5],out[9]; rz(pi/8) out[9]; cx a[5],out[9]; rz(-pi/8) out[9]; cx b[3],a[5]; rz(pi/8) a[5]; cx a[5],out[9]; rz(-pi/8) out[9]; cx a[5],out[9]; rz(pi/8) out[9]; rz(pi/16) b[3]; cx b[3],out[10]; rz(-pi/16) out[10]; cx b[3],out[10]; rz(pi/16) out[10]; cx b[3],a[5]; rz(-pi/16) a[5]; cx a[5],out[10]; rz(pi/16) out[10]; cx a[5],out[10]; rz(-pi/16) out[10]; cx b[3],a[5]; rz(pi/16) a[5]; cx a[5],out[10]; rz(-pi/16) out[10]; cx a[5],out[10]; rz(pi/16) out[10]; rz(pi/32) b[3]; cx b[3],out[11]; rz(-pi/32) out[11]; cx b[3],out[11]; rz(pi/32) out[11]; cx b[3],a[5]; rz(-pi/32) a[5]; cx a[5],out[11]; rz(pi/32) out[11]; cx a[5],out[11]; rz(-pi/32) out[11]; cx b[3],a[5]; rz(pi/32) a[5]; cx a[5],out[11]; rz(-pi/32) out[11]; cx a[5],out[11]; rz(pi/32) out[11]; rz(pi/64) b[3]; cx b[3],out[12]; rz(-pi/64) out[12]; cx b[3],out[12]; rz(pi/64) out[12]; cx b[3],a[5]; rz(-pi/64) a[5]; cx a[5],out[12]; rz(pi/64) out[12]; cx a[5],out[12]; rz(-pi/64) out[12]; cx b[3],a[5]; rz(pi/64) a[5]; cx a[5],out[12]; rz(-pi/64) out[12]; cx a[5],out[12]; rz(pi/64) out[12]; rz(pi/128) b[3]; cx b[3],out[13]; rz(-pi/128) out[13]; cx b[3],out[13]; rz(pi/128) out[13]; cx b[3],a[5]; rz(-pi/128) a[5]; cx a[5],out[13]; rz(pi/128) out[13]; cx a[5],out[13]; rz(-pi/128) out[13]; cx b[3],a[5]; rz(pi/128) a[5]; cx a[5],out[13]; rz(-pi/128) out[13]; cx a[5],out[13]; rz(pi/128) out[13]; rz(pi/256) b[3]; cx b[3],out[14]; rz(-pi/256) out[14]; cx b[3],out[14]; rz(pi/256) out[14]; cx b[3],a[5]; rz(-pi/256) a[5]; cx a[5],out[14]; rz(pi/256) out[14]; cx a[5],out[14]; rz(-pi/256) out[14]; cx b[3],a[5]; rz(pi/256) a[5]; cx a[5],out[14]; rz(-pi/256) out[14]; cx a[5],out[14]; rz(pi/256) out[14]; rz(pi/512) b[3]; cx b[3],out[15]; rz(-pi/512) out[15]; cx b[3],out[15]; rz(pi/512) out[15]; cx b[3],a[5]; rz(-pi/512) a[5]; cx a[5],out[15]; rz(pi/512) out[15]; cx a[5],out[15]; rz(-pi/512) out[15]; cx b[3],a[5]; rz(pi/512) a[5]; cx a[5],out[15]; rz(-pi/512) out[15]; cx a[5],out[15]; rz(pi/512) out[15]; cx b[2],a[5]; rz(-32*pi) a[5]; cx a[5],out[0]; rz(32*pi) out[0]; cx a[5],out[0]; rz(-32*pi) out[0]; cx b[2],a[5]; rz(32*pi) a[5]; cx a[5],out[0]; rz(-32*pi) out[0]; cx a[5],out[0]; rz(32*pi) out[0]; cx b[1],out[0]; rz(-16*pi) out[0]; cx b[1],out[0]; rz(16*pi) out[0]; rz(16*pi) b[2]; cx b[2],out[1]; rz(-16*pi) out[1]; cx b[2],out[1]; rz(16*pi) out[1]; cx b[2],a[5]; rz(-16*pi) a[5]; cx a[5],out[1]; rz(16*pi) out[1]; cx a[5],out[1]; rz(-16*pi) out[1]; cx b[2],a[5]; rz(16*pi) a[5]; cx a[5],out[1]; rz(-16*pi) out[1]; cx a[5],out[1]; rz(16*pi) out[1]; rz(8*pi) b[2]; cx b[2],out[2]; rz(-8*pi) out[2]; cx b[2],out[2]; rz(8*pi) out[2]; cx b[2],a[5]; rz(-8*pi) a[5]; cx a[5],out[2]; rz(8*pi) out[2]; cx a[5],out[2]; rz(-8*pi) out[2]; cx b[2],a[5]; rz(8*pi) a[5]; cx a[5],out[2]; rz(-8*pi) out[2]; cx a[5],out[2]; rz(8*pi) out[2]; rz(4*pi) b[2]; cx b[2],out[3]; rz(-4*pi) out[3]; cx b[2],out[3]; rz(4*pi) out[3]; cx b[2],a[5]; rz(-4*pi) a[5]; cx a[5],out[3]; rz(4*pi) out[3]; cx a[5],out[3]; rz(-4*pi) out[3]; cx b[2],a[5]; rz(4*pi) a[5]; cx a[5],out[3]; rz(-4*pi) out[3]; cx a[5],out[3]; rz(4*pi) out[3]; rz(2*pi) b[2]; cx b[2],out[4]; rz(-2*pi) out[4]; cx b[2],out[4]; rz(2*pi) out[4]; cx b[2],a[5]; rz(-2*pi) a[5]; cx a[5],out[4]; rz(2*pi) out[4]; cx a[5],out[4]; rz(-2*pi) out[4]; cx b[2],a[5]; rz(2*pi) a[5]; cx a[5],out[4]; rz(-2*pi) out[4]; cx a[5],out[4]; rz(2*pi) out[4]; rz(pi) b[2]; cx b[2],out[5]; rz(-pi) out[5]; cx b[2],out[5]; rz(pi) out[5]; cx b[2],a[5]; rz(-pi) a[5]; cx a[5],out[5]; rz(pi) out[5]; cx a[5],out[5]; rz(-pi) out[5]; cx b[2],a[5]; rz(pi) a[5]; cx a[5],out[5]; rz(-pi) out[5]; cx a[5],out[5]; rz(pi) out[5]; rz(pi/2) b[2]; cx b[2],out[6]; rz(-pi/2) out[6]; cx b[2],out[6]; rz(pi/2) out[6]; cx b[2],a[5]; rz(-pi/2) a[5]; cx a[5],out[6]; rz(pi/2) out[6]; cx a[5],out[6]; rz(-pi/2) out[6]; cx b[2],a[5]; rz(pi/2) a[5]; cx a[5],out[6]; rz(-pi/2) out[6]; cx a[5],out[6]; rz(pi/2) out[6]; rz(pi/4) b[2]; cx b[2],out[7]; rz(-pi/4) out[7]; cx b[2],out[7]; rz(pi/4) out[7]; cx b[2],a[5]; rz(-pi/4) a[5]; cx a[5],out[7]; rz(pi/4) out[7]; cx a[5],out[7]; rz(-pi/4) out[7]; cx b[2],a[5]; rz(pi/4) a[5]; cx a[5],out[7]; rz(-pi/4) out[7]; cx a[5],out[7]; rz(pi/4) out[7]; rz(pi/8) b[2]; cx b[2],out[8]; rz(-pi/8) out[8]; cx b[2],out[8]; rz(pi/8) out[8]; cx b[2],a[5]; rz(-pi/8) a[5]; cx a[5],out[8]; rz(pi/8) out[8]; cx a[5],out[8]; rz(-pi/8) out[8]; cx b[2],a[5]; rz(pi/8) a[5]; cx a[5],out[8]; rz(-pi/8) out[8]; cx a[5],out[8]; rz(pi/8) out[8]; rz(pi/16) b[2]; cx b[2],out[9]; rz(-pi/16) out[9]; cx b[2],out[9]; rz(pi/16) out[9]; cx b[2],a[5]; rz(-pi/16) a[5]; cx a[5],out[9]; rz(pi/16) out[9]; cx a[5],out[9]; rz(-pi/16) out[9]; cx b[2],a[5]; rz(pi/16) a[5]; cx a[5],out[9]; rz(-pi/16) out[9]; cx a[5],out[9]; rz(pi/16) out[9]; rz(pi/32) b[2]; cx b[2],out[10]; rz(-pi/32) out[10]; cx b[2],out[10]; rz(pi/32) out[10]; cx b[2],a[5]; rz(-pi/32) a[5]; cx a[5],out[10]; rz(pi/32) out[10]; cx a[5],out[10]; rz(-pi/32) out[10]; cx b[2],a[5]; rz(pi/32) a[5]; cx a[5],out[10]; rz(-pi/32) out[10]; cx a[5],out[10]; rz(pi/32) out[10]; rz(pi/64) b[2]; cx b[2],out[11]; rz(-pi/64) out[11]; cx b[2],out[11]; rz(pi/64) out[11]; cx b[2],a[5]; rz(-pi/64) a[5]; cx a[5],out[11]; rz(pi/64) out[11]; cx a[5],out[11]; rz(-pi/64) out[11]; cx b[2],a[5]; rz(pi/64) a[5]; cx a[5],out[11]; rz(-pi/64) out[11]; cx a[5],out[11]; rz(pi/64) out[11]; rz(pi/128) b[2]; cx b[2],out[12]; rz(-pi/128) out[12]; cx b[2],out[12]; rz(pi/128) out[12]; cx b[2],a[5]; rz(-pi/128) a[5]; cx a[5],out[12]; rz(pi/128) out[12]; cx a[5],out[12]; rz(-pi/128) out[12]; cx b[2],a[5]; rz(pi/128) a[5]; cx a[5],out[12]; rz(-pi/128) out[12]; cx a[5],out[12]; rz(pi/128) out[12]; rz(pi/256) b[2]; cx b[2],out[13]; rz(-pi/256) out[13]; cx b[2],out[13]; rz(pi/256) out[13]; cx b[2],a[5]; rz(-pi/256) a[5]; cx a[5],out[13]; rz(pi/256) out[13]; cx a[5],out[13]; rz(-pi/256) out[13]; cx b[2],a[5]; rz(pi/256) a[5]; cx a[5],out[13]; rz(-pi/256) out[13]; cx a[5],out[13]; rz(pi/256) out[13]; rz(pi/512) b[2]; cx b[2],out[14]; rz(-pi/512) out[14]; cx b[2],out[14]; rz(pi/512) out[14]; cx b[2],a[5]; rz(-pi/512) a[5]; cx a[5],out[14]; rz(pi/512) out[14]; cx a[5],out[14]; rz(-pi/512) out[14]; cx b[2],a[5]; rz(pi/512) a[5]; cx a[5],out[14]; rz(-pi/512) out[14]; cx a[5],out[14]; rz(pi/512) out[14]; rz(pi/1024) b[2]; cx b[2],out[15]; rz(-pi/1024) out[15]; cx b[2],out[15]; rz(pi/1024) out[15]; cx b[2],a[5]; rz(-pi/1024) a[5]; cx a[5],out[15]; rz(pi/1024) out[15]; cx a[5],out[15]; rz(-pi/1024) out[15]; cx b[2],a[5]; rz(pi/1024) a[5]; cx a[5],out[15]; rz(-pi/1024) out[15]; cx a[5],out[15]; rz(pi/1024) out[15]; cx b[1],a[5]; rz(-16*pi) a[5]; cx a[5],out[0]; rz(16*pi) out[0]; cx a[5],out[0]; rz(-16*pi) out[0]; cx b[1],a[5]; rz(16*pi) a[5]; cx a[5],out[0]; rz(-16*pi) out[0]; cx a[5],out[0]; rz(16*pi) out[0]; cx b[0],out[0]; rz(-8*pi) out[0]; cx b[0],out[0]; rz(8*pi) out[0]; rz(8*pi) b[1]; cx b[1],out[1]; rz(-8*pi) out[1]; cx b[1],out[1]; rz(8*pi) out[1]; cx b[1],a[5]; rz(-8*pi) a[5]; cx a[5],out[1]; rz(8*pi) out[1]; cx a[5],out[1]; rz(-8*pi) out[1]; cx b[1],a[5]; rz(8*pi) a[5]; cx a[5],out[1]; rz(-8*pi) out[1]; cx a[5],out[1]; rz(8*pi) out[1]; rz(4*pi) b[1]; cx b[1],out[2]; rz(-4*pi) out[2]; cx b[1],out[2]; rz(4*pi) out[2]; cx b[1],a[5]; rz(-4*pi) a[5]; cx a[5],out[2]; rz(4*pi) out[2]; cx a[5],out[2]; rz(-4*pi) out[2]; cx b[1],a[5]; rz(4*pi) a[5]; cx a[5],out[2]; rz(-4*pi) out[2]; cx a[5],out[2]; rz(4*pi) out[2]; rz(2*pi) b[1]; cx b[1],out[3]; rz(-2*pi) out[3]; cx b[1],out[3]; rz(2*pi) out[3]; cx b[1],a[5]; rz(-2*pi) a[5]; cx a[5],out[3]; rz(2*pi) out[3]; cx a[5],out[3]; rz(-2*pi) out[3]; cx b[1],a[5]; rz(2*pi) a[5]; cx a[5],out[3]; rz(-2*pi) out[3]; cx a[5],out[3]; rz(2*pi) out[3]; rz(pi) b[1]; cx b[1],out[4]; rz(-pi) out[4]; cx b[1],out[4]; rz(pi) out[4]; cx b[1],a[5]; rz(-pi) a[5]; cx a[5],out[4]; rz(pi) out[4]; cx a[5],out[4]; rz(-pi) out[4]; cx b[1],a[5]; rz(pi) a[5]; cx a[5],out[4]; rz(-pi) out[4]; cx a[5],out[4]; rz(pi) out[4]; rz(pi/2) b[1]; cx b[1],out[5]; rz(-pi/2) out[5]; cx b[1],out[5]; rz(pi/2) out[5]; cx b[1],a[5]; rz(-pi/2) a[5]; cx a[5],out[5]; rz(pi/2) out[5]; cx a[5],out[5]; rz(-pi/2) out[5]; cx b[1],a[5]; rz(pi/2) a[5]; cx a[5],out[5]; rz(-pi/2) out[5]; cx a[5],out[5]; rz(pi/2) out[5]; rz(pi/4) b[1]; cx b[1],out[6]; rz(-pi/4) out[6]; cx b[1],out[6]; rz(pi/4) out[6]; cx b[1],a[5]; rz(-pi/4) a[5]; cx a[5],out[6]; rz(pi/4) out[6]; cx a[5],out[6]; rz(-pi/4) out[6]; cx b[1],a[5]; rz(pi/4) a[5]; cx a[5],out[6]; rz(-pi/4) out[6]; cx a[5],out[6]; rz(pi/4) out[6]; rz(pi/8) b[1]; cx b[1],out[7]; rz(-pi/8) out[7]; cx b[1],out[7]; rz(pi/8) out[7]; cx b[1],a[5]; rz(-pi/8) a[5]; cx a[5],out[7]; rz(pi/8) out[7]; cx a[5],out[7]; rz(-pi/8) out[7]; cx b[1],a[5]; rz(pi/8) a[5]; cx a[5],out[7]; rz(-pi/8) out[7]; cx a[5],out[7]; rz(pi/8) out[7]; rz(pi/16) b[1]; cx b[1],out[8]; rz(-pi/16) out[8]; cx b[1],out[8]; rz(pi/16) out[8]; cx b[1],a[5]; rz(-pi/16) a[5]; cx a[5],out[8]; rz(pi/16) out[8]; cx a[5],out[8]; rz(-pi/16) out[8]; cx b[1],a[5]; rz(pi/16) a[5]; cx a[5],out[8]; rz(-pi/16) out[8]; cx a[5],out[8]; rz(pi/16) out[8]; rz(pi/32) b[1]; cx b[1],out[9]; rz(-pi/32) out[9]; cx b[1],out[9]; rz(pi/32) out[9]; cx b[1],a[5]; rz(-pi/32) a[5]; cx a[5],out[9]; rz(pi/32) out[9]; cx a[5],out[9]; rz(-pi/32) out[9]; cx b[1],a[5]; rz(pi/32) a[5]; cx a[5],out[9]; rz(-pi/32) out[9]; cx a[5],out[9]; rz(pi/32) out[9]; rz(pi/64) b[1]; cx b[1],out[10]; rz(-pi/64) out[10]; cx b[1],out[10]; rz(pi/64) out[10]; cx b[1],a[5]; rz(-pi/64) a[5]; cx a[5],out[10]; rz(pi/64) out[10]; cx a[5],out[10]; rz(-pi/64) out[10]; cx b[1],a[5]; rz(pi/64) a[5]; cx a[5],out[10]; rz(-pi/64) out[10]; cx a[5],out[10]; rz(pi/64) out[10]; rz(pi/128) b[1]; cx b[1],out[11]; rz(-pi/128) out[11]; cx b[1],out[11]; rz(pi/128) out[11]; cx b[1],a[5]; rz(-pi/128) a[5]; cx a[5],out[11]; rz(pi/128) out[11]; cx a[5],out[11]; rz(-pi/128) out[11]; cx b[1],a[5]; rz(pi/128) a[5]; cx a[5],out[11]; rz(-pi/128) out[11]; cx a[5],out[11]; rz(pi/128) out[11]; rz(pi/256) b[1]; cx b[1],out[12]; rz(-pi/256) out[12]; cx b[1],out[12]; rz(pi/256) out[12]; cx b[1],a[5]; rz(-pi/256) a[5]; cx a[5],out[12]; rz(pi/256) out[12]; cx a[5],out[12]; rz(-pi/256) out[12]; cx b[1],a[5]; rz(pi/256) a[5]; cx a[5],out[12]; rz(-pi/256) out[12]; cx a[5],out[12]; rz(pi/256) out[12]; rz(pi/512) b[1]; cx b[1],out[13]; rz(-pi/512) out[13]; cx b[1],out[13]; rz(pi/512) out[13]; cx b[1],a[5]; rz(-pi/512) a[5]; cx a[5],out[13]; rz(pi/512) out[13]; cx a[5],out[13]; rz(-pi/512) out[13]; cx b[1],a[5]; rz(pi/512) a[5]; cx a[5],out[13]; rz(-pi/512) out[13]; cx a[5],out[13]; rz(pi/512) out[13]; rz(pi/1024) b[1]; cx b[1],out[14]; rz(-pi/1024) out[14]; cx b[1],out[14]; rz(pi/1024) out[14]; cx b[1],a[5]; rz(-pi/1024) a[5]; cx a[5],out[14]; rz(pi/1024) out[14]; cx a[5],out[14]; rz(-pi/1024) out[14]; cx b[1],a[5]; rz(pi/1024) a[5]; cx a[5],out[14]; rz(-pi/1024) out[14]; cx a[5],out[14]; rz(pi/1024) out[14]; rz(pi/2048) b[1]; cx b[1],out[15]; rz(-pi/2048) out[15]; cx b[1],out[15]; rz(pi/2048) out[15]; cx b[1],a[5]; rz(-pi/2048) a[5]; cx a[5],out[15]; rz(pi/2048) out[15]; cx a[5],out[15]; rz(-pi/2048) out[15]; cx b[1],a[5]; rz(pi/2048) a[5]; cx a[5],out[15]; rz(-pi/2048) out[15]; cx a[5],out[15]; rz(pi/2048) out[15]; cx b[0],a[5]; rz(-8*pi) a[5]; cx a[5],out[0]; rz(8*pi) out[0]; cx a[5],out[0]; rz(-8*pi) out[0]; cx b[0],a[5]; rz(8*pi) a[5]; cx a[5],out[0]; rz(-8*pi) out[0]; cx a[5],out[0]; rz(8*pi) out[0]; rz(4*pi) b[0]; cx b[0],out[1]; rz(-4*pi) out[1]; cx b[0],out[1]; rz(4*pi) out[1]; cx b[0],a[5]; rz(-4*pi) a[5]; cx a[5],out[1]; rz(4*pi) out[1]; cx a[5],out[1]; rz(-4*pi) out[1]; cx b[0],a[5]; rz(4*pi) a[5]; cx a[5],out[1]; rz(-4*pi) out[1]; cx a[5],out[1]; rz(4*pi) out[1]; rz(2*pi) b[0]; cx b[0],out[2]; rz(-2*pi) out[2]; cx b[0],out[2]; rz(2*pi) out[2]; cx b[0],a[5]; rz(-2*pi) a[5]; cx a[5],out[2]; rz(2*pi) out[2]; cx a[5],out[2]; rz(-2*pi) out[2]; cx b[0],a[5]; rz(2*pi) a[5]; cx a[5],out[2]; rz(-2*pi) out[2]; cx a[5],out[2]; rz(2*pi) out[2]; rz(pi) b[0]; cx b[0],out[3]; rz(-pi) out[3]; cx b[0],out[3]; rz(pi) out[3]; cx b[0],a[5]; rz(-pi) a[5]; cx a[5],out[3]; rz(pi) out[3]; cx a[5],out[3]; rz(-pi) out[3]; cx b[0],a[5]; rz(pi) a[5]; cx a[5],out[3]; rz(-pi) out[3]; cx a[5],out[3]; rz(pi) out[3]; rz(pi/2) b[0]; cx b[0],out[4]; rz(-pi/2) out[4]; cx b[0],out[4]; rz(pi/2) out[4]; cx b[0],a[5]; rz(-pi/2) a[5]; cx a[5],out[4]; rz(pi/2) out[4]; cx a[5],out[4]; rz(-pi/2) out[4]; cx b[0],a[5]; rz(pi/2) a[5]; cx a[5],out[4]; rz(-pi/2) out[4]; cx a[5],out[4]; rz(pi/2) out[4]; rz(pi/4) b[0]; cx b[0],out[5]; rz(-pi/4) out[5]; cx b[0],out[5]; rz(pi/4) out[5]; cx b[0],a[5]; rz(-pi/4) a[5]; cx a[5],out[5]; rz(pi/4) out[5]; cx a[5],out[5]; rz(-pi/4) out[5]; cx b[0],a[5]; rz(pi/4) a[5]; cx a[5],out[5]; rz(-pi/4) out[5]; cx a[5],out[5]; rz(pi/4) out[5]; rz(pi/8) b[0]; cx b[0],out[6]; rz(-pi/8) out[6]; cx b[0],out[6]; rz(pi/8) out[6]; cx b[0],a[5]; rz(-pi/8) a[5]; cx a[5],out[6]; rz(pi/8) out[6]; cx a[5],out[6]; rz(-pi/8) out[6]; cx b[0],a[5]; rz(pi/8) a[5]; cx a[5],out[6]; rz(-pi/8) out[6]; cx a[5],out[6]; rz(pi/8) out[6]; rz(pi/16) b[0]; cx b[0],out[7]; rz(-pi/16) out[7]; cx b[0],out[7]; rz(pi/16) out[7]; cx b[0],a[5]; rz(-pi/16) a[5]; cx a[5],out[7]; rz(pi/16) out[7]; cx a[5],out[7]; rz(-pi/16) out[7]; cx b[0],a[5]; rz(pi/16) a[5]; cx a[5],out[7]; rz(-pi/16) out[7]; cx a[5],out[7]; rz(pi/16) out[7]; rz(pi/32) b[0]; cx b[0],out[8]; rz(-pi/32) out[8]; cx b[0],out[8]; rz(pi/32) out[8]; cx b[0],a[5]; rz(-pi/32) a[5]; cx a[5],out[8]; rz(pi/32) out[8]; cx a[5],out[8]; rz(-pi/32) out[8]; cx b[0],a[5]; rz(pi/32) a[5]; cx a[5],out[8]; rz(-pi/32) out[8]; cx a[5],out[8]; rz(pi/32) out[8]; rz(pi/64) b[0]; cx b[0],out[9]; rz(-pi/64) out[9]; cx b[0],out[9]; rz(pi/64) out[9]; cx b[0],a[5]; rz(-pi/64) a[5]; cx a[5],out[9]; rz(pi/64) out[9]; cx a[5],out[9]; rz(-pi/64) out[9]; cx b[0],a[5]; rz(pi/64) a[5]; cx a[5],out[9]; rz(-pi/64) out[9]; cx a[5],out[9]; rz(pi/64) out[9]; rz(pi/128) b[0]; cx b[0],out[10]; rz(-pi/128) out[10]; cx b[0],out[10]; rz(pi/128) out[10]; cx b[0],a[5]; rz(-pi/128) a[5]; cx a[5],out[10]; rz(pi/128) out[10]; cx a[5],out[10]; rz(-pi/128) out[10]; cx b[0],a[5]; rz(pi/128) a[5]; cx a[5],out[10]; rz(-pi/128) out[10]; cx a[5],out[10]; rz(pi/128) out[10]; rz(pi/256) b[0]; cx b[0],out[11]; rz(-pi/256) out[11]; cx b[0],out[11]; rz(pi/256) out[11]; cx b[0],a[5]; rz(-pi/256) a[5]; cx a[5],out[11]; rz(pi/256) out[11]; cx a[5],out[11]; rz(-pi/256) out[11]; cx b[0],a[5]; rz(pi/256) a[5]; cx a[5],out[11]; rz(-pi/256) out[11]; cx a[5],out[11]; rz(pi/256) out[11]; rz(pi/512) b[0]; cx b[0],out[12]; rz(-pi/512) out[12]; cx b[0],out[12]; rz(pi/512) out[12]; cx b[0],a[5]; rz(-pi/512) a[5]; cx a[5],out[12]; rz(pi/512) out[12]; cx a[5],out[12]; rz(-pi/512) out[12]; cx b[0],a[5]; rz(pi/512) a[5]; cx a[5],out[12]; rz(-pi/512) out[12]; cx a[5],out[12]; rz(pi/512) out[12]; rz(pi/1024) b[0]; cx b[0],out[13]; rz(-pi/1024) out[13]; cx b[0],out[13]; rz(pi/1024) out[13]; cx b[0],a[5]; rz(-pi/1024) a[5]; cx a[5],out[13]; rz(pi/1024) out[13]; cx a[5],out[13]; rz(-pi/1024) out[13]; cx b[0],a[5]; rz(pi/1024) a[5]; cx a[5],out[13]; rz(-pi/1024) out[13]; cx a[5],out[13]; rz(pi/1024) out[13]; rz(pi/2048) b[0]; cx b[0],out[14]; rz(-pi/2048) out[14]; cx b[0],out[14]; rz(pi/2048) out[14]; cx b[0],a[5]; rz(-pi/2048) a[5]; cx a[5],out[14]; rz(pi/2048) out[14]; cx a[5],out[14]; rz(-pi/2048) out[14]; cx b[0],a[5]; rz(pi/2048) a[5]; cx a[5],out[14]; rz(-pi/2048) out[14]; cx a[5],out[14]; rz(pi/2048) out[14]; rz(pi/4096) b[0]; cx b[0],out[15]; rz(-pi/4096) out[15]; cx b[0],out[15]; rz(pi/4096) out[15]; cx b[0],a[5]; rz(-pi/4096) a[5]; cx a[5],out[15]; rz(pi/4096) out[15]; cx a[5],out[15]; rz(-pi/4096) out[15]; cx b[0],a[5]; rz(pi/4096) a[5]; cx a[5],out[15]; rz(-pi/4096) out[15]; cx a[5],out[15]; rz(pi/4096) out[15]; rz(4*pi) b[0]; rz(8*pi) b[1]; rz(16*pi) b[2]; rz(32*pi) b[3]; rz(64*pi) b[4]; rz(128*pi) b[5]; rz(256*pi) b[6]; rz(512*pi) b[7]; cx b[7],out[0]; rz(-512*pi) out[0]; cx b[7],out[0]; rz(512*pi) out[0]; cx b[7],a[4]; rz(-512*pi) a[4]; cx a[4],out[0]; rz(512*pi) out[0]; cx a[4],out[0]; rz(-512*pi) out[0]; cx b[7],a[4]; rz(512*pi) a[4]; cx a[4],out[0]; rz(-512*pi) out[0]; cx a[4],out[0]; rz(512*pi) out[0]; cx b[6],out[0]; rz(-256*pi) out[0]; cx b[6],out[0]; rz(256*pi) out[0]; rz(256*pi) b[7]; cx b[7],out[1]; rz(-256*pi) out[1]; cx b[7],out[1]; rz(256*pi) out[1]; cx b[7],a[4]; rz(-256*pi) a[4]; cx a[4],out[1]; rz(256*pi) out[1]; cx a[4],out[1]; rz(-256*pi) out[1]; cx b[7],a[4]; rz(256*pi) a[4]; cx a[4],out[1]; rz(-256*pi) out[1]; cx a[4],out[1]; rz(256*pi) out[1]; rz(128*pi) b[7]; cx b[7],out[2]; rz(-128*pi) out[2]; cx b[7],out[2]; rz(128*pi) out[2]; cx b[7],a[4]; rz(-128*pi) a[4]; cx a[4],out[2]; rz(128*pi) out[2]; cx a[4],out[2]; rz(-128*pi) out[2]; cx b[7],a[4]; rz(128*pi) a[4]; cx a[4],out[2]; rz(-128*pi) out[2]; cx a[4],out[2]; rz(128*pi) out[2]; rz(64*pi) b[7]; cx b[7],out[3]; rz(-64*pi) out[3]; cx b[7],out[3]; rz(64*pi) out[3]; cx b[7],a[4]; rz(-64*pi) a[4]; cx a[4],out[3]; rz(64*pi) out[3]; cx a[4],out[3]; rz(-64*pi) out[3]; cx b[7],a[4]; rz(64*pi) a[4]; cx a[4],out[3]; rz(-64*pi) out[3]; cx a[4],out[3]; rz(64*pi) out[3]; rz(32*pi) b[7]; cx b[7],out[4]; rz(-32*pi) out[4]; cx b[7],out[4]; rz(32*pi) out[4]; cx b[7],a[4]; rz(-32*pi) a[4]; cx a[4],out[4]; rz(32*pi) out[4]; cx a[4],out[4]; rz(-32*pi) out[4]; cx b[7],a[4]; rz(32*pi) a[4]; cx a[4],out[4]; rz(-32*pi) out[4]; cx a[4],out[4]; rz(32*pi) out[4]; rz(16*pi) b[7]; cx b[7],out[5]; rz(-16*pi) out[5]; cx b[7],out[5]; rz(16*pi) out[5]; cx b[7],a[4]; rz(-16*pi) a[4]; cx a[4],out[5]; rz(16*pi) out[5]; cx a[4],out[5]; rz(-16*pi) out[5]; cx b[7],a[4]; rz(16*pi) a[4]; cx a[4],out[5]; rz(-16*pi) out[5]; cx a[4],out[5]; rz(16*pi) out[5]; rz(8*pi) b[7]; cx b[7],out[6]; rz(-8*pi) out[6]; cx b[7],out[6]; rz(8*pi) out[6]; cx b[7],a[4]; rz(-8*pi) a[4]; cx a[4],out[6]; rz(8*pi) out[6]; cx a[4],out[6]; rz(-8*pi) out[6]; cx b[7],a[4]; rz(8*pi) a[4]; cx a[4],out[6]; rz(-8*pi) out[6]; cx a[4],out[6]; rz(8*pi) out[6]; rz(4*pi) b[7]; cx b[7],out[7]; rz(-4*pi) out[7]; cx b[7],out[7]; rz(4*pi) out[7]; cx b[7],a[4]; rz(-4*pi) a[4]; cx a[4],out[7]; rz(4*pi) out[7]; cx a[4],out[7]; rz(-4*pi) out[7]; cx b[7],a[4]; rz(4*pi) a[4]; cx a[4],out[7]; rz(-4*pi) out[7]; cx a[4],out[7]; rz(4*pi) out[7]; rz(2*pi) b[7]; cx b[7],out[8]; rz(-2*pi) out[8]; cx b[7],out[8]; rz(2*pi) out[8]; cx b[7],a[4]; rz(-2*pi) a[4]; cx a[4],out[8]; rz(2*pi) out[8]; cx a[4],out[8]; rz(-2*pi) out[8]; cx b[7],a[4]; rz(2*pi) a[4]; cx a[4],out[8]; rz(-2*pi) out[8]; cx a[4],out[8]; rz(2*pi) out[8]; rz(pi) b[7]; cx b[7],out[9]; rz(-pi) out[9]; cx b[7],out[9]; rz(pi) out[9]; cx b[7],a[4]; rz(-pi) a[4]; cx a[4],out[9]; rz(pi) out[9]; cx a[4],out[9]; rz(-pi) out[9]; cx b[7],a[4]; rz(pi) a[4]; cx a[4],out[9]; rz(-pi) out[9]; cx a[4],out[9]; rz(pi) out[9]; rz(pi/2) b[7]; cx b[7],out[10]; rz(-pi/2) out[10]; cx b[7],out[10]; rz(pi/2) out[10]; cx b[7],a[4]; rz(-pi/2) a[4]; cx a[4],out[10]; rz(pi/2) out[10]; cx a[4],out[10]; rz(-pi/2) out[10]; cx b[7],a[4]; rz(pi/2) a[4]; cx a[4],out[10]; rz(-pi/2) out[10]; cx a[4],out[10]; rz(pi/2) out[10]; rz(pi/4) b[7]; cx b[7],out[11]; rz(-pi/4) out[11]; cx b[7],out[11]; rz(pi/4) out[11]; cx b[7],a[4]; rz(-pi/4) a[4]; cx a[4],out[11]; rz(pi/4) out[11]; cx a[4],out[11]; rz(-pi/4) out[11]; cx b[7],a[4]; rz(pi/4) a[4]; cx a[4],out[11]; rz(-pi/4) out[11]; cx a[4],out[11]; rz(pi/4) out[11]; rz(pi/8) b[7]; cx b[7],out[12]; rz(-pi/8) out[12]; cx b[7],out[12]; rz(pi/8) out[12]; cx b[7],a[4]; rz(-pi/8) a[4]; cx a[4],out[12]; rz(pi/8) out[12]; cx a[4],out[12]; rz(-pi/8) out[12]; cx b[7],a[4]; rz(pi/8) a[4]; cx a[4],out[12]; rz(-pi/8) out[12]; cx a[4],out[12]; rz(pi/8) out[12]; rz(pi/16) b[7]; cx b[7],out[13]; rz(-pi/16) out[13]; cx b[7],out[13]; rz(pi/16) out[13]; cx b[7],a[4]; rz(-pi/16) a[4]; cx a[4],out[13]; rz(pi/16) out[13]; cx a[4],out[13]; rz(-pi/16) out[13]; cx b[7],a[4]; rz(pi/16) a[4]; cx a[4],out[13]; rz(-pi/16) out[13]; cx a[4],out[13]; rz(pi/16) out[13]; rz(pi/32) b[7]; cx b[7],out[14]; rz(-pi/32) out[14]; cx b[7],out[14]; rz(pi/32) out[14]; cx b[7],a[4]; rz(-pi/32) a[4]; cx a[4],out[14]; rz(pi/32) out[14]; cx a[4],out[14]; rz(-pi/32) out[14]; cx b[7],a[4]; rz(pi/32) a[4]; cx a[4],out[14]; rz(-pi/32) out[14]; cx a[4],out[14]; rz(pi/32) out[14]; rz(pi/64) b[7]; cx b[7],out[15]; rz(-pi/64) out[15]; cx b[7],out[15]; rz(pi/64) out[15]; cx b[7],a[4]; rz(-pi/64) a[4]; cx a[4],out[15]; rz(pi/64) out[15]; cx a[4],out[15]; rz(-pi/64) out[15]; cx b[7],a[4]; rz(pi/64) a[4]; cx a[4],out[15]; rz(-pi/64) out[15]; cx a[4],out[15]; rz(pi/64) out[15]; cx b[6],a[4]; rz(-256*pi) a[4]; cx a[4],out[0]; rz(256*pi) out[0]; cx a[4],out[0]; rz(-256*pi) out[0]; cx b[6],a[4]; rz(256*pi) a[4]; cx a[4],out[0]; rz(-256*pi) out[0]; cx a[4],out[0]; rz(256*pi) out[0]; cx b[5],out[0]; rz(-128*pi) out[0]; cx b[5],out[0]; rz(128*pi) out[0]; rz(128*pi) b[6]; cx b[6],out[1]; rz(-128*pi) out[1]; cx b[6],out[1]; rz(128*pi) out[1]; cx b[6],a[4]; rz(-128*pi) a[4]; cx a[4],out[1]; rz(128*pi) out[1]; cx a[4],out[1]; rz(-128*pi) out[1]; cx b[6],a[4]; rz(128*pi) a[4]; cx a[4],out[1]; rz(-128*pi) out[1]; cx a[4],out[1]; rz(128*pi) out[1]; rz(64*pi) b[6]; cx b[6],out[2]; rz(-64*pi) out[2]; cx b[6],out[2]; rz(64*pi) out[2]; cx b[6],a[4]; rz(-64*pi) a[4]; cx a[4],out[2]; rz(64*pi) out[2]; cx a[4],out[2]; rz(-64*pi) out[2]; cx b[6],a[4]; rz(64*pi) a[4]; cx a[4],out[2]; rz(-64*pi) out[2]; cx a[4],out[2]; rz(64*pi) out[2]; rz(32*pi) b[6]; cx b[6],out[3]; rz(-32*pi) out[3]; cx b[6],out[3]; rz(32*pi) out[3]; cx b[6],a[4]; rz(-32*pi) a[4]; cx a[4],out[3]; rz(32*pi) out[3]; cx a[4],out[3]; rz(-32*pi) out[3]; cx b[6],a[4]; rz(32*pi) a[4]; cx a[4],out[3]; rz(-32*pi) out[3]; cx a[4],out[3]; rz(32*pi) out[3]; rz(16*pi) b[6]; cx b[6],out[4]; rz(-16*pi) out[4]; cx b[6],out[4]; rz(16*pi) out[4]; cx b[6],a[4]; rz(-16*pi) a[4]; cx a[4],out[4]; rz(16*pi) out[4]; cx a[4],out[4]; rz(-16*pi) out[4]; cx b[6],a[4]; rz(16*pi) a[4]; cx a[4],out[4]; rz(-16*pi) out[4]; cx a[4],out[4]; rz(16*pi) out[4]; rz(8*pi) b[6]; cx b[6],out[5]; rz(-8*pi) out[5]; cx b[6],out[5]; rz(8*pi) out[5]; cx b[6],a[4]; rz(-8*pi) a[4]; cx a[4],out[5]; rz(8*pi) out[5]; cx a[4],out[5]; rz(-8*pi) out[5]; cx b[6],a[4]; rz(8*pi) a[4]; cx a[4],out[5]; rz(-8*pi) out[5]; cx a[4],out[5]; rz(8*pi) out[5]; rz(4*pi) b[6]; cx b[6],out[6]; rz(-4*pi) out[6]; cx b[6],out[6]; rz(4*pi) out[6]; cx b[6],a[4]; rz(-4*pi) a[4]; cx a[4],out[6]; rz(4*pi) out[6]; cx a[4],out[6]; rz(-4*pi) out[6]; cx b[6],a[4]; rz(4*pi) a[4]; cx a[4],out[6]; rz(-4*pi) out[6]; cx a[4],out[6]; rz(4*pi) out[6]; rz(2*pi) b[6]; cx b[6],out[7]; rz(-2*pi) out[7]; cx b[6],out[7]; rz(2*pi) out[7]; cx b[6],a[4]; rz(-2*pi) a[4]; cx a[4],out[7]; rz(2*pi) out[7]; cx a[4],out[7]; rz(-2*pi) out[7]; cx b[6],a[4]; rz(2*pi) a[4]; cx a[4],out[7]; rz(-2*pi) out[7]; cx a[4],out[7]; rz(2*pi) out[7]; rz(pi) b[6]; cx b[6],out[8]; rz(-pi) out[8]; cx b[6],out[8]; rz(pi) out[8]; cx b[6],a[4]; rz(-pi) a[4]; cx a[4],out[8]; rz(pi) out[8]; cx a[4],out[8]; rz(-pi) out[8]; cx b[6],a[4]; rz(pi) a[4]; cx a[4],out[8]; rz(-pi) out[8]; cx a[4],out[8]; rz(pi) out[8]; rz(pi/2) b[6]; cx b[6],out[9]; rz(-pi/2) out[9]; cx b[6],out[9]; rz(pi/2) out[9]; cx b[6],a[4]; rz(-pi/2) a[4]; cx a[4],out[9]; rz(pi/2) out[9]; cx a[4],out[9]; rz(-pi/2) out[9]; cx b[6],a[4]; rz(pi/2) a[4]; cx a[4],out[9]; rz(-pi/2) out[9]; cx a[4],out[9]; rz(pi/2) out[9]; rz(pi/4) b[6]; cx b[6],out[10]; rz(-pi/4) out[10]; cx b[6],out[10]; rz(pi/4) out[10]; cx b[6],a[4]; rz(-pi/4) a[4]; cx a[4],out[10]; rz(pi/4) out[10]; cx a[4],out[10]; rz(-pi/4) out[10]; cx b[6],a[4]; rz(pi/4) a[4]; cx a[4],out[10]; rz(-pi/4) out[10]; cx a[4],out[10]; rz(pi/4) out[10]; rz(pi/8) b[6]; cx b[6],out[11]; rz(-pi/8) out[11]; cx b[6],out[11]; rz(pi/8) out[11]; cx b[6],a[4]; rz(-pi/8) a[4]; cx a[4],out[11]; rz(pi/8) out[11]; cx a[4],out[11]; rz(-pi/8) out[11]; cx b[6],a[4]; rz(pi/8) a[4]; cx a[4],out[11]; rz(-pi/8) out[11]; cx a[4],out[11]; rz(pi/8) out[11]; rz(pi/16) b[6]; cx b[6],out[12]; rz(-pi/16) out[12]; cx b[6],out[12]; rz(pi/16) out[12]; cx b[6],a[4]; rz(-pi/16) a[4]; cx a[4],out[12]; rz(pi/16) out[12]; cx a[4],out[12]; rz(-pi/16) out[12]; cx b[6],a[4]; rz(pi/16) a[4]; cx a[4],out[12]; rz(-pi/16) out[12]; cx a[4],out[12]; rz(pi/16) out[12]; rz(pi/32) b[6]; cx b[6],out[13]; rz(-pi/32) out[13]; cx b[6],out[13]; rz(pi/32) out[13]; cx b[6],a[4]; rz(-pi/32) a[4]; cx a[4],out[13]; rz(pi/32) out[13]; cx a[4],out[13]; rz(-pi/32) out[13]; cx b[6],a[4]; rz(pi/32) a[4]; cx a[4],out[13]; rz(-pi/32) out[13]; cx a[4],out[13]; rz(pi/32) out[13]; rz(pi/64) b[6]; cx b[6],out[14]; rz(-pi/64) out[14]; cx b[6],out[14]; rz(pi/64) out[14]; cx b[6],a[4]; rz(-pi/64) a[4]; cx a[4],out[14]; rz(pi/64) out[14]; cx a[4],out[14]; rz(-pi/64) out[14]; cx b[6],a[4]; rz(pi/64) a[4]; cx a[4],out[14]; rz(-pi/64) out[14]; cx a[4],out[14]; rz(pi/64) out[14]; rz(pi/128) b[6]; cx b[6],out[15]; rz(-pi/128) out[15]; cx b[6],out[15]; rz(pi/128) out[15]; cx b[6],a[4]; rz(-pi/128) a[4]; cx a[4],out[15]; rz(pi/128) out[15]; cx a[4],out[15]; rz(-pi/128) out[15]; cx b[6],a[4]; rz(pi/128) a[4]; cx a[4],out[15]; rz(-pi/128) out[15]; cx a[4],out[15]; rz(pi/128) out[15]; cx b[5],a[4]; rz(-128*pi) a[4]; cx a[4],out[0]; rz(128*pi) out[0]; cx a[4],out[0]; rz(-128*pi) out[0]; cx b[5],a[4]; rz(128*pi) a[4]; cx a[4],out[0]; rz(-128*pi) out[0]; cx a[4],out[0]; rz(128*pi) out[0]; cx b[4],out[0]; rz(-64*pi) out[0]; cx b[4],out[0]; rz(64*pi) out[0]; rz(64*pi) b[5]; cx b[5],out[1]; rz(-64*pi) out[1]; cx b[5],out[1]; rz(64*pi) out[1]; cx b[5],a[4]; rz(-64*pi) a[4]; cx a[4],out[1]; rz(64*pi) out[1]; cx a[4],out[1]; rz(-64*pi) out[1]; cx b[5],a[4]; rz(64*pi) a[4]; cx a[4],out[1]; rz(-64*pi) out[1]; cx a[4],out[1]; rz(64*pi) out[1]; rz(32*pi) b[5]; cx b[5],out[2]; rz(-32*pi) out[2]; cx b[5],out[2]; rz(32*pi) out[2]; cx b[5],a[4]; rz(-32*pi) a[4]; cx a[4],out[2]; rz(32*pi) out[2]; cx a[4],out[2]; rz(-32*pi) out[2]; cx b[5],a[4]; rz(32*pi) a[4]; cx a[4],out[2]; rz(-32*pi) out[2]; cx a[4],out[2]; rz(32*pi) out[2]; rz(16*pi) b[5]; cx b[5],out[3]; rz(-16*pi) out[3]; cx b[5],out[3]; rz(16*pi) out[3]; cx b[5],a[4]; rz(-16*pi) a[4]; cx a[4],out[3]; rz(16*pi) out[3]; cx a[4],out[3]; rz(-16*pi) out[3]; cx b[5],a[4]; rz(16*pi) a[4]; cx a[4],out[3]; rz(-16*pi) out[3]; cx a[4],out[3]; rz(16*pi) out[3]; rz(8*pi) b[5]; cx b[5],out[4]; rz(-8*pi) out[4]; cx b[5],out[4]; rz(8*pi) out[4]; cx b[5],a[4]; rz(-8*pi) a[4]; cx a[4],out[4]; rz(8*pi) out[4]; cx a[4],out[4]; rz(-8*pi) out[4]; cx b[5],a[4]; rz(8*pi) a[4]; cx a[4],out[4]; rz(-8*pi) out[4]; cx a[4],out[4]; rz(8*pi) out[4]; rz(4*pi) b[5]; cx b[5],out[5]; rz(-4*pi) out[5]; cx b[5],out[5]; rz(4*pi) out[5]; cx b[5],a[4]; rz(-4*pi) a[4]; cx a[4],out[5]; rz(4*pi) out[5]; cx a[4],out[5]; rz(-4*pi) out[5]; cx b[5],a[4]; rz(4*pi) a[4]; cx a[4],out[5]; rz(-4*pi) out[5]; cx a[4],out[5]; rz(4*pi) out[5]; rz(2*pi) b[5]; cx b[5],out[6]; rz(-2*pi) out[6]; cx b[5],out[6]; rz(2*pi) out[6]; cx b[5],a[4]; rz(-2*pi) a[4]; cx a[4],out[6]; rz(2*pi) out[6]; cx a[4],out[6]; rz(-2*pi) out[6]; cx b[5],a[4]; rz(2*pi) a[4]; cx a[4],out[6]; rz(-2*pi) out[6]; cx a[4],out[6]; rz(2*pi) out[6]; rz(pi) b[5]; cx b[5],out[7]; rz(-pi) out[7]; cx b[5],out[7]; rz(pi) out[7]; cx b[5],a[4]; rz(-pi) a[4]; cx a[4],out[7]; rz(pi) out[7]; cx a[4],out[7]; rz(-pi) out[7]; cx b[5],a[4]; rz(pi) a[4]; cx a[4],out[7]; rz(-pi) out[7]; cx a[4],out[7]; rz(pi) out[7]; rz(pi/2) b[5]; cx b[5],out[8]; rz(-pi/2) out[8]; cx b[5],out[8]; rz(pi/2) out[8]; cx b[5],a[4]; rz(-pi/2) a[4]; cx a[4],out[8]; rz(pi/2) out[8]; cx a[4],out[8]; rz(-pi/2) out[8]; cx b[5],a[4]; rz(pi/2) a[4]; cx a[4],out[8]; rz(-pi/2) out[8]; cx a[4],out[8]; rz(pi/2) out[8]; rz(pi/4) b[5]; cx b[5],out[9]; rz(-pi/4) out[9]; cx b[5],out[9]; rz(pi/4) out[9]; cx b[5],a[4]; rz(-pi/4) a[4]; cx a[4],out[9]; rz(pi/4) out[9]; cx a[4],out[9]; rz(-pi/4) out[9]; cx b[5],a[4]; rz(pi/4) a[4]; cx a[4],out[9]; rz(-pi/4) out[9]; cx a[4],out[9]; rz(pi/4) out[9]; rz(pi/8) b[5]; cx b[5],out[10]; rz(-pi/8) out[10]; cx b[5],out[10]; rz(pi/8) out[10]; cx b[5],a[4]; rz(-pi/8) a[4]; cx a[4],out[10]; rz(pi/8) out[10]; cx a[4],out[10]; rz(-pi/8) out[10]; cx b[5],a[4]; rz(pi/8) a[4]; cx a[4],out[10]; rz(-pi/8) out[10]; cx a[4],out[10]; rz(pi/8) out[10]; rz(pi/16) b[5]; cx b[5],out[11]; rz(-pi/16) out[11]; cx b[5],out[11]; rz(pi/16) out[11]; cx b[5],a[4]; rz(-pi/16) a[4]; cx a[4],out[11]; rz(pi/16) out[11]; cx a[4],out[11]; rz(-pi/16) out[11]; cx b[5],a[4]; rz(pi/16) a[4]; cx a[4],out[11]; rz(-pi/16) out[11]; cx a[4],out[11]; rz(pi/16) out[11]; rz(pi/32) b[5]; cx b[5],out[12]; rz(-pi/32) out[12]; cx b[5],out[12]; rz(pi/32) out[12]; cx b[5],a[4]; rz(-pi/32) a[4]; cx a[4],out[12]; rz(pi/32) out[12]; cx a[4],out[12]; rz(-pi/32) out[12]; cx b[5],a[4]; rz(pi/32) a[4]; cx a[4],out[12]; rz(-pi/32) out[12]; cx a[4],out[12]; rz(pi/32) out[12]; rz(pi/64) b[5]; cx b[5],out[13]; rz(-pi/64) out[13]; cx b[5],out[13]; rz(pi/64) out[13]; cx b[5],a[4]; rz(-pi/64) a[4]; cx a[4],out[13]; rz(pi/64) out[13]; cx a[4],out[13]; rz(-pi/64) out[13]; cx b[5],a[4]; rz(pi/64) a[4]; cx a[4],out[13]; rz(-pi/64) out[13]; cx a[4],out[13]; rz(pi/64) out[13]; rz(pi/128) b[5]; cx b[5],out[14]; rz(-pi/128) out[14]; cx b[5],out[14]; rz(pi/128) out[14]; cx b[5],a[4]; rz(-pi/128) a[4]; cx a[4],out[14]; rz(pi/128) out[14]; cx a[4],out[14]; rz(-pi/128) out[14]; cx b[5],a[4]; rz(pi/128) a[4]; cx a[4],out[14]; rz(-pi/128) out[14]; cx a[4],out[14]; rz(pi/128) out[14]; rz(pi/256) b[5]; cx b[5],out[15]; rz(-pi/256) out[15]; cx b[5],out[15]; rz(pi/256) out[15]; cx b[5],a[4]; rz(-pi/256) a[4]; cx a[4],out[15]; rz(pi/256) out[15]; cx a[4],out[15]; rz(-pi/256) out[15]; cx b[5],a[4]; rz(pi/256) a[4]; cx a[4],out[15]; rz(-pi/256) out[15]; cx a[4],out[15]; rz(pi/256) out[15]; cx b[4],a[4]; rz(-64*pi) a[4]; cx a[4],out[0]; rz(64*pi) out[0]; cx a[4],out[0]; rz(-64*pi) out[0]; cx b[4],a[4]; rz(64*pi) a[4]; cx a[4],out[0]; rz(-64*pi) out[0]; cx a[4],out[0]; rz(64*pi) out[0]; cx b[3],out[0]; rz(-32*pi) out[0]; cx b[3],out[0]; rz(32*pi) out[0]; rz(32*pi) b[4]; cx b[4],out[1]; rz(-32*pi) out[1]; cx b[4],out[1]; rz(32*pi) out[1]; cx b[4],a[4]; rz(-32*pi) a[4]; cx a[4],out[1]; rz(32*pi) out[1]; cx a[4],out[1]; rz(-32*pi) out[1]; cx b[4],a[4]; rz(32*pi) a[4]; cx a[4],out[1]; rz(-32*pi) out[1]; cx a[4],out[1]; rz(32*pi) out[1]; rz(16*pi) b[4]; cx b[4],out[2]; rz(-16*pi) out[2]; cx b[4],out[2]; rz(16*pi) out[2]; cx b[4],a[4]; rz(-16*pi) a[4]; cx a[4],out[2]; rz(16*pi) out[2]; cx a[4],out[2]; rz(-16*pi) out[2]; cx b[4],a[4]; rz(16*pi) a[4]; cx a[4],out[2]; rz(-16*pi) out[2]; cx a[4],out[2]; rz(16*pi) out[2]; rz(8*pi) b[4]; cx b[4],out[3]; rz(-8*pi) out[3]; cx b[4],out[3]; rz(8*pi) out[3]; cx b[4],a[4]; rz(-8*pi) a[4]; cx a[4],out[3]; rz(8*pi) out[3]; cx a[4],out[3]; rz(-8*pi) out[3]; cx b[4],a[4]; rz(8*pi) a[4]; cx a[4],out[3]; rz(-8*pi) out[3]; cx a[4],out[3]; rz(8*pi) out[3]; rz(4*pi) b[4]; cx b[4],out[4]; rz(-4*pi) out[4]; cx b[4],out[4]; rz(4*pi) out[4]; cx b[4],a[4]; rz(-4*pi) a[4]; cx a[4],out[4]; rz(4*pi) out[4]; cx a[4],out[4]; rz(-4*pi) out[4]; cx b[4],a[4]; rz(4*pi) a[4]; cx a[4],out[4]; rz(-4*pi) out[4]; cx a[4],out[4]; rz(4*pi) out[4]; rz(2*pi) b[4]; cx b[4],out[5]; rz(-2*pi) out[5]; cx b[4],out[5]; rz(2*pi) out[5]; cx b[4],a[4]; rz(-2*pi) a[4]; cx a[4],out[5]; rz(2*pi) out[5]; cx a[4],out[5]; rz(-2*pi) out[5]; cx b[4],a[4]; rz(2*pi) a[4]; cx a[4],out[5]; rz(-2*pi) out[5]; cx a[4],out[5]; rz(2*pi) out[5]; rz(pi) b[4]; cx b[4],out[6]; rz(-pi) out[6]; cx b[4],out[6]; rz(pi) out[6]; cx b[4],a[4]; rz(-pi) a[4]; cx a[4],out[6]; rz(pi) out[6]; cx a[4],out[6]; rz(-pi) out[6]; cx b[4],a[4]; rz(pi) a[4]; cx a[4],out[6]; rz(-pi) out[6]; cx a[4],out[6]; rz(pi) out[6]; rz(pi/2) b[4]; cx b[4],out[7]; rz(-pi/2) out[7]; cx b[4],out[7]; rz(pi/2) out[7]; cx b[4],a[4]; rz(-pi/2) a[4]; cx a[4],out[7]; rz(pi/2) out[7]; cx a[4],out[7]; rz(-pi/2) out[7]; cx b[4],a[4]; rz(pi/2) a[4]; cx a[4],out[7]; rz(-pi/2) out[7]; cx a[4],out[7]; rz(pi/2) out[7]; rz(pi/4) b[4]; cx b[4],out[8]; rz(-pi/4) out[8]; cx b[4],out[8]; rz(pi/4) out[8]; cx b[4],a[4]; rz(-pi/4) a[4]; cx a[4],out[8]; rz(pi/4) out[8]; cx a[4],out[8]; rz(-pi/4) out[8]; cx b[4],a[4]; rz(pi/4) a[4]; cx a[4],out[8]; rz(-pi/4) out[8]; cx a[4],out[8]; rz(pi/4) out[8]; rz(pi/8) b[4]; cx b[4],out[9]; rz(-pi/8) out[9]; cx b[4],out[9]; rz(pi/8) out[9]; cx b[4],a[4]; rz(-pi/8) a[4]; cx a[4],out[9]; rz(pi/8) out[9]; cx a[4],out[9]; rz(-pi/8) out[9]; cx b[4],a[4]; rz(pi/8) a[4]; cx a[4],out[9]; rz(-pi/8) out[9]; cx a[4],out[9]; rz(pi/8) out[9]; rz(pi/16) b[4]; cx b[4],out[10]; rz(-pi/16) out[10]; cx b[4],out[10]; rz(pi/16) out[10]; cx b[4],a[4]; rz(-pi/16) a[4]; cx a[4],out[10]; rz(pi/16) out[10]; cx a[4],out[10]; rz(-pi/16) out[10]; cx b[4],a[4]; rz(pi/16) a[4]; cx a[4],out[10]; rz(-pi/16) out[10]; cx a[4],out[10]; rz(pi/16) out[10]; rz(pi/32) b[4]; cx b[4],out[11]; rz(-pi/32) out[11]; cx b[4],out[11]; rz(pi/32) out[11]; cx b[4],a[4]; rz(-pi/32) a[4]; cx a[4],out[11]; rz(pi/32) out[11]; cx a[4],out[11]; rz(-pi/32) out[11]; cx b[4],a[4]; rz(pi/32) a[4]; cx a[4],out[11]; rz(-pi/32) out[11]; cx a[4],out[11]; rz(pi/32) out[11]; rz(pi/64) b[4]; cx b[4],out[12]; rz(-pi/64) out[12]; cx b[4],out[12]; rz(pi/64) out[12]; cx b[4],a[4]; rz(-pi/64) a[4]; cx a[4],out[12]; rz(pi/64) out[12]; cx a[4],out[12]; rz(-pi/64) out[12]; cx b[4],a[4]; rz(pi/64) a[4]; cx a[4],out[12]; rz(-pi/64) out[12]; cx a[4],out[12]; rz(pi/64) out[12]; rz(pi/128) b[4]; cx b[4],out[13]; rz(-pi/128) out[13]; cx b[4],out[13]; rz(pi/128) out[13]; cx b[4],a[4]; rz(-pi/128) a[4]; cx a[4],out[13]; rz(pi/128) out[13]; cx a[4],out[13]; rz(-pi/128) out[13]; cx b[4],a[4]; rz(pi/128) a[4]; cx a[4],out[13]; rz(-pi/128) out[13]; cx a[4],out[13]; rz(pi/128) out[13]; rz(pi/256) b[4]; cx b[4],out[14]; rz(-pi/256) out[14]; cx b[4],out[14]; rz(pi/256) out[14]; cx b[4],a[4]; rz(-pi/256) a[4]; cx a[4],out[14]; rz(pi/256) out[14]; cx a[4],out[14]; rz(-pi/256) out[14]; cx b[4],a[4]; rz(pi/256) a[4]; cx a[4],out[14]; rz(-pi/256) out[14]; cx a[4],out[14]; rz(pi/256) out[14]; rz(pi/512) b[4]; cx b[4],out[15]; rz(-pi/512) out[15]; cx b[4],out[15]; rz(pi/512) out[15]; cx b[4],a[4]; rz(-pi/512) a[4]; cx a[4],out[15]; rz(pi/512) out[15]; cx a[4],out[15]; rz(-pi/512) out[15]; cx b[4],a[4]; rz(pi/512) a[4]; cx a[4],out[15]; rz(-pi/512) out[15]; cx a[4],out[15]; rz(pi/512) out[15]; cx b[3],a[4]; rz(-32*pi) a[4]; cx a[4],out[0]; rz(32*pi) out[0]; cx a[4],out[0]; rz(-32*pi) out[0]; cx b[3],a[4]; rz(32*pi) a[4]; cx a[4],out[0]; rz(-32*pi) out[0]; cx a[4],out[0]; rz(32*pi) out[0]; cx b[2],out[0]; rz(-16*pi) out[0]; cx b[2],out[0]; rz(16*pi) out[0]; rz(16*pi) b[3]; cx b[3],out[1]; rz(-16*pi) out[1]; cx b[3],out[1]; rz(16*pi) out[1]; cx b[3],a[4]; rz(-16*pi) a[4]; cx a[4],out[1]; rz(16*pi) out[1]; cx a[4],out[1]; rz(-16*pi) out[1]; cx b[3],a[4]; rz(16*pi) a[4]; cx a[4],out[1]; rz(-16*pi) out[1]; cx a[4],out[1]; rz(16*pi) out[1]; rz(8*pi) b[3]; cx b[3],out[2]; rz(-8*pi) out[2]; cx b[3],out[2]; rz(8*pi) out[2]; cx b[3],a[4]; rz(-8*pi) a[4]; cx a[4],out[2]; rz(8*pi) out[2]; cx a[4],out[2]; rz(-8*pi) out[2]; cx b[3],a[4]; rz(8*pi) a[4]; cx a[4],out[2]; rz(-8*pi) out[2]; cx a[4],out[2]; rz(8*pi) out[2]; rz(4*pi) b[3]; cx b[3],out[3]; rz(-4*pi) out[3]; cx b[3],out[3]; rz(4*pi) out[3]; cx b[3],a[4]; rz(-4*pi) a[4]; cx a[4],out[3]; rz(4*pi) out[3]; cx a[4],out[3]; rz(-4*pi) out[3]; cx b[3],a[4]; rz(4*pi) a[4]; cx a[4],out[3]; rz(-4*pi) out[3]; cx a[4],out[3]; rz(4*pi) out[3]; rz(2*pi) b[3]; cx b[3],out[4]; rz(-2*pi) out[4]; cx b[3],out[4]; rz(2*pi) out[4]; cx b[3],a[4]; rz(-2*pi) a[4]; cx a[4],out[4]; rz(2*pi) out[4]; cx a[4],out[4]; rz(-2*pi) out[4]; cx b[3],a[4]; rz(2*pi) a[4]; cx a[4],out[4]; rz(-2*pi) out[4]; cx a[4],out[4]; rz(2*pi) out[4]; rz(pi) b[3]; cx b[3],out[5]; rz(-pi) out[5]; cx b[3],out[5]; rz(pi) out[5]; cx b[3],a[4]; rz(-pi) a[4]; cx a[4],out[5]; rz(pi) out[5]; cx a[4],out[5]; rz(-pi) out[5]; cx b[3],a[4]; rz(pi) a[4]; cx a[4],out[5]; rz(-pi) out[5]; cx a[4],out[5]; rz(pi) out[5]; rz(pi/2) b[3]; cx b[3],out[6]; rz(-pi/2) out[6]; cx b[3],out[6]; rz(pi/2) out[6]; cx b[3],a[4]; rz(-pi/2) a[4]; cx a[4],out[6]; rz(pi/2) out[6]; cx a[4],out[6]; rz(-pi/2) out[6]; cx b[3],a[4]; rz(pi/2) a[4]; cx a[4],out[6]; rz(-pi/2) out[6]; cx a[4],out[6]; rz(pi/2) out[6]; rz(pi/4) b[3]; cx b[3],out[7]; rz(-pi/4) out[7]; cx b[3],out[7]; rz(pi/4) out[7]; cx b[3],a[4]; rz(-pi/4) a[4]; cx a[4],out[7]; rz(pi/4) out[7]; cx a[4],out[7]; rz(-pi/4) out[7]; cx b[3],a[4]; rz(pi/4) a[4]; cx a[4],out[7]; rz(-pi/4) out[7]; cx a[4],out[7]; rz(pi/4) out[7]; rz(pi/8) b[3]; cx b[3],out[8]; rz(-pi/8) out[8]; cx b[3],out[8]; rz(pi/8) out[8]; cx b[3],a[4]; rz(-pi/8) a[4]; cx a[4],out[8]; rz(pi/8) out[8]; cx a[4],out[8]; rz(-pi/8) out[8]; cx b[3],a[4]; rz(pi/8) a[4]; cx a[4],out[8]; rz(-pi/8) out[8]; cx a[4],out[8]; rz(pi/8) out[8]; rz(pi/16) b[3]; cx b[3],out[9]; rz(-pi/16) out[9]; cx b[3],out[9]; rz(pi/16) out[9]; cx b[3],a[4]; rz(-pi/16) a[4]; cx a[4],out[9]; rz(pi/16) out[9]; cx a[4],out[9]; rz(-pi/16) out[9]; cx b[3],a[4]; rz(pi/16) a[4]; cx a[4],out[9]; rz(-pi/16) out[9]; cx a[4],out[9]; rz(pi/16) out[9]; rz(pi/32) b[3]; cx b[3],out[10]; rz(-pi/32) out[10]; cx b[3],out[10]; rz(pi/32) out[10]; cx b[3],a[4]; rz(-pi/32) a[4]; cx a[4],out[10]; rz(pi/32) out[10]; cx a[4],out[10]; rz(-pi/32) out[10]; cx b[3],a[4]; rz(pi/32) a[4]; cx a[4],out[10]; rz(-pi/32) out[10]; cx a[4],out[10]; rz(pi/32) out[10]; rz(pi/64) b[3]; cx b[3],out[11]; rz(-pi/64) out[11]; cx b[3],out[11]; rz(pi/64) out[11]; cx b[3],a[4]; rz(-pi/64) a[4]; cx a[4],out[11]; rz(pi/64) out[11]; cx a[4],out[11]; rz(-pi/64) out[11]; cx b[3],a[4]; rz(pi/64) a[4]; cx a[4],out[11]; rz(-pi/64) out[11]; cx a[4],out[11]; rz(pi/64) out[11]; rz(pi/128) b[3]; cx b[3],out[12]; rz(-pi/128) out[12]; cx b[3],out[12]; rz(pi/128) out[12]; cx b[3],a[4]; rz(-pi/128) a[4]; cx a[4],out[12]; rz(pi/128) out[12]; cx a[4],out[12]; rz(-pi/128) out[12]; cx b[3],a[4]; rz(pi/128) a[4]; cx a[4],out[12]; rz(-pi/128) out[12]; cx a[4],out[12]; rz(pi/128) out[12]; rz(pi/256) b[3]; cx b[3],out[13]; rz(-pi/256) out[13]; cx b[3],out[13]; rz(pi/256) out[13]; cx b[3],a[4]; rz(-pi/256) a[4]; cx a[4],out[13]; rz(pi/256) out[13]; cx a[4],out[13]; rz(-pi/256) out[13]; cx b[3],a[4]; rz(pi/256) a[4]; cx a[4],out[13]; rz(-pi/256) out[13]; cx a[4],out[13]; rz(pi/256) out[13]; rz(pi/512) b[3]; cx b[3],out[14]; rz(-pi/512) out[14]; cx b[3],out[14]; rz(pi/512) out[14]; cx b[3],a[4]; rz(-pi/512) a[4]; cx a[4],out[14]; rz(pi/512) out[14]; cx a[4],out[14]; rz(-pi/512) out[14]; cx b[3],a[4]; rz(pi/512) a[4]; cx a[4],out[14]; rz(-pi/512) out[14]; cx a[4],out[14]; rz(pi/512) out[14]; rz(pi/1024) b[3]; cx b[3],out[15]; rz(-pi/1024) out[15]; cx b[3],out[15]; rz(pi/1024) out[15]; cx b[3],a[4]; rz(-pi/1024) a[4]; cx a[4],out[15]; rz(pi/1024) out[15]; cx a[4],out[15]; rz(-pi/1024) out[15]; cx b[3],a[4]; rz(pi/1024) a[4]; cx a[4],out[15]; rz(-pi/1024) out[15]; cx a[4],out[15]; rz(pi/1024) out[15]; cx b[2],a[4]; rz(-16*pi) a[4]; cx a[4],out[0]; rz(16*pi) out[0]; cx a[4],out[0]; rz(-16*pi) out[0]; cx b[2],a[4]; rz(16*pi) a[4]; cx a[4],out[0]; rz(-16*pi) out[0]; cx a[4],out[0]; rz(16*pi) out[0]; cx b[1],out[0]; rz(-8*pi) out[0]; cx b[1],out[0]; rz(8*pi) out[0]; rz(8*pi) b[2]; cx b[2],out[1]; rz(-8*pi) out[1]; cx b[2],out[1]; rz(8*pi) out[1]; cx b[2],a[4]; rz(-8*pi) a[4]; cx a[4],out[1]; rz(8*pi) out[1]; cx a[4],out[1]; rz(-8*pi) out[1]; cx b[2],a[4]; rz(8*pi) a[4]; cx a[4],out[1]; rz(-8*pi) out[1]; cx a[4],out[1]; rz(8*pi) out[1]; rz(4*pi) b[2]; cx b[2],out[2]; rz(-4*pi) out[2]; cx b[2],out[2]; rz(4*pi) out[2]; cx b[2],a[4]; rz(-4*pi) a[4]; cx a[4],out[2]; rz(4*pi) out[2]; cx a[4],out[2]; rz(-4*pi) out[2]; cx b[2],a[4]; rz(4*pi) a[4]; cx a[4],out[2]; rz(-4*pi) out[2]; cx a[4],out[2]; rz(4*pi) out[2]; rz(2*pi) b[2]; cx b[2],out[3]; rz(-2*pi) out[3]; cx b[2],out[3]; rz(2*pi) out[3]; cx b[2],a[4]; rz(-2*pi) a[4]; cx a[4],out[3]; rz(2*pi) out[3]; cx a[4],out[3]; rz(-2*pi) out[3]; cx b[2],a[4]; rz(2*pi) a[4]; cx a[4],out[3]; rz(-2*pi) out[3]; cx a[4],out[3]; rz(2*pi) out[3]; rz(pi) b[2]; cx b[2],out[4]; rz(-pi) out[4]; cx b[2],out[4]; rz(pi) out[4]; cx b[2],a[4]; rz(-pi) a[4]; cx a[4],out[4]; rz(pi) out[4]; cx a[4],out[4]; rz(-pi) out[4]; cx b[2],a[4]; rz(pi) a[4]; cx a[4],out[4]; rz(-pi) out[4]; cx a[4],out[4]; rz(pi) out[4]; rz(pi/2) b[2]; cx b[2],out[5]; rz(-pi/2) out[5]; cx b[2],out[5]; rz(pi/2) out[5]; cx b[2],a[4]; rz(-pi/2) a[4]; cx a[4],out[5]; rz(pi/2) out[5]; cx a[4],out[5]; rz(-pi/2) out[5]; cx b[2],a[4]; rz(pi/2) a[4]; cx a[4],out[5]; rz(-pi/2) out[5]; cx a[4],out[5]; rz(pi/2) out[5]; rz(pi/4) b[2]; cx b[2],out[6]; rz(-pi/4) out[6]; cx b[2],out[6]; rz(pi/4) out[6]; cx b[2],a[4]; rz(-pi/4) a[4]; cx a[4],out[6]; rz(pi/4) out[6]; cx a[4],out[6]; rz(-pi/4) out[6]; cx b[2],a[4]; rz(pi/4) a[4]; cx a[4],out[6]; rz(-pi/4) out[6]; cx a[4],out[6]; rz(pi/4) out[6]; rz(pi/8) b[2]; cx b[2],out[7]; rz(-pi/8) out[7]; cx b[2],out[7]; rz(pi/8) out[7]; cx b[2],a[4]; rz(-pi/8) a[4]; cx a[4],out[7]; rz(pi/8) out[7]; cx a[4],out[7]; rz(-pi/8) out[7]; cx b[2],a[4]; rz(pi/8) a[4]; cx a[4],out[7]; rz(-pi/8) out[7]; cx a[4],out[7]; rz(pi/8) out[7]; rz(pi/16) b[2]; cx b[2],out[8]; rz(-pi/16) out[8]; cx b[2],out[8]; rz(pi/16) out[8]; cx b[2],a[4]; rz(-pi/16) a[4]; cx a[4],out[8]; rz(pi/16) out[8]; cx a[4],out[8]; rz(-pi/16) out[8]; cx b[2],a[4]; rz(pi/16) a[4]; cx a[4],out[8]; rz(-pi/16) out[8]; cx a[4],out[8]; rz(pi/16) out[8]; rz(pi/32) b[2]; cx b[2],out[9]; rz(-pi/32) out[9]; cx b[2],out[9]; rz(pi/32) out[9]; cx b[2],a[4]; rz(-pi/32) a[4]; cx a[4],out[9]; rz(pi/32) out[9]; cx a[4],out[9]; rz(-pi/32) out[9]; cx b[2],a[4]; rz(pi/32) a[4]; cx a[4],out[9]; rz(-pi/32) out[9]; cx a[4],out[9]; rz(pi/32) out[9]; rz(pi/64) b[2]; cx b[2],out[10]; rz(-pi/64) out[10]; cx b[2],out[10]; rz(pi/64) out[10]; cx b[2],a[4]; rz(-pi/64) a[4]; cx a[4],out[10]; rz(pi/64) out[10]; cx a[4],out[10]; rz(-pi/64) out[10]; cx b[2],a[4]; rz(pi/64) a[4]; cx a[4],out[10]; rz(-pi/64) out[10]; cx a[4],out[10]; rz(pi/64) out[10]; rz(pi/128) b[2]; cx b[2],out[11]; rz(-pi/128) out[11]; cx b[2],out[11]; rz(pi/128) out[11]; cx b[2],a[4]; rz(-pi/128) a[4]; cx a[4],out[11]; rz(pi/128) out[11]; cx a[4],out[11]; rz(-pi/128) out[11]; cx b[2],a[4]; rz(pi/128) a[4]; cx a[4],out[11]; rz(-pi/128) out[11]; cx a[4],out[11]; rz(pi/128) out[11]; rz(pi/256) b[2]; cx b[2],out[12]; rz(-pi/256) out[12]; cx b[2],out[12]; rz(pi/256) out[12]; cx b[2],a[4]; rz(-pi/256) a[4]; cx a[4],out[12]; rz(pi/256) out[12]; cx a[4],out[12]; rz(-pi/256) out[12]; cx b[2],a[4]; rz(pi/256) a[4]; cx a[4],out[12]; rz(-pi/256) out[12]; cx a[4],out[12]; rz(pi/256) out[12]; rz(pi/512) b[2]; cx b[2],out[13]; rz(-pi/512) out[13]; cx b[2],out[13]; rz(pi/512) out[13]; cx b[2],a[4]; rz(-pi/512) a[4]; cx a[4],out[13]; rz(pi/512) out[13]; cx a[4],out[13]; rz(-pi/512) out[13]; cx b[2],a[4]; rz(pi/512) a[4]; cx a[4],out[13]; rz(-pi/512) out[13]; cx a[4],out[13]; rz(pi/512) out[13]; rz(pi/1024) b[2]; cx b[2],out[14]; rz(-pi/1024) out[14]; cx b[2],out[14]; rz(pi/1024) out[14]; cx b[2],a[4]; rz(-pi/1024) a[4]; cx a[4],out[14]; rz(pi/1024) out[14]; cx a[4],out[14]; rz(-pi/1024) out[14]; cx b[2],a[4]; rz(pi/1024) a[4]; cx a[4],out[14]; rz(-pi/1024) out[14]; cx a[4],out[14]; rz(pi/1024) out[14]; rz(pi/2048) b[2]; cx b[2],out[15]; rz(-pi/2048) out[15]; cx b[2],out[15]; rz(pi/2048) out[15]; cx b[2],a[4]; rz(-pi/2048) a[4]; cx a[4],out[15]; rz(pi/2048) out[15]; cx a[4],out[15]; rz(-pi/2048) out[15]; cx b[2],a[4]; rz(pi/2048) a[4]; cx a[4],out[15]; rz(-pi/2048) out[15]; cx a[4],out[15]; rz(pi/2048) out[15]; cx b[1],a[4]; rz(-8*pi) a[4]; cx a[4],out[0]; rz(8*pi) out[0]; cx a[4],out[0]; rz(-8*pi) out[0]; cx b[1],a[4]; rz(8*pi) a[4]; cx a[4],out[0]; rz(-8*pi) out[0]; cx a[4],out[0]; rz(8*pi) out[0]; cx b[0],out[0]; rz(-4*pi) out[0]; cx b[0],out[0]; rz(4*pi) out[0]; rz(4*pi) b[1]; cx b[1],out[1]; rz(-4*pi) out[1]; cx b[1],out[1]; rz(4*pi) out[1]; cx b[1],a[4]; rz(-4*pi) a[4]; cx a[4],out[1]; rz(4*pi) out[1]; cx a[4],out[1]; rz(-4*pi) out[1]; cx b[1],a[4]; rz(4*pi) a[4]; cx a[4],out[1]; rz(-4*pi) out[1]; cx a[4],out[1]; rz(4*pi) out[1]; rz(2*pi) b[1]; cx b[1],out[2]; rz(-2*pi) out[2]; cx b[1],out[2]; rz(2*pi) out[2]; cx b[1],a[4]; rz(-2*pi) a[4]; cx a[4],out[2]; rz(2*pi) out[2]; cx a[4],out[2]; rz(-2*pi) out[2]; cx b[1],a[4]; rz(2*pi) a[4]; cx a[4],out[2]; rz(-2*pi) out[2]; cx a[4],out[2]; rz(2*pi) out[2]; rz(pi) b[1]; cx b[1],out[3]; rz(-pi) out[3]; cx b[1],out[3]; rz(pi) out[3]; cx b[1],a[4]; rz(-pi) a[4]; cx a[4],out[3]; rz(pi) out[3]; cx a[4],out[3]; rz(-pi) out[3]; cx b[1],a[4]; rz(pi) a[4]; cx a[4],out[3]; rz(-pi) out[3]; cx a[4],out[3]; rz(pi) out[3]; rz(pi/2) b[1]; cx b[1],out[4]; rz(-pi/2) out[4]; cx b[1],out[4]; rz(pi/2) out[4]; cx b[1],a[4]; rz(-pi/2) a[4]; cx a[4],out[4]; rz(pi/2) out[4]; cx a[4],out[4]; rz(-pi/2) out[4]; cx b[1],a[4]; rz(pi/2) a[4]; cx a[4],out[4]; rz(-pi/2) out[4]; cx a[4],out[4]; rz(pi/2) out[4]; rz(pi/4) b[1]; cx b[1],out[5]; rz(-pi/4) out[5]; cx b[1],out[5]; rz(pi/4) out[5]; cx b[1],a[4]; rz(-pi/4) a[4]; cx a[4],out[5]; rz(pi/4) out[5]; cx a[4],out[5]; rz(-pi/4) out[5]; cx b[1],a[4]; rz(pi/4) a[4]; cx a[4],out[5]; rz(-pi/4) out[5]; cx a[4],out[5]; rz(pi/4) out[5]; rz(pi/8) b[1]; cx b[1],out[6]; rz(-pi/8) out[6]; cx b[1],out[6]; rz(pi/8) out[6]; cx b[1],a[4]; rz(-pi/8) a[4]; cx a[4],out[6]; rz(pi/8) out[6]; cx a[4],out[6]; rz(-pi/8) out[6]; cx b[1],a[4]; rz(pi/8) a[4]; cx a[4],out[6]; rz(-pi/8) out[6]; cx a[4],out[6]; rz(pi/8) out[6]; rz(pi/16) b[1]; cx b[1],out[7]; rz(-pi/16) out[7]; cx b[1],out[7]; rz(pi/16) out[7]; cx b[1],a[4]; rz(-pi/16) a[4]; cx a[4],out[7]; rz(pi/16) out[7]; cx a[4],out[7]; rz(-pi/16) out[7]; cx b[1],a[4]; rz(pi/16) a[4]; cx a[4],out[7]; rz(-pi/16) out[7]; cx a[4],out[7]; rz(pi/16) out[7]; rz(pi/32) b[1]; cx b[1],out[8]; rz(-pi/32) out[8]; cx b[1],out[8]; rz(pi/32) out[8]; cx b[1],a[4]; rz(-pi/32) a[4]; cx a[4],out[8]; rz(pi/32) out[8]; cx a[4],out[8]; rz(-pi/32) out[8]; cx b[1],a[4]; rz(pi/32) a[4]; cx a[4],out[8]; rz(-pi/32) out[8]; cx a[4],out[8]; rz(pi/32) out[8]; rz(pi/64) b[1]; cx b[1],out[9]; rz(-pi/64) out[9]; cx b[1],out[9]; rz(pi/64) out[9]; cx b[1],a[4]; rz(-pi/64) a[4]; cx a[4],out[9]; rz(pi/64) out[9]; cx a[4],out[9]; rz(-pi/64) out[9]; cx b[1],a[4]; rz(pi/64) a[4]; cx a[4],out[9]; rz(-pi/64) out[9]; cx a[4],out[9]; rz(pi/64) out[9]; rz(pi/128) b[1]; cx b[1],out[10]; rz(-pi/128) out[10]; cx b[1],out[10]; rz(pi/128) out[10]; cx b[1],a[4]; rz(-pi/128) a[4]; cx a[4],out[10]; rz(pi/128) out[10]; cx a[4],out[10]; rz(-pi/128) out[10]; cx b[1],a[4]; rz(pi/128) a[4]; cx a[4],out[10]; rz(-pi/128) out[10]; cx a[4],out[10]; rz(pi/128) out[10]; rz(pi/256) b[1]; cx b[1],out[11]; rz(-pi/256) out[11]; cx b[1],out[11]; rz(pi/256) out[11]; cx b[1],a[4]; rz(-pi/256) a[4]; cx a[4],out[11]; rz(pi/256) out[11]; cx a[4],out[11]; rz(-pi/256) out[11]; cx b[1],a[4]; rz(pi/256) a[4]; cx a[4],out[11]; rz(-pi/256) out[11]; cx a[4],out[11]; rz(pi/256) out[11]; rz(pi/512) b[1]; cx b[1],out[12]; rz(-pi/512) out[12]; cx b[1],out[12]; rz(pi/512) out[12]; cx b[1],a[4]; rz(-pi/512) a[4]; cx a[4],out[12]; rz(pi/512) out[12]; cx a[4],out[12]; rz(-pi/512) out[12]; cx b[1],a[4]; rz(pi/512) a[4]; cx a[4],out[12]; rz(-pi/512) out[12]; cx a[4],out[12]; rz(pi/512) out[12]; rz(pi/1024) b[1]; cx b[1],out[13]; rz(-pi/1024) out[13]; cx b[1],out[13]; rz(pi/1024) out[13]; cx b[1],a[4]; rz(-pi/1024) a[4]; cx a[4],out[13]; rz(pi/1024) out[13]; cx a[4],out[13]; rz(-pi/1024) out[13]; cx b[1],a[4]; rz(pi/1024) a[4]; cx a[4],out[13]; rz(-pi/1024) out[13]; cx a[4],out[13]; rz(pi/1024) out[13]; rz(pi/2048) b[1]; cx b[1],out[14]; rz(-pi/2048) out[14]; cx b[1],out[14]; rz(pi/2048) out[14]; cx b[1],a[4]; rz(-pi/2048) a[4]; cx a[4],out[14]; rz(pi/2048) out[14]; cx a[4],out[14]; rz(-pi/2048) out[14]; cx b[1],a[4]; rz(pi/2048) a[4]; cx a[4],out[14]; rz(-pi/2048) out[14]; cx a[4],out[14]; rz(pi/2048) out[14]; rz(pi/4096) b[1]; cx b[1],out[15]; rz(-pi/4096) out[15]; cx b[1],out[15]; rz(pi/4096) out[15]; cx b[1],a[4]; rz(-pi/4096) a[4]; cx a[4],out[15]; rz(pi/4096) out[15]; cx a[4],out[15]; rz(-pi/4096) out[15]; cx b[1],a[4]; rz(pi/4096) a[4]; cx a[4],out[15]; rz(-pi/4096) out[15]; cx a[4],out[15]; rz(pi/4096) out[15]; cx b[0],a[4]; rz(-4*pi) a[4]; cx a[4],out[0]; rz(4*pi) out[0]; cx a[4],out[0]; rz(-4*pi) out[0]; cx b[0],a[4]; rz(4*pi) a[4]; cx a[4],out[0]; rz(-4*pi) out[0]; cx a[4],out[0]; rz(4*pi) out[0]; rz(2*pi) b[0]; cx b[0],out[1]; rz(-2*pi) out[1]; cx b[0],out[1]; rz(2*pi) out[1]; cx b[0],a[4]; rz(-2*pi) a[4]; cx a[4],out[1]; rz(2*pi) out[1]; cx a[4],out[1]; rz(-2*pi) out[1]; cx b[0],a[4]; rz(2*pi) a[4]; cx a[4],out[1]; rz(-2*pi) out[1]; cx a[4],out[1]; rz(2*pi) out[1]; rz(pi) b[0]; cx b[0],out[2]; rz(-pi) out[2]; cx b[0],out[2]; rz(pi) out[2]; cx b[0],a[4]; rz(-pi) a[4]; cx a[4],out[2]; rz(pi) out[2]; cx a[4],out[2]; rz(-pi) out[2]; cx b[0],a[4]; rz(pi) a[4]; cx a[4],out[2]; rz(-pi) out[2]; cx a[4],out[2]; rz(pi) out[2]; rz(pi/2) b[0]; cx b[0],out[3]; rz(-pi/2) out[3]; cx b[0],out[3]; rz(pi/2) out[3]; cx b[0],a[4]; rz(-pi/2) a[4]; cx a[4],out[3]; rz(pi/2) out[3]; cx a[4],out[3]; rz(-pi/2) out[3]; cx b[0],a[4]; rz(pi/2) a[4]; cx a[4],out[3]; rz(-pi/2) out[3]; cx a[4],out[3]; rz(pi/2) out[3]; rz(pi/4) b[0]; cx b[0],out[4]; rz(-pi/4) out[4]; cx b[0],out[4]; rz(pi/4) out[4]; cx b[0],a[4]; rz(-pi/4) a[4]; cx a[4],out[4]; rz(pi/4) out[4]; cx a[4],out[4]; rz(-pi/4) out[4]; cx b[0],a[4]; rz(pi/4) a[4]; cx a[4],out[4]; rz(-pi/4) out[4]; cx a[4],out[4]; rz(pi/4) out[4]; rz(pi/8) b[0]; cx b[0],out[5]; rz(-pi/8) out[5]; cx b[0],out[5]; rz(pi/8) out[5]; cx b[0],a[4]; rz(-pi/8) a[4]; cx a[4],out[5]; rz(pi/8) out[5]; cx a[4],out[5]; rz(-pi/8) out[5]; cx b[0],a[4]; rz(pi/8) a[4]; cx a[4],out[5]; rz(-pi/8) out[5]; cx a[4],out[5]; rz(pi/8) out[5]; rz(pi/16) b[0]; cx b[0],out[6]; rz(-pi/16) out[6]; cx b[0],out[6]; rz(pi/16) out[6]; cx b[0],a[4]; rz(-pi/16) a[4]; cx a[4],out[6]; rz(pi/16) out[6]; cx a[4],out[6]; rz(-pi/16) out[6]; cx b[0],a[4]; rz(pi/16) a[4]; cx a[4],out[6]; rz(-pi/16) out[6]; cx a[4],out[6]; rz(pi/16) out[6]; rz(pi/32) b[0]; cx b[0],out[7]; rz(-pi/32) out[7]; cx b[0],out[7]; rz(pi/32) out[7]; cx b[0],a[4]; rz(-pi/32) a[4]; cx a[4],out[7]; rz(pi/32) out[7]; cx a[4],out[7]; rz(-pi/32) out[7]; cx b[0],a[4]; rz(pi/32) a[4]; cx a[4],out[7]; rz(-pi/32) out[7]; cx a[4],out[7]; rz(pi/32) out[7]; rz(pi/64) b[0]; cx b[0],out[8]; rz(-pi/64) out[8]; cx b[0],out[8]; rz(pi/64) out[8]; cx b[0],a[4]; rz(-pi/64) a[4]; cx a[4],out[8]; rz(pi/64) out[8]; cx a[4],out[8]; rz(-pi/64) out[8]; cx b[0],a[4]; rz(pi/64) a[4]; cx a[4],out[8]; rz(-pi/64) out[8]; cx a[4],out[8]; rz(pi/64) out[8]; rz(pi/128) b[0]; cx b[0],out[9]; rz(-pi/128) out[9]; cx b[0],out[9]; rz(pi/128) out[9]; cx b[0],a[4]; rz(-pi/128) a[4]; cx a[4],out[9]; rz(pi/128) out[9]; cx a[4],out[9]; rz(-pi/128) out[9]; cx b[0],a[4]; rz(pi/128) a[4]; cx a[4],out[9]; rz(-pi/128) out[9]; cx a[4],out[9]; rz(pi/128) out[9]; rz(pi/256) b[0]; cx b[0],out[10]; rz(-pi/256) out[10]; cx b[0],out[10]; rz(pi/256) out[10]; cx b[0],a[4]; rz(-pi/256) a[4]; cx a[4],out[10]; rz(pi/256) out[10]; cx a[4],out[10]; rz(-pi/256) out[10]; cx b[0],a[4]; rz(pi/256) a[4]; cx a[4],out[10]; rz(-pi/256) out[10]; cx a[4],out[10]; rz(pi/256) out[10]; rz(pi/512) b[0]; cx b[0],out[11]; rz(-pi/512) out[11]; cx b[0],out[11]; rz(pi/512) out[11]; cx b[0],a[4]; rz(-pi/512) a[4]; cx a[4],out[11]; rz(pi/512) out[11]; cx a[4],out[11]; rz(-pi/512) out[11]; cx b[0],a[4]; rz(pi/512) a[4]; cx a[4],out[11]; rz(-pi/512) out[11]; cx a[4],out[11]; rz(pi/512) out[11]; rz(pi/1024) b[0]; cx b[0],out[12]; rz(-pi/1024) out[12]; cx b[0],out[12]; rz(pi/1024) out[12]; cx b[0],a[4]; rz(-pi/1024) a[4]; cx a[4],out[12]; rz(pi/1024) out[12]; cx a[4],out[12]; rz(-pi/1024) out[12]; cx b[0],a[4]; rz(pi/1024) a[4]; cx a[4],out[12]; rz(-pi/1024) out[12]; cx a[4],out[12]; rz(pi/1024) out[12]; rz(pi/2048) b[0]; cx b[0],out[13]; rz(-pi/2048) out[13]; cx b[0],out[13]; rz(pi/2048) out[13]; cx b[0],a[4]; rz(-pi/2048) a[4]; cx a[4],out[13]; rz(pi/2048) out[13]; cx a[4],out[13]; rz(-pi/2048) out[13]; cx b[0],a[4]; rz(pi/2048) a[4]; cx a[4],out[13]; rz(-pi/2048) out[13]; cx a[4],out[13]; rz(pi/2048) out[13]; rz(pi/4096) b[0]; cx b[0],out[14]; rz(-pi/4096) out[14]; cx b[0],out[14]; rz(pi/4096) out[14]; cx b[0],a[4]; rz(-pi/4096) a[4]; cx a[4],out[14]; rz(pi/4096) out[14]; cx a[4],out[14]; rz(-pi/4096) out[14]; cx b[0],a[4]; rz(pi/4096) a[4]; cx a[4],out[14]; rz(-pi/4096) out[14]; cx a[4],out[14]; rz(pi/4096) out[14]; rz(pi/8192) b[0]; cx b[0],out[15]; rz(-pi/8192) out[15]; cx b[0],out[15]; rz(pi/8192) out[15]; cx b[0],a[4]; rz(-pi/8192) a[4]; cx a[4],out[15]; rz(pi/8192) out[15]; cx a[4],out[15]; rz(-pi/8192) out[15]; cx b[0],a[4]; rz(pi/8192) a[4]; cx a[4],out[15]; rz(-pi/8192) out[15]; cx a[4],out[15]; rz(pi/8192) out[15]; rz(2*pi) b[0]; rz(4*pi) b[1]; rz(8*pi) b[2]; rz(16*pi) b[3]; rz(32*pi) b[4]; rz(64*pi) b[5]; rz(128*pi) b[6]; rz(256*pi) b[7]; cx b[7],out[0]; rz(-256*pi) out[0]; cx b[7],out[0]; rz(256*pi) out[0]; cx b[7],a[3]; rz(-256*pi) a[3]; cx a[3],out[0]; rz(256*pi) out[0]; cx a[3],out[0]; rz(-256*pi) out[0]; cx b[7],a[3]; rz(256*pi) a[3]; cx a[3],out[0]; rz(-256*pi) out[0]; cx a[3],out[0]; rz(256*pi) out[0]; cx b[6],out[0]; rz(-128*pi) out[0]; cx b[6],out[0]; rz(128*pi) out[0]; rz(128*pi) b[7]; cx b[7],out[1]; rz(-128*pi) out[1]; cx b[7],out[1]; rz(128*pi) out[1]; cx b[7],a[3]; rz(-128*pi) a[3]; cx a[3],out[1]; rz(128*pi) out[1]; cx a[3],out[1]; rz(-128*pi) out[1]; cx b[7],a[3]; rz(128*pi) a[3]; cx a[3],out[1]; rz(-128*pi) out[1]; cx a[3],out[1]; rz(128*pi) out[1]; rz(64*pi) b[7]; cx b[7],out[2]; rz(-64*pi) out[2]; cx b[7],out[2]; rz(64*pi) out[2]; cx b[7],a[3]; rz(-64*pi) a[3]; cx a[3],out[2]; rz(64*pi) out[2]; cx a[3],out[2]; rz(-64*pi) out[2]; cx b[7],a[3]; rz(64*pi) a[3]; cx a[3],out[2]; rz(-64*pi) out[2]; cx a[3],out[2]; rz(64*pi) out[2]; rz(32*pi) b[7]; cx b[7],out[3]; rz(-32*pi) out[3]; cx b[7],out[3]; rz(32*pi) out[3]; cx b[7],a[3]; rz(-32*pi) a[3]; cx a[3],out[3]; rz(32*pi) out[3]; cx a[3],out[3]; rz(-32*pi) out[3]; cx b[7],a[3]; rz(32*pi) a[3]; cx a[3],out[3]; rz(-32*pi) out[3]; cx a[3],out[3]; rz(32*pi) out[3]; rz(16*pi) b[7]; cx b[7],out[4]; rz(-16*pi) out[4]; cx b[7],out[4]; rz(16*pi) out[4]; cx b[7],a[3]; rz(-16*pi) a[3]; cx a[3],out[4]; rz(16*pi) out[4]; cx a[3],out[4]; rz(-16*pi) out[4]; cx b[7],a[3]; rz(16*pi) a[3]; cx a[3],out[4]; rz(-16*pi) out[4]; cx a[3],out[4]; rz(16*pi) out[4]; rz(8*pi) b[7]; cx b[7],out[5]; rz(-8*pi) out[5]; cx b[7],out[5]; rz(8*pi) out[5]; cx b[7],a[3]; rz(-8*pi) a[3]; cx a[3],out[5]; rz(8*pi) out[5]; cx a[3],out[5]; rz(-8*pi) out[5]; cx b[7],a[3]; rz(8*pi) a[3]; cx a[3],out[5]; rz(-8*pi) out[5]; cx a[3],out[5]; rz(8*pi) out[5]; rz(4*pi) b[7]; cx b[7],out[6]; rz(-4*pi) out[6]; cx b[7],out[6]; rz(4*pi) out[6]; cx b[7],a[3]; rz(-4*pi) a[3]; cx a[3],out[6]; rz(4*pi) out[6]; cx a[3],out[6]; rz(-4*pi) out[6]; cx b[7],a[3]; rz(4*pi) a[3]; cx a[3],out[6]; rz(-4*pi) out[6]; cx a[3],out[6]; rz(4*pi) out[6]; rz(2*pi) b[7]; cx b[7],out[7]; rz(-2*pi) out[7]; cx b[7],out[7]; rz(2*pi) out[7]; cx b[7],a[3]; rz(-2*pi) a[3]; cx a[3],out[7]; rz(2*pi) out[7]; cx a[3],out[7]; rz(-2*pi) out[7]; cx b[7],a[3]; rz(2*pi) a[3]; cx a[3],out[7]; rz(-2*pi) out[7]; cx a[3],out[7]; rz(2*pi) out[7]; rz(pi) b[7]; cx b[7],out[8]; rz(-pi) out[8]; cx b[7],out[8]; rz(pi) out[8]; cx b[7],a[3]; rz(-pi) a[3]; cx a[3],out[8]; rz(pi) out[8]; cx a[3],out[8]; rz(-pi) out[8]; cx b[7],a[3]; rz(pi) a[3]; cx a[3],out[8]; rz(-pi) out[8]; cx a[3],out[8]; rz(pi) out[8]; rz(pi/2) b[7]; cx b[7],out[9]; rz(-pi/2) out[9]; cx b[7],out[9]; rz(pi/2) out[9]; cx b[7],a[3]; rz(-pi/2) a[3]; cx a[3],out[9]; rz(pi/2) out[9]; cx a[3],out[9]; rz(-pi/2) out[9]; cx b[7],a[3]; rz(pi/2) a[3]; cx a[3],out[9]; rz(-pi/2) out[9]; cx a[3],out[9]; rz(pi/2) out[9]; rz(pi/4) b[7]; cx b[7],out[10]; rz(-pi/4) out[10]; cx b[7],out[10]; rz(pi/4) out[10]; cx b[7],a[3]; rz(-pi/4) a[3]; cx a[3],out[10]; rz(pi/4) out[10]; cx a[3],out[10]; rz(-pi/4) out[10]; cx b[7],a[3]; rz(pi/4) a[3]; cx a[3],out[10]; rz(-pi/4) out[10]; cx a[3],out[10]; rz(pi/4) out[10]; rz(pi/8) b[7]; cx b[7],out[11]; rz(-pi/8) out[11]; cx b[7],out[11]; rz(pi/8) out[11]; cx b[7],a[3]; rz(-pi/8) a[3]; cx a[3],out[11]; rz(pi/8) out[11]; cx a[3],out[11]; rz(-pi/8) out[11]; cx b[7],a[3]; rz(pi/8) a[3]; cx a[3],out[11]; rz(-pi/8) out[11]; cx a[3],out[11]; rz(pi/8) out[11]; rz(pi/16) b[7]; cx b[7],out[12]; rz(-pi/16) out[12]; cx b[7],out[12]; rz(pi/16) out[12]; cx b[7],a[3]; rz(-pi/16) a[3]; cx a[3],out[12]; rz(pi/16) out[12]; cx a[3],out[12]; rz(-pi/16) out[12]; cx b[7],a[3]; rz(pi/16) a[3]; cx a[3],out[12]; rz(-pi/16) out[12]; cx a[3],out[12]; rz(pi/16) out[12]; rz(pi/32) b[7]; cx b[7],out[13]; rz(-pi/32) out[13]; cx b[7],out[13]; rz(pi/32) out[13]; cx b[7],a[3]; rz(-pi/32) a[3]; cx a[3],out[13]; rz(pi/32) out[13]; cx a[3],out[13]; rz(-pi/32) out[13]; cx b[7],a[3]; rz(pi/32) a[3]; cx a[3],out[13]; rz(-pi/32) out[13]; cx a[3],out[13]; rz(pi/32) out[13]; rz(pi/64) b[7]; cx b[7],out[14]; rz(-pi/64) out[14]; cx b[7],out[14]; rz(pi/64) out[14]; cx b[7],a[3]; rz(-pi/64) a[3]; cx a[3],out[14]; rz(pi/64) out[14]; cx a[3],out[14]; rz(-pi/64) out[14]; cx b[7],a[3]; rz(pi/64) a[3]; cx a[3],out[14]; rz(-pi/64) out[14]; cx a[3],out[14]; rz(pi/64) out[14]; rz(pi/128) b[7]; cx b[7],out[15]; rz(-pi/128) out[15]; cx b[7],out[15]; rz(pi/128) out[15]; cx b[7],a[3]; rz(-pi/128) a[3]; cx a[3],out[15]; rz(pi/128) out[15]; cx a[3],out[15]; rz(-pi/128) out[15]; cx b[7],a[3]; rz(pi/128) a[3]; cx a[3],out[15]; rz(-pi/128) out[15]; cx a[3],out[15]; rz(pi/128) out[15]; cx b[6],a[3]; rz(-128*pi) a[3]; cx a[3],out[0]; rz(128*pi) out[0]; cx a[3],out[0]; rz(-128*pi) out[0]; cx b[6],a[3]; rz(128*pi) a[3]; cx a[3],out[0]; rz(-128*pi) out[0]; cx a[3],out[0]; rz(128*pi) out[0]; cx b[5],out[0]; rz(-64*pi) out[0]; cx b[5],out[0]; rz(64*pi) out[0]; rz(64*pi) b[6]; cx b[6],out[1]; rz(-64*pi) out[1]; cx b[6],out[1]; rz(64*pi) out[1]; cx b[6],a[3]; rz(-64*pi) a[3]; cx a[3],out[1]; rz(64*pi) out[1]; cx a[3],out[1]; rz(-64*pi) out[1]; cx b[6],a[3]; rz(64*pi) a[3]; cx a[3],out[1]; rz(-64*pi) out[1]; cx a[3],out[1]; rz(64*pi) out[1]; rz(32*pi) b[6]; cx b[6],out[2]; rz(-32*pi) out[2]; cx b[6],out[2]; rz(32*pi) out[2]; cx b[6],a[3]; rz(-32*pi) a[3]; cx a[3],out[2]; rz(32*pi) out[2]; cx a[3],out[2]; rz(-32*pi) out[2]; cx b[6],a[3]; rz(32*pi) a[3]; cx a[3],out[2]; rz(-32*pi) out[2]; cx a[3],out[2]; rz(32*pi) out[2]; rz(16*pi) b[6]; cx b[6],out[3]; rz(-16*pi) out[3]; cx b[6],out[3]; rz(16*pi) out[3]; cx b[6],a[3]; rz(-16*pi) a[3]; cx a[3],out[3]; rz(16*pi) out[3]; cx a[3],out[3]; rz(-16*pi) out[3]; cx b[6],a[3]; rz(16*pi) a[3]; cx a[3],out[3]; rz(-16*pi) out[3]; cx a[3],out[3]; rz(16*pi) out[3]; rz(8*pi) b[6]; cx b[6],out[4]; rz(-8*pi) out[4]; cx b[6],out[4]; rz(8*pi) out[4]; cx b[6],a[3]; rz(-8*pi) a[3]; cx a[3],out[4]; rz(8*pi) out[4]; cx a[3],out[4]; rz(-8*pi) out[4]; cx b[6],a[3]; rz(8*pi) a[3]; cx a[3],out[4]; rz(-8*pi) out[4]; cx a[3],out[4]; rz(8*pi) out[4]; rz(4*pi) b[6]; cx b[6],out[5]; rz(-4*pi) out[5]; cx b[6],out[5]; rz(4*pi) out[5]; cx b[6],a[3]; rz(-4*pi) a[3]; cx a[3],out[5]; rz(4*pi) out[5]; cx a[3],out[5]; rz(-4*pi) out[5]; cx b[6],a[3]; rz(4*pi) a[3]; cx a[3],out[5]; rz(-4*pi) out[5]; cx a[3],out[5]; rz(4*pi) out[5]; rz(2*pi) b[6]; cx b[6],out[6]; rz(-2*pi) out[6]; cx b[6],out[6]; rz(2*pi) out[6]; cx b[6],a[3]; rz(-2*pi) a[3]; cx a[3],out[6]; rz(2*pi) out[6]; cx a[3],out[6]; rz(-2*pi) out[6]; cx b[6],a[3]; rz(2*pi) a[3]; cx a[3],out[6]; rz(-2*pi) out[6]; cx a[3],out[6]; rz(2*pi) out[6]; rz(pi) b[6]; cx b[6],out[7]; rz(-pi) out[7]; cx b[6],out[7]; rz(pi) out[7]; cx b[6],a[3]; rz(-pi) a[3]; cx a[3],out[7]; rz(pi) out[7]; cx a[3],out[7]; rz(-pi) out[7]; cx b[6],a[3]; rz(pi) a[3]; cx a[3],out[7]; rz(-pi) out[7]; cx a[3],out[7]; rz(pi) out[7]; rz(pi/2) b[6]; cx b[6],out[8]; rz(-pi/2) out[8]; cx b[6],out[8]; rz(pi/2) out[8]; cx b[6],a[3]; rz(-pi/2) a[3]; cx a[3],out[8]; rz(pi/2) out[8]; cx a[3],out[8]; rz(-pi/2) out[8]; cx b[6],a[3]; rz(pi/2) a[3]; cx a[3],out[8]; rz(-pi/2) out[8]; cx a[3],out[8]; rz(pi/2) out[8]; rz(pi/4) b[6]; cx b[6],out[9]; rz(-pi/4) out[9]; cx b[6],out[9]; rz(pi/4) out[9]; cx b[6],a[3]; rz(-pi/4) a[3]; cx a[3],out[9]; rz(pi/4) out[9]; cx a[3],out[9]; rz(-pi/4) out[9]; cx b[6],a[3]; rz(pi/4) a[3]; cx a[3],out[9]; rz(-pi/4) out[9]; cx a[3],out[9]; rz(pi/4) out[9]; rz(pi/8) b[6]; cx b[6],out[10]; rz(-pi/8) out[10]; cx b[6],out[10]; rz(pi/8) out[10]; cx b[6],a[3]; rz(-pi/8) a[3]; cx a[3],out[10]; rz(pi/8) out[10]; cx a[3],out[10]; rz(-pi/8) out[10]; cx b[6],a[3]; rz(pi/8) a[3]; cx a[3],out[10]; rz(-pi/8) out[10]; cx a[3],out[10]; rz(pi/8) out[10]; rz(pi/16) b[6]; cx b[6],out[11]; rz(-pi/16) out[11]; cx b[6],out[11]; rz(pi/16) out[11]; cx b[6],a[3]; rz(-pi/16) a[3]; cx a[3],out[11]; rz(pi/16) out[11]; cx a[3],out[11]; rz(-pi/16) out[11]; cx b[6],a[3]; rz(pi/16) a[3]; cx a[3],out[11]; rz(-pi/16) out[11]; cx a[3],out[11]; rz(pi/16) out[11]; rz(pi/32) b[6]; cx b[6],out[12]; rz(-pi/32) out[12]; cx b[6],out[12]; rz(pi/32) out[12]; cx b[6],a[3]; rz(-pi/32) a[3]; cx a[3],out[12]; rz(pi/32) out[12]; cx a[3],out[12]; rz(-pi/32) out[12]; cx b[6],a[3]; rz(pi/32) a[3]; cx a[3],out[12]; rz(-pi/32) out[12]; cx a[3],out[12]; rz(pi/32) out[12]; rz(pi/64) b[6]; cx b[6],out[13]; rz(-pi/64) out[13]; cx b[6],out[13]; rz(pi/64) out[13]; cx b[6],a[3]; rz(-pi/64) a[3]; cx a[3],out[13]; rz(pi/64) out[13]; cx a[3],out[13]; rz(-pi/64) out[13]; cx b[6],a[3]; rz(pi/64) a[3]; cx a[3],out[13]; rz(-pi/64) out[13]; cx a[3],out[13]; rz(pi/64) out[13]; rz(pi/128) b[6]; cx b[6],out[14]; rz(-pi/128) out[14]; cx b[6],out[14]; rz(pi/128) out[14]; cx b[6],a[3]; rz(-pi/128) a[3]; cx a[3],out[14]; rz(pi/128) out[14]; cx a[3],out[14]; rz(-pi/128) out[14]; cx b[6],a[3]; rz(pi/128) a[3]; cx a[3],out[14]; rz(-pi/128) out[14]; cx a[3],out[14]; rz(pi/128) out[14]; rz(pi/256) b[6]; cx b[6],out[15]; rz(-pi/256) out[15]; cx b[6],out[15]; rz(pi/256) out[15]; cx b[6],a[3]; rz(-pi/256) a[3]; cx a[3],out[15]; rz(pi/256) out[15]; cx a[3],out[15]; rz(-pi/256) out[15]; cx b[6],a[3]; rz(pi/256) a[3]; cx a[3],out[15]; rz(-pi/256) out[15]; cx a[3],out[15]; rz(pi/256) out[15]; cx b[5],a[3]; rz(-64*pi) a[3]; cx a[3],out[0]; rz(64*pi) out[0]; cx a[3],out[0]; rz(-64*pi) out[0]; cx b[5],a[3]; rz(64*pi) a[3]; cx a[3],out[0]; rz(-64*pi) out[0]; cx a[3],out[0]; rz(64*pi) out[0]; cx b[4],out[0]; rz(-32*pi) out[0]; cx b[4],out[0]; rz(32*pi) out[0]; rz(32*pi) b[5]; cx b[5],out[1]; rz(-32*pi) out[1]; cx b[5],out[1]; rz(32*pi) out[1]; cx b[5],a[3]; rz(-32*pi) a[3]; cx a[3],out[1]; rz(32*pi) out[1]; cx a[3],out[1]; rz(-32*pi) out[1]; cx b[5],a[3]; rz(32*pi) a[3]; cx a[3],out[1]; rz(-32*pi) out[1]; cx a[3],out[1]; rz(32*pi) out[1]; rz(16*pi) b[5]; cx b[5],out[2]; rz(-16*pi) out[2]; cx b[5],out[2]; rz(16*pi) out[2]; cx b[5],a[3]; rz(-16*pi) a[3]; cx a[3],out[2]; rz(16*pi) out[2]; cx a[3],out[2]; rz(-16*pi) out[2]; cx b[5],a[3]; rz(16*pi) a[3]; cx a[3],out[2]; rz(-16*pi) out[2]; cx a[3],out[2]; rz(16*pi) out[2]; rz(8*pi) b[5]; cx b[5],out[3]; rz(-8*pi) out[3]; cx b[5],out[3]; rz(8*pi) out[3]; cx b[5],a[3]; rz(-8*pi) a[3]; cx a[3],out[3]; rz(8*pi) out[3]; cx a[3],out[3]; rz(-8*pi) out[3]; cx b[5],a[3]; rz(8*pi) a[3]; cx a[3],out[3]; rz(-8*pi) out[3]; cx a[3],out[3]; rz(8*pi) out[3]; rz(4*pi) b[5]; cx b[5],out[4]; rz(-4*pi) out[4]; cx b[5],out[4]; rz(4*pi) out[4]; cx b[5],a[3]; rz(-4*pi) a[3]; cx a[3],out[4]; rz(4*pi) out[4]; cx a[3],out[4]; rz(-4*pi) out[4]; cx b[5],a[3]; rz(4*pi) a[3]; cx a[3],out[4]; rz(-4*pi) out[4]; cx a[3],out[4]; rz(4*pi) out[4]; rz(2*pi) b[5]; cx b[5],out[5]; rz(-2*pi) out[5]; cx b[5],out[5]; rz(2*pi) out[5]; cx b[5],a[3]; rz(-2*pi) a[3]; cx a[3],out[5]; rz(2*pi) out[5]; cx a[3],out[5]; rz(-2*pi) out[5]; cx b[5],a[3]; rz(2*pi) a[3]; cx a[3],out[5]; rz(-2*pi) out[5]; cx a[3],out[5]; rz(2*pi) out[5]; rz(pi) b[5]; cx b[5],out[6]; rz(-pi) out[6]; cx b[5],out[6]; rz(pi) out[6]; cx b[5],a[3]; rz(-pi) a[3]; cx a[3],out[6]; rz(pi) out[6]; cx a[3],out[6]; rz(-pi) out[6]; cx b[5],a[3]; rz(pi) a[3]; cx a[3],out[6]; rz(-pi) out[6]; cx a[3],out[6]; rz(pi) out[6]; rz(pi/2) b[5]; cx b[5],out[7]; rz(-pi/2) out[7]; cx b[5],out[7]; rz(pi/2) out[7]; cx b[5],a[3]; rz(-pi/2) a[3]; cx a[3],out[7]; rz(pi/2) out[7]; cx a[3],out[7]; rz(-pi/2) out[7]; cx b[5],a[3]; rz(pi/2) a[3]; cx a[3],out[7]; rz(-pi/2) out[7]; cx a[3],out[7]; rz(pi/2) out[7]; rz(pi/4) b[5]; cx b[5],out[8]; rz(-pi/4) out[8]; cx b[5],out[8]; rz(pi/4) out[8]; cx b[5],a[3]; rz(-pi/4) a[3]; cx a[3],out[8]; rz(pi/4) out[8]; cx a[3],out[8]; rz(-pi/4) out[8]; cx b[5],a[3]; rz(pi/4) a[3]; cx a[3],out[8]; rz(-pi/4) out[8]; cx a[3],out[8]; rz(pi/4) out[8]; rz(pi/8) b[5]; cx b[5],out[9]; rz(-pi/8) out[9]; cx b[5],out[9]; rz(pi/8) out[9]; cx b[5],a[3]; rz(-pi/8) a[3]; cx a[3],out[9]; rz(pi/8) out[9]; cx a[3],out[9]; rz(-pi/8) out[9]; cx b[5],a[3]; rz(pi/8) a[3]; cx a[3],out[9]; rz(-pi/8) out[9]; cx a[3],out[9]; rz(pi/8) out[9]; rz(pi/16) b[5]; cx b[5],out[10]; rz(-pi/16) out[10]; cx b[5],out[10]; rz(pi/16) out[10]; cx b[5],a[3]; rz(-pi/16) a[3]; cx a[3],out[10]; rz(pi/16) out[10]; cx a[3],out[10]; rz(-pi/16) out[10]; cx b[5],a[3]; rz(pi/16) a[3]; cx a[3],out[10]; rz(-pi/16) out[10]; cx a[3],out[10]; rz(pi/16) out[10]; rz(pi/32) b[5]; cx b[5],out[11]; rz(-pi/32) out[11]; cx b[5],out[11]; rz(pi/32) out[11]; cx b[5],a[3]; rz(-pi/32) a[3]; cx a[3],out[11]; rz(pi/32) out[11]; cx a[3],out[11]; rz(-pi/32) out[11]; cx b[5],a[3]; rz(pi/32) a[3]; cx a[3],out[11]; rz(-pi/32) out[11]; cx a[3],out[11]; rz(pi/32) out[11]; rz(pi/64) b[5]; cx b[5],out[12]; rz(-pi/64) out[12]; cx b[5],out[12]; rz(pi/64) out[12]; cx b[5],a[3]; rz(-pi/64) a[3]; cx a[3],out[12]; rz(pi/64) out[12]; cx a[3],out[12]; rz(-pi/64) out[12]; cx b[5],a[3]; rz(pi/64) a[3]; cx a[3],out[12]; rz(-pi/64) out[12]; cx a[3],out[12]; rz(pi/64) out[12]; rz(pi/128) b[5]; cx b[5],out[13]; rz(-pi/128) out[13]; cx b[5],out[13]; rz(pi/128) out[13]; cx b[5],a[3]; rz(-pi/128) a[3]; cx a[3],out[13]; rz(pi/128) out[13]; cx a[3],out[13]; rz(-pi/128) out[13]; cx b[5],a[3]; rz(pi/128) a[3]; cx a[3],out[13]; rz(-pi/128) out[13]; cx a[3],out[13]; rz(pi/128) out[13]; rz(pi/256) b[5]; cx b[5],out[14]; rz(-pi/256) out[14]; cx b[5],out[14]; rz(pi/256) out[14]; cx b[5],a[3]; rz(-pi/256) a[3]; cx a[3],out[14]; rz(pi/256) out[14]; cx a[3],out[14]; rz(-pi/256) out[14]; cx b[5],a[3]; rz(pi/256) a[3]; cx a[3],out[14]; rz(-pi/256) out[14]; cx a[3],out[14]; rz(pi/256) out[14]; rz(pi/512) b[5]; cx b[5],out[15]; rz(-pi/512) out[15]; cx b[5],out[15]; rz(pi/512) out[15]; cx b[5],a[3]; rz(-pi/512) a[3]; cx a[3],out[15]; rz(pi/512) out[15]; cx a[3],out[15]; rz(-pi/512) out[15]; cx b[5],a[3]; rz(pi/512) a[3]; cx a[3],out[15]; rz(-pi/512) out[15]; cx a[3],out[15]; rz(pi/512) out[15]; cx b[4],a[3]; rz(-32*pi) a[3]; cx a[3],out[0]; rz(32*pi) out[0]; cx a[3],out[0]; rz(-32*pi) out[0]; cx b[4],a[3]; rz(32*pi) a[3]; cx a[3],out[0]; rz(-32*pi) out[0]; cx a[3],out[0]; rz(32*pi) out[0]; cx b[3],out[0]; rz(-16*pi) out[0]; cx b[3],out[0]; rz(16*pi) out[0]; rz(16*pi) b[4]; cx b[4],out[1]; rz(-16*pi) out[1]; cx b[4],out[1]; rz(16*pi) out[1]; cx b[4],a[3]; rz(-16*pi) a[3]; cx a[3],out[1]; rz(16*pi) out[1]; cx a[3],out[1]; rz(-16*pi) out[1]; cx b[4],a[3]; rz(16*pi) a[3]; cx a[3],out[1]; rz(-16*pi) out[1]; cx a[3],out[1]; rz(16*pi) out[1]; rz(8*pi) b[4]; cx b[4],out[2]; rz(-8*pi) out[2]; cx b[4],out[2]; rz(8*pi) out[2]; cx b[4],a[3]; rz(-8*pi) a[3]; cx a[3],out[2]; rz(8*pi) out[2]; cx a[3],out[2]; rz(-8*pi) out[2]; cx b[4],a[3]; rz(8*pi) a[3]; cx a[3],out[2]; rz(-8*pi) out[2]; cx a[3],out[2]; rz(8*pi) out[2]; rz(4*pi) b[4]; cx b[4],out[3]; rz(-4*pi) out[3]; cx b[4],out[3]; rz(4*pi) out[3]; cx b[4],a[3]; rz(-4*pi) a[3]; cx a[3],out[3]; rz(4*pi) out[3]; cx a[3],out[3]; rz(-4*pi) out[3]; cx b[4],a[3]; rz(4*pi) a[3]; cx a[3],out[3]; rz(-4*pi) out[3]; cx a[3],out[3]; rz(4*pi) out[3]; rz(2*pi) b[4]; cx b[4],out[4]; rz(-2*pi) out[4]; cx b[4],out[4]; rz(2*pi) out[4]; cx b[4],a[3]; rz(-2*pi) a[3]; cx a[3],out[4]; rz(2*pi) out[4]; cx a[3],out[4]; rz(-2*pi) out[4]; cx b[4],a[3]; rz(2*pi) a[3]; cx a[3],out[4]; rz(-2*pi) out[4]; cx a[3],out[4]; rz(2*pi) out[4]; rz(pi) b[4]; cx b[4],out[5]; rz(-pi) out[5]; cx b[4],out[5]; rz(pi) out[5]; cx b[4],a[3]; rz(-pi) a[3]; cx a[3],out[5]; rz(pi) out[5]; cx a[3],out[5]; rz(-pi) out[5]; cx b[4],a[3]; rz(pi) a[3]; cx a[3],out[5]; rz(-pi) out[5]; cx a[3],out[5]; rz(pi) out[5]; rz(pi/2) b[4]; cx b[4],out[6]; rz(-pi/2) out[6]; cx b[4],out[6]; rz(pi/2) out[6]; cx b[4],a[3]; rz(-pi/2) a[3]; cx a[3],out[6]; rz(pi/2) out[6]; cx a[3],out[6]; rz(-pi/2) out[6]; cx b[4],a[3]; rz(pi/2) a[3]; cx a[3],out[6]; rz(-pi/2) out[6]; cx a[3],out[6]; rz(pi/2) out[6]; rz(pi/4) b[4]; cx b[4],out[7]; rz(-pi/4) out[7]; cx b[4],out[7]; rz(pi/4) out[7]; cx b[4],a[3]; rz(-pi/4) a[3]; cx a[3],out[7]; rz(pi/4) out[7]; cx a[3],out[7]; rz(-pi/4) out[7]; cx b[4],a[3]; rz(pi/4) a[3]; cx a[3],out[7]; rz(-pi/4) out[7]; cx a[3],out[7]; rz(pi/4) out[7]; rz(pi/8) b[4]; cx b[4],out[8]; rz(-pi/8) out[8]; cx b[4],out[8]; rz(pi/8) out[8]; cx b[4],a[3]; rz(-pi/8) a[3]; cx a[3],out[8]; rz(pi/8) out[8]; cx a[3],out[8]; rz(-pi/8) out[8]; cx b[4],a[3]; rz(pi/8) a[3]; cx a[3],out[8]; rz(-pi/8) out[8]; cx a[3],out[8]; rz(pi/8) out[8]; rz(pi/16) b[4]; cx b[4],out[9]; rz(-pi/16) out[9]; cx b[4],out[9]; rz(pi/16) out[9]; cx b[4],a[3]; rz(-pi/16) a[3]; cx a[3],out[9]; rz(pi/16) out[9]; cx a[3],out[9]; rz(-pi/16) out[9]; cx b[4],a[3]; rz(pi/16) a[3]; cx a[3],out[9]; rz(-pi/16) out[9]; cx a[3],out[9]; rz(pi/16) out[9]; rz(pi/32) b[4]; cx b[4],out[10]; rz(-pi/32) out[10]; cx b[4],out[10]; rz(pi/32) out[10]; cx b[4],a[3]; rz(-pi/32) a[3]; cx a[3],out[10]; rz(pi/32) out[10]; cx a[3],out[10]; rz(-pi/32) out[10]; cx b[4],a[3]; rz(pi/32) a[3]; cx a[3],out[10]; rz(-pi/32) out[10]; cx a[3],out[10]; rz(pi/32) out[10]; rz(pi/64) b[4]; cx b[4],out[11]; rz(-pi/64) out[11]; cx b[4],out[11]; rz(pi/64) out[11]; cx b[4],a[3]; rz(-pi/64) a[3]; cx a[3],out[11]; rz(pi/64) out[11]; cx a[3],out[11]; rz(-pi/64) out[11]; cx b[4],a[3]; rz(pi/64) a[3]; cx a[3],out[11]; rz(-pi/64) out[11]; cx a[3],out[11]; rz(pi/64) out[11]; rz(pi/128) b[4]; cx b[4],out[12]; rz(-pi/128) out[12]; cx b[4],out[12]; rz(pi/128) out[12]; cx b[4],a[3]; rz(-pi/128) a[3]; cx a[3],out[12]; rz(pi/128) out[12]; cx a[3],out[12]; rz(-pi/128) out[12]; cx b[4],a[3]; rz(pi/128) a[3]; cx a[3],out[12]; rz(-pi/128) out[12]; cx a[3],out[12]; rz(pi/128) out[12]; rz(pi/256) b[4]; cx b[4],out[13]; rz(-pi/256) out[13]; cx b[4],out[13]; rz(pi/256) out[13]; cx b[4],a[3]; rz(-pi/256) a[3]; cx a[3],out[13]; rz(pi/256) out[13]; cx a[3],out[13]; rz(-pi/256) out[13]; cx b[4],a[3]; rz(pi/256) a[3]; cx a[3],out[13]; rz(-pi/256) out[13]; cx a[3],out[13]; rz(pi/256) out[13]; rz(pi/512) b[4]; cx b[4],out[14]; rz(-pi/512) out[14]; cx b[4],out[14]; rz(pi/512) out[14]; cx b[4],a[3]; rz(-pi/512) a[3]; cx a[3],out[14]; rz(pi/512) out[14]; cx a[3],out[14]; rz(-pi/512) out[14]; cx b[4],a[3]; rz(pi/512) a[3]; cx a[3],out[14]; rz(-pi/512) out[14]; cx a[3],out[14]; rz(pi/512) out[14]; rz(pi/1024) b[4]; cx b[4],out[15]; rz(-pi/1024) out[15]; cx b[4],out[15]; rz(pi/1024) out[15]; cx b[4],a[3]; rz(-pi/1024) a[3]; cx a[3],out[15]; rz(pi/1024) out[15]; cx a[3],out[15]; rz(-pi/1024) out[15]; cx b[4],a[3]; rz(pi/1024) a[3]; cx a[3],out[15]; rz(-pi/1024) out[15]; cx a[3],out[15]; rz(pi/1024) out[15]; cx b[3],a[3]; rz(-16*pi) a[3]; cx a[3],out[0]; rz(16*pi) out[0]; cx a[3],out[0]; rz(-16*pi) out[0]; cx b[3],a[3]; rz(16*pi) a[3]; cx a[3],out[0]; rz(-16*pi) out[0]; cx a[3],out[0]; rz(16*pi) out[0]; cx b[2],out[0]; rz(-8*pi) out[0]; cx b[2],out[0]; rz(8*pi) out[0]; rz(8*pi) b[3]; cx b[3],out[1]; rz(-8*pi) out[1]; cx b[3],out[1]; rz(8*pi) out[1]; cx b[3],a[3]; rz(-8*pi) a[3]; cx a[3],out[1]; rz(8*pi) out[1]; cx a[3],out[1]; rz(-8*pi) out[1]; cx b[3],a[3]; rz(8*pi) a[3]; cx a[3],out[1]; rz(-8*pi) out[1]; cx a[3],out[1]; rz(8*pi) out[1]; rz(4*pi) b[3]; cx b[3],out[2]; rz(-4*pi) out[2]; cx b[3],out[2]; rz(4*pi) out[2]; cx b[3],a[3]; rz(-4*pi) a[3]; cx a[3],out[2]; rz(4*pi) out[2]; cx a[3],out[2]; rz(-4*pi) out[2]; cx b[3],a[3]; rz(4*pi) a[3]; cx a[3],out[2]; rz(-4*pi) out[2]; cx a[3],out[2]; rz(4*pi) out[2]; rz(2*pi) b[3]; cx b[3],out[3]; rz(-2*pi) out[3]; cx b[3],out[3]; rz(2*pi) out[3]; cx b[3],a[3]; rz(-2*pi) a[3]; cx a[3],out[3]; rz(2*pi) out[3]; cx a[3],out[3]; rz(-2*pi) out[3]; cx b[3],a[3]; rz(2*pi) a[3]; cx a[3],out[3]; rz(-2*pi) out[3]; cx a[3],out[3]; rz(2*pi) out[3]; rz(pi) b[3]; cx b[3],out[4]; rz(-pi) out[4]; cx b[3],out[4]; rz(pi) out[4]; cx b[3],a[3]; rz(-pi) a[3]; cx a[3],out[4]; rz(pi) out[4]; cx a[3],out[4]; rz(-pi) out[4]; cx b[3],a[3]; rz(pi) a[3]; cx a[3],out[4]; rz(-pi) out[4]; cx a[3],out[4]; rz(pi) out[4]; rz(pi/2) b[3]; cx b[3],out[5]; rz(-pi/2) out[5]; cx b[3],out[5]; rz(pi/2) out[5]; cx b[3],a[3]; rz(-pi/2) a[3]; cx a[3],out[5]; rz(pi/2) out[5]; cx a[3],out[5]; rz(-pi/2) out[5]; cx b[3],a[3]; rz(pi/2) a[3]; cx a[3],out[5]; rz(-pi/2) out[5]; cx a[3],out[5]; rz(pi/2) out[5]; rz(pi/4) b[3]; cx b[3],out[6]; rz(-pi/4) out[6]; cx b[3],out[6]; rz(pi/4) out[6]; cx b[3],a[3]; rz(-pi/4) a[3]; cx a[3],out[6]; rz(pi/4) out[6]; cx a[3],out[6]; rz(-pi/4) out[6]; cx b[3],a[3]; rz(pi/4) a[3]; cx a[3],out[6]; rz(-pi/4) out[6]; cx a[3],out[6]; rz(pi/4) out[6]; rz(pi/8) b[3]; cx b[3],out[7]; rz(-pi/8) out[7]; cx b[3],out[7]; rz(pi/8) out[7]; cx b[3],a[3]; rz(-pi/8) a[3]; cx a[3],out[7]; rz(pi/8) out[7]; cx a[3],out[7]; rz(-pi/8) out[7]; cx b[3],a[3]; rz(pi/8) a[3]; cx a[3],out[7]; rz(-pi/8) out[7]; cx a[3],out[7]; rz(pi/8) out[7]; rz(pi/16) b[3]; cx b[3],out[8]; rz(-pi/16) out[8]; cx b[3],out[8]; rz(pi/16) out[8]; cx b[3],a[3]; rz(-pi/16) a[3]; cx a[3],out[8]; rz(pi/16) out[8]; cx a[3],out[8]; rz(-pi/16) out[8]; cx b[3],a[3]; rz(pi/16) a[3]; cx a[3],out[8]; rz(-pi/16) out[8]; cx a[3],out[8]; rz(pi/16) out[8]; rz(pi/32) b[3]; cx b[3],out[9]; rz(-pi/32) out[9]; cx b[3],out[9]; rz(pi/32) out[9]; cx b[3],a[3]; rz(-pi/32) a[3]; cx a[3],out[9]; rz(pi/32) out[9]; cx a[3],out[9]; rz(-pi/32) out[9]; cx b[3],a[3]; rz(pi/32) a[3]; cx a[3],out[9]; rz(-pi/32) out[9]; cx a[3],out[9]; rz(pi/32) out[9]; rz(pi/64) b[3]; cx b[3],out[10]; rz(-pi/64) out[10]; cx b[3],out[10]; rz(pi/64) out[10]; cx b[3],a[3]; rz(-pi/64) a[3]; cx a[3],out[10]; rz(pi/64) out[10]; cx a[3],out[10]; rz(-pi/64) out[10]; cx b[3],a[3]; rz(pi/64) a[3]; cx a[3],out[10]; rz(-pi/64) out[10]; cx a[3],out[10]; rz(pi/64) out[10]; rz(pi/128) b[3]; cx b[3],out[11]; rz(-pi/128) out[11]; cx b[3],out[11]; rz(pi/128) out[11]; cx b[3],a[3]; rz(-pi/128) a[3]; cx a[3],out[11]; rz(pi/128) out[11]; cx a[3],out[11]; rz(-pi/128) out[11]; cx b[3],a[3]; rz(pi/128) a[3]; cx a[3],out[11]; rz(-pi/128) out[11]; cx a[3],out[11]; rz(pi/128) out[11]; rz(pi/256) b[3]; cx b[3],out[12]; rz(-pi/256) out[12]; cx b[3],out[12]; rz(pi/256) out[12]; cx b[3],a[3]; rz(-pi/256) a[3]; cx a[3],out[12]; rz(pi/256) out[12]; cx a[3],out[12]; rz(-pi/256) out[12]; cx b[3],a[3]; rz(pi/256) a[3]; cx a[3],out[12]; rz(-pi/256) out[12]; cx a[3],out[12]; rz(pi/256) out[12]; rz(pi/512) b[3]; cx b[3],out[13]; rz(-pi/512) out[13]; cx b[3],out[13]; rz(pi/512) out[13]; cx b[3],a[3]; rz(-pi/512) a[3]; cx a[3],out[13]; rz(pi/512) out[13]; cx a[3],out[13]; rz(-pi/512) out[13]; cx b[3],a[3]; rz(pi/512) a[3]; cx a[3],out[13]; rz(-pi/512) out[13]; cx a[3],out[13]; rz(pi/512) out[13]; rz(pi/1024) b[3]; cx b[3],out[14]; rz(-pi/1024) out[14]; cx b[3],out[14]; rz(pi/1024) out[14]; cx b[3],a[3]; rz(-pi/1024) a[3]; cx a[3],out[14]; rz(pi/1024) out[14]; cx a[3],out[14]; rz(-pi/1024) out[14]; cx b[3],a[3]; rz(pi/1024) a[3]; cx a[3],out[14]; rz(-pi/1024) out[14]; cx a[3],out[14]; rz(pi/1024) out[14]; rz(pi/2048) b[3]; cx b[3],out[15]; rz(-pi/2048) out[15]; cx b[3],out[15]; rz(pi/2048) out[15]; cx b[3],a[3]; rz(-pi/2048) a[3]; cx a[3],out[15]; rz(pi/2048) out[15]; cx a[3],out[15]; rz(-pi/2048) out[15]; cx b[3],a[3]; rz(pi/2048) a[3]; cx a[3],out[15]; rz(-pi/2048) out[15]; cx a[3],out[15]; rz(pi/2048) out[15]; cx b[2],a[3]; rz(-8*pi) a[3]; cx a[3],out[0]; rz(8*pi) out[0]; cx a[3],out[0]; rz(-8*pi) out[0]; cx b[2],a[3]; rz(8*pi) a[3]; cx a[3],out[0]; rz(-8*pi) out[0]; cx a[3],out[0]; rz(8*pi) out[0]; cx b[1],out[0]; rz(-4*pi) out[0]; cx b[1],out[0]; rz(4*pi) out[0]; rz(4*pi) b[2]; cx b[2],out[1]; rz(-4*pi) out[1]; cx b[2],out[1]; rz(4*pi) out[1]; cx b[2],a[3]; rz(-4*pi) a[3]; cx a[3],out[1]; rz(4*pi) out[1]; cx a[3],out[1]; rz(-4*pi) out[1]; cx b[2],a[3]; rz(4*pi) a[3]; cx a[3],out[1]; rz(-4*pi) out[1]; cx a[3],out[1]; rz(4*pi) out[1]; rz(2*pi) b[2]; cx b[2],out[2]; rz(-2*pi) out[2]; cx b[2],out[2]; rz(2*pi) out[2]; cx b[2],a[3]; rz(-2*pi) a[3]; cx a[3],out[2]; rz(2*pi) out[2]; cx a[3],out[2]; rz(-2*pi) out[2]; cx b[2],a[3]; rz(2*pi) a[3]; cx a[3],out[2]; rz(-2*pi) out[2]; cx a[3],out[2]; rz(2*pi) out[2]; rz(pi) b[2]; cx b[2],out[3]; rz(-pi) out[3]; cx b[2],out[3]; rz(pi) out[3]; cx b[2],a[3]; rz(-pi) a[3]; cx a[3],out[3]; rz(pi) out[3]; cx a[3],out[3]; rz(-pi) out[3]; cx b[2],a[3]; rz(pi) a[3]; cx a[3],out[3]; rz(-pi) out[3]; cx a[3],out[3]; rz(pi) out[3]; rz(pi/2) b[2]; cx b[2],out[4]; rz(-pi/2) out[4]; cx b[2],out[4]; rz(pi/2) out[4]; cx b[2],a[3]; rz(-pi/2) a[3]; cx a[3],out[4]; rz(pi/2) out[4]; cx a[3],out[4]; rz(-pi/2) out[4]; cx b[2],a[3]; rz(pi/2) a[3]; cx a[3],out[4]; rz(-pi/2) out[4]; cx a[3],out[4]; rz(pi/2) out[4]; rz(pi/4) b[2]; cx b[2],out[5]; rz(-pi/4) out[5]; cx b[2],out[5]; rz(pi/4) out[5]; cx b[2],a[3]; rz(-pi/4) a[3]; cx a[3],out[5]; rz(pi/4) out[5]; cx a[3],out[5]; rz(-pi/4) out[5]; cx b[2],a[3]; rz(pi/4) a[3]; cx a[3],out[5]; rz(-pi/4) out[5]; cx a[3],out[5]; rz(pi/4) out[5]; rz(pi/8) b[2]; cx b[2],out[6]; rz(-pi/8) out[6]; cx b[2],out[6]; rz(pi/8) out[6]; cx b[2],a[3]; rz(-pi/8) a[3]; cx a[3],out[6]; rz(pi/8) out[6]; cx a[3],out[6]; rz(-pi/8) out[6]; cx b[2],a[3]; rz(pi/8) a[3]; cx a[3],out[6]; rz(-pi/8) out[6]; cx a[3],out[6]; rz(pi/8) out[6]; rz(pi/16) b[2]; cx b[2],out[7]; rz(-pi/16) out[7]; cx b[2],out[7]; rz(pi/16) out[7]; cx b[2],a[3]; rz(-pi/16) a[3]; cx a[3],out[7]; rz(pi/16) out[7]; cx a[3],out[7]; rz(-pi/16) out[7]; cx b[2],a[3]; rz(pi/16) a[3]; cx a[3],out[7]; rz(-pi/16) out[7]; cx a[3],out[7]; rz(pi/16) out[7]; rz(pi/32) b[2]; cx b[2],out[8]; rz(-pi/32) out[8]; cx b[2],out[8]; rz(pi/32) out[8]; cx b[2],a[3]; rz(-pi/32) a[3]; cx a[3],out[8]; rz(pi/32) out[8]; cx a[3],out[8]; rz(-pi/32) out[8]; cx b[2],a[3]; rz(pi/32) a[3]; cx a[3],out[8]; rz(-pi/32) out[8]; cx a[3],out[8]; rz(pi/32) out[8]; rz(pi/64) b[2]; cx b[2],out[9]; rz(-pi/64) out[9]; cx b[2],out[9]; rz(pi/64) out[9]; cx b[2],a[3]; rz(-pi/64) a[3]; cx a[3],out[9]; rz(pi/64) out[9]; cx a[3],out[9]; rz(-pi/64) out[9]; cx b[2],a[3]; rz(pi/64) a[3]; cx a[3],out[9]; rz(-pi/64) out[9]; cx a[3],out[9]; rz(pi/64) out[9]; rz(pi/128) b[2]; cx b[2],out[10]; rz(-pi/128) out[10]; cx b[2],out[10]; rz(pi/128) out[10]; cx b[2],a[3]; rz(-pi/128) a[3]; cx a[3],out[10]; rz(pi/128) out[10]; cx a[3],out[10]; rz(-pi/128) out[10]; cx b[2],a[3]; rz(pi/128) a[3]; cx a[3],out[10]; rz(-pi/128) out[10]; cx a[3],out[10]; rz(pi/128) out[10]; rz(pi/256) b[2]; cx b[2],out[11]; rz(-pi/256) out[11]; cx b[2],out[11]; rz(pi/256) out[11]; cx b[2],a[3]; rz(-pi/256) a[3]; cx a[3],out[11]; rz(pi/256) out[11]; cx a[3],out[11]; rz(-pi/256) out[11]; cx b[2],a[3]; rz(pi/256) a[3]; cx a[3],out[11]; rz(-pi/256) out[11]; cx a[3],out[11]; rz(pi/256) out[11]; rz(pi/512) b[2]; cx b[2],out[12]; rz(-pi/512) out[12]; cx b[2],out[12]; rz(pi/512) out[12]; cx b[2],a[3]; rz(-pi/512) a[3]; cx a[3],out[12]; rz(pi/512) out[12]; cx a[3],out[12]; rz(-pi/512) out[12]; cx b[2],a[3]; rz(pi/512) a[3]; cx a[3],out[12]; rz(-pi/512) out[12]; cx a[3],out[12]; rz(pi/512) out[12]; rz(pi/1024) b[2]; cx b[2],out[13]; rz(-pi/1024) out[13]; cx b[2],out[13]; rz(pi/1024) out[13]; cx b[2],a[3]; rz(-pi/1024) a[3]; cx a[3],out[13]; rz(pi/1024) out[13]; cx a[3],out[13]; rz(-pi/1024) out[13]; cx b[2],a[3]; rz(pi/1024) a[3]; cx a[3],out[13]; rz(-pi/1024) out[13]; cx a[3],out[13]; rz(pi/1024) out[13]; rz(pi/2048) b[2]; cx b[2],out[14]; rz(-pi/2048) out[14]; cx b[2],out[14]; rz(pi/2048) out[14]; cx b[2],a[3]; rz(-pi/2048) a[3]; cx a[3],out[14]; rz(pi/2048) out[14]; cx a[3],out[14]; rz(-pi/2048) out[14]; cx b[2],a[3]; rz(pi/2048) a[3]; cx a[3],out[14]; rz(-pi/2048) out[14]; cx a[3],out[14]; rz(pi/2048) out[14]; rz(pi/4096) b[2]; cx b[2],out[15]; rz(-pi/4096) out[15]; cx b[2],out[15]; rz(pi/4096) out[15]; cx b[2],a[3]; rz(-pi/4096) a[3]; cx a[3],out[15]; rz(pi/4096) out[15]; cx a[3],out[15]; rz(-pi/4096) out[15]; cx b[2],a[3]; rz(pi/4096) a[3]; cx a[3],out[15]; rz(-pi/4096) out[15]; cx a[3],out[15]; rz(pi/4096) out[15]; cx b[1],a[3]; rz(-4*pi) a[3]; cx a[3],out[0]; rz(4*pi) out[0]; cx a[3],out[0]; rz(-4*pi) out[0]; cx b[1],a[3]; rz(4*pi) a[3]; cx a[3],out[0]; rz(-4*pi) out[0]; cx a[3],out[0]; rz(4*pi) out[0]; cx b[0],out[0]; rz(-2*pi) out[0]; cx b[0],out[0]; rz(2*pi) out[0]; rz(2*pi) b[1]; cx b[1],out[1]; rz(-2*pi) out[1]; cx b[1],out[1]; rz(2*pi) out[1]; cx b[1],a[3]; rz(-2*pi) a[3]; cx a[3],out[1]; rz(2*pi) out[1]; cx a[3],out[1]; rz(-2*pi) out[1]; cx b[1],a[3]; rz(2*pi) a[3]; cx a[3],out[1]; rz(-2*pi) out[1]; cx a[3],out[1]; rz(2*pi) out[1]; rz(pi) b[1]; cx b[1],out[2]; rz(-pi) out[2]; cx b[1],out[2]; rz(pi) out[2]; cx b[1],a[3]; rz(-pi) a[3]; cx a[3],out[2]; rz(pi) out[2]; cx a[3],out[2]; rz(-pi) out[2]; cx b[1],a[3]; rz(pi) a[3]; cx a[3],out[2]; rz(-pi) out[2]; cx a[3],out[2]; rz(pi) out[2]; rz(pi/2) b[1]; cx b[1],out[3]; rz(-pi/2) out[3]; cx b[1],out[3]; rz(pi/2) out[3]; cx b[1],a[3]; rz(-pi/2) a[3]; cx a[3],out[3]; rz(pi/2) out[3]; cx a[3],out[3]; rz(-pi/2) out[3]; cx b[1],a[3]; rz(pi/2) a[3]; cx a[3],out[3]; rz(-pi/2) out[3]; cx a[3],out[3]; rz(pi/2) out[3]; rz(pi/4) b[1]; cx b[1],out[4]; rz(-pi/4) out[4]; cx b[1],out[4]; rz(pi/4) out[4]; cx b[1],a[3]; rz(-pi/4) a[3]; cx a[3],out[4]; rz(pi/4) out[4]; cx a[3],out[4]; rz(-pi/4) out[4]; cx b[1],a[3]; rz(pi/4) a[3]; cx a[3],out[4]; rz(-pi/4) out[4]; cx a[3],out[4]; rz(pi/4) out[4]; rz(pi/8) b[1]; cx b[1],out[5]; rz(-pi/8) out[5]; cx b[1],out[5]; rz(pi/8) out[5]; cx b[1],a[3]; rz(-pi/8) a[3]; cx a[3],out[5]; rz(pi/8) out[5]; cx a[3],out[5]; rz(-pi/8) out[5]; cx b[1],a[3]; rz(pi/8) a[3]; cx a[3],out[5]; rz(-pi/8) out[5]; cx a[3],out[5]; rz(pi/8) out[5]; rz(pi/16) b[1]; cx b[1],out[6]; rz(-pi/16) out[6]; cx b[1],out[6]; rz(pi/16) out[6]; cx b[1],a[3]; rz(-pi/16) a[3]; cx a[3],out[6]; rz(pi/16) out[6]; cx a[3],out[6]; rz(-pi/16) out[6]; cx b[1],a[3]; rz(pi/16) a[3]; cx a[3],out[6]; rz(-pi/16) out[6]; cx a[3],out[6]; rz(pi/16) out[6]; rz(pi/32) b[1]; cx b[1],out[7]; rz(-pi/32) out[7]; cx b[1],out[7]; rz(pi/32) out[7]; cx b[1],a[3]; rz(-pi/32) a[3]; cx a[3],out[7]; rz(pi/32) out[7]; cx a[3],out[7]; rz(-pi/32) out[7]; cx b[1],a[3]; rz(pi/32) a[3]; cx a[3],out[7]; rz(-pi/32) out[7]; cx a[3],out[7]; rz(pi/32) out[7]; rz(pi/64) b[1]; cx b[1],out[8]; rz(-pi/64) out[8]; cx b[1],out[8]; rz(pi/64) out[8]; cx b[1],a[3]; rz(-pi/64) a[3]; cx a[3],out[8]; rz(pi/64) out[8]; cx a[3],out[8]; rz(-pi/64) out[8]; cx b[1],a[3]; rz(pi/64) a[3]; cx a[3],out[8]; rz(-pi/64) out[8]; cx a[3],out[8]; rz(pi/64) out[8]; rz(pi/128) b[1]; cx b[1],out[9]; rz(-pi/128) out[9]; cx b[1],out[9]; rz(pi/128) out[9]; cx b[1],a[3]; rz(-pi/128) a[3]; cx a[3],out[9]; rz(pi/128) out[9]; cx a[3],out[9]; rz(-pi/128) out[9]; cx b[1],a[3]; rz(pi/128) a[3]; cx a[3],out[9]; rz(-pi/128) out[9]; cx a[3],out[9]; rz(pi/128) out[9]; rz(pi/256) b[1]; cx b[1],out[10]; rz(-pi/256) out[10]; cx b[1],out[10]; rz(pi/256) out[10]; cx b[1],a[3]; rz(-pi/256) a[3]; cx a[3],out[10]; rz(pi/256) out[10]; cx a[3],out[10]; rz(-pi/256) out[10]; cx b[1],a[3]; rz(pi/256) a[3]; cx a[3],out[10]; rz(-pi/256) out[10]; cx a[3],out[10]; rz(pi/256) out[10]; rz(pi/512) b[1]; cx b[1],out[11]; rz(-pi/512) out[11]; cx b[1],out[11]; rz(pi/512) out[11]; cx b[1],a[3]; rz(-pi/512) a[3]; cx a[3],out[11]; rz(pi/512) out[11]; cx a[3],out[11]; rz(-pi/512) out[11]; cx b[1],a[3]; rz(pi/512) a[3]; cx a[3],out[11]; rz(-pi/512) out[11]; cx a[3],out[11]; rz(pi/512) out[11]; rz(pi/1024) b[1]; cx b[1],out[12]; rz(-pi/1024) out[12]; cx b[1],out[12]; rz(pi/1024) out[12]; cx b[1],a[3]; rz(-pi/1024) a[3]; cx a[3],out[12]; rz(pi/1024) out[12]; cx a[3],out[12]; rz(-pi/1024) out[12]; cx b[1],a[3]; rz(pi/1024) a[3]; cx a[3],out[12]; rz(-pi/1024) out[12]; cx a[3],out[12]; rz(pi/1024) out[12]; rz(pi/2048) b[1]; cx b[1],out[13]; rz(-pi/2048) out[13]; cx b[1],out[13]; rz(pi/2048) out[13]; cx b[1],a[3]; rz(-pi/2048) a[3]; cx a[3],out[13]; rz(pi/2048) out[13]; cx a[3],out[13]; rz(-pi/2048) out[13]; cx b[1],a[3]; rz(pi/2048) a[3]; cx a[3],out[13]; rz(-pi/2048) out[13]; cx a[3],out[13]; rz(pi/2048) out[13]; rz(pi/4096) b[1]; cx b[1],out[14]; rz(-pi/4096) out[14]; cx b[1],out[14]; rz(pi/4096) out[14]; cx b[1],a[3]; rz(-pi/4096) a[3]; cx a[3],out[14]; rz(pi/4096) out[14]; cx a[3],out[14]; rz(-pi/4096) out[14]; cx b[1],a[3]; rz(pi/4096) a[3]; cx a[3],out[14]; rz(-pi/4096) out[14]; cx a[3],out[14]; rz(pi/4096) out[14]; rz(pi/8192) b[1]; cx b[1],out[15]; rz(-pi/8192) out[15]; cx b[1],out[15]; rz(pi/8192) out[15]; cx b[1],a[3]; rz(-pi/8192) a[3]; cx a[3],out[15]; rz(pi/8192) out[15]; cx a[3],out[15]; rz(-pi/8192) out[15]; cx b[1],a[3]; rz(pi/8192) a[3]; cx a[3],out[15]; rz(-pi/8192) out[15]; cx a[3],out[15]; rz(pi/8192) out[15]; cx b[0],a[3]; rz(-2*pi) a[3]; cx a[3],out[0]; rz(2*pi) out[0]; cx a[3],out[0]; rz(-2*pi) out[0]; cx b[0],a[3]; rz(2*pi) a[3]; cx a[3],out[0]; rz(-2*pi) out[0]; cx a[3],out[0]; rz(2*pi) out[0]; rz(pi) b[0]; cx b[0],out[1]; rz(-pi) out[1]; cx b[0],out[1]; rz(pi) out[1]; cx b[0],a[3]; rz(-pi) a[3]; cx a[3],out[1]; rz(pi) out[1]; cx a[3],out[1]; rz(-pi) out[1]; cx b[0],a[3]; rz(pi) a[3]; cx a[3],out[1]; rz(-pi) out[1]; cx a[3],out[1]; rz(pi) out[1]; rz(pi/2) b[0]; cx b[0],out[2]; rz(-pi/2) out[2]; cx b[0],out[2]; rz(pi/2) out[2]; cx b[0],a[3]; rz(-pi/2) a[3]; cx a[3],out[2]; rz(pi/2) out[2]; cx a[3],out[2]; rz(-pi/2) out[2]; cx b[0],a[3]; rz(pi/2) a[3]; cx a[3],out[2]; rz(-pi/2) out[2]; cx a[3],out[2]; rz(pi/2) out[2]; rz(pi/4) b[0]; cx b[0],out[3]; rz(-pi/4) out[3]; cx b[0],out[3]; rz(pi/4) out[3]; cx b[0],a[3]; rz(-pi/4) a[3]; cx a[3],out[3]; rz(pi/4) out[3]; cx a[3],out[3]; rz(-pi/4) out[3]; cx b[0],a[3]; rz(pi/4) a[3]; cx a[3],out[3]; rz(-pi/4) out[3]; cx a[3],out[3]; rz(pi/4) out[3]; rz(pi/8) b[0]; cx b[0],out[4]; rz(-pi/8) out[4]; cx b[0],out[4]; rz(pi/8) out[4]; cx b[0],a[3]; rz(-pi/8) a[3]; cx a[3],out[4]; rz(pi/8) out[4]; cx a[3],out[4]; rz(-pi/8) out[4]; cx b[0],a[3]; rz(pi/8) a[3]; cx a[3],out[4]; rz(-pi/8) out[4]; cx a[3],out[4]; rz(pi/8) out[4]; rz(pi/16) b[0]; cx b[0],out[5]; rz(-pi/16) out[5]; cx b[0],out[5]; rz(pi/16) out[5]; cx b[0],a[3]; rz(-pi/16) a[3]; cx a[3],out[5]; rz(pi/16) out[5]; cx a[3],out[5]; rz(-pi/16) out[5]; cx b[0],a[3]; rz(pi/16) a[3]; cx a[3],out[5]; rz(-pi/16) out[5]; cx a[3],out[5]; rz(pi/16) out[5]; rz(pi/32) b[0]; cx b[0],out[6]; rz(-pi/32) out[6]; cx b[0],out[6]; rz(pi/32) out[6]; cx b[0],a[3]; rz(-pi/32) a[3]; cx a[3],out[6]; rz(pi/32) out[6]; cx a[3],out[6]; rz(-pi/32) out[6]; cx b[0],a[3]; rz(pi/32) a[3]; cx a[3],out[6]; rz(-pi/32) out[6]; cx a[3],out[6]; rz(pi/32) out[6]; rz(pi/64) b[0]; cx b[0],out[7]; rz(-pi/64) out[7]; cx b[0],out[7]; rz(pi/64) out[7]; cx b[0],a[3]; rz(-pi/64) a[3]; cx a[3],out[7]; rz(pi/64) out[7]; cx a[3],out[7]; rz(-pi/64) out[7]; cx b[0],a[3]; rz(pi/64) a[3]; cx a[3],out[7]; rz(-pi/64) out[7]; cx a[3],out[7]; rz(pi/64) out[7]; rz(pi/128) b[0]; cx b[0],out[8]; rz(-pi/128) out[8]; cx b[0],out[8]; rz(pi/128) out[8]; cx b[0],a[3]; rz(-pi/128) a[3]; cx a[3],out[8]; rz(pi/128) out[8]; cx a[3],out[8]; rz(-pi/128) out[8]; cx b[0],a[3]; rz(pi/128) a[3]; cx a[3],out[8]; rz(-pi/128) out[8]; cx a[3],out[8]; rz(pi/128) out[8]; rz(pi/256) b[0]; cx b[0],out[9]; rz(-pi/256) out[9]; cx b[0],out[9]; rz(pi/256) out[9]; cx b[0],a[3]; rz(-pi/256) a[3]; cx a[3],out[9]; rz(pi/256) out[9]; cx a[3],out[9]; rz(-pi/256) out[9]; cx b[0],a[3]; rz(pi/256) a[3]; cx a[3],out[9]; rz(-pi/256) out[9]; cx a[3],out[9]; rz(pi/256) out[9]; rz(pi/512) b[0]; cx b[0],out[10]; rz(-pi/512) out[10]; cx b[0],out[10]; rz(pi/512) out[10]; cx b[0],a[3]; rz(-pi/512) a[3]; cx a[3],out[10]; rz(pi/512) out[10]; cx a[3],out[10]; rz(-pi/512) out[10]; cx b[0],a[3]; rz(pi/512) a[3]; cx a[3],out[10]; rz(-pi/512) out[10]; cx a[3],out[10]; rz(pi/512) out[10]; rz(pi/1024) b[0]; cx b[0],out[11]; rz(-pi/1024) out[11]; cx b[0],out[11]; rz(pi/1024) out[11]; cx b[0],a[3]; rz(-pi/1024) a[3]; cx a[3],out[11]; rz(pi/1024) out[11]; cx a[3],out[11]; rz(-pi/1024) out[11]; cx b[0],a[3]; rz(pi/1024) a[3]; cx a[3],out[11]; rz(-pi/1024) out[11]; cx a[3],out[11]; rz(pi/1024) out[11]; rz(pi/2048) b[0]; cx b[0],out[12]; rz(-pi/2048) out[12]; cx b[0],out[12]; rz(pi/2048) out[12]; cx b[0],a[3]; rz(-pi/2048) a[3]; cx a[3],out[12]; rz(pi/2048) out[12]; cx a[3],out[12]; rz(-pi/2048) out[12]; cx b[0],a[3]; rz(pi/2048) a[3]; cx a[3],out[12]; rz(-pi/2048) out[12]; cx a[3],out[12]; rz(pi/2048) out[12]; rz(pi/4096) b[0]; cx b[0],out[13]; rz(-pi/4096) out[13]; cx b[0],out[13]; rz(pi/4096) out[13]; cx b[0],a[3]; rz(-pi/4096) a[3]; cx a[3],out[13]; rz(pi/4096) out[13]; cx a[3],out[13]; rz(-pi/4096) out[13]; cx b[0],a[3]; rz(pi/4096) a[3]; cx a[3],out[13]; rz(-pi/4096) out[13]; cx a[3],out[13]; rz(pi/4096) out[13]; rz(pi/8192) b[0]; cx b[0],out[14]; rz(-pi/8192) out[14]; cx b[0],out[14]; rz(pi/8192) out[14]; cx b[0],a[3]; rz(-pi/8192) a[3]; cx a[3],out[14]; rz(pi/8192) out[14]; cx a[3],out[14]; rz(-pi/8192) out[14]; cx b[0],a[3]; rz(pi/8192) a[3]; cx a[3],out[14]; rz(-pi/8192) out[14]; cx a[3],out[14]; rz(pi/8192) out[14]; rz(pi/16384) b[0]; cx b[0],out[15]; rz(-pi/16384) out[15]; cx b[0],out[15]; rz(pi/16384) out[15]; cx b[0],a[3]; rz(-pi/16384) a[3]; cx a[3],out[15]; rz(pi/16384) out[15]; cx a[3],out[15]; rz(-pi/16384) out[15]; cx b[0],a[3]; rz(pi/16384) a[3]; cx a[3],out[15]; rz(-pi/16384) out[15]; cx a[3],out[15]; rz(pi/16384) out[15]; rz(pi) b[0]; rz(2*pi) b[1]; rz(4*pi) b[2]; rz(8*pi) b[3]; rz(16*pi) b[4]; rz(32*pi) b[5]; rz(64*pi) b[6]; rz(128*pi) b[7]; cx b[7],out[0]; rz(-128*pi) out[0]; cx b[7],out[0]; rz(128*pi) out[0]; cx b[7],a[2]; rz(-128*pi) a[2]; cx a[2],out[0]; rz(128*pi) out[0]; cx a[2],out[0]; rz(-128*pi) out[0]; cx b[7],a[2]; rz(128*pi) a[2]; cx a[2],out[0]; rz(-128*pi) out[0]; cx a[2],out[0]; rz(128*pi) out[0]; cx b[6],out[0]; rz(-64*pi) out[0]; cx b[6],out[0]; rz(64*pi) out[0]; rz(64*pi) b[7]; cx b[7],out[1]; rz(-64*pi) out[1]; cx b[7],out[1]; rz(64*pi) out[1]; cx b[7],a[2]; rz(-64*pi) a[2]; cx a[2],out[1]; rz(64*pi) out[1]; cx a[2],out[1]; rz(-64*pi) out[1]; cx b[7],a[2]; rz(64*pi) a[2]; cx a[2],out[1]; rz(-64*pi) out[1]; cx a[2],out[1]; rz(64*pi) out[1]; rz(32*pi) b[7]; cx b[7],out[2]; rz(-32*pi) out[2]; cx b[7],out[2]; rz(32*pi) out[2]; cx b[7],a[2]; rz(-32*pi) a[2]; cx a[2],out[2]; rz(32*pi) out[2]; cx a[2],out[2]; rz(-32*pi) out[2]; cx b[7],a[2]; rz(32*pi) a[2]; cx a[2],out[2]; rz(-32*pi) out[2]; cx a[2],out[2]; rz(32*pi) out[2]; rz(16*pi) b[7]; cx b[7],out[3]; rz(-16*pi) out[3]; cx b[7],out[3]; rz(16*pi) out[3]; cx b[7],a[2]; rz(-16*pi) a[2]; cx a[2],out[3]; rz(16*pi) out[3]; cx a[2],out[3]; rz(-16*pi) out[3]; cx b[7],a[2]; rz(16*pi) a[2]; cx a[2],out[3]; rz(-16*pi) out[3]; cx a[2],out[3]; rz(16*pi) out[3]; rz(8*pi) b[7]; cx b[7],out[4]; rz(-8*pi) out[4]; cx b[7],out[4]; rz(8*pi) out[4]; cx b[7],a[2]; rz(-8*pi) a[2]; cx a[2],out[4]; rz(8*pi) out[4]; cx a[2],out[4]; rz(-8*pi) out[4]; cx b[7],a[2]; rz(8*pi) a[2]; cx a[2],out[4]; rz(-8*pi) out[4]; cx a[2],out[4]; rz(8*pi) out[4]; rz(4*pi) b[7]; cx b[7],out[5]; rz(-4*pi) out[5]; cx b[7],out[5]; rz(4*pi) out[5]; cx b[7],a[2]; rz(-4*pi) a[2]; cx a[2],out[5]; rz(4*pi) out[5]; cx a[2],out[5]; rz(-4*pi) out[5]; cx b[7],a[2]; rz(4*pi) a[2]; cx a[2],out[5]; rz(-4*pi) out[5]; cx a[2],out[5]; rz(4*pi) out[5]; rz(2*pi) b[7]; cx b[7],out[6]; rz(-2*pi) out[6]; cx b[7],out[6]; rz(2*pi) out[6]; cx b[7],a[2]; rz(-2*pi) a[2]; cx a[2],out[6]; rz(2*pi) out[6]; cx a[2],out[6]; rz(-2*pi) out[6]; cx b[7],a[2]; rz(2*pi) a[2]; cx a[2],out[6]; rz(-2*pi) out[6]; cx a[2],out[6]; rz(2*pi) out[6]; rz(pi) b[7]; cx b[7],out[7]; rz(-pi) out[7]; cx b[7],out[7]; rz(pi) out[7]; cx b[7],a[2]; rz(-pi) a[2]; cx a[2],out[7]; rz(pi) out[7]; cx a[2],out[7]; rz(-pi) out[7]; cx b[7],a[2]; rz(pi) a[2]; cx a[2],out[7]; rz(-pi) out[7]; cx a[2],out[7]; rz(pi) out[7]; rz(pi/2) b[7]; cx b[7],out[8]; rz(-pi/2) out[8]; cx b[7],out[8]; rz(pi/2) out[8]; cx b[7],a[2]; rz(-pi/2) a[2]; cx a[2],out[8]; rz(pi/2) out[8]; cx a[2],out[8]; rz(-pi/2) out[8]; cx b[7],a[2]; rz(pi/2) a[2]; cx a[2],out[8]; rz(-pi/2) out[8]; cx a[2],out[8]; rz(pi/2) out[8]; rz(pi/4) b[7]; cx b[7],out[9]; rz(-pi/4) out[9]; cx b[7],out[9]; rz(pi/4) out[9]; cx b[7],a[2]; rz(-pi/4) a[2]; cx a[2],out[9]; rz(pi/4) out[9]; cx a[2],out[9]; rz(-pi/4) out[9]; cx b[7],a[2]; rz(pi/4) a[2]; cx a[2],out[9]; rz(-pi/4) out[9]; cx a[2],out[9]; rz(pi/4) out[9]; rz(pi/8) b[7]; cx b[7],out[10]; rz(-pi/8) out[10]; cx b[7],out[10]; rz(pi/8) out[10]; cx b[7],a[2]; rz(-pi/8) a[2]; cx a[2],out[10]; rz(pi/8) out[10]; cx a[2],out[10]; rz(-pi/8) out[10]; cx b[7],a[2]; rz(pi/8) a[2]; cx a[2],out[10]; rz(-pi/8) out[10]; cx a[2],out[10]; rz(pi/8) out[10]; rz(pi/16) b[7]; cx b[7],out[11]; rz(-pi/16) out[11]; cx b[7],out[11]; rz(pi/16) out[11]; cx b[7],a[2]; rz(-pi/16) a[2]; cx a[2],out[11]; rz(pi/16) out[11]; cx a[2],out[11]; rz(-pi/16) out[11]; cx b[7],a[2]; rz(pi/16) a[2]; cx a[2],out[11]; rz(-pi/16) out[11]; cx a[2],out[11]; rz(pi/16) out[11]; rz(pi/32) b[7]; cx b[7],out[12]; rz(-pi/32) out[12]; cx b[7],out[12]; rz(pi/32) out[12]; cx b[7],a[2]; rz(-pi/32) a[2]; cx a[2],out[12]; rz(pi/32) out[12]; cx a[2],out[12]; rz(-pi/32) out[12]; cx b[7],a[2]; rz(pi/32) a[2]; cx a[2],out[12]; rz(-pi/32) out[12]; cx a[2],out[12]; rz(pi/32) out[12]; rz(pi/64) b[7]; cx b[7],out[13]; rz(-pi/64) out[13]; cx b[7],out[13]; rz(pi/64) out[13]; cx b[7],a[2]; rz(-pi/64) a[2]; cx a[2],out[13]; rz(pi/64) out[13]; cx a[2],out[13]; rz(-pi/64) out[13]; cx b[7],a[2]; rz(pi/64) a[2]; cx a[2],out[13]; rz(-pi/64) out[13]; cx a[2],out[13]; rz(pi/64) out[13]; rz(pi/128) b[7]; cx b[7],out[14]; rz(-pi/128) out[14]; cx b[7],out[14]; rz(pi/128) out[14]; cx b[7],a[2]; rz(-pi/128) a[2]; cx a[2],out[14]; rz(pi/128) out[14]; cx a[2],out[14]; rz(-pi/128) out[14]; cx b[7],a[2]; rz(pi/128) a[2]; cx a[2],out[14]; rz(-pi/128) out[14]; cx a[2],out[14]; rz(pi/128) out[14]; rz(pi/256) b[7]; cx b[7],out[15]; rz(-pi/256) out[15]; cx b[7],out[15]; rz(pi/256) out[15]; cx b[7],a[2]; rz(-pi/256) a[2]; cx a[2],out[15]; rz(pi/256) out[15]; cx a[2],out[15]; rz(-pi/256) out[15]; cx b[7],a[2]; rz(pi/256) a[2]; cx a[2],out[15]; rz(-pi/256) out[15]; cx a[2],out[15]; rz(pi/256) out[15]; cx b[6],a[2]; rz(-64*pi) a[2]; cx a[2],out[0]; rz(64*pi) out[0]; cx a[2],out[0]; rz(-64*pi) out[0]; cx b[6],a[2]; rz(64*pi) a[2]; cx a[2],out[0]; rz(-64*pi) out[0]; cx a[2],out[0]; rz(64*pi) out[0]; cx b[5],out[0]; rz(-32*pi) out[0]; cx b[5],out[0]; rz(32*pi) out[0]; rz(32*pi) b[6]; cx b[6],out[1]; rz(-32*pi) out[1]; cx b[6],out[1]; rz(32*pi) out[1]; cx b[6],a[2]; rz(-32*pi) a[2]; cx a[2],out[1]; rz(32*pi) out[1]; cx a[2],out[1]; rz(-32*pi) out[1]; cx b[6],a[2]; rz(32*pi) a[2]; cx a[2],out[1]; rz(-32*pi) out[1]; cx a[2],out[1]; rz(32*pi) out[1]; rz(16*pi) b[6]; cx b[6],out[2]; rz(-16*pi) out[2]; cx b[6],out[2]; rz(16*pi) out[2]; cx b[6],a[2]; rz(-16*pi) a[2]; cx a[2],out[2]; rz(16*pi) out[2]; cx a[2],out[2]; rz(-16*pi) out[2]; cx b[6],a[2]; rz(16*pi) a[2]; cx a[2],out[2]; rz(-16*pi) out[2]; cx a[2],out[2]; rz(16*pi) out[2]; rz(8*pi) b[6]; cx b[6],out[3]; rz(-8*pi) out[3]; cx b[6],out[3]; rz(8*pi) out[3]; cx b[6],a[2]; rz(-8*pi) a[2]; cx a[2],out[3]; rz(8*pi) out[3]; cx a[2],out[3]; rz(-8*pi) out[3]; cx b[6],a[2]; rz(8*pi) a[2]; cx a[2],out[3]; rz(-8*pi) out[3]; cx a[2],out[3]; rz(8*pi) out[3]; rz(4*pi) b[6]; cx b[6],out[4]; rz(-4*pi) out[4]; cx b[6],out[4]; rz(4*pi) out[4]; cx b[6],a[2]; rz(-4*pi) a[2]; cx a[2],out[4]; rz(4*pi) out[4]; cx a[2],out[4]; rz(-4*pi) out[4]; cx b[6],a[2]; rz(4*pi) a[2]; cx a[2],out[4]; rz(-4*pi) out[4]; cx a[2],out[4]; rz(4*pi) out[4]; rz(2*pi) b[6]; cx b[6],out[5]; rz(-2*pi) out[5]; cx b[6],out[5]; rz(2*pi) out[5]; cx b[6],a[2]; rz(-2*pi) a[2]; cx a[2],out[5]; rz(2*pi) out[5]; cx a[2],out[5]; rz(-2*pi) out[5]; cx b[6],a[2]; rz(2*pi) a[2]; cx a[2],out[5]; rz(-2*pi) out[5]; cx a[2],out[5]; rz(2*pi) out[5]; rz(pi) b[6]; cx b[6],out[6]; rz(-pi) out[6]; cx b[6],out[6]; rz(pi) out[6]; cx b[6],a[2]; rz(-pi) a[2]; cx a[2],out[6]; rz(pi) out[6]; cx a[2],out[6]; rz(-pi) out[6]; cx b[6],a[2]; rz(pi) a[2]; cx a[2],out[6]; rz(-pi) out[6]; cx a[2],out[6]; rz(pi) out[6]; rz(pi/2) b[6]; cx b[6],out[7]; rz(-pi/2) out[7]; cx b[6],out[7]; rz(pi/2) out[7]; cx b[6],a[2]; rz(-pi/2) a[2]; cx a[2],out[7]; rz(pi/2) out[7]; cx a[2],out[7]; rz(-pi/2) out[7]; cx b[6],a[2]; rz(pi/2) a[2]; cx a[2],out[7]; rz(-pi/2) out[7]; cx a[2],out[7]; rz(pi/2) out[7]; rz(pi/4) b[6]; cx b[6],out[8]; rz(-pi/4) out[8]; cx b[6],out[8]; rz(pi/4) out[8]; cx b[6],a[2]; rz(-pi/4) a[2]; cx a[2],out[8]; rz(pi/4) out[8]; cx a[2],out[8]; rz(-pi/4) out[8]; cx b[6],a[2]; rz(pi/4) a[2]; cx a[2],out[8]; rz(-pi/4) out[8]; cx a[2],out[8]; rz(pi/4) out[8]; rz(pi/8) b[6]; cx b[6],out[9]; rz(-pi/8) out[9]; cx b[6],out[9]; rz(pi/8) out[9]; cx b[6],a[2]; rz(-pi/8) a[2]; cx a[2],out[9]; rz(pi/8) out[9]; cx a[2],out[9]; rz(-pi/8) out[9]; cx b[6],a[2]; rz(pi/8) a[2]; cx a[2],out[9]; rz(-pi/8) out[9]; cx a[2],out[9]; rz(pi/8) out[9]; rz(pi/16) b[6]; cx b[6],out[10]; rz(-pi/16) out[10]; cx b[6],out[10]; rz(pi/16) out[10]; cx b[6],a[2]; rz(-pi/16) a[2]; cx a[2],out[10]; rz(pi/16) out[10]; cx a[2],out[10]; rz(-pi/16) out[10]; cx b[6],a[2]; rz(pi/16) a[2]; cx a[2],out[10]; rz(-pi/16) out[10]; cx a[2],out[10]; rz(pi/16) out[10]; rz(pi/32) b[6]; cx b[6],out[11]; rz(-pi/32) out[11]; cx b[6],out[11]; rz(pi/32) out[11]; cx b[6],a[2]; rz(-pi/32) a[2]; cx a[2],out[11]; rz(pi/32) out[11]; cx a[2],out[11]; rz(-pi/32) out[11]; cx b[6],a[2]; rz(pi/32) a[2]; cx a[2],out[11]; rz(-pi/32) out[11]; cx a[2],out[11]; rz(pi/32) out[11]; rz(pi/64) b[6]; cx b[6],out[12]; rz(-pi/64) out[12]; cx b[6],out[12]; rz(pi/64) out[12]; cx b[6],a[2]; rz(-pi/64) a[2]; cx a[2],out[12]; rz(pi/64) out[12]; cx a[2],out[12]; rz(-pi/64) out[12]; cx b[6],a[2]; rz(pi/64) a[2]; cx a[2],out[12]; rz(-pi/64) out[12]; cx a[2],out[12]; rz(pi/64) out[12]; rz(pi/128) b[6]; cx b[6],out[13]; rz(-pi/128) out[13]; cx b[6],out[13]; rz(pi/128) out[13]; cx b[6],a[2]; rz(-pi/128) a[2]; cx a[2],out[13]; rz(pi/128) out[13]; cx a[2],out[13]; rz(-pi/128) out[13]; cx b[6],a[2]; rz(pi/128) a[2]; cx a[2],out[13]; rz(-pi/128) out[13]; cx a[2],out[13]; rz(pi/128) out[13]; rz(pi/256) b[6]; cx b[6],out[14]; rz(-pi/256) out[14]; cx b[6],out[14]; rz(pi/256) out[14]; cx b[6],a[2]; rz(-pi/256) a[2]; cx a[2],out[14]; rz(pi/256) out[14]; cx a[2],out[14]; rz(-pi/256) out[14]; cx b[6],a[2]; rz(pi/256) a[2]; cx a[2],out[14]; rz(-pi/256) out[14]; cx a[2],out[14]; rz(pi/256) out[14]; rz(pi/512) b[6]; cx b[6],out[15]; rz(-pi/512) out[15]; cx b[6],out[15]; rz(pi/512) out[15]; cx b[6],a[2]; rz(-pi/512) a[2]; cx a[2],out[15]; rz(pi/512) out[15]; cx a[2],out[15]; rz(-pi/512) out[15]; cx b[6],a[2]; rz(pi/512) a[2]; cx a[2],out[15]; rz(-pi/512) out[15]; cx a[2],out[15]; rz(pi/512) out[15]; cx b[5],a[2]; rz(-32*pi) a[2]; cx a[2],out[0]; rz(32*pi) out[0]; cx a[2],out[0]; rz(-32*pi) out[0]; cx b[5],a[2]; rz(32*pi) a[2]; cx a[2],out[0]; rz(-32*pi) out[0]; cx a[2],out[0]; rz(32*pi) out[0]; cx b[4],out[0]; rz(-16*pi) out[0]; cx b[4],out[0]; rz(16*pi) out[0]; rz(16*pi) b[5]; cx b[5],out[1]; rz(-16*pi) out[1]; cx b[5],out[1]; rz(16*pi) out[1]; cx b[5],a[2]; rz(-16*pi) a[2]; cx a[2],out[1]; rz(16*pi) out[1]; cx a[2],out[1]; rz(-16*pi) out[1]; cx b[5],a[2]; rz(16*pi) a[2]; cx a[2],out[1]; rz(-16*pi) out[1]; cx a[2],out[1]; rz(16*pi) out[1]; rz(8*pi) b[5]; cx b[5],out[2]; rz(-8*pi) out[2]; cx b[5],out[2]; rz(8*pi) out[2]; cx b[5],a[2]; rz(-8*pi) a[2]; cx a[2],out[2]; rz(8*pi) out[2]; cx a[2],out[2]; rz(-8*pi) out[2]; cx b[5],a[2]; rz(8*pi) a[2]; cx a[2],out[2]; rz(-8*pi) out[2]; cx a[2],out[2]; rz(8*pi) out[2]; rz(4*pi) b[5]; cx b[5],out[3]; rz(-4*pi) out[3]; cx b[5],out[3]; rz(4*pi) out[3]; cx b[5],a[2]; rz(-4*pi) a[2]; cx a[2],out[3]; rz(4*pi) out[3]; cx a[2],out[3]; rz(-4*pi) out[3]; cx b[5],a[2]; rz(4*pi) a[2]; cx a[2],out[3]; rz(-4*pi) out[3]; cx a[2],out[3]; rz(4*pi) out[3]; rz(2*pi) b[5]; cx b[5],out[4]; rz(-2*pi) out[4]; cx b[5],out[4]; rz(2*pi) out[4]; cx b[5],a[2]; rz(-2*pi) a[2]; cx a[2],out[4]; rz(2*pi) out[4]; cx a[2],out[4]; rz(-2*pi) out[4]; cx b[5],a[2]; rz(2*pi) a[2]; cx a[2],out[4]; rz(-2*pi) out[4]; cx a[2],out[4]; rz(2*pi) out[4]; rz(pi) b[5]; cx b[5],out[5]; rz(-pi) out[5]; cx b[5],out[5]; rz(pi) out[5]; cx b[5],a[2]; rz(-pi) a[2]; cx a[2],out[5]; rz(pi) out[5]; cx a[2],out[5]; rz(-pi) out[5]; cx b[5],a[2]; rz(pi) a[2]; cx a[2],out[5]; rz(-pi) out[5]; cx a[2],out[5]; rz(pi) out[5]; rz(pi/2) b[5]; cx b[5],out[6]; rz(-pi/2) out[6]; cx b[5],out[6]; rz(pi/2) out[6]; cx b[5],a[2]; rz(-pi/2) a[2]; cx a[2],out[6]; rz(pi/2) out[6]; cx a[2],out[6]; rz(-pi/2) out[6]; cx b[5],a[2]; rz(pi/2) a[2]; cx a[2],out[6]; rz(-pi/2) out[6]; cx a[2],out[6]; rz(pi/2) out[6]; rz(pi/4) b[5]; cx b[5],out[7]; rz(-pi/4) out[7]; cx b[5],out[7]; rz(pi/4) out[7]; cx b[5],a[2]; rz(-pi/4) a[2]; cx a[2],out[7]; rz(pi/4) out[7]; cx a[2],out[7]; rz(-pi/4) out[7]; cx b[5],a[2]; rz(pi/4) a[2]; cx a[2],out[7]; rz(-pi/4) out[7]; cx a[2],out[7]; rz(pi/4) out[7]; rz(pi/8) b[5]; cx b[5],out[8]; rz(-pi/8) out[8]; cx b[5],out[8]; rz(pi/8) out[8]; cx b[5],a[2]; rz(-pi/8) a[2]; cx a[2],out[8]; rz(pi/8) out[8]; cx a[2],out[8]; rz(-pi/8) out[8]; cx b[5],a[2]; rz(pi/8) a[2]; cx a[2],out[8]; rz(-pi/8) out[8]; cx a[2],out[8]; rz(pi/8) out[8]; rz(pi/16) b[5]; cx b[5],out[9]; rz(-pi/16) out[9]; cx b[5],out[9]; rz(pi/16) out[9]; cx b[5],a[2]; rz(-pi/16) a[2]; cx a[2],out[9]; rz(pi/16) out[9]; cx a[2],out[9]; rz(-pi/16) out[9]; cx b[5],a[2]; rz(pi/16) a[2]; cx a[2],out[9]; rz(-pi/16) out[9]; cx a[2],out[9]; rz(pi/16) out[9]; rz(pi/32) b[5]; cx b[5],out[10]; rz(-pi/32) out[10]; cx b[5],out[10]; rz(pi/32) out[10]; cx b[5],a[2]; rz(-pi/32) a[2]; cx a[2],out[10]; rz(pi/32) out[10]; cx a[2],out[10]; rz(-pi/32) out[10]; cx b[5],a[2]; rz(pi/32) a[2]; cx a[2],out[10]; rz(-pi/32) out[10]; cx a[2],out[10]; rz(pi/32) out[10]; rz(pi/64) b[5]; cx b[5],out[11]; rz(-pi/64) out[11]; cx b[5],out[11]; rz(pi/64) out[11]; cx b[5],a[2]; rz(-pi/64) a[2]; cx a[2],out[11]; rz(pi/64) out[11]; cx a[2],out[11]; rz(-pi/64) out[11]; cx b[5],a[2]; rz(pi/64) a[2]; cx a[2],out[11]; rz(-pi/64) out[11]; cx a[2],out[11]; rz(pi/64) out[11]; rz(pi/128) b[5]; cx b[5],out[12]; rz(-pi/128) out[12]; cx b[5],out[12]; rz(pi/128) out[12]; cx b[5],a[2]; rz(-pi/128) a[2]; cx a[2],out[12]; rz(pi/128) out[12]; cx a[2],out[12]; rz(-pi/128) out[12]; cx b[5],a[2]; rz(pi/128) a[2]; cx a[2],out[12]; rz(-pi/128) out[12]; cx a[2],out[12]; rz(pi/128) out[12]; rz(pi/256) b[5]; cx b[5],out[13]; rz(-pi/256) out[13]; cx b[5],out[13]; rz(pi/256) out[13]; cx b[5],a[2]; rz(-pi/256) a[2]; cx a[2],out[13]; rz(pi/256) out[13]; cx a[2],out[13]; rz(-pi/256) out[13]; cx b[5],a[2]; rz(pi/256) a[2]; cx a[2],out[13]; rz(-pi/256) out[13]; cx a[2],out[13]; rz(pi/256) out[13]; rz(pi/512) b[5]; cx b[5],out[14]; rz(-pi/512) out[14]; cx b[5],out[14]; rz(pi/512) out[14]; cx b[5],a[2]; rz(-pi/512) a[2]; cx a[2],out[14]; rz(pi/512) out[14]; cx a[2],out[14]; rz(-pi/512) out[14]; cx b[5],a[2]; rz(pi/512) a[2]; cx a[2],out[14]; rz(-pi/512) out[14]; cx a[2],out[14]; rz(pi/512) out[14]; rz(pi/1024) b[5]; cx b[5],out[15]; rz(-pi/1024) out[15]; cx b[5],out[15]; rz(pi/1024) out[15]; cx b[5],a[2]; rz(-pi/1024) a[2]; cx a[2],out[15]; rz(pi/1024) out[15]; cx a[2],out[15]; rz(-pi/1024) out[15]; cx b[5],a[2]; rz(pi/1024) a[2]; cx a[2],out[15]; rz(-pi/1024) out[15]; cx a[2],out[15]; rz(pi/1024) out[15]; cx b[4],a[2]; rz(-16*pi) a[2]; cx a[2],out[0]; rz(16*pi) out[0]; cx a[2],out[0]; rz(-16*pi) out[0]; cx b[4],a[2]; rz(16*pi) a[2]; cx a[2],out[0]; rz(-16*pi) out[0]; cx a[2],out[0]; rz(16*pi) out[0]; cx b[3],out[0]; rz(-8*pi) out[0]; cx b[3],out[0]; rz(8*pi) out[0]; rz(8*pi) b[4]; cx b[4],out[1]; rz(-8*pi) out[1]; cx b[4],out[1]; rz(8*pi) out[1]; cx b[4],a[2]; rz(-8*pi) a[2]; cx a[2],out[1]; rz(8*pi) out[1]; cx a[2],out[1]; rz(-8*pi) out[1]; cx b[4],a[2]; rz(8*pi) a[2]; cx a[2],out[1]; rz(-8*pi) out[1]; cx a[2],out[1]; rz(8*pi) out[1]; rz(4*pi) b[4]; cx b[4],out[2]; rz(-4*pi) out[2]; cx b[4],out[2]; rz(4*pi) out[2]; cx b[4],a[2]; rz(-4*pi) a[2]; cx a[2],out[2]; rz(4*pi) out[2]; cx a[2],out[2]; rz(-4*pi) out[2]; cx b[4],a[2]; rz(4*pi) a[2]; cx a[2],out[2]; rz(-4*pi) out[2]; cx a[2],out[2]; rz(4*pi) out[2]; rz(2*pi) b[4]; cx b[4],out[3]; rz(-2*pi) out[3]; cx b[4],out[3]; rz(2*pi) out[3]; cx b[4],a[2]; rz(-2*pi) a[2]; cx a[2],out[3]; rz(2*pi) out[3]; cx a[2],out[3]; rz(-2*pi) out[3]; cx b[4],a[2]; rz(2*pi) a[2]; cx a[2],out[3]; rz(-2*pi) out[3]; cx a[2],out[3]; rz(2*pi) out[3]; rz(pi) b[4]; cx b[4],out[4]; rz(-pi) out[4]; cx b[4],out[4]; rz(pi) out[4]; cx b[4],a[2]; rz(-pi) a[2]; cx a[2],out[4]; rz(pi) out[4]; cx a[2],out[4]; rz(-pi) out[4]; cx b[4],a[2]; rz(pi) a[2]; cx a[2],out[4]; rz(-pi) out[4]; cx a[2],out[4]; rz(pi) out[4]; rz(pi/2) b[4]; cx b[4],out[5]; rz(-pi/2) out[5]; cx b[4],out[5]; rz(pi/2) out[5]; cx b[4],a[2]; rz(-pi/2) a[2]; cx a[2],out[5]; rz(pi/2) out[5]; cx a[2],out[5]; rz(-pi/2) out[5]; cx b[4],a[2]; rz(pi/2) a[2]; cx a[2],out[5]; rz(-pi/2) out[5]; cx a[2],out[5]; rz(pi/2) out[5]; rz(pi/4) b[4]; cx b[4],out[6]; rz(-pi/4) out[6]; cx b[4],out[6]; rz(pi/4) out[6]; cx b[4],a[2]; rz(-pi/4) a[2]; cx a[2],out[6]; rz(pi/4) out[6]; cx a[2],out[6]; rz(-pi/4) out[6]; cx b[4],a[2]; rz(pi/4) a[2]; cx a[2],out[6]; rz(-pi/4) out[6]; cx a[2],out[6]; rz(pi/4) out[6]; rz(pi/8) b[4]; cx b[4],out[7]; rz(-pi/8) out[7]; cx b[4],out[7]; rz(pi/8) out[7]; cx b[4],a[2]; rz(-pi/8) a[2]; cx a[2],out[7]; rz(pi/8) out[7]; cx a[2],out[7]; rz(-pi/8) out[7]; cx b[4],a[2]; rz(pi/8) a[2]; cx a[2],out[7]; rz(-pi/8) out[7]; cx a[2],out[7]; rz(pi/8) out[7]; rz(pi/16) b[4]; cx b[4],out[8]; rz(-pi/16) out[8]; cx b[4],out[8]; rz(pi/16) out[8]; cx b[4],a[2]; rz(-pi/16) a[2]; cx a[2],out[8]; rz(pi/16) out[8]; cx a[2],out[8]; rz(-pi/16) out[8]; cx b[4],a[2]; rz(pi/16) a[2]; cx a[2],out[8]; rz(-pi/16) out[8]; cx a[2],out[8]; rz(pi/16) out[8]; rz(pi/32) b[4]; cx b[4],out[9]; rz(-pi/32) out[9]; cx b[4],out[9]; rz(pi/32) out[9]; cx b[4],a[2]; rz(-pi/32) a[2]; cx a[2],out[9]; rz(pi/32) out[9]; cx a[2],out[9]; rz(-pi/32) out[9]; cx b[4],a[2]; rz(pi/32) a[2]; cx a[2],out[9]; rz(-pi/32) out[9]; cx a[2],out[9]; rz(pi/32) out[9]; rz(pi/64) b[4]; cx b[4],out[10]; rz(-pi/64) out[10]; cx b[4],out[10]; rz(pi/64) out[10]; cx b[4],a[2]; rz(-pi/64) a[2]; cx a[2],out[10]; rz(pi/64) out[10]; cx a[2],out[10]; rz(-pi/64) out[10]; cx b[4],a[2]; rz(pi/64) a[2]; cx a[2],out[10]; rz(-pi/64) out[10]; cx a[2],out[10]; rz(pi/64) out[10]; rz(pi/128) b[4]; cx b[4],out[11]; rz(-pi/128) out[11]; cx b[4],out[11]; rz(pi/128) out[11]; cx b[4],a[2]; rz(-pi/128) a[2]; cx a[2],out[11]; rz(pi/128) out[11]; cx a[2],out[11]; rz(-pi/128) out[11]; cx b[4],a[2]; rz(pi/128) a[2]; cx a[2],out[11]; rz(-pi/128) out[11]; cx a[2],out[11]; rz(pi/128) out[11]; rz(pi/256) b[4]; cx b[4],out[12]; rz(-pi/256) out[12]; cx b[4],out[12]; rz(pi/256) out[12]; cx b[4],a[2]; rz(-pi/256) a[2]; cx a[2],out[12]; rz(pi/256) out[12]; cx a[2],out[12]; rz(-pi/256) out[12]; cx b[4],a[2]; rz(pi/256) a[2]; cx a[2],out[12]; rz(-pi/256) out[12]; cx a[2],out[12]; rz(pi/256) out[12]; rz(pi/512) b[4]; cx b[4],out[13]; rz(-pi/512) out[13]; cx b[4],out[13]; rz(pi/512) out[13]; cx b[4],a[2]; rz(-pi/512) a[2]; cx a[2],out[13]; rz(pi/512) out[13]; cx a[2],out[13]; rz(-pi/512) out[13]; cx b[4],a[2]; rz(pi/512) a[2]; cx a[2],out[13]; rz(-pi/512) out[13]; cx a[2],out[13]; rz(pi/512) out[13]; rz(pi/1024) b[4]; cx b[4],out[14]; rz(-pi/1024) out[14]; cx b[4],out[14]; rz(pi/1024) out[14]; cx b[4],a[2]; rz(-pi/1024) a[2]; cx a[2],out[14]; rz(pi/1024) out[14]; cx a[2],out[14]; rz(-pi/1024) out[14]; cx b[4],a[2]; rz(pi/1024) a[2]; cx a[2],out[14]; rz(-pi/1024) out[14]; cx a[2],out[14]; rz(pi/1024) out[14]; rz(pi/2048) b[4]; cx b[4],out[15]; rz(-pi/2048) out[15]; cx b[4],out[15]; rz(pi/2048) out[15]; cx b[4],a[2]; rz(-pi/2048) a[2]; cx a[2],out[15]; rz(pi/2048) out[15]; cx a[2],out[15]; rz(-pi/2048) out[15]; cx b[4],a[2]; rz(pi/2048) a[2]; cx a[2],out[15]; rz(-pi/2048) out[15]; cx a[2],out[15]; rz(pi/2048) out[15]; cx b[3],a[2]; rz(-8*pi) a[2]; cx a[2],out[0]; rz(8*pi) out[0]; cx a[2],out[0]; rz(-8*pi) out[0]; cx b[3],a[2]; rz(8*pi) a[2]; cx a[2],out[0]; rz(-8*pi) out[0]; cx a[2],out[0]; rz(8*pi) out[0]; cx b[2],out[0]; rz(-4*pi) out[0]; cx b[2],out[0]; rz(4*pi) out[0]; rz(4*pi) b[3]; cx b[3],out[1]; rz(-4*pi) out[1]; cx b[3],out[1]; rz(4*pi) out[1]; cx b[3],a[2]; rz(-4*pi) a[2]; cx a[2],out[1]; rz(4*pi) out[1]; cx a[2],out[1]; rz(-4*pi) out[1]; cx b[3],a[2]; rz(4*pi) a[2]; cx a[2],out[1]; rz(-4*pi) out[1]; cx a[2],out[1]; rz(4*pi) out[1]; rz(2*pi) b[3]; cx b[3],out[2]; rz(-2*pi) out[2]; cx b[3],out[2]; rz(2*pi) out[2]; cx b[3],a[2]; rz(-2*pi) a[2]; cx a[2],out[2]; rz(2*pi) out[2]; cx a[2],out[2]; rz(-2*pi) out[2]; cx b[3],a[2]; rz(2*pi) a[2]; cx a[2],out[2]; rz(-2*pi) out[2]; cx a[2],out[2]; rz(2*pi) out[2]; rz(pi) b[3]; cx b[3],out[3]; rz(-pi) out[3]; cx b[3],out[3]; rz(pi) out[3]; cx b[3],a[2]; rz(-pi) a[2]; cx a[2],out[3]; rz(pi) out[3]; cx a[2],out[3]; rz(-pi) out[3]; cx b[3],a[2]; rz(pi) a[2]; cx a[2],out[3]; rz(-pi) out[3]; cx a[2],out[3]; rz(pi) out[3]; rz(pi/2) b[3]; cx b[3],out[4]; rz(-pi/2) out[4]; cx b[3],out[4]; rz(pi/2) out[4]; cx b[3],a[2]; rz(-pi/2) a[2]; cx a[2],out[4]; rz(pi/2) out[4]; cx a[2],out[4]; rz(-pi/2) out[4]; cx b[3],a[2]; rz(pi/2) a[2]; cx a[2],out[4]; rz(-pi/2) out[4]; cx a[2],out[4]; rz(pi/2) out[4]; rz(pi/4) b[3]; cx b[3],out[5]; rz(-pi/4) out[5]; cx b[3],out[5]; rz(pi/4) out[5]; cx b[3],a[2]; rz(-pi/4) a[2]; cx a[2],out[5]; rz(pi/4) out[5]; cx a[2],out[5]; rz(-pi/4) out[5]; cx b[3],a[2]; rz(pi/4) a[2]; cx a[2],out[5]; rz(-pi/4) out[5]; cx a[2],out[5]; rz(pi/4) out[5]; rz(pi/8) b[3]; cx b[3],out[6]; rz(-pi/8) out[6]; cx b[3],out[6]; rz(pi/8) out[6]; cx b[3],a[2]; rz(-pi/8) a[2]; cx a[2],out[6]; rz(pi/8) out[6]; cx a[2],out[6]; rz(-pi/8) out[6]; cx b[3],a[2]; rz(pi/8) a[2]; cx a[2],out[6]; rz(-pi/8) out[6]; cx a[2],out[6]; rz(pi/8) out[6]; rz(pi/16) b[3]; cx b[3],out[7]; rz(-pi/16) out[7]; cx b[3],out[7]; rz(pi/16) out[7]; cx b[3],a[2]; rz(-pi/16) a[2]; cx a[2],out[7]; rz(pi/16) out[7]; cx a[2],out[7]; rz(-pi/16) out[7]; cx b[3],a[2]; rz(pi/16) a[2]; cx a[2],out[7]; rz(-pi/16) out[7]; cx a[2],out[7]; rz(pi/16) out[7]; rz(pi/32) b[3]; cx b[3],out[8]; rz(-pi/32) out[8]; cx b[3],out[8]; rz(pi/32) out[8]; cx b[3],a[2]; rz(-pi/32) a[2]; cx a[2],out[8]; rz(pi/32) out[8]; cx a[2],out[8]; rz(-pi/32) out[8]; cx b[3],a[2]; rz(pi/32) a[2]; cx a[2],out[8]; rz(-pi/32) out[8]; cx a[2],out[8]; rz(pi/32) out[8]; rz(pi/64) b[3]; cx b[3],out[9]; rz(-pi/64) out[9]; cx b[3],out[9]; rz(pi/64) out[9]; cx b[3],a[2]; rz(-pi/64) a[2]; cx a[2],out[9]; rz(pi/64) out[9]; cx a[2],out[9]; rz(-pi/64) out[9]; cx b[3],a[2]; rz(pi/64) a[2]; cx a[2],out[9]; rz(-pi/64) out[9]; cx a[2],out[9]; rz(pi/64) out[9]; rz(pi/128) b[3]; cx b[3],out[10]; rz(-pi/128) out[10]; cx b[3],out[10]; rz(pi/128) out[10]; cx b[3],a[2]; rz(-pi/128) a[2]; cx a[2],out[10]; rz(pi/128) out[10]; cx a[2],out[10]; rz(-pi/128) out[10]; cx b[3],a[2]; rz(pi/128) a[2]; cx a[2],out[10]; rz(-pi/128) out[10]; cx a[2],out[10]; rz(pi/128) out[10]; rz(pi/256) b[3]; cx b[3],out[11]; rz(-pi/256) out[11]; cx b[3],out[11]; rz(pi/256) out[11]; cx b[3],a[2]; rz(-pi/256) a[2]; cx a[2],out[11]; rz(pi/256) out[11]; cx a[2],out[11]; rz(-pi/256) out[11]; cx b[3],a[2]; rz(pi/256) a[2]; cx a[2],out[11]; rz(-pi/256) out[11]; cx a[2],out[11]; rz(pi/256) out[11]; rz(pi/512) b[3]; cx b[3],out[12]; rz(-pi/512) out[12]; cx b[3],out[12]; rz(pi/512) out[12]; cx b[3],a[2]; rz(-pi/512) a[2]; cx a[2],out[12]; rz(pi/512) out[12]; cx a[2],out[12]; rz(-pi/512) out[12]; cx b[3],a[2]; rz(pi/512) a[2]; cx a[2],out[12]; rz(-pi/512) out[12]; cx a[2],out[12]; rz(pi/512) out[12]; rz(pi/1024) b[3]; cx b[3],out[13]; rz(-pi/1024) out[13]; cx b[3],out[13]; rz(pi/1024) out[13]; cx b[3],a[2]; rz(-pi/1024) a[2]; cx a[2],out[13]; rz(pi/1024) out[13]; cx a[2],out[13]; rz(-pi/1024) out[13]; cx b[3],a[2]; rz(pi/1024) a[2]; cx a[2],out[13]; rz(-pi/1024) out[13]; cx a[2],out[13]; rz(pi/1024) out[13]; rz(pi/2048) b[3]; cx b[3],out[14]; rz(-pi/2048) out[14]; cx b[3],out[14]; rz(pi/2048) out[14]; cx b[3],a[2]; rz(-pi/2048) a[2]; cx a[2],out[14]; rz(pi/2048) out[14]; cx a[2],out[14]; rz(-pi/2048) out[14]; cx b[3],a[2]; rz(pi/2048) a[2]; cx a[2],out[14]; rz(-pi/2048) out[14]; cx a[2],out[14]; rz(pi/2048) out[14]; rz(pi/4096) b[3]; cx b[3],out[15]; rz(-pi/4096) out[15]; cx b[3],out[15]; rz(pi/4096) out[15]; cx b[3],a[2]; rz(-pi/4096) a[2]; cx a[2],out[15]; rz(pi/4096) out[15]; cx a[2],out[15]; rz(-pi/4096) out[15]; cx b[3],a[2]; rz(pi/4096) a[2]; cx a[2],out[15]; rz(-pi/4096) out[15]; cx a[2],out[15]; rz(pi/4096) out[15]; cx b[2],a[2]; rz(-4*pi) a[2]; cx a[2],out[0]; rz(4*pi) out[0]; cx a[2],out[0]; rz(-4*pi) out[0]; cx b[2],a[2]; rz(4*pi) a[2]; cx a[2],out[0]; rz(-4*pi) out[0]; cx a[2],out[0]; rz(4*pi) out[0]; cx b[1],out[0]; rz(-2*pi) out[0]; cx b[1],out[0]; rz(2*pi) out[0]; rz(2*pi) b[2]; cx b[2],out[1]; rz(-2*pi) out[1]; cx b[2],out[1]; rz(2*pi) out[1]; cx b[2],a[2]; rz(-2*pi) a[2]; cx a[2],out[1]; rz(2*pi) out[1]; cx a[2],out[1]; rz(-2*pi) out[1]; cx b[2],a[2]; rz(2*pi) a[2]; cx a[2],out[1]; rz(-2*pi) out[1]; cx a[2],out[1]; rz(2*pi) out[1]; rz(pi) b[2]; cx b[2],out[2]; rz(-pi) out[2]; cx b[2],out[2]; rz(pi) out[2]; cx b[2],a[2]; rz(-pi) a[2]; cx a[2],out[2]; rz(pi) out[2]; cx a[2],out[2]; rz(-pi) out[2]; cx b[2],a[2]; rz(pi) a[2]; cx a[2],out[2]; rz(-pi) out[2]; cx a[2],out[2]; rz(pi) out[2]; rz(pi/2) b[2]; cx b[2],out[3]; rz(-pi/2) out[3]; cx b[2],out[3]; rz(pi/2) out[3]; cx b[2],a[2]; rz(-pi/2) a[2]; cx a[2],out[3]; rz(pi/2) out[3]; cx a[2],out[3]; rz(-pi/2) out[3]; cx b[2],a[2]; rz(pi/2) a[2]; cx a[2],out[3]; rz(-pi/2) out[3]; cx a[2],out[3]; rz(pi/2) out[3]; rz(pi/4) b[2]; cx b[2],out[4]; rz(-pi/4) out[4]; cx b[2],out[4]; rz(pi/4) out[4]; cx b[2],a[2]; rz(-pi/4) a[2]; cx a[2],out[4]; rz(pi/4) out[4]; cx a[2],out[4]; rz(-pi/4) out[4]; cx b[2],a[2]; rz(pi/4) a[2]; cx a[2],out[4]; rz(-pi/4) out[4]; cx a[2],out[4]; rz(pi/4) out[4]; rz(pi/8) b[2]; cx b[2],out[5]; rz(-pi/8) out[5]; cx b[2],out[5]; rz(pi/8) out[5]; cx b[2],a[2]; rz(-pi/8) a[2]; cx a[2],out[5]; rz(pi/8) out[5]; cx a[2],out[5]; rz(-pi/8) out[5]; cx b[2],a[2]; rz(pi/8) a[2]; cx a[2],out[5]; rz(-pi/8) out[5]; cx a[2],out[5]; rz(pi/8) out[5]; rz(pi/16) b[2]; cx b[2],out[6]; rz(-pi/16) out[6]; cx b[2],out[6]; rz(pi/16) out[6]; cx b[2],a[2]; rz(-pi/16) a[2]; cx a[2],out[6]; rz(pi/16) out[6]; cx a[2],out[6]; rz(-pi/16) out[6]; cx b[2],a[2]; rz(pi/16) a[2]; cx a[2],out[6]; rz(-pi/16) out[6]; cx a[2],out[6]; rz(pi/16) out[6]; rz(pi/32) b[2]; cx b[2],out[7]; rz(-pi/32) out[7]; cx b[2],out[7]; rz(pi/32) out[7]; cx b[2],a[2]; rz(-pi/32) a[2]; cx a[2],out[7]; rz(pi/32) out[7]; cx a[2],out[7]; rz(-pi/32) out[7]; cx b[2],a[2]; rz(pi/32) a[2]; cx a[2],out[7]; rz(-pi/32) out[7]; cx a[2],out[7]; rz(pi/32) out[7]; rz(pi/64) b[2]; cx b[2],out[8]; rz(-pi/64) out[8]; cx b[2],out[8]; rz(pi/64) out[8]; cx b[2],a[2]; rz(-pi/64) a[2]; cx a[2],out[8]; rz(pi/64) out[8]; cx a[2],out[8]; rz(-pi/64) out[8]; cx b[2],a[2]; rz(pi/64) a[2]; cx a[2],out[8]; rz(-pi/64) out[8]; cx a[2],out[8]; rz(pi/64) out[8]; rz(pi/128) b[2]; cx b[2],out[9]; rz(-pi/128) out[9]; cx b[2],out[9]; rz(pi/128) out[9]; cx b[2],a[2]; rz(-pi/128) a[2]; cx a[2],out[9]; rz(pi/128) out[9]; cx a[2],out[9]; rz(-pi/128) out[9]; cx b[2],a[2]; rz(pi/128) a[2]; cx a[2],out[9]; rz(-pi/128) out[9]; cx a[2],out[9]; rz(pi/128) out[9]; rz(pi/256) b[2]; cx b[2],out[10]; rz(-pi/256) out[10]; cx b[2],out[10]; rz(pi/256) out[10]; cx b[2],a[2]; rz(-pi/256) a[2]; cx a[2],out[10]; rz(pi/256) out[10]; cx a[2],out[10]; rz(-pi/256) out[10]; cx b[2],a[2]; rz(pi/256) a[2]; cx a[2],out[10]; rz(-pi/256) out[10]; cx a[2],out[10]; rz(pi/256) out[10]; rz(pi/512) b[2]; cx b[2],out[11]; rz(-pi/512) out[11]; cx b[2],out[11]; rz(pi/512) out[11]; cx b[2],a[2]; rz(-pi/512) a[2]; cx a[2],out[11]; rz(pi/512) out[11]; cx a[2],out[11]; rz(-pi/512) out[11]; cx b[2],a[2]; rz(pi/512) a[2]; cx a[2],out[11]; rz(-pi/512) out[11]; cx a[2],out[11]; rz(pi/512) out[11]; rz(pi/1024) b[2]; cx b[2],out[12]; rz(-pi/1024) out[12]; cx b[2],out[12]; rz(pi/1024) out[12]; cx b[2],a[2]; rz(-pi/1024) a[2]; cx a[2],out[12]; rz(pi/1024) out[12]; cx a[2],out[12]; rz(-pi/1024) out[12]; cx b[2],a[2]; rz(pi/1024) a[2]; cx a[2],out[12]; rz(-pi/1024) out[12]; cx a[2],out[12]; rz(pi/1024) out[12]; rz(pi/2048) b[2]; cx b[2],out[13]; rz(-pi/2048) out[13]; cx b[2],out[13]; rz(pi/2048) out[13]; cx b[2],a[2]; rz(-pi/2048) a[2]; cx a[2],out[13]; rz(pi/2048) out[13]; cx a[2],out[13]; rz(-pi/2048) out[13]; cx b[2],a[2]; rz(pi/2048) a[2]; cx a[2],out[13]; rz(-pi/2048) out[13]; cx a[2],out[13]; rz(pi/2048) out[13]; rz(pi/4096) b[2]; cx b[2],out[14]; rz(-pi/4096) out[14]; cx b[2],out[14]; rz(pi/4096) out[14]; cx b[2],a[2]; rz(-pi/4096) a[2]; cx a[2],out[14]; rz(pi/4096) out[14]; cx a[2],out[14]; rz(-pi/4096) out[14]; cx b[2],a[2]; rz(pi/4096) a[2]; cx a[2],out[14]; rz(-pi/4096) out[14]; cx a[2],out[14]; rz(pi/4096) out[14]; rz(pi/8192) b[2]; cx b[2],out[15]; rz(-pi/8192) out[15]; cx b[2],out[15]; rz(pi/8192) out[15]; cx b[2],a[2]; rz(-pi/8192) a[2]; cx a[2],out[15]; rz(pi/8192) out[15]; cx a[2],out[15]; rz(-pi/8192) out[15]; cx b[2],a[2]; rz(pi/8192) a[2]; cx a[2],out[15]; rz(-pi/8192) out[15]; cx a[2],out[15]; rz(pi/8192) out[15]; cx b[1],a[2]; rz(-2*pi) a[2]; cx a[2],out[0]; rz(2*pi) out[0]; cx a[2],out[0]; rz(-2*pi) out[0]; cx b[1],a[2]; rz(2*pi) a[2]; cx a[2],out[0]; rz(-2*pi) out[0]; cx a[2],out[0]; rz(2*pi) out[0]; cx b[0],out[0]; rz(-pi) out[0]; cx b[0],out[0]; rz(pi) out[0]; rz(pi) b[1]; cx b[1],out[1]; rz(-pi) out[1]; cx b[1],out[1]; rz(pi) out[1]; cx b[1],a[2]; rz(-pi) a[2]; cx a[2],out[1]; rz(pi) out[1]; cx a[2],out[1]; rz(-pi) out[1]; cx b[1],a[2]; rz(pi) a[2]; cx a[2],out[1]; rz(-pi) out[1]; cx a[2],out[1]; rz(pi) out[1]; rz(pi/2) b[1]; cx b[1],out[2]; rz(-pi/2) out[2]; cx b[1],out[2]; rz(pi/2) out[2]; cx b[1],a[2]; rz(-pi/2) a[2]; cx a[2],out[2]; rz(pi/2) out[2]; cx a[2],out[2]; rz(-pi/2) out[2]; cx b[1],a[2]; rz(pi/2) a[2]; cx a[2],out[2]; rz(-pi/2) out[2]; cx a[2],out[2]; rz(pi/2) out[2]; rz(pi/4) b[1]; cx b[1],out[3]; rz(-pi/4) out[3]; cx b[1],out[3]; rz(pi/4) out[3]; cx b[1],a[2]; rz(-pi/4) a[2]; cx a[2],out[3]; rz(pi/4) out[3]; cx a[2],out[3]; rz(-pi/4) out[3]; cx b[1],a[2]; rz(pi/4) a[2]; cx a[2],out[3]; rz(-pi/4) out[3]; cx a[2],out[3]; rz(pi/4) out[3]; rz(pi/8) b[1]; cx b[1],out[4]; rz(-pi/8) out[4]; cx b[1],out[4]; rz(pi/8) out[4]; cx b[1],a[2]; rz(-pi/8) a[2]; cx a[2],out[4]; rz(pi/8) out[4]; cx a[2],out[4]; rz(-pi/8) out[4]; cx b[1],a[2]; rz(pi/8) a[2]; cx a[2],out[4]; rz(-pi/8) out[4]; cx a[2],out[4]; rz(pi/8) out[4]; rz(pi/16) b[1]; cx b[1],out[5]; rz(-pi/16) out[5]; cx b[1],out[5]; rz(pi/16) out[5]; cx b[1],a[2]; rz(-pi/16) a[2]; cx a[2],out[5]; rz(pi/16) out[5]; cx a[2],out[5]; rz(-pi/16) out[5]; cx b[1],a[2]; rz(pi/16) a[2]; cx a[2],out[5]; rz(-pi/16) out[5]; cx a[2],out[5]; rz(pi/16) out[5]; rz(pi/32) b[1]; cx b[1],out[6]; rz(-pi/32) out[6]; cx b[1],out[6]; rz(pi/32) out[6]; cx b[1],a[2]; rz(-pi/32) a[2]; cx a[2],out[6]; rz(pi/32) out[6]; cx a[2],out[6]; rz(-pi/32) out[6]; cx b[1],a[2]; rz(pi/32) a[2]; cx a[2],out[6]; rz(-pi/32) out[6]; cx a[2],out[6]; rz(pi/32) out[6]; rz(pi/64) b[1]; cx b[1],out[7]; rz(-pi/64) out[7]; cx b[1],out[7]; rz(pi/64) out[7]; cx b[1],a[2]; rz(-pi/64) a[2]; cx a[2],out[7]; rz(pi/64) out[7]; cx a[2],out[7]; rz(-pi/64) out[7]; cx b[1],a[2]; rz(pi/64) a[2]; cx a[2],out[7]; rz(-pi/64) out[7]; cx a[2],out[7]; rz(pi/64) out[7]; rz(pi/128) b[1]; cx b[1],out[8]; rz(-pi/128) out[8]; cx b[1],out[8]; rz(pi/128) out[8]; cx b[1],a[2]; rz(-pi/128) a[2]; cx a[2],out[8]; rz(pi/128) out[8]; cx a[2],out[8]; rz(-pi/128) out[8]; cx b[1],a[2]; rz(pi/128) a[2]; cx a[2],out[8]; rz(-pi/128) out[8]; cx a[2],out[8]; rz(pi/128) out[8]; rz(pi/256) b[1]; cx b[1],out[9]; rz(-pi/256) out[9]; cx b[1],out[9]; rz(pi/256) out[9]; cx b[1],a[2]; rz(-pi/256) a[2]; cx a[2],out[9]; rz(pi/256) out[9]; cx a[2],out[9]; rz(-pi/256) out[9]; cx b[1],a[2]; rz(pi/256) a[2]; cx a[2],out[9]; rz(-pi/256) out[9]; cx a[2],out[9]; rz(pi/256) out[9]; rz(pi/512) b[1]; cx b[1],out[10]; rz(-pi/512) out[10]; cx b[1],out[10]; rz(pi/512) out[10]; cx b[1],a[2]; rz(-pi/512) a[2]; cx a[2],out[10]; rz(pi/512) out[10]; cx a[2],out[10]; rz(-pi/512) out[10]; cx b[1],a[2]; rz(pi/512) a[2]; cx a[2],out[10]; rz(-pi/512) out[10]; cx a[2],out[10]; rz(pi/512) out[10]; rz(pi/1024) b[1]; cx b[1],out[11]; rz(-pi/1024) out[11]; cx b[1],out[11]; rz(pi/1024) out[11]; cx b[1],a[2]; rz(-pi/1024) a[2]; cx a[2],out[11]; rz(pi/1024) out[11]; cx a[2],out[11]; rz(-pi/1024) out[11]; cx b[1],a[2]; rz(pi/1024) a[2]; cx a[2],out[11]; rz(-pi/1024) out[11]; cx a[2],out[11]; rz(pi/1024) out[11]; rz(pi/2048) b[1]; cx b[1],out[12]; rz(-pi/2048) out[12]; cx b[1],out[12]; rz(pi/2048) out[12]; cx b[1],a[2]; rz(-pi/2048) a[2]; cx a[2],out[12]; rz(pi/2048) out[12]; cx a[2],out[12]; rz(-pi/2048) out[12]; cx b[1],a[2]; rz(pi/2048) a[2]; cx a[2],out[12]; rz(-pi/2048) out[12]; cx a[2],out[12]; rz(pi/2048) out[12]; rz(pi/4096) b[1]; cx b[1],out[13]; rz(-pi/4096) out[13]; cx b[1],out[13]; rz(pi/4096) out[13]; cx b[1],a[2]; rz(-pi/4096) a[2]; cx a[2],out[13]; rz(pi/4096) out[13]; cx a[2],out[13]; rz(-pi/4096) out[13]; cx b[1],a[2]; rz(pi/4096) a[2]; cx a[2],out[13]; rz(-pi/4096) out[13]; cx a[2],out[13]; rz(pi/4096) out[13]; rz(pi/8192) b[1]; cx b[1],out[14]; rz(-pi/8192) out[14]; cx b[1],out[14]; rz(pi/8192) out[14]; cx b[1],a[2]; rz(-pi/8192) a[2]; cx a[2],out[14]; rz(pi/8192) out[14]; cx a[2],out[14]; rz(-pi/8192) out[14]; cx b[1],a[2]; rz(pi/8192) a[2]; cx a[2],out[14]; rz(-pi/8192) out[14]; cx a[2],out[14]; rz(pi/8192) out[14]; rz(pi/16384) b[1]; cx b[1],out[15]; rz(-pi/16384) out[15]; cx b[1],out[15]; rz(pi/16384) out[15]; cx b[1],a[2]; rz(-pi/16384) a[2]; cx a[2],out[15]; rz(pi/16384) out[15]; cx a[2],out[15]; rz(-pi/16384) out[15]; cx b[1],a[2]; rz(pi/16384) a[2]; cx a[2],out[15]; rz(-pi/16384) out[15]; cx a[2],out[15]; rz(pi/16384) out[15]; cx b[0],a[2]; rz(-pi) a[2]; cx a[2],out[0]; rz(pi) out[0]; cx a[2],out[0]; rz(-pi) out[0]; cx b[0],a[2]; rz(pi) a[2]; cx a[2],out[0]; rz(-pi) out[0]; cx a[2],out[0]; rz(pi) out[0]; rz(pi/2) b[0]; cx b[0],out[1]; rz(-pi/2) out[1]; cx b[0],out[1]; rz(pi/2) out[1]; cx b[0],a[2]; rz(-pi/2) a[2]; cx a[2],out[1]; rz(pi/2) out[1]; cx a[2],out[1]; rz(-pi/2) out[1]; cx b[0],a[2]; rz(pi/2) a[2]; cx a[2],out[1]; rz(-pi/2) out[1]; cx a[2],out[1]; rz(pi/2) out[1]; rz(pi/4) b[0]; cx b[0],out[2]; rz(-pi/4) out[2]; cx b[0],out[2]; rz(pi/4) out[2]; cx b[0],a[2]; rz(-pi/4) a[2]; cx a[2],out[2]; rz(pi/4) out[2]; cx a[2],out[2]; rz(-pi/4) out[2]; cx b[0],a[2]; rz(pi/4) a[2]; cx a[2],out[2]; rz(-pi/4) out[2]; cx a[2],out[2]; rz(pi/4) out[2]; rz(pi/8) b[0]; cx b[0],out[3]; rz(-pi/8) out[3]; cx b[0],out[3]; rz(pi/8) out[3]; cx b[0],a[2]; rz(-pi/8) a[2]; cx a[2],out[3]; rz(pi/8) out[3]; cx a[2],out[3]; rz(-pi/8) out[3]; cx b[0],a[2]; rz(pi/8) a[2]; cx a[2],out[3]; rz(-pi/8) out[3]; cx a[2],out[3]; rz(pi/8) out[3]; rz(pi/16) b[0]; cx b[0],out[4]; rz(-pi/16) out[4]; cx b[0],out[4]; rz(pi/16) out[4]; cx b[0],a[2]; rz(-pi/16) a[2]; cx a[2],out[4]; rz(pi/16) out[4]; cx a[2],out[4]; rz(-pi/16) out[4]; cx b[0],a[2]; rz(pi/16) a[2]; cx a[2],out[4]; rz(-pi/16) out[4]; cx a[2],out[4]; rz(pi/16) out[4]; rz(pi/32) b[0]; cx b[0],out[5]; rz(-pi/32) out[5]; cx b[0],out[5]; rz(pi/32) out[5]; cx b[0],a[2]; rz(-pi/32) a[2]; cx a[2],out[5]; rz(pi/32) out[5]; cx a[2],out[5]; rz(-pi/32) out[5]; cx b[0],a[2]; rz(pi/32) a[2]; cx a[2],out[5]; rz(-pi/32) out[5]; cx a[2],out[5]; rz(pi/32) out[5]; rz(pi/64) b[0]; cx b[0],out[6]; rz(-pi/64) out[6]; cx b[0],out[6]; rz(pi/64) out[6]; cx b[0],a[2]; rz(-pi/64) a[2]; cx a[2],out[6]; rz(pi/64) out[6]; cx a[2],out[6]; rz(-pi/64) out[6]; cx b[0],a[2]; rz(pi/64) a[2]; cx a[2],out[6]; rz(-pi/64) out[6]; cx a[2],out[6]; rz(pi/64) out[6]; rz(pi/128) b[0]; cx b[0],out[7]; rz(-pi/128) out[7]; cx b[0],out[7]; rz(pi/128) out[7]; cx b[0],a[2]; rz(-pi/128) a[2]; cx a[2],out[7]; rz(pi/128) out[7]; cx a[2],out[7]; rz(-pi/128) out[7]; cx b[0],a[2]; rz(pi/128) a[2]; cx a[2],out[7]; rz(-pi/128) out[7]; cx a[2],out[7]; rz(pi/128) out[7]; rz(pi/256) b[0]; cx b[0],out[8]; rz(-pi/256) out[8]; cx b[0],out[8]; rz(pi/256) out[8]; cx b[0],a[2]; rz(-pi/256) a[2]; cx a[2],out[8]; rz(pi/256) out[8]; cx a[2],out[8]; rz(-pi/256) out[8]; cx b[0],a[2]; rz(pi/256) a[2]; cx a[2],out[8]; rz(-pi/256) out[8]; cx a[2],out[8]; rz(pi/256) out[8]; rz(pi/512) b[0]; cx b[0],out[9]; rz(-pi/512) out[9]; cx b[0],out[9]; rz(pi/512) out[9]; cx b[0],a[2]; rz(-pi/512) a[2]; cx a[2],out[9]; rz(pi/512) out[9]; cx a[2],out[9]; rz(-pi/512) out[9]; cx b[0],a[2]; rz(pi/512) a[2]; cx a[2],out[9]; rz(-pi/512) out[9]; cx a[2],out[9]; rz(pi/512) out[9]; rz(pi/1024) b[0]; cx b[0],out[10]; rz(-pi/1024) out[10]; cx b[0],out[10]; rz(pi/1024) out[10]; cx b[0],a[2]; rz(-pi/1024) a[2]; cx a[2],out[10]; rz(pi/1024) out[10]; cx a[2],out[10]; rz(-pi/1024) out[10]; cx b[0],a[2]; rz(pi/1024) a[2]; cx a[2],out[10]; rz(-pi/1024) out[10]; cx a[2],out[10]; rz(pi/1024) out[10]; rz(pi/2048) b[0]; cx b[0],out[11]; rz(-pi/2048) out[11]; cx b[0],out[11]; rz(pi/2048) out[11]; cx b[0],a[2]; rz(-pi/2048) a[2]; cx a[2],out[11]; rz(pi/2048) out[11]; cx a[2],out[11]; rz(-pi/2048) out[11]; cx b[0],a[2]; rz(pi/2048) a[2]; cx a[2],out[11]; rz(-pi/2048) out[11]; cx a[2],out[11]; rz(pi/2048) out[11]; rz(pi/4096) b[0]; cx b[0],out[12]; rz(-pi/4096) out[12]; cx b[0],out[12]; rz(pi/4096) out[12]; cx b[0],a[2]; rz(-pi/4096) a[2]; cx a[2],out[12]; rz(pi/4096) out[12]; cx a[2],out[12]; rz(-pi/4096) out[12]; cx b[0],a[2]; rz(pi/4096) a[2]; cx a[2],out[12]; rz(-pi/4096) out[12]; cx a[2],out[12]; rz(pi/4096) out[12]; rz(pi/8192) b[0]; cx b[0],out[13]; rz(-pi/8192) out[13]; cx b[0],out[13]; rz(pi/8192) out[13]; cx b[0],a[2]; rz(-pi/8192) a[2]; cx a[2],out[13]; rz(pi/8192) out[13]; cx a[2],out[13]; rz(-pi/8192) out[13]; cx b[0],a[2]; rz(pi/8192) a[2]; cx a[2],out[13]; rz(-pi/8192) out[13]; cx a[2],out[13]; rz(pi/8192) out[13]; rz(pi/16384) b[0]; cx b[0],out[14]; rz(-pi/16384) out[14]; cx b[0],out[14]; rz(pi/16384) out[14]; cx b[0],a[2]; rz(-pi/16384) a[2]; cx a[2],out[14]; rz(pi/16384) out[14]; cx a[2],out[14]; rz(-pi/16384) out[14]; cx b[0],a[2]; rz(pi/16384) a[2]; cx a[2],out[14]; rz(-pi/16384) out[14]; cx a[2],out[14]; rz(pi/16384) out[14]; rz(pi/32768) b[0]; cx b[0],out[15]; rz(-pi/32768) out[15]; cx b[0],out[15]; rz(pi/32768) out[15]; cx b[0],a[2]; rz(-pi/32768) a[2]; cx a[2],out[15]; rz(pi/32768) out[15]; cx a[2],out[15]; rz(-pi/32768) out[15]; cx b[0],a[2]; rz(pi/32768) a[2]; cx a[2],out[15]; rz(-pi/32768) out[15]; cx a[2],out[15]; rz(pi/32768) out[15]; rz(pi/2) b[0]; rz(pi) b[1]; rz(2*pi) b[2]; rz(4*pi) b[3]; rz(8*pi) b[4]; rz(16*pi) b[5]; rz(32*pi) b[6]; rz(64*pi) b[7]; cx b[7],out[0]; rz(-64*pi) out[0]; cx b[7],out[0]; rz(64*pi) out[0]; cx b[7],a[1]; rz(-64*pi) a[1]; cx a[1],out[0]; rz(64*pi) out[0]; cx a[1],out[0]; rz(-64*pi) out[0]; cx b[7],a[1]; rz(64*pi) a[1]; cx a[1],out[0]; rz(-64*pi) out[0]; cx a[1],out[0]; rz(64*pi) out[0]; cx b[6],out[0]; rz(-32*pi) out[0]; cx b[6],out[0]; rz(32*pi) out[0]; rz(32*pi) b[7]; cx b[7],out[1]; rz(-32*pi) out[1]; cx b[7],out[1]; rz(32*pi) out[1]; cx b[7],a[1]; rz(-32*pi) a[1]; cx a[1],out[1]; rz(32*pi) out[1]; cx a[1],out[1]; rz(-32*pi) out[1]; cx b[7],a[1]; rz(32*pi) a[1]; cx a[1],out[1]; rz(-32*pi) out[1]; cx a[1],out[1]; rz(32*pi) out[1]; rz(16*pi) b[7]; cx b[7],out[2]; rz(-16*pi) out[2]; cx b[7],out[2]; rz(16*pi) out[2]; cx b[7],a[1]; rz(-16*pi) a[1]; cx a[1],out[2]; rz(16*pi) out[2]; cx a[1],out[2]; rz(-16*pi) out[2]; cx b[7],a[1]; rz(16*pi) a[1]; cx a[1],out[2]; rz(-16*pi) out[2]; cx a[1],out[2]; rz(16*pi) out[2]; rz(8*pi) b[7]; cx b[7],out[3]; rz(-8*pi) out[3]; cx b[7],out[3]; rz(8*pi) out[3]; cx b[7],a[1]; rz(-8*pi) a[1]; cx a[1],out[3]; rz(8*pi) out[3]; cx a[1],out[3]; rz(-8*pi) out[3]; cx b[7],a[1]; rz(8*pi) a[1]; cx a[1],out[3]; rz(-8*pi) out[3]; cx a[1],out[3]; rz(8*pi) out[3]; rz(4*pi) b[7]; cx b[7],out[4]; rz(-4*pi) out[4]; cx b[7],out[4]; rz(4*pi) out[4]; cx b[7],a[1]; rz(-4*pi) a[1]; cx a[1],out[4]; rz(4*pi) out[4]; cx a[1],out[4]; rz(-4*pi) out[4]; cx b[7],a[1]; rz(4*pi) a[1]; cx a[1],out[4]; rz(-4*pi) out[4]; cx a[1],out[4]; rz(4*pi) out[4]; rz(2*pi) b[7]; cx b[7],out[5]; rz(-2*pi) out[5]; cx b[7],out[5]; rz(2*pi) out[5]; cx b[7],a[1]; rz(-2*pi) a[1]; cx a[1],out[5]; rz(2*pi) out[5]; cx a[1],out[5]; rz(-2*pi) out[5]; cx b[7],a[1]; rz(2*pi) a[1]; cx a[1],out[5]; rz(-2*pi) out[5]; cx a[1],out[5]; rz(2*pi) out[5]; rz(pi) b[7]; cx b[7],out[6]; rz(-pi) out[6]; cx b[7],out[6]; rz(pi) out[6]; cx b[7],a[1]; rz(-pi) a[1]; cx a[1],out[6]; rz(pi) out[6]; cx a[1],out[6]; rz(-pi) out[6]; cx b[7],a[1]; rz(pi) a[1]; cx a[1],out[6]; rz(-pi) out[6]; cx a[1],out[6]; rz(pi) out[6]; rz(pi/2) b[7]; cx b[7],out[7]; rz(-pi/2) out[7]; cx b[7],out[7]; rz(pi/2) out[7]; cx b[7],a[1]; rz(-pi/2) a[1]; cx a[1],out[7]; rz(pi/2) out[7]; cx a[1],out[7]; rz(-pi/2) out[7]; cx b[7],a[1]; rz(pi/2) a[1]; cx a[1],out[7]; rz(-pi/2) out[7]; cx a[1],out[7]; rz(pi/2) out[7]; rz(pi/4) b[7]; cx b[7],out[8]; rz(-pi/4) out[8]; cx b[7],out[8]; rz(pi/4) out[8]; cx b[7],a[1]; rz(-pi/4) a[1]; cx a[1],out[8]; rz(pi/4) out[8]; cx a[1],out[8]; rz(-pi/4) out[8]; cx b[7],a[1]; rz(pi/4) a[1]; cx a[1],out[8]; rz(-pi/4) out[8]; cx a[1],out[8]; rz(pi/4) out[8]; rz(pi/8) b[7]; cx b[7],out[9]; rz(-pi/8) out[9]; cx b[7],out[9]; rz(pi/8) out[9]; cx b[7],a[1]; rz(-pi/8) a[1]; cx a[1],out[9]; rz(pi/8) out[9]; cx a[1],out[9]; rz(-pi/8) out[9]; cx b[7],a[1]; rz(pi/8) a[1]; cx a[1],out[9]; rz(-pi/8) out[9]; cx a[1],out[9]; rz(pi/8) out[9]; rz(pi/16) b[7]; cx b[7],out[10]; rz(-pi/16) out[10]; cx b[7],out[10]; rz(pi/16) out[10]; cx b[7],a[1]; rz(-pi/16) a[1]; cx a[1],out[10]; rz(pi/16) out[10]; cx a[1],out[10]; rz(-pi/16) out[10]; cx b[7],a[1]; rz(pi/16) a[1]; cx a[1],out[10]; rz(-pi/16) out[10]; cx a[1],out[10]; rz(pi/16) out[10]; rz(pi/32) b[7]; cx b[7],out[11]; rz(-pi/32) out[11]; cx b[7],out[11]; rz(pi/32) out[11]; cx b[7],a[1]; rz(-pi/32) a[1]; cx a[1],out[11]; rz(pi/32) out[11]; cx a[1],out[11]; rz(-pi/32) out[11]; cx b[7],a[1]; rz(pi/32) a[1]; cx a[1],out[11]; rz(-pi/32) out[11]; cx a[1],out[11]; rz(pi/32) out[11]; rz(pi/64) b[7]; cx b[7],out[12]; rz(-pi/64) out[12]; cx b[7],out[12]; rz(pi/64) out[12]; cx b[7],a[1]; rz(-pi/64) a[1]; cx a[1],out[12]; rz(pi/64) out[12]; cx a[1],out[12]; rz(-pi/64) out[12]; cx b[7],a[1]; rz(pi/64) a[1]; cx a[1],out[12]; rz(-pi/64) out[12]; cx a[1],out[12]; rz(pi/64) out[12]; rz(pi/128) b[7]; cx b[7],out[13]; rz(-pi/128) out[13]; cx b[7],out[13]; rz(pi/128) out[13]; cx b[7],a[1]; rz(-pi/128) a[1]; cx a[1],out[13]; rz(pi/128) out[13]; cx a[1],out[13]; rz(-pi/128) out[13]; cx b[7],a[1]; rz(pi/128) a[1]; cx a[1],out[13]; rz(-pi/128) out[13]; cx a[1],out[13]; rz(pi/128) out[13]; rz(pi/256) b[7]; cx b[7],out[14]; rz(-pi/256) out[14]; cx b[7],out[14]; rz(pi/256) out[14]; cx b[7],a[1]; rz(-pi/256) a[1]; cx a[1],out[14]; rz(pi/256) out[14]; cx a[1],out[14]; rz(-pi/256) out[14]; cx b[7],a[1]; rz(pi/256) a[1]; cx a[1],out[14]; rz(-pi/256) out[14]; cx a[1],out[14]; rz(pi/256) out[14]; rz(pi/512) b[7]; cx b[7],out[15]; rz(-pi/512) out[15]; cx b[7],out[15]; rz(pi/512) out[15]; cx b[7],a[1]; rz(-pi/512) a[1]; cx a[1],out[15]; rz(pi/512) out[15]; cx a[1],out[15]; rz(-pi/512) out[15]; cx b[7],a[1]; rz(pi/512) a[1]; cx a[1],out[15]; rz(-pi/512) out[15]; cx a[1],out[15]; rz(pi/512) out[15]; cx b[6],a[1]; rz(-32*pi) a[1]; cx a[1],out[0]; rz(32*pi) out[0]; cx a[1],out[0]; rz(-32*pi) out[0]; cx b[6],a[1]; rz(32*pi) a[1]; cx a[1],out[0]; rz(-32*pi) out[0]; cx a[1],out[0]; rz(32*pi) out[0]; cx b[5],out[0]; rz(-16*pi) out[0]; cx b[5],out[0]; rz(16*pi) out[0]; rz(16*pi) b[6]; cx b[6],out[1]; rz(-16*pi) out[1]; cx b[6],out[1]; rz(16*pi) out[1]; cx b[6],a[1]; rz(-16*pi) a[1]; cx a[1],out[1]; rz(16*pi) out[1]; cx a[1],out[1]; rz(-16*pi) out[1]; cx b[6],a[1]; rz(16*pi) a[1]; cx a[1],out[1]; rz(-16*pi) out[1]; cx a[1],out[1]; rz(16*pi) out[1]; rz(8*pi) b[6]; cx b[6],out[2]; rz(-8*pi) out[2]; cx b[6],out[2]; rz(8*pi) out[2]; cx b[6],a[1]; rz(-8*pi) a[1]; cx a[1],out[2]; rz(8*pi) out[2]; cx a[1],out[2]; rz(-8*pi) out[2]; cx b[6],a[1]; rz(8*pi) a[1]; cx a[1],out[2]; rz(-8*pi) out[2]; cx a[1],out[2]; rz(8*pi) out[2]; rz(4*pi) b[6]; cx b[6],out[3]; rz(-4*pi) out[3]; cx b[6],out[3]; rz(4*pi) out[3]; cx b[6],a[1]; rz(-4*pi) a[1]; cx a[1],out[3]; rz(4*pi) out[3]; cx a[1],out[3]; rz(-4*pi) out[3]; cx b[6],a[1]; rz(4*pi) a[1]; cx a[1],out[3]; rz(-4*pi) out[3]; cx a[1],out[3]; rz(4*pi) out[3]; rz(2*pi) b[6]; cx b[6],out[4]; rz(-2*pi) out[4]; cx b[6],out[4]; rz(2*pi) out[4]; cx b[6],a[1]; rz(-2*pi) a[1]; cx a[1],out[4]; rz(2*pi) out[4]; cx a[1],out[4]; rz(-2*pi) out[4]; cx b[6],a[1]; rz(2*pi) a[1]; cx a[1],out[4]; rz(-2*pi) out[4]; cx a[1],out[4]; rz(2*pi) out[4]; rz(pi) b[6]; cx b[6],out[5]; rz(-pi) out[5]; cx b[6],out[5]; rz(pi) out[5]; cx b[6],a[1]; rz(-pi) a[1]; cx a[1],out[5]; rz(pi) out[5]; cx a[1],out[5]; rz(-pi) out[5]; cx b[6],a[1]; rz(pi) a[1]; cx a[1],out[5]; rz(-pi) out[5]; cx a[1],out[5]; rz(pi) out[5]; rz(pi/2) b[6]; cx b[6],out[6]; rz(-pi/2) out[6]; cx b[6],out[6]; rz(pi/2) out[6]; cx b[6],a[1]; rz(-pi/2) a[1]; cx a[1],out[6]; rz(pi/2) out[6]; cx a[1],out[6]; rz(-pi/2) out[6]; cx b[6],a[1]; rz(pi/2) a[1]; cx a[1],out[6]; rz(-pi/2) out[6]; cx a[1],out[6]; rz(pi/2) out[6]; rz(pi/4) b[6]; cx b[6],out[7]; rz(-pi/4) out[7]; cx b[6],out[7]; rz(pi/4) out[7]; cx b[6],a[1]; rz(-pi/4) a[1]; cx a[1],out[7]; rz(pi/4) out[7]; cx a[1],out[7]; rz(-pi/4) out[7]; cx b[6],a[1]; rz(pi/4) a[1]; cx a[1],out[7]; rz(-pi/4) out[7]; cx a[1],out[7]; rz(pi/4) out[7]; rz(pi/8) b[6]; cx b[6],out[8]; rz(-pi/8) out[8]; cx b[6],out[8]; rz(pi/8) out[8]; cx b[6],a[1]; rz(-pi/8) a[1]; cx a[1],out[8]; rz(pi/8) out[8]; cx a[1],out[8]; rz(-pi/8) out[8]; cx b[6],a[1]; rz(pi/8) a[1]; cx a[1],out[8]; rz(-pi/8) out[8]; cx a[1],out[8]; rz(pi/8) out[8]; rz(pi/16) b[6]; cx b[6],out[9]; rz(-pi/16) out[9]; cx b[6],out[9]; rz(pi/16) out[9]; cx b[6],a[1]; rz(-pi/16) a[1]; cx a[1],out[9]; rz(pi/16) out[9]; cx a[1],out[9]; rz(-pi/16) out[9]; cx b[6],a[1]; rz(pi/16) a[1]; cx a[1],out[9]; rz(-pi/16) out[9]; cx a[1],out[9]; rz(pi/16) out[9]; rz(pi/32) b[6]; cx b[6],out[10]; rz(-pi/32) out[10]; cx b[6],out[10]; rz(pi/32) out[10]; cx b[6],a[1]; rz(-pi/32) a[1]; cx a[1],out[10]; rz(pi/32) out[10]; cx a[1],out[10]; rz(-pi/32) out[10]; cx b[6],a[1]; rz(pi/32) a[1]; cx a[1],out[10]; rz(-pi/32) out[10]; cx a[1],out[10]; rz(pi/32) out[10]; rz(pi/64) b[6]; cx b[6],out[11]; rz(-pi/64) out[11]; cx b[6],out[11]; rz(pi/64) out[11]; cx b[6],a[1]; rz(-pi/64) a[1]; cx a[1],out[11]; rz(pi/64) out[11]; cx a[1],out[11]; rz(-pi/64) out[11]; cx b[6],a[1]; rz(pi/64) a[1]; cx a[1],out[11]; rz(-pi/64) out[11]; cx a[1],out[11]; rz(pi/64) out[11]; rz(pi/128) b[6]; cx b[6],out[12]; rz(-pi/128) out[12]; cx b[6],out[12]; rz(pi/128) out[12]; cx b[6],a[1]; rz(-pi/128) a[1]; cx a[1],out[12]; rz(pi/128) out[12]; cx a[1],out[12]; rz(-pi/128) out[12]; cx b[6],a[1]; rz(pi/128) a[1]; cx a[1],out[12]; rz(-pi/128) out[12]; cx a[1],out[12]; rz(pi/128) out[12]; rz(pi/256) b[6]; cx b[6],out[13]; rz(-pi/256) out[13]; cx b[6],out[13]; rz(pi/256) out[13]; cx b[6],a[1]; rz(-pi/256) a[1]; cx a[1],out[13]; rz(pi/256) out[13]; cx a[1],out[13]; rz(-pi/256) out[13]; cx b[6],a[1]; rz(pi/256) a[1]; cx a[1],out[13]; rz(-pi/256) out[13]; cx a[1],out[13]; rz(pi/256) out[13]; rz(pi/512) b[6]; cx b[6],out[14]; rz(-pi/512) out[14]; cx b[6],out[14]; rz(pi/512) out[14]; cx b[6],a[1]; rz(-pi/512) a[1]; cx a[1],out[14]; rz(pi/512) out[14]; cx a[1],out[14]; rz(-pi/512) out[14]; cx b[6],a[1]; rz(pi/512) a[1]; cx a[1],out[14]; rz(-pi/512) out[14]; cx a[1],out[14]; rz(pi/512) out[14]; rz(pi/1024) b[6]; cx b[6],out[15]; rz(-pi/1024) out[15]; cx b[6],out[15]; rz(pi/1024) out[15]; cx b[6],a[1]; rz(-pi/1024) a[1]; cx a[1],out[15]; rz(pi/1024) out[15]; cx a[1],out[15]; rz(-pi/1024) out[15]; cx b[6],a[1]; rz(pi/1024) a[1]; cx a[1],out[15]; rz(-pi/1024) out[15]; cx a[1],out[15]; rz(pi/1024) out[15]; cx b[5],a[1]; rz(-16*pi) a[1]; cx a[1],out[0]; rz(16*pi) out[0]; cx a[1],out[0]; rz(-16*pi) out[0]; cx b[5],a[1]; rz(16*pi) a[1]; cx a[1],out[0]; rz(-16*pi) out[0]; cx a[1],out[0]; rz(16*pi) out[0]; cx b[4],out[0]; rz(-8*pi) out[0]; cx b[4],out[0]; rz(8*pi) out[0]; rz(8*pi) b[5]; cx b[5],out[1]; rz(-8*pi) out[1]; cx b[5],out[1]; rz(8*pi) out[1]; cx b[5],a[1]; rz(-8*pi) a[1]; cx a[1],out[1]; rz(8*pi) out[1]; cx a[1],out[1]; rz(-8*pi) out[1]; cx b[5],a[1]; rz(8*pi) a[1]; cx a[1],out[1]; rz(-8*pi) out[1]; cx a[1],out[1]; rz(8*pi) out[1]; rz(4*pi) b[5]; cx b[5],out[2]; rz(-4*pi) out[2]; cx b[5],out[2]; rz(4*pi) out[2]; cx b[5],a[1]; rz(-4*pi) a[1]; cx a[1],out[2]; rz(4*pi) out[2]; cx a[1],out[2]; rz(-4*pi) out[2]; cx b[5],a[1]; rz(4*pi) a[1]; cx a[1],out[2]; rz(-4*pi) out[2]; cx a[1],out[2]; rz(4*pi) out[2]; rz(2*pi) b[5]; cx b[5],out[3]; rz(-2*pi) out[3]; cx b[5],out[3]; rz(2*pi) out[3]; cx b[5],a[1]; rz(-2*pi) a[1]; cx a[1],out[3]; rz(2*pi) out[3]; cx a[1],out[3]; rz(-2*pi) out[3]; cx b[5],a[1]; rz(2*pi) a[1]; cx a[1],out[3]; rz(-2*pi) out[3]; cx a[1],out[3]; rz(2*pi) out[3]; rz(pi) b[5]; cx b[5],out[4]; rz(-pi) out[4]; cx b[5],out[4]; rz(pi) out[4]; cx b[5],a[1]; rz(-pi) a[1]; cx a[1],out[4]; rz(pi) out[4]; cx a[1],out[4]; rz(-pi) out[4]; cx b[5],a[1]; rz(pi) a[1]; cx a[1],out[4]; rz(-pi) out[4]; cx a[1],out[4]; rz(pi) out[4]; rz(pi/2) b[5]; cx b[5],out[5]; rz(-pi/2) out[5]; cx b[5],out[5]; rz(pi/2) out[5]; cx b[5],a[1]; rz(-pi/2) a[1]; cx a[1],out[5]; rz(pi/2) out[5]; cx a[1],out[5]; rz(-pi/2) out[5]; cx b[5],a[1]; rz(pi/2) a[1]; cx a[1],out[5]; rz(-pi/2) out[5]; cx a[1],out[5]; rz(pi/2) out[5]; rz(pi/4) b[5]; cx b[5],out[6]; rz(-pi/4) out[6]; cx b[5],out[6]; rz(pi/4) out[6]; cx b[5],a[1]; rz(-pi/4) a[1]; cx a[1],out[6]; rz(pi/4) out[6]; cx a[1],out[6]; rz(-pi/4) out[6]; cx b[5],a[1]; rz(pi/4) a[1]; cx a[1],out[6]; rz(-pi/4) out[6]; cx a[1],out[6]; rz(pi/4) out[6]; rz(pi/8) b[5]; cx b[5],out[7]; rz(-pi/8) out[7]; cx b[5],out[7]; rz(pi/8) out[7]; cx b[5],a[1]; rz(-pi/8) a[1]; cx a[1],out[7]; rz(pi/8) out[7]; cx a[1],out[7]; rz(-pi/8) out[7]; cx b[5],a[1]; rz(pi/8) a[1]; cx a[1],out[7]; rz(-pi/8) out[7]; cx a[1],out[7]; rz(pi/8) out[7]; rz(pi/16) b[5]; cx b[5],out[8]; rz(-pi/16) out[8]; cx b[5],out[8]; rz(pi/16) out[8]; cx b[5],a[1]; rz(-pi/16) a[1]; cx a[1],out[8]; rz(pi/16) out[8]; cx a[1],out[8]; rz(-pi/16) out[8]; cx b[5],a[1]; rz(pi/16) a[1]; cx a[1],out[8]; rz(-pi/16) out[8]; cx a[1],out[8]; rz(pi/16) out[8]; rz(pi/32) b[5]; cx b[5],out[9]; rz(-pi/32) out[9]; cx b[5],out[9]; rz(pi/32) out[9]; cx b[5],a[1]; rz(-pi/32) a[1]; cx a[1],out[9]; rz(pi/32) out[9]; cx a[1],out[9]; rz(-pi/32) out[9]; cx b[5],a[1]; rz(pi/32) a[1]; cx a[1],out[9]; rz(-pi/32) out[9]; cx a[1],out[9]; rz(pi/32) out[9]; rz(pi/64) b[5]; cx b[5],out[10]; rz(-pi/64) out[10]; cx b[5],out[10]; rz(pi/64) out[10]; cx b[5],a[1]; rz(-pi/64) a[1]; cx a[1],out[10]; rz(pi/64) out[10]; cx a[1],out[10]; rz(-pi/64) out[10]; cx b[5],a[1]; rz(pi/64) a[1]; cx a[1],out[10]; rz(-pi/64) out[10]; cx a[1],out[10]; rz(pi/64) out[10]; rz(pi/128) b[5]; cx b[5],out[11]; rz(-pi/128) out[11]; cx b[5],out[11]; rz(pi/128) out[11]; cx b[5],a[1]; rz(-pi/128) a[1]; cx a[1],out[11]; rz(pi/128) out[11]; cx a[1],out[11]; rz(-pi/128) out[11]; cx b[5],a[1]; rz(pi/128) a[1]; cx a[1],out[11]; rz(-pi/128) out[11]; cx a[1],out[11]; rz(pi/128) out[11]; rz(pi/256) b[5]; cx b[5],out[12]; rz(-pi/256) out[12]; cx b[5],out[12]; rz(pi/256) out[12]; cx b[5],a[1]; rz(-pi/256) a[1]; cx a[1],out[12]; rz(pi/256) out[12]; cx a[1],out[12]; rz(-pi/256) out[12]; cx b[5],a[1]; rz(pi/256) a[1]; cx a[1],out[12]; rz(-pi/256) out[12]; cx a[1],out[12]; rz(pi/256) out[12]; rz(pi/512) b[5]; cx b[5],out[13]; rz(-pi/512) out[13]; cx b[5],out[13]; rz(pi/512) out[13]; cx b[5],a[1]; rz(-pi/512) a[1]; cx a[1],out[13]; rz(pi/512) out[13]; cx a[1],out[13]; rz(-pi/512) out[13]; cx b[5],a[1]; rz(pi/512) a[1]; cx a[1],out[13]; rz(-pi/512) out[13]; cx a[1],out[13]; rz(pi/512) out[13]; rz(pi/1024) b[5]; cx b[5],out[14]; rz(-pi/1024) out[14]; cx b[5],out[14]; rz(pi/1024) out[14]; cx b[5],a[1]; rz(-pi/1024) a[1]; cx a[1],out[14]; rz(pi/1024) out[14]; cx a[1],out[14]; rz(-pi/1024) out[14]; cx b[5],a[1]; rz(pi/1024) a[1]; cx a[1],out[14]; rz(-pi/1024) out[14]; cx a[1],out[14]; rz(pi/1024) out[14]; rz(pi/2048) b[5]; cx b[5],out[15]; rz(-pi/2048) out[15]; cx b[5],out[15]; rz(pi/2048) out[15]; cx b[5],a[1]; rz(-pi/2048) a[1]; cx a[1],out[15]; rz(pi/2048) out[15]; cx a[1],out[15]; rz(-pi/2048) out[15]; cx b[5],a[1]; rz(pi/2048) a[1]; cx a[1],out[15]; rz(-pi/2048) out[15]; cx a[1],out[15]; rz(pi/2048) out[15]; cx b[4],a[1]; rz(-8*pi) a[1]; cx a[1],out[0]; rz(8*pi) out[0]; cx a[1],out[0]; rz(-8*pi) out[0]; cx b[4],a[1]; rz(8*pi) a[1]; cx a[1],out[0]; rz(-8*pi) out[0]; cx a[1],out[0]; rz(8*pi) out[0]; cx b[3],out[0]; rz(-4*pi) out[0]; cx b[3],out[0]; rz(4*pi) out[0]; rz(4*pi) b[4]; cx b[4],out[1]; rz(-4*pi) out[1]; cx b[4],out[1]; rz(4*pi) out[1]; cx b[4],a[1]; rz(-4*pi) a[1]; cx a[1],out[1]; rz(4*pi) out[1]; cx a[1],out[1]; rz(-4*pi) out[1]; cx b[4],a[1]; rz(4*pi) a[1]; cx a[1],out[1]; rz(-4*pi) out[1]; cx a[1],out[1]; rz(4*pi) out[1]; rz(2*pi) b[4]; cx b[4],out[2]; rz(-2*pi) out[2]; cx b[4],out[2]; rz(2*pi) out[2]; cx b[4],a[1]; rz(-2*pi) a[1]; cx a[1],out[2]; rz(2*pi) out[2]; cx a[1],out[2]; rz(-2*pi) out[2]; cx b[4],a[1]; rz(2*pi) a[1]; cx a[1],out[2]; rz(-2*pi) out[2]; cx a[1],out[2]; rz(2*pi) out[2]; rz(pi) b[4]; cx b[4],out[3]; rz(-pi) out[3]; cx b[4],out[3]; rz(pi) out[3]; cx b[4],a[1]; rz(-pi) a[1]; cx a[1],out[3]; rz(pi) out[3]; cx a[1],out[3]; rz(-pi) out[3]; cx b[4],a[1]; rz(pi) a[1]; cx a[1],out[3]; rz(-pi) out[3]; cx a[1],out[3]; rz(pi) out[3]; rz(pi/2) b[4]; cx b[4],out[4]; rz(-pi/2) out[4]; cx b[4],out[4]; rz(pi/2) out[4]; cx b[4],a[1]; rz(-pi/2) a[1]; cx a[1],out[4]; rz(pi/2) out[4]; cx a[1],out[4]; rz(-pi/2) out[4]; cx b[4],a[1]; rz(pi/2) a[1]; cx a[1],out[4]; rz(-pi/2) out[4]; cx a[1],out[4]; rz(pi/2) out[4]; rz(pi/4) b[4]; cx b[4],out[5]; rz(-pi/4) out[5]; cx b[4],out[5]; rz(pi/4) out[5]; cx b[4],a[1]; rz(-pi/4) a[1]; cx a[1],out[5]; rz(pi/4) out[5]; cx a[1],out[5]; rz(-pi/4) out[5]; cx b[4],a[1]; rz(pi/4) a[1]; cx a[1],out[5]; rz(-pi/4) out[5]; cx a[1],out[5]; rz(pi/4) out[5]; rz(pi/8) b[4]; cx b[4],out[6]; rz(-pi/8) out[6]; cx b[4],out[6]; rz(pi/8) out[6]; cx b[4],a[1]; rz(-pi/8) a[1]; cx a[1],out[6]; rz(pi/8) out[6]; cx a[1],out[6]; rz(-pi/8) out[6]; cx b[4],a[1]; rz(pi/8) a[1]; cx a[1],out[6]; rz(-pi/8) out[6]; cx a[1],out[6]; rz(pi/8) out[6]; rz(pi/16) b[4]; cx b[4],out[7]; rz(-pi/16) out[7]; cx b[4],out[7]; rz(pi/16) out[7]; cx b[4],a[1]; rz(-pi/16) a[1]; cx a[1],out[7]; rz(pi/16) out[7]; cx a[1],out[7]; rz(-pi/16) out[7]; cx b[4],a[1]; rz(pi/16) a[1]; cx a[1],out[7]; rz(-pi/16) out[7]; cx a[1],out[7]; rz(pi/16) out[7]; rz(pi/32) b[4]; cx b[4],out[8]; rz(-pi/32) out[8]; cx b[4],out[8]; rz(pi/32) out[8]; cx b[4],a[1]; rz(-pi/32) a[1]; cx a[1],out[8]; rz(pi/32) out[8]; cx a[1],out[8]; rz(-pi/32) out[8]; cx b[4],a[1]; rz(pi/32) a[1]; cx a[1],out[8]; rz(-pi/32) out[8]; cx a[1],out[8]; rz(pi/32) out[8]; rz(pi/64) b[4]; cx b[4],out[9]; rz(-pi/64) out[9]; cx b[4],out[9]; rz(pi/64) out[9]; cx b[4],a[1]; rz(-pi/64) a[1]; cx a[1],out[9]; rz(pi/64) out[9]; cx a[1],out[9]; rz(-pi/64) out[9]; cx b[4],a[1]; rz(pi/64) a[1]; cx a[1],out[9]; rz(-pi/64) out[9]; cx a[1],out[9]; rz(pi/64) out[9]; rz(pi/128) b[4]; cx b[4],out[10]; rz(-pi/128) out[10]; cx b[4],out[10]; rz(pi/128) out[10]; cx b[4],a[1]; rz(-pi/128) a[1]; cx a[1],out[10]; rz(pi/128) out[10]; cx a[1],out[10]; rz(-pi/128) out[10]; cx b[4],a[1]; rz(pi/128) a[1]; cx a[1],out[10]; rz(-pi/128) out[10]; cx a[1],out[10]; rz(pi/128) out[10]; rz(pi/256) b[4]; cx b[4],out[11]; rz(-pi/256) out[11]; cx b[4],out[11]; rz(pi/256) out[11]; cx b[4],a[1]; rz(-pi/256) a[1]; cx a[1],out[11]; rz(pi/256) out[11]; cx a[1],out[11]; rz(-pi/256) out[11]; cx b[4],a[1]; rz(pi/256) a[1]; cx a[1],out[11]; rz(-pi/256) out[11]; cx a[1],out[11]; rz(pi/256) out[11]; rz(pi/512) b[4]; cx b[4],out[12]; rz(-pi/512) out[12]; cx b[4],out[12]; rz(pi/512) out[12]; cx b[4],a[1]; rz(-pi/512) a[1]; cx a[1],out[12]; rz(pi/512) out[12]; cx a[1],out[12]; rz(-pi/512) out[12]; cx b[4],a[1]; rz(pi/512) a[1]; cx a[1],out[12]; rz(-pi/512) out[12]; cx a[1],out[12]; rz(pi/512) out[12]; rz(pi/1024) b[4]; cx b[4],out[13]; rz(-pi/1024) out[13]; cx b[4],out[13]; rz(pi/1024) out[13]; cx b[4],a[1]; rz(-pi/1024) a[1]; cx a[1],out[13]; rz(pi/1024) out[13]; cx a[1],out[13]; rz(-pi/1024) out[13]; cx b[4],a[1]; rz(pi/1024) a[1]; cx a[1],out[13]; rz(-pi/1024) out[13]; cx a[1],out[13]; rz(pi/1024) out[13]; rz(pi/2048) b[4]; cx b[4],out[14]; rz(-pi/2048) out[14]; cx b[4],out[14]; rz(pi/2048) out[14]; cx b[4],a[1]; rz(-pi/2048) a[1]; cx a[1],out[14]; rz(pi/2048) out[14]; cx a[1],out[14]; rz(-pi/2048) out[14]; cx b[4],a[1]; rz(pi/2048) a[1]; cx a[1],out[14]; rz(-pi/2048) out[14]; cx a[1],out[14]; rz(pi/2048) out[14]; rz(pi/4096) b[4]; cx b[4],out[15]; rz(-pi/4096) out[15]; cx b[4],out[15]; rz(pi/4096) out[15]; cx b[4],a[1]; rz(-pi/4096) a[1]; cx a[1],out[15]; rz(pi/4096) out[15]; cx a[1],out[15]; rz(-pi/4096) out[15]; cx b[4],a[1]; rz(pi/4096) a[1]; cx a[1],out[15]; rz(-pi/4096) out[15]; cx a[1],out[15]; rz(pi/4096) out[15]; cx b[3],a[1]; rz(-4*pi) a[1]; cx a[1],out[0]; rz(4*pi) out[0]; cx a[1],out[0]; rz(-4*pi) out[0]; cx b[3],a[1]; rz(4*pi) a[1]; cx a[1],out[0]; rz(-4*pi) out[0]; cx a[1],out[0]; rz(4*pi) out[0]; cx b[2],out[0]; rz(-2*pi) out[0]; cx b[2],out[0]; rz(2*pi) out[0]; rz(2*pi) b[3]; cx b[3],out[1]; rz(-2*pi) out[1]; cx b[3],out[1]; rz(2*pi) out[1]; cx b[3],a[1]; rz(-2*pi) a[1]; cx a[1],out[1]; rz(2*pi) out[1]; cx a[1],out[1]; rz(-2*pi) out[1]; cx b[3],a[1]; rz(2*pi) a[1]; cx a[1],out[1]; rz(-2*pi) out[1]; cx a[1],out[1]; rz(2*pi) out[1]; rz(pi) b[3]; cx b[3],out[2]; rz(-pi) out[2]; cx b[3],out[2]; rz(pi) out[2]; cx b[3],a[1]; rz(-pi) a[1]; cx a[1],out[2]; rz(pi) out[2]; cx a[1],out[2]; rz(-pi) out[2]; cx b[3],a[1]; rz(pi) a[1]; cx a[1],out[2]; rz(-pi) out[2]; cx a[1],out[2]; rz(pi) out[2]; rz(pi/2) b[3]; cx b[3],out[3]; rz(-pi/2) out[3]; cx b[3],out[3]; rz(pi/2) out[3]; cx b[3],a[1]; rz(-pi/2) a[1]; cx a[1],out[3]; rz(pi/2) out[3]; cx a[1],out[3]; rz(-pi/2) out[3]; cx b[3],a[1]; rz(pi/2) a[1]; cx a[1],out[3]; rz(-pi/2) out[3]; cx a[1],out[3]; rz(pi/2) out[3]; rz(pi/4) b[3]; cx b[3],out[4]; rz(-pi/4) out[4]; cx b[3],out[4]; rz(pi/4) out[4]; cx b[3],a[1]; rz(-pi/4) a[1]; cx a[1],out[4]; rz(pi/4) out[4]; cx a[1],out[4]; rz(-pi/4) out[4]; cx b[3],a[1]; rz(pi/4) a[1]; cx a[1],out[4]; rz(-pi/4) out[4]; cx a[1],out[4]; rz(pi/4) out[4]; rz(pi/8) b[3]; cx b[3],out[5]; rz(-pi/8) out[5]; cx b[3],out[5]; rz(pi/8) out[5]; cx b[3],a[1]; rz(-pi/8) a[1]; cx a[1],out[5]; rz(pi/8) out[5]; cx a[1],out[5]; rz(-pi/8) out[5]; cx b[3],a[1]; rz(pi/8) a[1]; cx a[1],out[5]; rz(-pi/8) out[5]; cx a[1],out[5]; rz(pi/8) out[5]; rz(pi/16) b[3]; cx b[3],out[6]; rz(-pi/16) out[6]; cx b[3],out[6]; rz(pi/16) out[6]; cx b[3],a[1]; rz(-pi/16) a[1]; cx a[1],out[6]; rz(pi/16) out[6]; cx a[1],out[6]; rz(-pi/16) out[6]; cx b[3],a[1]; rz(pi/16) a[1]; cx a[1],out[6]; rz(-pi/16) out[6]; cx a[1],out[6]; rz(pi/16) out[6]; rz(pi/32) b[3]; cx b[3],out[7]; rz(-pi/32) out[7]; cx b[3],out[7]; rz(pi/32) out[7]; cx b[3],a[1]; rz(-pi/32) a[1]; cx a[1],out[7]; rz(pi/32) out[7]; cx a[1],out[7]; rz(-pi/32) out[7]; cx b[3],a[1]; rz(pi/32) a[1]; cx a[1],out[7]; rz(-pi/32) out[7]; cx a[1],out[7]; rz(pi/32) out[7]; rz(pi/64) b[3]; cx b[3],out[8]; rz(-pi/64) out[8]; cx b[3],out[8]; rz(pi/64) out[8]; cx b[3],a[1]; rz(-pi/64) a[1]; cx a[1],out[8]; rz(pi/64) out[8]; cx a[1],out[8]; rz(-pi/64) out[8]; cx b[3],a[1]; rz(pi/64) a[1]; cx a[1],out[8]; rz(-pi/64) out[8]; cx a[1],out[8]; rz(pi/64) out[8]; rz(pi/128) b[3]; cx b[3],out[9]; rz(-pi/128) out[9]; cx b[3],out[9]; rz(pi/128) out[9]; cx b[3],a[1]; rz(-pi/128) a[1]; cx a[1],out[9]; rz(pi/128) out[9]; cx a[1],out[9]; rz(-pi/128) out[9]; cx b[3],a[1]; rz(pi/128) a[1]; cx a[1],out[9]; rz(-pi/128) out[9]; cx a[1],out[9]; rz(pi/128) out[9]; rz(pi/256) b[3]; cx b[3],out[10]; rz(-pi/256) out[10]; cx b[3],out[10]; rz(pi/256) out[10]; cx b[3],a[1]; rz(-pi/256) a[1]; cx a[1],out[10]; rz(pi/256) out[10]; cx a[1],out[10]; rz(-pi/256) out[10]; cx b[3],a[1]; rz(pi/256) a[1]; cx a[1],out[10]; rz(-pi/256) out[10]; cx a[1],out[10]; rz(pi/256) out[10]; rz(pi/512) b[3]; cx b[3],out[11]; rz(-pi/512) out[11]; cx b[3],out[11]; rz(pi/512) out[11]; cx b[3],a[1]; rz(-pi/512) a[1]; cx a[1],out[11]; rz(pi/512) out[11]; cx a[1],out[11]; rz(-pi/512) out[11]; cx b[3],a[1]; rz(pi/512) a[1]; cx a[1],out[11]; rz(-pi/512) out[11]; cx a[1],out[11]; rz(pi/512) out[11]; rz(pi/1024) b[3]; cx b[3],out[12]; rz(-pi/1024) out[12]; cx b[3],out[12]; rz(pi/1024) out[12]; cx b[3],a[1]; rz(-pi/1024) a[1]; cx a[1],out[12]; rz(pi/1024) out[12]; cx a[1],out[12]; rz(-pi/1024) out[12]; cx b[3],a[1]; rz(pi/1024) a[1]; cx a[1],out[12]; rz(-pi/1024) out[12]; cx a[1],out[12]; rz(pi/1024) out[12]; rz(pi/2048) b[3]; cx b[3],out[13]; rz(-pi/2048) out[13]; cx b[3],out[13]; rz(pi/2048) out[13]; cx b[3],a[1]; rz(-pi/2048) a[1]; cx a[1],out[13]; rz(pi/2048) out[13]; cx a[1],out[13]; rz(-pi/2048) out[13]; cx b[3],a[1]; rz(pi/2048) a[1]; cx a[1],out[13]; rz(-pi/2048) out[13]; cx a[1],out[13]; rz(pi/2048) out[13]; rz(pi/4096) b[3]; cx b[3],out[14]; rz(-pi/4096) out[14]; cx b[3],out[14]; rz(pi/4096) out[14]; cx b[3],a[1]; rz(-pi/4096) a[1]; cx a[1],out[14]; rz(pi/4096) out[14]; cx a[1],out[14]; rz(-pi/4096) out[14]; cx b[3],a[1]; rz(pi/4096) a[1]; cx a[1],out[14]; rz(-pi/4096) out[14]; cx a[1],out[14]; rz(pi/4096) out[14]; rz(pi/8192) b[3]; cx b[3],out[15]; rz(-pi/8192) out[15]; cx b[3],out[15]; rz(pi/8192) out[15]; cx b[3],a[1]; rz(-pi/8192) a[1]; cx a[1],out[15]; rz(pi/8192) out[15]; cx a[1],out[15]; rz(-pi/8192) out[15]; cx b[3],a[1]; rz(pi/8192) a[1]; cx a[1],out[15]; rz(-pi/8192) out[15]; cx a[1],out[15]; rz(pi/8192) out[15]; cx b[2],a[1]; rz(-2*pi) a[1]; cx a[1],out[0]; rz(2*pi) out[0]; cx a[1],out[0]; rz(-2*pi) out[0]; cx b[2],a[1]; rz(2*pi) a[1]; cx a[1],out[0]; rz(-2*pi) out[0]; cx a[1],out[0]; rz(2*pi) out[0]; cx b[1],out[0]; rz(-pi) out[0]; cx b[1],out[0]; rz(pi) out[0]; rz(pi) b[2]; cx b[2],out[1]; rz(-pi) out[1]; cx b[2],out[1]; rz(pi) out[1]; cx b[2],a[1]; rz(-pi) a[1]; cx a[1],out[1]; rz(pi) out[1]; cx a[1],out[1]; rz(-pi) out[1]; cx b[2],a[1]; rz(pi) a[1]; cx a[1],out[1]; rz(-pi) out[1]; cx a[1],out[1]; rz(pi) out[1]; rz(pi/2) b[2]; cx b[2],out[2]; rz(-pi/2) out[2]; cx b[2],out[2]; rz(pi/2) out[2]; cx b[2],a[1]; rz(-pi/2) a[1]; cx a[1],out[2]; rz(pi/2) out[2]; cx a[1],out[2]; rz(-pi/2) out[2]; cx b[2],a[1]; rz(pi/2) a[1]; cx a[1],out[2]; rz(-pi/2) out[2]; cx a[1],out[2]; rz(pi/2) out[2]; rz(pi/4) b[2]; cx b[2],out[3]; rz(-pi/4) out[3]; cx b[2],out[3]; rz(pi/4) out[3]; cx b[2],a[1]; rz(-pi/4) a[1]; cx a[1],out[3]; rz(pi/4) out[3]; cx a[1],out[3]; rz(-pi/4) out[3]; cx b[2],a[1]; rz(pi/4) a[1]; cx a[1],out[3]; rz(-pi/4) out[3]; cx a[1],out[3]; rz(pi/4) out[3]; rz(pi/8) b[2]; cx b[2],out[4]; rz(-pi/8) out[4]; cx b[2],out[4]; rz(pi/8) out[4]; cx b[2],a[1]; rz(-pi/8) a[1]; cx a[1],out[4]; rz(pi/8) out[4]; cx a[1],out[4]; rz(-pi/8) out[4]; cx b[2],a[1]; rz(pi/8) a[1]; cx a[1],out[4]; rz(-pi/8) out[4]; cx a[1],out[4]; rz(pi/8) out[4]; rz(pi/16) b[2]; cx b[2],out[5]; rz(-pi/16) out[5]; cx b[2],out[5]; rz(pi/16) out[5]; cx b[2],a[1]; rz(-pi/16) a[1]; cx a[1],out[5]; rz(pi/16) out[5]; cx a[1],out[5]; rz(-pi/16) out[5]; cx b[2],a[1]; rz(pi/16) a[1]; cx a[1],out[5]; rz(-pi/16) out[5]; cx a[1],out[5]; rz(pi/16) out[5]; rz(pi/32) b[2]; cx b[2],out[6]; rz(-pi/32) out[6]; cx b[2],out[6]; rz(pi/32) out[6]; cx b[2],a[1]; rz(-pi/32) a[1]; cx a[1],out[6]; rz(pi/32) out[6]; cx a[1],out[6]; rz(-pi/32) out[6]; cx b[2],a[1]; rz(pi/32) a[1]; cx a[1],out[6]; rz(-pi/32) out[6]; cx a[1],out[6]; rz(pi/32) out[6]; rz(pi/64) b[2]; cx b[2],out[7]; rz(-pi/64) out[7]; cx b[2],out[7]; rz(pi/64) out[7]; cx b[2],a[1]; rz(-pi/64) a[1]; cx a[1],out[7]; rz(pi/64) out[7]; cx a[1],out[7]; rz(-pi/64) out[7]; cx b[2],a[1]; rz(pi/64) a[1]; cx a[1],out[7]; rz(-pi/64) out[7]; cx a[1],out[7]; rz(pi/64) out[7]; rz(pi/128) b[2]; cx b[2],out[8]; rz(-pi/128) out[8]; cx b[2],out[8]; rz(pi/128) out[8]; cx b[2],a[1]; rz(-pi/128) a[1]; cx a[1],out[8]; rz(pi/128) out[8]; cx a[1],out[8]; rz(-pi/128) out[8]; cx b[2],a[1]; rz(pi/128) a[1]; cx a[1],out[8]; rz(-pi/128) out[8]; cx a[1],out[8]; rz(pi/128) out[8]; rz(pi/256) b[2]; cx b[2],out[9]; rz(-pi/256) out[9]; cx b[2],out[9]; rz(pi/256) out[9]; cx b[2],a[1]; rz(-pi/256) a[1]; cx a[1],out[9]; rz(pi/256) out[9]; cx a[1],out[9]; rz(-pi/256) out[9]; cx b[2],a[1]; rz(pi/256) a[1]; cx a[1],out[9]; rz(-pi/256) out[9]; cx a[1],out[9]; rz(pi/256) out[9]; rz(pi/512) b[2]; cx b[2],out[10]; rz(-pi/512) out[10]; cx b[2],out[10]; rz(pi/512) out[10]; cx b[2],a[1]; rz(-pi/512) a[1]; cx a[1],out[10]; rz(pi/512) out[10]; cx a[1],out[10]; rz(-pi/512) out[10]; cx b[2],a[1]; rz(pi/512) a[1]; cx a[1],out[10]; rz(-pi/512) out[10]; cx a[1],out[10]; rz(pi/512) out[10]; rz(pi/1024) b[2]; cx b[2],out[11]; rz(-pi/1024) out[11]; cx b[2],out[11]; rz(pi/1024) out[11]; cx b[2],a[1]; rz(-pi/1024) a[1]; cx a[1],out[11]; rz(pi/1024) out[11]; cx a[1],out[11]; rz(-pi/1024) out[11]; cx b[2],a[1]; rz(pi/1024) a[1]; cx a[1],out[11]; rz(-pi/1024) out[11]; cx a[1],out[11]; rz(pi/1024) out[11]; rz(pi/2048) b[2]; cx b[2],out[12]; rz(-pi/2048) out[12]; cx b[2],out[12]; rz(pi/2048) out[12]; cx b[2],a[1]; rz(-pi/2048) a[1]; cx a[1],out[12]; rz(pi/2048) out[12]; cx a[1],out[12]; rz(-pi/2048) out[12]; cx b[2],a[1]; rz(pi/2048) a[1]; cx a[1],out[12]; rz(-pi/2048) out[12]; cx a[1],out[12]; rz(pi/2048) out[12]; rz(pi/4096) b[2]; cx b[2],out[13]; rz(-pi/4096) out[13]; cx b[2],out[13]; rz(pi/4096) out[13]; cx b[2],a[1]; rz(-pi/4096) a[1]; cx a[1],out[13]; rz(pi/4096) out[13]; cx a[1],out[13]; rz(-pi/4096) out[13]; cx b[2],a[1]; rz(pi/4096) a[1]; cx a[1],out[13]; rz(-pi/4096) out[13]; cx a[1],out[13]; rz(pi/4096) out[13]; rz(pi/8192) b[2]; cx b[2],out[14]; rz(-pi/8192) out[14]; cx b[2],out[14]; rz(pi/8192) out[14]; cx b[2],a[1]; rz(-pi/8192) a[1]; cx a[1],out[14]; rz(pi/8192) out[14]; cx a[1],out[14]; rz(-pi/8192) out[14]; cx b[2],a[1]; rz(pi/8192) a[1]; cx a[1],out[14]; rz(-pi/8192) out[14]; cx a[1],out[14]; rz(pi/8192) out[14]; rz(pi/16384) b[2]; cx b[2],out[15]; rz(-pi/16384) out[15]; cx b[2],out[15]; rz(pi/16384) out[15]; cx b[2],a[1]; rz(-pi/16384) a[1]; cx a[1],out[15]; rz(pi/16384) out[15]; cx a[1],out[15]; rz(-pi/16384) out[15]; cx b[2],a[1]; rz(pi/16384) a[1]; cx a[1],out[15]; rz(-pi/16384) out[15]; cx a[1],out[15]; rz(pi/16384) out[15]; cx b[1],a[1]; rz(-pi) a[1]; cx a[1],out[0]; rz(pi) out[0]; cx a[1],out[0]; rz(-pi) out[0]; cx b[1],a[1]; rz(pi) a[1]; cx a[1],out[0]; rz(-pi) out[0]; cx a[1],out[0]; rz(pi) out[0]; cx b[0],out[0]; rz(-pi/2) out[0]; cx b[0],out[0]; rz(pi/2) out[0]; rz(pi/2) b[1]; cx b[1],out[1]; rz(-pi/2) out[1]; cx b[1],out[1]; rz(pi/2) out[1]; cx b[1],a[1]; rz(-pi/2) a[1]; cx a[1],out[1]; rz(pi/2) out[1]; cx a[1],out[1]; rz(-pi/2) out[1]; cx b[1],a[1]; rz(pi/2) a[1]; cx a[1],out[1]; rz(-pi/2) out[1]; cx a[1],out[1]; rz(pi/2) out[1]; rz(pi/4) b[1]; cx b[1],out[2]; rz(-pi/4) out[2]; cx b[1],out[2]; rz(pi/4) out[2]; cx b[1],a[1]; rz(-pi/4) a[1]; cx a[1],out[2]; rz(pi/4) out[2]; cx a[1],out[2]; rz(-pi/4) out[2]; cx b[1],a[1]; rz(pi/4) a[1]; cx a[1],out[2]; rz(-pi/4) out[2]; cx a[1],out[2]; rz(pi/4) out[2]; rz(pi/8) b[1]; cx b[1],out[3]; rz(-pi/8) out[3]; cx b[1],out[3]; rz(pi/8) out[3]; cx b[1],a[1]; rz(-pi/8) a[1]; cx a[1],out[3]; rz(pi/8) out[3]; cx a[1],out[3]; rz(-pi/8) out[3]; cx b[1],a[1]; rz(pi/8) a[1]; cx a[1],out[3]; rz(-pi/8) out[3]; cx a[1],out[3]; rz(pi/8) out[3]; rz(pi/16) b[1]; cx b[1],out[4]; rz(-pi/16) out[4]; cx b[1],out[4]; rz(pi/16) out[4]; cx b[1],a[1]; rz(-pi/16) a[1]; cx a[1],out[4]; rz(pi/16) out[4]; cx a[1],out[4]; rz(-pi/16) out[4]; cx b[1],a[1]; rz(pi/16) a[1]; cx a[1],out[4]; rz(-pi/16) out[4]; cx a[1],out[4]; rz(pi/16) out[4]; rz(pi/32) b[1]; cx b[1],out[5]; rz(-pi/32) out[5]; cx b[1],out[5]; rz(pi/32) out[5]; cx b[1],a[1]; rz(-pi/32) a[1]; cx a[1],out[5]; rz(pi/32) out[5]; cx a[1],out[5]; rz(-pi/32) out[5]; cx b[1],a[1]; rz(pi/32) a[1]; cx a[1],out[5]; rz(-pi/32) out[5]; cx a[1],out[5]; rz(pi/32) out[5]; rz(pi/64) b[1]; cx b[1],out[6]; rz(-pi/64) out[6]; cx b[1],out[6]; rz(pi/64) out[6]; cx b[1],a[1]; rz(-pi/64) a[1]; cx a[1],out[6]; rz(pi/64) out[6]; cx a[1],out[6]; rz(-pi/64) out[6]; cx b[1],a[1]; rz(pi/64) a[1]; cx a[1],out[6]; rz(-pi/64) out[6]; cx a[1],out[6]; rz(pi/64) out[6]; rz(pi/128) b[1]; cx b[1],out[7]; rz(-pi/128) out[7]; cx b[1],out[7]; rz(pi/128) out[7]; cx b[1],a[1]; rz(-pi/128) a[1]; cx a[1],out[7]; rz(pi/128) out[7]; cx a[1],out[7]; rz(-pi/128) out[7]; cx b[1],a[1]; rz(pi/128) a[1]; cx a[1],out[7]; rz(-pi/128) out[7]; cx a[1],out[7]; rz(pi/128) out[7]; rz(pi/256) b[1]; cx b[1],out[8]; rz(-pi/256) out[8]; cx b[1],out[8]; rz(pi/256) out[8]; cx b[1],a[1]; rz(-pi/256) a[1]; cx a[1],out[8]; rz(pi/256) out[8]; cx a[1],out[8]; rz(-pi/256) out[8]; cx b[1],a[1]; rz(pi/256) a[1]; cx a[1],out[8]; rz(-pi/256) out[8]; cx a[1],out[8]; rz(pi/256) out[8]; rz(pi/512) b[1]; cx b[1],out[9]; rz(-pi/512) out[9]; cx b[1],out[9]; rz(pi/512) out[9]; cx b[1],a[1]; rz(-pi/512) a[1]; cx a[1],out[9]; rz(pi/512) out[9]; cx a[1],out[9]; rz(-pi/512) out[9]; cx b[1],a[1]; rz(pi/512) a[1]; cx a[1],out[9]; rz(-pi/512) out[9]; cx a[1],out[9]; rz(pi/512) out[9]; rz(pi/1024) b[1]; cx b[1],out[10]; rz(-pi/1024) out[10]; cx b[1],out[10]; rz(pi/1024) out[10]; cx b[1],a[1]; rz(-pi/1024) a[1]; cx a[1],out[10]; rz(pi/1024) out[10]; cx a[1],out[10]; rz(-pi/1024) out[10]; cx b[1],a[1]; rz(pi/1024) a[1]; cx a[1],out[10]; rz(-pi/1024) out[10]; cx a[1],out[10]; rz(pi/1024) out[10]; rz(pi/2048) b[1]; cx b[1],out[11]; rz(-pi/2048) out[11]; cx b[1],out[11]; rz(pi/2048) out[11]; cx b[1],a[1]; rz(-pi/2048) a[1]; cx a[1],out[11]; rz(pi/2048) out[11]; cx a[1],out[11]; rz(-pi/2048) out[11]; cx b[1],a[1]; rz(pi/2048) a[1]; cx a[1],out[11]; rz(-pi/2048) out[11]; cx a[1],out[11]; rz(pi/2048) out[11]; rz(pi/4096) b[1]; cx b[1],out[12]; rz(-pi/4096) out[12]; cx b[1],out[12]; rz(pi/4096) out[12]; cx b[1],a[1]; rz(-pi/4096) a[1]; cx a[1],out[12]; rz(pi/4096) out[12]; cx a[1],out[12]; rz(-pi/4096) out[12]; cx b[1],a[1]; rz(pi/4096) a[1]; cx a[1],out[12]; rz(-pi/4096) out[12]; cx a[1],out[12]; rz(pi/4096) out[12]; rz(pi/8192) b[1]; cx b[1],out[13]; rz(-pi/8192) out[13]; cx b[1],out[13]; rz(pi/8192) out[13]; cx b[1],a[1]; rz(-pi/8192) a[1]; cx a[1],out[13]; rz(pi/8192) out[13]; cx a[1],out[13]; rz(-pi/8192) out[13]; cx b[1],a[1]; rz(pi/8192) a[1]; cx a[1],out[13]; rz(-pi/8192) out[13]; cx a[1],out[13]; rz(pi/8192) out[13]; rz(pi/16384) b[1]; cx b[1],out[14]; rz(-pi/16384) out[14]; cx b[1],out[14]; rz(pi/16384) out[14]; cx b[1],a[1]; rz(-pi/16384) a[1]; cx a[1],out[14]; rz(pi/16384) out[14]; cx a[1],out[14]; rz(-pi/16384) out[14]; cx b[1],a[1]; rz(pi/16384) a[1]; cx a[1],out[14]; rz(-pi/16384) out[14]; cx a[1],out[14]; rz(pi/16384) out[14]; rz(pi/32768) b[1]; cx b[1],out[15]; rz(-pi/32768) out[15]; cx b[1],out[15]; rz(pi/32768) out[15]; cx b[1],a[1]; rz(-pi/32768) a[1]; cx a[1],out[15]; rz(pi/32768) out[15]; cx a[1],out[15]; rz(-pi/32768) out[15]; cx b[1],a[1]; rz(pi/32768) a[1]; cx a[1],out[15]; rz(-pi/32768) out[15]; cx a[1],out[15]; rz(pi/32768) out[15]; cx b[0],a[1]; rz(-pi/2) a[1]; cx a[1],out[0]; rz(pi/2) out[0]; cx a[1],out[0]; rz(-pi/2) out[0]; cx b[0],a[1]; rz(pi/2) a[1]; cx a[1],out[0]; rz(-pi/2) out[0]; cx a[1],out[0]; rz(pi/2) out[0]; rz(pi/4) b[0]; cx b[0],out[1]; rz(-pi/4) out[1]; cx b[0],out[1]; rz(pi/4) out[1]; cx b[0],a[1]; rz(-pi/4) a[1]; cx a[1],out[1]; rz(pi/4) out[1]; cx a[1],out[1]; rz(-pi/4) out[1]; cx b[0],a[1]; rz(pi/4) a[1]; cx a[1],out[1]; rz(-pi/4) out[1]; cx a[1],out[1]; rz(pi/4) out[1]; rz(pi/8) b[0]; cx b[0],out[2]; rz(-pi/8) out[2]; cx b[0],out[2]; rz(pi/8) out[2]; cx b[0],a[1]; rz(-pi/8) a[1]; cx a[1],out[2]; rz(pi/8) out[2]; cx a[1],out[2]; rz(-pi/8) out[2]; cx b[0],a[1]; rz(pi/8) a[1]; cx a[1],out[2]; rz(-pi/8) out[2]; cx a[1],out[2]; rz(pi/8) out[2]; rz(pi/16) b[0]; cx b[0],out[3]; rz(-pi/16) out[3]; cx b[0],out[3]; rz(pi/16) out[3]; cx b[0],a[1]; rz(-pi/16) a[1]; cx a[1],out[3]; rz(pi/16) out[3]; cx a[1],out[3]; rz(-pi/16) out[3]; cx b[0],a[1]; rz(pi/16) a[1]; cx a[1],out[3]; rz(-pi/16) out[3]; cx a[1],out[3]; rz(pi/16) out[3]; rz(pi/32) b[0]; cx b[0],out[4]; rz(-pi/32) out[4]; cx b[0],out[4]; rz(pi/32) out[4]; cx b[0],a[1]; rz(-pi/32) a[1]; cx a[1],out[4]; rz(pi/32) out[4]; cx a[1],out[4]; rz(-pi/32) out[4]; cx b[0],a[1]; rz(pi/32) a[1]; cx a[1],out[4]; rz(-pi/32) out[4]; cx a[1],out[4]; rz(pi/32) out[4]; rz(pi/64) b[0]; cx b[0],out[5]; rz(-pi/64) out[5]; cx b[0],out[5]; rz(pi/64) out[5]; cx b[0],a[1]; rz(-pi/64) a[1]; cx a[1],out[5]; rz(pi/64) out[5]; cx a[1],out[5]; rz(-pi/64) out[5]; cx b[0],a[1]; rz(pi/64) a[1]; cx a[1],out[5]; rz(-pi/64) out[5]; cx a[1],out[5]; rz(pi/64) out[5]; rz(pi/128) b[0]; cx b[0],out[6]; rz(-pi/128) out[6]; cx b[0],out[6]; rz(pi/128) out[6]; cx b[0],a[1]; rz(-pi/128) a[1]; cx a[1],out[6]; rz(pi/128) out[6]; cx a[1],out[6]; rz(-pi/128) out[6]; cx b[0],a[1]; rz(pi/128) a[1]; cx a[1],out[6]; rz(-pi/128) out[6]; cx a[1],out[6]; rz(pi/128) out[6]; rz(pi/256) b[0]; cx b[0],out[7]; rz(-pi/256) out[7]; cx b[0],out[7]; rz(pi/256) out[7]; cx b[0],a[1]; rz(-pi/256) a[1]; cx a[1],out[7]; rz(pi/256) out[7]; cx a[1],out[7]; rz(-pi/256) out[7]; cx b[0],a[1]; rz(pi/256) a[1]; cx a[1],out[7]; rz(-pi/256) out[7]; cx a[1],out[7]; rz(pi/256) out[7]; rz(pi/512) b[0]; cx b[0],out[8]; rz(-pi/512) out[8]; cx b[0],out[8]; rz(pi/512) out[8]; cx b[0],a[1]; rz(-pi/512) a[1]; cx a[1],out[8]; rz(pi/512) out[8]; cx a[1],out[8]; rz(-pi/512) out[8]; cx b[0],a[1]; rz(pi/512) a[1]; cx a[1],out[8]; rz(-pi/512) out[8]; cx a[1],out[8]; rz(pi/512) out[8]; rz(pi/1024) b[0]; cx b[0],out[9]; rz(-pi/1024) out[9]; cx b[0],out[9]; rz(pi/1024) out[9]; cx b[0],a[1]; rz(-pi/1024) a[1]; cx a[1],out[9]; rz(pi/1024) out[9]; cx a[1],out[9]; rz(-pi/1024) out[9]; cx b[0],a[1]; rz(pi/1024) a[1]; cx a[1],out[9]; rz(-pi/1024) out[9]; cx a[1],out[9]; rz(pi/1024) out[9]; rz(pi/2048) b[0]; cx b[0],out[10]; rz(-pi/2048) out[10]; cx b[0],out[10]; rz(pi/2048) out[10]; cx b[0],a[1]; rz(-pi/2048) a[1]; cx a[1],out[10]; rz(pi/2048) out[10]; cx a[1],out[10]; rz(-pi/2048) out[10]; cx b[0],a[1]; rz(pi/2048) a[1]; cx a[1],out[10]; rz(-pi/2048) out[10]; cx a[1],out[10]; rz(pi/2048) out[10]; rz(pi/4096) b[0]; cx b[0],out[11]; rz(-pi/4096) out[11]; cx b[0],out[11]; rz(pi/4096) out[11]; cx b[0],a[1]; rz(-pi/4096) a[1]; cx a[1],out[11]; rz(pi/4096) out[11]; cx a[1],out[11]; rz(-pi/4096) out[11]; cx b[0],a[1]; rz(pi/4096) a[1]; cx a[1],out[11]; rz(-pi/4096) out[11]; cx a[1],out[11]; rz(pi/4096) out[11]; rz(pi/8192) b[0]; cx b[0],out[12]; rz(-pi/8192) out[12]; cx b[0],out[12]; rz(pi/8192) out[12]; cx b[0],a[1]; rz(-pi/8192) a[1]; cx a[1],out[12]; rz(pi/8192) out[12]; cx a[1],out[12]; rz(-pi/8192) out[12]; cx b[0],a[1]; rz(pi/8192) a[1]; cx a[1],out[12]; rz(-pi/8192) out[12]; cx a[1],out[12]; rz(pi/8192) out[12]; rz(pi/16384) b[0]; cx b[0],out[13]; rz(-pi/16384) out[13]; cx b[0],out[13]; rz(pi/16384) out[13]; cx b[0],a[1]; rz(-pi/16384) a[1]; cx a[1],out[13]; rz(pi/16384) out[13]; cx a[1],out[13]; rz(-pi/16384) out[13]; cx b[0],a[1]; rz(pi/16384) a[1]; cx a[1],out[13]; rz(-pi/16384) out[13]; cx a[1],out[13]; rz(pi/16384) out[13]; rz(pi/32768) b[0]; cx b[0],out[14]; rz(-pi/32768) out[14]; cx b[0],out[14]; rz(pi/32768) out[14]; cx b[0],a[1]; rz(-pi/32768) a[1]; cx a[1],out[14]; rz(pi/32768) out[14]; cx a[1],out[14]; rz(-pi/32768) out[14]; cx b[0],a[1]; rz(pi/32768) a[1]; cx a[1],out[14]; rz(-pi/32768) out[14]; cx a[1],out[14]; rz(pi/32768) out[14]; rz(pi/65536) b[0]; cx b[0],out[15]; rz(-pi/65536) out[15]; cx b[0],out[15]; rz(pi/65536) out[15]; cx b[0],a[1]; rz(-pi/65536) a[1]; cx a[1],out[15]; rz(pi/65536) out[15]; cx a[1],out[15]; rz(-pi/65536) out[15]; cx b[0],a[1]; rz(pi/65536) a[1]; cx a[1],out[15]; rz(-pi/65536) out[15]; cx a[1],out[15]; rz(pi/65536) out[15]; rz(pi/4) b[0]; rz(pi/2) b[1]; rz(pi) b[2]; rz(2*pi) b[3]; rz(4*pi) b[4]; rz(8*pi) b[5]; rz(16*pi) b[6]; rz(32*pi) b[7]; cx b[7],out[0]; rz(-32*pi) out[0]; cx b[7],out[0]; rz(32*pi) out[0]; cx b[7],a[0]; rz(-32*pi) a[0]; cx a[0],out[0]; rz(32*pi) out[0]; cx a[0],out[0]; rz(-32*pi) out[0]; cx b[7],a[0]; rz(32*pi) a[0]; cx a[0],out[0]; rz(-32*pi) out[0]; cx a[0],out[0]; rz(32*pi) out[0]; cx b[6],out[0]; rz(-16*pi) out[0]; cx b[6],out[0]; rz(16*pi) out[0]; rz(16*pi) b[7]; cx b[7],out[1]; rz(-16*pi) out[1]; cx b[7],out[1]; rz(16*pi) out[1]; cx b[7],a[0]; rz(-16*pi) a[0]; cx a[0],out[1]; rz(16*pi) out[1]; cx a[0],out[1]; rz(-16*pi) out[1]; cx b[7],a[0]; rz(16*pi) a[0]; cx a[0],out[1]; rz(-16*pi) out[1]; cx a[0],out[1]; rz(16*pi) out[1]; rz(8*pi) b[7]; cx b[7],out[2]; rz(-8*pi) out[2]; cx b[7],out[2]; rz(8*pi) out[2]; cx b[7],a[0]; rz(-8*pi) a[0]; cx a[0],out[2]; rz(8*pi) out[2]; cx a[0],out[2]; rz(-8*pi) out[2]; cx b[7],a[0]; rz(8*pi) a[0]; cx a[0],out[2]; rz(-8*pi) out[2]; cx a[0],out[2]; rz(8*pi) out[2]; rz(4*pi) b[7]; cx b[7],out[3]; rz(-4*pi) out[3]; cx b[7],out[3]; rz(4*pi) out[3]; cx b[7],a[0]; rz(-4*pi) a[0]; cx a[0],out[3]; rz(4*pi) out[3]; cx a[0],out[3]; rz(-4*pi) out[3]; cx b[7],a[0]; rz(4*pi) a[0]; cx a[0],out[3]; rz(-4*pi) out[3]; cx a[0],out[3]; rz(4*pi) out[3]; rz(2*pi) b[7]; cx b[7],out[4]; rz(-2*pi) out[4]; cx b[7],out[4]; rz(2*pi) out[4]; cx b[7],a[0]; rz(-2*pi) a[0]; cx a[0],out[4]; rz(2*pi) out[4]; cx a[0],out[4]; rz(-2*pi) out[4]; cx b[7],a[0]; rz(2*pi) a[0]; cx a[0],out[4]; rz(-2*pi) out[4]; cx a[0],out[4]; rz(2*pi) out[4]; rz(pi) b[7]; cx b[7],out[5]; rz(-pi) out[5]; cx b[7],out[5]; rz(pi) out[5]; cx b[7],a[0]; rz(-pi) a[0]; cx a[0],out[5]; rz(pi) out[5]; cx a[0],out[5]; rz(-pi) out[5]; cx b[7],a[0]; rz(pi) a[0]; cx a[0],out[5]; rz(-pi) out[5]; cx a[0],out[5]; rz(pi) out[5]; rz(pi/2) b[7]; cx b[7],out[6]; rz(-pi/2) out[6]; cx b[7],out[6]; rz(pi/2) out[6]; cx b[7],a[0]; rz(-pi/2) a[0]; cx a[0],out[6]; rz(pi/2) out[6]; cx a[0],out[6]; rz(-pi/2) out[6]; cx b[7],a[0]; rz(pi/2) a[0]; cx a[0],out[6]; rz(-pi/2) out[6]; cx a[0],out[6]; rz(pi/2) out[6]; rz(pi/4) b[7]; cx b[7],out[7]; rz(-pi/4) out[7]; cx b[7],out[7]; rz(pi/4) out[7]; cx b[7],a[0]; rz(-pi/4) a[0]; cx a[0],out[7]; rz(pi/4) out[7]; cx a[0],out[7]; rz(-pi/4) out[7]; cx b[7],a[0]; rz(pi/4) a[0]; cx a[0],out[7]; rz(-pi/4) out[7]; cx a[0],out[7]; rz(pi/4) out[7]; rz(pi/8) b[7]; cx b[7],out[8]; rz(-pi/8) out[8]; cx b[7],out[8]; rz(pi/8) out[8]; cx b[7],a[0]; rz(-pi/8) a[0]; cx a[0],out[8]; rz(pi/8) out[8]; cx a[0],out[8]; rz(-pi/8) out[8]; cx b[7],a[0]; rz(pi/8) a[0]; cx a[0],out[8]; rz(-pi/8) out[8]; cx a[0],out[8]; rz(pi/8) out[8]; rz(pi/16) b[7]; cx b[7],out[9]; rz(-pi/16) out[9]; cx b[7],out[9]; rz(pi/16) out[9]; cx b[7],a[0]; rz(-pi/16) a[0]; cx a[0],out[9]; rz(pi/16) out[9]; cx a[0],out[9]; rz(-pi/16) out[9]; cx b[7],a[0]; rz(pi/16) a[0]; cx a[0],out[9]; rz(-pi/16) out[9]; cx a[0],out[9]; rz(pi/16) out[9]; rz(pi/32) b[7]; cx b[7],out[10]; rz(-pi/32) out[10]; cx b[7],out[10]; rz(pi/32) out[10]; cx b[7],a[0]; rz(-pi/32) a[0]; cx a[0],out[10]; rz(pi/32) out[10]; cx a[0],out[10]; rz(-pi/32) out[10]; cx b[7],a[0]; rz(pi/32) a[0]; cx a[0],out[10]; rz(-pi/32) out[10]; cx a[0],out[10]; rz(pi/32) out[10]; rz(pi/64) b[7]; cx b[7],out[11]; rz(-pi/64) out[11]; cx b[7],out[11]; rz(pi/64) out[11]; cx b[7],a[0]; rz(-pi/64) a[0]; cx a[0],out[11]; rz(pi/64) out[11]; cx a[0],out[11]; rz(-pi/64) out[11]; cx b[7],a[0]; rz(pi/64) a[0]; cx a[0],out[11]; rz(-pi/64) out[11]; cx a[0],out[11]; rz(pi/64) out[11]; rz(pi/128) b[7]; cx b[7],out[12]; rz(-pi/128) out[12]; cx b[7],out[12]; rz(pi/128) out[12]; cx b[7],a[0]; rz(-pi/128) a[0]; cx a[0],out[12]; rz(pi/128) out[12]; cx a[0],out[12]; rz(-pi/128) out[12]; cx b[7],a[0]; rz(pi/128) a[0]; cx a[0],out[12]; rz(-pi/128) out[12]; cx a[0],out[12]; rz(pi/128) out[12]; rz(pi/256) b[7]; cx b[7],out[13]; rz(-pi/256) out[13]; cx b[7],out[13]; rz(pi/256) out[13]; cx b[7],a[0]; rz(-pi/256) a[0]; cx a[0],out[13]; rz(pi/256) out[13]; cx a[0],out[13]; rz(-pi/256) out[13]; cx b[7],a[0]; rz(pi/256) a[0]; cx a[0],out[13]; rz(-pi/256) out[13]; cx a[0],out[13]; rz(pi/256) out[13]; rz(pi/512) b[7]; cx b[7],out[14]; rz(-pi/512) out[14]; cx b[7],out[14]; rz(pi/512) out[14]; cx b[7],a[0]; rz(-pi/512) a[0]; cx a[0],out[14]; rz(pi/512) out[14]; cx a[0],out[14]; rz(-pi/512) out[14]; cx b[7],a[0]; rz(pi/512) a[0]; cx a[0],out[14]; rz(-pi/512) out[14]; cx a[0],out[14]; rz(pi/512) out[14]; rz(pi/1024) b[7]; cx b[7],out[15]; rz(-pi/1024) out[15]; cx b[7],out[15]; rz(pi/1024) out[15]; cx b[7],a[0]; rz(-pi/1024) a[0]; cx a[0],out[15]; rz(pi/1024) out[15]; cx a[0],out[15]; rz(-pi/1024) out[15]; cx b[7],a[0]; rz(pi/1024) a[0]; cx a[0],out[15]; rz(-pi/1024) out[15]; cx a[0],out[15]; rz(pi/1024) out[15]; cx b[6],a[0]; rz(-16*pi) a[0]; cx a[0],out[0]; rz(16*pi) out[0]; cx a[0],out[0]; rz(-16*pi) out[0]; cx b[6],a[0]; rz(16*pi) a[0]; cx a[0],out[0]; rz(-16*pi) out[0]; cx a[0],out[0]; rz(16*pi) out[0]; cx b[5],out[0]; rz(-8*pi) out[0]; cx b[5],out[0]; rz(8*pi) out[0]; rz(8*pi) b[6]; cx b[6],out[1]; rz(-8*pi) out[1]; cx b[6],out[1]; rz(8*pi) out[1]; cx b[6],a[0]; rz(-8*pi) a[0]; cx a[0],out[1]; rz(8*pi) out[1]; cx a[0],out[1]; rz(-8*pi) out[1]; cx b[6],a[0]; rz(8*pi) a[0]; cx a[0],out[1]; rz(-8*pi) out[1]; cx a[0],out[1]; rz(8*pi) out[1]; rz(4*pi) b[6]; cx b[6],out[2]; rz(-4*pi) out[2]; cx b[6],out[2]; rz(4*pi) out[2]; cx b[6],a[0]; rz(-4*pi) a[0]; cx a[0],out[2]; rz(4*pi) out[2]; cx a[0],out[2]; rz(-4*pi) out[2]; cx b[6],a[0]; rz(4*pi) a[0]; cx a[0],out[2]; rz(-4*pi) out[2]; cx a[0],out[2]; rz(4*pi) out[2]; rz(2*pi) b[6]; cx b[6],out[3]; rz(-2*pi) out[3]; cx b[6],out[3]; rz(2*pi) out[3]; cx b[6],a[0]; rz(-2*pi) a[0]; cx a[0],out[3]; rz(2*pi) out[3]; cx a[0],out[3]; rz(-2*pi) out[3]; cx b[6],a[0]; rz(2*pi) a[0]; cx a[0],out[3]; rz(-2*pi) out[3]; cx a[0],out[3]; rz(2*pi) out[3]; rz(pi) b[6]; cx b[6],out[4]; rz(-pi) out[4]; cx b[6],out[4]; rz(pi) out[4]; cx b[6],a[0]; rz(-pi) a[0]; cx a[0],out[4]; rz(pi) out[4]; cx a[0],out[4]; rz(-pi) out[4]; cx b[6],a[0]; rz(pi) a[0]; cx a[0],out[4]; rz(-pi) out[4]; cx a[0],out[4]; rz(pi) out[4]; rz(pi/2) b[6]; cx b[6],out[5]; rz(-pi/2) out[5]; cx b[6],out[5]; rz(pi/2) out[5]; cx b[6],a[0]; rz(-pi/2) a[0]; cx a[0],out[5]; rz(pi/2) out[5]; cx a[0],out[5]; rz(-pi/2) out[5]; cx b[6],a[0]; rz(pi/2) a[0]; cx a[0],out[5]; rz(-pi/2) out[5]; cx a[0],out[5]; rz(pi/2) out[5]; rz(pi/4) b[6]; cx b[6],out[6]; rz(-pi/4) out[6]; cx b[6],out[6]; rz(pi/4) out[6]; cx b[6],a[0]; rz(-pi/4) a[0]; cx a[0],out[6]; rz(pi/4) out[6]; cx a[0],out[6]; rz(-pi/4) out[6]; cx b[6],a[0]; rz(pi/4) a[0]; cx a[0],out[6]; rz(-pi/4) out[6]; cx a[0],out[6]; rz(pi/4) out[6]; rz(pi/8) b[6]; cx b[6],out[7]; rz(-pi/8) out[7]; cx b[6],out[7]; rz(pi/8) out[7]; cx b[6],a[0]; rz(-pi/8) a[0]; cx a[0],out[7]; rz(pi/8) out[7]; cx a[0],out[7]; rz(-pi/8) out[7]; cx b[6],a[0]; rz(pi/8) a[0]; cx a[0],out[7]; rz(-pi/8) out[7]; cx a[0],out[7]; rz(pi/8) out[7]; rz(pi/16) b[6]; cx b[6],out[8]; rz(-pi/16) out[8]; cx b[6],out[8]; rz(pi/16) out[8]; cx b[6],a[0]; rz(-pi/16) a[0]; cx a[0],out[8]; rz(pi/16) out[8]; cx a[0],out[8]; rz(-pi/16) out[8]; cx b[6],a[0]; rz(pi/16) a[0]; cx a[0],out[8]; rz(-pi/16) out[8]; cx a[0],out[8]; rz(pi/16) out[8]; rz(pi/32) b[6]; cx b[6],out[9]; rz(-pi/32) out[9]; cx b[6],out[9]; rz(pi/32) out[9]; cx b[6],a[0]; rz(-pi/32) a[0]; cx a[0],out[9]; rz(pi/32) out[9]; cx a[0],out[9]; rz(-pi/32) out[9]; cx b[6],a[0]; rz(pi/32) a[0]; cx a[0],out[9]; rz(-pi/32) out[9]; cx a[0],out[9]; rz(pi/32) out[9]; rz(pi/64) b[6]; cx b[6],out[10]; rz(-pi/64) out[10]; cx b[6],out[10]; rz(pi/64) out[10]; cx b[6],a[0]; rz(-pi/64) a[0]; cx a[0],out[10]; rz(pi/64) out[10]; cx a[0],out[10]; rz(-pi/64) out[10]; cx b[6],a[0]; rz(pi/64) a[0]; cx a[0],out[10]; rz(-pi/64) out[10]; cx a[0],out[10]; rz(pi/64) out[10]; rz(pi/128) b[6]; cx b[6],out[11]; rz(-pi/128) out[11]; cx b[6],out[11]; rz(pi/128) out[11]; cx b[6],a[0]; rz(-pi/128) a[0]; cx a[0],out[11]; rz(pi/128) out[11]; cx a[0],out[11]; rz(-pi/128) out[11]; cx b[6],a[0]; rz(pi/128) a[0]; cx a[0],out[11]; rz(-pi/128) out[11]; cx a[0],out[11]; rz(pi/128) out[11]; rz(pi/256) b[6]; cx b[6],out[12]; rz(-pi/256) out[12]; cx b[6],out[12]; rz(pi/256) out[12]; cx b[6],a[0]; rz(-pi/256) a[0]; cx a[0],out[12]; rz(pi/256) out[12]; cx a[0],out[12]; rz(-pi/256) out[12]; cx b[6],a[0]; rz(pi/256) a[0]; cx a[0],out[12]; rz(-pi/256) out[12]; cx a[0],out[12]; rz(pi/256) out[12]; rz(pi/512) b[6]; cx b[6],out[13]; rz(-pi/512) out[13]; cx b[6],out[13]; rz(pi/512) out[13]; cx b[6],a[0]; rz(-pi/512) a[0]; cx a[0],out[13]; rz(pi/512) out[13]; cx a[0],out[13]; rz(-pi/512) out[13]; cx b[6],a[0]; rz(pi/512) a[0]; cx a[0],out[13]; rz(-pi/512) out[13]; cx a[0],out[13]; rz(pi/512) out[13]; rz(pi/1024) b[6]; cx b[6],out[14]; rz(-pi/1024) out[14]; cx b[6],out[14]; rz(pi/1024) out[14]; cx b[6],a[0]; rz(-pi/1024) a[0]; cx a[0],out[14]; rz(pi/1024) out[14]; cx a[0],out[14]; rz(-pi/1024) out[14]; cx b[6],a[0]; rz(pi/1024) a[0]; cx a[0],out[14]; rz(-pi/1024) out[14]; cx a[0],out[14]; rz(pi/1024) out[14]; rz(pi/2048) b[6]; cx b[6],out[15]; rz(-pi/2048) out[15]; cx b[6],out[15]; rz(pi/2048) out[15]; cx b[6],a[0]; rz(-pi/2048) a[0]; cx a[0],out[15]; rz(pi/2048) out[15]; cx a[0],out[15]; rz(-pi/2048) out[15]; cx b[6],a[0]; rz(pi/2048) a[0]; cx a[0],out[15]; rz(-pi/2048) out[15]; cx a[0],out[15]; rz(pi/2048) out[15]; cx b[5],a[0]; rz(-8*pi) a[0]; cx a[0],out[0]; rz(8*pi) out[0]; cx a[0],out[0]; rz(-8*pi) out[0]; cx b[5],a[0]; rz(8*pi) a[0]; cx a[0],out[0]; rz(-8*pi) out[0]; cx a[0],out[0]; rz(8*pi) out[0]; cx b[4],out[0]; rz(-4*pi) out[0]; cx b[4],out[0]; rz(4*pi) out[0]; rz(4*pi) b[5]; cx b[5],out[1]; rz(-4*pi) out[1]; cx b[5],out[1]; rz(4*pi) out[1]; cx b[5],a[0]; rz(-4*pi) a[0]; cx a[0],out[1]; rz(4*pi) out[1]; cx a[0],out[1]; rz(-4*pi) out[1]; cx b[5],a[0]; rz(4*pi) a[0]; cx a[0],out[1]; rz(-4*pi) out[1]; cx a[0],out[1]; rz(4*pi) out[1]; rz(2*pi) b[5]; cx b[5],out[2]; rz(-2*pi) out[2]; cx b[5],out[2]; rz(2*pi) out[2]; cx b[5],a[0]; rz(-2*pi) a[0]; cx a[0],out[2]; rz(2*pi) out[2]; cx a[0],out[2]; rz(-2*pi) out[2]; cx b[5],a[0]; rz(2*pi) a[0]; cx a[0],out[2]; rz(-2*pi) out[2]; cx a[0],out[2]; rz(2*pi) out[2]; rz(pi) b[5]; cx b[5],out[3]; rz(-pi) out[3]; cx b[5],out[3]; rz(pi) out[3]; cx b[5],a[0]; rz(-pi) a[0]; cx a[0],out[3]; rz(pi) out[3]; cx a[0],out[3]; rz(-pi) out[3]; cx b[5],a[0]; rz(pi) a[0]; cx a[0],out[3]; rz(-pi) out[3]; cx a[0],out[3]; rz(pi) out[3]; rz(pi/2) b[5]; cx b[5],out[4]; rz(-pi/2) out[4]; cx b[5],out[4]; rz(pi/2) out[4]; cx b[5],a[0]; rz(-pi/2) a[0]; cx a[0],out[4]; rz(pi/2) out[4]; cx a[0],out[4]; rz(-pi/2) out[4]; cx b[5],a[0]; rz(pi/2) a[0]; cx a[0],out[4]; rz(-pi/2) out[4]; cx a[0],out[4]; rz(pi/2) out[4]; rz(pi/4) b[5]; cx b[5],out[5]; rz(-pi/4) out[5]; cx b[5],out[5]; rz(pi/4) out[5]; cx b[5],a[0]; rz(-pi/4) a[0]; cx a[0],out[5]; rz(pi/4) out[5]; cx a[0],out[5]; rz(-pi/4) out[5]; cx b[5],a[0]; rz(pi/4) a[0]; cx a[0],out[5]; rz(-pi/4) out[5]; cx a[0],out[5]; rz(pi/4) out[5]; rz(pi/8) b[5]; cx b[5],out[6]; rz(-pi/8) out[6]; cx b[5],out[6]; rz(pi/8) out[6]; cx b[5],a[0]; rz(-pi/8) a[0]; cx a[0],out[6]; rz(pi/8) out[6]; cx a[0],out[6]; rz(-pi/8) out[6]; cx b[5],a[0]; rz(pi/8) a[0]; cx a[0],out[6]; rz(-pi/8) out[6]; cx a[0],out[6]; rz(pi/8) out[6]; rz(pi/16) b[5]; cx b[5],out[7]; rz(-pi/16) out[7]; cx b[5],out[7]; rz(pi/16) out[7]; cx b[5],a[0]; rz(-pi/16) a[0]; cx a[0],out[7]; rz(pi/16) out[7]; cx a[0],out[7]; rz(-pi/16) out[7]; cx b[5],a[0]; rz(pi/16) a[0]; cx a[0],out[7]; rz(-pi/16) out[7]; cx a[0],out[7]; rz(pi/16) out[7]; rz(pi/32) b[5]; cx b[5],out[8]; rz(-pi/32) out[8]; cx b[5],out[8]; rz(pi/32) out[8]; cx b[5],a[0]; rz(-pi/32) a[0]; cx a[0],out[8]; rz(pi/32) out[8]; cx a[0],out[8]; rz(-pi/32) out[8]; cx b[5],a[0]; rz(pi/32) a[0]; cx a[0],out[8]; rz(-pi/32) out[8]; cx a[0],out[8]; rz(pi/32) out[8]; rz(pi/64) b[5]; cx b[5],out[9]; rz(-pi/64) out[9]; cx b[5],out[9]; rz(pi/64) out[9]; cx b[5],a[0]; rz(-pi/64) a[0]; cx a[0],out[9]; rz(pi/64) out[9]; cx a[0],out[9]; rz(-pi/64) out[9]; cx b[5],a[0]; rz(pi/64) a[0]; cx a[0],out[9]; rz(-pi/64) out[9]; cx a[0],out[9]; rz(pi/64) out[9]; rz(pi/128) b[5]; cx b[5],out[10]; rz(-pi/128) out[10]; cx b[5],out[10]; rz(pi/128) out[10]; cx b[5],a[0]; rz(-pi/128) a[0]; cx a[0],out[10]; rz(pi/128) out[10]; cx a[0],out[10]; rz(-pi/128) out[10]; cx b[5],a[0]; rz(pi/128) a[0]; cx a[0],out[10]; rz(-pi/128) out[10]; cx a[0],out[10]; rz(pi/128) out[10]; rz(pi/256) b[5]; cx b[5],out[11]; rz(-pi/256) out[11]; cx b[5],out[11]; rz(pi/256) out[11]; cx b[5],a[0]; rz(-pi/256) a[0]; cx a[0],out[11]; rz(pi/256) out[11]; cx a[0],out[11]; rz(-pi/256) out[11]; cx b[5],a[0]; rz(pi/256) a[0]; cx a[0],out[11]; rz(-pi/256) out[11]; cx a[0],out[11]; rz(pi/256) out[11]; rz(pi/512) b[5]; cx b[5],out[12]; rz(-pi/512) out[12]; cx b[5],out[12]; rz(pi/512) out[12]; cx b[5],a[0]; rz(-pi/512) a[0]; cx a[0],out[12]; rz(pi/512) out[12]; cx a[0],out[12]; rz(-pi/512) out[12]; cx b[5],a[0]; rz(pi/512) a[0]; cx a[0],out[12]; rz(-pi/512) out[12]; cx a[0],out[12]; rz(pi/512) out[12]; rz(pi/1024) b[5]; cx b[5],out[13]; rz(-pi/1024) out[13]; cx b[5],out[13]; rz(pi/1024) out[13]; cx b[5],a[0]; rz(-pi/1024) a[0]; cx a[0],out[13]; rz(pi/1024) out[13]; cx a[0],out[13]; rz(-pi/1024) out[13]; cx b[5],a[0]; rz(pi/1024) a[0]; cx a[0],out[13]; rz(-pi/1024) out[13]; cx a[0],out[13]; rz(pi/1024) out[13]; rz(pi/2048) b[5]; cx b[5],out[14]; rz(-pi/2048) out[14]; cx b[5],out[14]; rz(pi/2048) out[14]; cx b[5],a[0]; rz(-pi/2048) a[0]; cx a[0],out[14]; rz(pi/2048) out[14]; cx a[0],out[14]; rz(-pi/2048) out[14]; cx b[5],a[0]; rz(pi/2048) a[0]; cx a[0],out[14]; rz(-pi/2048) out[14]; cx a[0],out[14]; rz(pi/2048) out[14]; rz(pi/4096) b[5]; cx b[5],out[15]; rz(-pi/4096) out[15]; cx b[5],out[15]; rz(pi/4096) out[15]; cx b[5],a[0]; rz(-pi/4096) a[0]; cx a[0],out[15]; rz(pi/4096) out[15]; cx a[0],out[15]; rz(-pi/4096) out[15]; cx b[5],a[0]; rz(pi/4096) a[0]; cx a[0],out[15]; rz(-pi/4096) out[15]; cx a[0],out[15]; rz(pi/4096) out[15]; cx b[4],a[0]; rz(-4*pi) a[0]; cx a[0],out[0]; rz(4*pi) out[0]; cx a[0],out[0]; rz(-4*pi) out[0]; cx b[4],a[0]; rz(4*pi) a[0]; cx a[0],out[0]; rz(-4*pi) out[0]; cx a[0],out[0]; rz(4*pi) out[0]; cx b[3],out[0]; rz(-2*pi) out[0]; cx b[3],out[0]; rz(2*pi) out[0]; rz(2*pi) b[4]; cx b[4],out[1]; rz(-2*pi) out[1]; cx b[4],out[1]; rz(2*pi) out[1]; cx b[4],a[0]; rz(-2*pi) a[0]; cx a[0],out[1]; rz(2*pi) out[1]; cx a[0],out[1]; rz(-2*pi) out[1]; cx b[4],a[0]; rz(2*pi) a[0]; cx a[0],out[1]; rz(-2*pi) out[1]; cx a[0],out[1]; rz(2*pi) out[1]; rz(pi) b[4]; cx b[4],out[2]; rz(-pi) out[2]; cx b[4],out[2]; rz(pi) out[2]; cx b[4],a[0]; rz(-pi) a[0]; cx a[0],out[2]; rz(pi) out[2]; cx a[0],out[2]; rz(-pi) out[2]; cx b[4],a[0]; rz(pi) a[0]; cx a[0],out[2]; rz(-pi) out[2]; cx a[0],out[2]; rz(pi) out[2]; rz(pi/2) b[4]; cx b[4],out[3]; rz(-pi/2) out[3]; cx b[4],out[3]; rz(pi/2) out[3]; cx b[4],a[0]; rz(-pi/2) a[0]; cx a[0],out[3]; rz(pi/2) out[3]; cx a[0],out[3]; rz(-pi/2) out[3]; cx b[4],a[0]; rz(pi/2) a[0]; cx a[0],out[3]; rz(-pi/2) out[3]; cx a[0],out[3]; rz(pi/2) out[3]; rz(pi/4) b[4]; cx b[4],out[4]; rz(-pi/4) out[4]; cx b[4],out[4]; rz(pi/4) out[4]; cx b[4],a[0]; rz(-pi/4) a[0]; cx a[0],out[4]; rz(pi/4) out[4]; cx a[0],out[4]; rz(-pi/4) out[4]; cx b[4],a[0]; rz(pi/4) a[0]; cx a[0],out[4]; rz(-pi/4) out[4]; cx a[0],out[4]; rz(pi/4) out[4]; rz(pi/8) b[4]; cx b[4],out[5]; rz(-pi/8) out[5]; cx b[4],out[5]; rz(pi/8) out[5]; cx b[4],a[0]; rz(-pi/8) a[0]; cx a[0],out[5]; rz(pi/8) out[5]; cx a[0],out[5]; rz(-pi/8) out[5]; cx b[4],a[0]; rz(pi/8) a[0]; cx a[0],out[5]; rz(-pi/8) out[5]; cx a[0],out[5]; rz(pi/8) out[5]; rz(pi/16) b[4]; cx b[4],out[6]; rz(-pi/16) out[6]; cx b[4],out[6]; rz(pi/16) out[6]; cx b[4],a[0]; rz(-pi/16) a[0]; cx a[0],out[6]; rz(pi/16) out[6]; cx a[0],out[6]; rz(-pi/16) out[6]; cx b[4],a[0]; rz(pi/16) a[0]; cx a[0],out[6]; rz(-pi/16) out[6]; cx a[0],out[6]; rz(pi/16) out[6]; rz(pi/32) b[4]; cx b[4],out[7]; rz(-pi/32) out[7]; cx b[4],out[7]; rz(pi/32) out[7]; cx b[4],a[0]; rz(-pi/32) a[0]; cx a[0],out[7]; rz(pi/32) out[7]; cx a[0],out[7]; rz(-pi/32) out[7]; cx b[4],a[0]; rz(pi/32) a[0]; cx a[0],out[7]; rz(-pi/32) out[7]; cx a[0],out[7]; rz(pi/32) out[7]; rz(pi/64) b[4]; cx b[4],out[8]; rz(-pi/64) out[8]; cx b[4],out[8]; rz(pi/64) out[8]; cx b[4],a[0]; rz(-pi/64) a[0]; cx a[0],out[8]; rz(pi/64) out[8]; cx a[0],out[8]; rz(-pi/64) out[8]; cx b[4],a[0]; rz(pi/64) a[0]; cx a[0],out[8]; rz(-pi/64) out[8]; cx a[0],out[8]; rz(pi/64) out[8]; rz(pi/128) b[4]; cx b[4],out[9]; rz(-pi/128) out[9]; cx b[4],out[9]; rz(pi/128) out[9]; cx b[4],a[0]; rz(-pi/128) a[0]; cx a[0],out[9]; rz(pi/128) out[9]; cx a[0],out[9]; rz(-pi/128) out[9]; cx b[4],a[0]; rz(pi/128) a[0]; cx a[0],out[9]; rz(-pi/128) out[9]; cx a[0],out[9]; rz(pi/128) out[9]; rz(pi/256) b[4]; cx b[4],out[10]; rz(-pi/256) out[10]; cx b[4],out[10]; rz(pi/256) out[10]; cx b[4],a[0]; rz(-pi/256) a[0]; cx a[0],out[10]; rz(pi/256) out[10]; cx a[0],out[10]; rz(-pi/256) out[10]; cx b[4],a[0]; rz(pi/256) a[0]; cx a[0],out[10]; rz(-pi/256) out[10]; cx a[0],out[10]; rz(pi/256) out[10]; rz(pi/512) b[4]; cx b[4],out[11]; rz(-pi/512) out[11]; cx b[4],out[11]; rz(pi/512) out[11]; cx b[4],a[0]; rz(-pi/512) a[0]; cx a[0],out[11]; rz(pi/512) out[11]; cx a[0],out[11]; rz(-pi/512) out[11]; cx b[4],a[0]; rz(pi/512) a[0]; cx a[0],out[11]; rz(-pi/512) out[11]; cx a[0],out[11]; rz(pi/512) out[11]; rz(pi/1024) b[4]; cx b[4],out[12]; rz(-pi/1024) out[12]; cx b[4],out[12]; rz(pi/1024) out[12]; cx b[4],a[0]; rz(-pi/1024) a[0]; cx a[0],out[12]; rz(pi/1024) out[12]; cx a[0],out[12]; rz(-pi/1024) out[12]; cx b[4],a[0]; rz(pi/1024) a[0]; cx a[0],out[12]; rz(-pi/1024) out[12]; cx a[0],out[12]; rz(pi/1024) out[12]; rz(pi/2048) b[4]; cx b[4],out[13]; rz(-pi/2048) out[13]; cx b[4],out[13]; rz(pi/2048) out[13]; cx b[4],a[0]; rz(-pi/2048) a[0]; cx a[0],out[13]; rz(pi/2048) out[13]; cx a[0],out[13]; rz(-pi/2048) out[13]; cx b[4],a[0]; rz(pi/2048) a[0]; cx a[0],out[13]; rz(-pi/2048) out[13]; cx a[0],out[13]; rz(pi/2048) out[13]; rz(pi/4096) b[4]; cx b[4],out[14]; rz(-pi/4096) out[14]; cx b[4],out[14]; rz(pi/4096) out[14]; cx b[4],a[0]; rz(-pi/4096) a[0]; cx a[0],out[14]; rz(pi/4096) out[14]; cx a[0],out[14]; rz(-pi/4096) out[14]; cx b[4],a[0]; rz(pi/4096) a[0]; cx a[0],out[14]; rz(-pi/4096) out[14]; cx a[0],out[14]; rz(pi/4096) out[14]; rz(pi/8192) b[4]; cx b[4],out[15]; rz(-pi/8192) out[15]; cx b[4],out[15]; rz(pi/8192) out[15]; cx b[4],a[0]; rz(-pi/8192) a[0]; cx a[0],out[15]; rz(pi/8192) out[15]; cx a[0],out[15]; rz(-pi/8192) out[15]; cx b[4],a[0]; rz(pi/8192) a[0]; cx a[0],out[15]; rz(-pi/8192) out[15]; cx a[0],out[15]; rz(pi/8192) out[15]; cx b[3],a[0]; rz(-2*pi) a[0]; cx a[0],out[0]; rz(2*pi) out[0]; cx a[0],out[0]; rz(-2*pi) out[0]; cx b[3],a[0]; rz(2*pi) a[0]; cx a[0],out[0]; rz(-2*pi) out[0]; cx a[0],out[0]; rz(2*pi) out[0]; cx b[2],out[0]; rz(-pi) out[0]; cx b[2],out[0]; rz(pi) out[0]; rz(pi) b[3]; cx b[3],out[1]; rz(-pi) out[1]; cx b[3],out[1]; rz(pi) out[1]; cx b[3],a[0]; rz(-pi) a[0]; cx a[0],out[1]; rz(pi) out[1]; cx a[0],out[1]; rz(-pi) out[1]; cx b[3],a[0]; rz(pi) a[0]; cx a[0],out[1]; rz(-pi) out[1]; cx a[0],out[1]; rz(pi) out[1]; rz(pi/2) b[3]; cx b[3],out[2]; rz(-pi/2) out[2]; cx b[3],out[2]; rz(pi/2) out[2]; cx b[3],a[0]; rz(-pi/2) a[0]; cx a[0],out[2]; rz(pi/2) out[2]; cx a[0],out[2]; rz(-pi/2) out[2]; cx b[3],a[0]; rz(pi/2) a[0]; cx a[0],out[2]; rz(-pi/2) out[2]; cx a[0],out[2]; rz(pi/2) out[2]; rz(pi/4) b[3]; cx b[3],out[3]; rz(-pi/4) out[3]; cx b[3],out[3]; rz(pi/4) out[3]; cx b[3],a[0]; rz(-pi/4) a[0]; cx a[0],out[3]; rz(pi/4) out[3]; cx a[0],out[3]; rz(-pi/4) out[3]; cx b[3],a[0]; rz(pi/4) a[0]; cx a[0],out[3]; rz(-pi/4) out[3]; cx a[0],out[3]; rz(pi/4) out[3]; rz(pi/8) b[3]; cx b[3],out[4]; rz(-pi/8) out[4]; cx b[3],out[4]; rz(pi/8) out[4]; cx b[3],a[0]; rz(-pi/8) a[0]; cx a[0],out[4]; rz(pi/8) out[4]; cx a[0],out[4]; rz(-pi/8) out[4]; cx b[3],a[0]; rz(pi/8) a[0]; cx a[0],out[4]; rz(-pi/8) out[4]; cx a[0],out[4]; rz(pi/8) out[4]; rz(pi/16) b[3]; cx b[3],out[5]; rz(-pi/16) out[5]; cx b[3],out[5]; rz(pi/16) out[5]; cx b[3],a[0]; rz(-pi/16) a[0]; cx a[0],out[5]; rz(pi/16) out[5]; cx a[0],out[5]; rz(-pi/16) out[5]; cx b[3],a[0]; rz(pi/16) a[0]; cx a[0],out[5]; rz(-pi/16) out[5]; cx a[0],out[5]; rz(pi/16) out[5]; rz(pi/32) b[3]; cx b[3],out[6]; rz(-pi/32) out[6]; cx b[3],out[6]; rz(pi/32) out[6]; cx b[3],a[0]; rz(-pi/32) a[0]; cx a[0],out[6]; rz(pi/32) out[6]; cx a[0],out[6]; rz(-pi/32) out[6]; cx b[3],a[0]; rz(pi/32) a[0]; cx a[0],out[6]; rz(-pi/32) out[6]; cx a[0],out[6]; rz(pi/32) out[6]; rz(pi/64) b[3]; cx b[3],out[7]; rz(-pi/64) out[7]; cx b[3],out[7]; rz(pi/64) out[7]; cx b[3],a[0]; rz(-pi/64) a[0]; cx a[0],out[7]; rz(pi/64) out[7]; cx a[0],out[7]; rz(-pi/64) out[7]; cx b[3],a[0]; rz(pi/64) a[0]; cx a[0],out[7]; rz(-pi/64) out[7]; cx a[0],out[7]; rz(pi/64) out[7]; rz(pi/128) b[3]; cx b[3],out[8]; rz(-pi/128) out[8]; cx b[3],out[8]; rz(pi/128) out[8]; cx b[3],a[0]; rz(-pi/128) a[0]; cx a[0],out[8]; rz(pi/128) out[8]; cx a[0],out[8]; rz(-pi/128) out[8]; cx b[3],a[0]; rz(pi/128) a[0]; cx a[0],out[8]; rz(-pi/128) out[8]; cx a[0],out[8]; rz(pi/128) out[8]; rz(pi/256) b[3]; cx b[3],out[9]; rz(-pi/256) out[9]; cx b[3],out[9]; rz(pi/256) out[9]; cx b[3],a[0]; rz(-pi/256) a[0]; cx a[0],out[9]; rz(pi/256) out[9]; cx a[0],out[9]; rz(-pi/256) out[9]; cx b[3],a[0]; rz(pi/256) a[0]; cx a[0],out[9]; rz(-pi/256) out[9]; cx a[0],out[9]; rz(pi/256) out[9]; rz(pi/512) b[3]; cx b[3],out[10]; rz(-pi/512) out[10]; cx b[3],out[10]; rz(pi/512) out[10]; cx b[3],a[0]; rz(-pi/512) a[0]; cx a[0],out[10]; rz(pi/512) out[10]; cx a[0],out[10]; rz(-pi/512) out[10]; cx b[3],a[0]; rz(pi/512) a[0]; cx a[0],out[10]; rz(-pi/512) out[10]; cx a[0],out[10]; rz(pi/512) out[10]; rz(pi/1024) b[3]; cx b[3],out[11]; rz(-pi/1024) out[11]; cx b[3],out[11]; rz(pi/1024) out[11]; cx b[3],a[0]; rz(-pi/1024) a[0]; cx a[0],out[11]; rz(pi/1024) out[11]; cx a[0],out[11]; rz(-pi/1024) out[11]; cx b[3],a[0]; rz(pi/1024) a[0]; cx a[0],out[11]; rz(-pi/1024) out[11]; cx a[0],out[11]; rz(pi/1024) out[11]; rz(pi/2048) b[3]; cx b[3],out[12]; rz(-pi/2048) out[12]; cx b[3],out[12]; rz(pi/2048) out[12]; cx b[3],a[0]; rz(-pi/2048) a[0]; cx a[0],out[12]; rz(pi/2048) out[12]; cx a[0],out[12]; rz(-pi/2048) out[12]; cx b[3],a[0]; rz(pi/2048) a[0]; cx a[0],out[12]; rz(-pi/2048) out[12]; cx a[0],out[12]; rz(pi/2048) out[12]; rz(pi/4096) b[3]; cx b[3],out[13]; rz(-pi/4096) out[13]; cx b[3],out[13]; rz(pi/4096) out[13]; cx b[3],a[0]; rz(-pi/4096) a[0]; cx a[0],out[13]; rz(pi/4096) out[13]; cx a[0],out[13]; rz(-pi/4096) out[13]; cx b[3],a[0]; rz(pi/4096) a[0]; cx a[0],out[13]; rz(-pi/4096) out[13]; cx a[0],out[13]; rz(pi/4096) out[13]; rz(pi/8192) b[3]; cx b[3],out[14]; rz(-pi/8192) out[14]; cx b[3],out[14]; rz(pi/8192) out[14]; cx b[3],a[0]; rz(-pi/8192) a[0]; cx a[0],out[14]; rz(pi/8192) out[14]; cx a[0],out[14]; rz(-pi/8192) out[14]; cx b[3],a[0]; rz(pi/8192) a[0]; cx a[0],out[14]; rz(-pi/8192) out[14]; cx a[0],out[14]; rz(pi/8192) out[14]; rz(pi/16384) b[3]; cx b[3],out[15]; rz(-pi/16384) out[15]; cx b[3],out[15]; rz(pi/16384) out[15]; cx b[3],a[0]; rz(-pi/16384) a[0]; cx a[0],out[15]; rz(pi/16384) out[15]; cx a[0],out[15]; rz(-pi/16384) out[15]; cx b[3],a[0]; rz(pi/16384) a[0]; cx a[0],out[15]; rz(-pi/16384) out[15]; cx a[0],out[15]; rz(pi/16384) out[15]; cx b[2],a[0]; rz(-pi) a[0]; cx a[0],out[0]; rz(pi) out[0]; cx a[0],out[0]; rz(-pi) out[0]; cx b[2],a[0]; rz(pi) a[0]; cx a[0],out[0]; rz(-pi) out[0]; cx a[0],out[0]; rz(pi) out[0]; cx b[1],out[0]; rz(-pi/2) out[0]; cx b[1],out[0]; rz(pi/2) out[0]; rz(pi/2) b[2]; cx b[2],out[1]; rz(-pi/2) out[1]; cx b[2],out[1]; rz(pi/2) out[1]; cx b[2],a[0]; rz(-pi/2) a[0]; cx a[0],out[1]; rz(pi/2) out[1]; cx a[0],out[1]; rz(-pi/2) out[1]; cx b[2],a[0]; rz(pi/2) a[0]; cx a[0],out[1]; rz(-pi/2) out[1]; cx a[0],out[1]; rz(pi/2) out[1]; rz(pi/4) b[2]; cx b[2],out[2]; rz(-pi/4) out[2]; cx b[2],out[2]; rz(pi/4) out[2]; cx b[2],a[0]; rz(-pi/4) a[0]; cx a[0],out[2]; rz(pi/4) out[2]; cx a[0],out[2]; rz(-pi/4) out[2]; cx b[2],a[0]; rz(pi/4) a[0]; cx a[0],out[2]; rz(-pi/4) out[2]; cx a[0],out[2]; rz(pi/4) out[2]; rz(pi/8) b[2]; cx b[2],out[3]; rz(-pi/8) out[3]; cx b[2],out[3]; rz(pi/8) out[3]; cx b[2],a[0]; rz(-pi/8) a[0]; cx a[0],out[3]; rz(pi/8) out[3]; cx a[0],out[3]; rz(-pi/8) out[3]; cx b[2],a[0]; rz(pi/8) a[0]; cx a[0],out[3]; rz(-pi/8) out[3]; cx a[0],out[3]; rz(pi/8) out[3]; rz(pi/16) b[2]; cx b[2],out[4]; rz(-pi/16) out[4]; cx b[2],out[4]; rz(pi/16) out[4]; cx b[2],a[0]; rz(-pi/16) a[0]; cx a[0],out[4]; rz(pi/16) out[4]; cx a[0],out[4]; rz(-pi/16) out[4]; cx b[2],a[0]; rz(pi/16) a[0]; cx a[0],out[4]; rz(-pi/16) out[4]; cx a[0],out[4]; rz(pi/16) out[4]; rz(pi/32) b[2]; cx b[2],out[5]; rz(-pi/32) out[5]; cx b[2],out[5]; rz(pi/32) out[5]; cx b[2],a[0]; rz(-pi/32) a[0]; cx a[0],out[5]; rz(pi/32) out[5]; cx a[0],out[5]; rz(-pi/32) out[5]; cx b[2],a[0]; rz(pi/32) a[0]; cx a[0],out[5]; rz(-pi/32) out[5]; cx a[0],out[5]; rz(pi/32) out[5]; rz(pi/64) b[2]; cx b[2],out[6]; rz(-pi/64) out[6]; cx b[2],out[6]; rz(pi/64) out[6]; cx b[2],a[0]; rz(-pi/64) a[0]; cx a[0],out[6]; rz(pi/64) out[6]; cx a[0],out[6]; rz(-pi/64) out[6]; cx b[2],a[0]; rz(pi/64) a[0]; cx a[0],out[6]; rz(-pi/64) out[6]; cx a[0],out[6]; rz(pi/64) out[6]; rz(pi/128) b[2]; cx b[2],out[7]; rz(-pi/128) out[7]; cx b[2],out[7]; rz(pi/128) out[7]; cx b[2],a[0]; rz(-pi/128) a[0]; cx a[0],out[7]; rz(pi/128) out[7]; cx a[0],out[7]; rz(-pi/128) out[7]; cx b[2],a[0]; rz(pi/128) a[0]; cx a[0],out[7]; rz(-pi/128) out[7]; cx a[0],out[7]; rz(pi/128) out[7]; rz(pi/256) b[2]; cx b[2],out[8]; rz(-pi/256) out[8]; cx b[2],out[8]; rz(pi/256) out[8]; cx b[2],a[0]; rz(-pi/256) a[0]; cx a[0],out[8]; rz(pi/256) out[8]; cx a[0],out[8]; rz(-pi/256) out[8]; cx b[2],a[0]; rz(pi/256) a[0]; cx a[0],out[8]; rz(-pi/256) out[8]; cx a[0],out[8]; rz(pi/256) out[8]; rz(pi/512) b[2]; cx b[2],out[9]; rz(-pi/512) out[9]; cx b[2],out[9]; rz(pi/512) out[9]; cx b[2],a[0]; rz(-pi/512) a[0]; cx a[0],out[9]; rz(pi/512) out[9]; cx a[0],out[9]; rz(-pi/512) out[9]; cx b[2],a[0]; rz(pi/512) a[0]; cx a[0],out[9]; rz(-pi/512) out[9]; cx a[0],out[9]; rz(pi/512) out[9]; rz(pi/1024) b[2]; cx b[2],out[10]; rz(-pi/1024) out[10]; cx b[2],out[10]; rz(pi/1024) out[10]; cx b[2],a[0]; rz(-pi/1024) a[0]; cx a[0],out[10]; rz(pi/1024) out[10]; cx a[0],out[10]; rz(-pi/1024) out[10]; cx b[2],a[0]; rz(pi/1024) a[0]; cx a[0],out[10]; rz(-pi/1024) out[10]; cx a[0],out[10]; rz(pi/1024) out[10]; rz(pi/2048) b[2]; cx b[2],out[11]; rz(-pi/2048) out[11]; cx b[2],out[11]; rz(pi/2048) out[11]; cx b[2],a[0]; rz(-pi/2048) a[0]; cx a[0],out[11]; rz(pi/2048) out[11]; cx a[0],out[11]; rz(-pi/2048) out[11]; cx b[2],a[0]; rz(pi/2048) a[0]; cx a[0],out[11]; rz(-pi/2048) out[11]; cx a[0],out[11]; rz(pi/2048) out[11]; rz(pi/4096) b[2]; cx b[2],out[12]; rz(-pi/4096) out[12]; cx b[2],out[12]; rz(pi/4096) out[12]; cx b[2],a[0]; rz(-pi/4096) a[0]; cx a[0],out[12]; rz(pi/4096) out[12]; cx a[0],out[12]; rz(-pi/4096) out[12]; cx b[2],a[0]; rz(pi/4096) a[0]; cx a[0],out[12]; rz(-pi/4096) out[12]; cx a[0],out[12]; rz(pi/4096) out[12]; rz(pi/8192) b[2]; cx b[2],out[13]; rz(-pi/8192) out[13]; cx b[2],out[13]; rz(pi/8192) out[13]; cx b[2],a[0]; rz(-pi/8192) a[0]; cx a[0],out[13]; rz(pi/8192) out[13]; cx a[0],out[13]; rz(-pi/8192) out[13]; cx b[2],a[0]; rz(pi/8192) a[0]; cx a[0],out[13]; rz(-pi/8192) out[13]; cx a[0],out[13]; rz(pi/8192) out[13]; rz(pi/16384) b[2]; cx b[2],out[14]; rz(-pi/16384) out[14]; cx b[2],out[14]; rz(pi/16384) out[14]; cx b[2],a[0]; rz(-pi/16384) a[0]; cx a[0],out[14]; rz(pi/16384) out[14]; cx a[0],out[14]; rz(-pi/16384) out[14]; cx b[2],a[0]; rz(pi/16384) a[0]; cx a[0],out[14]; rz(-pi/16384) out[14]; cx a[0],out[14]; rz(pi/16384) out[14]; rz(pi/32768) b[2]; cx b[2],out[15]; rz(-pi/32768) out[15]; cx b[2],out[15]; rz(pi/32768) out[15]; cx b[2],a[0]; rz(-pi/32768) a[0]; cx a[0],out[15]; rz(pi/32768) out[15]; cx a[0],out[15]; rz(-pi/32768) out[15]; cx b[2],a[0]; rz(pi/32768) a[0]; cx a[0],out[15]; rz(-pi/32768) out[15]; cx a[0],out[15]; rz(pi/32768) out[15]; cx b[1],a[0]; rz(-pi/2) a[0]; cx a[0],out[0]; rz(pi/2) out[0]; cx a[0],out[0]; rz(-pi/2) out[0]; cx b[1],a[0]; rz(pi/2) a[0]; cx a[0],out[0]; rz(-pi/2) out[0]; cx a[0],out[0]; rz(pi/2) out[0]; cx b[0],out[0]; rz(-pi/4) out[0]; cx b[0],out[0]; rz(pi/4) out[0]; rz(pi/4) b[1]; cx b[1],out[1]; rz(-pi/4) out[1]; cx b[1],out[1]; rz(pi/4) out[1]; cx b[1],a[0]; rz(-pi/4) a[0]; cx a[0],out[1]; rz(pi/4) out[1]; cx a[0],out[1]; rz(-pi/4) out[1]; cx b[1],a[0]; rz(pi/4) a[0]; cx a[0],out[1]; rz(-pi/4) out[1]; cx a[0],out[1]; rz(pi/4) out[1]; rz(pi/8) b[1]; cx b[1],out[2]; rz(-pi/8) out[2]; cx b[1],out[2]; rz(pi/8) out[2]; cx b[1],a[0]; rz(-pi/8) a[0]; cx a[0],out[2]; rz(pi/8) out[2]; cx a[0],out[2]; rz(-pi/8) out[2]; cx b[1],a[0]; rz(pi/8) a[0]; cx a[0],out[2]; rz(-pi/8) out[2]; cx a[0],out[2]; rz(pi/8) out[2]; rz(pi/16) b[1]; cx b[1],out[3]; rz(-pi/16) out[3]; cx b[1],out[3]; rz(pi/16) out[3]; cx b[1],a[0]; rz(-pi/16) a[0]; cx a[0],out[3]; rz(pi/16) out[3]; cx a[0],out[3]; rz(-pi/16) out[3]; cx b[1],a[0]; rz(pi/16) a[0]; cx a[0],out[3]; rz(-pi/16) out[3]; cx a[0],out[3]; rz(pi/16) out[3]; rz(pi/32) b[1]; cx b[1],out[4]; rz(-pi/32) out[4]; cx b[1],out[4]; rz(pi/32) out[4]; cx b[1],a[0]; rz(-pi/32) a[0]; cx a[0],out[4]; rz(pi/32) out[4]; cx a[0],out[4]; rz(-pi/32) out[4]; cx b[1],a[0]; rz(pi/32) a[0]; cx a[0],out[4]; rz(-pi/32) out[4]; cx a[0],out[4]; rz(pi/32) out[4]; rz(pi/64) b[1]; cx b[1],out[5]; rz(-pi/64) out[5]; cx b[1],out[5]; rz(pi/64) out[5]; cx b[1],a[0]; rz(-pi/64) a[0]; cx a[0],out[5]; rz(pi/64) out[5]; cx a[0],out[5]; rz(-pi/64) out[5]; cx b[1],a[0]; rz(pi/64) a[0]; cx a[0],out[5]; rz(-pi/64) out[5]; cx a[0],out[5]; rz(pi/64) out[5]; rz(pi/128) b[1]; cx b[1],out[6]; rz(-pi/128) out[6]; cx b[1],out[6]; rz(pi/128) out[6]; cx b[1],a[0]; rz(-pi/128) a[0]; cx a[0],out[6]; rz(pi/128) out[6]; cx a[0],out[6]; rz(-pi/128) out[6]; cx b[1],a[0]; rz(pi/128) a[0]; cx a[0],out[6]; rz(-pi/128) out[6]; cx a[0],out[6]; rz(pi/128) out[6]; rz(pi/256) b[1]; cx b[1],out[7]; rz(-pi/256) out[7]; cx b[1],out[7]; rz(pi/256) out[7]; cx b[1],a[0]; rz(-pi/256) a[0]; cx a[0],out[7]; rz(pi/256) out[7]; cx a[0],out[7]; rz(-pi/256) out[7]; cx b[1],a[0]; rz(pi/256) a[0]; cx a[0],out[7]; rz(-pi/256) out[7]; cx a[0],out[7]; rz(pi/256) out[7]; rz(pi/512) b[1]; cx b[1],out[8]; rz(-pi/512) out[8]; cx b[1],out[8]; rz(pi/512) out[8]; cx b[1],a[0]; rz(-pi/512) a[0]; cx a[0],out[8]; rz(pi/512) out[8]; cx a[0],out[8]; rz(-pi/512) out[8]; cx b[1],a[0]; rz(pi/512) a[0]; cx a[0],out[8]; rz(-pi/512) out[8]; cx a[0],out[8]; rz(pi/512) out[8]; rz(pi/1024) b[1]; cx b[1],out[9]; rz(-pi/1024) out[9]; cx b[1],out[9]; rz(pi/1024) out[9]; cx b[1],a[0]; rz(-pi/1024) a[0]; cx a[0],out[9]; rz(pi/1024) out[9]; cx a[0],out[9]; rz(-pi/1024) out[9]; cx b[1],a[0]; rz(pi/1024) a[0]; cx a[0],out[9]; rz(-pi/1024) out[9]; cx a[0],out[9]; rz(pi/1024) out[9]; rz(pi/2048) b[1]; cx b[1],out[10]; rz(-pi/2048) out[10]; cx b[1],out[10]; rz(pi/2048) out[10]; cx b[1],a[0]; rz(-pi/2048) a[0]; cx a[0],out[10]; rz(pi/2048) out[10]; cx a[0],out[10]; rz(-pi/2048) out[10]; cx b[1],a[0]; rz(pi/2048) a[0]; cx a[0],out[10]; rz(-pi/2048) out[10]; cx a[0],out[10]; rz(pi/2048) out[10]; rz(pi/4096) b[1]; cx b[1],out[11]; rz(-pi/4096) out[11]; cx b[1],out[11]; rz(pi/4096) out[11]; cx b[1],a[0]; rz(-pi/4096) a[0]; cx a[0],out[11]; rz(pi/4096) out[11]; cx a[0],out[11]; rz(-pi/4096) out[11]; cx b[1],a[0]; rz(pi/4096) a[0]; cx a[0],out[11]; rz(-pi/4096) out[11]; cx a[0],out[11]; rz(pi/4096) out[11]; rz(pi/8192) b[1]; cx b[1],out[12]; rz(-pi/8192) out[12]; cx b[1],out[12]; rz(pi/8192) out[12]; cx b[1],a[0]; rz(-pi/8192) a[0]; cx a[0],out[12]; rz(pi/8192) out[12]; cx a[0],out[12]; rz(-pi/8192) out[12]; cx b[1],a[0]; rz(pi/8192) a[0]; cx a[0],out[12]; rz(-pi/8192) out[12]; cx a[0],out[12]; rz(pi/8192) out[12]; rz(pi/16384) b[1]; cx b[1],out[13]; rz(-pi/16384) out[13]; cx b[1],out[13]; rz(pi/16384) out[13]; cx b[1],a[0]; rz(-pi/16384) a[0]; cx a[0],out[13]; rz(pi/16384) out[13]; cx a[0],out[13]; rz(-pi/16384) out[13]; cx b[1],a[0]; rz(pi/16384) a[0]; cx a[0],out[13]; rz(-pi/16384) out[13]; cx a[0],out[13]; rz(pi/16384) out[13]; rz(pi/32768) b[1]; cx b[1],out[14]; rz(-pi/32768) out[14]; cx b[1],out[14]; rz(pi/32768) out[14]; cx b[1],a[0]; rz(-pi/32768) a[0]; cx a[0],out[14]; rz(pi/32768) out[14]; cx a[0],out[14]; rz(-pi/32768) out[14]; cx b[1],a[0]; rz(pi/32768) a[0]; cx a[0],out[14]; rz(-pi/32768) out[14]; cx a[0],out[14]; rz(pi/32768) out[14]; rz(pi/65536) b[1]; cx b[1],out[15]; rz(-pi/65536) out[15]; cx b[1],out[15]; rz(pi/65536) out[15]; cx b[1],a[0]; rz(-pi/65536) a[0]; cx a[0],out[15]; rz(pi/65536) out[15]; cx a[0],out[15]; rz(-pi/65536) out[15]; cx b[1],a[0]; rz(pi/65536) a[0]; cx a[0],out[15]; rz(-pi/65536) out[15]; cx a[0],out[15]; rz(pi/65536) out[15]; cx b[0],a[0]; rz(-pi/4) a[0]; cx a[0],out[0]; rz(pi/4) out[0]; cx a[0],out[0]; rz(-pi/4) out[0]; cx b[0],a[0]; rz(pi/4) a[0]; cx a[0],out[0]; rz(-pi/4) out[0]; cx a[0],out[0]; rz(pi/4) out[0]; h out[0]; rz(pi/8) b[0]; cx b[0],out[1]; rz(-pi/8) out[1]; cx b[0],out[1]; rz(pi/8) out[1]; cx b[0],a[0]; rz(-pi/8) a[0]; cx a[0],out[1]; rz(pi/8) out[1]; cx a[0],out[1]; rz(-pi/8) out[1]; cx b[0],a[0]; rz(pi/8) a[0]; cx a[0],out[1]; rz(-pi/8) out[1]; cx a[0],out[1]; rz(pi/8) out[1]; rz(-pi/4) out[1]; cx out[1],out[0]; rz(pi/4) out[0]; cx out[1],out[0]; rz(-pi/4) out[0]; h out[1]; rz(pi/16) b[0]; cx b[0],out[2]; rz(-pi/16) out[2]; cx b[0],out[2]; rz(pi/16) out[2]; cx b[0],a[0]; rz(-pi/16) a[0]; cx a[0],out[2]; rz(pi/16) out[2]; cx a[0],out[2]; rz(-pi/16) out[2]; cx b[0],a[0]; rz(pi/16) a[0]; cx a[0],out[2]; rz(-pi/16) out[2]; cx a[0],out[2]; rz(pi/16) out[2]; rz(-pi/8) out[2]; cx out[2],out[0]; rz(pi/8) out[0]; cx out[2],out[0]; rz(-pi/8) out[0]; rz(-pi/4) out[2]; cx out[2],out[1]; rz(pi/4) out[1]; cx out[2],out[1]; rz(-pi/4) out[1]; h out[2]; rz(pi/32) b[0]; cx b[0],out[3]; rz(-pi/32) out[3]; cx b[0],out[3]; rz(pi/32) out[3]; cx b[0],a[0]; rz(-pi/32) a[0]; cx a[0],out[3]; rz(pi/32) out[3]; cx a[0],out[3]; rz(-pi/32) out[3]; cx b[0],a[0]; rz(pi/32) a[0]; cx a[0],out[3]; rz(-pi/32) out[3]; cx a[0],out[3]; rz(pi/32) out[3]; rz(-pi/16) out[3]; cx out[3],out[0]; rz(pi/16) out[0]; cx out[3],out[0]; rz(-pi/16) out[0]; rz(-pi/8) out[3]; cx out[3],out[1]; rz(pi/8) out[1]; cx out[3],out[1]; rz(-pi/8) out[1]; rz(-pi/4) out[3]; cx out[3],out[2]; rz(pi/4) out[2]; cx out[3],out[2]; rz(-pi/4) out[2]; h out[3]; rz(pi/64) b[0]; cx b[0],out[4]; rz(-pi/64) out[4]; cx b[0],out[4]; rz(pi/64) out[4]; cx b[0],a[0]; rz(-pi/64) a[0]; cx a[0],out[4]; rz(pi/64) out[4]; cx a[0],out[4]; rz(-pi/64) out[4]; cx b[0],a[0]; rz(pi/64) a[0]; cx a[0],out[4]; rz(-pi/64) out[4]; cx a[0],out[4]; rz(pi/64) out[4]; rz(-pi/32) out[4]; cx out[4],out[0]; rz(pi/32) out[0]; cx out[4],out[0]; rz(-pi/32) out[0]; rz(-pi/16) out[4]; cx out[4],out[1]; rz(pi/16) out[1]; cx out[4],out[1]; rz(-pi/16) out[1]; rz(-pi/8) out[4]; cx out[4],out[2]; rz(pi/8) out[2]; cx out[4],out[2]; rz(-pi/8) out[2]; rz(-pi/4) out[4]; cx out[4],out[3]; rz(pi/4) out[3]; cx out[4],out[3]; rz(-pi/4) out[3]; h out[4]; rz(pi/128) b[0]; cx b[0],out[5]; rz(-pi/128) out[5]; cx b[0],out[5]; rz(pi/128) out[5]; cx b[0],a[0]; rz(-pi/128) a[0]; cx a[0],out[5]; rz(pi/128) out[5]; cx a[0],out[5]; rz(-pi/128) out[5]; cx b[0],a[0]; rz(pi/128) a[0]; cx a[0],out[5]; rz(-pi/128) out[5]; cx a[0],out[5]; rz(pi/128) out[5]; rz(-pi/64) out[5]; cx out[5],out[0]; rz(pi/64) out[0]; cx out[5],out[0]; rz(-pi/64) out[0]; rz(-pi/32) out[5]; cx out[5],out[1]; rz(pi/32) out[1]; cx out[5],out[1]; rz(-pi/32) out[1]; rz(-pi/16) out[5]; cx out[5],out[2]; rz(pi/16) out[2]; cx out[5],out[2]; rz(-pi/16) out[2]; rz(-pi/8) out[5]; cx out[5],out[3]; rz(pi/8) out[3]; cx out[5],out[3]; rz(-pi/8) out[3]; rz(-pi/4) out[5]; cx out[5],out[4]; rz(pi/4) out[4]; cx out[5],out[4]; rz(-pi/4) out[4]; h out[5]; rz(pi/256) b[0]; cx b[0],out[6]; rz(-pi/256) out[6]; cx b[0],out[6]; rz(pi/256) out[6]; cx b[0],a[0]; rz(-pi/256) a[0]; cx a[0],out[6]; rz(pi/256) out[6]; cx a[0],out[6]; rz(-pi/256) out[6]; cx b[0],a[0]; rz(pi/256) a[0]; cx a[0],out[6]; rz(-pi/256) out[6]; cx a[0],out[6]; rz(pi/256) out[6]; rz(-pi/128) out[6]; cx out[6],out[0]; rz(pi/128) out[0]; cx out[6],out[0]; rz(-pi/128) out[0]; rz(-pi/64) out[6]; cx out[6],out[1]; rz(pi/64) out[1]; cx out[6],out[1]; rz(-pi/64) out[1]; rz(-pi/32) out[6]; cx out[6],out[2]; rz(pi/32) out[2]; cx out[6],out[2]; rz(-pi/32) out[2]; rz(-pi/16) out[6]; cx out[6],out[3]; rz(pi/16) out[3]; cx out[6],out[3]; rz(-pi/16) out[3]; rz(-pi/8) out[6]; cx out[6],out[4]; rz(pi/8) out[4]; cx out[6],out[4]; rz(-pi/8) out[4]; rz(-pi/4) out[6]; cx out[6],out[5]; rz(pi/4) out[5]; cx out[6],out[5]; rz(-pi/4) out[5]; h out[6]; rz(pi/512) b[0]; cx b[0],out[7]; rz(-pi/512) out[7]; cx b[0],out[7]; rz(pi/512) out[7]; cx b[0],a[0]; rz(-pi/512) a[0]; cx a[0],out[7]; rz(pi/512) out[7]; cx a[0],out[7]; rz(-pi/512) out[7]; cx b[0],a[0]; rz(pi/512) a[0]; cx a[0],out[7]; rz(-pi/512) out[7]; cx a[0],out[7]; rz(pi/512) out[7]; rz(-pi/256) out[7]; cx out[7],out[0]; rz(pi/256) out[0]; cx out[7],out[0]; rz(-pi/256) out[0]; rz(-pi/128) out[7]; cx out[7],out[1]; rz(pi/128) out[1]; cx out[7],out[1]; rz(-pi/128) out[1]; rz(-pi/64) out[7]; cx out[7],out[2]; rz(pi/64) out[2]; cx out[7],out[2]; rz(-pi/64) out[2]; rz(-pi/32) out[7]; cx out[7],out[3]; rz(pi/32) out[3]; cx out[7],out[3]; rz(-pi/32) out[3]; rz(-pi/16) out[7]; cx out[7],out[4]; rz(pi/16) out[4]; cx out[7],out[4]; rz(-pi/16) out[4]; rz(-pi/8) out[7]; cx out[7],out[5]; rz(pi/8) out[5]; cx out[7],out[5]; rz(-pi/8) out[5]; rz(-pi/4) out[7]; cx out[7],out[6]; rz(pi/4) out[6]; cx out[7],out[6]; rz(-pi/4) out[6]; h out[7]; rz(pi/1024) b[0]; cx b[0],out[8]; rz(-pi/1024) out[8]; cx b[0],out[8]; rz(pi/1024) out[8]; cx b[0],a[0]; rz(-pi/1024) a[0]; cx a[0],out[8]; rz(pi/1024) out[8]; cx a[0],out[8]; rz(-pi/1024) out[8]; cx b[0],a[0]; rz(pi/1024) a[0]; cx a[0],out[8]; rz(-pi/1024) out[8]; cx a[0],out[8]; rz(pi/1024) out[8]; rz(-pi/512) out[8]; cx out[8],out[0]; rz(pi/512) out[0]; cx out[8],out[0]; rz(-pi/512) out[0]; rz(-pi/256) out[8]; cx out[8],out[1]; rz(pi/256) out[1]; cx out[8],out[1]; rz(-pi/256) out[1]; rz(-pi/128) out[8]; cx out[8],out[2]; rz(pi/128) out[2]; cx out[8],out[2]; rz(-pi/128) out[2]; rz(-pi/64) out[8]; cx out[8],out[3]; rz(pi/64) out[3]; cx out[8],out[3]; rz(-pi/64) out[3]; rz(-pi/32) out[8]; cx out[8],out[4]; rz(pi/32) out[4]; cx out[8],out[4]; rz(-pi/32) out[4]; rz(-pi/16) out[8]; cx out[8],out[5]; rz(pi/16) out[5]; cx out[8],out[5]; rz(-pi/16) out[5]; rz(-pi/8) out[8]; cx out[8],out[6]; rz(pi/8) out[6]; cx out[8],out[6]; rz(-pi/8) out[6]; rz(-pi/4) out[8]; cx out[8],out[7]; rz(pi/4) out[7]; cx out[8],out[7]; rz(-pi/4) out[7]; h out[8]; rz(pi/2048) b[0]; cx b[0],out[9]; rz(-pi/2048) out[9]; cx b[0],out[9]; rz(pi/2048) out[9]; cx b[0],a[0]; rz(-pi/2048) a[0]; cx a[0],out[9]; rz(pi/2048) out[9]; cx a[0],out[9]; rz(-pi/2048) out[9]; cx b[0],a[0]; rz(pi/2048) a[0]; cx a[0],out[9]; rz(-pi/2048) out[9]; cx a[0],out[9]; rz(pi/2048) out[9]; rz(-pi/1024) out[9]; cx out[9],out[0]; rz(pi/1024) out[0]; cx out[9],out[0]; rz(-pi/1024) out[0]; rz(-pi/512) out[9]; cx out[9],out[1]; rz(pi/512) out[1]; cx out[9],out[1]; rz(-pi/512) out[1]; rz(-pi/256) out[9]; cx out[9],out[2]; rz(pi/256) out[2]; cx out[9],out[2]; rz(-pi/256) out[2]; rz(-pi/128) out[9]; cx out[9],out[3]; rz(pi/128) out[3]; cx out[9],out[3]; rz(-pi/128) out[3]; rz(-pi/64) out[9]; cx out[9],out[4]; rz(pi/64) out[4]; cx out[9],out[4]; rz(-pi/64) out[4]; rz(-pi/32) out[9]; cx out[9],out[5]; rz(pi/32) out[5]; cx out[9],out[5]; rz(-pi/32) out[5]; rz(-pi/16) out[9]; cx out[9],out[6]; rz(pi/16) out[6]; cx out[9],out[6]; rz(-pi/16) out[6]; rz(-pi/8) out[9]; cx out[9],out[7]; rz(pi/8) out[7]; cx out[9],out[7]; rz(-pi/8) out[7]; rz(-pi/4) out[9]; cx out[9],out[8]; rz(pi/4) out[8]; cx out[9],out[8]; rz(-pi/4) out[8]; h out[9]; rz(pi/4096) b[0]; cx b[0],out[10]; rz(-pi/4096) out[10]; cx b[0],out[10]; rz(pi/4096) out[10]; cx b[0],a[0]; rz(-pi/4096) a[0]; cx a[0],out[10]; rz(pi/4096) out[10]; cx a[0],out[10]; rz(-pi/4096) out[10]; cx b[0],a[0]; rz(pi/4096) a[0]; cx a[0],out[10]; rz(-pi/4096) out[10]; cx a[0],out[10]; rz(pi/4096) out[10]; rz(-pi/2048) out[10]; cx out[10],out[0]; rz(pi/2048) out[0]; cx out[10],out[0]; rz(-pi/2048) out[0]; rz(-pi/1024) out[10]; cx out[10],out[1]; rz(pi/1024) out[1]; cx out[10],out[1]; rz(-pi/1024) out[1]; rz(-pi/512) out[10]; cx out[10],out[2]; rz(pi/512) out[2]; cx out[10],out[2]; rz(-pi/256) out[10]; cx out[10],out[3]; rz(-pi/512) out[2]; rz(pi/256) out[3]; cx out[10],out[3]; rz(-pi/128) out[10]; cx out[10],out[4]; rz(-pi/256) out[3]; rz(pi/128) out[4]; cx out[10],out[4]; rz(-pi/64) out[10]; cx out[10],out[5]; rz(-pi/128) out[4]; rz(pi/64) out[5]; cx out[10],out[5]; rz(-pi/32) out[10]; cx out[10],out[6]; rz(-pi/64) out[5]; rz(pi/32) out[6]; cx out[10],out[6]; rz(-pi/16) out[10]; cx out[10],out[7]; rz(-pi/32) out[6]; rz(pi/16) out[7]; cx out[10],out[7]; rz(-pi/8) out[10]; cx out[10],out[8]; rz(-pi/16) out[7]; rz(pi/8) out[8]; cx out[10],out[8]; rz(-pi/4) out[10]; cx out[10],out[9]; rz(-pi/8) out[8]; rz(pi/4) out[9]; cx out[10],out[9]; h out[10]; rz(-pi/4) out[9]; rz(pi/8192) b[0]; cx b[0],out[11]; rz(-pi/8192) out[11]; cx b[0],out[11]; rz(pi/8192) out[11]; cx b[0],a[0]; rz(-pi/8192) a[0]; cx a[0],out[11]; rz(pi/8192) out[11]; cx a[0],out[11]; rz(-pi/8192) out[11]; cx b[0],a[0]; rz(pi/8192) a[0]; cx a[0],out[11]; rz(-pi/8192) out[11]; cx a[0],out[11]; rz(pi/8192) out[11]; rz(-pi/4096) out[11]; cx out[11],out[0]; rz(pi/4096) out[0]; cx out[11],out[0]; rz(-pi/4096) out[0]; rz(-pi/2048) out[11]; cx out[11],out[1]; rz(pi/2048) out[1]; cx out[11],out[1]; rz(-pi/2048) out[1]; rz(-pi/1024) out[11]; cx out[11],out[2]; rz(pi/1024) out[2]; cx out[11],out[2]; rz(-pi/512) out[11]; cx out[11],out[3]; rz(-pi/1024) out[2]; rz(pi/512) out[3]; cx out[11],out[3]; rz(-pi/256) out[11]; cx out[11],out[4]; rz(-pi/512) out[3]; rz(pi/256) out[4]; cx out[11],out[4]; rz(-pi/128) out[11]; cx out[11],out[5]; rz(-pi/256) out[4]; rz(pi/128) out[5]; cx out[11],out[5]; rz(-pi/64) out[11]; cx out[11],out[6]; rz(-pi/128) out[5]; rz(pi/64) out[6]; cx out[11],out[6]; rz(-pi/32) out[11]; cx out[11],out[7]; rz(-pi/64) out[6]; rz(pi/32) out[7]; cx out[11],out[7]; rz(-pi/16) out[11]; cx out[11],out[8]; rz(-pi/32) out[7]; rz(pi/16) out[8]; cx out[11],out[8]; rz(-pi/8) out[11]; cx out[11],out[9]; rz(-pi/16) out[8]; rz(pi/8) out[9]; cx out[11],out[9]; rz(-pi/4) out[11]; cx out[11],out[10]; rz(pi/4) out[10]; cx out[11],out[10]; rz(-pi/4) out[10]; h out[11]; rz(-pi/8) out[9]; rz(pi/16384) b[0]; cx b[0],out[12]; rz(-pi/16384) out[12]; cx b[0],out[12]; rz(pi/16384) out[12]; cx b[0],a[0]; rz(-pi/16384) a[0]; cx a[0],out[12]; rz(pi/16384) out[12]; cx a[0],out[12]; rz(-pi/16384) out[12]; cx b[0],a[0]; rz(pi/16384) a[0]; cx a[0],out[12]; rz(-pi/16384) out[12]; cx a[0],out[12]; rz(pi/16384) out[12]; rz(-pi/8192) out[12]; cx out[12],out[0]; rz(pi/8192) out[0]; cx out[12],out[0]; rz(-pi/8192) out[0]; rz(-pi/4096) out[12]; cx out[12],out[1]; rz(pi/4096) out[1]; cx out[12],out[1]; rz(-pi/4096) out[1]; rz(-pi/2048) out[12]; cx out[12],out[2]; rz(pi/2048) out[2]; cx out[12],out[2]; rz(-pi/1024) out[12]; cx out[12],out[3]; rz(-pi/2048) out[2]; rz(pi/1024) out[3]; cx out[12],out[3]; rz(-pi/512) out[12]; cx out[12],out[4]; rz(-pi/1024) out[3]; rz(pi/512) out[4]; cx out[12],out[4]; rz(-pi/256) out[12]; cx out[12],out[5]; rz(-pi/512) out[4]; rz(pi/256) out[5]; cx out[12],out[5]; rz(-pi/128) out[12]; cx out[12],out[6]; rz(-pi/256) out[5]; rz(pi/128) out[6]; cx out[12],out[6]; rz(-pi/64) out[12]; cx out[12],out[7]; rz(-pi/128) out[6]; rz(pi/64) out[7]; cx out[12],out[7]; rz(-pi/32) out[12]; cx out[12],out[8]; rz(-pi/64) out[7]; rz(pi/32) out[8]; cx out[12],out[8]; rz(-pi/16) out[12]; cx out[12],out[9]; rz(-pi/32) out[8]; rz(pi/16) out[9]; cx out[12],out[9]; rz(-pi/8) out[12]; cx out[12],out[10]; rz(pi/8) out[10]; cx out[12],out[10]; rz(-pi/8) out[10]; rz(-pi/4) out[12]; cx out[12],out[11]; rz(pi/4) out[11]; cx out[12],out[11]; rz(-pi/4) out[11]; h out[12]; rz(-pi/16) out[9]; rz(pi/32768) b[0]; cx b[0],out[13]; rz(-pi/32768) out[13]; cx b[0],out[13]; rz(pi/32768) out[13]; cx b[0],a[0]; rz(-pi/32768) a[0]; cx a[0],out[13]; rz(pi/32768) out[13]; cx a[0],out[13]; rz(-pi/32768) out[13]; cx b[0],a[0]; rz(pi/32768) a[0]; cx a[0],out[13]; rz(-pi/32768) out[13]; cx a[0],out[13]; rz(pi/32768) out[13]; rz(-pi/16384) out[13]; cx out[13],out[0]; rz(pi/16384) out[0]; cx out[13],out[0]; rz(-pi/16384) out[0]; rz(-pi/8192) out[13]; cx out[13],out[1]; rz(pi/8192) out[1]; cx out[13],out[1]; rz(-pi/8192) out[1]; rz(-pi/4096) out[13]; cx out[13],out[2]; rz(pi/4096) out[2]; cx out[13],out[2]; rz(-pi/2048) out[13]; cx out[13],out[3]; rz(-pi/4096) out[2]; rz(pi/2048) out[3]; cx out[13],out[3]; rz(-pi/1024) out[13]; cx out[13],out[4]; rz(-pi/2048) out[3]; rz(pi/1024) out[4]; cx out[13],out[4]; rz(-pi/512) out[13]; cx out[13],out[5]; rz(-pi/1024) out[4]; rz(pi/512) out[5]; cx out[13],out[5]; rz(-pi/256) out[13]; cx out[13],out[6]; rz(-pi/512) out[5]; rz(pi/256) out[6]; cx out[13],out[6]; rz(-pi/128) out[13]; cx out[13],out[7]; rz(-pi/256) out[6]; rz(pi/128) out[7]; cx out[13],out[7]; rz(-pi/64) out[13]; cx out[13],out[8]; rz(-pi/128) out[7]; rz(pi/64) out[8]; cx out[13],out[8]; rz(-pi/32) out[13]; cx out[13],out[9]; rz(-pi/64) out[8]; rz(pi/32) out[9]; cx out[13],out[9]; rz(-pi/16) out[13]; cx out[13],out[10]; rz(pi/16) out[10]; cx out[13],out[10]; rz(-pi/16) out[10]; rz(-pi/8) out[13]; cx out[13],out[11]; rz(pi/8) out[11]; cx out[13],out[11]; rz(-pi/8) out[11]; rz(-pi/4) out[13]; cx out[13],out[12]; rz(pi/4) out[12]; cx out[13],out[12]; rz(-pi/4) out[12]; h out[13]; rz(-pi/32) out[9]; rz(pi/65536) b[0]; cx b[0],out[14]; rz(-pi/65536) out[14]; cx b[0],out[14]; rz(pi/65536) out[14]; cx b[0],a[0]; rz(-pi/65536) a[0]; cx a[0],out[14]; rz(pi/65536) out[14]; cx a[0],out[14]; rz(-pi/65536) out[14]; cx b[0],a[0]; rz(pi/65536) a[0]; cx a[0],out[14]; rz(-pi/65536) out[14]; cx a[0],out[14]; rz(pi/65536) out[14]; rz(-pi/32768) out[14]; cx out[14],out[0]; rz(pi/32768) out[0]; cx out[14],out[0]; rz(-pi/32768) out[0]; rz(-pi/16384) out[14]; cx out[14],out[1]; rz(pi/16384) out[1]; cx out[14],out[1]; rz(-pi/16384) out[1]; rz(-pi/8192) out[14]; cx out[14],out[2]; rz(pi/8192) out[2]; cx out[14],out[2]; rz(-pi/4096) out[14]; cx out[14],out[3]; rz(-pi/8192) out[2]; rz(pi/4096) out[3]; cx out[14],out[3]; rz(-pi/2048) out[14]; cx out[14],out[4]; rz(-pi/4096) out[3]; rz(pi/2048) out[4]; cx out[14],out[4]; rz(-pi/1024) out[14]; cx out[14],out[5]; rz(-pi/2048) out[4]; rz(pi/1024) out[5]; cx out[14],out[5]; rz(-pi/512) out[14]; cx out[14],out[6]; rz(-pi/1024) out[5]; rz(pi/512) out[6]; cx out[14],out[6]; rz(-pi/256) out[14]; cx out[14],out[7]; rz(-pi/512) out[6]; rz(pi/256) out[7]; cx out[14],out[7]; rz(-pi/128) out[14]; cx out[14],out[8]; rz(-pi/256) out[7]; rz(pi/128) out[8]; cx out[14],out[8]; rz(-pi/64) out[14]; cx out[14],out[9]; rz(-pi/128) out[8]; rz(pi/64) out[9]; cx out[14],out[9]; rz(-pi/32) out[14]; cx out[14],out[10]; rz(pi/32) out[10]; cx out[14],out[10]; rz(-pi/32) out[10]; rz(-pi/16) out[14]; cx out[14],out[11]; rz(pi/16) out[11]; cx out[14],out[11]; rz(-pi/16) out[11]; rz(-pi/8) out[14]; cx out[14],out[12]; rz(pi/8) out[12]; cx out[14],out[12]; rz(-pi/8) out[12]; rz(-pi/4) out[14]; cx out[14],out[13]; rz(pi/4) out[13]; cx out[14],out[13]; rz(-pi/4) out[13]; h out[14]; rz(-pi/64) out[9]; rz(pi/131072) b[0]; cx b[0],out[15]; rz(-pi/131072) out[15]; cx b[0],out[15]; rz(pi/131072) out[15]; cx b[0],a[0]; rz(-pi/131072) a[0]; cx a[0],out[15]; rz(pi/131072) out[15]; cx a[0],out[15]; rz(-pi/131072) out[15]; cx b[0],a[0]; rz(pi/131072) a[0]; cx a[0],out[15]; rz(-pi/131072) out[15]; cx a[0],out[15]; rz(pi/131072) out[15]; rz(-pi/65536) out[15]; cx out[15],out[0]; rz(pi/65536) out[0]; cx out[15],out[0]; rz(-pi/65536) out[0]; rz(-pi/32768) out[15]; cx out[15],out[1]; rz(pi/32768) out[1]; cx out[15],out[1]; rz(-pi/32768) out[1]; rz(-pi/16384) out[15]; cx out[15],out[2]; rz(pi/16384) out[2]; cx out[15],out[2]; rz(-pi/8192) out[15]; cx out[15],out[3]; rz(-pi/16384) out[2]; rz(pi/8192) out[3]; cx out[15],out[3]; rz(-pi/4096) out[15]; cx out[15],out[4]; rz(-pi/8192) out[3]; rz(pi/4096) out[4]; cx out[15],out[4]; rz(-pi/2048) out[15]; cx out[15],out[5]; rz(-pi/4096) out[4]; rz(pi/2048) out[5]; cx out[15],out[5]; rz(-pi/1024) out[15]; cx out[15],out[6]; rz(-pi/2048) out[5]; rz(pi/1024) out[6]; cx out[15],out[6]; rz(-pi/512) out[15]; cx out[15],out[7]; rz(-pi/1024) out[6]; rz(pi/512) out[7]; cx out[15],out[7]; rz(-pi/256) out[15]; cx out[15],out[8]; rz(-pi/512) out[7]; rz(pi/256) out[8]; cx out[15],out[8]; rz(-pi/128) out[15]; cx out[15],out[9]; rz(-pi/256) out[8]; rz(pi/128) out[9]; cx out[15],out[9]; rz(-pi/64) out[15]; cx out[15],out[10]; rz(pi/64) out[10]; cx out[15],out[10]; rz(-pi/64) out[10]; rz(-pi/32) out[15]; cx out[15],out[11]; rz(pi/32) out[11]; cx out[15],out[11]; rz(-pi/32) out[11]; rz(-pi/16) out[15]; cx out[15],out[12]; rz(pi/16) out[12]; cx out[15],out[12]; rz(-pi/16) out[12]; rz(-pi/8) out[15]; cx out[15],out[13]; rz(pi/8) out[13]; cx out[15],out[13]; rz(-pi/8) out[13]; rz(-pi/4) out[15]; cx out[15],out[14]; rz(pi/4) out[14]; cx out[15],out[14]; rz(-pi/4) out[14]; h out[15]; rz(-pi/128) out[9];
azure-quantum-python/azure-quantum/examples/resource_estimation/cli_test_files/rqft_multiplier.qasm/0
{ "file_path": "azure-quantum-python/azure-quantum/examples/resource_estimation/cli_test_files/rqft_multiplier.qasm", "repo_id": "azure-quantum-python", "token_count": 214747 }
381
interactions: - request: body: client_id=PLACEHOLDER&grant_type=client_credentials&client_assertion=PLACEHOLDER&client_info=1&client_assertion_type=PLACEHOLDER&scope=https%3A%2F%2Fquantum.microsoft.com%2F.default headers: Accept: - application/json Accept-Encoding: - gzip, deflate Connection: - keep-alive Content-Length: - '181' Content-Type: - application/x-www-form-urlencoded User-Agent: - azsdk-python-identity/1.16.0 Python/3.9.19 (Windows-10-10.0.22631-SP0) x-client-current-telemetry: - 4|730,2| x-client-os: - win32 x-client-sku: - MSAL.Python x-client-ver: - 1.28.0 method: POST uri: https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/token response: body: string: '{"token_type": "Bearer", "expires_in": 1746120789, "ext_expires_in": 1746120789, "refresh_in": 31536000, "access_token": "PLACEHOLDER"}' headers: content-length: - '135' content-type: - application/json; charset=utf-8 status: code: 200 message: OK - request: body: 'b''{"containerName": "job-00000000-0000-0000-0000-000000000001"}''' headers: Accept: - application/json Accept-Encoding: - gzip, deflate Connection: - keep-alive Content-Length: - '64' Content-Type: - application/json User-Agent: - azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0) method: POST uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/storage/sasUri?api-version=2022-09-12-preview&test-sequence-id=1 response: body: string: '{"sasUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&srt=co&ss=b&sp=racwl"}' headers: connection: - keep-alive content-length: - '174' content-type: - application/json; charset=utf-8 transfer-encoding: - chunked status: code: 200 message: OK - request: body: null headers: Accept: - application/xml Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - azsdk-python-storage-blob/12.19.1 Python/3.9.19 (Windows-10-10.0.22631-SP0) x-ms-date: - Wed, 01 May 2024 17:33:10 GMT x-ms-version: - '2023-11-03' method: GET uri: https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?restype=container&sv=PLACEHOLDER&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&srt=co&ss=b&sp=racwl response: body: string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>ContainerNotFound</Code><Message>The specified container does not exist.\nRequestId:baee778f-c01e-003c-32ed-9b0507000000\nTime:2024-05-01T17:33:13.0034919Z</Message></Error>" headers: content-length: - '223' content-type: - application/xml x-ms-version: - '2023-11-03' status: code: 404 message: The specified container does not exist. - request: body: null headers: Accept: - application/xml Accept-Encoding: - gzip, deflate Connection: - keep-alive Content-Length: - '0' User-Agent: - azsdk-python-storage-blob/12.19.1 Python/3.9.19 (Windows-10-10.0.22631-SP0) x-ms-date: - Wed, 01 May 2024 17:33:12 GMT x-ms-version: - '2023-11-03' method: PUT uri: https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?restype=container&sv=PLACEHOLDER&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&srt=co&ss=b&sp=racwl response: body: string: '' headers: content-length: - '0' x-ms-version: - '2023-11-03' status: code: 201 message: Created - request: body: null headers: Accept: - application/xml Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - azsdk-python-storage-blob/12.19.1 Python/3.9.19 (Windows-10-10.0.22631-SP0) x-ms-date: - Wed, 01 May 2024 17:33:12 GMT x-ms-version: - '2023-11-03' method: GET uri: https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?restype=container&sv=PLACEHOLDER&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&srt=co&ss=b&sp=racwl response: body: string: '' headers: content-length: - '0' x-ms-lease-state: - available x-ms-lease-status: - unlocked x-ms-version: - '2023-11-03' status: code: 200 message: OK - request: body: 'b''{"qubits": 3, "circuit": [{"gate": "h", "target": 0}, {"gate": "cnot", "control": 0, "target": 1}, {"gate": "cnot", "control": 0, "target": 2}]}''' headers: Accept: - application/xml Accept-Encoding: - gzip, deflate Connection: - keep-alive Content-Length: - '147' Content-Type: - application/octet-stream User-Agent: - azsdk-python-storage-blob/12.19.1 Python/3.9.19 (Windows-10-10.0.22631-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - Wed, 01 May 2024 17:33:13 GMT x-ms-version: - '2023-11-03' method: PUT uri: https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&srt=co&ss=b&sp=racwl response: body: string: '' headers: content-length: - '0' x-ms-version: - '2023-11-03' status: code: 201 message: Created - request: body: 'b''{"id": "00000000-0000-0000-0000-000000000001", "name": "ionq-3ghz-job", "providerId": "IonQ", "target": "ionq.simulator", "itemType": "Job", "containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&srt=co&ss=b&sp=racwl", "inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData", "inputDataFormat": "ionq.circuit.v1", "inputParams": {}, "outputDataFormat": "ionq.quantum-results.v1"}''' headers: Accept: - application/json Accept-Encoding: - gzip, deflate Connection: - keep-alive Content-Length: - '537' Content-Type: - application/json User-Agent: - azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0) method: PUT uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=1 response: body: string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&srt=co&ss=b&sp=racwl", "inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcw", "inputDataFormat": "ionq.circuit.v1", "inputParams": {}, "metadata": null, "sessionId": null, "status": "Waiting", "jobType": "QuantumComputing", "outputDataFormat": "ionq.quantum-results.v1", "outputDataUri": "https://mystorage.blob.core.windows.net:443/job-00000000-0000-0000-0000-000000000001/outputData?sv=PLACEHOLDER&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&srt=co&ss=b&sp=racwl", "beginExecutionTime": null, "cancellationTime": null, "quantumComputingData": null, "errorData": null, "isCancelling": false, "tags": [], "name": "ionq-3ghz-job", "id": "00000000-0000-0000-0000-000000000001", "providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-05-01T17:33:15.3553489+00:00", "endExecutionTime": null, "costEstimate": null, "itemType": "Job"}' headers: connection: - keep-alive content-length: - '1129' content-type: - application/json; charset=utf-8 transfer-encoding: - chunked status: code: 200 message: OK - request: body: null headers: Accept: - application/json Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0) method: GET uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=1 response: body: string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl", "inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.input.json", "inputDataFormat": "ionq.circuit.v1", "inputParams": {}, "metadata": null, "sessionId": null, "status": "Waiting", "jobType": "QuantumComputing", "outputDataFormat": "ionq.quantum-results.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/outputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.output.json", "beginExecutionTime": null, "cancellationTime": null, "quantumComputingData": {"count": 1}, "errorData": null, "isCancelling": false, "tags": [], "name": "ionq-3ghz-job", "id": "00000000-0000-0000-0000-000000000001", "providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-05-01T17:33:15.3553489+00:00", "endExecutionTime": null, "costEstimate": null, "itemType": "Job"}' headers: connection: - keep-alive content-length: - '1301' content-type: - application/json; charset=utf-8 transfer-encoding: - chunked status: code: 200 message: OK - request: body: null headers: Accept: - application/json Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0) method: GET uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=2 response: body: string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl", "inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.input.json", "inputDataFormat": "ionq.circuit.v1", "inputParams": {}, "metadata": null, "sessionId": null, "status": "Waiting", "jobType": "QuantumComputing", "outputDataFormat": "ionq.quantum-results.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/outputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.output.json", "beginExecutionTime": null, "cancellationTime": null, "quantumComputingData": {"count": 1}, "errorData": null, "isCancelling": false, "tags": [], "name": "ionq-3ghz-job", "id": "00000000-0000-0000-0000-000000000001", "providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-05-01T17:33:15.3553489+00:00", "endExecutionTime": null, "costEstimate": null, "itemType": "Job"}' headers: connection: - keep-alive content-length: - '1301' content-type: - application/json; charset=utf-8 transfer-encoding: - chunked status: code: 200 message: OK - request: body: null headers: Accept: - application/json Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0) method: GET uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=3 response: body: string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl", "inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.input.json", "inputDataFormat": "ionq.circuit.v1", "inputParams": {}, "metadata": null, "sessionId": null, "status": "Waiting", "jobType": "QuantumComputing", "outputDataFormat": "ionq.quantum-results.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/outputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.output.json", "beginExecutionTime": null, "cancellationTime": null, "quantumComputingData": {"count": 1}, "errorData": null, "isCancelling": false, "tags": [], "name": "ionq-3ghz-job", "id": "00000000-0000-0000-0000-000000000001", "providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-05-01T17:33:15.3553489+00:00", "endExecutionTime": null, "costEstimate": null, "itemType": "Job"}' headers: connection: - keep-alive content-length: - '1301' content-type: - application/json; charset=utf-8 transfer-encoding: - chunked status: code: 200 message: OK - request: body: null headers: Accept: - application/json Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0) method: GET uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=4 response: body: string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl", "inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.input.json", "inputDataFormat": "ionq.circuit.v1", "inputParams": {}, "metadata": null, "sessionId": null, "status": "Waiting", "jobType": "QuantumComputing", "outputDataFormat": "ionq.quantum-results.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/outputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.output.json", "beginExecutionTime": null, "cancellationTime": null, "quantumComputingData": {"count": 1}, "errorData": null, "isCancelling": false, "tags": [], "name": "ionq-3ghz-job", "id": "00000000-0000-0000-0000-000000000001", "providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-05-01T17:33:15.3553489+00:00", "endExecutionTime": null, "costEstimate": null, "itemType": "Job"}' headers: connection: - keep-alive content-length: - '1301' content-type: - application/json; charset=utf-8 transfer-encoding: - chunked status: code: 200 message: OK - request: body: null headers: Accept: - application/json Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0) method: GET uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=5 response: body: string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl", "inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.input.json", "inputDataFormat": "ionq.circuit.v1", "inputParams": {}, "metadata": null, "sessionId": null, "status": "Waiting", "jobType": "QuantumComputing", "outputDataFormat": "ionq.quantum-results.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/outputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.output.json", "beginExecutionTime": null, "cancellationTime": null, "quantumComputingData": {"count": 1}, "errorData": null, "isCancelling": false, "tags": [], "name": "ionq-3ghz-job", "id": "00000000-0000-0000-0000-000000000001", "providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-05-01T17:33:15.3553489+00:00", "endExecutionTime": null, "costEstimate": null, "itemType": "Job"}' headers: connection: - keep-alive content-length: - '1301' content-type: - application/json; charset=utf-8 transfer-encoding: - chunked status: code: 200 message: OK - request: body: null headers: Accept: - application/json Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0) method: GET uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=6 response: body: string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl", "inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.input.json", "inputDataFormat": "ionq.circuit.v1", "inputParams": {}, "metadata": null, "sessionId": null, "status": "Waiting", "jobType": "QuantumComputing", "outputDataFormat": "ionq.quantum-results.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/outputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.output.json", "beginExecutionTime": null, "cancellationTime": null, "quantumComputingData": {"count": 1}, "errorData": null, "isCancelling": false, "tags": [], "name": "ionq-3ghz-job", "id": "00000000-0000-0000-0000-000000000001", "providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-05-01T17:33:15.3553489+00:00", "endExecutionTime": null, "costEstimate": null, "itemType": "Job"}' headers: connection: - keep-alive content-length: - '1301' content-type: - application/json; charset=utf-8 transfer-encoding: - chunked status: code: 200 message: OK - request: body: null headers: Accept: - application/json Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0) method: GET uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=7 response: body: string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl", "inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.input.json", "inputDataFormat": "ionq.circuit.v1", "inputParams": {}, "metadata": null, "sessionId": null, "status": "Succeeded", "jobType": "QuantumComputing", "outputDataFormat": "ionq.quantum-results.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/rawOutputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.output.json", "beginExecutionTime": "2024-05-01T17:33:18.624Z", "cancellationTime": null, "quantumComputingData": {"count": 1}, "errorData": null, "isCancelling": false, "tags": [], "name": "ionq-3ghz-job", "id": "00000000-0000-0000-0000-000000000001", "providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-05-01T17:33:15.3553489+00:00", "endExecutionTime": "2024-05-01T17:33:18.691Z", "costEstimate": {"currencyCode": "USD", "events": [{"dimensionId": "gs1q", "dimensionName": "1Q Gate Shot", "measureUnit": "1q gate shot", "amountBilled": 0.0, "amountConsumed": 0.0, "unitPrice": 0.0}, {"dimensionId": "gs2q", "dimensionName": "2Q Gate Shot", "measureUnit": "2q gate shot", "amountBilled": 0.0, "amountConsumed": 0.0, "unitPrice": 0.0}], "estimatedTotal": 0.0}, "itemType": "Job"}' headers: connection: - keep-alive content-length: - '1706' content-type: - application/json; charset=utf-8 transfer-encoding: - chunked status: code: 200 message: OK - request: body: null headers: Accept: - application/json Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0) method: GET uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=8 response: body: string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl", "inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.input.json", "inputDataFormat": "ionq.circuit.v1", "inputParams": {}, "metadata": null, "sessionId": null, "status": "Succeeded", "jobType": "QuantumComputing", "outputDataFormat": "ionq.quantum-results.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/rawOutputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.output.json", "beginExecutionTime": "2024-05-01T17:33:18.624Z", "cancellationTime": null, "quantumComputingData": {"count": 1}, "errorData": null, "isCancelling": false, "tags": [], "name": "ionq-3ghz-job", "id": "00000000-0000-0000-0000-000000000001", "providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-05-01T17:33:15.3553489+00:00", "endExecutionTime": "2024-05-01T17:33:18.691Z", "costEstimate": {"currencyCode": "USD", "events": [{"dimensionId": "gs1q", "dimensionName": "1Q Gate Shot", "measureUnit": "1q gate shot", "amountBilled": 0.0, "amountConsumed": 0.0, "unitPrice": 0.0}, {"dimensionId": "gs2q", "dimensionName": "2Q Gate Shot", "measureUnit": "2q gate shot", "amountBilled": 0.0, "amountConsumed": 0.0, "unitPrice": 0.0}], "estimatedTotal": 0.0}, "itemType": "Job"}' headers: connection: - keep-alive content-length: - '1706' content-type: - application/json; charset=utf-8 transfer-encoding: - chunked status: code: 200 message: OK - request: body: null headers: Accept: - application/json Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - azsdk-python-quantum/0.0.1 Python/3.9.19 (Windows-10-10.0.22631-SP0) method: GET uri: https://eastus.quantum.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Quantum/workspaces/myworkspace/jobs/00000000-0000-0000-0000-000000000001?api-version=2022-09-12-preview&test-sequence-id=9 response: body: string: '{"containerUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001?sv=PLACEHOLDER&sr=c&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=rcwl", "inputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/inputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.input.json", "inputDataFormat": "ionq.circuit.v1", "inputParams": {}, "metadata": null, "sessionId": null, "status": "Succeeded", "jobType": "QuantumComputing", "outputDataFormat": "ionq.quantum-results.v1", "outputDataUri": "https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/rawOutputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.output.json", "beginExecutionTime": "2024-05-01T17:33:18.624Z", "cancellationTime": null, "quantumComputingData": {"count": 1}, "errorData": null, "isCancelling": false, "tags": [], "name": "ionq-3ghz-job", "id": "00000000-0000-0000-0000-000000000001", "providerId": "ionq", "target": "ionq.simulator", "creationTime": "2024-05-01T17:33:15.3553489+00:00", "endExecutionTime": "2024-05-01T17:33:18.691Z", "costEstimate": {"currencyCode": "USD", "events": [{"dimensionId": "gs1q", "dimensionName": "1Q Gate Shot", "measureUnit": "1q gate shot", "amountBilled": 0.0, "amountConsumed": 0.0, "unitPrice": 0.0}, {"dimensionId": "gs2q", "dimensionName": "2Q Gate Shot", "measureUnit": "2q gate shot", "amountBilled": 0.0, "amountConsumed": 0.0, "unitPrice": 0.0}], "estimatedTotal": 0.0}, "itemType": "Job"}' headers: connection: - keep-alive content-length: - '1706' content-type: - application/json; charset=utf-8 transfer-encoding: - chunked status: code: 200 message: OK - request: body: null headers: Accept: - application/xml Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - azsdk-python-storage-blob/12.19.1 Python/3.9.19 (Windows-10-10.0.22631-SP0) x-ms-date: - Wed, 01 May 2024 17:33:21 GMT x-ms-range: - bytes=0-33554431 x-ms-version: - '2023-11-03' method: GET uri: https://mystorage.blob.core.windows.net/job-00000000-0000-0000-0000-000000000001/rawOutputData?sv=PLACEHOLDER&sr=b&sig=PLACEHOLDER&se=2050-01-01T00%3A00%3A00Z&sp=r&rscd=attachment%3B%20filename%3Dionq-3ghz-job-00000000-0000-0000-0000-000000000001.output.json response: body: string: '{"histogram": {"0": 0.5, "7": 0.5}}' headers: accept-ranges: - bytes content-length: - '35' content-range: - bytes 0-46/47 content-type: - application/json x-ms-blob-type: - BlockBlob x-ms-creation-time: - Wed, 01 May 2024 17:33:17 GMT x-ms-lease-state: - available x-ms-lease-status: - unlocked x-ms-server-encrypted: - 'true' x-ms-version: - '2023-11-03' status: code: 206 message: Partial Content version: 1
azure-quantum-python/azure-quantum/tests/unit/recordings/test_job_submit_ionq.yaml/0
{ "file_path": "azure-quantum-python/azure-quantum/tests/unit/recordings/test_job_submit_ionq.yaml", "repo_id": "azure-quantum-python", "token_count": 14089 }
382
#!/bin/env python # -*- coding: utf-8 -*- ## # test_params.py: Tests for input parameters ## # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. ## from re import escape from common import QuantumTestBase from pytest import raises from azure.quantum.argument_types import EmptyArray, Pauli, Range, Result from azure.quantum.target.params import InputParams from azure.quantum.target.microsoft import MicrosoftEstimatorParams class TestWorkspace(QuantumTestBase): def test_params_empty(self): params = InputParams() self.assertEqual(params.as_dict(), {}) def test_params_entry_point(self): params = InputParams() params.entry_point = "run_program" self.assertEqual(params.as_dict(), {"entryPoint": "run_program"}) def test_params_arguments(self): params = InputParams() params.arguments["number"] = 12 self.assertEqual(params.as_dict(), {"arguments": [ {"name": "number", "value": 12, "type": "Int"}]}) def test_params_shared_entry_point(self): params = InputParams(num_items=2) params.entry_point = "run_program" params.items[0].arguments["number"] = 8 params.items[1].arguments["number"] = 16 self.assertEqual(params.as_dict(), { 'entryPoint': 'run_program', 'items': [ {'arguments': [{'name': 'number', 'value': 8, 'type': 'Int'}]}, {'arguments': [{'name': 'number', 'value': 16, 'type': 'Int'}]} ], 'resumeAfterFailedItem': True}) def test_params_override_argument(self): params = InputParams(num_items=2) params.entry_point = "run_program" params.arguments["number"] = 8 params.items[1].arguments["number"] = 16 self.assertEqual(params.as_dict(), { 'entryPoint': 'run_program', 'arguments': [{'name': 'number', 'value': 8, 'type': 'Int'}], 'items': [{}, {'arguments': [{'name': 'number', 'value': 16, 'type': 'Int'}]}], 'resumeAfterFailedItem': True}) def test_params_file_uris(self): params = InputParams(num_items=2) params.entry_point = "run_program" params.items[0].entry_point = "other_program" params.file_uris["base"] = "https://some_link" self.assertEqual(params.as_dict(), { 'entryPoint': 'run_program', 'items': [{'entryPoint': 'other_program'}, {}], 'fileUris': {'base': 'https://some_link'}, 'resumeAfterFailedItem': True}) def test_params_for_estimator(self): params = MicrosoftEstimatorParams(num_items=2) params.entry_point = "run_program" params.items[0].entry_point = "other_program" params.file_uris["base"] = "https://some_link" params.error_budget = 0.23 self.assertEqual(params.as_dict(), { 'entryPoint': 'run_program', 'errorBudget': 0.23, 'items': [{'entryPoint': 'other_program'}, {}], 'fileUris': {'base': 'https://some_link'}, 'resumeAfterFailedItem': True}) def test_input_argument_simple_types(self): params = InputParams() params.arguments["bitwidth"] = 42 params.arguments["alpha"] = 0.123 params.arguments["depthOptimal"] = True params.arguments["method"] = "qft" params.arguments["basis"] = Pauli.X params.arguments["expected"] = Result.Zero expected = { "arguments": [ {"name": "bitwidth", "type": "Int", "value": 42}, {"name": "alpha", "type": "Double", "value": 0.123}, {"name": "depthOptimal", "type": "Boolean", "value": True}, {"name": "method", "type": "String", "value": "qft"}, {"name": "basis", "type": "Pauli", "value": "PauliX"}, {"name": "expected", "type": "Result", "value": False}, ] } self.assertEqual(params.as_dict(), expected) def test_input_argument_complex_types(self): params = InputParams() params.arguments["range"] = Range(0, 10, step=2) params.arguments["loop"] = Range(-10, 10) params.arguments["numbers"] = [1, 2, 3] params.arguments["bases"] = [Pauli.I, Pauli.X, Pauli.Y, Pauli.Z] params.arguments["results"] = [Result.Zero, Result.One] params.arguments["empty"] = EmptyArray(int) expected = { "arguments": [ {"name": "range", "type": "Range", "value": {"start": 0, "end": 10, "step": 2}}, {"name": "loop", "type": "Range", "value": {"start": -10, "end": 10}}, {"name": "numbers", "type": "Array", "elementType": "Int", "value": [1, 2, 3]}, {"name": "bases", "type": "Array", "elementType": "Pauli", "value": ["PauliI", "PauliX", "PauliY", "PauliZ"]}, {"name": "results", "type": "Array", "elementType": "Result", "value": [False, True]}, {"name": "empty", "type": "Array", "elementType": "Int", "value": []} ] } self.assertEqual(params.as_dict(), expected) def test_input_params_unsupported_type(self): params = InputParams() with raises(TypeError, match="Unsupported type complex for 1j"): params.arguments["complex"] = 1j def test_input_params_empty_list(self): params = InputParams() message = "Use EmptyArray(type) to assign an empty error" with raises(ValueError, match=escape(message)): params.arguments["numbers"] = [] def test_input_params_different_element_types(self): params = InputParams() with raises(TypeError, match="All elements in a list must have the " "same type"): params.arguments["mixed"] = [1, True] def test_input_params_nested_list(self): params = InputParams() with raises(TypeError, match="Nested lists are not supported"): params.arguments["nested"] = [[1, 2, 3], [4, 5, 6]]
azure-quantum-python/azure-quantum/tests/unit/test_params.py/0
{ "file_path": "azure-quantum-python/azure-quantum/tests/unit/test_params.py", "repo_id": "azure-quantum-python", "token_count": 2886 }
383
<jupyter_start><jupyter_text>πŸ‘‹πŸŒ Hello, world: Submit a Qiskit job to RigettiIn this notebook, we'll review the basics of Azure Quantum by submitting a simple *job*, or quantum program, to [Rigetti](https://www.rigetti.com/). We will use [Qiskit](https://qiskit.org/) to express the quantum job. Submit a simple job to Rigetti using Azure QuantumAzure Quantum provides several ways to express quantum programs. In this example we are using Qiskit, but note that Q is also supported. All code in this example will be written in Python.Let's begin. When you see a code block, hover over it and click the triangle play-button to execute it. To avoid any compilation issues, this should be done in order from top to bottom. 1. Connect to the Azure Quantum workspaceTo connect to the Azure Quantum service, construct an instance of the `AzureQuantumProvider` class. Note that it's imported from the `azure.quantum.qiskit` package.<jupyter_code>from azure.quantum import Workspace from azure.quantum.qiskit import AzureQuantumProvider workspace = Workspace( resource_id = "", location = "", ) provider = AzureQuantumProvider(workspace)<jupyter_output><empty_output><jupyter_text>Let's import some packages and see what providers and targets are enabled in this workspace with the following command:<jupyter_code>from qiskit import QuantumCircuit from qiskit.visualization import plot_histogram print("This workspace's targets:") for backend in provider.backends(): print("- " + backend.name())<jupyter_output><empty_output><jupyter_text>❕ Do you see `rigetti.sim.qvm` in your list of targets? If so, you're ready to keep going.Don't see it? You may need to add Rigetti to your workspace to run this sample. Navigate to the **Providers** page in the portal and click **+Add** to add the Rigetti provider. Rigetti: The quantum providerAzure Quantum partners with third-party companies to deliver solutions to quantum jobs. These company offerings are called *providers*. Each provider can offer multiple *targets* with different capabilities. See the table below for Rigetti's targets.| Target name | Target ID | Number of qubits | Description || --- | --- | --- | --- || Rigetti QVM (simulator) | `rigetti.sim.qvm` | 20 qubits | Rigetti's cloud-based, [open-source](https://github.com/quil-lang/qvm) "Quantum Virtual Machine" simulator. Free to use. || Ankaa-2 (hardware) | `rigetti.qpu.ankaa-2` | 84 qubits | A 4th-generation, square-lattice processor. Pricing based on QPUs. |For this example, we will use `rigetti.sim.qvm`. To learn more about Rigetti's targets, check out [Rigetti's Azure Quantum documentation](https://learn.microsoft.com/azure/quantum/provider-rigetti). 2. Build the quantum programLet's create a simple Qiskit circuit to run.<jupyter_code># Create a quantum circuit acting on a single qubit circuit = QuantumCircuit(1, 1) circuit.name = "Single qubit random" circuit.h(0) circuit.measure(0, 0) # Print out the circuit circuit.draw()<jupyter_output><empty_output><jupyter_text>The circuit you built is a simple quantum random bit generator. With Rigetti's simulator, we will be able to estimate the probability of measuring a `1` or `0`. 3. Submit the quantum program to Rigetti<jupyter_code>from azure.quantum.target.rigetti import RigettiTarget # Create an object that represents Rigetti's simulator target, "rigetti.sim.qvm," using the packaged constant. # Note that any quantum computing target you have enabled in this workspace can be used here. # Azure Quantum makes it extremely easy to submit the same quantum program to different providers. rigetti_simulator_backend = provider.get_backend(RigettiTarget.QVM) # Using the Rigetti simulator target, call "run" to submit the job. We'll # use 100 shots (simulated runs). job = rigetti_simulator_backend.run((circuit), shots=100) print("Job id:", job.id())<jupyter_output>Job id: 444cc976-ec31-11ec-95ba-00155d507810<jupyter_text>The job ID can be used to retrieve the results later using the [get_job method](https://learn.microsoft.com/python/azure-quantum/azure.quantum.workspace?azure-quantum-workspace-get-job) or by viewing it under the **Job management** section of the portal. 4. Obtain the job resultsThis may take a minute or so ⏳. Your job will be packaged and sent to Rigetti, where it will wait its turn to be run.<jupyter_code>import matplotlib.pyplot as plt # Style the plot for readability. plt.style.use('ggplot') result = job.result() # The result object is native to the Qiskit package, so we can use Qiskit's tools to print the result as a histogram. plot_histogram(result.get_counts(circuit), title="Result")<jupyter_output>Job Status: job has successfully run
azure-quantum-python/samples/hello-world/HW-rigetti-qiskit.ipynb/0
{ "file_path": "azure-quantum-python/samples/hello-world/HW-rigetti-qiskit.ipynb", "repo_id": "azure-quantum-python", "token_count": 1353 }
384
# Tests for "set_version.py" module. # !! Don't forget to run this test in case you change "set_version.py" to make sure the asserts still pass !! from set_version import _get_build_version def test_set_version(): assert "1.0.0" == _get_build_version("major", "stable", []) assert "2.0.0" == _get_build_version("major", "stable", ["1.1.0"]) assert "1.0.0" == _get_build_version("major", "stable", ["0.1.1.rc1", "0.1.1.rc0", "0.1.0", "0.0.1"]) assert "1.0.0" == _get_build_version("major", "stable", ["0.1.1.dev0", "0.1.1.rc0", "0.1.0", "0.0.1"]) assert "0.1.0" == _get_build_version("minor", "stable", ["0.0.2", "0.0.1"]) assert "0.2.0" == _get_build_version("minor", "stable", ["0.1.1.dev0", "0.1.1.rc0", "0.1.0", "0.0.1"]) assert "0.1.2" == _get_build_version("patch", "stable", ["0.1.1", "0.0.1"]) assert "0.1.1" == _get_build_version("patch", "stable", ["0.1.1.rc1", "0.1.1.rc0", "0.1.0", "0.0.1"]) assert "1.0.0.rc0" == _get_build_version("major", "rc", []) assert "2.0.0.rc0" == _get_build_version("major", "rc", ["3.0.0.dev0", "1.1.0"]) assert "3.0.0.rc1" == _get_build_version("major", "rc", ["3.0.0.rc0", "2.1.0", "1.1.0"]) assert "0.1.0.rc0" == _get_build_version("minor", "rc", ["0.0.2", "0.0.1"]) assert "0.1.2.rc0" == _get_build_version("patch", "rc", ["0.1.1", "0.0.1"]) assert "0.1.1.rc1" == _get_build_version("patch", "rc", ["1.0.0.dev0", "0.1.1.rc0", "0.1.0", "0.0.1"]) assert "1.0.0.dev0" == _get_build_version("major", "dev", []) assert "2.0.0.dev0" == _get_build_version("major", "dev", ["3.0.0.rc0", "1.1.0"]) assert "3.0.0.dev1" == _get_build_version("major", "dev", ["3.0.0.dev0", "2.1.0", "1.1.0"]) assert "0.1.0.dev0" == _get_build_version("minor", "dev", ["0.0.2", "0.0.1"]) assert "0.2.0.dev0" == _get_build_version("minor", "dev", ["1.0.0.rc0", "1.0.0.dev0", "0.1.0", "0.0.1"]) assert "0.1.2.dev0" == _get_build_version("patch", "dev", ["0.1.1", "0.0.1"]) assert "0.1.1.dev0" == _get_build_version("patch", "dev", ["1.0.0.rc0", "0.1.0.dev0", "0.1.0", "0.0.1"]) assert "0.1.1.dev1" == _get_build_version("patch", "dev", ["1.0.0.rc0", "0.1.1.dev0", "0.1.0", "0.0.1"])
azure-quantum-python/test_set_version.py/0
{ "file_path": "azure-quantum-python/test_set_version.py", "repo_id": "azure-quantum-python", "token_count": 1135 }
385
{ "name": "quantum-visualization", "version": "1.0.0", "description": "This is a visualization library to display Azure Quantum job result.", "license": "MIT", "main": "dist/main.js", "types": "src/index.ts", "scripts": { "build": "webpack --mode development", "build:prod": "webpack --mode production", "lint": "eslint . --ext .js,.ts,.tsx", "lint-fix": "eslint --fix . --ext .js,.ts,.tsx", "sortpackagejson": "sort-package-json", "tests": "jest --config ./test-config/jest.config.js --verbose=true --coverageReporters=cobertura", "testsonly": "jest --config ./test-config/jest.config.js --verbose=true --no-coverage", "updatetests": "jest --config ./test-config/jest.config.js --verbose=true --no-coverage --updateSnapshot" }, "jest": { "moduleNameMapper": { "d3": "<rootDir>/node_modules/d3/dist/d3.min.js", "\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js" }, "transformIgnorePatterns": "[`/node_modules/('@table-library/react-table-library/theme', '@table-library/react-table-library/material-ui', '@table-library/react-table-library/table', '@mui/material', '@mui/icons-material/Info')].join('|'))`]" }, "dependencies": { "@fluentui/react": "^8.110.8", "d3": "^7.8.4", "d3-format": "^3.1.0", "d3-shape": "^3.2.0", "react": "^18.2.0" }, "devDependencies": { "@types/d3": "^7.4.0", "@types/jest": "^29.5.2", "@types/react": "^18.0.28", "@types/react-test-renderer": "^18.0.0", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", "clean-webpack-plugin": "^4.0.0", "css-loader": "^6.7.3", "eslint": "^8.45.0", "eslint-config-prettier": "^8.8.0", "eslint-config-standard-with-typescript": "^37.0.0", "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-css": "^0.8.1", "eslint-plugin-import": "^2.27.5", "eslint-plugin-n": "^16.0.1", "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-react": "^7.33.0", "eslint-plugin-simple-import-sort": "^10.0.0", "jest": "^29.5.0", "jest-environment-jsdom": "^29.6.1", "jest-junit": "^16.0.0", "jest-snapshot": "^29.5.0", "path": "^0.12.7", "prettier": "^3.0.0", "react-dom": "^18.2.0", "react-test-renderer": "^18.2.0", "sort-package-json": "^2.5.1", "style-loader": "^3.3.3", "ts-jest": "^29.1.0", "ts-loader": "^9.4.2", "typescript": "^5.1.6", "webpack": "^5.76.3", "webpack-cli": "^5.1.4" } }
azure-quantum-python/visualization/react-lib/package.json/0
{ "file_path": "azure-quantum-python/visualization/react-lib/package.json", "repo_id": "azure-quantum-python", "token_count": 1260 }
386
Tokenization ============ .. js:autoclass:: Token :members: .. js:autoclass:: Tokenization :members:
bistring/docs/JavaScript/Tokenization.rst/0
{ "file_path": "bistring/docs/JavaScript/Tokenization.rst", "repo_id": "bistring", "token_count": 40 }
387
{ "dependencies": { "typedoc": "^0.22.11", "typescript": "^4.7.0" } }
bistring/docs/package.json/0
{ "file_path": "bistring/docs/package.json", "repo_id": "bistring", "token_count": 60 }
388
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. from __future__ import annotations from dataclasses import dataclass from typing import List, Optional import unicodedata from ._alignment import Alignment from ._bistr import bistr from ._token import CharacterTokenizer @dataclass(frozen=True) class AugmentedChar: """ A single character (grapheme cluster) augmented with extra information. """ top_category: str """ The top-level Unicode category of the char (L, P, Z, etc.). """ category: str """ The specific Unicode category of the char (Lu, Po, Zs, etc.). """ root: str """ The root code point of the grapheme cluster. """ folded: str """ The case-folded form of the char. """ normalized: str """ The Unicode compatibility normalized form of the char. """ original: str """ The original form of the char. """ @classmethod def cost_fn(cls, a: Optional[AugmentedChar], b: Optional[AugmentedChar]) -> int: """ The cost function between augmented chars. Each attribute contributes one "point" towards their distance. """ if a is None or b is None: # cost(insert) + cost(delete) (4 + 4) should be more than cost(substitute) (6) return 4 result = 0 result += int(a.top_category != b.top_category) result += int(a.category != b.category) result += int(a.root != b.root) result += int(a.folded != b.folded) result += int(a.normalized != b.normalized) result += int(a.original != b.original) return result TOKENIZER = CharacterTokenizer('root') @dataclass(frozen=True) class AugmentedString: """ A string augmented with extra information about each character. """ original: str """ The original string. """ chars: List[AugmentedChar] """ The augmented characters of the string. """ alignment: Alignment """ The alignment between the original string and the augmented chars. """ @classmethod def augment(cls, original: str) -> AugmentedString: normalized = bistr(original).normalize('NFKD') folded = bistr(normalized.modified).casefold() glyphs = TOKENIZER.tokenize(folded) chars = [] for glyph in glyphs: fold_c = glyph.text.modified root = fold_c[0] norm_slice = folded.alignment.original_slice(glyph.start, glyph.end) norm_c = folded.original[norm_slice] orig_slice = normalized.alignment.original_slice(norm_slice) orig_c = normalized.original[orig_slice] cat = unicodedata.category(root) top_cat = cat[0] chars.append(AugmentedChar(top_cat, cat, root, fold_c, norm_c, orig_c)) alignment = normalized.alignment alignment = alignment.compose(folded.alignment) alignment = alignment.compose(glyphs.alignment) return cls(original, chars, alignment) def heuristic_infer(original: str, modified: str) -> bistr: """ Infer the alignment between two strings with a "smart" heuristic. We use Unicode normalization and case folding to minimize differences that are due to case, accents, ligatures, etc. """ aug_orig = AugmentedString.augment(original) aug_mod = AugmentedString.augment(modified) alignment = Alignment.infer(aug_orig.chars, aug_mod.chars, AugmentedChar.cost_fn) alignment = aug_orig.alignment.compose(alignment) alignment = alignment.compose(aug_mod.alignment.inverse()) return bistr(original, modified, alignment)
bistring/python/bistring/_infer.py/0
{ "file_path": "bistring/python/bistring/_infer.py", "repo_id": "bistring", "token_count": 1403 }
389
[MASTER] # A comma-separated list of package or module names from where C extensions may # be loaded. Extensions are loading into the active Python interpreter and may # run arbitrary code. extension-pkg-whitelist= # Add files or directories to the blacklist. They should be base names, not # paths. ignore= # Add files or directories matching the regex patterns to the blacklist. The # regex matches against base names, not paths. ignore-patterns= # Python code to execute, usually for sys.path manipulation such as # pygtk.require(). #init-hook= # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the # number of processors available to use. jobs=1 # Control the amount of potential inferred values when inferring a single # object. This can help the performance when dealing with large functions or # complex, nested conditions. limit-inference-results=100 # List of plugins (as comma separated values of python modules names) to load, # usually to register additional checkers. load-plugins= # Pickle collected data for later comparisons. persistent=yes # Specify a configuration file. #rcfile= # When enabled, pylint would attempt to guess common misconfiguration and emit # user-friendly hints instead of false-positive error messages. suggestion-mode=yes # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. unsafe-load-any-extension=no [MESSAGES CONTROL] # Only show warnings with the listed confidence levels. Leave empty to show # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED. confidence= # Disable the message, report, category or checker with the given id(s). You # can either give multiple identifiers separated by comma (,) or put this # option multiple times (only on the command line, not in the configuration # file where it should appear only once). You can also use "--disable=all" to # disable everything first and then reenable specific checks. For example, if # you want to run only the similarities checker, you can use "--disable=all # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use "--disable=all --enable=classes # --disable=W". disable=missing-docstring, too-few-public-methods, bad-continuation, no-self-use, duplicate-code, broad-except, no-name-in-module # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option # multiple time (only on the command line, not in the configuration file where # it should appear only once). See also the "--disable" option for examples. enable=c-extension-no-member [REPORTS] # Python expression which should return a note less than 10 (10 is the highest # note). You have access to the variables errors warning, statement which # respectively contain the number of errors / warnings messages and the total # number of statements analyzed. This is used by the global evaluation report # (RP0004). evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) # Template used to display messages. This is a python new-style format string # used to format the message information. See doc for all details. #msg-template= # Set the output format. Available formats are text, parseable, colorized, json # and msvs (visual studio). You can also give a reporter class, e.g. # mypackage.mymodule.MyReporterClass. output-format=text # Tells whether to display a full report or only the messages. reports=no # Activate the evaluation score. score=yes [REFACTORING] # Maximum number of nested blocks for function / method body max-nested-blocks=5 # Complete name of functions that never returns. When checking for # inconsistent-return-statements if a never returning function is called then # it will be considered as an explicit return statement and no message will be # printed. never-returning-functions=sys.exit [LOGGING] # Format style used to check logging format string. `old` means using % # formatting, while `new` is for `{}` formatting. logging-format-style=old # Logging modules to check that the string format arguments are in logging # function parameter format. logging-modules=logging [SPELLING] # Limits count of emitted suggestions for spelling mistakes. max-spelling-suggestions=4 # Spelling dictionary name. Available dictionaries: none. To make it working # install python-enchant package.. spelling-dict= # List of comma separated words that should not be checked. spelling-ignore-words= # A path to a file that contains private dictionary; one word per line. spelling-private-dict-file= # Tells whether to store unknown words to indicated private dictionary in # --spelling-private-dict-file option instead of raising a message. spelling-store-unknown-words=no [MISCELLANEOUS] # List of note tags to take in consideration, separated by a comma. notes=FIXME, XXX, TODO [TYPECHECK] # List of decorators that produce context managers, such as # contextlib.contextmanager. Add to this list to register other decorators that # produce valid context managers. contextmanager-decorators=contextlib.contextmanager # List of members which are set dynamically and missed by pylint inference # system, and so shouldn't trigger E1101 when accessed. Python regular # expressions are accepted. generated-members= # Tells whether missing members accessed in mixin class should be ignored. A # mixin class is detected if its name ends with "mixin" (case insensitive). ignore-mixin-members=yes # Tells whether to warn about missing members when the owner of the attribute # is inferred to be None. ignore-none=yes # This flag controls whether pylint should warn about no-member and similar # checks whenever an opaque object is returned when inferring. The inference # can return multiple potential results while evaluating a Python object, but # some branches might not be evaluated, which results in partial inference. In # that case, it might be useful to still emit no-member and other checks for # the rest of the inferred objects. ignore-on-opaque-inference=yes # List of class names for which member attributes should not be checked (useful # for classes with dynamically set attributes). This supports the use of # qualified names. ignored-classes=optparse.Values,thread._local,_thread._local # List of module names for which member attributes should not be checked # (useful for modules/projects where namespaces are manipulated during runtime # and thus existing member attributes cannot be deduced by static analysis. It # supports qualified module names, as well as Unix pattern matching. ignored-modules= # Show a hint with possible names when a member name was not found. The aspect # of finding the hint is based on edit distance. missing-member-hint=yes # The minimum edit distance a name should have in order to be considered a # similar match for a missing member name. missing-member-hint-distance=1 # The total number of similar names that should be taken in consideration when # showing a hint for a missing member. missing-member-max-choices=1 [VARIABLES] # List of additional names supposed to be defined in builtins. Remember that # you should avoid defining new builtins when possible. additional-builtins= # Tells whether unused global variables should be treated as a violation. allow-global-unused-variables=yes # List of strings which can identify a callback function by name. A callback # name must start or end with one of those strings. callbacks=cb_, _cb # A regular expression matching the name of dummy variables (i.e. expected to # not be used). dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ # Argument names that match this expression will be ignored. Default to name # with leading underscore. ignored-argument-names=_.*|^ignored_|^unused_ # Tells whether we should check for unused import in __init__ files. init-import=no # List of qualified module names which can have objects that can redefine # builtins. redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io [FORMAT] # Expected format of line ending, e.g. empty (any line ending), LF or CRLF. expected-line-ending-format= # Regexp for a line that is allowed to be longer than the limit. ignore-long-lines=^\s*(# )?<?https?://\S+>?$ # Number of spaces of indent required inside a hanging or continued line. indent-after-paren=4 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 # tab). indent-string=' ' # Maximum number of characters on a single line. max-line-length=120 # Maximum number of lines in a module. max-module-lines=1000 # List of optional constructs for which whitespace checking is disabled. `dict- # separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. # `trailing-comma` allows a space between comma and closing bracket: (a, ). # `empty-line` allows space-only lines. no-space-check=trailing-comma, dict-separator # Allow the body of a class to be on the same line as the declaration if body # contains single statement. single-line-class-stmt=no # Allow the body of an if to be on the same line as the test if there is no # else. single-line-if-stmt=no [SIMILARITIES] # Ignore comments when computing similarities. ignore-comments=yes # Ignore docstrings when computing similarities. ignore-docstrings=yes # Ignore imports when computing similarities. ignore-imports=no # Minimum lines number of a similarity. min-similarity-lines=4 [BASIC] # Naming style matching correct argument names. argument-naming-style=snake_case # Regular expression matching correct argument names. Overrides argument- # naming-style. #argument-rgx= # Naming style matching correct attribute names. attr-naming-style=snake_case # Regular expression matching correct attribute names. Overrides attr-naming- # style. #attr-rgx= # Bad variable names which should always be refused, separated by a comma. bad-names=foo, bar, baz, toto, tutu, tata # Naming style matching correct class attribute names. class-attribute-naming-style=any # Regular expression matching correct class attribute names. Overrides class- # attribute-naming-style. #class-attribute-rgx= # Naming style matching correct class names. class-naming-style=PascalCase # Regular expression matching correct class names. Overrides class-naming- # style. #class-rgx= # Naming style matching correct constant names. const-naming-style=UPPER_CASE # Regular expression matching correct constant names. Overrides const-naming- # style. #const-rgx= # Minimum line length for functions/classes that require docstrings, shorter # ones are exempt. docstring-min-length=-1 # Naming style matching correct function names. function-naming-style=snake_case # Regular expression matching correct function names. Overrides function- # naming-style. #function-rgx= # Good variable names which should always be accepted, separated by a comma. good-names=i, j, k, ex, Run, _ # Include a hint for the correct naming format with invalid-name. include-naming-hint=no # Naming style matching correct inline iteration names. inlinevar-naming-style=any # Regular expression matching correct inline iteration names. Overrides # inlinevar-naming-style. #inlinevar-rgx= # Naming style matching correct method names. method-naming-style=snake_case # Regular expression matching correct method names. Overrides method-naming- # style. #method-rgx= # Naming style matching correct module names. module-naming-style=snake_case # Regular expression matching correct module names. Overrides module-naming- # style. #module-rgx= # Colon-delimited sets of names that determine each other's naming style when # the name regexes allow several styles. name-group= # Regular expression which should only match function or class names that do # not require a docstring. no-docstring-rgx=^_ # List of decorators that produce properties, such as abc.abstractproperty. Add # to this list to register other decorators that produce valid properties. # These decorators are taken in consideration only for invalid-name. property-classes=abc.abstractproperty # Naming style matching correct variable names. variable-naming-style=snake_case # Regular expression matching correct variable names. Overrides variable- # naming-style. #variable-rgx= [STRING] # This flag controls whether the implicit-str-concat-in-sequence should # generate a warning on implicit string concatenation in sequences defined over # several lines. check-str-concat-over-line-jumps=no [IMPORTS] # Allow wildcard imports from modules that define __all__. allow-wildcard-with-all=no # Analyse import fallback blocks. This can be used to support both Python 2 and # 3 compatible code, which means that the block might have code that exists # only in one or another interpreter, leading to false positives when analysed. analyse-fallback-blocks=no # Deprecated modules which should not be used, separated by a comma. deprecated-modules=optparse,tkinter.tix # Create a graph of external dependencies in the given file (report RP0402 must # not be disabled). ext-import-graph= # Create a graph of every (i.e. internal and external) dependencies in the # given file (report RP0402 must not be disabled). import-graph= # Create a graph of internal dependencies in the given file (report RP0402 must # not be disabled). int-import-graph= # Force import order to recognize a module as part of the standard # compatibility libraries. known-standard-library= # Force import order to recognize a module as part of a third party library. known-third-party=enchant [CLASSES] # List of method names used to declare (i.e. assign) instance attributes. defining-attr-methods=__init__, __new__, setUp # List of member names, which should be excluded from the protected access # warning. exclude-protected=_asdict, _fields, _replace, _source, _make # List of valid names for the first argument in a class method. valid-classmethod-first-arg=cls # List of valid names for the first argument in a metaclass class method. valid-metaclass-classmethod-first-arg=cls [DESIGN] # Maximum number of arguments for function / method. max-args=5 # Maximum number of attributes for a class (see R0902). max-attributes=7 # Maximum number of boolean expressions in an if statement. max-bool-expr=5 # Maximum number of branch for function / method body. max-branches=12 # Maximum number of locals for function / method body. max-locals=15 # Maximum number of parents for a class (see R0901). max-parents=7 # Maximum number of public methods for a class (see R0904). max-public-methods=20 # Maximum number of return / yield for function / method body. max-returns=6 # Maximum number of statements in function / method body. max-statements=50 # Minimum number of public methods for a class (see R0903). min-public-methods=2 [EXCEPTIONS] # Exceptions that will emit a warning when being caught. Defaults to # "BaseException, Exception". overgeneral-exceptions=BaseException, Exception
botbuilder-python/generators/app/templates/core/{{cookiecutter.bot_name}}/.pylintrc/0
{ "file_path": "botbuilder-python/generators/app/templates/core/{{cookiecutter.bot_name}}/.pylintrc", "repo_id": "botbuilder-python", "token_count": 4447 }
390
{ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "groupName": { "type": "string", "metadata": { "description": "Specifies the name of the Resource Group." } }, "groupLocation": { "type": "string", "metadata": { "description": "Specifies the location of the Resource Group." } }, "azureBotId": { "type": "string", "metadata": { "description": "The globally unique and immutable bot ID." } }, "azureBotSku": { "type": "string", "defaultValue": "S1", "metadata": { "description": "The pricing tier of the Bot Service Registration. Acceptable values are F0 and S1." } }, "azureBotRegion": { "type": "string", "defaultValue": "global", "metadata": { "description": "" } }, "botEndpoint": { "type": "string", "defaultValue": "", "metadata": { "description": "Use to handle client messages, Such as https://<botappServiceName>.azurewebsites.net/api/messages." } }, "appId": { "type": "string", "metadata": { "description": "Active Directory App ID or User-Assigned Managed Identity Client ID, set as MicrosoftAppId in the Web App's Application Settings." } } }, "resources": [ { "name": "[parameters('groupName')]", "type": "Microsoft.Resources/resourceGroups", "apiVersion": "2018-05-01", "location": "[parameters('groupLocation')]", "properties": {} }, { "type": "Microsoft.Resources/deployments", "apiVersion": "2018-05-01", "name": "storageDeployment", "resourceGroup": "[parameters('groupName')]", "dependsOn": [ "[resourceId('Microsoft.Resources/resourceGroups/', parameters('groupName'))]" ], "properties": { "mode": "Incremental", "template": { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": {}, "variables": {}, "resources": [ { "apiVersion": "2021-03-01", "type": "Microsoft.BotService/botServices", "name": "[parameters('azureBotId')]", "location": "[parameters('azureBotRegion')]", "kind": "azurebot", "sku": { "name": "[parameters('azureBotSku')]" }, "properties": { "name": "[parameters('azureBotId')]", "displayName": "[parameters('azureBotId')]", "iconUrl": "https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png", "endpoint": "[parameters('botEndpoint')]", "msaAppId": "[parameters('appId')]", "luisAppIds": [], "schemaTransformationVersion": "1.3", "isCmekEnabled": false, "isIsolated": false } } ] } } } ] }
botbuilder-python/generators/app/templates/echo/{{cookiecutter.bot_name}}/deploymentTemplates/deployWithNewResourceGroup/template-AzureBot-new-rg.json/0
{ "file_path": "botbuilder-python/generators/app/templates/echo/{{cookiecutter.bot_name}}/deploymentTemplates/deployWithNewResourceGroup/template-AzureBot-new-rg.json", "repo_id": "botbuilder-python", "token_count": 2289 }
391
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import json from typing import List from botbuilder.adapters.slack.slack_message import SlackMessage class SlackPayload: def __init__(self, **kwargs): payload = json.loads(kwargs.get("payload")) self.type: List[str] = payload.get("type") self.token: str = payload.get("token") self.channel: str = payload.get("channel") self.thread_ts: str = payload.get("thread_ts") self.team: str = payload.get("team") self.user: str = payload.get("user") self.actions = payload.get("actions") self.trigger_id: str = payload.get("trigger_id") self.action_ts: str = payload.get("action_ts") self.submission: str = payload.get("submission") self.callback_id: str = payload.get("callback_id") self.state: str = payload.get("state") self.response_url: str = payload.get("response_url") if "message" in payload: message = payload.get("message") self.message = ( message if isinstance(message, SlackMessage) else SlackMessage(**message) )
botbuilder-python/libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/slack_payload.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/slack_payload.py", "repo_id": "botbuilder-python", "token_count": 504 }
392
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from botbuilder.core import BotTelemetryClient, NullTelemetryClient from .luis_recognizer_options import LuisRecognizerOptions class LuisRecognizerOptionsV2(LuisRecognizerOptions): def __init__( self, bing_spell_check_subscription_key: str = None, include_all_intents: bool = None, include_instance_data: bool = True, log: bool = True, spell_check: bool = None, staging: bool = None, timeout: float = 100000, timezone_offset: float = None, include_api_results: bool = True, telemetry_client: BotTelemetryClient = NullTelemetryClient(), log_personal_information: bool = False, ): super().__init__( include_api_results, telemetry_client, log_personal_information ) self.bing_spell_check_subscription_key = bing_spell_check_subscription_key self.include_all_intents = include_all_intents self.include_instance_data = include_instance_data self.log = log self.spell_check = spell_check self.staging = staging self.timeout = timeout self.timezone_offset = timezone_offset
botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/luis/luis_recognizer_options_v2.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/luis/luis_recognizer_options_v2.py", "repo_id": "botbuilder-python", "token_count": 495 }
393
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from msrest.serialization import Model class Prompt(Model): """Prompt Object.""" _attribute_map = { "display_order": {"key": "displayOrder", "type": "int"}, "qna_id": {"key": "qnaId", "type": "int"}, "qna": {"key": "qna", "type": "object"}, "display_text": {"key": "displayText", "type": "str"}, } def __init__(self, **kwargs): super().__init__(**kwargs) self.display_order = kwargs.get("display_order", None) self.qna_id = kwargs.get("qna_id", None) self.display_text = kwargs.get("display_text", None) self.qna = kwargs.get("qna", None)
botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/qna/models/prompt.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/qna/models/prompt.py", "repo_id": "botbuilder-python", "token_count": 304 }
394
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import json import platform from typing import Any import requests from aiohttp import ClientResponse, ClientSession, ClientTimeout from ... import __title__, __version__ from ..qnamaker_endpoint import QnAMakerEndpoint class HttpRequestUtils: """HTTP request utils class. Parameters: ----------- http_client: Client to make HTTP requests with. Default client used in the SDK is `aiohttp.ClientSession`. """ def __init__(self, http_client: Any): self._http_client = http_client async def execute_http_request( self, request_url: str, payload_body: object, endpoint: QnAMakerEndpoint, timeout: float = None, ) -> Any: """ Execute HTTP request. Parameters: ----------- request_url: HTTP request URL. payload_body: HTTP request body. endpoint: QnA Maker endpoint details. timeout: Timeout for HTTP call (milliseconds). """ if not request_url: raise TypeError( "HttpRequestUtils.execute_http_request(): request_url cannot be None." ) if not payload_body: raise TypeError( "HttpRequestUtils.execute_http_request(): question cannot be None." ) if not endpoint: raise TypeError( "HttpRequestUtils.execute_http_request(): endpoint cannot be None." ) serialized_payload_body = json.dumps(payload_body.serialize()) headers = self._get_headers(endpoint) if isinstance(self._http_client, ClientSession): response: ClientResponse = await self._make_request_with_aiohttp( request_url, serialized_payload_body, headers, timeout ) elif self._is_using_requests_module(): response: requests.Response = self._make_request_with_requests( request_url, serialized_payload_body, headers, timeout ) else: response = await self._http_client.post( request_url, data=serialized_payload_body, headers=headers ) return response def _get_headers(self, endpoint: QnAMakerEndpoint): headers = { "Content-Type": "application/json", "User-Agent": self._get_user_agent(), "Authorization": f"EndpointKey {endpoint.endpoint_key}", "Ocp-Apim-Subscription-Key": f"EndpointKey {endpoint.endpoint_key}", } return headers def _get_user_agent(self): package_user_agent = f"{__title__}/{__version__}" uname = platform.uname() os_version = f"{uname.machine}-{uname.system}-{uname.version}" py_version = f"Python,Version={platform.python_version()}" platform_user_agent = f"({os_version}; {py_version})" user_agent = f"{package_user_agent} {platform_user_agent}" return user_agent def _is_using_requests_module(self) -> bool: return (type(self._http_client).__name__ == "module") and ( self._http_client.__name__ == "requests" ) async def _make_request_with_aiohttp( self, request_url: str, payload_body: str, headers: dict, timeout: float ) -> ClientResponse: if timeout: # aiohttp.ClientSession's timeouts are in seconds timeout_in_seconds = ClientTimeout(total=timeout / 1000) return await self._http_client.post( request_url, data=payload_body, headers=headers, timeout=timeout_in_seconds, ) return await self._http_client.post( request_url, data=payload_body, headers=headers ) def _make_request_with_requests( self, request_url: str, payload_body: str, headers: dict, timeout: float ) -> requests.Response: if timeout: # requests' timeouts are in seconds timeout_in_seconds = timeout / 1000 return self._http_client.post( request_url, data=payload_body, headers=headers, timeout=timeout_in_seconds, ) return self._http_client.post(request_url, data=payload_body, headers=headers)
botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/qna/utils/http_request_utils.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-ai/botbuilder/ai/qna/utils/http_request_utils.py", "repo_id": "botbuilder-python", "token_count": 1929 }
395
{ "text": "http://foo.com is where you can fly from seattle to dallas via denver", "intents": { "EntityTests": { "score": 0.915071368 }, "Weather_GetForecast": { "score": 0.103456922 }, "Travel": { "score": 0.0230268724 }, "search": { "score": 0.0197850317 }, "None": { "score": 0.01063211 }, "Delivery": { "score": 0.004947166 }, "SpecifyName": { "score": 0.00322066387 }, "Help": { "score": 0.00182514545 }, "Cancel": { "score": 0.0008727567 }, "Greeting": { "score": 0.000494661159 } }, "entities": { "$instance": { "Composite2": [ { "startIndex": 0, "endIndex": 69, "text": "http : / / foo . com is where you can fly from seattle to dallas via denver", "type": "Composite2", "score": 0.91574204 } ] }, "Composite2": [ { "$instance": { "To": [ { "startIndex": 52, "endIndex": 58, "text": "dallas", "type": "City::To", "score": 0.9924016 } ], "From": [ { "startIndex": 41, "endIndex": 48, "text": "seattle", "type": "City::From", "score": 0.995012 } ], "City": [ { "startIndex": 63, "endIndex": 69, "text": "denver", "type": "City", "score": 0.8450125 } ], "url": [ { "startIndex": 0, "endIndex": 14, "text": "http://foo.com", "type": "builtin.url" } ] }, "To": [ "dallas" ], "From": [ "seattle" ], "City": [ "denver" ], "url": [ "http://foo.com" ] } ] }, "sentiment": { "label": "neutral", "score": 0.5 }, "luisResult": { "query": "http://foo.com is where you can fly from seattle to dallas via denver", "topScoringIntent": { "intent": "EntityTests", "score": 0.915071368 }, "intents": [ { "intent": "EntityTests", "score": 0.915071368 }, { "intent": "Weather.GetForecast", "score": 0.103456922 }, { "intent": "Travel", "score": 0.0230268724 }, { "intent": "search", "score": 0.0197850317 }, { "intent": "None", "score": 0.01063211 }, { "intent": "Delivery", "score": 0.004947166 }, { "intent": "SpecifyName", "score": 0.00322066387 }, { "intent": "Help", "score": 0.00182514545 }, { "intent": "Cancel", "score": 0.0008727567 }, { "intent": "Greeting", "score": 0.000494661159 } ], "entities": [ { "entity": "dallas", "type": "City::To", "startIndex": 52, "endIndex": 57, "score": 0.9924016 }, { "entity": "seattle", "type": "City::From", "startIndex": 41, "endIndex": 47, "score": 0.995012 }, { "entity": "denver", "type": "City", "startIndex": 63, "endIndex": 68, "score": 0.8450125 }, { "entity": "http : / / foo . com is where you can fly from seattle to dallas via denver", "type": "Composite2", "startIndex": 0, "endIndex": 68, "score": 0.91574204 }, { "entity": "http://foo.com", "type": "builtin.url", "startIndex": 0, "endIndex": 13, "resolution": { "value": "http://foo.com" } } ], "compositeEntities": [ { "parentType": "Composite2", "value": "http : / / foo . com is where you can fly from seattle to dallas via denver", "children": [ { "type": "City::To", "value": "dallas" }, { "type": "City::From", "value": "seattle" }, { "type": "City", "value": "denver" }, { "type": "builtin.url", "value": "http://foo.com" } ] } ], "sentimentAnalysis": { "label": "neutral", "score": 0.5 } } }
botbuilder-python/libraries/botbuilder-ai/tests/luis/test_data/Composite2.json/0
{ "file_path": "botbuilder-python/libraries/botbuilder-ai/tests/luis/test_data/Composite2.json", "repo_id": "botbuilder-python", "token_count": 2787 }
396
{ "query": "Please deliver February 2nd 2001 in room 201", "topScoringIntent": { "intent": "Delivery", "score": 0.8785189 }, "intents": [ { "intent": "Delivery", "score": 0.8785189 }, { "intent": "SpecifyName", "score": 0.0085189 } ], "entities": [ { "entity": 2001, "type": "number", "startIndex": 28, "endIndex": 31 }, { "entity": 201, "type": "number", "startIndex": 41, "endIndex": 43 }, { "entity": 2, "type": "ordinal", "startIndex": 24, "endIndex": 26 }, { "entity": "february 2nd 2001", "type": "builtin.datetimeV2.date", "startIndex": 15, "endIndex": 31, "resolution": { "values": [ { "timex": "2001-02-02", "type": "date", "value": "2001-02-02" } ] } } ] }
botbuilder-python/libraries/botbuilder-ai/tests/luis/test_data/MultipleIntents_PrebuiltEntitiesWithMultiValues.json/0
{ "file_path": "botbuilder-python/libraries/botbuilder-ai/tests/luis/test_data/MultipleIntents_PrebuiltEntitiesWithMultiValues.json", "repo_id": "botbuilder-python", "token_count": 785 }
397
{ "answers": [ { "questions": [ "how do I clean the stove?" ], "answer": "BaseCamp: You can use a damp rag to clean around the Power Pack", "score": 100, "id": 5, "source": "Editorial", "metadata": [], "context": { "isContextOnly": true, "prompts": [ { "displayOrder": 0, "qnaId": 55, "qna": null, "displayText": "Where can I buy?" } ] } } ] }
botbuilder-python/libraries/botbuilder-ai/tests/qna/test_data/AnswerWithPrompts.json/0
{ "file_path": "botbuilder-python/libraries/botbuilder-ai/tests/qna/test_data/AnswerWithPrompts.json", "repo_id": "botbuilder-python", "token_count": 373 }
398
============================================= BotBuilder-ApplicationInsights SDK for Python ============================================= .. image:: https://dev.azure.com/FuseLabs/SDK_v4/_apis/build/status/Python/Python-CI-PR-yaml?branchName=master :target: https://dev.azure.com/FuseLabs/SDK_v4/_apis/build/status/Python/Python-CI-PR-yaml?branchName=master :align: right :alt: Azure DevOps status for master branch .. image:: https://badge.fury.io/py/botbuilder-applicationinsights.svg :target: https://badge.fury.io/py/botbuilder-applicationinsights :alt: Latest PyPI package version Within the Bot Framework, BotBuilder-ApplicationInsights enables the Azure Application Insights service. Application Insights is an extensible Application Performance Management (APM) service for developers on multiple platforms. Use it to monitor your live bot application. It includes powerful analytics tools to help you diagnose issues and to understand what users actually do with your bot. How to Install ============== .. code-block:: python pip install botbuilder-applicationinsights Documentation/Wiki ================== You can find more information on the botbuilder-python project by visiting our `Wiki`_. Requirements ============ * `Python >= 3.7.0`_ Source Code =========== The latest developer version is available in a github repository: https://github.com/Microsoft/botbuilder-python/ Contributing ============ This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. This project has adopted the `Microsoft Open Source Code of Conduct`_. For more information see the `Code of Conduct FAQ`_ or contact `[email protected]`_ with any additional questions or comments. Reporting Security Issues ========================= Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) at `[email protected]`_. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the `MSRC PGP`_ key, can be found in the `Security TechCenter`_. License ======= Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT_ License. .. _Wiki: https://github.com/Microsoft/botbuilder-python/wiki .. _Python >= 3.7.0: https://www.python.org/downloads/ .. _MIT: https://github.com/Microsoft/vscode/blob/master/LICENSE.txt .. _Microsoft Open Source Code of Conduct: https://opensource.microsoft.com/codeofconduct/ .. _Code of Conduct FAQ: https://opensource.microsoft.com/codeofconduct/faq/ .. [email protected]: mailto:[email protected] .. [email protected]: mailto:[email protected] .. _MSRC PGP: https://technet.microsoft.com/en-us/security/dn606155 .. _Security TechCenter: https://github.com/Microsoft/vscode/blob/master/LICENSE.txt .. <https://technet.microsoft.com/en-us/security/default>`_
botbuilder-python/libraries/botbuilder-applicationinsights/README.rst/0
{ "file_path": "botbuilder-python/libraries/botbuilder-applicationinsights/README.rst", "repo_id": "botbuilder-python", "token_count": 926 }
399
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import azure.cosmos.errors as cosmos_errors from azure.cosmos import documents import pytest from botbuilder.azure import CosmosDbPartitionedStorage, CosmosDbPartitionedConfig from botbuilder.testing import StorageBaseTests EMULATOR_RUNNING = False def get_settings() -> CosmosDbPartitionedConfig: return CosmosDbPartitionedConfig( cosmos_db_endpoint="https://localhost:8081", auth_key="C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==", database_id="test-db", container_id="bot-storage", ) def get_storage(): return CosmosDbPartitionedStorage(get_settings()) async def reset(): storage = CosmosDbPartitionedStorage(get_settings()) await storage.initialize() try: storage.client.DeleteDatabase(database_link="dbs/" + get_settings().database_id) except cosmos_errors.HTTPFailure: pass class TestCosmosDbPartitionedStorageConstructor: @pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.") @pytest.mark.asyncio async def test_raises_error_when_instantiated_with_no_arguments(self): try: # noinspection PyArgumentList # pylint: disable=no-value-for-parameter CosmosDbPartitionedStorage() except Exception as error: assert error @pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.") @pytest.mark.asyncio async def test_raises_error_when_no_endpoint_provided(self): no_endpoint = get_settings() no_endpoint.cosmos_db_endpoint = None try: CosmosDbPartitionedStorage(no_endpoint) except Exception as error: assert error @pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.") @pytest.mark.asyncio async def test_raises_error_when_no_auth_key_provided(self): no_auth_key = get_settings() no_auth_key.auth_key = None try: CosmosDbPartitionedStorage(no_auth_key) except Exception as error: assert error @pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.") @pytest.mark.asyncio async def test_raises_error_when_no_database_id_provided(self): no_database_id = get_settings() no_database_id.database_id = None try: CosmosDbPartitionedStorage(no_database_id) except Exception as error: assert error @pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.") @pytest.mark.asyncio async def test_raises_error_when_no_container_id_provided(self): no_container_id = get_settings() no_container_id.container_id = None try: CosmosDbPartitionedStorage(no_container_id) except Exception as error: assert error @pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.") @pytest.mark.asyncio async def test_passes_cosmos_client_options(self): settings_with_options = get_settings() connection_policy = documents.ConnectionPolicy() connection_policy.DisableSSLVerification = True settings_with_options.cosmos_client_options = { "connection_policy": connection_policy, "consistency_level": documents.ConsistencyLevel.Eventual, } client = CosmosDbPartitionedStorage(settings_with_options) await client.initialize() assert client.client.connection_policy.DisableSSLVerification is True assert ( client.client.default_headers["x-ms-consistency-level"] == documents.ConsistencyLevel.Eventual ) class TestCosmosDbPartitionedStorageBaseStorageTests: @pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.") @pytest.mark.asyncio async def test_return_empty_object_when_reading_unknown_key(self): await reset() test_ran = await StorageBaseTests.return_empty_object_when_reading_unknown_key( get_storage() ) assert test_ran @pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.") @pytest.mark.asyncio async def test_handle_null_keys_when_reading(self): await reset() test_ran = await StorageBaseTests.handle_null_keys_when_reading(get_storage()) assert test_ran @pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.") @pytest.mark.asyncio async def test_handle_null_keys_when_writing(self): await reset() test_ran = await StorageBaseTests.handle_null_keys_when_writing(get_storage()) assert test_ran @pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.") @pytest.mark.asyncio async def test_does_not_raise_when_writing_no_items(self): await reset() test_ran = await StorageBaseTests.does_not_raise_when_writing_no_items( get_storage() ) assert test_ran @pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.") @pytest.mark.asyncio async def test_create_object(self): await reset() test_ran = await StorageBaseTests.create_object(get_storage()) assert test_ran @pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.") @pytest.mark.asyncio async def test_handle_crazy_keys(self): await reset() test_ran = await StorageBaseTests.handle_crazy_keys(get_storage()) assert test_ran @pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.") @pytest.mark.asyncio async def test_update_object(self): await reset() test_ran = await StorageBaseTests.update_object(get_storage()) assert test_ran @pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.") @pytest.mark.asyncio async def test_delete_object(self): await reset() test_ran = await StorageBaseTests.delete_object(get_storage()) assert test_ran @pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.") @pytest.mark.asyncio async def test_perform_batch_operations(self): await reset() test_ran = await StorageBaseTests.perform_batch_operations(get_storage()) assert test_ran @pytest.mark.skipif(not EMULATOR_RUNNING, reason="Needs the emulator to run.") @pytest.mark.asyncio async def test_proceeds_through_waterfall(self): await reset() test_ran = await StorageBaseTests.proceeds_through_waterfall(get_storage()) assert test_ran
botbuilder-python/libraries/botbuilder-azure/tests/test_cosmos_partitioned_storage.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-azure/tests/test_cosmos_partitioned_storage.py", "repo_id": "botbuilder-python", "token_count": 2780 }
400
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from abc import abstractmethod from copy import deepcopy from typing import Callable, Dict, Union from jsonpickle.pickler import Pickler from botbuilder.core.state_property_accessor import StatePropertyAccessor from .bot_assert import BotAssert from .turn_context import TurnContext from .storage import Storage from .property_manager import PropertyManager class CachedBotState: """ Internal cached bot state. """ def __init__(self, state: Dict[str, object] = None): self.state = state if state is not None else {} self.hash = self.compute_hash(state) @property def is_changed(self) -> bool: return self.hash != self.compute_hash(self.state) def compute_hash(self, obj: object) -> str: return str(Pickler().flatten(obj)) class BotState(PropertyManager): """ Defines a state management object and automates the reading and writing of associated state properties to a storage layer. .. remarks:: Each state management object defines a scope for a storage layer. State properties are created within a state management scope, and the Bot Framework defines these scopes: :class:`ConversationState`, :class:`UserState`, and :class:`PrivateConversationState`. You can define additional scopes for your bot. """ def __init__(self, storage: Storage, context_service_key: str): """ Initializes a new instance of the :class:`BotState` class. :param storage: The storage layer this state management object will use to store and retrieve state :type storage: :class:`bptbuilder.core.Storage` :param context_service_key: The key for the state cache for this :class:`BotState` :type context_service_key: str .. remarks:: This constructor creates a state management object and associated scope. The object uses the :param storage: to persist state property values and the :param context_service_key: to cache state within the context for each turn. :raises: It raises an argument null exception. """ self.state_key = "state" self._storage = storage self._context_service_key = context_service_key def get_cached_state(self, turn_context: TurnContext): """ Gets the cached bot state instance that wraps the raw cached data for this "BotState" from the turn context. :param turn_context: The context object for this turn. :type turn_context: :class:`TurnContext` :return: The cached bot state instance. """ BotAssert.context_not_none(turn_context) return turn_context.turn_state.get(self._context_service_key) def create_property(self, name: str) -> StatePropertyAccessor: """ Creates a property definition and registers it with this :class:`BotState`. :param name: The name of the property :type name: str :return: If successful, the state property accessor created :rtype: :class:`StatePropertyAccessor` """ if not name: raise TypeError("BotState.create_property(): name cannot be None or empty.") return BotStatePropertyAccessor(self, name) def get(self, turn_context: TurnContext) -> Dict[str, object]: BotAssert.context_not_none(turn_context) cached = self.get_cached_state(turn_context) return getattr(cached, "state", None) async def load(self, turn_context: TurnContext, force: bool = False) -> None: """ Reads the current state object and caches it in the context object for this turn. :param turn_context: The context object for this turn :type turn_context: :class:`TurnContext` :param force: Optional, true to bypass the cache :type force: bool """ BotAssert.context_not_none(turn_context) cached_state = self.get_cached_state(turn_context) storage_key = self.get_storage_key(turn_context) if force or not cached_state or not cached_state.state: items = await self._storage.read([storage_key]) val = items.get(storage_key) turn_context.turn_state[self._context_service_key] = CachedBotState(val) async def save_changes( self, turn_context: TurnContext, force: bool = False ) -> None: """ Saves the state cached in the current context for this turn. If the state has changed, it saves the state cached in the current context for this turn. :param turn_context: The context object for this turn :type turn_context: :class:`TurnContext` :param force: Optional, true to save state to storage whether or not there are changes :type force: bool """ BotAssert.context_not_none(turn_context) cached_state = self.get_cached_state(turn_context) if force or (cached_state is not None and cached_state.is_changed): storage_key = self.get_storage_key(turn_context) changes: Dict[str, object] = {storage_key: cached_state.state} await self._storage.write(changes) cached_state.hash = cached_state.compute_hash(cached_state.state) async def clear_state(self, turn_context: TurnContext): """ Clears any state currently stored in this state scope. :param turn_context: The context object for this turn :type turn_context: :class:`TurnContext` :return: None .. remarks:: This function must be called in order for the cleared state to be persisted to the underlying store. """ BotAssert.context_not_none(turn_context) # Explicitly setting the hash will mean IsChanged is always true. And that will force a Save. cache_value = CachedBotState() cache_value.hash = "" turn_context.turn_state[self._context_service_key] = cache_value async def delete(self, turn_context: TurnContext) -> None: """ Deletes any state currently stored in this state scope. :param turn_context: The context object for this turn :type turn_context: :class:`TurnContext` :return: None """ BotAssert.context_not_none(turn_context) turn_context.turn_state.pop(self._context_service_key) storage_key = self.get_storage_key(turn_context) await self._storage.delete({storage_key}) @abstractmethod def get_storage_key(self, turn_context: TurnContext) -> str: raise NotImplementedError() async def get_property_value(self, turn_context: TurnContext, property_name: str): """ Gets the value of the specified property in the turn context. :param turn_context: The context object for this turn :type turn_context: :class:`TurnContext` :param property_name: The property name :type property_name: str :return: The value of the property """ BotAssert.context_not_none(turn_context) if not property_name: raise TypeError( "BotState.get_property_value(): property_name cannot be None." ) cached_state = self.get_cached_state(turn_context) # if there is no value, this will throw, to signal to IPropertyAccesor that a default value should be computed # This allows this to work with value types return cached_state.state[property_name] async def delete_property_value( self, turn_context: TurnContext, property_name: str ) -> None: """ Deletes a property from the state cache in the turn context. :param turn_context: The context object for this turn :type turn_context: :TurnContext` :param property_name: The name of the property to delete :type property_name: str :return: None """ BotAssert.context_not_none(turn_context) if not property_name: raise TypeError("BotState.delete_property(): property_name cannot be None.") cached_state = self.get_cached_state(turn_context) del cached_state.state[property_name] async def set_property_value( self, turn_context: TurnContext, property_name: str, value: object ) -> None: """ Sets a property to the specified value in the turn context. :param turn_context: The context object for this turn :type turn_context: :class:`TurnContext` :param property_name: The property name :type property_name: str :param value: The value to assign to the property :type value: Object :return: None """ BotAssert.context_not_none(turn_context) if not property_name: raise TypeError("BotState.delete_property(): property_name cannot be None.") cached_state = self.get_cached_state(turn_context) cached_state.state[property_name] = value class BotStatePropertyAccessor(StatePropertyAccessor): """ Defines methods for accessing a state property created in a :class:`BotState` object. """ def __init__(self, bot_state: BotState, name: str): """ Initializes a new instance of the :class:`BotStatePropertyAccessor` class. :param bot_state: The state object to access :type bot_state: :class:`BotState` :param name: The name of the state property to access :type name: str """ self._bot_state = bot_state self._name = name @property def name(self) -> str: """ The name of the property. """ return self._name async def delete(self, turn_context: TurnContext) -> None: """ Deletes the property. :param turn_context: The context object for this turn :type turn_context: :class:`TurnContext` """ await self._bot_state.load(turn_context, False) await self._bot_state.delete_property_value(turn_context, self._name) async def get( self, turn_context: TurnContext, default_value_or_factory: Union[Callable, object] = None, ) -> object: """ Gets the property value. :param turn_context: The context object for this turn :type turn_context: :class:`TurnContext` :param default_value_or_factory: Defines the default value for the property """ await self._bot_state.load(turn_context, False) try: result = await self._bot_state.get_property_value(turn_context, self._name) return result except: # ask for default value from factory if not default_value_or_factory: return None result = ( default_value_or_factory() if callable(default_value_or_factory) else deepcopy(default_value_or_factory) ) # save default value for any further calls await self.set(turn_context, result) return result async def set(self, turn_context: TurnContext, value: object) -> None: """ Sets the property value. :param turn_context: The context object for this turn :type turn_context: :class:`TurnContext` :param value: The value to assign to the property """ await self._bot_state.load(turn_context, False) await self._bot_state.set_property_value(turn_context, self._name, value)
botbuilder-python/libraries/botbuilder-core/botbuilder/core/bot_state.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-core/botbuilder/core/bot_state.py", "repo_id": "botbuilder-python", "token_count": 4456 }
401
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from datetime import datetime from typing import Dict, Union from botbuilder.core import BotState from botbuilder.schema import Activity, ActivityTypes, ConversationReference def make_command_activity(command: str) -> Activity: return Activity( type=ActivityTypes.trace, timestamp=datetime.utcnow(), name="Command", label="Command", value=command, value_type="https://www.botframework.com/schemas/command", ) def from_activity(activity: Activity, name: str, label: str) -> Activity: return Activity( type=ActivityTypes.trace, timestamp=datetime.utcnow(), name=name, label=label, value=activity, value_type="https://www.botframework.com/schemas/activity", ) def from_state(bot_state: Union[BotState, Dict]) -> Activity: return Activity( type=ActivityTypes.trace, timestamp=datetime.utcnow(), name="Bot State", label="BotState", value=bot_state, value_type="https://www.botframework.com/schemas/botState", ) def from_conversation_reference( conversation_reference: ConversationReference, ) -> Activity: return Activity( type=ActivityTypes.trace, timestamp=datetime.utcnow(), name="Deleted Message", label="MessageDelete", value=conversation_reference, value_type="https://www.botframework.com/schemas/conversationReference", ) def from_error(error_message: str) -> Activity: return Activity( type=ActivityTypes.trace, timestamp=datetime.utcnow(), name="Turn Error", label="TurnError", value=error_message, value_type="https://www.botframework.com/schemas/error", )
botbuilder-python/libraries/botbuilder-core/botbuilder/core/inspection/trace_activity.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-core/botbuilder/core/inspection/trace_activity.py", "repo_id": "botbuilder-python", "token_count": 719 }
402
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from botbuilder.core.state_property_accessor import StatePropertyAccessor class PropertyManager: def create_property(self, name: str) -> StatePropertyAccessor: raise NotImplementedError()
botbuilder-python/libraries/botbuilder-core/botbuilder/core/property_manager.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-core/botbuilder/core/property_manager.py", "repo_id": "botbuilder-python", "token_count": 81 }
403
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from botbuilder.schema import ConversationReference class SkillConversationReference: """ ConversationReference implementation for Skills ConversationIdFactory. """ def __init__(self, conversation_reference: ConversationReference, oauth_scope: str): self.conversation_reference = conversation_reference self.oauth_scope = oauth_scope
botbuilder-python/libraries/botbuilder-core/botbuilder/core/skills/skill_conversation_reference.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-core/botbuilder/core/skills/skill_conversation_reference.py", "repo_id": "botbuilder-python", "token_count": 126 }
404
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import traceback from http import HTTPStatus from typing import Awaitable, Callable from botframework.connector.channels import Channels from botframework.connector.token_api.models import ( TokenResponse, TokenExchangeRequest, ) from botbuilder.schema import ( Activity, ActivityTypes, SignInConstants, TokenExchangeInvokeRequest, TokenExchangeInvokeResponse, ) from botbuilder.core import ( ExtendedUserTokenProvider, Middleware, InvokeResponse, Storage, StoreItem, TurnContext, ) class _TokenStoreItem(StoreItem): def __init__(self, **kwargs): self.e_tag: str = None super().__init__(**kwargs) @staticmethod def get_storage_key(turn_context: TurnContext): activity = turn_context.activity if not activity.channel_id: raise TypeError("invalid activity-missing channel_id") if not activity.conversation or not activity.conversation.id: raise TypeError("invalid activity-missing conversation.id") channel_id = activity.channel_id conversation_id = activity.conversation.id value = activity.value if not value or "id" not in value: raise Exception("Invalid signin/tokenExchange. Missing activity.value[id]") return f"{channel_id}/{conversation_id}/{value['id']}" class TeamsSSOTokenExchangeMiddleware(Middleware): """ If the activity name is signin/tokenExchange, self middleware will attempt to exchange the token, and deduplicate the incoming call, ensuring only one exchange request is processed. .. remarks:: If a user is signed into multiple Teams clients, the Bot could receive a "signin/tokenExchange" from each client. Each token exchange request for a specific user login will have an identical Activity.Value.Id. Only one of these token exchange requests should be processed by the bot. The others return <see cref="System.Net.HttpStatusCode.PreconditionFailed"/>. For a distributed bot in production, self requires a distributed storage ensuring only one token exchange is processed. self middleware supports CosmosDb storage found in Microsoft.Bot.Builder.Azure, or MemoryStorage for local development. IStorage's ETag implementation for token exchange activity deduplication. """ def __init__(self, storage: Storage, connection_name: str): """ Initializes a instance of the <see cref="TeamsSSOTokenExchangeMiddleware"/> class. :param storage: The Storage to use for deduplication. :param connection_name: The connection name to use for the single sign on token exchange. """ if storage is None: raise TypeError("storage cannot be None") if connection_name is None: raise TypeError("connection name cannot be None") self._oauth_connection_name = connection_name self._storage = storage async def on_turn( self, context: TurnContext, logic: Callable[[TurnContext], Awaitable] ): if ( context.activity.channel_id == Channels.ms_teams and context.activity.name == SignInConstants.token_exchange_operation_name ): # If the TokenExchange is NOT successful, the response will have already been sent by _exchanged_token if not await self._exchanged_token(context): return # Only one token exchange should proceed from here. Deduplication is performed second because in the case # of failure due to consent required, every caller needs to receive the if not await self._deduplicated_token_exchange_id(context): # If the token is not exchangeable, do not process this activity further. return await logic() async def _deduplicated_token_exchange_id(self, turn_context: TurnContext) -> bool: # Create a StoreItem with Etag of the unique 'signin/tokenExchange' request store_item = _TokenStoreItem(e_tag=turn_context.activity.value.get("id", None)) store_items = {_TokenStoreItem.get_storage_key(turn_context): store_item} try: # Writing the IStoreItem with ETag of unique id will succeed only once await self._storage.write(store_items) except Exception as error: # Memory storage throws a generic exception with a Message of 'Etag conflict. [other error info]' # CosmosDbPartitionedStorage throws: ex.Message.Contains("precondition is not met") if "Etag conflict" in str(error) or "precondition is not met" in str(error): # Do NOT proceed processing self message, some other thread or machine already has processed it. # Send 200 invoke response. await self._send_invoke_response(turn_context) return False raise error return True async def _send_invoke_response( self, turn_context: TurnContext, body: object = None, http_status_code=HTTPStatus.OK, ): await turn_context.send_activity( Activity( type=ActivityTypes.invoke_response, value=InvokeResponse(status=http_status_code, body=body), ) ) async def _exchanged_token(self, turn_context: TurnContext) -> bool: token_exchange_response: TokenResponse = None aux_dict = {} if turn_context.activity.value: for prop in ["id", "connection_name", "token", "properties"]: aux_dict[prop] = turn_context.activity.value.get(prop) token_exchange_request = TokenExchangeInvokeRequest( id=aux_dict["id"], connection_name=aux_dict["connection_name"], token=aux_dict["token"], properties=aux_dict["properties"], ) try: adapter = turn_context.adapter if isinstance(turn_context.adapter, ExtendedUserTokenProvider): token_exchange_response = await adapter.exchange_token( turn_context, self._oauth_connection_name, turn_context.activity.from_property.id, TokenExchangeRequest(token=token_exchange_request.token), ) else: raise Exception( "Not supported: Token Exchange is not supported by the current adapter." ) except: traceback.print_exc() if not token_exchange_response or not token_exchange_response.token: # The token could not be exchanged (which could be due to a consent requirement) # Notify the sender that PreconditionFailed so they can respond accordingly. invoke_response = TokenExchangeInvokeResponse( id=token_exchange_request.id, connection_name=self._oauth_connection_name, failure_detail="The bot is unable to exchange token. Proceed with regular login.", ) await self._send_invoke_response( turn_context, invoke_response, HTTPStatus.PRECONDITION_FAILED ) return False return True
botbuilder-python/libraries/botbuilder-core/botbuilder/core/teams/teams_sso_token_exchange_middleware.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-core/botbuilder/core/teams/teams_sso_token_exchange_middleware.py", "repo_id": "botbuilder-python", "token_count": 2916 }
405
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import unittest from typing import List, Tuple, Awaitable, Callable from botbuilder.core import BotAdapter, TurnContext from botbuilder.schema import ( Activity, ConversationReference, ResourceResponse, ConversationParameters, ) class SimpleAdapterWithCreateConversation(BotAdapter): # pylint: disable=unused-argument def __init__( self, call_on_send=None, call_on_update=None, call_on_delete=None, call_create_conversation=None, ): super(SimpleAdapterWithCreateConversation, self).__init__() self.test_aux = unittest.TestCase("__init__") self._call_on_send = call_on_send self._call_on_update = call_on_update self._call_on_delete = call_on_delete self._call_create_conversation = call_create_conversation async def delete_activity( self, context: TurnContext, reference: ConversationReference ): self.test_aux.assertIsNotNone( reference, "SimpleAdapter.delete_activity: missing reference" ) if self._call_on_delete is not None: self._call_on_delete(reference) async def send_activities( self, context: TurnContext, activities: List[Activity] ) -> List[ResourceResponse]: self.test_aux.assertIsNotNone( activities, "SimpleAdapter.delete_activity: missing reference" ) self.test_aux.assertTrue( len(activities) > 0, "SimpleAdapter.send_activities: empty activities array.", ) if self._call_on_send is not None: self._call_on_send(activities) responses = [] for activity in activities: responses.append(ResourceResponse(id=activity.id)) return responses async def create_conversation( # pylint: disable=arguments-differ self, reference: ConversationReference, logic: Callable[[TurnContext], Awaitable] = None, conversation_parameters: ConversationParameters = None, ) -> Tuple[ConversationReference, str]: if self._call_create_conversation is not None: self._call_create_conversation() ref = ConversationReference(activity_id="new_conversation_id") return (ref, "reference123") async def update_activity(self, context: TurnContext, activity: Activity): self.test_aux.assertIsNotNone( activity, "SimpleAdapter.update_activity: missing activity" ) if self._call_on_update is not None: self._call_on_update(activity) return ResourceResponse(id=activity.id) async def process_request(self, activity, handler): context = TurnContext(self, activity) return await self.run_pipeline(context, handler)
botbuilder-python/libraries/botbuilder-core/tests/teams/simple_adapter_with_create_conversation.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-core/tests/teams/simple_adapter_with_create_conversation.py", "repo_id": "botbuilder-python", "token_count": 1125 }
406
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # pylint: disable=missing-docstring, unused-import import sys import copy import uuid import datetime from typing import Awaitable, Callable, Dict, List from unittest.mock import patch, Mock import aiounittest from botbuilder.core import ( AnonymousReceiveMiddleware, BotTelemetryClient, MemoryTranscriptStore, MiddlewareSet, Middleware, TurnContext, ) from botbuilder.core.adapters import TestAdapter, TestFlow from botbuilder.schema import ( Activity, ActivityTypes, ChannelAccount, ConversationAccount, ConversationReference, ) # pylint: disable=line-too-long,missing-docstring class TestMemoryTranscriptStore(aiounittest.AsyncTestCase): # pylint: disable=unused-argument async def test_null_transcript_store(self): memory_transcript = MemoryTranscriptStore() with self.assertRaises(TypeError): await memory_transcript.log_activity(None) async def test_log_activity(self): memory_transcript = MemoryTranscriptStore() conversation_id = "_log_activity" date = datetime.datetime.now() activity = self.create_activities(conversation_id, date, 1)[-1] await memory_transcript.log_activity(activity) async def test_get_activity_none(self): memory_transcript = MemoryTranscriptStore() conversation_id = "_log_activity" await memory_transcript.get_transcript_activities("test", conversation_id) async def test_get_single_activity(self): memory_transcript = MemoryTranscriptStore() conversation_id = "_log_activity" date = datetime.datetime.now() activity = self.create_activities(conversation_id, date, count=1)[-1] await memory_transcript.log_activity(activity) result = await memory_transcript.get_transcript_activities( "test", conversation_id ) self.assertNotEqual(result.items, None) self.assertEqual(result.items[0].text, "0") async def test_get_multiple_activity(self): memory_transcript = MemoryTranscriptStore() conversation_id = "_log_activity" date = datetime.datetime.now() activities = self.create_activities(conversation_id, date, count=10) for activity in activities: await memory_transcript.log_activity(activity) result = await memory_transcript.get_transcript_activities( "test", conversation_id ) self.assertNotEqual(result.items, None) self.assertEqual(len(result.items), 20) # 2 events logged each iteration async def test_delete_transcript(self): memory_transcript = MemoryTranscriptStore() conversation_id = "_log_activity" date = datetime.datetime.now() activity = self.create_activities(conversation_id, date, count=1)[-1] await memory_transcript.log_activity(activity) result = await memory_transcript.get_transcript_activities( "test", conversation_id ) self.assertNotEqual(result.items, None) await memory_transcript.delete_transcript("test", conversation_id) result = await memory_transcript.get_transcript_activities( "test", conversation_id ) self.assertEqual(result.items, None) def create_activities(self, conversation_id: str, date: datetime, count: int = 5): activities: List[Activity] = [] time_stamp = date for i in range(count): activities.append( Activity( type=ActivityTypes.message, timestamp=time_stamp, id=str(uuid.uuid4()), text=str(i), channel_id="test", from_property=ChannelAccount(id=f"User{i}"), conversation=ConversationAccount(id=conversation_id), recipient=ChannelAccount(id="bot1", name="2"), service_url="http://foo.com/api/messages", ) ) time_stamp = time_stamp + datetime.timedelta(0, 60) activities.append( Activity( type=ActivityTypes.message, timestamp=date, id=str(uuid.uuid4()), text=str(i), channel_id="test", from_property=ChannelAccount(id="Bot1", name="2"), conversation=ConversationAccount(id=conversation_id), recipient=ChannelAccount(id=f"User{i}"), service_url="http://foo.com/api/messages", ) ) time_stamp = time_stamp + datetime.timedelta( 0, 60 ) # days, seconds, then other fields. return activities
botbuilder-python/libraries/botbuilder-core/tests/test_memory_transcript_store.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-core/tests/test_memory_transcript_store.py", "repo_id": "botbuilder-python", "token_count": 2141 }
407
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from .channel import Channel from .choice import Choice from .choice_factory_options import ChoiceFactoryOptions from .choice_factory import ChoiceFactory from .choice_recognizers import ChoiceRecognizers from .find import Find from .find_choices_options import FindChoicesOptions, FindValuesOptions from .found_choice import FoundChoice from .found_value import FoundValue from .list_style import ListStyle from .model_result import ModelResult from .sorted_value import SortedValue from .token import Token from .tokenizer import Tokenizer __all__ = [ "Channel", "Choice", "ChoiceFactory", "ChoiceFactoryOptions", "ChoiceRecognizers", "Find", "FindChoicesOptions", "FindValuesOptions", "FoundChoice", "ListStyle", "ModelResult", "SortedValue", "Token", "Tokenizer", ]
botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/choices/__init__.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/choices/__init__.py", "repo_id": "botbuilder-python", "token_count": 307 }
408
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from botbuilder.core import TurnContext from .dialog import Dialog from .dialog_context import DialogContext from .dialog_turn_result import DialogTurnResult from .dialog_state import DialogState from .dialog_turn_status import DialogTurnStatus from .dialog_reason import DialogReason from .dialog_set import DialogSet from .dialog_instance import DialogInstance class ComponentDialog(Dialog): """ A :class:`botbuilder.dialogs.Dialog` that is composed of other dialogs :var persisted_dialog state: :vartype persisted_dialog_state: str """ persisted_dialog_state = "dialogs" def __init__(self, dialog_id: str): """ Initializes a new instance of the :class:`ComponentDialog` :param dialog_id: The ID to assign to the new dialog within the parent dialog set. :type dialog_id: str """ super(ComponentDialog, self).__init__(dialog_id) if dialog_id is None: raise TypeError("ComponentDialog(): dialog_id cannot be None.") self._dialogs = DialogSet() self.initial_dialog_id = None # TODO: Add TelemetryClient async def begin_dialog( self, dialog_context: DialogContext, options: object = None ) -> DialogTurnResult: """ Called when the dialog is started and pushed onto the parent's dialog stack. If the task is successful, the result indicates whether the dialog is still active after the turn has been processed by the dialog. :param dialog_context: The :class:`botbuilder.dialogs.DialogContext` for the current turn of the conversation. :type dialog_context: :class:`botbuilder.dialogs.DialogContext` :param options: Optional, initial information to pass to the dialog. :type options: object :return: Signals the end of the turn :rtype: :class:`botbuilder.dialogs.Dialog.end_of_turn` """ if dialog_context is None: raise TypeError("ComponentDialog.begin_dialog(): outer_dc cannot be None.") # Start the inner dialog. dialog_state = DialogState() dialog_context.active_dialog.state[self.persisted_dialog_state] = dialog_state inner_dc = DialogContext(self._dialogs, dialog_context.context, dialog_state) inner_dc.parent = dialog_context turn_result = await self.on_begin_dialog(inner_dc, options) # Check for end of inner dialog if turn_result.status != DialogTurnStatus.Waiting: # Return result to calling dialog return await self.end_component(dialog_context, turn_result.result) # Just signal waiting return Dialog.end_of_turn async def continue_dialog(self, dialog_context: DialogContext) -> DialogTurnResult: """ Called when the dialog is continued, where it is the active dialog and the user replies with a new activity. .. remarks:: If the task is successful, the result indicates whether the dialog is still active after the turn has been processed by the dialog. The result may also contain a return value. If this method is *not* overriden the component dialog calls the :meth:`botbuilder.dialogs.DialogContext.continue_dialog` method on it's inner dialog context. If the inner dialog stack is empty, the component dialog ends, and if a :class:`botbuilder.dialogs.DialogTurnResult.result` is available, the component dialog uses that as it's return value. :param dialog_context: The parent dialog context for the current turn of the conversation. :type dialog_context: :class:`botbuilder.dialogs.DialogContext` :return: Signals the end of the turn :rtype: :class:`botbuilder.dialogs.Dialog.end_of_turn` """ if dialog_context is None: raise TypeError("ComponentDialog.begin_dialog(): outer_dc cannot be None.") # Continue execution of inner dialog. dialog_state = dialog_context.active_dialog.state[self.persisted_dialog_state] inner_dc = DialogContext(self._dialogs, dialog_context.context, dialog_state) inner_dc.parent = dialog_context turn_result = await self.on_continue_dialog(inner_dc) if turn_result.status != DialogTurnStatus.Waiting: return await self.end_component(dialog_context, turn_result.result) return Dialog.end_of_turn async def resume_dialog( self, dialog_context: DialogContext, reason: DialogReason, result: object = None ) -> DialogTurnResult: """ Called when a child dialog on the parent's dialog stack completed this turn, returning control to this dialog component. .. remarks:: Containers are typically leaf nodes on the stack but the dev is free to push other dialogs on top of the stack which will result in the container receiving an unexpected call to :meth:`ComponentDialog.resume_dialog()` when the pushed on dialog ends. To avoid the container prematurely ending we need to implement this method and simply ask our inner dialog stack to re-prompt. :param dialog_context: The dialog context for the current turn of the conversation. :type dialog_context: :class:`botbuilder.dialogs.DialogContext` :param reason: Reason why the dialog resumed. :type reason: :class:`botbuilder.dialogs.DialogReason` :param result: Optional, value returned from the dialog that was called. :type result: object :return: Signals the end of the turn :rtype: :class:`botbuilder.dialogs.Dialog.end_of_turn` """ await self.reprompt_dialog(dialog_context.context, dialog_context.active_dialog) return Dialog.end_of_turn async def reprompt_dialog( self, context: TurnContext, instance: DialogInstance ) -> None: """ Called when the dialog should re-prompt the user for input. :param context: The context object for this turn. :type context: :class:`botbuilder.core.TurnContext` :param instance: State information for this dialog. :type instance: :class:`botbuilder.dialogs.DialogInstance` """ # Delegate to inner dialog. dialog_state = instance.state[self.persisted_dialog_state] inner_dc = DialogContext(self._dialogs, context, dialog_state) await inner_dc.reprompt_dialog() # Notify component await self.on_reprompt_dialog(context, instance) async def end_dialog( self, context: TurnContext, instance: DialogInstance, reason: DialogReason ) -> None: """ Called when the dialog is ending. :param context: The context object for this turn. :type context: :class:`botbuilder.core.TurnContext` :param instance: State information associated with the instance of this component dialog. :type instance: :class:`botbuilder.dialogs.DialogInstance` :param reason: Reason why the dialog ended. :type reason: :class:`botbuilder.dialogs.DialogReason` """ # Forward cancel to inner dialog if reason == DialogReason.CancelCalled: dialog_state = instance.state[self.persisted_dialog_state] inner_dc = DialogContext(self._dialogs, context, dialog_state) await inner_dc.cancel_all_dialogs() await self.on_end_dialog(context, instance, reason) def add_dialog(self, dialog: Dialog) -> object: """ Adds a :class:`Dialog` to the component dialog and returns the updated component. :param dialog: The dialog to add. :return: The updated :class:`ComponentDialog`. :rtype: :class:`ComponentDialog` """ self._dialogs.add(dialog) if not self.initial_dialog_id: self.initial_dialog_id = dialog.id return self async def find_dialog(self, dialog_id: str) -> Dialog: """ Finds a dialog by ID. :param dialog_id: The dialog to add. :return: The dialog; or None if there is not a match for the ID. :rtype: :class:`botbuilder.dialogs.Dialog` """ return await self._dialogs.find(dialog_id) async def on_begin_dialog( self, inner_dc: DialogContext, options: object ) -> DialogTurnResult: """ Called when the dialog is started and pushed onto the parent's dialog stack. .. remarks:: If the task is successful, the result indicates whether the dialog is still active after the turn has been processed by the dialog. By default, this calls the :meth:`botbuilder.dialogs.Dialog.begin_dialog()` method of the component dialog's initial dialog. Override this method in a derived class to implement interrupt logic. :param inner_dc: The inner dialog context for the current turn of conversation. :type inner_dc: :class:`botbuilder.dialogs.DialogContext` :param options: Optional, initial information to pass to the dialog. :type options: object """ return await inner_dc.begin_dialog(self.initial_dialog_id, options) async def on_continue_dialog(self, inner_dc: DialogContext) -> DialogTurnResult: """ Called when the dialog is continued, where it is the active dialog and the user replies with a new activity. :param inner_dc: The inner dialog context for the current turn of conversation. :type inner_dc: :class:`botbuilder.dialogs.DialogContext` """ return await inner_dc.continue_dialog() async def on_end_dialog( # pylint: disable=unused-argument self, context: TurnContext, instance: DialogInstance, reason: DialogReason ) -> None: """ Ends the component dialog in its parent's context. :param turn_context: The :class:`botbuilder.core.TurnContext` for the current turn of the conversation. :type turn_context: :class:`botbuilder.core.TurnContext` :param instance: State information associated with the inner dialog stack of this component dialog. :type instance: :class:`botbuilder.dialogs.DialogInstance` :param reason: Reason why the dialog ended. :type reason: :class:`botbuilder.dialogs.DialogReason` """ return async def on_reprompt_dialog( # pylint: disable=unused-argument self, turn_context: TurnContext, instance: DialogInstance ) -> None: """ :param turn_context: The :class:`botbuilder.core.TurnContext` for the current turn of the conversation. :type turn_context: :class:`botbuilder.dialogs.DialogInstance` :param instance: State information associated with the inner dialog stack of this component dialog. :type instance: :class:`botbuilder.dialogs.DialogInstance` """ return async def end_component( self, outer_dc: DialogContext, result: object # pylint: disable=unused-argument ) -> DialogTurnResult: """ Ends the component dialog in its parent's context. .. remarks:: If the task is successful, the result indicates that the dialog ended after the turn was processed by the dialog. :param outer_dc: The parent dialog context for the current turn of conversation. :type outer_dc: class:`botbuilder.dialogs.DialogContext` :param result: Optional, value to return from the dialog component to the parent context. :type result: object :return: Value to return. :rtype: :class:`botbuilder.dialogs.DialogTurnResult.result` """ return await outer_dc.end_dialog(result)
botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/component_dialog.py", "repo_id": "botbuilder-python", "token_count": 4365 }
409
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from .dialog_path import DialogPath from .dialog_state_manager import DialogStateManager from .dialog_state_manager_configuration import DialogStateManagerConfiguration from .component_memory_scopes_base import ComponentMemoryScopesBase from .component_path_resolvers_base import ComponentPathResolversBase from .path_resolver_base import PathResolverBase from . import scope_path __all__ = [ "DialogPath", "DialogStateManager", "DialogStateManagerConfiguration", "ComponentMemoryScopesBase", "ComponentPathResolversBase", "PathResolverBase", "scope_path", ]
botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/__init__.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/__init__.py", "repo_id": "botbuilder-python", "token_count": 229 }
410
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from typing import Type from botbuilder.core import BotState from .memory_scope import MemoryScope class BotStateMemoryScope(MemoryScope): def __init__(self, bot_state_type: Type[BotState], name: str): super().__init__(name, include_in_snapshot=True) self.bot_state_type = bot_state_type def get_memory(self, dialog_context: "DialogContext") -> object: if not dialog_context: raise TypeError(f"Expecting: DialogContext, but received None") bot_state: BotState = self._get_bot_state(dialog_context) cached_state = ( bot_state.get_cached_state(dialog_context.context) if bot_state else None ) return cached_state.state if cached_state else None def set_memory(self, dialog_context: "DialogContext", memory: object): raise RuntimeError("You cannot replace the root BotState object") async def load(self, dialog_context: "DialogContext", force: bool = False): bot_state: BotState = self._get_bot_state(dialog_context) if bot_state: await bot_state.load(dialog_context.context, force) async def save_changes(self, dialog_context: "DialogContext", force: bool = False): bot_state: BotState = self._get_bot_state(dialog_context) if bot_state: await bot_state.save_changes(dialog_context.context, force) def _get_bot_state(self, dialog_context: "DialogContext") -> BotState: return dialog_context.context.turn_state.get(self.bot_state_type.__name__, None)
botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/bot_state_memory_scope.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/bot_state_memory_scope.py", "repo_id": "botbuilder-python", "token_count": 596 }
411
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from typing import Callable, Dict from botbuilder.schema import ActivityTypes from botbuilder.core import TurnContext from .prompt import Prompt, PromptValidatorContext from .prompt_options import PromptOptions from .prompt_recognizer_result import PromptRecognizerResult class AttachmentPrompt(Prompt): """ Prompts a user to upload attachments like images. By default the prompt will return to the calling dialog an `[Attachment]` """ def __init__( self, dialog_id: str, validator: Callable[[PromptValidatorContext], bool] = None ): super().__init__(dialog_id, validator) async def on_prompt( self, turn_context: TurnContext, state: Dict[str, object], options: PromptOptions, is_retry: bool, ): if not turn_context: raise TypeError("AttachmentPrompt.on_prompt(): TurnContext cannot be None.") if not isinstance(options, PromptOptions): raise TypeError( "AttachmentPrompt.on_prompt(): PromptOptions are required for Attachment Prompt dialogs." ) if is_retry and options.retry_prompt: await turn_context.send_activity(options.retry_prompt) elif options.prompt: await turn_context.send_activity(options.prompt) async def on_recognize( self, turn_context: TurnContext, state: Dict[str, object], options: PromptOptions, ) -> PromptRecognizerResult: if not turn_context: raise TypeError("AttachmentPrompt.on_recognize(): context cannot be None.") result = PromptRecognizerResult() if turn_context.activity.type == ActivityTypes.message: message = turn_context.activity if isinstance(message.attachments, list) and message.attachments: result.succeeded = True result.value = message.attachments return result
botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/attachment_prompt.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/attachment_prompt.py", "repo_id": "botbuilder-python", "token_count": 790 }
412
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from botbuilder.schema import Activity class BeginSkillDialogOptions: def __init__(self, activity: Activity): self.activity = activity @staticmethod def from_object(obj: object) -> "BeginSkillDialogOptions": if isinstance(obj, dict) and "activity" in obj: return BeginSkillDialogOptions(obj["activity"]) if hasattr(obj, "activity"): return BeginSkillDialogOptions(obj.activity) return None
botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/skills/begin_skill_dialog_options.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-dialogs/botbuilder/dialogs/skills/begin_skill_dialog_options.py", "repo_id": "botbuilder-python", "token_count": 190 }
413
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import os class DefaultConfig: """Bot Configuration""" STRING = os.environ.get("STRING", "test") INT = os.environ.get("INT", 3) LIST = os.environ.get("LIST", ["zero", "one", "two", "three"]) NOT_TO_BE_OVERRIDDEN = os.environ.get("NOT_TO_BE_OVERRIDDEN", "one") TO_BE_OVERRIDDEN = os.environ.get("TO_BE_OVERRIDDEN", "one")
botbuilder-python/libraries/botbuilder-dialogs/tests/memory/scopes/test_settings.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-dialogs/tests/memory/scopes/test_settings.py", "repo_id": "botbuilder-python", "token_count": 172 }
414
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from .aiohttp_channel_service import aiohttp_channel_service_routes from .aiohttp_channel_service_exception_middleware import aiohttp_error_middleware from .bot_framework_http_client import BotFrameworkHttpClient from .bot_framework_http_adapter import BotFrameworkHttpAdapter from .cloud_adapter import CloudAdapter from .configuration_service_client_credential_factory import ( ConfigurationServiceClientCredentialFactory, ) from .configuration_bot_framework_authentication import ( ConfigurationBotFrameworkAuthentication, ) __all__ = [ "aiohttp_channel_service_routes", "aiohttp_error_middleware", "BotFrameworkHttpClient", "BotFrameworkHttpAdapter", "CloudAdapter", "ConfigurationServiceClientCredentialFactory", "ConfigurationBotFrameworkAuthentication", ]
botbuilder-python/libraries/botbuilder-integration-aiohttp/botbuilder/integration/aiohttp/__init__.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-integration-aiohttp/botbuilder/integration/aiohttp/__init__.py", "repo_id": "botbuilder-python", "token_count": 295 }
415
[bdist_wheel] universal=0
botbuilder-python/libraries/botbuilder-integration-aiohttp/setup.cfg/0
{ "file_path": "botbuilder-python/libraries/botbuilder-integration-aiohttp/setup.cfg", "repo_id": "botbuilder-python", "token_count": 10 }
416
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from typing import List from botbuilder.schema._connector_client_enums import ActivityTypes from datetime import datetime from enum import Enum from msrest.serialization import Model from msrest.exceptions import HttpOperationError class ActivityEventNames(str, Enum): continue_conversation = "ContinueConversation" create_conversation = "CreateConversation" class ConversationReference(Model): """An object relating to a particular point in a conversation. :param activity_id: (Optional) ID of the activity to refer to :type activity_id: str :param user: (Optional) User participating in this conversation :type user: ~botframework.connector.models.ChannelAccount :param bot: Bot participating in this conversation :type bot: ~botframework.connector.models.ChannelAccount :param conversation: Conversation reference :type conversation: ~botframework.connector.models.ConversationAccount :param channel_id: Channel ID :type channel_id: str :param locale: A locale name for the contents of the text field. The locale name is a combination of an ISO 639 two- or three-letter culture code associated with a language and an ISO 3166 two-letter subculture code associated with a country or region. The locale name can also correspond to a valid BCP-47 language tag. :type locale: str :param service_url: Service endpoint where operations concerning the referenced conversation may be performed :type service_url: str """ _attribute_map = { "activity_id": {"key": "activityId", "type": "str"}, "user": {"key": "user", "type": "ChannelAccount"}, "bot": {"key": "bot", "type": "ChannelAccount"}, "conversation": {"key": "conversation", "type": "ConversationAccount"}, "channel_id": {"key": "channelId", "type": "str"}, "locale": {"key": "locale", "type": "str"}, "service_url": {"key": "serviceUrl", "type": "str"}, } def __init__( self, *, activity_id: str = None, user=None, bot=None, conversation=None, channel_id: str = None, locale: str = None, service_url: str = None, **kwargs ) -> None: super(ConversationReference, self).__init__(**kwargs) self.activity_id = activity_id self.user = user self.bot = bot self.conversation = conversation self.channel_id = channel_id self.locale = locale self.service_url = service_url class Mention(Model): """Mention information (entity type: "mention"). :param mentioned: The mentioned user :type mentioned: ~botframework.connector.models.ChannelAccount :param text: Sub Text which represents the mention (can be null or empty) :type text: str :param type: Type of this entity (RFC 3987 IRI) :type type: str """ _attribute_map = { "mentioned": {"key": "mentioned", "type": "ChannelAccount"}, "text": {"key": "text", "type": "str"}, "type": {"key": "type", "type": "str"}, } def __init__( self, *, mentioned=None, text: str = None, type: str = None, **kwargs ) -> None: super(Mention, self).__init__(**kwargs) self.mentioned = mentioned self.text = text self.type = type class ResourceResponse(Model): """A response containing a resource ID. :param id: Id of the resource :type id: str """ _attribute_map = {"id": {"key": "id", "type": "str"}} def __init__(self, *, id: str = None, **kwargs) -> None: super(ResourceResponse, self).__init__(**kwargs) self.id = id class Activity(Model): """An Activity is the basic communication type for the Bot Framework 3.0 protocol. :param type: Contains the activity type. Possible values include: 'message', 'contactRelationUpdate', 'conversationUpdate', 'typing', 'endOfConversation', 'event', 'invoke', 'deleteUserData', 'messageUpdate', 'messageDelete', 'installationUpdate', 'messageReaction', 'suggestion', 'trace', 'handoff' :type type: str or ~botframework.connector.models.ActivityTypes :param id: Contains an ID that uniquely identifies the activity on the channel. :type id: str :param timestamp: Contains the date and time that the message was sent, in UTC, expressed in ISO-8601 format. :type timestamp: datetime :param local_timestamp: Contains the local date and time of the message expressed in ISO-8601 format. For example, 2016-09-23T13:07:49.4714686-07:00. :type local_timestamp: datetime :param local_timezone: Contains the name of the local timezone of the message, expressed in IANA Time Zone database format. For example, America/Los_Angeles. :type local_timezone: str :param service_url: Contains the URL that specifies the channel's service endpoint. Set by the channel. :type service_url: str :param channel_id: Contains an ID that uniquely identifies the channel. Set by the channel. :type channel_id: str :param from_property: Identifies the sender of the message. :type from_property: ~botframework.connector.models.ChannelAccount :param conversation: Identifies the conversation to which the activity belongs. :type conversation: ~botframework.connector.models.ConversationAccount :param recipient: Identifies the recipient of the message. :type recipient: ~botframework.connector.models.ChannelAccount :param text_format: Format of text fields Default:markdown. Possible values include: 'markdown', 'plain', 'xml' :type text_format: str or ~botframework.connector.models.TextFormatTypes :param attachment_layout: The layout hint for multiple attachments. Default: list. Possible values include: 'list', 'carousel' :type attachment_layout: str or ~botframework.connector.models.AttachmentLayoutTypes :param members_added: The collection of members added to the conversation. :type members_added: list[~botframework.connector.models.ChannelAccount] :param members_removed: The collection of members removed from the conversation. :type members_removed: list[~botframework.connector.models.ChannelAccount] :param reactions_added: The collection of reactions added to the conversation. :type reactions_added: list[~botframework.connector.models.MessageReaction] :param reactions_removed: The collection of reactions removed from the conversation. :type reactions_removed: list[~botframework.connector.models.MessageReaction] :param topic_name: The updated topic name of the conversation. :type topic_name: str :param history_disclosed: Indicates whether the prior history of the channel is disclosed. :type history_disclosed: bool :param locale: A locale name for the contents of the text field. The locale name is a combination of an ISO 639 two- or three-letter culture code associated with a language and an ISO 3166 two-letter subculture code associated with a country or region. The locale name can also correspond to a valid BCP-47 language tag. :type locale: str :param text: The text content of the message. :type text: str :param speak: The text to speak. :type speak: str :param input_hint: Indicates whether your bot is accepting, expecting, or ignoring user input after the message is delivered to the client. Possible values include: 'acceptingInput', 'ignoringInput', 'expectingInput' :type input_hint: str or ~botframework.connector.models.InputHints :param summary: The text to display if the channel cannot render cards. :type summary: str :param suggested_actions: The suggested actions for the activity. :type suggested_actions: ~botframework.connector.models.SuggestedActions :param attachments: Attachments :type attachments: list[~botframework.connector.models.Attachment] :param entities: Represents the entities that were mentioned in the message. :type entities: list[~botframework.connector.models.Entity] :param channel_data: Contains channel-specific content. :type channel_data: object :param action: Indicates whether the recipient of a contactRelationUpdate was added or removed from the sender's contact list. :type action: str :param reply_to_id: Contains the ID of the message to which this message is a reply. :type reply_to_id: str :param label: A descriptive label for the activity. :type label: str :param value_type: The type of the activity's value object. :type value_type: str :param value: A value that is associated with the activity. :type value: object :param name: The name of the operation associated with an invoke or event activity. :type name: str :param relates_to: A reference to another conversation or activity. :type relates_to: ~botframework.connector.models.ConversationReference :param code: The a code for endOfConversation activities that indicates why the conversation ended. Possible values include: 'unknown', 'completedSuccessfully', 'userCancelled', 'botTimedOut', 'botIssuedInvalidMessage', 'channelFailed' :type code: str or ~botframework.connector.models.EndOfConversationCodes :param expiration: The time at which the activity should be considered to be "expired" and should not be presented to the recipient. :type expiration: datetime :param importance: The importance of the activity. Possible values include: 'low', 'normal', 'high' :type importance: str or ~botframework.connector.models.ActivityImportance :param delivery_mode: A delivery hint to signal to the recipient alternate delivery paths for the activity. The default delivery mode is "default". Possible values include: 'normal', 'notification', 'expectReplies', 'ephemeral' :type delivery_mode: str or ~botframework.connector.models.DeliveryModes :param listen_for: List of phrases and references that speech and language priming systems should listen for :type listen_for: list[str] :param text_highlights: The collection of text fragments to highlight when the activity contains a ReplyToId value. :type text_highlights: list[~botframework.connector.models.TextHighlight] :param semantic_action: An optional programmatic action accompanying this request :type semantic_action: ~botframework.connector.models.SemanticAction :param caller_id: A string containing an IRI identifying the caller of a bot. This field is not intended to be transmitted over the wire, but is instead populated by bots and clients based on cryptographically verifiable data that asserts the identity of the callers (e.g. tokens). :type caller_id: str """ _attribute_map = { "type": {"key": "type", "type": "str"}, "id": {"key": "id", "type": "str"}, "timestamp": {"key": "timestamp", "type": "iso-8601"}, "local_timestamp": {"key": "localTimestamp", "type": "iso-8601"}, "local_timezone": {"key": "localTimezone", "type": "str"}, "service_url": {"key": "serviceUrl", "type": "str"}, "channel_id": {"key": "channelId", "type": "str"}, "from_property": {"key": "from", "type": "ChannelAccount"}, "conversation": {"key": "conversation", "type": "ConversationAccount"}, "recipient": {"key": "recipient", "type": "ChannelAccount"}, "text_format": {"key": "textFormat", "type": "str"}, "attachment_layout": {"key": "attachmentLayout", "type": "str"}, "members_added": {"key": "membersAdded", "type": "[ChannelAccount]"}, "members_removed": {"key": "membersRemoved", "type": "[ChannelAccount]"}, "reactions_added": {"key": "reactionsAdded", "type": "[MessageReaction]"}, "reactions_removed": {"key": "reactionsRemoved", "type": "[MessageReaction]"}, "topic_name": {"key": "topicName", "type": "str"}, "history_disclosed": {"key": "historyDisclosed", "type": "bool"}, "locale": {"key": "locale", "type": "str"}, "text": {"key": "text", "type": "str"}, "speak": {"key": "speak", "type": "str"}, "input_hint": {"key": "inputHint", "type": "str"}, "summary": {"key": "summary", "type": "str"}, "suggested_actions": {"key": "suggestedActions", "type": "SuggestedActions"}, "attachments": {"key": "attachments", "type": "[Attachment]"}, "entities": {"key": "entities", "type": "[Entity]"}, "channel_data": {"key": "channelData", "type": "object"}, "action": {"key": "action", "type": "str"}, "reply_to_id": {"key": "replyToId", "type": "str"}, "label": {"key": "label", "type": "str"}, "value_type": {"key": "valueType", "type": "str"}, "value": {"key": "value", "type": "object"}, "name": {"key": "name", "type": "str"}, "relates_to": {"key": "relatesTo", "type": "ConversationReference"}, "code": {"key": "code", "type": "str"}, "expiration": {"key": "expiration", "type": "iso-8601"}, "importance": {"key": "importance", "type": "str"}, "delivery_mode": {"key": "deliveryMode", "type": "str"}, "listen_for": {"key": "listenFor", "type": "[str]"}, "text_highlights": {"key": "textHighlights", "type": "[TextHighlight]"}, "semantic_action": {"key": "semanticAction", "type": "SemanticAction"}, "caller_id": {"key": "callerId", "type": "str"}, } def __init__( self, *, type=None, id: str = None, timestamp=None, local_timestamp=None, local_timezone: str = None, service_url: str = None, channel_id: str = None, from_property=None, conversation=None, recipient=None, text_format=None, attachment_layout=None, members_added=None, members_removed=None, reactions_added=None, reactions_removed=None, topic_name: str = None, history_disclosed: bool = None, locale: str = None, text: str = None, speak: str = None, input_hint=None, summary: str = None, suggested_actions=None, attachments=None, entities=None, channel_data=None, action: str = None, reply_to_id: str = None, label: str = None, value_type: str = None, value=None, name: str = None, relates_to=None, code=None, expiration=None, importance=None, delivery_mode=None, listen_for=None, text_highlights=None, semantic_action=None, caller_id: str = None, **kwargs ) -> None: super(Activity, self).__init__(**kwargs) self.type = type self.id = id self.timestamp = timestamp self.local_timestamp = local_timestamp self.local_timezone = local_timezone self.service_url = service_url self.channel_id = channel_id self.from_property = from_property self.conversation = conversation self.recipient = recipient self.text_format = text_format self.attachment_layout = attachment_layout self.members_added = members_added self.members_removed = members_removed self.reactions_added = reactions_added self.reactions_removed = reactions_removed self.topic_name = topic_name self.history_disclosed = history_disclosed self.locale = locale self.text = text self.speak = speak self.input_hint = input_hint self.summary = summary self.suggested_actions = suggested_actions self.attachments = attachments self.entities = entities self.channel_data = channel_data self.action = action self.reply_to_id = reply_to_id self.label = label self.value_type = value_type self.value = value self.name = name self.relates_to = relates_to self.code = code self.expiration = expiration self.importance = importance self.delivery_mode = delivery_mode self.listen_for = listen_for self.text_highlights = text_highlights self.semantic_action = semantic_action self.caller_id = caller_id def apply_conversation_reference( self, reference: ConversationReference, is_incoming: bool = False ): """ Updates this activity with the delivery information from an existing ConversationReference :param reference: The existing conversation reference. :param is_incoming: Optional, True to treat the activity as an incoming activity, where the bot is the recipient; otherwise, False. Default is False, and the activity will show the bot as the sender. :returns: his activity, updated with the delivery information. .. remarks:: Call GetConversationReference on an incoming activity to get a conversation reference that you can then use to update an outgoing activity with the correct delivery information. """ self.channel_id = reference.channel_id self.service_url = reference.service_url self.conversation = reference.conversation if reference.locale is not None: self.locale = reference.locale if is_incoming: self.from_property = reference.user self.recipient = reference.bot if reference.activity_id is not None: self.id = reference.activity_id else: self.from_property = reference.bot self.recipient = reference.user if reference.activity_id is not None: self.reply_to_id = reference.activity_id return self def as_contact_relation_update_activity(self): """ Returns this activity as a ContactRelationUpdateActivity object; or None, if this is not that type of activity. :returns: This activity as a message activity; or None. """ return ( self if self.__is_activity(ActivityTypes.contact_relation_update) else None ) def as_conversation_update_activity(self): """ Returns this activity as a ConversationUpdateActivity object; or None, if this is not that type of activity. :returns: This activity as a conversation update activity; or None. """ return self if self.__is_activity(ActivityTypes.conversation_update) else None def as_end_of_conversation_activity(self): """ Returns this activity as an EndOfConversationActivity object; or None, if this is not that type of activity. :returns: This activity as an end of conversation activity; or None. """ return self if self.__is_activity(ActivityTypes.end_of_conversation) else None def as_event_activity(self): """ Returns this activity as an EventActivity object; or None, if this is not that type of activity. :returns: This activity as an event activity; or None. """ return self if self.__is_activity(ActivityTypes.event) else None def as_handoff_activity(self): """ Returns this activity as a HandoffActivity object; or None, if this is not that type of activity. :returns: This activity as a handoff activity; or None. """ return self if self.__is_activity(ActivityTypes.handoff) else None def as_installation_update_activity(self): """ Returns this activity as an InstallationUpdateActivity object; or None, if this is not that type of activity. :returns: This activity as an installation update activity; or None. """ return self if self.__is_activity(ActivityTypes.installation_update) else None def as_invoke_activity(self): """ Returns this activity as an InvokeActivity object; or None, if this is not that type of activity. :returns: This activity as an invoke activity; or None. """ return self if self.__is_activity(ActivityTypes.invoke) else None def as_message_activity(self): """ Returns this activity as a MessageActivity object; or None, if this is not that type of activity. :returns: This activity as a message activity; or None. """ return self if self.__is_activity(ActivityTypes.message) else None def as_message_delete_activity(self): """ Returns this activity as a MessageDeleteActivity object; or None, if this is not that type of activity. :returns: This activity as a message delete request; or None. """ return self if self.__is_activity(ActivityTypes.message_delete) else None def as_message_reaction_activity(self): """ Returns this activity as a MessageReactionActivity object; or None, if this is not that type of activity. :return: This activity as a message reaction activity; or None. """ return self if self.__is_activity(ActivityTypes.message_reaction) else None def as_message_update_activity(self): """ Returns this activity as an MessageUpdateActivity object; or None, if this is not that type of activity. :returns: This activity as a message update request; or None. """ return self if self.__is_activity(ActivityTypes.message_update) else None def as_suggestion_activity(self): """ Returns this activity as a SuggestionActivity object; or None, if this is not that type of activity. :returns: This activity as a suggestion activity; or None. """ return self if self.__is_activity(ActivityTypes.suggestion) else None def as_trace_activity(self): """ Returns this activity as a TraceActivity object; or None, if this is not that type of activity. :returns: This activity as a trace activity; or None. """ return self if self.__is_activity(ActivityTypes.trace) else None def as_typing_activity(self): """ Returns this activity as a TypingActivity object; or null, if this is not that type of activity. :returns: This activity as a typing activity; or null. """ return self if self.__is_activity(ActivityTypes.typing) else None @staticmethod def create_contact_relation_update_activity(): """ Creates an instance of the :class:`Activity` class as aContactRelationUpdateActivity object. :returns: The new contact relation update activity. """ return Activity(type=ActivityTypes.contact_relation_update) @staticmethod def create_conversation_update_activity(): """ Creates an instance of the :class:`Activity` class as a ConversationUpdateActivity object. :returns: The new conversation update activity. """ return Activity(type=ActivityTypes.conversation_update) @staticmethod def create_end_of_conversation_activity(): """ Creates an instance of the :class:`Activity` class as an EndOfConversationActivity object. :returns: The new end of conversation activity. """ return Activity(type=ActivityTypes.end_of_conversation) @staticmethod def create_event_activity(): """ Creates an instance of the :class:`Activity` class as an EventActivity object. :returns: The new event activity. """ return Activity(type=ActivityTypes.event) @staticmethod def create_handoff_activity(): """ Creates an instance of the :class:`Activity` class as a HandoffActivity object. :returns: The new handoff activity. """ return Activity(type=ActivityTypes.handoff) @staticmethod def create_invoke_activity(): """ Creates an instance of the :class:`Activity` class as an InvokeActivity object. :returns: The new invoke activity. """ return Activity(type=ActivityTypes.invoke) @staticmethod def create_message_activity(): """ Creates an instance of the :class:`Activity` class as a MessageActivity object. :returns: The new message activity. """ return Activity(type=ActivityTypes.message) def create_reply(self, text: str = None, locale: str = None): """ Creates a new message activity as a response to this activity. :param text: The text of the reply. :param locale: The language code for the text. :returns: The new message activity. .. remarks:: The new activity sets up routing information based on this activity. """ return Activity( type=ActivityTypes.message, timestamp=datetime.utcnow(), from_property=ChannelAccount( id=self.recipient.id if self.recipient else None, name=self.recipient.name if self.recipient else None, ), recipient=ChannelAccount( id=self.from_property.id if self.from_property else None, name=self.from_property.name if self.from_property else None, ), reply_to_id=self.id, service_url=self.service_url, channel_id=self.channel_id, conversation=ConversationAccount( is_group=self.conversation.is_group, id=self.conversation.id, name=self.conversation.name, ), text=text if text else "", locale=locale if locale else self.locale, attachments=[], entities=[], ) def create_trace( self, name: str, value: object = None, value_type: str = None, label: str = None ): """ Creates a new trace activity based on this activity. :param name: The name of the trace operation to create. :param value: Optional, the content for this trace operation. :param value_type: Optional, identifier for the format of the value Default is the name of type of the value. :param label: Optional, a descriptive label for this trace operation. :returns: The new trace activity. """ if not value_type and value: value_type = type(value) return Activity( type=ActivityTypes.trace, timestamp=datetime.utcnow(), from_property=ChannelAccount( id=self.recipient.id if self.recipient else None, name=self.recipient.name if self.recipient else None, ), recipient=ChannelAccount( id=self.from_property.id if self.from_property else None, name=self.from_property.name if self.from_property else None, ), reply_to_id=self.id, service_url=self.service_url, channel_id=self.channel_id, conversation=ConversationAccount( is_group=self.conversation.is_group, id=self.conversation.id, name=self.conversation.name, ), name=name, label=label, value_type=value_type, value=value, ).as_trace_activity() @staticmethod def create_trace_activity( name: str, value: object = None, value_type: str = None, label: str = None ): """ Creates an instance of the :class:`Activity` class as a TraceActivity object. :param name: The name of the trace operation to create. :param value: Optional, the content for this trace operation. :param value_type: Optional, identifier for the format of the value. Default is the name of type of the value. :param label: Optional, a descriptive label for this trace operation. :returns: The new trace activity. """ if not value_type and value: value_type = type(value) return Activity( type=ActivityTypes.trace, name=name, label=label, value_type=value_type, value=value, ) @staticmethod def create_typing_activity(): """ Creates an instance of the :class:`Activity` class as a TypingActivity object. :returns: The new typing activity. """ return Activity(type=ActivityTypes.typing) def get_conversation_reference(self): """ Creates a ConversationReference based on this activity. :returns: A conversation reference for the conversation that contains this activity. """ return ConversationReference( activity_id=self.id, user=self.from_property, bot=self.recipient, conversation=self.conversation, channel_id=self.channel_id, locale=self.locale, service_url=self.service_url, ) def get_mentions(self) -> List[Mention]: """ Resolves the mentions from the entities of this activity. :returns: The array of mentions; or an empty array, if none are found. .. remarks:: This method is defined on the :class:`Activity` class, but is only intended for use with a message activity, where the activity Activity.Type is set to ActivityTypes.Message. """ _list = self.entities return [x for x in _list if str(x.type).lower() == "mention"] def get_reply_conversation_reference( self, reply: ResourceResponse ) -> ConversationReference: """ Create a ConversationReference based on this Activity's Conversation info and the ResourceResponse from sending an activity. :param reply: ResourceResponse returned from send_activity. :return: A ConversationReference that can be stored and used later to delete or update the activity. """ reference = self.get_conversation_reference() reference.activity_id = reply.id return reference def has_content(self) -> bool: """ Indicates whether this activity has content. :returns: True, if this activity has any content to send; otherwise, false. .. remarks:: This method is defined on the :class:`Activity` class, but is only intended for use with a message activity, where the activity Activity.Type is set to ActivityTypes.Message. """ if self.text and self.text.strip(): return True if self.summary and self.summary.strip(): return True if self.attachments and len(self.attachments) > 0: return True if self.channel_data: return True return False def is_from_streaming_connection(self) -> bool: """ Determine if the Activity was sent via an Http/Https connection or Streaming This can be determined by looking at the service_url property: (1) All channels that send messages via http/https are not streaming (2) Channels that send messages via streaming have a ServiceUrl that does not begin with http/https. :returns: True if the Activity originated from a streaming connection. """ if self.service_url: return not self.service_url.lower().startswith("http") return False def __is_activity(self, activity_type: str) -> bool: """ Indicates whether this activity is of a specified activity type. :param activity_type: The activity type to check for. :return: True if this activity is of the specified activity type; otherwise, False. """ if self.type is None: return False type_attribute = str(self.type).lower() activity_type = str(activity_type).lower() result = type_attribute.startswith(activity_type) if result: result = len(type_attribute) == len(activity_type) if not result: result = ( len(type_attribute) > len(activity_type) and type_attribute[len(activity_type)] == "/" ) return result class AnimationCard(Model): """An animation card (Ex: gif or short video clip). :param title: Title of this card :type title: str :param subtitle: Subtitle of this card :type subtitle: str :param text: Text of this card :type text: str :param image: Thumbnail placeholder :type image: ~botframework.connector.models.ThumbnailUrl :param media: Media URLs for this card. When this field contains more than one URL, each URL is an alternative format of the same content. :type media: list[~botframework.connector.models.MediaUrl] :param buttons: Actions on this card :type buttons: list[~botframework.connector.models.CardAction] :param shareable: This content may be shared with others (default:true) :type shareable: bool :param autoloop: Should the client loop playback at end of content (default:true) :type autoloop: bool :param autostart: Should the client automatically start playback of media in this card (default:true) :type autostart: bool :param aspect: Aspect ratio of thumbnail/media placeholder. Allowed values are "16:9" and "4:3" :type aspect: str :param duration: Describes the length of the media content without requiring a receiver to open the content. Formatted as an ISO 8601 Duration field. :type duration: str :param value: Supplementary parameter for this card :type value: object """ _attribute_map = { "title": {"key": "title", "type": "str"}, "subtitle": {"key": "subtitle", "type": "str"}, "text": {"key": "text", "type": "str"}, "image": {"key": "image", "type": "ThumbnailUrl"}, "media": {"key": "media", "type": "[MediaUrl]"}, "buttons": {"key": "buttons", "type": "[CardAction]"}, "shareable": {"key": "shareable", "type": "bool"}, "autoloop": {"key": "autoloop", "type": "bool"}, "autostart": {"key": "autostart", "type": "bool"}, "aspect": {"key": "aspect", "type": "str"}, "duration": {"key": "duration", "type": "str"}, "value": {"key": "value", "type": "object"}, } def __init__( self, *, title: str = None, subtitle: str = None, text: str = None, image=None, media=None, buttons=None, shareable: bool = None, autoloop: bool = None, autostart: bool = None, aspect: str = None, duration: str = None, value=None, **kwargs ) -> None: super(AnimationCard, self).__init__(**kwargs) self.title = title self.subtitle = subtitle self.text = text self.image = image self.media = media self.buttons = buttons self.shareable = shareable self.autoloop = autoloop self.autostart = autostart self.aspect = aspect self.duration = duration self.value = value class Attachment(Model): """An attachment within an activity. :param content_type: mimetype/Contenttype for the file :type content_type: str :param content_url: Content Url :type content_url: str :param content: Embedded content :type content: object :param name: (OPTIONAL) The name of the attachment :type name: str :param thumbnail_url: (OPTIONAL) Thumbnail associated with attachment :type thumbnail_url: str """ _attribute_map = { "content_type": {"key": "contentType", "type": "str"}, "content_url": {"key": "contentUrl", "type": "str"}, "content": {"key": "content", "type": "object"}, "name": {"key": "name", "type": "str"}, "thumbnail_url": {"key": "thumbnailUrl", "type": "str"}, } def __init__( self, *, content_type: str = None, content_url: str = None, content=None, name: str = None, thumbnail_url: str = None, **kwargs ) -> None: super(Attachment, self).__init__(**kwargs) self.content_type = content_type self.content_url = content_url self.content = content self.name = name self.thumbnail_url = thumbnail_url class AttachmentData(Model): """Attachment data. :param type: Content-Type of the attachment :type type: str :param name: Name of the attachment :type name: str :param original_base64: Attachment content :type original_base64: bytearray :param thumbnail_base64: Attachment thumbnail :type thumbnail_base64: bytearray """ _attribute_map = { "type": {"key": "type", "type": "str"}, "name": {"key": "name", "type": "str"}, "original_base64": {"key": "originalBase64", "type": "bytearray"}, "thumbnail_base64": {"key": "thumbnailBase64", "type": "bytearray"}, } def __init__( self, *, type: str = None, name: str = None, original_base64: bytearray = None, thumbnail_base64: bytearray = None, **kwargs ) -> None: super(AttachmentData, self).__init__(**kwargs) self.type = type self.name = name self.original_base64 = original_base64 self.thumbnail_base64 = thumbnail_base64 class AttachmentInfo(Model): """Metadata for an attachment. :param name: Name of the attachment :type name: str :param type: ContentType of the attachment :type type: str :param views: attachment views :type views: list[~botframework.connector.models.AttachmentView] """ _attribute_map = { "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "views": {"key": "views", "type": "[AttachmentView]"}, } def __init__( self, *, name: str = None, type: str = None, views=None, **kwargs ) -> None: super(AttachmentInfo, self).__init__(**kwargs) self.name = name self.type = type self.views = views class AttachmentView(Model): """Attachment View name and size. :param view_id: Id of the attachment :type view_id: str :param size: Size of the attachment :type size: int """ _attribute_map = { "view_id": {"key": "viewId", "type": "str"}, "size": {"key": "size", "type": "int"}, } def __init__(self, *, view_id: str = None, size: int = None, **kwargs) -> None: super(AttachmentView, self).__init__(**kwargs) self.view_id = view_id self.size = size class AudioCard(Model): """Audio card. :param title: Title of this card :type title: str :param subtitle: Subtitle of this card :type subtitle: str :param text: Text of this card :type text: str :param image: Thumbnail placeholder :type image: ~botframework.connector.models.ThumbnailUrl :param media: Media URLs for this card. When this field contains more than one URL, each URL is an alternative format of the same content. :type media: list[~botframework.connector.models.MediaUrl] :param buttons: Actions on this card :type buttons: list[~botframework.connector.models.CardAction] :param shareable: This content may be shared with others (default:true) :type shareable: bool :param autoloop: Should the client loop playback at end of content (default:true) :type autoloop: bool :param autostart: Should the client automatically start playback of media in this card (default:true) :type autostart: bool :param aspect: Aspect ratio of thumbnail/media placeholder. Allowed values are "16:9" and "4:3" :type aspect: str :param duration: Describes the length of the media content without requiring a receiver to open the content. Formatted as an ISO 8601 Duration field. :type duration: str :param value: Supplementary parameter for this card :type value: object """ _attribute_map = { "title": {"key": "title", "type": "str"}, "subtitle": {"key": "subtitle", "type": "str"}, "text": {"key": "text", "type": "str"}, "image": {"key": "image", "type": "ThumbnailUrl"}, "media": {"key": "media", "type": "[MediaUrl]"}, "buttons": {"key": "buttons", "type": "[CardAction]"}, "shareable": {"key": "shareable", "type": "bool"}, "autoloop": {"key": "autoloop", "type": "bool"}, "autostart": {"key": "autostart", "type": "bool"}, "aspect": {"key": "aspect", "type": "str"}, "duration": {"key": "duration", "type": "str"}, "value": {"key": "value", "type": "object"}, } def __init__( self, *, title: str = None, subtitle: str = None, text: str = None, image=None, media=None, buttons=None, shareable: bool = None, autoloop: bool = None, autostart: bool = None, aspect: str = None, duration: str = None, value=None, **kwargs ) -> None: super(AudioCard, self).__init__(**kwargs) self.title = title self.subtitle = subtitle self.text = text self.image = image self.media = media self.buttons = buttons self.shareable = shareable self.autoloop = autoloop self.autostart = autostart self.aspect = aspect self.duration = duration self.value = value class BasicCard(Model): """A basic card. :param title: Title of the card :type title: str :param subtitle: Subtitle of the card :type subtitle: str :param text: Text for the card :type text: str :param images: Array of images for the card :type images: list[~botframework.connector.models.CardImage] :param buttons: Set of actions applicable to the current card :type buttons: list[~botframework.connector.models.CardAction] :param tap: This action will be activated when user taps on the card itself :type tap: ~botframework.connector.models.CardAction """ _attribute_map = { "title": {"key": "title", "type": "str"}, "subtitle": {"key": "subtitle", "type": "str"}, "text": {"key": "text", "type": "str"}, "images": {"key": "images", "type": "[CardImage]"}, "buttons": {"key": "buttons", "type": "[CardAction]"}, "tap": {"key": "tap", "type": "CardAction"}, } def __init__( self, *, title: str = None, subtitle: str = None, text: str = None, images=None, buttons=None, tap=None, **kwargs ) -> None: super(BasicCard, self).__init__(**kwargs) self.title = title self.subtitle = subtitle self.text = text self.images = images self.buttons = buttons self.tap = tap class CardAction(Model): """A clickable action. :param type: The type of action implemented by this button. Possible values include: 'openUrl', 'imBack', 'postBack', 'playAudio', 'playVideo', 'showImage', 'downloadFile', 'signin', 'call', 'messageBack' :type type: str or ~botframework.connector.models.ActionTypes :param title: Text description which appears on the button :type title: str :param image: Image URL which will appear on the button, next to text label :type image: str :param text: Text for this action :type text: str :param display_text: (Optional) text to display in the chat feed if the button is clicked :type display_text: str :param value: Supplementary parameter for action. Content of this property depends on the ActionType :type value: object :param channel_data: Channel-specific data associated with this action :type channel_data: object :param image_alt_text: Alternate image text to be used in place of the `image` field :type image_alt_text: str """ _attribute_map = { "type": {"key": "type", "type": "str"}, "title": {"key": "title", "type": "str"}, "image": {"key": "image", "type": "str"}, "text": {"key": "text", "type": "str"}, "display_text": {"key": "displayText", "type": "str"}, "value": {"key": "value", "type": "object"}, "channel_data": {"key": "channelData", "type": "object"}, "image_alt_text": {"key": "imageAltText", "type": "str"}, } def __init__( self, *, type=None, title: str = None, image: str = None, text: str = None, display_text: str = None, value=None, channel_data=None, image_alt_text: str = None, **kwargs ) -> None: super(CardAction, self).__init__(**kwargs) self.type = type self.title = title self.image = image self.text = text self.display_text = display_text self.value = value self.channel_data = channel_data self.image_alt_text = image_alt_text class CardImage(Model): """An image on a card. :param url: URL thumbnail image for major content property :type url: str :param alt: Image description intended for screen readers :type alt: str :param tap: Action assigned to specific Attachment :type tap: ~botframework.connector.models.CardAction """ _attribute_map = { "url": {"key": "url", "type": "str"}, "alt": {"key": "alt", "type": "str"}, "tap": {"key": "tap", "type": "CardAction"}, } def __init__(self, *, url: str = None, alt: str = None, tap=None, **kwargs) -> None: super(CardImage, self).__init__(**kwargs) self.url = url self.alt = alt self.tap = tap class ChannelAccount(Model): """Channel account information needed to route a message. :param id: Channel id for the user or bot on this channel (Example: [email protected], or @joesmith or 123456) :type id: str :param name: Display friendly name :type name: str :param aad_object_id: This account's object ID within Azure Active Directory (AAD) :type aad_object_id: str :param role: Role of the entity behind the account (Example: User, Bot, etc.). Possible values include: 'user', 'bot' :type role: str or ~botframework.connector.models.RoleTypes """ _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "aad_object_id": {"key": "aadObjectId", "type": "str"}, "role": {"key": "role", "type": "str"}, "properties": {"key": "properties", "type": "object"}, } def __init__( self, *, id: str = None, name: str = None, aad_object_id: str = None, role=None, properties=None, **kwargs ) -> None: super(ChannelAccount, self).__init__(**kwargs) self.id = id self.name = name self.aad_object_id = aad_object_id self.role = role self.properties = properties class ConversationAccount(Model): """Conversation account represents the identity of the conversation within a channel. :param is_group: Indicates whether the conversation contains more than two participants at the time the activity was generated :type is_group: bool :param conversation_type: Indicates the type of the conversation in channels that distinguish between conversation types :type conversation_type: str :param id: Channel id for the user or bot on this channel (Example: [email protected], or @joesmith or 123456) :type id: str :param name: Display friendly name :type name: str :param aad_object_id: This account's object ID within Azure Active Directory (AAD) :type aad_object_id: str :param role: Role of the entity behind the account (Example: User, Bot, Skill etc.). Possible values include: 'user', 'bot', 'skill' :type role: str or ~botframework.connector.models.RoleTypes :param tenant_id: This conversation's tenant ID :type tenant_id: str :param properties: This conversation's properties :type properties: object """ _attribute_map = { "is_group": {"key": "isGroup", "type": "bool"}, "conversation_type": {"key": "conversationType", "type": "str"}, "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "aad_object_id": {"key": "aadObjectId", "type": "str"}, "role": {"key": "role", "type": "str"}, "tenant_id": {"key": "tenantID", "type": "str"}, "properties": {"key": "properties", "type": "object"}, } def __init__( self, *, is_group: bool = None, conversation_type: str = None, id: str = None, name: str = None, aad_object_id: str = None, role=None, tenant_id=None, properties=None, **kwargs ) -> None: super(ConversationAccount, self).__init__(**kwargs) self.is_group = is_group self.conversation_type = conversation_type self.id = id self.name = name self.aad_object_id = aad_object_id self.role = role self.tenant_id = tenant_id self.properties = properties class ConversationMembers(Model): """Conversation and its members. :param id: Conversation ID :type id: str :param members: List of members in this conversation :type members: list[~botframework.connector.models.ChannelAccount] """ _attribute_map = { "id": {"key": "id", "type": "str"}, "members": {"key": "members", "type": "[ChannelAccount]"}, } def __init__(self, *, id: str = None, members=None, **kwargs) -> None: super(ConversationMembers, self).__init__(**kwargs) self.id = id self.members = members class ConversationParameters(Model): """Parameters for creating a new conversation. :param is_group: IsGroup :type is_group: bool :param bot: The bot address for this conversation :type bot: ~botframework.connector.models.ChannelAccount :param members: Members to add to the conversation :type members: list[~botframework.connector.models.ChannelAccount] :param topic_name: (Optional) Topic of the conversation (if supported by the channel) :type topic_name: str :param activity: (Optional) When creating a new conversation, use this activity as the initial message to the conversation :type activity: ~botframework.connector.models.Activity :param channel_data: Channel specific payload for creating the conversation :type channel_data: object :param tenant_id: (Optional) The tenant ID in which the conversation should be created :type tenant_id: str """ _attribute_map = { "is_group": {"key": "isGroup", "type": "bool"}, "bot": {"key": "bot", "type": "ChannelAccount"}, "members": {"key": "members", "type": "[ChannelAccount]"}, "topic_name": {"key": "topicName", "type": "str"}, "activity": {"key": "activity", "type": "Activity"}, "channel_data": {"key": "channelData", "type": "object"}, "tenant_id": {"key": "tenantID", "type": "str"}, } def __init__( self, *, is_group: bool = None, bot=None, members=None, topic_name: str = None, activity=None, channel_data=None, tenant_id=None, **kwargs ) -> None: super(ConversationParameters, self).__init__(**kwargs) self.is_group = is_group self.bot = bot self.members = members self.topic_name = topic_name self.activity = activity self.channel_data = channel_data self.tenant_id = tenant_id class ConversationResourceResponse(Model): """A response containing a resource. :param activity_id: ID of the Activity (if sent) :type activity_id: str :param service_url: Service endpoint where operations concerning the conversation may be performed :type service_url: str :param id: Id of the resource :type id: str """ _attribute_map = { "activity_id": {"key": "activityId", "type": "str"}, "service_url": {"key": "serviceUrl", "type": "str"}, "id": {"key": "id", "type": "str"}, } def __init__( self, *, activity_id: str = None, service_url: str = None, id: str = None, **kwargs ) -> None: super(ConversationResourceResponse, self).__init__(**kwargs) self.activity_id = activity_id self.service_url = service_url self.id = id class ConversationsResult(Model): """Conversations result. :param continuation_token: Paging token :type continuation_token: str :param conversations: List of conversations :type conversations: list[~botframework.connector.models.ConversationMembers] """ _attribute_map = { "continuation_token": {"key": "continuationToken", "type": "str"}, "conversations": {"key": "conversations", "type": "[ConversationMembers]"}, } def __init__( self, *, continuation_token: str = None, conversations=None, **kwargs ) -> None: super(ConversationsResult, self).__init__(**kwargs) self.continuation_token = continuation_token self.conversations = conversations class ExpectedReplies(Model): """ExpectedReplies. :param activities: A collection of Activities that conforms to the ExpectedReplies schema. :type activities: list[~botframework.connector.models.Activity] """ _attribute_map = {"activities": {"key": "activities", "type": "[Activity]"}} def __init__(self, *, activities=None, **kwargs) -> None: super(ExpectedReplies, self).__init__(**kwargs) self.activities = activities class Entity(Model): """Metadata object pertaining to an activity. :param type: Type of this entity (RFC 3987 IRI) :type type: str """ _attribute_map = {"type": {"key": "type", "type": "str"}} def __init__(self, *, type: str = None, **kwargs) -> None: super(Entity, self).__init__(**kwargs) self.type = type class Error(Model): """Object representing error information. :param code: Error code :type code: str :param message: Error message :type message: str :param inner_http_error: Error from inner http call :type inner_http_error: ~botframework.connector.models.InnerHttpError """ _attribute_map = { "code": {"key": "code", "type": "str"}, "message": {"key": "message", "type": "str"}, "inner_http_error": {"key": "innerHttpError", "type": "InnerHttpError"}, } def __init__( self, *, code: str = None, message: str = None, inner_http_error=None, **kwargs ) -> None: super(Error, self).__init__(**kwargs) self.code = code self.message = message self.inner_http_error = inner_http_error class ErrorResponse(Model): """An HTTP API response. :param error: Error message :type error: ~botframework.connector.models.Error """ _attribute_map = {"error": {"key": "error", "type": "Error"}} def __init__(self, *, error=None, **kwargs) -> None: super(ErrorResponse, self).__init__(**kwargs) self.error = error class ErrorResponseException(HttpOperationError): """Server responsed with exception of type: 'ErrorResponse'. :param deserialize: A deserializer :param response: Server response to be deserialized. """ def __init__(self, deserialize, response, *args): super(ErrorResponseException, self).__init__( deserialize, response, "ErrorResponse", *args ) class Fact(Model): """Set of key-value pairs. Advantage of this section is that key and value properties will be rendered with default style information with some delimiter between them. So there is no need for developer to specify style information. :param key: The key for this Fact :type key: str :param value: The value for this Fact :type value: str """ _attribute_map = { "key": {"key": "key", "type": "str"}, "value": {"key": "value", "type": "str"}, } def __init__(self, *, key: str = None, value: str = None, **kwargs) -> None: super(Fact, self).__init__(**kwargs) self.key = key self.value = value class GeoCoordinates(Model): """GeoCoordinates (entity type: "https://schema.org/GeoCoordinates"). :param elevation: Elevation of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) :type elevation: float :param latitude: Latitude of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) :type latitude: float :param longitude: Longitude of the location [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) :type longitude: float :param type: The type of the thing :type type: str :param name: The name of the thing :type name: str """ _attribute_map = { "elevation": {"key": "elevation", "type": "float"}, "latitude": {"key": "latitude", "type": "float"}, "longitude": {"key": "longitude", "type": "float"}, "type": {"key": "type", "type": "str"}, "name": {"key": "name", "type": "str"}, } def __init__( self, *, elevation: float = None, latitude: float = None, longitude: float = None, type: str = None, name: str = None, **kwargs ) -> None: super(GeoCoordinates, self).__init__(**kwargs) self.elevation = elevation self.latitude = latitude self.longitude = longitude self.type = type self.name = name class HeroCard(Model): """A Hero card (card with a single, large image). :param title: Title of the card :type title: str :param subtitle: Subtitle of the card :type subtitle: str :param text: Text for the card :type text: str :param images: Array of images for the card :type images: list[~botframework.connector.models.CardImage] :param buttons: Set of actions applicable to the current card :type buttons: list[~botframework.connector.models.CardAction] :param tap: This action will be activated when user taps on the card itself :type tap: ~botframework.connector.models.CardAction """ _attribute_map = { "title": {"key": "title", "type": "str"}, "subtitle": {"key": "subtitle", "type": "str"}, "text": {"key": "text", "type": "str"}, "images": {"key": "images", "type": "[CardImage]"}, "buttons": {"key": "buttons", "type": "[CardAction]"}, "tap": {"key": "tap", "type": "CardAction"}, } def __init__( self, *, title: str = None, subtitle: str = None, text: str = None, images=None, buttons=None, tap=None, **kwargs ) -> None: super(HeroCard, self).__init__(**kwargs) self.title = title self.subtitle = subtitle self.text = text self.images = images self.buttons = buttons self.tap = tap class InnerHttpError(Model): """Object representing inner http error. :param status_code: HttpStatusCode from failed request :type status_code: int :param body: Body from failed request :type body: object """ _attribute_map = { "status_code": {"key": "statusCode", "type": "int"}, "body": {"key": "body", "type": "object"}, } def __init__(self, *, status_code: int = None, body=None, **kwargs) -> None: super(InnerHttpError, self).__init__(**kwargs) self.status_code = status_code self.body = body class InvokeResponse(Model): """ Tuple class containing an HTTP Status Code and a JSON serializable object. The HTTP Status code is, in the invoke activity scenario, what will be set in the resulting POST. The Body of the resulting POST will be JSON serialized content. The body content is defined by the producer. The caller must know what the content is and deserialize as needed. """ _attribute_map = { "status": {"key": "status", "type": "int"}, "body": {"key": "body", "type": "object"}, } def __init__(self, *, status: int = None, body: object = None, **kwargs): """ Gets or sets the HTTP status and/or body code for the response :param status: The HTTP status code. :param body: The JSON serializable body content for the response. This object must be serializable by the core Python json routines. The caller is responsible for serializing more complex/nested objects into native classes (lists and dictionaries of strings are acceptable). """ super().__init__(**kwargs) self.status = status self.body = body def is_successful_status_code(self) -> bool: """ Gets a value indicating whether the invoke response was successful. :return: A value that indicates if the HTTP response was successful. true if status is in the Successful range (200-299); otherwise false. """ return 200 <= self.status <= 299 class MediaCard(Model): """Media card. :param title: Title of this card :type title: str :param subtitle: Subtitle of this card :type subtitle: str :param text: Text of this card :type text: str :param image: Thumbnail placeholder :type image: ~botframework.connector.models.ThumbnailUrl :param media: Media URLs for this card. When this field contains more than one URL, each URL is an alternative format of the same content. :type media: list[~botframework.connector.models.MediaUrl] :param buttons: Actions on this card :type buttons: list[~botframework.connector.models.CardAction] :param shareable: This content may be shared with others (default:true) :type shareable: bool :param autoloop: Should the client loop playback at end of content (default:true) :type autoloop: bool :param autostart: Should the client automatically start playback of media in this card (default:true) :type autostart: bool :param aspect: Aspect ratio of thumbnail/media placeholder. Allowed values are "16:9" and "4:3" :type aspect: str :param duration: Describes the length of the media content without requiring a receiver to open the content. Formatted as an ISO 8601 Duration field. :type duration: str :param value: Supplementary parameter for this card :type value: object """ _attribute_map = { "title": {"key": "title", "type": "str"}, "subtitle": {"key": "subtitle", "type": "str"}, "text": {"key": "text", "type": "str"}, "image": {"key": "image", "type": "ThumbnailUrl"}, "media": {"key": "media", "type": "[MediaUrl]"}, "buttons": {"key": "buttons", "type": "[CardAction]"}, "shareable": {"key": "shareable", "type": "bool"}, "autoloop": {"key": "autoloop", "type": "bool"}, "autostart": {"key": "autostart", "type": "bool"}, "aspect": {"key": "aspect", "type": "str"}, "duration": {"key": "duration", "type": "str"}, "value": {"key": "value", "type": "object"}, } def __init__( self, *, title: str = None, subtitle: str = None, text: str = None, image=None, media=None, buttons=None, shareable: bool = None, autoloop: bool = None, autostart: bool = None, aspect: str = None, duration: str = None, value=None, **kwargs ) -> None: super(MediaCard, self).__init__(**kwargs) self.title = title self.subtitle = subtitle self.text = text self.image = image self.media = media self.buttons = buttons self.shareable = shareable self.autoloop = autoloop self.autostart = autostart self.aspect = aspect self.duration = duration self.value = value class MediaEventValue(Model): """Supplementary parameter for media events. :param card_value: Callback parameter specified in the Value field of the MediaCard that originated this event :type card_value: object """ _attribute_map = {"card_value": {"key": "cardValue", "type": "object"}} def __init__(self, *, card_value=None, **kwargs) -> None: super(MediaEventValue, self).__init__(**kwargs) self.card_value = card_value class MediaUrl(Model): """Media URL. :param url: Url for the media :type url: str :param profile: Optional profile hint to the client to differentiate multiple MediaUrl objects from each other :type profile: str """ _attribute_map = { "url": {"key": "url", "type": "str"}, "profile": {"key": "profile", "type": "str"}, } def __init__(self, *, url: str = None, profile: str = None, **kwargs) -> None: super(MediaUrl, self).__init__(**kwargs) self.url = url self.profile = profile class MessageReaction(Model): """Message reaction object. :param type: Message reaction type. Possible values include: 'like', 'plusOne' :type type: str or ~botframework.connector.models.MessageReactionTypes """ _attribute_map = {"type": {"key": "type", "type": "str"}} def __init__(self, *, type=None, **kwargs) -> None: super(MessageReaction, self).__init__(**kwargs) self.type = type class OAuthCard(Model): """A card representing a request to perform a sign in via OAuth. :param text: Text for signin request :type text: str :param connection_name: The name of the registered connection :type connection_name: str :param buttons: Action to use to perform signin :type buttons: list[~botframework.connector.models.CardAction] """ _attribute_map = { "text": {"key": "text", "type": "str"}, "connection_name": {"key": "connectionName", "type": "str"}, "buttons": {"key": "buttons", "type": "[CardAction]"}, "token_exchange_resource": {"key": "tokenExchangeResource", "type": "object"}, } def __init__( self, *, text: str = None, connection_name: str = None, buttons=None, token_exchange_resource=None, **kwargs ) -> None: super(OAuthCard, self).__init__(**kwargs) self.text = text self.connection_name = connection_name self.buttons = buttons self.token_exchange_resource = token_exchange_resource class PagedMembersResult(Model): """Page of members. :param continuation_token: Paging token :type continuation_token: str :param members: The Channel Accounts. :type members: list[~botframework.connector.models.ChannelAccount] """ _attribute_map = { "continuation_token": {"key": "continuationToken", "type": "str"}, "members": {"key": "members", "type": "[ChannelAccount]"}, } def __init__( self, *, continuation_token: str = None, members=None, **kwargs ) -> None: super(PagedMembersResult, self).__init__(**kwargs) self.continuation_token = continuation_token self.members = members class Place(Model): """Place (entity type: "https://schema.org/Place"). :param address: Address of the place (may be `string` or complex object of type `PostalAddress`) :type address: object :param geo: Geo coordinates of the place (may be complex object of type `GeoCoordinates` or `GeoShape`) :type geo: object :param has_map: Map to the place (may be `string` (URL) or complex object of type `Map`) :type has_map: object :param type: The type of the thing :type type: str :param name: The name of the thing :type name: str """ _attribute_map = { "address": {"key": "address", "type": "object"}, "geo": {"key": "geo", "type": "object"}, "has_map": {"key": "hasMap", "type": "object"}, "type": {"key": "type", "type": "str"}, "name": {"key": "name", "type": "str"}, } def __init__( self, *, address=None, geo=None, has_map=None, type: str = None, name: str = None, **kwargs ) -> None: super(Place, self).__init__(**kwargs) self.address = address self.geo = geo self.has_map = has_map self.type = type self.name = name class ReceiptCard(Model): """A receipt card. :param title: Title of the card :type title: str :param facts: Array of Fact objects :type facts: list[~botframework.connector.models.Fact] :param items: Array of Receipt Items :type items: list[~botframework.connector.models.ReceiptItem] :param tap: This action will be activated when user taps on the card :type tap: ~botframework.connector.models.CardAction :param total: Total amount of money paid (or to be paid) :type total: str :param tax: Total amount of tax paid (or to be paid) :type tax: str :param vat: Total amount of VAT paid (or to be paid) :type vat: str :param buttons: Set of actions applicable to the current card :type buttons: list[~botframework.connector.models.CardAction] """ _attribute_map = { "title": {"key": "title", "type": "str"}, "facts": {"key": "facts", "type": "[Fact]"}, "items": {"key": "items", "type": "[ReceiptItem]"}, "tap": {"key": "tap", "type": "CardAction"}, "total": {"key": "total", "type": "str"}, "tax": {"key": "tax", "type": "str"}, "vat": {"key": "vat", "type": "str"}, "buttons": {"key": "buttons", "type": "[CardAction]"}, } def __init__( self, *, title: str = None, facts=None, items=None, tap=None, total: str = None, tax: str = None, vat: str = None, buttons=None, **kwargs ) -> None: super(ReceiptCard, self).__init__(**kwargs) self.title = title self.facts = facts self.items = items self.tap = tap self.total = total self.tax = tax self.vat = vat self.buttons = buttons class ReceiptItem(Model): """An item on a receipt card. :param title: Title of the Card :type title: str :param subtitle: Subtitle appears just below Title field, differs from Title in font styling only :type subtitle: str :param text: Text field appears just below subtitle, differs from Subtitle in font styling only :type text: str :param image: Image :type image: ~botframework.connector.models.CardImage :param price: Amount with currency :type price: str :param quantity: Number of items of given kind :type quantity: str :param tap: This action will be activated when user taps on the Item bubble. :type tap: ~botframework.connector.models.CardAction """ _attribute_map = { "title": {"key": "title", "type": "str"}, "subtitle": {"key": "subtitle", "type": "str"}, "text": {"key": "text", "type": "str"}, "image": {"key": "image", "type": "CardImage"}, "price": {"key": "price", "type": "str"}, "quantity": {"key": "quantity", "type": "str"}, "tap": {"key": "tap", "type": "CardAction"}, } def __init__( self, *, title: str = None, subtitle: str = None, text: str = None, image=None, price: str = None, quantity: str = None, tap=None, **kwargs ) -> None: super(ReceiptItem, self).__init__(**kwargs) self.title = title self.subtitle = subtitle self.text = text self.image = image self.price = price self.quantity = quantity self.tap = tap class SemanticAction(Model): """Represents a reference to a programmatic action. :param id: ID of this action :type id: str :param entities: Entities associated with this action :type entities: dict[str, ~botframework.connector.models.Entity] :param state: State of this action. Allowed values: `start`, `continue`, `done` :type state: str or ~botframework.connector.models.SemanticActionStates """ _attribute_map = { "id": {"key": "id", "type": "str"}, "entities": {"key": "entities", "type": "{Entity}"}, "state": {"key": "state", "type": "str"}, } def __init__(self, *, id: str = None, entities=None, state=None, **kwargs) -> None: super(SemanticAction, self).__init__(**kwargs) self.id = id self.entities = entities self.state = state class SigninCard(Model): """A card representing a request to sign in. :param text: Text for signin request :type text: str :param buttons: Action to use to perform signin :type buttons: list[~botframework.connector.models.CardAction] """ _attribute_map = { "text": {"key": "text", "type": "str"}, "buttons": {"key": "buttons", "type": "[CardAction]"}, } def __init__(self, *, text: str = None, buttons=None, **kwargs) -> None: super(SigninCard, self).__init__(**kwargs) self.text = text self.buttons = buttons class SuggestedActions(Model): """SuggestedActions that can be performed. :param to: Ids of the recipients that the actions should be shown to. These Ids are relative to the channelId and a subset of all recipients of the activity :type to: list[str] :param actions: Actions that can be shown to the user :type actions: list[~botframework.connector.models.CardAction] """ _attribute_map = { "to": {"key": "to", "type": "[str]"}, "actions": {"key": "actions", "type": "[CardAction]"}, } def __init__(self, *, to=None, actions=None, **kwargs) -> None: super(SuggestedActions, self).__init__(**kwargs) self.to = to self.actions = actions class TextHighlight(Model): """Refers to a substring of content within another field. :param text: Defines the snippet of text to highlight :type text: str :param occurrence: Occurrence of the text field within the referenced text, if multiple exist. :type occurrence: int """ _attribute_map = { "text": {"key": "text", "type": "str"}, "occurrence": {"key": "occurrence", "type": "int"}, } def __init__(self, *, text: str = None, occurrence: int = None, **kwargs) -> None: super(TextHighlight, self).__init__(**kwargs) self.text = text self.occurrence = occurrence class Thing(Model): """Thing (entity type: "https://schema.org/Thing"). :param type: The type of the thing :type type: str :param name: The name of the thing :type name: str """ _attribute_map = { "type": {"key": "type", "type": "str"}, "name": {"key": "name", "type": "str"}, } def __init__(self, *, type: str = None, name: str = None, **kwargs) -> None: super(Thing, self).__init__(**kwargs) self.type = type self.name = name class ThumbnailCard(Model): """A thumbnail card (card with a single, small thumbnail image). :param title: Title of the card :type title: str :param subtitle: Subtitle of the card :type subtitle: str :param text: Text for the card :type text: str :param images: Array of images for the card :type images: list[~botframework.connector.models.CardImage] :param buttons: Set of actions applicable to the current card :type buttons: list[~botframework.connector.models.CardAction] :param tap: This action will be activated when user taps on the card itself :type tap: ~botframework.connector.models.CardAction """ _attribute_map = { "title": {"key": "title", "type": "str"}, "subtitle": {"key": "subtitle", "type": "str"}, "text": {"key": "text", "type": "str"}, "images": {"key": "images", "type": "[CardImage]"}, "buttons": {"key": "buttons", "type": "[CardAction]"}, "tap": {"key": "tap", "type": "CardAction"}, } def __init__( self, *, title: str = None, subtitle: str = None, text: str = None, images=None, buttons=None, tap=None, **kwargs ) -> None: super(ThumbnailCard, self).__init__(**kwargs) self.title = title self.subtitle = subtitle self.text = text self.images = images self.buttons = buttons self.tap = tap class ThumbnailUrl(Model): """Thumbnail URL. :param url: URL pointing to the thumbnail to use for media content :type url: str :param alt: HTML alt text to include on this thumbnail image :type alt: str """ _attribute_map = { "url": {"key": "url", "type": "str"}, "alt": {"key": "alt", "type": "str"}, } def __init__(self, *, url: str = None, alt: str = None, **kwargs) -> None: super(ThumbnailUrl, self).__init__(**kwargs) self.url = url self.alt = alt class TokenExchangeInvokeRequest(Model): """TokenExchangeInvokeRequest. :param id: The id from the OAuthCard. :type id: str :param connection_name: The connection name. :type connection_name: str :param token: The user token that can be exchanged. :type token: str :param properties: Extension data for overflow of properties. :type properties: dict[str, object] """ _attribute_map = { "id": {"key": "id", "type": "str"}, "connection_name": {"key": "connectionName", "type": "str"}, "token": {"key": "token", "type": "str"}, "properties": {"key": "properties", "type": "{object}"}, } def __init__( self, *, id: str = None, connection_name: str = None, token: str = None, properties=None, **kwargs ) -> None: super(TokenExchangeInvokeRequest, self).__init__(**kwargs) self.id = id self.connection_name = connection_name self.token = token self.properties = properties class TokenExchangeInvokeResponse(Model): """TokenExchangeInvokeResponse. :param id: The id from the OAuthCard. :type id: str :param connection_name: The connection name. :type connection_name: str :param failure_detail: The details of why the token exchange failed. :type failure_detail: str :param properties: Extension data for overflow of properties. :type properties: dict[str, object] """ _attribute_map = { "id": {"key": "id", "type": "str"}, "connection_name": {"key": "connectionName", "type": "str"}, "failure_detail": {"key": "failureDetail", "type": "str"}, "properties": {"key": "properties", "type": "{object}"}, } def __init__( self, *, id: str = None, connection_name: str = None, failure_detail: str = None, properties=None, **kwargs ) -> None: super(TokenExchangeInvokeResponse, self).__init__(**kwargs) self.id = id self.connection_name = connection_name self.failure_detail = failure_detail self.properties = properties class TokenExchangeState(Model): """TokenExchangeState :param connection_name: The connection name that was used. :type connection_name: str :param conversation: Gets or sets a reference to the conversation. :type conversation: ~botframework.connector.models.ConversationReference :param relates_to: Gets or sets a reference to a related parent conversation for this token exchange. :type relates_to: ~botframework.connector.models.ConversationReference :param bot_ur: The URL of the bot messaging endpoint. :type bot_ur: str :param ms_app_id: The bot's registered application ID. :type ms_app_id: str """ _attribute_map = { "connection_name": {"key": "connectionName", "type": "str"}, "conversation": {"key": "conversation", "type": "ConversationReference"}, "relates_to": {"key": "relatesTo", "type": "ConversationReference"}, "bot_url": {"key": "connectionName", "type": "str"}, "ms_app_id": {"key": "msAppId", "type": "str"}, } def __init__( self, *, connection_name: str = None, conversation=None, relates_to=None, bot_url: str = None, ms_app_id: str = None, **kwargs ) -> None: super(TokenExchangeState, self).__init__(**kwargs) self.connection_name = connection_name self.conversation = conversation self.relates_to = relates_to self.bot_url = bot_url self.ms_app_id = ms_app_id class TokenRequest(Model): """A request to receive a user token. :param provider: The provider to request a user token from :type provider: str :param settings: A collection of settings for the specific provider for this request :type settings: dict[str, object] """ _attribute_map = { "provider": {"key": "provider", "type": "str"}, "settings": {"key": "settings", "type": "{object}"}, } def __init__(self, *, provider: str = None, settings=None, **kwargs) -> None: super(TokenRequest, self).__init__(**kwargs) self.provider = provider self.settings = settings class TokenResponse(Model): """A response that includes a user token. :param connection_name: The connection name :type connection_name: str :param token: The user token :type token: str :param expiration: Expiration for the token, in ISO 8601 format (e.g. "2007-04-05T14:30Z") :type expiration: str :param channel_id: The channelId of the TokenResponse :type channel_id: str """ _attribute_map = { "connection_name": {"key": "connectionName", "type": "str"}, "token": {"key": "token", "type": "str"}, "expiration": {"key": "expiration", "type": "str"}, "channel_id": {"key": "channelId", "type": "str"}, } def __init__( self, *, connection_name: str = None, token: str = None, expiration: str = None, channel_id: str = None, **kwargs ) -> None: super(TokenResponse, self).__init__(**kwargs) self.connection_name = connection_name self.token = token self.expiration = expiration self.channel_id = channel_id class Transcript(Model): """Transcript. :param activities: A collection of Activities that conforms to the Transcript schema. :type activities: list[~botframework.connector.models.Activity] """ _attribute_map = {"activities": {"key": "activities", "type": "[Activity]"}} def __init__(self, *, activities=None, **kwargs) -> None: super(Transcript, self).__init__(**kwargs) self.activities = activities class VideoCard(Model): """Video card. :param title: Title of this card :type title: str :param subtitle: Subtitle of this card :type subtitle: str :param text: Text of this card :type text: str :param image: Thumbnail placeholder :type image: ~botframework.connector.models.ThumbnailUrl :param media: Media URLs for this card. When this field contains more than one URL, each URL is an alternative format of the same content. :type media: list[~botframework.connector.models.MediaUrl] :param buttons: Actions on this card :type buttons: list[~botframework.connector.models.CardAction] :param shareable: This content may be shared with others (default:true) :type shareable: bool :param autoloop: Should the client loop playback at end of content (default:true) :type autoloop: bool :param autostart: Should the client automatically start playback of media in this card (default:true) :type autostart: bool :param aspect: Aspect ratio of thumbnail/media placeholder. Allowed values are "16:9" and "4:3" :type aspect: str :param duration: Describes the length of the media content without requiring a receiver to open the content. Formatted as an ISO 8601 Duration field. :type duration: str :param value: Supplementary parameter for this card :type value: object """ _attribute_map = { "title": {"key": "title", "type": "str"}, "subtitle": {"key": "subtitle", "type": "str"}, "text": {"key": "text", "type": "str"}, "image": {"key": "image", "type": "ThumbnailUrl"}, "media": {"key": "media", "type": "[MediaUrl]"}, "buttons": {"key": "buttons", "type": "[CardAction]"}, "shareable": {"key": "shareable", "type": "bool"}, "autoloop": {"key": "autoloop", "type": "bool"}, "autostart": {"key": "autostart", "type": "bool"}, "aspect": {"key": "aspect", "type": "str"}, "duration": {"key": "duration", "type": "str"}, "value": {"key": "value", "type": "object"}, } def __init__( self, *, title: str = None, subtitle: str = None, text: str = None, image=None, media=None, buttons=None, shareable: bool = None, autoloop: bool = None, autostart: bool = None, aspect: str = None, duration: str = None, value=None, **kwargs ) -> None: super(VideoCard, self).__init__(**kwargs) self.title = title self.subtitle = subtitle self.text = text self.image = image self.media = media self.buttons = buttons self.shareable = shareable self.autoloop = autoloop self.autostart = autostart self.aspect = aspect self.duration = duration self.value = value class AdaptiveCardInvokeAction(Model): """AdaptiveCardInvokeAction. Defines the structure that arrives in the Activity.Value.Action for Invoke activity with name of 'adaptiveCard/action'. :param type: The Type of this Adaptive Card Invoke Action. :type type: str :param id: The Id of this Adaptive Card Invoke Action. :type id: str :param verb: The Verb of this Adaptive Card Invoke Action. :type verb: str :param data: The data of this Adaptive Card Invoke Action. :type data: dict[str, object] """ _attribute_map = { "type": {"key": "type", "type": "str"}, "id": {"key": "id", "type": "str"}, "verb": {"key": "verb", "type": "str"}, "data": {"key": "data", "type": "{object}"}, } def __init__( self, *, type: str = None, id: str = None, verb: str = None, data=None, **kwargs ) -> None: super(AdaptiveCardInvokeAction, self).__init__(**kwargs) self.type = type self.id = id self.verb = verb self.data = data class AdaptiveCardInvokeResponse(Model): """AdaptiveCardInvokeResponse. Defines the structure that is returned as the result of an Invoke activity with Name of 'adaptiveCard/action'. :param status_code: The Card Action Response StatusCode. :type status_code: int :param type: The type of this Card Action Response. :type type: str :param value: The JSON response object. :type value: dict[str, object] """ _attribute_map = { "status_code": {"key": "statusCode", "type": "int"}, "type": {"key": "type", "type": "str"}, "value": {"key": "value", "type": "{object}"}, } def __init__( self, *, status_code: int = None, type: str = None, value=None, **kwargs ) -> None: super(AdaptiveCardInvokeResponse, self).__init__(**kwargs) self.status_code = status_code self.type = type self.value = value class AdaptiveCardInvokeValue(Model): """AdaptiveCardInvokeResponse. Defines the structure that arrives in the Activity.Value for Invoke activity with Name of 'adaptiveCard/action'. :param action: The action of this adaptive card invoke action value. :type action: :class:`botframework.schema.models.AdaptiveCardInvokeAction` :param authentication: The TokenExchangeInvokeRequest for this adaptive card invoke action value. :type authentication: :class:`botframework.schema.models.TokenExchangeInvokeRequest` :param state: The 'state' or magic code for an OAuth flow. :type state: str """ _attribute_map = { "action": {"key": "action", "type": "{object}"}, "authentication": {"key": "authentication", "type": "{object}"}, "state": {"key": "state", "type": "str"}, } def __init__( self, *, action=None, authentication=None, state: str = None, **kwargs ) -> None: super(AdaptiveCardInvokeValue, self).__init__(**kwargs) self.action = action self.authentication = authentication self.state = state
botbuilder-python/libraries/botbuilder-schema/botbuilder/schema/_models_py3.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-schema/botbuilder/schema/_models_py3.py", "repo_id": "botbuilder-python", "token_count": 35278 }
417
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import json import logging import time import uuid from datetime import datetime from typing import Awaitable, Callable, List from botbuilder.core import Middleware, TurnContext from botbuilder.schema import Activity, ActivityTypes, ResourceResponse class DialogTestLogger(Middleware): """ A middleware to output incoming and outgoing activities as json strings to the console during unit tests. """ def __init__( self, log_func: Callable[..., None] = None, json_indent: int = 4, time_func: Callable[[], float] = None, ): """ Initialize a new instance of the dialog test logger. :param log_func: A callable method or object that can log a message, default to `logging.getLogger(__name__).info`. :type log_func: Callable[..., None] :param json_indent: An indent for json output, default indent is 4. :type json_indent: int :param time_func: A time function to record time spans, default to `time.monotonic`. :type time_func: Callable[[], float] """ self._log = logging.getLogger(__name__).info if log_func is None else log_func self._stopwatch_state_key = f"stopwatch.{uuid.uuid4()}" self._json_indent = json_indent self._time_func = time.monotonic if time_func is None else time_func async def on_turn( self, context: TurnContext, logic: Callable[[TurnContext], Awaitable] ): context.turn_state[self._stopwatch_state_key] = self._time_func() await self._log_incoming_activity(context, context.activity) context.on_send_activities(self._send_activities_handler) await logic() async def _log_incoming_activity( self, context: TurnContext, activity: Activity ) -> None: self._log("") if context.activity.type == ActivityTypes.message: self._log("User: Text = %s", context.activity.text) else: self._log_activity_as_json(actor="User", activity=activity) timestamp = self._get_timestamp() self._log("-> ts: %s", timestamp) async def _send_activities_handler( self, context: TurnContext, activities: List[Activity], next_send: Callable[[], Awaitable[None]], ) -> List[ResourceResponse]: for activity in activities: await self._log_outgoing_activity(context, activity) responses = await next_send() return responses async def _log_outgoing_activity( self, context: TurnContext, activity: Activity ) -> None: self._log("") start_time = context.turn_state[self._stopwatch_state_key] if activity.type == ActivityTypes.message: message = ( f"Bot: Text = {activity.text}\r\n" f" Speak = {activity.speak}\r\n" f" InputHint = {activity.input_hint}" ) self._log(message) else: self._log_activity_as_json(actor="Bot", activity=activity) now = self._time_func() mms = int(round((now - start_time) * 1000)) timestamp = self._get_timestamp() self._log("-> ts: %s elapsed %d ms", timestamp, mms) def _log_activity_as_json(self, actor: str, activity: Activity) -> None: activity_dict = activity.serialize() activity_json = json.dumps(activity_dict, indent=self._json_indent) message = f"{actor}: Activity = {activity.type}\r\n" f"{activity_json}" self._log(message) @staticmethod def _get_timestamp() -> str: timestamp = datetime.now().strftime("%H:%M:%S") return timestamp
botbuilder-python/libraries/botbuilder-testing/botbuilder/testing/dialog_test_logger.py/0
{ "file_path": "botbuilder-python/libraries/botbuilder-testing/botbuilder/testing/dialog_test_logger.py", "repo_id": "botbuilder-python", "token_count": 1543 }
418
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from msrest.pipeline import ClientRawResponse from msrest.exceptions import HttpOperationError from ... import models class ConversationsOperations: """ConversationsOperations async operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the request. Constant value: "v3". """ models = models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client self._serialize = serializer self._deserialize = deserializer self.config = config self.api_version = "v3" async def get_conversations( self, continuation_token=None, *, custom_headers=None, raw=False, **operation_config ): """GetConversations. List the Conversations in which this bot has participated. GET from this method with a skip token The return value is a ConversationsResult, which contains an array of ConversationMembers and a skip token. If the skip token is not empty, then there are further values to be returned. Call this method again with the returned token to get more values. Each ConversationMembers object contains the ID of the conversation and an array of ChannelAccounts that describe the members of the conversation. :param continuation_token: skip or continuation token :type continuation_token: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides<msrest:optionsforoperations>`. :return: ConversationsResult or ClientRawResponse if raw=true :rtype: ~botframework.connector.models.ConversationsResult or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>` """ # Construct URL url = self.get_conversations.metadata["url"] # Construct parameters query_parameters = {} if continuation_token is not None: query_parameters["continuationToken"] = self._serialize.query( "continuation_token", continuation_token, "str" ) # Construct headers header_parameters = {} header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) response = await self._client.async_send( request, stream=False, **operation_config ) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize("ConversationsResult", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized get_conversations.metadata = {"url": "/v3/conversations"} async def create_conversation( self, parameters, *, custom_headers=None, raw=False, **operation_config ): """CreateConversation. Create a new Conversation. POST to this method with a * Bot being the bot creating the conversation * IsGroup set to true if this is not a direct message (default is false) * Array containing the members to include in the conversation The return value is a ResourceResponse which contains a conversation id which is suitable for use in the message payload and REST API uris. Most channels only support the semantics of bots initiating a direct message conversation. An example of how to do that would be: ``` var resource = await connector.conversations.CreateConversation(new ConversationParameters(){ Bot = bot, members = new ChannelAccount[] { new ChannelAccount("user1") } ); await connect.Conversations.SendToConversationAsync(resource.Id, new Activity() ... ) ; ```. :param parameters: Parameters to create the conversation from :type parameters: ~botframework.connector.models.ConversationParameters :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides<msrest:optionsforoperations>`. :return: ConversationResourceResponse or ClientRawResponse if raw=true :rtype: ~botframework.connector.models.ConversationResourceResponse or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>` """ # Construct URL url = self.create_conversation.metadata["url"] # Construct parameters query_parameters = {} # Construct headers header_parameters = {} header_parameters["Accept"] = "application/json" header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body body_content = self._serialize.body(parameters, "ConversationParameters") # Construct and send request request = self._client.post( url, query_parameters, header_parameters, body_content ) response = await self._client.async_send( request, stream=False, **operation_config ) if response.status_code not in [200, 201, 202]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize("ConversationResourceResponse", response) if response.status_code == 201: deserialized = self._deserialize("ConversationResourceResponse", response) if response.status_code == 202: deserialized = self._deserialize("ConversationResourceResponse", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized create_conversation.metadata = {"url": "/v3/conversations"} async def send_to_conversation( self, conversation_id, activity, *, custom_headers=None, raw=False, **operation_config ): """SendToConversation. This method allows you to send an activity to the end of a conversation. This is slightly different from ReplyToActivity(). * SendToConversation(conversationId) - will append the activity to the end of the conversation according to the timestamp or semantics of the channel. * ReplyToActivity(conversationId,ActivityId) - adds the activity as a reply to another activity, if the channel supports it. If the channel does not support nested replies, ReplyToActivity falls back to SendToConversation. Use ReplyToActivity when replying to a specific activity in the conversation. Use SendToConversation in all other cases. :param conversation_id: Conversation ID :type conversation_id: str :param activity: Activity to send :type activity: ~botframework.connector.models.Activity :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides<msrest:optionsforoperations>`. :return: ResourceResponse or ClientRawResponse if raw=true :rtype: ~botframework.connector.models.ResourceResponse or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>` """ # Construct URL url = self.send_to_conversation.metadata["url"] path_format_arguments = { "conversationId": self._serialize.url( "conversation_id", conversation_id, "str" ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # Construct headers header_parameters = {} header_parameters["Accept"] = "application/json" header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body body_content = self._serialize.body(activity, "Activity") # Construct and send request request = self._client.post( url, query_parameters, header_parameters, body_content ) response = await self._client.async_send( request, stream=False, **operation_config ) if response.status_code not in [200, 201, 202]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize("ResourceResponse", response) if response.status_code == 201: deserialized = self._deserialize("ResourceResponse", response) if response.status_code == 202: deserialized = self._deserialize("ResourceResponse", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized send_to_conversation.metadata = { "url": "/v3/conversations/{conversationId}/activities" } async def send_conversation_history( self, conversation_id, activities=None, *, custom_headers=None, raw=False, **operation_config ): """SendConversationHistory. This method allows you to upload the historic activities to the conversation. Sender must ensure that the historic activities have unique ids and appropriate timestamps. The ids are used by the client to deal with duplicate activities and the timestamps are used by the client to render the activities in the right order. :param conversation_id: Conversation ID :type conversation_id: str :param activities: A collection of Activities that conforms to the Transcript schema. :type activities: list[~botframework.connector.models.Activity] :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides<msrest:optionsforoperations>`. :return: ResourceResponse or ClientRawResponse if raw=true :rtype: ~botframework.connector.models.ResourceResponse or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>` """ history = models.Transcript(activities=activities) # Construct URL url = self.send_conversation_history.metadata["url"] path_format_arguments = { "conversationId": self._serialize.url( "conversation_id", conversation_id, "str" ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # Construct headers header_parameters = {} header_parameters["Accept"] = "application/json" header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body body_content = self._serialize.body(history, "Transcript") # Construct and send request request = self._client.post( url, query_parameters, header_parameters, body_content ) response = await self._client.async_send( request, stream=False, **operation_config ) if response.status_code not in [200, 201, 202]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize("ResourceResponse", response) if response.status_code == 201: deserialized = self._deserialize("ResourceResponse", response) if response.status_code == 202: deserialized = self._deserialize("ResourceResponse", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized send_conversation_history.metadata = { "url": "/v3/conversations/{conversationId}/activities/history" } async def update_activity( self, conversation_id, activity_id, activity, *, custom_headers=None, raw=False, **operation_config ): """UpdateActivity. Edit an existing activity. Some channels allow you to edit an existing activity to reflect the new state of a bot conversation. For example, you can remove buttons after someone has clicked "Approve" button. :param conversation_id: Conversation ID :type conversation_id: str :param activity_id: activityId to update :type activity_id: str :param activity: replacement Activity :type activity: ~botframework.connector.models.Activity :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides<msrest:optionsforoperations>`. :return: ResourceResponse or ClientRawResponse if raw=true :rtype: ~botframework.connector.models.ResourceResponse or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>` """ # Construct URL url = self.update_activity.metadata["url"] path_format_arguments = { "conversationId": self._serialize.url( "conversation_id", conversation_id, "str" ), "activityId": self._serialize.url("activity_id", activity_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # Construct headers header_parameters = {} header_parameters["Accept"] = "application/json" header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body body_content = self._serialize.body(activity, "Activity") # Construct and send request request = self._client.put( url, query_parameters, header_parameters, body_content ) response = await self._client.async_send( request, stream=False, **operation_config ) if response.status_code not in [200, 201, 202]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize("ResourceResponse", response) if response.status_code == 201: deserialized = self._deserialize("ResourceResponse", response) if response.status_code == 202: deserialized = self._deserialize("ResourceResponse", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized update_activity.metadata = { "url": "/v3/conversations/{conversationId}/activities/{activityId}" } async def reply_to_activity( self, conversation_id, activity_id, activity, *, custom_headers=None, raw=False, **operation_config ): """ReplyToActivity. This method allows you to reply to an activity. This is slightly different from SendToConversation(). * SendToConversation(conversationId) - will append the activity to the end of the conversation according to the timestamp or semantics of the channel. * ReplyToActivity(conversationId,ActivityId) - adds the activity as a reply to another activity, if the channel supports it. If the channel does not support nested replies, ReplyToActivity falls back to SendToConversation. Use ReplyToActivity when replying to a specific activity in the conversation. Use SendToConversation in all other cases. :param conversation_id: Conversation ID :type conversation_id: str :param activity_id: activityId the reply is to (OPTIONAL) :type activity_id: str :param activity: Activity to send :type activity: ~botframework.connector.models.Activity :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides<msrest:optionsforoperations>`. :return: ResourceResponse or ClientRawResponse if raw=true :rtype: ~botframework.connector.models.ResourceResponse or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>` """ # Construct URL url = self.reply_to_activity.metadata["url"] path_format_arguments = { "conversationId": self._serialize.url( "conversation_id", conversation_id, "str" ), "activityId": self._serialize.url("activity_id", activity_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # Construct headers header_parameters = {} header_parameters["Accept"] = "application/json" header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body body_content = self._serialize.body(activity, "Activity") # Construct and send request request = self._client.post( url, query_parameters, header_parameters, body_content ) response = await self._client.async_send( request, stream=False, **operation_config ) if response.status_code not in [200, 201, 202]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize("ResourceResponse", response) if response.status_code == 201: deserialized = self._deserialize("ResourceResponse", response) if response.status_code == 202: deserialized = self._deserialize("ResourceResponse", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized reply_to_activity.metadata = { "url": "/v3/conversations/{conversationId}/activities/{activityId}" } async def delete_activity( self, conversation_id, activity_id, *, custom_headers=None, raw=False, **operation_config ): """DeleteActivity. Delete an existing activity. Some channels allow you to delete an existing activity, and if successful this method will remove the specified activity. :param conversation_id: Conversation ID :type conversation_id: str :param activity_id: activityId to delete :type activity_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides<msrest:optionsforoperations>`. :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>` """ # Construct URL url = self.delete_activity.metadata["url"] path_format_arguments = { "conversationId": self._serialize.url( "conversation_id", conversation_id, "str" ), "activityId": self._serialize.url("activity_id", activity_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # Construct headers header_parameters = {} if custom_headers: header_parameters.update(custom_headers) # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) response = await self._client.async_send( request, stream=False, **operation_config ) if response.status_code not in [200, 202]: raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response delete_activity.metadata = { "url": "/v3/conversations/{conversationId}/activities/{activityId}" } async def get_conversation_members( self, conversation_id, *, custom_headers=None, raw=False, **operation_config ): """GetConversationMembers. Enumerate the members of a conversation. This REST API takes a ConversationId and returns an array of ChannelAccount objects representing the members of the conversation. :param conversation_id: Conversation ID :type conversation_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides<msrest:optionsforoperations>`. :return: list or ClientRawResponse if raw=true :rtype: list[~botframework.connector.models.ChannelAccount] or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>` """ # Construct URL url = self.get_conversation_members.metadata["url"] path_format_arguments = { "conversationId": self._serialize.url( "conversation_id", conversation_id, "str" ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # Construct headers header_parameters = {} header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) response = await self._client.async_send( request, stream=False, **operation_config ) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize("[ChannelAccount]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized get_conversation_members.metadata = { "url": "/v3/conversations/{conversationId}/members" } async def get_conversation_member( self, conversation_id, member_id, custom_headers=None, raw=False, **operation_config ): """GetConversationMember. Get a member of a conversation. This REST API takes a ConversationId and memberId and returns a ChannelAccount object representing the member of the conversation. :param conversation_id: Conversation Id :type conversation_id: str :param member_id: Member Id :type member_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides<msrest:optionsforoperations>`. :return: list or ClientRawResponse if raw=true :rtype: list[~botframework.connector.models.ChannelAccount] or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>` """ # Construct URL url = self.get_conversation_member.metadata["url"] path_format_arguments = { "conversationId": self._serialize.url( "conversation_id", conversation_id, "str" ), "memberId": self._serialize.url("member_id", member_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # Construct headers header_parameters = {} header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) response = await self._client.async_send( request, stream=False, **operation_config ) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize("ChannelAccount", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized get_conversation_member.metadata = { "url": "/v3/conversations/{conversationId}/members/{memberId}" } async def get_conversation_paged_members( self, conversation_id, page_size=None, continuation_token=None, *, custom_headers=None, raw=False, **operation_config ): """GetConversationPagedMembers. Enumerate the members of a conversation one page at a time. This REST API takes a ConversationId. Optionally a pageSize and/or continuationToken can be provided. It returns a PagedMembersResult, which contains an array of ChannelAccounts representing the members of the conversation and a continuation token that can be used to get more values. One page of ChannelAccounts records are returned with each call. The number of records in a page may vary between channels and calls. The pageSize parameter can be used as a suggestion. If there are no additional results the response will not contain a continuation token. If there are no members in the conversation the Members will be empty or not present in the response. A response to a request that has a continuation token from a prior request may rarely return members from a previous request. :param conversation_id: Conversation ID :type conversation_id: str :param page_size: Suggested page size :type page_size: int :param continuation_token: Continuation Token :type continuation_token: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides<msrest:optionsforoperations>`. :return: PagedMembersResult or ClientRawResponse if raw=true :rtype: ~botframework.connector.models.PagedMembersResult or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError<msrest.exceptions.HttpOperationError>` """ # Construct URL url = self.get_conversation_paged_members.metadata["url"] path_format_arguments = { "conversationId": self._serialize.url( "conversation_id", conversation_id, "str" ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} if page_size is not None: query_parameters["pageSize"] = self._serialize.query( "page_size", page_size, "int" ) if continuation_token is not None: query_parameters["continuationToken"] = self._serialize.query( "continuation_token", continuation_token, "str" ) # Construct headers header_parameters = {} header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) response = await self._client.async_send( request, stream=False, **operation_config ) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize("PagedMembersResult", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized get_conversation_paged_members.metadata = { "url": "/v3/conversations/{conversationId}/pagedmembers" } async def get_teams_conversation_paged_members( self, conversation_id, page_size=None, continuation_token=None, custom_headers=None, raw=False, **operation_config ): """GetTeamsConversationPagedMembers. Enumerate the members of a Teams conversation one page at a time. This REST API takes a ConversationId. Optionally a pageSize and/or continuationToken can be provided. It returns a PagedMembersResult, which contains an array of ChannelAccounts representing the members of the conversation and a continuation token that can be used to get more values. One page of ChannelAccounts records are returned with each call. The number of records in a page may vary between channels and calls. The pageSize parameter can be used as a suggestion. If there are no additional results the response will not contain a continuation token. If there are no members in the conversation the Members will be empty or not present in the response. A response to a request that has a continuation token from a prior request may rarely return members from a previous request. :param conversation_id: Conversation ID :type conversation_id: str :param page_size: Suggested page size :type page_size: int :param continuation_token: Continuation Token :type continuation_token: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides<msrest:optionsforoperations>`. :return: PagedMembersResult or ClientRawResponse if raw=true :rtype: ~botframework.connector.models.PagedMembersResult or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError<msrest.exceptions.HttpOperationError>` """ # Construct URL url = self.get_conversation_paged_members.metadata["url"] path_format_arguments = { "conversationId": self._serialize.url( "conversation_id", conversation_id, "str" ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} if page_size is not None: query_parameters["pageSize"] = self._serialize.query( "page_size", page_size, "int" ) if continuation_token is not None: query_parameters["continuationToken"] = self._serialize.query( "continuation_token", continuation_token, "str" ) # Construct headers header_parameters = {} header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) response = await self._client.async_send( request, stream=False, **operation_config ) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize("TeamsPagedMembersResult", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized get_conversation_paged_members.metadata = { "url": "/v3/conversations/{conversationId}/pagedmembers" } async def delete_conversation_member( self, conversation_id, member_id, *, custom_headers=None, raw=False, **operation_config ): """DeleteConversationMember. Deletes a member from a conversation. This REST API takes a ConversationId and a memberId (of type string) and removes that member from the conversation. If that member was the last member of the conversation, the conversation will also be deleted. :param conversation_id: Conversation ID :type conversation_id: str :param member_id: ID of the member to delete from this conversation :type member_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides<msrest:optionsforoperations>`. :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>` """ # Construct URL url = self.delete_conversation_member.metadata["url"] path_format_arguments = { "conversationId": self._serialize.url( "conversation_id", conversation_id, "str" ), "memberId": self._serialize.url("member_id", member_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # Construct headers header_parameters = {} if custom_headers: header_parameters.update(custom_headers) # Construct and send request request = self._client.delete(url, query_parameters, header_parameters) response = await self._client.async_send( request, stream=False, **operation_config ) if response.status_code not in [200, 204]: raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response delete_conversation_member.metadata = { "url": "/v3/conversations/{conversationId}/members/{memberId}" } async def get_activity_members( self, conversation_id, activity_id, *, custom_headers=None, raw=False, **operation_config ): """GetActivityMembers. Enumerate the members of an activity. This REST API takes a ConversationId and a ActivityId, returning an array of ChannelAccount objects representing the members of the particular activity in the conversation. :param conversation_id: Conversation ID :type conversation_id: str :param activity_id: Activity ID :type activity_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides<msrest:optionsforoperations>`. :return: list or ClientRawResponse if raw=true :rtype: list[~botframework.connector.models.ChannelAccount] or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>` """ # Construct URL url = self.get_activity_members.metadata["url"] path_format_arguments = { "conversationId": self._serialize.url( "conversation_id", conversation_id, "str" ), "activityId": self._serialize.url("activity_id", activity_id, "str"), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # Construct headers header_parameters = {} header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) response = await self._client.async_send( request, stream=False, **operation_config ) if response.status_code not in [200]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize("[ChannelAccount]", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized get_activity_members.metadata = { "url": "/v3/conversations/{conversationId}/activities/{activityId}/members" } async def upload_attachment( self, conversation_id, attachment_upload, *, custom_headers=None, raw=False, **operation_config ): """UploadAttachment. Upload an attachment directly into a channel's blob storage. This is useful because it allows you to store data in a compliant store when dealing with enterprises. The response is a ResourceResponse which contains an AttachmentId which is suitable for using with the attachments API. :param conversation_id: Conversation ID :type conversation_id: str :param attachment_upload: Attachment data :type attachment_upload: ~botframework.connector.models.AttachmentData :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides<msrest:optionsforoperations>`. :return: ResourceResponse or ClientRawResponse if raw=true :rtype: ~botframework.connector.models.ResourceResponse or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorResponseException<botframework.connector.models.ErrorResponseException>` """ # Construct URL url = self.upload_attachment.metadata["url"] path_format_arguments = { "conversationId": self._serialize.url( "conversation_id", conversation_id, "str" ) } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # Construct headers header_parameters = {} header_parameters["Accept"] = "application/json" header_parameters["Content-Type"] = "application/json; charset=utf-8" if custom_headers: header_parameters.update(custom_headers) # Construct body body_content = self._serialize.body(attachment_upload, "AttachmentData") # Construct and send request request = self._client.post( url, query_parameters, header_parameters, body_content ) response = await self._client.async_send( request, stream=False, **operation_config ) if response.status_code not in [200, 201, 202]: raise models.ErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize("ResourceResponse", response) if response.status_code == 201: deserialized = self._deserialize("ResourceResponse", response) if response.status_code == 202: deserialized = self._deserialize("ResourceResponse", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized upload_attachment.metadata = { "url": "/v3/conversations/{conversationId}/attachments" }
botbuilder-python/libraries/botframework-connector/botframework/connector/aio/operations_async/_conversations_operations_async.py/0
{ "file_path": "botbuilder-python/libraries/botframework-connector/botframework/connector/aio/operations_async/_conversations_operations_async.py", "repo_id": "botbuilder-python", "token_count": 17286 }
419
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from abc import ABC, abstractmethod from botbuilder.schema import Activity, CallerIdConstants from botframework.connector.skills import BotFrameworkClient from .authenticate_request_result import AuthenticateRequestResult from .claims_identity import ClaimsIdentity from .connector_factory import ConnectorFactory from .jwt_token_validation import JwtTokenValidation from .user_token_client import UserTokenClient from .service_client_credentials_factory import ServiceClientCredentialsFactory from .skill_validation import SkillValidation class BotFrameworkAuthentication(ABC): @abstractmethod async def authenticate_request( self, activity: Activity, auth_header: str ) -> AuthenticateRequestResult: """ Validate Bot Framework Protocol requests. :param activity: The inbound Activity. :param auth_header: The HTTP auth header. :return: An AuthenticateRequestResult. """ raise NotImplementedError() @abstractmethod async def authenticate_streaming_request( self, auth_header: str, channel_id_header: str ) -> AuthenticateRequestResult: """ Validate Bot Framework Protocol requests. :param auth_header: The HTTP auth header. :param channel_id_header: The channel ID HTTP header. :return: An AuthenticateRequestResult. """ raise NotImplementedError() @abstractmethod def create_connector_factory( self, claims_identity: ClaimsIdentity ) -> ConnectorFactory: """ Creates a ConnectorFactory that can be used to create ConnectorClients that can use credentials from this particular Cloud Environment. :param claims_identity: The inbound Activity's ClaimsIdentity. :return: A ConnectorFactory. """ raise NotImplementedError() @abstractmethod async def create_user_token_client( self, claims_identity: ClaimsIdentity ) -> UserTokenClient: """ Creates the appropriate UserTokenClient instance. :param claims_identity: The inbound Activity's ClaimsIdentity. :return: An UserTokenClient. """ raise NotImplementedError() def create_bot_framework_client(self) -> BotFrameworkClient: """ Creates a BotFrameworkClient for calling Skills. :return: A BotFrameworkClient. """ raise Exception("NotImplemented") def get_originating_audience(self) -> str: """ Gets the originating audience from Bot OAuth scope. :return: The originating audience. """ raise Exception("NotImplemented") async def authenticate_channel_request(self, auth_header: str) -> ClaimsIdentity: """ Authenticate Bot Framework Protocol request to Skills. :param auth_header: The HTTP auth header in the skill request. :return: A ClaimsIdentity. """ raise Exception("NotImplemented") async def generate_caller_id( self, *, credential_factory: ServiceClientCredentialsFactory, claims_identity: ClaimsIdentity, caller_id: str, ) -> str: """ Generates the appropriate caller_id to write onto the Activity, this might be None. :param credential_factory A ServiceClientCredentialsFactory to use. :param claims_identity The inbound claims. :param caller_id The default caller_id to use if this is not a skill. :return: The caller_id, this might be None. """ # Is the bot accepting all incoming messages? if await credential_factory.is_authentication_disabled(): # Return None so that the caller_id is cleared. return None # Is the activity from another bot? return ( f"{CallerIdConstants.bot_to_bot_prefix}{JwtTokenValidation.get_app_id_from_claims(claims_identity.claims)}" if SkillValidation.is_skill_claim(claims_identity.claims) else caller_id )
botbuilder-python/libraries/botframework-connector/botframework/connector/auth/bot_framework_authentication.py/0
{ "file_path": "botbuilder-python/libraries/botframework-connector/botframework/connector/auth/bot_framework_authentication.py", "repo_id": "botbuilder-python", "token_count": 1522 }
420
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from .microsoft_app_credentials import MicrosoftAppCredentials from .government_constants import GovernmentConstants class MicrosoftGovernmentAppCredentials(MicrosoftAppCredentials): """ MicrosoftGovernmentAppCredentials auth implementation. """ def __init__( self, app_id: str, app_password: str, channel_auth_tenant: str = None, scope: str = None, ): super().__init__( app_id, app_password, channel_auth_tenant, scope, ) @staticmethod def empty(): return MicrosoftGovernmentAppCredentials("", "") def _get_default_channelauth_tenant(self) -> str: return GovernmentConstants.DEFAULT_CHANNEL_AUTH_TENANT def _get_to_channel_from_bot_loginurl_prefix(self) -> str: return GovernmentConstants.TO_CHANNEL_FROM_BOT_LOGIN_URL_PREFIX def _get_to_channel_from_bot_oauthscope(self) -> str: return GovernmentConstants.TO_CHANNEL_FROM_BOT_OAUTH_SCOPE
botbuilder-python/libraries/botframework-connector/botframework/connector/auth/microsoft_government_app_credentials.py/0
{ "file_path": "botbuilder-python/libraries/botframework-connector/botframework/connector/auth/microsoft_government_app_credentials.py", "repo_id": "botbuilder-python", "token_count": 455 }
421
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from msrest.pipeline import ClientRawResponse from msrest.exceptions import HttpOperationError from ... import models class BotSignInOperations: """BotSignInOperations async operations. You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. :ivar api_version: The API version to use for the request. Constant value: "token". """ models = models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client self._serialize = serializer self._deserialize = deserializer self.config = config self.api_version = "token" async def get_sign_in_url( self, state, code_challenge=None, emulator_url=None, final_redirect=None, *, custom_headers=None, raw=False, **operation_config ): """ :param state: :type state: str :param code_challenge: :type code_challenge: str :param emulator_url: :type emulator_url: str :param final_redirect: :type final_redirect: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides<msrest:optionsforoperations>`. :return: str or ClientRawResponse if raw=true :rtype: str or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError<msrest.exceptions.HttpOperationError>` """ # Construct URL url = self.get_sign_in_url.metadata["url"] # Construct parameters query_parameters = {} query_parameters["state"] = self._serialize.query("state", state, "str") if code_challenge is not None: query_parameters["code_challenge"] = self._serialize.query( "code_challenge", code_challenge, "str" ) if emulator_url is not None: query_parameters["emulatorUrl"] = self._serialize.query( "emulator_url", emulator_url, "str" ) if final_redirect is not None: query_parameters["finalRedirect"] = self._serialize.query( "final_redirect", final_redirect, "str" ) query_parameters["api-version"] = self._serialize.query( "self.api_version", self.api_version, "str" ) # Construct headers header_parameters = {} header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) response = await self._client.async_send( request, stream=False, **operation_config ) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize("str", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized get_sign_in_url.metadata = {"url": "/api/botsignin/GetSignInUrl"} async def get_sign_in_resource( self, state, code_challenge=None, emulator_url=None, final_redirect=None, *, custom_headers=None, raw=False, **operation_config ): """ :param state: :type state: str :param code_challenge: :type code_challenge: str :param emulator_url: :type emulator_url: str :param final_redirect: :type final_redirect: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides<msrest:optionsforoperations>`. :return: SignInUrlResponse or ClientRawResponse if raw=true :rtype: ~botframework.tokenapi.models.SignInUrlResponse or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError<msrest.exceptions.HttpOperationError>` """ # Construct URL url = self.get_sign_in_resource.metadata["url"] # Construct parameters query_parameters = {} query_parameters["state"] = self._serialize.query("state", state, "str") if code_challenge is not None: query_parameters["code_challenge"] = self._serialize.query( "code_challenge", code_challenge, "str" ) if emulator_url is not None: query_parameters["emulatorUrl"] = self._serialize.query( "emulator_url", emulator_url, "str" ) if final_redirect is not None: query_parameters["finalRedirect"] = self._serialize.query( "final_redirect", final_redirect, "str" ) # Construct headers header_parameters = {} header_parameters["Accept"] = "application/json" if custom_headers: header_parameters.update(custom_headers) # Construct and send request request = self._client.get(url, query_parameters, header_parameters) response = await self._client.async_send( request, stream=False, **operation_config ) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) deserialized = None if response.status_code == 200: deserialized = self._deserialize("SignInUrlResponse", response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized get_sign_in_resource.metadata = {"url": "/api/botsignin/GetSignInResource"}
botbuilder-python/libraries/botframework-connector/botframework/connector/token_api/aio/operations_async/_bot_sign_in_operations_async.py/0
{ "file_path": "botbuilder-python/libraries/botframework-connector/botframework/connector/token_api/aio/operations_async/_bot_sign_in_operations_async.py", "repo_id": "botbuilder-python", "token_count": 2772 }
422
interactions: - request: body: '{"recipient": {"id": "U19KH8EHJ:T03CWQ0QB"}, "from": {"id": "B21UTEF8S:T03CWQ0QB"}, "type": "message", "text": "Thread activity", "channelId": "slack"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['151'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.3 (Linux-4.11.0-041100-generic-x86_64-with-Ubuntu-17.04-zesty) requests/2.18.1 msrest/0.4.23 azure-botframework-connector/v3.0] method: POST uri: https://slack.botframework.com/v3/conversations/B21UTEF8S%3AT03CWQ0QB%3AD2369CT7C/activities response: body: {string: "{\r\n \"id\": \"1514312453.000142\"\r\n}"} headers: cache-control: [no-cache] content-length: ['33'] content-type: [application/json; charset=utf-8] date: ['Tue, 26 Dec 2017 18:20:54 GMT'] expires: ['-1'] pragma: [no-cache] request-context: ['appId=cid-v1:6814484e-c0d5-40ea-9dba-74ff29ca4f62'] server: [Microsoft-IIS/10.0] strict-transport-security: [max-age=31536000] vary: [Accept-Encoding] x-powered-by: [ASP.NET] status: {code: 200, message: OK} - request: body: '{"recipient": {"id": "U19KH8EHJ:T03CWQ0QB"}, "from": {"id": "B21UTEF8S:T03CWQ0QB"}, "type": "message", "text": "Child activity.", "channelId": "slack"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['151'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.5.3 (Linux-4.11.0-041100-generic-x86_64-with-Ubuntu-17.04-zesty) requests/2.18.1 msrest/0.4.23 azure-botframework-connector/v3.0] method: POST uri: https://slack.botframework.com/v3/conversations/B21UTEF8S%3AT03CWQ0QB%3AD2369CT7C/activities/1514312453.000142 response: body: {string: "{\r\n \"id\": \"1514312455.000028\"\r\n}"} headers: cache-control: [no-cache] content-length: ['33'] content-type: [application/json; charset=utf-8] date: ['Tue, 26 Dec 2017 18:20:54 GMT'] expires: ['-1'] pragma: [no-cache] request-context: ['appId=cid-v1:6814484e-c0d5-40ea-9dba-74ff29ca4f62'] server: [Microsoft-IIS/10.0] strict-transport-security: [max-age=31536000] vary: [Accept-Encoding] x-powered-by: [ASP.NET] status: {code: 200, message: OK} version: 1
botbuilder-python/libraries/botframework-connector/tests/recordings/test_conversations_reply_to_activity.yaml/0
{ "file_path": "botbuilder-python/libraries/botframework-connector/tests/recordings/test_conversations_reply_to_activity.yaml", "repo_id": "botbuilder-python", "token_count": 1186 }
423
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from uuid import UUID from typing import List import botframework.streaming as streaming import botframework.streaming.payloads as payloads from botframework.streaming.payloads.models import Header from .assembler import Assembler class PayloadStreamAssembler(Assembler): # pylint: disable=super-init-not-called def __init__( self, stream_manager: "payloads.StreamManager", identifier: UUID, type: str = None, length: int = None, ): self._stream_manager = stream_manager or payloads.StreamManager() self._stream: "streaming.PayloadStream" = None # self._lock = Lock() self.identifier = identifier self.content_type = type self.content_length = length self.end: bool = None def create_stream_from_payload(self) -> "streaming.PayloadStream": return streaming.PayloadStream(self) def get_payload_as_stream(self) -> "streaming.PayloadStream": if self._stream is None: self._stream = self.create_stream_from_payload() return self._stream def on_receive(self, header: Header, stream: List[int], content_length: int): if header.end: self.end = True self._stream.done_producing() def close(self): self._stream_manager.close_stream(self.identifier)
botbuilder-python/libraries/botframework-streaming/botframework/streaming/payloads/assemblers/payload_stream_assembler.py/0
{ "file_path": "botbuilder-python/libraries/botframework-streaming/botframework/streaming/payloads/assemblers/payload_stream_assembler.py", "repo_id": "botbuilder-python", "token_count": 548 }
424
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from abc import ABC # TODO: debate if this class is pertinent or should use msrest infrastructure class Serializable(ABC): def to_json(self) -> str: raise NotImplementedError() def from_json(self, json_str: str): raise NotImplementedError()
botbuilder-python/libraries/botframework-streaming/botframework/streaming/payloads/models/serializable.py/0
{ "file_path": "botbuilder-python/libraries/botframework-streaming/botframework/streaming/payloads/models/serializable.py", "repo_id": "botbuilder-python", "token_count": 114 }
425
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. class TransportBase: def __init__(self): self.is_connected: bool = None def close(self): return
botbuilder-python/libraries/botframework-streaming/botframework/streaming/transport/transport_base.py/0
{ "file_path": "botbuilder-python/libraries/botframework-streaming/botframework/streaming/transport/transport_base.py", "repo_id": "botbuilder-python", "token_count": 73 }
426
from typing import List from uuid import UUID, uuid4 import aiounittest from botframework.streaming import ReceiveRequest from botframework.streaming.payloads import StreamManager from botframework.streaming.payloads.assemblers import ( ReceiveRequestAssembler, PayloadStreamAssembler, ) from botframework.streaming.payloads.models import ( Header, RequestPayload, StreamDescription, ) class MockStreamManager(StreamManager): def get_payload_assembler(self, identifier: UUID) -> PayloadStreamAssembler: return PayloadStreamAssembler(self, identifier) class TestPayloadProcessor(aiounittest.AsyncTestCase): async def test_process_request(self): # Arrange header_id: UUID = uuid4() header = Header(type="A", id=header_id, end=True) header.payload_length = 3 stream_manager = MockStreamManager() on_completed_called = False async def mock_on_completed(identifier: UUID, request: ReceiveRequest): nonlocal on_completed_called assert identifier == header_id assert request.verb == "POST" assert request.path == "/api/messages" assert len(request.streams) == 1 on_completed_called = True sut = ReceiveRequestAssembler( header, stream_manager, on_completed=mock_on_completed ) # Act stream_id: UUID = uuid4() streams: List[StreamDescription] = [ StreamDescription(id=str(stream_id), content_type="json", length=100) ] payload = RequestPayload( verb="POST", path="/api/messages", streams=streams ).to_json() payload_stream: List[int] = list(bytes(payload, "utf-8")) await sut.process_request(payload_stream) # Assert assert on_completed_called
botbuilder-python/libraries/botframework-streaming/tests/test_payload_processor.py/0
{ "file_path": "botbuilder-python/libraries/botframework-streaming/tests/test_payload_processor.py", "repo_id": "botbuilder-python", "token_count": 745 }
427
{ "swagger": "2.0", "info": { "version": "token", "title": "Microsoft Bot Token API - V3.1", "termsOfService": "https://www.microsoft.com/en-us/legal/intellectualproperty/copyright/default.aspx", "contact": { "name": "Bot Framework", "url": "https://botframework.com", "email": "[email protected]" }, "license": { "name": "The MIT License (MIT)", "url": "https://opensource.org/licenses/MIT" } }, "host": "token.botframework.com", "schemes": [ "https" ], "paths": { "/api/botsignin/GetSignInUrl": { "get": { "tags": [ "BotSignIn" ], "operationId": "BotSignIn_GetSignInUrl", "consumes": [], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "parameters": [ { "name": "state", "in": "query", "required": true, "type": "string" }, { "name": "code_challenge", "in": "query", "required": false, "type": "string" }, { "name": "emulatorUrl", "in": "query", "required": false, "type": "string" }, { "name": "finalRedirect", "in": "query", "required": false, "type": "string" } ], "responses": { "200": { "description": "The operation succeeded.", "schema": { "type": "string" } } } } }, "/api/botsignin/GetSignInResource": { "get": { "tags": [ "BotSignIn" ], "operationId": "BotSignIn_GetSignInResource", "consumes": [], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "parameters": [ { "name": "state", "in": "query", "required": true, "type": "string" }, { "name": "code_challenge", "in": "query", "required": false, "type": "string" }, { "name": "emulatorUrl", "in": "query", "required": false, "type": "string" }, { "name": "finalRedirect", "in": "query", "required": false, "type": "string" } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/SignInUrlResponse" } } } } }, "/api/usertoken/GetToken": { "get": { "tags": [ "UserToken" ], "operationId": "UserToken_GetToken", "consumes": [], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "parameters": [ { "name": "userId", "in": "query", "required": true, "type": "string" }, { "name": "connectionName", "in": "query", "required": true, "type": "string" }, { "name": "channelId", "in": "query", "required": false, "type": "string" }, { "name": "code", "in": "query", "required": false, "type": "string" } ], "responses": { "200": { "description": "A Token Response object will be returned\r\n", "schema": { "$ref": "#/definitions/TokenResponse" } }, "404": { "description": "Resource was not found\r\n", "schema": { "$ref": "#/definitions/TokenResponse" } }, "default": { "description": "The operation failed and the response is an error object describing the status code and failure.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } }, "/api/usertoken/GetAadTokens": { "post": { "tags": [ "UserToken" ], "operationId": "UserToken_GetAadTokens", "consumes": [ "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded" ], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "parameters": [ { "name": "userId", "in": "query", "required": true, "type": "string" }, { "name": "connectionName", "in": "query", "required": true, "type": "string" }, { "name": "aadResourceUrls", "in": "body", "required": true, "schema": { "$ref": "#/definitions/AadResourceUrls" } }, { "name": "channelId", "in": "query", "required": false, "type": "string" } ], "responses": { "200": { "description": "An array of key value pairs", "schema": { "type": "object", "additionalProperties": { "$ref": "#/definitions/TokenResponse" } } }, "default": { "description": "The operation failed and the response is an error object describing the status code and failure.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } }, "/api/usertoken/SignOut": { "delete": { "tags": [ "UserToken" ], "operationId": "UserToken_SignOut", "consumes": [], "produces": [], "parameters": [ { "name": "userId", "in": "query", "required": true, "type": "string" }, { "name": "connectionName", "in": "query", "required": false, "type": "string" }, { "name": "channelId", "in": "query", "required": false, "type": "string" } ], "responses": { "200": { "description": "The operation succeeded, there is no response.", "schema": { "$ref": "#/definitions/Void" } }, "204": { "description": "No Content" }, "default": { "description": "The operation failed and the response is an error object describing the status code and failure.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } }, "/api/usertoken/GetTokenStatus": { "get": { "tags": [ "UserToken" ], "operationId": "UserToken_GetTokenStatus", "consumes": [], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "parameters": [ { "name": "userId", "in": "query", "required": true, "type": "string" }, { "name": "channelId", "in": "query", "required": false, "type": "string" }, { "name": "include", "in": "query", "required": false, "type": "string" } ], "responses": { "200": { "description": "An array of TokenStatus objects", "schema": { "type": "array", "items": { "$ref": "#/definitions/TokenStatus" } } }, "default": { "description": "The operation failed and the response is an error object describing the status code and failure.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } }, "/api/usertoken/exchange": { "post": { "tags": [ "UserToken" ], "operationId": "UserToken_ExchangeAsync", "consumes": [ "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded" ], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "parameters": [ { "name": "userId", "in": "query", "required": true, "type": "string" }, { "name": "connectionName", "in": "query", "required": true, "type": "string" }, { "name": "channelId", "in": "query", "required": true, "type": "string" }, { "name": "exchangeRequest", "in": "body", "required": true, "schema": { "$ref": "#/definitions/TokenExchangeRequest" } } ], "responses": { "200": { "description": "A Token Response object will be returned\r\n", "schema": { "$ref": "#/definitions/TokenResponse" } }, "400": { "description": "", "schema": { "$ref": "#/definitions/ErrorResponse" } }, "404": { "description": "Resource was not found\r\n", "schema": { "$ref": "#/definitions/TokenResponse" } }, "default": { "description": "The operation failed and the response is an error object describing the status code and failure.", "schema": { "$ref": "#/definitions/ErrorResponse" } } } } } }, "definitions": { "SignInUrlResponse": { "type": "object", "properties": { "signInLink": { "type": "string" }, "tokenExchangeResource": { "$ref": "#/definitions/TokenExchangeResource" } } }, "TokenExchangeResource": { "type": "object", "properties": { "id": { "type": "string" }, "uri": { "type": "string" }, "providerId": { "type": "string" } } }, "TokenResponse": { "type": "object", "properties": { "channelId": { "type": "string" }, "connectionName": { "type": "string" }, "token": { "type": "string" }, "expiration": { "type": "string" } } }, "ErrorResponse": { "type": "object", "properties": { "error": { "$ref": "#/definitions/Error" } } }, "Error": { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "innerHttpError": { "$ref": "#/definitions/InnerHttpError" } } }, "InnerHttpError": { "type": "object", "properties": { "statusCode": { "format": "int32", "type": "integer" }, "body": { "type": "object" } } }, "AadResourceUrls": { "type": "object", "properties": { "resourceUrls": { "type": "array", "items": { "type": "string" } } } }, "Void": { "type": "object", "properties": {} }, "TokenStatus": { "description": "The status of a particular token", "type": "object", "properties": { "channelId": { "description": "The channelId of the token status pertains to", "type": "string" }, "connectionName": { "description": "The name of the connection the token status pertains to", "type": "string" }, "hasToken": { "description": "True if a token is stored for this ConnectionName", "type": "boolean" }, "serviceProviderDisplayName": { "description": "The display name of the service provider for which this Token belongs to", "type": "string" } } }, "TokenExchangeRequest": { "type": "object", "properties": { "uri": { "type": "string" }, "token": { "type": "string" } } } }, "securityDefinitions": { "bearer_auth": { "type": "apiKey", "description": "Access token to authenticate calls to the Bot Connector Service.", "name": "Authorization", "in": "header" } } }
botbuilder-python/swagger/TokenAPI.json/0
{ "file_path": "botbuilder-python/swagger/TokenAPI.json", "repo_id": "botbuilder-python", "token_count": 7835 }
428
from .parent_bot import ParentBot __all__ = ["ParentBot"]
botbuilder-python/tests/experimental/sso/parent/bots/__init__.py/0
{ "file_path": "botbuilder-python/tests/experimental/sso/parent/bots/__init__.py", "repo_id": "botbuilder-python", "token_count": 19 }
429
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. """Bot app with Flask routing.""" from flask import Response from .bot_app import BotApp APP = BotApp() @APP.flask.route("/api/messages", methods=["POST"]) def messages() -> Response: return APP.messages() @APP.flask.route("/api/test", methods=["GET"]) def test() -> Response: return APP.test()
botbuilder-python/tests/functional-tests/functionaltestbot/flask_bot_app/app.py/0
{ "file_path": "botbuilder-python/tests/functional-tests/functionaltestbot/flask_bot_app/app.py", "repo_id": "botbuilder-python", "token_count": 130 }
430
curl -X POST --header 'Accept: application/json' -d '{"text": "Hi!"}' http://localhost:3979
botbuilder-python/tests/functional-tests/functionaltestbot/test.sh/0
{ "file_path": "botbuilder-python/tests/functional-tests/functionaltestbot/test.sh", "repo_id": "botbuilder-python", "token_count": 32 }
431
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import sys import traceback from datetime import datetime from aiohttp import web from aiohttp.web import Request, Response from botbuilder.core import ( BotFrameworkAdapterSettings, ConversationState, MemoryStorage, UserState, TurnContext, BotFrameworkAdapter, ) from botbuilder.schema import Activity, ActivityTypes from bots import AuthBot from dialogs import MainDialog from config import DefaultConfig CONFIG = DefaultConfig() # Create adapter. # See https://aka.ms/about-bot-adapter to learn more about how bots work. SETTINGS = BotFrameworkAdapterSettings(CONFIG.APP_ID, CONFIG.APP_PASSWORD) ADAPTER = BotFrameworkAdapter(SETTINGS) STORAGE = MemoryStorage() CONVERSATION_STATE = ConversationState(STORAGE) USER_STATE = UserState(STORAGE) # Catch-all for errors. async def on_error(context: TurnContext, error: Exception): # This check writes out errors to console log .vs. app insights. # NOTE: In production environment, you should consider logging this to Azure # application insights. print(f"\n [on_turn_error] unhandled error: {error}", file=sys.stderr) traceback.print_exc() # Send a message to the user await context.send_activity("The bot encountered an error or bug.") await context.send_activity( "To continue to run this bot, please fix the bot source code." ) # Send a trace activity if we're talking to the Bot Framework Emulator if context.activity.channel_id == "emulator": # Create a trace activity that contains the error object trace_activity = Activity( label="TurnError", name="on_turn_error Trace", timestamp=datetime.utcnow(), type=ActivityTypes.trace, value=f"{error}", value_type="https://www.botframework.com/schemas/error", ) # Send a trace activity, which will be displayed in Bot Framework Emulator await context.send_activity(trace_activity) ADAPTER.on_turn_error = on_error DIALOG = MainDialog(CONFIG) # Listen for incoming requests on /api/messages async def messages(req: Request) -> Response: # Create the Bot bot = AuthBot(CONVERSATION_STATE, USER_STATE, DIALOG) # Main bot message handler. if "application/json" in req.headers["Content-Type"]: body = await req.json() else: return Response(status=415) activity = Activity().deserialize(body) auth_header = req.headers["Authorization"] if "Authorization" in req.headers else "" try: await ADAPTER.process_activity(activity, auth_header, bot.on_turn) return Response(status=201) except Exception as exception: raise exception APP = web.Application() APP.router.add_post("/api/messages", messages) if __name__ == "__main__": try: web.run_app(APP, host="localhost", port=CONFIG.PORT) except Exception as error: raise error
botbuilder-python/tests/skills/skills-prototypes/dialog-to-dialog/authentication-bot/app.py/0
{ "file_path": "botbuilder-python/tests/skills/skills-prototypes/dialog-to-dialog/authentication-bot/app.py", "repo_id": "botbuilder-python", "token_count": 1042 }
432
<?xml version='1.0' encoding='UTF-8'?> <glyph name="Aacute" format="2"> <advance width="1200"/> <unicode hex="00C1"/> <outline> <component base="A"/> <component base="acutecomb.case" xOffset="79"/> </outline> </glyph>
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/A_acute.glif/0
{ "file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/A_acute.glif", "repo_id": "cascadia-code", "token_count": 97 }
433
<?xml version='1.0' encoding='UTF-8'?> <glyph name="Agrave" format="2"> <advance width="1200"/> <unicode hex="00C0"/> <outline> <component base="A"/> <component base="gravecomb.case" xOffset="-80"/> </outline> </glyph>
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/A_grave.glif/0
{ "file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/A_grave.glif", "repo_id": "cascadia-code", "token_count": 95 }
434
<?xml version='1.0' encoding='UTF-8'?> <glyph name="Dcaron" format="2"> <advance width="1200"/> <unicode hex="010E"/> <outline> <component base="D"/> <component base="caroncomb.case" xOffset="-70"/> </outline> </glyph>
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/D_caron.glif/0
{ "file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/D_caron.glif", "repo_id": "cascadia-code", "token_count": 96 }
435
<?xml version='1.0' encoding='UTF-8'?> <glyph name="Ecircumflexdotbelow" format="2"> <advance width="1200"/> <unicode hex="1EC6"/> <outline> <component base="E"/> <component base="dotbelowcomb" xOffset="30"/> <component base="circumflexcomb.case" xOffset="30"/> </outline> </glyph>
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/E_circumflexdotbelow.glif/0
{ "file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/E_circumflexdotbelow.glif", "repo_id": "cascadia-code", "token_count": 117 }
436
<?xml version='1.0' encoding='UTF-8'?> <glyph name="Gje-cy" format="2"> <advance width="1200"/> <unicode hex="0403"/> <outline> <component base="Ge-cy"/> <component base="acutecomb.case" xOffset="99"/> </outline> </glyph>
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/G_je-cy.glif/0
{ "file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/G_je-cy.glif", "repo_id": "cascadia-code", "token_count": 99 }
437
<?xml version='1.0' encoding='UTF-8'?> <glyph name="IJ_acute" format="2"> <advance width="1200"/> <outline> <component base="IJ"/> <component base="acutecomb.case" xOffset="-195"/> <component base="acutecomb.case" xOffset="359"/> </outline> <lib> <dict> <key>com.schriftgestaltung.Glyphs.ComponentInfo</key> <array> <dict> <key>alignment</key> <integer>-1</integer> <key>index</key> <integer>1</integer> <key>name</key> <string>acutecomb.case</string> </dict> <dict> <key>alignment</key> <integer>-1</integer> <key>index</key> <integer>2</integer> <key>name</key> <string>acutecomb.case</string> </dict> </array> </dict> </lib> </glyph>
cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/I_J__acute.glif/0
{ "file_path": "cascadia-code/sources/CascadiaCode-Bold.ufo/glyphs/I_J__acute.glif", "repo_id": "cascadia-code", "token_count": 439 }
438