Repository: QuTech-Delft/OpenQL (language: python)

Issue:
Refactored multi-core branch
A merge of `finish-modularization` with `multi-core`, which I'd already done for the most part, except on the `multi-core-refactored` branch. @jvansomeren, please check if you have uncommitted/pushed changes on your local multi-core branch first and commit those, then this can be merged.


Discussion / hints:

Fix patch:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 919569e17..50bf0cd9e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -223,6 +223,7 @@ add_library(ql
     "${CMAKE_CURRENT_SOURCE_DIR}/src/ql/utils/json.cc"
     "${CMAKE_CURRENT_SOURCE_DIR}/src/ql/utils/vcd.cc"
     "${CMAKE_CURRENT_SOURCE_DIR}/src/ql/utils/options.cc"
+    "${CMAKE_CURRENT_SOURCE_DIR}/src/ql/utils/progress.cc"
     "${CMAKE_CURRENT_SOURCE_DIR}/src/ql/com/options.cc"
     "${CMAKE_CURRENT_SOURCE_DIR}/src/ql/com/unitary.cc"
     "${CMAKE_CURRENT_SOURCE_DIR}/src/ql/com/qubit_mapping.cc"
diff --git a/include/ql/plat/topology.h b/include/ql/plat/topology.h
index b32bbdd90..0d42bcfad 100644
--- a/include/ql/plat/topology.h
+++ b/include/ql/plat/topology.h
@@ -176,10 +176,17 @@ class Topology {
     Edge max_edge;
 
     /**
-     * The distance (number of edges) between a pair of qubits.
+     * The distance (number of edges) between a pair of qubits. Only used and
+     * initialized for specified connectivity; distance is computed by
+     * get_distance() on-the-fly for full connectivity.
      */
     utils::Vec<utils::Vec<utils::UInt>> distance;
 
+    /**
+     * Generates the neighbor list for the given qubit for full connectivity.
+     */
+    void generate_neighbors_list(utils::UInt qs, Neighbors &qubits) const;
+
 public:
 
     /**
@@ -223,7 +230,7 @@ class Topology {
     /**
      * Returns the indices of the neighboring qubits for the given qubit.
      */
-    const Neighbors &get_neighbors(Qubit qubit) const;
+    Neighbors get_neighbors(Qubit qubit) const;
 
     /**
      * Returns the number of cores.
diff --git a/include/ql/utils/progress.h b/include/ql/utils/progress.h
new file mode 100644
index 000000000..3b8f5e908
--- /dev/null
+++ b/include/ql/utils/progress.h
@@ -0,0 +1,79 @@
+/** \file
+ * Provides utilities for working with strings that the STL fails to
+ * satisfactorily provide.
+ */
+
+#pragma once
+
+#include <chrono>
+#include "ql/utils/num.h"
+#include "ql/utils/str.h"
+
+namespace ql {
+namespace utils {
+
+/**
+ * Progress monitor. Prints progress every N milliseconds (as long as progress
+ * is called often enough), including time taken thus far and ETA, using
+ * INFO loglevel.
+ */
+class Progress {
+private:
+
+    /**
+     * The clock source to use.
+     */
+    using Clock = std::chrono::high_resolution_clock;
+
+    /**
+     * Time points for the clock source.
+     */
+    using TimePoint = Clock::time_point;
+
+    /**
+     * Prefix for printing.
+     */
+    Str prefix;
+
+    /**
+     * Minimum printing interval.
+     */
+    UInt interval;
+
+    /**
+     * Start time (when we were constructed).
+     */
+    TimePoint start;
+
+    /**
+     * The previous time we printed our progress.
+     */
+    TimePoint prev;
+
+public:
+
+    /**
+     * Constructor that doesn't print anything.
+     */
+    Progress();
+
+    /**
+     * Progress monitor constructor. Also starts the timer.
+     */
+    explicit Progress(const Str &prefix, UInt interval=0);
+
+    /**
+     * Prints the current progress and ETA, if enough time has passed since
+     * the previous print.
+     */
+    void feed(Real progress);
+
+    /**
+     * Prints a completion message that includes total time taken.
+     */
+    void complete();
+
+};
+
+} // namespace utils
+} // namespace ql
diff --git a/src/ql/com/options.cc b/src/ql/com/options.cc
index ef5581319..258e1f1c2 100644
--- a/src/ql/com/options.cc
+++ b/src/ql/com/options.cc
@@ -165,6 +165,15 @@ Options make_ql_options() {
         "post-mapping schedulers are affected."
     );
 
+    options.add_enum(
+        "scheduler_heuristic",
+        "When no compiler configuration file is specified, this controls "
+        "what scheduling heuristic should be used for ordering the list of "
+        "available gates by criticality.",
+        "path_length",
+        {"path_length", "random"}
+    );
+
     options.add_bool(
         "scheduler_commute",
         "When no compiler configuration file is specified, this controls "
@@ -228,6 +237,16 @@ Options make_ql_options() {
         {"no", "base", "baserc", "minextend", "minextendrc", "maxfidelity"}
     );
 
+    options.add_int(
+        "mapmaxalters",
+        "When no compiler configuration file is specified, this controls "
+        "whether the heuristic mapper will be run, and if so, how many "
+        "alternative routing solutions it should generate before picking one "
+        "via the heuristic or tie-breaking method. 0 means unlimited.",
+        "0",
+        0, utils::MAX
+    );
+
     options.add_bool(
         "mapinitone2one",
         "When no compiler configuration file is specified, and the mapper is "
@@ -272,9 +291,12 @@ Options make_ql_options() {
         "to destination qubit while routing, or to favor routing along the "
         "borders of the search space. The latter is only supported when the "
         "qubits are given planar coordinates in the topology section of the "
-        "platform configuration file.",
+        "platform configuration file. Both `all` and `random` consider all "
+        "paths, but for the latter the order in which the paths are generated "
+        "is shuffled, which is useful to reduce bias when "
+        "`max_alternative_routes` is used.",
         "all",
-        {"all", "borders"}
+        {"all", "borders", "random"}
     );
 
     options.add_enum(
diff --git a/src/ql/pass/ana/statistics/common.cc b/src/ql/pass/ana/statistics/common.cc
new file mode 100644
index 000000000..f8966efaa
--- /dev/null
+++ b/src/ql/pass/ana/statistics/common.cc
@@ -0,0 +1,118 @@
+/** \file
+ * Defines common types and utility functions related to the statistics passes.
+ */
+
+#include "ql/pass/ana/statistics/common.h"
+
+#include "ql/com/metrics.h"
+
+namespace ql {
+namespace pass {
+namespace ana {
+namespace statistics {
+
+/**
+ * Attaches a statistic to the given node.
+ */
+static void push_node(
+    tree::annotatable::Annotatable &node,
+    const utils::Str &line
+) {
+    if (!node.has_annotation<AdditionalStats>()) {
+        node.set_annotation<AdditionalStats>({});
+    }
+    node.get_annotation<AdditionalStats>().stats.push_back(line);
+}
+
+/**
+ * Attaches a statistic to the given kernel node.
+ */
+void AdditionalStats::push(const ir::KernelRef &kernel, const utils::Str &line) {
+    push_node(*kernel, line);
+}
+
+/**
+ * Attaches a statistic to the given program node.
+ */
+void AdditionalStats::push(const ir::ProgramRef &program, const utils::Str &line) {
+    push_node(*program, line);
+}
+
+/**
+ * Pops all statistics annotations from the given node.
+ */
+static utils::List<utils::Str> pop_node(tree::annotatable::Annotatable &node) {
+    if (auto s = node.get_annotation_ptr<AdditionalStats>()) {
+        auto stats = std::move(s->stats);
+        node.erase_annotation<AdditionalStats>();
+        return stats;
+    } else {
+        return {};
+    }
+}
+
+/**
+ * Pops all statistics annotations from the given kernel.
+ */
+utils::List<utils::Str> AdditionalStats::pop(const ir::KernelRef &kernel) {
+    return pop_node(*kernel);
+}
+
+/**
+ * Pops all statistics annotations from the given program.
+ */
+utils::List<utils::Str> AdditionalStats::pop(const ir::ProgramRef &program) {
+    return pop_node(*program);
+}
+
+/**
+ * Dumps basic statistics for the given kernel to the given output stream.
+ */
+void dump(
+    const ir::KernelRef &kernel,
+    std::ostream &os,
+    const utils::Str &line_prefix
+) {
+    using namespace com::metrics;
+
+    os << line_prefix << "kernel: " << kernel->name << "\n";
+    os << line_prefix << "----- circuit_latency: " << compute<Latency>(kernel) << "\n";
+    os << line_prefix << "----- quantum gates: " << compute<QuantumGateCount>(kernel) << "\n";
+    os << line_prefix << "----- non single qubit gates: " << compute<MultiQubitGateCount>(kernel) << "\n";
+    os << line_prefix << "----- classical operations: " << compute<ClassicalOperationCount>(kernel) << "\n";
+    os << line_prefix << "----- qubits used: " << compute<QubitUsageCount>(kernel).sparse_size() << "\n";
+    os << line_prefix << "----- qubit cycles use:" << compute<QubitUsedCycleCount>(kernel) << "\n";
+    for (const auto &line : AdditionalStats::pop(kernel)) {
+        os << line_prefix << "----- " << line << "\n";
+    }
+    os.flush();
+}
+
+/**
+ * Dumps basic statistics for the given program to the given output stream. This
+ * only dumps the global statistics, not the statistics for each individual
+ * kernel.
+ */
+void dump(
+    const ir::ProgramRef &program,
+    std::ostream &os,
+    const utils::Str &line_prefix
+) {
+    using namespace com::metrics;
+
+    os << line_prefix << "Total circuit_latency: " << compute<Latency>(program) << "\n";
+    os << line_prefix << "Total no. of quantum gates: " << compute<QuantumGateCount>(program) << "\n";
+    os << line_prefix << "Total no. of non single qubit gates: " << compute<MultiQubitGateCount>(program) << "\n";
+    os << line_prefix << "Total no. of classical operations: " << compute<ClassicalOperationCount>(program) << "\n";
+    os << line_prefix << "Qubits used: " << compute<QubitUsageCount>(program).sparse_size() << "\n";
+    os << line_prefix << "Qubit cycles use: " << compute<QubitUsedCycleCount>(program) << "\n";
+    for (const auto &line : AdditionalStats::pop(program)) {
+        os << line_prefix << line << "\n";
+    }
+    os.flush();
+}
+
+} // namespace statistics
+} // namespace ana
+} // namespace pass
+} // namespace ql
diff --git a/src/ql/pass/map/qubits/map/detail/future.cc b/src/ql/pass/map/qubits/map/detail/future.cc
index bb722d192..afed567fa 100644
--- a/src/ql/pass/map/qubits/map/detail/future.cc
+++ b/src/ql/pass/map/qubits/map/detail/future.cc
@@ -28,6 +28,8 @@ void Future::initialize(const plat::PlatformRef &p, const OptionsRef &opt) {
  */
 void Future::set_kernel(const ir::KernelRef &kernel, const utils::Ptr<Scheduler> &sched) {
     QL_DOUT("Future::set_kernel ...");
+    approx_gates_total = kernel->gates.size();
+    approx_gates_remaining = approx_gates_total;
     scheduler = sched;
     if (options->lookahead_mode == LookaheadMode::DISABLED) {
         input_gatepv = kernel->gates;                           // copy to free original circuit to allow outputing to
@@ -37,7 +39,8 @@ void Future::set_kernel(const ir::KernelRef &kernel, const utils::Ptr<Scheduler>
             kernel,
             options->output_prefix,
             options->commute_multi_qubit,
-            options->commute_single_qubit
+            options->commute_single_qubit,
+            options->enable_criticality
         );
 
         // and so also the original circuit can be output to after this
@@ -125,6 +128,9 @@ utils::Bool Future::get_gates(utils::List<ir::GateRef> &qlg) const {
  * taken out of the avlist, and that its successors can be made available.
  */
 void Future::completed_gate(const ir::GateRef &gate) {
+    if (approx_gates_remaining) {
+        approx_gates_remaining--;
+    }
     if (options->lookahead_mode == LookaheadMode::DISABLED) {
         input_gatepp = std::next(input_gatepp);
     } else {
diff --git a/src/ql/pass/map/qubits/map/detail/future.h b/src/ql/pass/map/qubits/map/detail/future.h
index 20658c487..78621ebc2 100644
--- a/src/ql/pass/map/qubits/map/detail/future.h
+++ b/src/ql/pass/map/qubits/map/detail/future.h
@@ -102,6 +102,16 @@ class Future {
      */
     ir::GateRefs::iterator input_gatepp;
 
+    /**
+     * Approximate total number of gates to begin with.
+     */
+    utils::UInt approx_gates_total;
+
+    /**
+     * Approximate total number of gates remaining.
+     */
+    utils::UInt approx_gates_remaining;
+
     /**
      * Program-wide initialization function.
      */
diff --git a/src/ql/pass/map/qubits/map/detail/mapper.cc b/src/ql/pass/map/qubits/map/detail/mapper.cc
index 1acdaa634..3a30c2f31 100644
--- a/src/ql/pass/map/qubits/map/detail/mapper.cc
+++ b/src/ql/pass/map/qubits/map/detail/mapper.cc
@@ -25,6 +25,7 @@ std::ostream &operator<<(std::ostream &os, PathStrategy p) {
         case PathStrategy::LEFT:       os << "left";       break;
         case PathStrategy::RIGHT:      os << "right";      break;
         case PathStrategy::LEFT_RIGHT: os << "left-right"; break;
+        case PathStrategy::RANDOM:     os << "random";     break;
     }
     return os;
 }
@@ -35,19 +36,28 @@ using namespace com;
 
 /**
  * Find shortest paths between src and tgt in the grid, bounded by a
- * particular strategy. budget is the maximum number of hops allowed in the
- * path from src and is at least distance to tgt, but can be higher when not
- * all hops qualify for doing a two-qubit gate or to find more than just the
- * shortest paths. This recursively calls itself with src replaced with its
- * neighbors (and additional bookkeeping) until src equals tgt, adding all
- * alternatives to the alters list as it goes.
+ * particular strategy. path is a linked-list node representing the complete
+ * path from the initial src qubit to src in reverse order, not including src;
+ * it will be null for the initial call. budget is the maximum number of hops
+ * allowed in the path from src and is at least distance to tgt, but can be
+ * higher when not all hops qualify for doing a two-qubit gate or to find
+ * more than just the shortest paths. This recursively calls itself with src
+ * replaced with its neighbors (and additional bookkeeping) until src equals
+ * tgt, adding all alternatives to the alters list as it goes. For each path,
+ * the alters are further split into all feasible alternatives for the
+ * location of the non-nearest-neighbor two-qubit gate that started the
+ * routing request. If max_alters is nonzero, recursion will stop once the
+ * total number of entries in alters reaches or surpasses the limit (it may
+ * surpass due to the checks only happening before splitting).
  */
 void Mapper::gen_shortest_paths(
     const ir::GateRef &gate,
+    RawPtr<Path> path,
     UInt src,
     UInt tgt,
     UInt budget,
     List<Alter> &alters,
+    UInt max_alters,
     PathStrategy strategy
 ) {
 
@@ -67,13 +77,20 @@ void Mapper::gen_shortest_paths(
         a.initialize(kernel, options);
         a.target_gate = gate;
         a.add_to_front(src);
-        alters.push_back(a);
+        while (path) {
+            a.add_to_front(path->qubit);
+            path = path->prev;
+        }
+        a.split(alters);
         a.debug_print("... empty path after adding to result list");
         Alter::debug_print("... result list after adding empty path", alters);
         QL_DOUT("... will return now");
         return;
     }
 
+    Path sub_path_node = {src, path};
+    RawPtr<Path> sub_path = &sub_path_node;
+
     // Start looking around at neighbors for serious paths.
     UInt d = platform->topology->get_distance(src, tgt);
     QL_DOUT("gen_shortest_paths: distance(src=" << src << ", tgt=" << tgt << ") = " << d);
@@ -84,6 +101,12 @@ void Mapper::gen_shortest_paths(
     // src->n is one hop, budget from n is one less so distance(n,tgt) <= budget-1 (i.e. distance < budget)
     // when budget==d, this defaults to distance(n,tgt) <= d-1
     auto neighbors = platform->topology->get_neighbors(src);
+    if (logger::log_level >= logger::LogLevel::LOG_DEBUG) {
+        QL_DOUT("gen_shortest_paths: ... neighbors: ");
+        for (auto dn : neighbors) {
+            QL_DOUT("..." << dn << " ");
+        }
+    }
     neighbors.remove_if([this,budget,tgt](const UInt& n) { return platform->topology->get_distance(n, tgt) >= budget; });
     if (logger::log_level >= logger::LogLevel::LOG_DEBUG) {
         QL_DOUT("gen_shortest_paths: ... after reducing to steps within budget, nbl: ");
@@ -92,18 +115,35 @@ void Mapper::gen_shortest_paths(
         }
     }
 
-    // Rotate neighbor list nbl such that largest difference between angles of
-    // adjacent elements is beyond back(). This only makes sense when there is
-    // an underlying xy grid; when not, only the ALL strategy is supported.
-    QL_ASSERT(platform->topology->has_coordinates() || strategy == PathStrategy::ALL);
-    platform->topology->sort_neighbors_by_angle(src, neighbors);
-    // subset to those neighbors that continue in direction(s) we want
-    if (strategy == PathStrategy::LEFT) {
-        neighbors.remove_if([neighbors](const UInt &n) { return n != neighbors.front(); } );
-    } else if (strategy == PathStrategy::RIGHT) {
-        neighbors.remove_if([neighbors](const UInt &n) { return n != neighbors.back(); } );
-    } else if (strategy == PathStrategy::LEFT_RIGHT) {
-        neighbors.remove_if([neighbors](const UInt &n) { return n != neighbors.front() && n != neighbors.back(); } );
+    // Update the neighbor list according to the path strategy.
+    if (strategy == PathStrategy::RANDOM) {
+
+        // Shuffle the neighbor list. We have to go through a vector to do that,
+        // otherwise std::shuffle doesn't work.
+        utils::Vec<utils::UInt> neighbors_vec{neighbors.begin(), neighbors.end()};
+        std::shuffle(neighbors_vec.begin(), neighbors_vec.end(), rng);
+        neighbors.clear();
+        neighbors.insert(neighbors.begin(), neighbors_vec.begin(), neighbors_vec.end());
+
+    } else {
+
+        // Rotate neighbor list nbl such that largest difference between angles
+        // of adjacent elements is beyond back(). This only makes sense when
+        // there is an underlying xy grid; when not, only the ALL strategy is
+        // supported.
+        QL_ASSERT(platform->topology->has_coordinates() || strategy == PathStrategy::ALL);
+        platform->topology->sort_neighbors_by_angle(src, neighbors);
+
+        // Select the subset of those neighbors that continue in direction(s) we
+        // want.
+        if (strategy == PathStrategy::LEFT) {
+            neighbors.remove_if([neighbors](const UInt &n) { return n != neighbors.front(); } );
+        } else if (strategy == PathStrategy::RIGHT) {
+            neighbors.remove_if([neighbors](const UInt &n) { return n != neighbors.back(); } );
+        } else if (strategy == PathStrategy::LEFT_RIGHT) {
+            neighbors.remove_if([neighbors](const UInt &n) { return n != neighbors.front() && n != neighbors.back(); } );
+        }
+
     }
 
     QL_IF_LOG_DEBUG {
@@ -129,21 +169,27 @@ void Mapper::gen_shortest_paths(
             }
         }
 
+        // Select maximum number of sub-alternatives to build. If our incoming
+        // max_alters is 0 there is no limit.
+        UInt max_sub_alters = 0;
+        if (max_alters > 0) {
+            QL_ASSERT(max_alters > alters.size());
+            max_sub_alters = max_alters - alters.size();
+        }
+
         // Get list of possible paths in budget-1 from n to tgt in sub_alters.
-        gen_shortest_paths(gate, n, tgt, budget - 1, sub_alters, new_strategy);
+        gen_shortest_paths(gate, sub_path, n, tgt, budget - 1, sub_alters, max_sub_alters, new_strategy);
 
         // Move all of sub_alters to alters, and make sub_alters empty.
         alters.splice(alters.end(), sub_alters);
 
-    }
+        // Check whether we've found enough alternatives already.
+        if (max_alters && alters.size() >= max_alters) {
+            break;
+        }
 
-    // alters now contains all paths starting from a neighbor of src to tgt
-    // (within budget). Add src to front of all to-be-returned paths from src's
-    // neighbors to tgt.
-    for (auto &a : alters) {
-        QL_DOUT("... gen_shortest_paths, about to add src=" << src << " in front of path");
-        a.add_to_front(src);
     }
+
     QL_DOUT("... gen_shortest_paths: returning from call of: " << "src=" << src << " tgt=" << tgt << " budget=" << budget << " which=" << strategy);
 }
 
@@ -171,25 +217,22 @@ void Mapper::gen_shortest_paths(
  */
 void Mapper::gen_shortest_paths(const ir::GateRef &gate, UInt src, UInt tgt, List<Alter> &alters) {
 
-    // List that will hold all not-yet-split Alters directly from src to tgt.
-    List<Alter> direct_paths;
-
     // Compute budget.
     UInt budget = platform->topology->get_min_hops(src, tgt);
 
     // Generate paths using the configured path selection strategy.
     if (options->path_selection_mode == PathSelectionMode::ALL) {
-        gen_shortest_paths(gate, src, tgt, budget, direct_paths, PathStrategy::ALL);
+        gen_shortest_paths(gate, nullptr, src, tgt, budget, alters, options->max_alters, PathStrategy::ALL);
     } else if (options->path_selection_mode == PathSelectionMode::BORDERS) {
-        gen_shortest_paths(gate, src, tgt, budget, direct_paths, PathStrategy::LEFT_RIGHT);
+        gen_shortest_paths(gate, nullptr, src, tgt, budget, alters, options->max_alters, PathStrategy::LEFT_RIGHT);
+    } else if (options->path_selection_mode == PathSelectionMode::RANDOM) {
+        gen_shortest_paths(gate, nullptr, src, tgt, budget, alters, options->max_alters, PathStrategy::RANDOM);
     } else {
         QL_FATAL("Unknown value of path selection mode option " << options->path_selection_mode);
     }
 
-    // Split the paths, outputting to the alters list.
-    for (auto &a : direct_paths) {
-        a.split(alters);
-    }
+    // Note: path split used to be here. Now it's done greedily by
+    // gen_shortest_paths().
 
 }
 
@@ -417,6 +460,13 @@ Bool Mapper::map_mappable_gates(
     QL_DOUT("map_mappable_gates entry");
     while (true) {
 
+        // Print progress every once in a while if we're taking long.
+        Real progress = 1.0;
+        if (future.approx_gates_total) {
+            progress -= ((Real)future.approx_gates_remaining / (Real)future.approx_gates_total);
+        }
+        routing_progress.feed(progress);
+
         // Handle non-quantum gates that need to be done first.
         if (future.get_non_quantum_gates(av_non_quantum_gates)) {
 
@@ -766,6 +816,8 @@ void Mapper::map_gates(Future &future, Past &past, Past &base_past) {
         || options->lookahead_mode == LookaheadMode::ALL
     );
 
+    routing_progress = Progress("router", 1000);
+
     // Handle all the gates one by one. map_mappable_gates returns false when no
     // gates remain.
     while (map_mappable_gates(future, past, gates, also_nn_two_qubit_gates)) {
@@ -787,7 +839,16 @@ void Mapper::map_gates(Future &future, Past &past, Past &base_past) {
         // (depending on configuration) to THIS past, and schedules them/it in.
         commit_alter(alter, future, past);
 
+        // Print progress every once in a while if we're taking long.
+        Real progress = 1.0;
+        if (future.approx_gates_total) {
+            progress -= ((Real)future.approx_gates_remaining / (Real)future.approx_gates_total);
+        }
+        routing_progress.feed(progress);
+
     }
+
+    routing_progress.complete();
 }
 
 /**
diff --git a/src/ql/pass/map/qubits/map/detail/mapper.h b/src/ql/pass/map/qubits/map/detail/mapper.h
index 1c4875835..012924abc 100644
--- a/src/ql/pass/map/qubits/map/detail/mapper.h
+++ b/src/ql/pass/map/qubits/map/detail/mapper.h
@@ -10,6 +10,7 @@
 #include "ql/utils/vec.h"
 #include "ql/utils/list.h"
 #include "ql/utils/map.h"
+#include "ql/utils/progress.h"
 #include "ql/plat/platform.h"
 #include "ql/ir/ir.h"
 #include "ql/com/qubit_mapping.h"
@@ -66,7 +67,14 @@ enum class PathStrategy {
      * Consider the shortest paths along both the left and right side of the
      * rectangle of the source and target qubit.
      */
-    LEFT_RIGHT
+    LEFT_RIGHT,
+
+    /**
+     * Consider all path alternatives, but randomize the order of the generated
+     * paths. This is useful when the amount of generated alternative paths
+     * needs to be limited for scalability.
+     */
+    RANDOM
 
 };
 
@@ -249,6 +257,11 @@ class Mapper {
      */
     std::mt19937 rng;
 
+    /**
+     * Routing progress tracker.
+     */
+    utils::Progress routing_progress;
+
     /**
      * Number of swaps added (including moves) to the most recently mapped
      * kernel, set by map_kernel().
@@ -276,21 +289,35 @@ class Mapper {
      */
     com::QubitMapping v2r_out;
 
+    struct Path {
+        utils::UInt qubit;
+        utils::RawPtr<Path> prev;
+    };
+
     /**
      * Find shortest paths between src and tgt in the grid, bounded by a
-     * particular strategy. budget is the maximum number of hops allowed in the
-     * path from src and is at least distance to tgt, but can be higher when not
-     * all hops qualify for doing a two-qubit gate or to find more than just the
-     * shortest paths. This recursively calls itself with src replaced with its
-     * neighbors (and additional bookkeeping) until src equals tgt, adding all
-     * alternatives to the alters list as it goes.
+     * particular strategy. path is a linked-list node representing the complete
+     * path from the initial src qubit to src in reverse order, not including src;
+     * it will be null for the initial call. budget is the maximum number of hops
+     * allowed in the path from src and is at least distance to tgt, but can be
+     * higher when not all hops qualify for doing a two-qubit gate or to find
+     * more than just the shortest paths. This recursively calls itself with src
+     * replaced with its neighbors (and additional bookkeeping) until src equals
+     * tgt, adding all alternatives to the alters list as it goes. For each path,
+     * the alters are further split into all feasible alternatives for the
+     * location of the non-nearest-neighbor two-qubit gate that started the
+     * routing request. If max_alters is nonzero, recursion will stop once the
+     * total number of entries in alters reaches or surpasses the limit (it may
+     * surpass due to the checks only happening before splitting).
      */
     void gen_shortest_paths(
         const ir::GateRef &gate,
+        utils::RawPtr<Path> path,
         utils::UInt src,
         utils::UInt tgt,
         utils::UInt budget,
         utils::List<Alter> &alters,
+        utils::UInt max_alters,
         PathStrategy strategy
     );
 
diff --git a/src/ql/pass/map/qubits/map/detail/options.cc b/src/ql/pass/map/qubits/map/detail/options.cc
index 75d55b864..e4b421908 100644
--- a/src/ql/pass/map/qubits/map/detail/options.cc
+++ b/src/ql/pass/map/qubits/map/detail/options.cc
@@ -45,6 +45,7 @@ std::ostream &operator<<(std::ostream &os, PathSelectionMode psm) {
     switch (psm) {
         case PathSelectionMode::ALL:     os << "all";     break;
         case PathSelectionMode::BORDERS: os << "borders"; break;
+        case PathSelectionMode::RANDOM:  os << "random";  break;
     }
     return os;
 }
diff --git a/src/ql/pass/map/qubits/map/detail/options.h b/src/ql/pass/map/qubits/map/detail/options.h
index f2124c20f..639b2f9dc 100644
--- a/src/ql/pass/map/qubits/map/detail/options.h
+++ b/src/ql/pass/map/qubits/map/detail/options.h
@@ -89,11 +89,18 @@ enum class PathSelectionMode {
     ALL,
 
     /**
-     * Favor routing along the borders of the chip. Only supported when the
-     * qubits are given coordinates in the topology section of the platform
-     * configuration file.
+     * Favor routing along the borders of the rectangle defined by the source
+     * and target qubit. Only supported when the qubits are given coordinates in
+     * the topology section of the platform configuration file.
      */
-    BORDERS
+    BORDERS,
+
+    /**
+     * Consider all possible paths, but randomize the order in which paths are
+     * generated. This is useful when the amount of generated alternative paths
+     * needs to be limited for scalability.
+     */
+    RANDOM
 
 };
 
@@ -218,6 +225,12 @@ struct Options {
      */
     Heuristic heuristic = Heuristic::BASE;
 
+    /**
+     * Maximum number of alternative routing solutions to generate before
+     * picking one via the heuristic and tie-breaking method. 0 means no limit.
+     */
+    utils::UInt max_alters = 0;
+
     /**
      * Controls how to tie-break equally-scoring alternative mapping solutions.
      */
@@ -290,6 +303,12 @@ struct Options {
      */
     utils::Bool commute_single_qubit = false;
 
+    /**
+     * Whether the critical path selection logic of the embedded scheduler is
+     * enabled.
+     */
+    utils::Bool enable_criticality = true;
+
     /**
      * Whether to print dot graphs of the schedules created using the embedded
      * scheduler.
diff --git a/src/ql/pass/map/qubits/map/map.cc b/src/ql/pass/map/qubits/map/map.cc
index 2bcd5dc1e..87f1ae20f 100644
--- a/src/ql/pass/map/qubits/map/map.cc
+++ b/src/ql/pass/map/qubits/map/map.cc
@@ -209,6 +209,15 @@ MapQubitsPass::MapQubitsPass(
         {"base", "baserc", "minextend", "minextendrc", "maxfidelity"}
     );
 
+    options.add_int(
+        "max_alternative_routes",
+        "Controls the maximum number of alternative routing solutions to "
+        "generate before applying the heuristic and/or tie-breaking method to "
+        "choose one. Leave unspecified or set to 0 to disable this limit.",
+        "0",
+        0, utils::MAX
+    );
+
     options.add_enum(
         "tie_break_method",
         "Controls how to tie-break equally-scoring alternative mapping "
@@ -256,9 +265,11 @@ MapQubitsPass::MapQubitsPass(
         "qubit while routing, or to favor routing along the route search space. "
         "The latter is only supported and sensible when the qubits are given "
         "planar coordinates in the topology section of the platform "
-        "configuration file.",
+        "configuration file. Both `all` and `random` consider all paths, but "
+        "for the latter the order in which the paths are generated is shuffled, "
+        "which is useful to reduce bias when `max_alternative_routes` is used.",
         "all",
-        {"all", "borders"}
+        {"all", "borders", "random"}
     );
 
     options.add_enum(
@@ -357,6 +368,14 @@ MapQubitsPass::MapQubitsPass(
         false
     );
 
+    options.add_enum(
+        "scheduler_heuristic",
+        "This controls what scheduling heuristic should be used for ordering "
+        "the list of available gates by criticality.",
+        "path_length",
+        {"path_length", "random"}
+    );
+
     options.add_bool(
         "write_dot_graphs",
         "Whether to print dot graphs of the schedules created using the "
@@ -402,6 +421,8 @@ pmgr::pass_types::NodeType MapQubitsPass::on_construct(
         QL_ASSERT(false);
     }
 
+    parsed_options->max_alters = options["max_alternative_routes"].as_uint();
+
     auto tie_break_method = options["tie_break_method"].as_str();
     if (tie_break_method == "first") {
         parsed_options->tie_break_method = detail::TieBreakMethod::FIRST;
@@ -433,6 +454,8 @@ pmgr::pass_types::NodeType MapQubitsPass::on_construct(
         parsed_options->path_selection_mode = detail::PathSelectionMode::ALL;
     } else if (path_selection_mode == "borders") {
         parsed_options->path_selection_mode = detail::PathSelectionMode::BORDERS;
+    } else if (path_selection_mode == "random") {
+        parsed_options->path_selection_mode = detail::PathSelectionMode::RANDOM;
     } else {
         QL_ASSERT(false);
     }
@@ -473,6 +496,7 @@ pmgr::pass_types::NodeType MapQubitsPass::on_construct(
     parsed_options->reverse_swap_if_better = options["reverse_swap_if_better"].as_bool();
     parsed_options->commute_multi_qubit = options["commute_multi_qubit"].as_bool();
     parsed_options->commute_single_qubit = options["commute_single_qubit"].as_bool();
+    parsed_options->enable_criticality = options["scheduler_heuristic"].as_str() == "path_length";
     parsed_options->write_dot_graphs = options["write_dot_graphs"].as_bool();
 
     return pmgr::pass_types::NodeType::NORMAL;
diff --git a/src/ql/pass/sch/schedule/detail/scheduler.cc b/src/ql/pass/sch/schedule/detail/scheduler.cc
index dd65c166d..a9d0cdb9c 100644
--- a/src/ql/pass/sch/schedule/detail/scheduler.cc
+++ b/src/ql/pass/sch/schedule/detail/scheduler.cc
@@ -326,7 +326,8 @@ void Scheduler::init(
     const ir::KernelRef &kernel,
     const utils::Str &output_prefix,
     utils::Bool commute_multi_qubit,
-    utils::Bool commute_single_qubit
+    utils::Bool commute_single_qubit,
+    utils::Bool enable_criticality
 ) {
     QL_DOUT("dependency graph creation ... #qubits = " << kernel->platform->qubit_count);
     qubit_count = kernel->platform->qubit_count;
@@ -340,6 +341,7 @@ void Scheduler::init(
     this->output_prefix = output_prefix;
     this->commute_multi_qubit = commute_multi_qubit;
     this->commute_single_qubit = commute_single_qubit;
+    this->enable_criticality = enable_criticality;
 
     // dependencies are created with a current gate as target
     // and with those previous gates as source that have an operand match with the current gate:
@@ -925,6 +927,7 @@ Bool Scheduler::criticality_lessthan(
     if (n1 == n2) return false;             // because not <
 
     if (remaining.at(n1) < remaining.at(n2)) return true;
+    if (!enable_criticality) return false;
     if (remaining.at(n1) > remaining.at(n2)) return false;
     // so: remaining[n1] == remaining[n2]
 
diff --git a/src/ql/pass/sch/schedule/detail/scheduler.h b/src/ql/pass/sch/schedule/detail/scheduler.h
index 8c53fa693..eb720c86e 100644
--- a/src/ql/pass/sch/schedule/detail/scheduler.h
+++ b/src/ql/pass/sch/schedule/detail/scheduler.h
@@ -87,6 +87,7 @@ class Scheduler {
     utils::Str output_prefix;           // replaces output directory global option
     utils::Bool commute_multi_qubit;    // whether to commute CZ and CNOT gates
     utils::Bool commute_single_qubit;   // whether to commute X and Z rotations
+    utils::Bool enable_criticality;     // whether to enable criticality selection logic
 
     // scheduler support
     utils::Map<lemon::ListDigraph::Node, utils::UInt>  remaining;  // remaining[node] == cycles until end; critical path representation
@@ -145,7 +146,8 @@ class Scheduler {
         const ir::KernelRef &kernel,
         const utils::Str &output_prefix,
         utils::Bool commute_multi_qubit,
-        utils::Bool commute_single_qubit
+        utils::Bool commute_single_qubit,
+        utils::Bool enable_criticality
     );
 
     void dprint_depgraph(const utils::Str &s) const;
diff --git a/src/ql/pass/sch/schedule/schedule.cc b/src/ql/pass/sch/schedule/schedule.cc
index f6e33907a..21780d0ec 100644
--- a/src/ql/pass/sch/schedule/schedule.cc
+++ b/src/ql/pass/sch/schedule/schedule.cc
@@ -63,6 +63,14 @@ SchedulePass::SchedulePass(
         {"asap", "alap", "uniform"}
     );
 
+    options.add_enum(
+        "scheduler_heuristic",
+        "This controls what scheduling heuristic should be used for ordering "
+        "the list of available gates by criticality.",
+        "path_length",
+        {"path_length", "random"}
+    );
+
     options.add_bool(
         "commute_multi_qubit",
         "Whether to consider commutation rules for the CZ and CNOT quantum "
@@ -101,7 +109,8 @@ utils::Int SchedulePass::run(
         kernel,
         context.output_prefix,
         options["commute_multi_qubit"].as_bool(),
-        options["commute_single_qubit"].as_bool()
+        options["commute_single_qubit"].as_bool(),
+        options["scheduler_heuristic"].as_str() == "path_length"
     );
 
     // Run the appropriate scheduling algorithm.
diff --git a/src/ql/plat/topology.cc b/src/ql/plat/topology.cc
index b30b94261..353a013ee 100644
--- a/src/ql/plat/topology.cc
+++ b/src/ql/plat/topology.cc
@@ -141,6 +141,24 @@ void Topology::dump_docs(std::ostream &os, const utils::Str &line_prefix) {
     )");
 }
 
+/**
+ * Generates the neighbor list for the given qubit for full connectivity.
+ */
+void Topology::generate_neighbors_list(utils::UInt qs, Neighbors &qubits) const {
+    QL_ASSERT(connectivity == GridConnectivity::FULL);
+
+    // Generate neighbors for qubit qs for full connectivity per core.
+    for (utils::UInt qd = 0; qd < num_qubits; qd++) {
+        if (qs == qd) {
+            continue;
+        }
+        if (is_inter_core_hop(qs, qd) && (!is_comm_qubit(qs) || !is_comm_qubit(qd))) {
+            continue;
+        }
+        qubits.push_back(qd);
+    }
+}
+
 /**
  * Constructs the grid for the given number of qubits from the given JSON
  * object. Refer to dump_docs() for details.
@@ -406,84 +424,81 @@ Topology::Topology(utils::UInt num_qubits, const utils::Json &topology) {
             }
         }
 
-    } else if (connectivity == GridConnectivity::FULL) {
+        // Compute distances between all qubits using Floyd-Warshall. When not
+        // connected, distance remains set to utils::MAX.
+        distance.resize(num_qubits);
+        for (utils::UInt i = 0; i < num_qubits; i++) {
 
-        // Generate full connectivity.
-        for (utils::UInt qs = 0; qs < num_qubits; qs++) {
-            for (utils::UInt qd = 0; qd < num_qubits; qd++) {
-                if (qs == qd) {
-                    continue;
-                }
-                if (is_inter_core_hop(qs, qd) && (!is_comm_qubit(qs) || !is_comm_qubit(qd))) {
-                    continue;
-                }
-                neighbors.set(qs).push_back(qd);
+            // Initialize all distances to maximum value...
+            distance[i].resize(num_qubits, utils::MAX);
+
+            // ... except the self-edge, which is 0 distance...
+            distance[i][i] = 0;
+
+            // ... and the neighbors, which get distance 1.
+            for (utils::UInt j : neighbors.get(i)) {
+                distance[i][j] = 1;
             }
-        }
 
-    }
-    if (max_edge == 0) {
+        }
 
-        // Full connectivity (within a core) or no edge indices specified by
-        // the user. In this case, qubit edge indices are generated on-the-fly
-        // using src*nq + dst, so max_edge is simply num_qubits**2.
-        // edge_to_qubits and qubits_to_edge can stay empty.
-        max_edge = num_qubits * num_qubits;
+        // Find shorter distances by gradually including more qubits (k) in path
+        for (utils::UInt k = 0; k < num_qubits; k++) {
+            for (utils::UInt i = 0; i < num_qubits; i++) {
+                for (utils::UInt j = 0; j < num_qubits; j++) {
 
-    }
+                    // Prevent overflow in the sum below by explicitly checking for
+                    // MAX.
+                    if (distance[i][k] == utils::MAX) {
+                        continue;
+                    }
+                    if (distance[k][j] == utils::MAX) {
+                        continue;
+                    }
 
-    // When qubits have coordinates, sort neighbor lists clockwise starting from
-    // 12:00, to know boundary of search space.
-    if (has_coordinates()) {
-        for (utils::UInt qi = 0; qi < num_qubits; qi++) {
-            auto nbsq = neighbors.find(qi);
-            if (nbsq != neighbors.end()) {
-                nbsq->second.sort(
-                    [this, qi](const utils::UInt &i, const utils::UInt &j) {
-                        return get_angle(xy_coord.at(qi), xy_coord.at(i)) <
-                               get_angle(xy_coord.at(qi), xy_coord.at(j));
+                    if (distance[i][j] > distance[i][k] + distance[k][j]) {
+                        distance[i][j] = distance[i][k] + distance[k][j];
                     }
-                );
+                }
             }
         }
-    }
 
-    // Compute distances between all qubits using Floyd-Warshall. When not
-    // connected, distance remains set to utils::MAX.
-    distance.resize(num_qubits);
-    for (utils::UInt i = 0; i < num_qubits; i++) {
+    } else if (connectivity == GridConnectivity::FULL) {
 
-        // Initialize all distances to maximum value...
-        distance[i].resize(num_qubits, utils::MAX);
+        // If we have full connectivity and the qubits have coordinates, we
+        // want neighbor lists for each qubit sorted based on angle. So, in this
+        // case, we should generate the neighbors list. If not, we can easily
+        // figure out neighbors on-the-fly.
+        if (has_coordinates()) {
 
-        // ... except the self-edge, which is 0 distance...
-        distance[i][i] = 0;
+            // Pre-generate full connectivity.
+            for (utils::UInt qs = 0; qs < num_qubits; qs++) {
+                generate_neighbors_list(qs, neighbors.set(qs));
+            }
 
-        // ... and the neighbors, which get distance 1.
-        for (utils::UInt j : neighbors.get(i)) {
-            distance[i][j] = 1;
         }
 
     }
+    if (max_edge == 0) {
 
-    // Find shorter distances by gradually including more qubits (k) in path
-    for (utils::UInt k = 0; k < num_qubits; k++) {
-        for (utils::UInt i = 0; i < num_qubits; i++) {
-            for (utils::UInt j = 0; j < num_qubits; j++) {
+        // Full connectivity (within a core) or no edge indices specified by
+        // the user. In this case, qubit edge indices are generated on-the-fly
+        // using src*nq + dst, so max_edge is simply num_qubits**2.
+        // edge_to_qubits and qubits_to_edge can stay empty.
+        max_edge = num_qubits * num_qubits;
 
-                // Prevent overflow in the sum below by explicitly checking for
-                // MAX.
-                if (distance[i][k] == utils::MAX) {
-                    continue;
-                }
-                if (distance[k][j] == utils::MAX) {
-                    continue;
-                }
+    }
 
-                if (distance[i][j] > distance[i][k] + distance[k][j]) {
-                    distance[i][j] = distance[i][k] + distance[k][j];
+    // When qubits have coordinates, sort neighbor lists clockwise starting from
+    // 12:00, to know boundary of search space.
+    if (has_coordinates()) {
+        for (auto &it : neighbors) {
+            it.second.sort(
+                [this, it](const utils::UInt &i, const utils::UInt &j) {
+                    return get_angle(xy_coord.at(it.first), xy_coord.at(i)) <
+                           get_angle(xy_coord.at(it.first), xy_coord.at(j));
                 }
-            }
+            );
         }
     }
 
@@ -575,8 +590,14 @@ utils::UInt Topology::get_num_cores() const {
 /**
  * Returns the indices of the neighboring qubits for the given qubit.
  */
-const Topology::Neighbors &Topology::get_neighbors(Qubit qubit) const {
-    return neighbors.get(qubit);
+Topology::Neighbors Topology::get_neighbors(Qubit qubit) const {
+    if (connectivity != GridConnectivity::FULL || has_coordinates()) {
+        return neighbors.get(qubit);
+    } else {
+        Neighbors retval;
+        generate_neighbors_list(qubit, retval);
+        return retval;
+    }
 }
 
 /**
@@ -616,6 +637,23 @@ utils::Bool Topology::is_inter_core_hop(Qubit source, Qubit target) const {
  * Returns 0 iff source == target.
  */
 utils::UInt Topology::get_distance(Qubit source, Qubit target) const {
+    if (connectivity == GridConnectivity::FULL) {
+        if (source == target) {
+            return 0;
+        }
+        utils::UInt d = 1;
+        if (get_core_index(source) == get_core_index(target)) {
+            return d;
+        }
+        if (!is_comm_qubit(source)) {
+            d++;
+        }
+        if (!is_comm_qubit(target)) {
+            d++;
+        }
+        return d;
+    }
+
     return distance[source][target];
 }
 
@@ -724,7 +762,7 @@ void Topology::dump(std::ostream &os, const utils::Str &line_prefix) const {
     for (utils::UInt i = 0; i < num_qubits; i++) {
         os << line_prefix << "qubit[" << i << "]=" << xy_coord.dbg(i);
         os << " has neighbors";
-        for (auto &n : neighbors.get(i)) {
+        for (auto &n : get_neighbors(i)) {
             os << " qubit[" << n << "]=" << xy_coord.dbg(i);
         }
         os << "\n";
diff --git a/src/ql/pmgr/manager.cc b/src/ql/pmgr/manager.cc
index f00da9a41..5f711b75f 100644
--- a/src/ql/pmgr/manager.cc
+++ b/src/ql/pmgr/manager.cc
@@ -343,6 +343,10 @@ static utils::Map<utils::Str, utils::Str> convert_global_to_pass_options() {
     if (scheduler_commute_rotations.is_set()) {
         retval.set("commute_single_qubit") = scheduler_commute_rotations.as_str();
     }
+    const auto &scheduler_heuristic = com::options::global["scheduler_heuristic"];
+    if (scheduler_heuristic.is_set()) {
+        retval.set("scheduler_heuristic") = scheduler_heuristic.as_str();
+    }
     const auto &print_dot_graphs = com::options::global["print_dot_graphs"];
     if (print_dot_graphs.is_set()) {
         retval.set("write_dot_graphs") = print_dot_graphs.as_str();
@@ -368,6 +372,10 @@ static utils::Map<utils::Str, utils::Str> convert_global_to_pass_options() {
     if (mapper.is_set() && mapper.as_str() != "no") {
         retval.set("route_heuristic") = mapper.as_str();
     }
+    const auto &mapmaxalters = com::options::global["mapmaxalters"];
+    if (mapmaxalters.is_set()) {
+        retval.set("max_alternative_routes") = mapmaxalters.as_str();
+    }
     const auto &mapinitone2one = com::options::global["mapinitone2one"];
     if (mapinitone2one.is_set()) {
         retval.set("initialize_one_to_one") = mapinitone2one.as_str();
diff --git a/src/ql/utils/progress.cc b/src/ql/utils/progress.cc
new file mode 100644
index 000000000..ebede603d
--- /dev/null
+++ b/src/ql/utils/progress.cc
@@ -0,0 +1,76 @@
+/** \file
+ * Provides utilities for working with strings that the STL fails to
+ * satisfactorily provide.
+ */
+
+#include "ql/utils/progress.h"
+
+#include <iomanip>
+#include "ql/utils/logger.h"
+
+namespace ql {
+namespace utils {
+
+/**
+ * Constructor that doesn't print anything.
+ */
+Progress::Progress() :
+    prefix(),
+    interval(0)
+{
+    start = Clock::now();
+    prev = start;
+}
+
+/**
+ * Progress monitor constructor. Also starts the timer.
+ */
+Progress::Progress(
+    const Str &prefix,
+    UInt interval
+) :
+    prefix(prefix),
+    interval(interval)
+{
+    QL_IOUT(prefix << ": starting...");
+    start = Clock::now();
+    prev = start;
+}
+
+/**
+ * Prints the current progress and ETA, if enough time has passed since
+ * the previous print.
+ */
+void Progress::feed(Real progress) {
+    if (prefix.empty()) return;
+    auto now = Clock::now();
+    if (std::chrono::duration_cast<std::chrono::milliseconds>(now - prev).count() > (Int)interval) {
+        UInt millis_thus_far = std::chrono::duration_cast<std::chrono::milliseconds>(now - start).count();
+        UInt millis_eta = 0;
+        if (progress > 0.01 && progress < 1) {
+            millis_eta = millis_thus_far / progress - millis_thus_far;
+        }
+        utils::StrStrm ss;
+        ss << std::fixed << std::setprecision(2) << (progress * 100) << "%";
+        ss << " after " << (millis_thus_far / 1000) << "s";
+        if (millis_eta) {
+            ss << ", ETA " << (millis_eta / 1000) << "s";
+        }
+        QL_IOUT(prefix << ": " << ss.str());
+        prev = now;
+    }
+}
+
+/**
+ * Prints a completion message that includes total time taken.
+ */
+void Progress::complete() {
+    if (prefix.empty()) return;
+    auto now = Clock::now();
+    UInt millis_thus_far = std::chrono::duration_cast<std::chrono::milliseconds>(now - start).count();
+    QL_IOUT(prefix << ": completed within " << millis_thus_far << "ms");
+    prefix.clear();
+}
+
+} // namespace utils
+} // namespace ql


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index f9db4de0a..bc5fc8573 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -107,7 +107,6 @@ jobs:
       shell: powershell
       run: |
         choco install winflexbison3 --version 2.5.18.20190508
-        choco install swig --version 4.0.1
     - name: Select build type
       if: matrix.os == 'windows-latest'
       shell: powershell
diff --git a/tests/golden/test_mc_wide_last.qasm b/tests/golden/test_mc_wide_last.qasm
new file mode 100644
index 000000000..a152066a0
--- /dev/null
+++ b/tests/golden/test_mc_wide_last.qasm
@@ -0,0 +1,8 @@
+version 1.0
+# this file has been automatically generated by the OpenQL compiler please do not modify it manually.
+qubits 8192
+
+.kernel_wide
+    { xm45 q[2047] | xm45 q[2046] | xm45 q[2045] | xm45 q[2044] | xm45 q[2043] | xm45 q[2042] | xm45 q[2041] | xm45 q[2040] | xm45 q[2039] | xm45 q[2038] | xm45 q[2037] | xm45 q[2036] | xm45 q[2035] | xm45 q[2034] | xm45 q[2033] | xm45 q[2032] | xm45 q[2031] | xm45 q[2030] | xm45 q[2029] | xm45 q[2028] | xm45 q[2027] | xm45 q[2026] | xm45 q[2025] | xm45 q[2024] | xm45 q[2023] | xm45 q[2022] | xm45 q[2021] | xm45 q[2020] | xm45 q[2019] | xm45 q[2018] | xm45 q[2017] | xm45 q[2016] | xm45 q[2015] | xm45 q[2014] | xm45 q[2013] | xm45 q[2012] | xm45 q[2011] | xm45 q[2010] | xm45 q[2009] | xm45 q[2008] | xm45 q[2007] | xm45 q[2006] | xm45 q[2005] | xm45 q[2004] | xm45 q[2003] | xm45 q[2002] | xm45 q[2001] | xm45 q[2000] | xm45 q[1999] | xm45 q[1998] | xm45 q[1997] | xm45 q[1996] | xm45 q[1995] | xm45 q[1994] | xm45 q[1993] | xm45 q[1992] | xm45 q[1991] | xm45 q[1990] | xm45 q[1989] | xm45 q[1988] | xm45 q[1987] | xm45 q[1986] | xm45 q[1985] | xm45 q[1984] | xm45 q[1983] | xm45 q[1982] | xm45 q[1981] | xm45 q[1980] | xm45 q[1979] | xm45 q[1978] | xm45 q[1977] | xm45 q[1976] | xm45 q[1975] | xm45 q[1974] | xm45 q[1973] | xm45 q[1972] | xm45 q[1971] | xm45 q[1970] | xm45 q[1969] | xm45 q[1968] | xm45 q[1967] | xm45 q[1966] | xm45 q[1965] | xm45 q[1964] | xm45 q[1963] | xm45 q[1962] | xm45 q[1961] | xm45 q[1960] | xm45 q[1959] | xm45 q[1958] | xm45 q[1957] | xm45 q[1956] | xm45 q[1955] | xm45 q[1954] | xm45 q[1953] | xm45 q[1952] | xm45 q[1951] | xm45 q[1950] | xm45 q[1949] | xm45 q[1948] | xm45 q[1947] | xm45 q[1946] | xm45 q[1945] | xm45 q[1944] | xm45 q[1943] | xm45 q[1942] | xm45 q[1941] | xm45 q[1940] | xm45 q[1939] | xm45 q[1938] | xm45 q[1937] | xm45 q[1936] | xm45 q[1935] | xm45 q[1934] | xm45 q[1933] | xm45 q[1932] | xm45 q[1931] | xm45 q[1930] | xm45 q[1929] | xm45 q[1928] | xm45 q[1927] | xm45 q[1926] | xm45 q[1925] | xm45 q[1924] | xm45 q[1923] | xm45 q[1922] | xm45 q[1921] | xm45 q[1920] | xm45 q[1919] | xm45 q[1918] | xm45 q[1917] | xm45 q[1916] | xm45 q[1915] | xm45 q[1914] | xm45 q[1913] | xm45 q[1912] | xm45 q[1911] | xm45 q[1910] | xm45 q[1909] | xm45 q[1908] | xm45 q[1907] | xm45 q[1906] | xm45 q[1905] | xm45 q[1904] | xm45 q[1903] | xm45 q[1902] | xm45 q[1901] | xm45 q[1900] | xm45 q[1899] | xm45 q[1898] | xm45 q[1897] | xm45 q[1896] | xm45 q[1895] | xm45 q[1894] | xm45 q[1893] | xm45 q[1892] | xm45 q[1891] | xm45 q[1890] | xm45 q[1889] | xm45 q[1888] | xm45 q[1887] | xm45 q[1886] | xm45 q[1885] | xm45 q[1884] | xm45 q[1883] | xm45 q[1882] | xm45 q[1881] | xm45 q[1880] | xm45 q[1879] | xm45 q[1878] | xm45 q[1877] | xm45 q[1876] | xm45 q[1875] | xm45 q[1874] | xm45 q[1873] | xm45 q[1872] | xm45 q[1871] | xm45 q[1870] | xm45 q[1869] | xm45 q[1868] | xm45 q[1867] | xm45 q[1866] | xm45 q[1865] | xm45 q[1864] | xm45 q[1863] | xm45 q[1862] | xm45 q[1861] | xm45 q[1860] | xm45 q[1859] | xm45 q[1858] | xm45 q[1857] | xm45 q[1856] | xm45 q[1855] | xm45 q[1854] | xm45 q[1853] | xm45 q[1852] | xm45 q[1851] | xm45 q[1850] | xm45 q[1849] | xm45 q[1848] | xm45 q[1847] | xm45 q[1846] | xm45 q[1845] | xm45 q[1844] | xm45 q[1843] | xm45 q[1842] | xm45 q[1841] | xm45 q[1840] | xm45 q[1839] | xm45 q[1838] | xm45 q[1837] | xm45 q[1836] | xm45 q[1835] | xm45 q[1834] | xm45 q[1833] | xm45 q[1832] | xm45 q[1831] | xm45 q[1830] | xm45 q[1829] | xm45 q[1828] | xm45 q[1827] | xm45 q[1826] | xm45 q[1825] | xm45 q[1824] | xm45 q[1823] | xm45 q[1822] | xm45 q[1821] | xm45 q[1820] | xm45 q[1819] | xm45 q[1818] | xm45 q[1817] | xm45 q[1816] | xm45 q[1815] | xm45 q[1814] | xm45 q[1813] | xm45 q[1812] | xm45 q[1811] | xm45 q[1810] | xm45 q[1809] | xm45 q[1808] | xm45 q[1807] | xm45 q[1806] | xm45 q[1805] | xm45 q[1804] | xm45 q[1803] | xm45 q[1802] | xm45 q[1801] | xm45 q[1800] | xm45 q[1799] | xm45 q[1798] | xm45 q[1797] | xm45 q[1796] | xm45 q[1795] | xm45 q[1794] | xm45 q[1793] | xm45 q[1792] | xm45 q[1791] | xm45 q[1790] | xm45 q[1789] | xm45 q[1788] | xm45 q[1787] | xm45 q[1786] | xm45 q[1785] | xm45 q[1784] | xm45 q[1783] | xm45 q[1782] | xm45 q[1781] | xm45 q[1780] | xm45 q[1779] | xm45 q[1778] | xm45 q[1777] | xm45 q[1776] | xm45 q[1775] | xm45 q[1774] | xm45 q[1773] | xm45 q[1772] | xm45 q[1771] | xm45 q[1770] | xm45 q[1769] | xm45 q[1768] | xm45 q[1767] | xm45 q[1766] | xm45 q[1765] | xm45 q[1764] | xm45 q[1763] | xm45 q[1762] | xm45 q[1761] | xm45 q[1760] | xm45 q[1759] | xm45 q[1758] | xm45 q[1757] | xm45 q[1756] | xm45 q[1755] | xm45 q[1754] | xm45 q[1753] | xm45 q[1752] | xm45 q[1751] | xm45 q[1750] | xm45 q[1749] | xm45 q[1748] | xm45 q[1747] | xm45 q[1746] | xm45 q[1745] | xm45 q[1744] | xm45 q[1743] | xm45 q[1742] | xm45 q[1741] | xm45 q[1740] | xm45 q[1739] | xm45 q[1738] | xm45 q[1737] | xm45 q[1736] | xm45 q[1735] | xm45 q[1734] | xm45 q[1733] | xm45 q[1732] | xm45 q[1731] | xm45 q[1730] | xm45 q[1729] | xm45 q[1728] | xm45 q[1727] | xm45 q[1726] | xm45 q[1725] | xm45 q[1724] | xm45 q[1723] | xm45 q[1722] | xm45 q[1721] | xm45 q[1720] | xm45 q[1719] | xm45 q[1718] | xm45 q[1717] | xm45 q[1716] | xm45 q[1715] | xm45 q[1714] | xm45 q[1713] | xm45 q[1712] | xm45 q[1711] | xm45 q[1710] | xm45 q[1709] | xm45 q[1708] | xm45 q[1707] | xm45 q[1706] | xm45 q[1705] | xm45 q[1704] | xm45 q[1703] | xm45 q[1702] | xm45 q[1701] | xm45 q[1700] | xm45 q[1699] | xm45 q[1698] | xm45 q[1697] | xm45 q[1696] | xm45 q[1695] | xm45 q[1694] | xm45 q[1693] | xm45 q[1692] | xm45 q[1691] | xm45 q[1690] | xm45 q[1689] | xm45 q[1688] | xm45 q[1687] | xm45 q[1686] | xm45 q[1685] | xm45 q[1684] | xm45 q[1683] | xm45 q[1682] | xm45 q[1681] | xm45 q[1680] | xm45 q[1679] | xm45 q[1678] | xm45 q[1677] | xm45 q[1676] | xm45 q[1675] | xm45 q[1674] | xm45 q[1673] | xm45 q[1672] | xm45 q[1671] | xm45 q[1670] | xm45 q[1669] | xm45 q[1668] | xm45 q[1667] | xm45 q[1666] | xm45 q[1665] | xm45 q[1664] | xm45 q[1663] | xm45 q[1662] | xm45 q[1661] | xm45 q[1660] | xm45 q[1659] | xm45 q[1658] | xm45 q[1657] | xm45 q[1656] | xm45 q[1655] | xm45 q[1654] | xm45 q[1653] | xm45 q[1652] | xm45 q[1651] | xm45 q[1650] | xm45 q[1649] | xm45 q[1648] | xm45 q[1647] | xm45 q[1646] | xm45 q[1645] | xm45 q[1644] | xm45 q[1643] | xm45 q[1642] | xm45 q[1641] | xm45 q[1640] | xm45 q[1639] | xm45 q[1638] | xm45 q[1637] | xm45 q[1636] | xm45 q[1635] | xm45 q[1634] | xm45 q[1633] | xm45 q[1632] | xm45 q[1631] | xm45 q[1630] | xm45 q[1629] | xm45 q[1628] | xm45 q[1627] | xm45 q[1626] | xm45 q[1625] | xm45 q[1624] | xm45 q[1623] | xm45 q[1622] | xm45 q[1621] | xm45 q[1620] | xm45 q[1619] | xm45 q[1618] | xm45 q[1617] | xm45 q[1616] | xm45 q[1615] | xm45 q[1614] | xm45 q[1613] | xm45 q[1612] | xm45 q[1611] | xm45 q[1610] | xm45 q[1609] | xm45 q[1608] | xm45 q[1607] | xm45 q[1606] | xm45 q[1605] | xm45 q[1604] | xm45 q[1603] | xm45 q[1602] | xm45 q[1601] | xm45 q[1600] | xm45 q[1599] | xm45 q[1598] | xm45 q[1597] | xm45 q[1596] | xm45 q[1595] | xm45 q[1594] | xm45 q[1593] | xm45 q[1592] | xm45 q[1591] | xm45 q[1590] | xm45 q[1589] | xm45 q[1588] | xm45 q[1587] | xm45 q[1586] | xm45 q[1585] | xm45 q[1584] | xm45 q[1583] | xm45 q[1582] | xm45 q[1581] | xm45 q[1580] | xm45 q[1579] | xm45 q[1578] | xm45 q[1577] | xm45 q[1576] | xm45 q[1575] | xm45 q[1574] | xm45 q[1573] | xm45 q[1572] | xm45 q[1571] | xm45 q[1570] | xm45 q[1569] | xm45 q[1568] | xm45 q[1567] | xm45 q[1566] | xm45 q[1565] | xm45 q[1564] | xm45 q[1563] | xm45 q[1562] | xm45 q[1561] | xm45 q[1560] | xm45 q[1559] | xm45 q[1558] | xm45 q[1557] | xm45 q[1556] | xm45 q[1555] | xm45 q[1554] | xm45 q[1553] | xm45 q[1552] | xm45 q[1551] | xm45 q[1550] | xm45 q[1549] | xm45 q[1548] | xm45 q[1547] | xm45 q[1546] | xm45 q[1545] | xm45 q[1544] | xm45 q[1543] | xm45 q[1542] | xm45 q[1541] | xm45 q[1540] | xm45 q[1539] | xm45 q[1538] | xm45 q[1537] | xm45 q[1536] | xm45 q[1535] | xm45 q[1534] | xm45 q[1533] | xm45 q[1532] | xm45 q[1531] | xm45 q[1530] | xm45 q[1529] | xm45 q[1528] | xm45 q[1527] | xm45 q[1526] | xm45 q[1525] | xm45 q[1524] | xm45 q[1523] | xm45 q[1522] | xm45 q[1521] | xm45 q[1520] | xm45 q[1519] | xm45 q[1518] | xm45 q[1517] | xm45 q[1516] | xm45 q[1515] | xm45 q[1514] | xm45 q[1513] | xm45 q[1512] | xm45 q[1511] | xm45 q[1510] | xm45 q[1509] | xm45 q[1508] | xm45 q[1507] | xm45 q[1506] | xm45 q[1505] | xm45 q[1504] | xm45 q[1503] | xm45 q[1502] | xm45 q[1501] | xm45 q[1500] | xm45 q[1499] | xm45 q[1498] | xm45 q[1497] | xm45 q[1496] | xm45 q[1495] | xm45 q[1494] | xm45 q[1493] | xm45 q[1492] | xm45 q[1491] | xm45 q[1490] | xm45 q[1489] | xm45 q[1488] | xm45 q[1487] | xm45 q[1486] | xm45 q[1485] | xm45 q[1484] | xm45 q[1483] | xm45 q[1482] | xm45 q[1481] | xm45 q[1480] | xm45 q[1479] | xm45 q[1478] | xm45 q[1477] | xm45 q[1476] | xm45 q[1475] | xm45 q[1474] | xm45 q[1473] | xm45 q[1472] | xm45 q[1471] | xm45 q[1470] | xm45 q[1469] | xm45 q[1468] | xm45 q[1467] | xm45 q[1466] | xm45 q[1465] | xm45 q[1464] | xm45 q[1463] | xm45 q[1462] | xm45 q[1461] | xm45 q[1460] | xm45 q[1459] | xm45 q[1458] | xm45 q[1457] | xm45 q[1456] | xm45 q[1455] | xm45 q[1454] | xm45 q[1453] | xm45 q[1452] | xm45 q[1451] | xm45 q[1450] | xm45 q[1449] | xm45 q[1448] | xm45 q[1447] | xm45 q[1446] | xm45 q[1445] | xm45 q[1444] | xm45 q[1443] | xm45 q[1442] | xm45 q[1441] | xm45 q[1440] | xm45 q[1439] | xm45 q[1438] | xm45 q[1437] | xm45 q[1436] | xm45 q[1435] | xm45 q[1434] | xm45 q[1433] | xm45 q[1432] | xm45 q[1431] | xm45 q[1430] | xm45 q[1429] | xm45 q[1428] | xm45 q[1427] | xm45 q[1426] | xm45 q[1425] | xm45 q[1424] | xm45 q[1423] | xm45 q[1422] | xm45 q[1421] | xm45 q[1420] | xm45 q[1419] | xm45 q[1418] | xm45 q[1417] | xm45 q[1416] | xm45 q[1415] | xm45 q[1414] | xm45 q[1413] | xm45 q[1412] | xm45 q[1411] | xm45 q[1410] | xm45 q[1409] | xm45 q[1408] | xm45 q[1407] | xm45 q[1406] | xm45 q[1405] | xm45 q[1404] | xm45 q[1403] | xm45 q[1402] | xm45 q[1401] | xm45 q[1400] | xm45 q[1399] | xm45 q[1398] | xm45 q[1397] | xm45 q[1396] | xm45 q[1395] | xm45 q[1394] | xm45 q[1393] | xm45 q[1392] | xm45 q[1391] | xm45 q[1390] | xm45 q[1389] | xm45 q[1388] | xm45 q[1387] | xm45 q[1386] | xm45 q[1385] | xm45 q[1384] | xm45 q[1383] | xm45 q[1382] | xm45 q[1381] | xm45 q[1380] | xm45 q[1379] | xm45 q[1378] | xm45 q[1377] | xm45 q[1376] | xm45 q[1375] | xm45 q[1374] | xm45 q[1373] | xm45 q[1372] | xm45 q[1371] | xm45 q[1370] | xm45 q[1369] | xm45 q[1368] | xm45 q[1367] | xm45 q[1366] | xm45 q[1365] | xm45 q[1364] | xm45 q[1363] | xm45 q[1362] | xm45 q[1361] | xm45 q[1360] | xm45 q[1359] | xm45 q[1358] | xm45 q[1357] | xm45 q[1356] | xm45 q[1355] | xm45 q[1354] | xm45 q[1353] | xm45 q[1352] | xm45 q[1351] | xm45 q[1350] | xm45 q[1349] | xm45 q[1348] | xm45 q[1347] | xm45 q[1346] | xm45 q[1345] | xm45 q[1344] | xm45 q[1343] | xm45 q[1342] | xm45 q[1341] | xm45 q[1340] | xm45 q[1339] | xm45 q[1338] | xm45 q[1337] | xm45 q[1336] | xm45 q[1335] | xm45 q[1334] | xm45 q[1333] | xm45 q[1332] | xm45 q[1331] | xm45 q[1330] | xm45 q[1329] | xm45 q[1328] | xm45 q[1327] | xm45 q[1326] | xm45 q[1325] | xm45 q[1324] | xm45 q[1323] | xm45 q[1322] | xm45 q[1321] | xm45 q[1320] | xm45 q[1319] | xm45 q[1318] | xm45 q[1317] | xm45 q[1316] | xm45 q[1315] | xm45 q[1314] | xm45 q[1313] | xm45 q[1312] | xm45 q[1311] | xm45 q[1310] | xm45 q[1309] | xm45 q[1308] | xm45 q[1307] | xm45 q[1306] | xm45 q[1305] | xm45 q[1304] | xm45 q[1303] | xm45 q[1302] | xm45 q[1301] | xm45 q[1300] | xm45 q[1299] | xm45 q[1298] | xm45 q[1297] | xm45 q[1296] | xm45 q[1295] | xm45 q[1294] | xm45 q[1293] | xm45 q[1292] | xm45 q[1291] | xm45 q[1290] | xm45 q[1289] | xm45 q[1288] | xm45 q[1287] | xm45 q[1286] | xm45 q[1285] | xm45 q[1284] | xm45 q[1283] | xm45 q[1282] | xm45 q[1281] | xm45 q[1280] | xm45 q[1279] | xm45 q[1278] | xm45 q[1277] | xm45 q[1276] | xm45 q[1275] | xm45 q[1274] | xm45 q[1273] | xm45 q[1272] | xm45 q[1271] | xm45 q[1270] | xm45 q[1269] | xm45 q[1268] | xm45 q[1267] | xm45 q[1266] | xm45 q[1265] | xm45 q[1264] | xm45 q[1263] | xm45 q[1262] | xm45 q[1261] | xm45 q[1260] | xm45 q[1259] | xm45 q[1258] | xm45 q[1257] | xm45 q[1256] | xm45 q[1255] | xm45 q[1254] | xm45 q[1253] | xm45 q[1252] | xm45 q[1251] | xm45 q[1250] | xm45 q[1249] | xm45 q[1248] | xm45 q[1247] | xm45 q[1246] | xm45 q[1245] | xm45 q[1244] | xm45 q[1243] | xm45 q[1242] | xm45 q[1241] | xm45 q[1240] | xm45 q[1239] | xm45 q[1238] | xm45 q[1237] | xm45 q[1236] | xm45 q[1235] | xm45 q[1234] | xm45 q[1233] | xm45 q[1232] | xm45 q[1231] | xm45 q[1230] | xm45 q[1229] | xm45 q[1228] | xm45 q[1227] | xm45 q[1226] | xm45 q[1225] | xm45 q[1224] | xm45 q[1223] | xm45 q[1222] | xm45 q[1221] | xm45 q[1220] | xm45 q[1219] | xm45 q[1218] | xm45 q[1217] | xm45 q[1216] | xm45 q[1215] | xm45 q[1214] | xm45 q[1213] | xm45 q[1212] | xm45 q[1211] | xm45 q[1210] | xm45 q[1209] | xm45 q[1208] | xm45 q[1207] | xm45 q[1206] | xm45 q[1205] | xm45 q[1204] | xm45 q[1203] | xm45 q[1202] | xm45 q[1201] | xm45 q[1200] | xm45 q[1199] | xm45 q[1198] | xm45 q[1197] | xm45 q[1196] | xm45 q[1195] | xm45 q[1194] | xm45 q[1193] | xm45 q[1192] | xm45 q[1191] | xm45 q[1190] | xm45 q[1189] | xm45 q[1188] | xm45 q[1187] | xm45 q[1186] | xm45 q[1185] | xm45 q[1184] | xm45 q[1183] | xm45 q[1182] | xm45 q[1181] | xm45 q[1180] | xm45 q[1179] | xm45 q[1178] | xm45 q[1177] | xm45 q[1176] | xm45 q[1175] | xm45 q[1174] | xm45 q[1173] | xm45 q[1172] | xm45 q[1171] | xm45 q[1170] | xm45 q[1169] | xm45 q[1168] | xm45 q[1167] | xm45 q[1166] | xm45 q[1165] | xm45 q[1164] | xm45 q[1163] | xm45 q[1162] | xm45 q[1161] | xm45 q[1160] | xm45 q[1159] | xm45 q[1158] | xm45 q[1157] | xm45 q[1156] | xm45 q[1155] | xm45 q[1154] | xm45 q[1153] | xm45 q[1152] | xm45 q[1151] | xm45 q[1150] | xm45 q[1149] | xm45 q[1148] | xm45 q[1147] | xm45 q[1146] | xm45 q[1145] | xm45 q[1144] | xm45 q[1143] | xm45 q[1142] | xm45 q[1141] | xm45 q[1140] | xm45 q[1139] | xm45 q[1138] | xm45 q[1137] | xm45 q[1136] | xm45 q[1135] | xm45 q[1134] | xm45 q[1133] | xm45 q[1132] | xm45 q[1131] | xm45 q[1130] | xm45 q[1129] | xm45 q[1128] | xm45 q[1127] | xm45 q[1126] | xm45 q[1125] | xm45 q[1124] | xm45 q[1123] | xm45 q[1122] | xm45 q[1121] | xm45 q[1120] | xm45 q[1119] | xm45 q[1118] | xm45 q[1117] | xm45 q[1116] | xm45 q[1115] | xm45 q[1114] | xm45 q[1113] | xm45 q[1112] | xm45 q[1111] | xm45 q[1110] | xm45 q[1109] | xm45 q[1108] | xm45 q[1107] | xm45 q[1106] | xm45 q[1105] | xm45 q[1104] | xm45 q[1103] | xm45 q[1102] | xm45 q[1101] | xm45 q[1100] | xm45 q[1099] | xm45 q[1098] | xm45 q[1097] | xm45 q[1096] | xm45 q[1095] | xm45 q[1094] | xm45 q[1093] | xm45 q[1092] | xm45 q[1091] | xm45 q[1090] | xm45 q[1089] | xm45 q[1088] | xm45 q[1087] | xm45 q[1086] | xm45 q[1085] | xm45 q[1084] | xm45 q[1083] | xm45 q[1082] | xm45 q[1081] | xm45 q[1080] | xm45 q[1079] | xm45 q[1078] | xm45 q[1077] | xm45 q[1076] | xm45 q[1075] | xm45 q[1074] | xm45 q[1073] | xm45 q[1072] | xm45 q[1071] | xm45 q[1070] | xm45 q[1069] | xm45 q[1068] | xm45 q[1067] | xm45 q[1066] | xm45 q[1065] | xm45 q[1064] | xm45 q[1063] | xm45 q[1062] | xm45 q[1061] | xm45 q[1060] | xm45 q[1059] | xm45 q[1058] | xm45 q[1057] | xm45 q[1056] | xm45 q[1055] | xm45 q[1054] | xm45 q[1053] | xm45 q[1052] | xm45 q[1051] | xm45 q[1050] | xm45 q[1049] | xm45 q[1048] | xm45 q[1047] | xm45 q[1046] | xm45 q[1045] | xm45 q[1044] | xm45 q[1043] | xm45 q[1042] | xm45 q[1041] | xm45 q[1040] | xm45 q[1039] | xm45 q[1038] | xm45 q[1037] | xm45 q[1036] | xm45 q[1035] | xm45 q[1034] | xm45 q[1033] | xm45 q[1032] | xm45 q[1031] | xm45 q[1030] | xm45 q[1029] | xm45 q[1028] | xm45 q[1027] | xm45 q[1026] | xm45 q[1025] | xm45 q[1024] | xm45 q[1023] | xm45 q[1022] | xm45 q[1021] | xm45 q[1020] | xm45 q[1019] | xm45 q[1018] | xm45 q[1017] | xm45 q[1016] | xm45 q[1015] | xm45 q[1014] | xm45 q[1013] | xm45 q[1012] | xm45 q[1011] | xm45 q[1010] | xm45 q[1009] | xm45 q[1008] | xm45 q[1007] | xm45 q[1006] | xm45 q[1005] | xm45 q[1004] | xm45 q[1003] | xm45 q[1002] | xm45 q[1001] | xm45 q[1000] | xm45 q[999] | xm45 q[998] | xm45 q[997] | xm45 q[996] | xm45 q[995] | xm45 q[994] | xm45 q[993] | xm45 q[992] | xm45 q[991] | xm45 q[990] | xm45 q[989] | xm45 q[988] | xm45 q[987] | xm45 q[986] | xm45 q[985] | xm45 q[984] | xm45 q[983] | xm45 q[982] | xm45 q[981] | xm45 q[980] | xm45 q[979] | xm45 q[978] | xm45 q[977] | xm45 q[976] | xm45 q[975] | xm45 q[974] | xm45 q[973] | xm45 q[972] | xm45 q[971] | xm45 q[970] | xm45 q[969] | xm45 q[968] | xm45 q[967] | xm45 q[966] | xm45 q[965] | xm45 q[964] | xm45 q[963] | xm45 q[962] | xm45 q[961] | xm45 q[960] | xm45 q[959] | xm45 q[958] | xm45 q[957] | xm45 q[956] | xm45 q[955] | xm45 q[954] | xm45 q[953] | xm45 q[952] | xm45 q[951] | xm45 q[950] | xm45 q[949] | xm45 q[948] | xm45 q[947] | xm45 q[946] | xm45 q[945] | xm45 q[944] | xm45 q[943] | xm45 q[942] | xm45 q[941] | xm45 q[940] | xm45 q[939] | xm45 q[938] | xm45 q[937] | xm45 q[936] | xm45 q[935] | xm45 q[934] | xm45 q[933] | xm45 q[932] | xm45 q[931] | xm45 q[930] | xm45 q[929] | xm45 q[928] | xm45 q[927] | xm45 q[926] | xm45 q[925] | xm45 q[924] | xm45 q[923] | xm45 q[922] | xm45 q[921] | xm45 q[920] | xm45 q[919] | xm45 q[918] | xm45 q[917] | xm45 q[916] | xm45 q[915] | xm45 q[914] | xm45 q[913] | xm45 q[912] | xm45 q[911] | xm45 q[910] | xm45 q[909] | xm45 q[908] | xm45 q[907] | xm45 q[906] | xm45 q[905] | xm45 q[904] | xm45 q[903] | xm45 q[902] | xm45 q[901] | xm45 q[900] | xm45 q[899] | xm45 q[898] | xm45 q[897] | xm45 q[896] | xm45 q[895] | xm45 q[894] | xm45 q[893] | xm45 q[892] | xm45 q[891] | xm45 q[890] | xm45 q[889] | xm45 q[888] | xm45 q[887] | xm45 q[886] | xm45 q[885] | xm45 q[884] | xm45 q[883] | xm45 q[882] | xm45 q[881] | xm45 q[880] | xm45 q[879] | xm45 q[878] | xm45 q[877] | xm45 q[876] | xm45 q[875] | xm45 q[874] | xm45 q[873] | xm45 q[872] | xm45 q[871] | xm45 q[870] | xm45 q[869] | xm45 q[868] | xm45 q[867] | xm45 q[866] | xm45 q[865] | xm45 q[864] | xm45 q[863] | xm45 q[862] | xm45 q[861] | xm45 q[860] | xm45 q[859] | xm45 q[858] | xm45 q[857] | xm45 q[856] | xm45 q[855] | xm45 q[854] | xm45 q[853] | xm45 q[852] | xm45 q[851] | xm45 q[850] | xm45 q[849] | xm45 q[848] | xm45 q[847] | xm45 q[846] | xm45 q[845] | xm45 q[844] | xm45 q[843] | xm45 q[842] | xm45 q[841] | xm45 q[840] | xm45 q[839] | xm45 q[838] | xm45 q[837] | xm45 q[836] | xm45 q[835] | xm45 q[834] | xm45 q[833] | xm45 q[832] | xm45 q[831] | xm45 q[830] | xm45 q[829] | xm45 q[828] | xm45 q[827] | xm45 q[826] | xm45 q[825] | xm45 q[824] | xm45 q[823] | xm45 q[822] | xm45 q[821] | xm45 q[820] | xm45 q[819] | xm45 q[818] | xm45 q[817] | xm45 q[816] | xm45 q[815] | xm45 q[814] | xm45 q[813] | xm45 q[812] | xm45 q[811] | xm45 q[810] | xm45 q[809] | xm45 q[808] | xm45 q[807] | xm45 q[806] | xm45 q[805] | xm45 q[804] | xm45 q[803] | xm45 q[802] | xm45 q[801] | xm45 q[800] | xm45 q[799] | xm45 q[798] | xm45 q[797] | xm45 q[796] | xm45 q[795] | xm45 q[794] | xm45 q[793] | xm45 q[792] | xm45 q[791] | xm45 q[790] | xm45 q[789] | xm45 q[788] | xm45 q[787] | xm45 q[786] | xm45 q[785] | xm45 q[784] | xm45 q[783] | xm45 q[782] | xm45 q[781] | xm45 q[780] | xm45 q[779] | xm45 q[778] | xm45 q[777] | xm45 q[776] | xm45 q[775] | xm45 q[774] | xm45 q[773] | xm45 q[772] | xm45 q[771] | xm45 q[770] | xm45 q[769] | xm45 q[768] | xm45 q[767] | xm45 q[766] | xm45 q[765] | xm45 q[764] | xm45 q[763] | xm45 q[762] | xm45 q[761] | xm45 q[760] | xm45 q[759] | xm45 q[758] | xm45 q[757] | xm45 q[756] | xm45 q[755] | xm45 q[754] | xm45 q[753] | xm45 q[752] | xm45 q[751] | xm45 q[750] | xm45 q[749] | xm45 q[748] | xm45 q[747] | xm45 q[746] | xm45 q[745] | xm45 q[744] | xm45 q[743] | xm45 q[742] | xm45 q[741] | xm45 q[740] | xm45 q[739] | xm45 q[738] | xm45 q[737] | xm45 q[736] | xm45 q[735] | xm45 q[734] | xm45 q[733] | xm45 q[732] | xm45 q[731] | xm45 q[730] | xm45 q[729] | xm45 q[728] | xm45 q[727] | xm45 q[726] | xm45 q[725] | xm45 q[724] | xm45 q[723] | xm45 q[722] | xm45 q[721] | xm45 q[720] | xm45 q[719] | xm45 q[718] | xm45 q[717] | xm45 q[716] | xm45 q[715] | xm45 q[714] | xm45 q[713] | xm45 q[712] | xm45 q[711] | xm45 q[710] | xm45 q[709] | xm45 q[708] | xm45 q[707] | xm45 q[706] | xm45 q[705] | xm45 q[704] | xm45 q[703] | xm45 q[702] | xm45 q[701] | xm45 q[700] | xm45 q[699] | xm45 q[698] | xm45 q[697] | xm45 q[696] | xm45 q[695] | xm45 q[694] | xm45 q[693] | xm45 q[692] | xm45 q[691] | xm45 q[690] | xm45 q[689] | xm45 q[688] | xm45 q[687] | xm45 q[686] | xm45 q[685] | xm45 q[684] | xm45 q[683] | xm45 q[682] | xm45 q[681] | xm45 q[680] | xm45 q[679] | xm45 q[678] | xm45 q[677] | xm45 q[676] | xm45 q[675] | xm45 q[674] | xm45 q[673] | xm45 q[672] | xm45 q[671] | xm45 q[670] | xm45 q[669] | xm45 q[668] | xm45 q[667] | xm45 q[666] | xm45 q[665] | xm45 q[664] | xm45 q[663] | xm45 q[662] | xm45 q[661] | xm45 q[660] | xm45 q[659] | xm45 q[658] | xm45 q[657] | xm45 q[656] | xm45 q[655] | xm45 q[654] | xm45 q[653] | xm45 q[652] | xm45 q[651] | xm45 q[650] | xm45 q[649] | xm45 q[648] | xm45 q[647] | xm45 q[646] | xm45 q[645] | xm45 q[644] | xm45 q[643] | xm45 q[642] | xm45 q[641] | xm45 q[640] | xm45 q[639] | xm45 q[638] | xm45 q[637] | xm45 q[636] | xm45 q[635] | xm45 q[634] | xm45 q[633] | xm45 q[632] | xm45 q[631] | xm45 q[630] | xm45 q[629] | xm45 q[628] | xm45 q[627] | xm45 q[626] | xm45 q[625] | xm45 q[624] | xm45 q[623] | xm45 q[622] | xm45 q[621] | xm45 q[620] | xm45 q[619] | xm45 q[618] | xm45 q[617] | xm45 q[616] | xm45 q[615] | xm45 q[614] | xm45 q[613] | xm45 q[612] | xm45 q[611] | xm45 q[610] | xm45 q[609] | xm45 q[608] | xm45 q[607] | xm45 q[606] | xm45 q[605] | xm45 q[604] | xm45 q[603] | xm45 q[602] | xm45 q[601] | xm45 q[600] | xm45 q[599] | xm45 q[598] | xm45 q[597] | xm45 q[596] | xm45 q[595] | xm45 q[594] | xm45 q[593] | xm45 q[592] | xm45 q[591] | xm45 q[590] | xm45 q[589] | xm45 q[588] | xm45 q[587] | xm45 q[586] | xm45 q[585] | xm45 q[584] | xm45 q[583] | xm45 q[582] | xm45 q[581] | xm45 q[580] | xm45 q[579] | xm45 q[578] | xm45 q[577] | xm45 q[576] | xm45 q[575] | xm45 q[574] | xm45 q[573] | xm45 q[572] | xm45 q[571] | xm45 q[570] | xm45 q[569] | xm45 q[568] | xm45 q[567] | xm45 q[566] | xm45 q[565] | xm45 q[564] | xm45 q[563] | xm45 q[562] | xm45 q[561] | xm45 q[560] | xm45 q[559] | xm45 q[558] | xm45 q[557] | xm45 q[556] | xm45 q[555] | xm45 q[554] | xm45 q[553] | xm45 q[552] | xm45 q[551] | xm45 q[550] | xm45 q[549] | xm45 q[548] | xm45 q[547] | xm45 q[546] | xm45 q[545] | xm45 q[544] | xm45 q[543] | xm45 q[542] | xm45 q[541] | xm45 q[540] | xm45 q[539] | xm45 q[538] | xm45 q[537] | xm45 q[536] | xm45 q[535] | xm45 q[534] | xm45 q[533] | xm45 q[532] | xm45 q[531] | xm45 q[530] | xm45 q[529] | xm45 q[528] | xm45 q[527] | xm45 q[526] | xm45 q[525] | xm45 q[524] | xm45 q[523] | xm45 q[522] | xm45 q[521] | xm45 q[520] | xm45 q[519] | xm45 q[518] | xm45 q[517] | xm45 q[516] | xm45 q[515] | xm45 q[514] | xm45 q[513] | xm45 q[512] | xm45 q[511] | xm45 q[510] | xm45 q[509] | xm45 q[508] | xm45 q[507] | xm45 q[506] | xm45 q[505] | xm45 q[504] | xm45 q[503] | xm45 q[502] | xm45 q[501] | xm45 q[500] | xm45 q[499] | xm45 q[498] | xm45 q[497] | xm45 q[496] | xm45 q[495] | xm45 q[494] | xm45 q[493] | xm45 q[492] | xm45 q[491] | xm45 q[490] | xm45 q[489] | xm45 q[488] | xm45 q[487] | xm45 q[486] | xm45 q[485] | xm45 q[484] | xm45 q[483] | xm45 q[482] | xm45 q[481] | xm45 q[480] | xm45 q[479] | xm45 q[478] | xm45 q[477] | xm45 q[476] | xm45 q[475] | xm45 q[474] | xm45 q[473] | xm45 q[472] | xm45 q[471] | xm45 q[470] | xm45 q[469] | xm45 q[468] | xm45 q[467] | xm45 q[466] | xm45 q[465] | xm45 q[464] | xm45 q[463] | xm45 q[462] | xm45 q[461] | xm45 q[460] | xm45 q[459] | xm45 q[458] | xm45 q[457] | xm45 q[456] | xm45 q[455] | xm45 q[454] | xm45 q[453] | xm45 q[452] | xm45 q[451] | xm45 q[450] | xm45 q[449] | xm45 q[448] | xm45 q[447] | xm45 q[446] | xm45 q[445] | xm45 q[444] | xm45 q[443] | xm45 q[442] | xm45 q[441] | xm45 q[440] | xm45 q[439] | xm45 q[438] | xm45 q[437] | xm45 q[436] | xm45 q[435] | xm45 q[434] | xm45 q[433] | xm45 q[432] | xm45 q[431] | xm45 q[430] | xm45 q[429] | xm45 q[428] | xm45 q[427] | xm45 q[426] | xm45 q[425] | xm45 q[424] | xm45 q[423] | xm45 q[422] | xm45 q[421] | xm45 q[420] | xm45 q[419] | xm45 q[418] | xm45 q[417] | xm45 q[416] | xm45 q[415] | xm45 q[414] | xm45 q[413] | xm45 q[412] | xm45 q[411] | xm45 q[410] | xm45 q[409] | xm45 q[408] | xm45 q[407] | xm45 q[406] | xm45 q[405] | xm45 q[404] | xm45 q[403] | xm45 q[402] | xm45 q[401] | xm45 q[400] | xm45 q[399] | xm45 q[398] | xm45 q[397] | xm45 q[396] | xm45 q[395] | xm45 q[394] | xm45 q[393] | xm45 q[392] | xm45 q[391] | xm45 q[390] | xm45 q[389] | xm45 q[388] | xm45 q[387] | xm45 q[386] | xm45 q[385] | xm45 q[384] | xm45 q[383] | xm45 q[382] | xm45 q[381] | xm45 q[380] | xm45 q[379] | xm45 q[378] | xm45 q[377] | xm45 q[376] | xm45 q[375] | xm45 q[374] | xm45 q[373] | xm45 q[372] | xm45 q[371] | xm45 q[370] | xm45 q[369] | xm45 q[368] | xm45 q[367] | xm45 q[366] | xm45 q[365] | xm45 q[364] | xm45 q[363] | xm45 q[362] | xm45 q[361] | xm45 q[360] | xm45 q[359] | xm45 q[358] | xm45 q[357] | xm45 q[356] | xm45 q[355] | xm45 q[354] | xm45 q[353] | xm45 q[352] | xm45 q[351] | xm45 q[350] | xm45 q[349] | xm45 q[348] | xm45 q[347] | xm45 q[346] | xm45 q[345] | xm45 q[344] | xm45 q[343] | xm45 q[342] | xm45 q[341] | xm45 q[340] | xm45 q[339] | xm45 q[338] | xm45 q[337] | xm45 q[336] | xm45 q[335] | xm45 q[334] | xm45 q[333] | xm45 q[332] | xm45 q[331] | xm45 q[330] | xm45 q[329] | xm45 q[328] | xm45 q[327] | xm45 q[326] | xm45 q[325] | xm45 q[324] | xm45 q[323] | xm45 q[322] | xm45 q[321] | xm45 q[320] | xm45 q[319] | xm45 q[318] | xm45 q[317] | xm45 q[316] | xm45 q[315] | xm45 q[314] | xm45 q[313] | xm45 q[312] | xm45 q[311] | xm45 q[310] | xm45 q[309] | xm45 q[308] | xm45 q[307] | xm45 q[306] | xm45 q[305] | xm45 q[304] | xm45 q[303] | xm45 q[302] | xm45 q[301] | xm45 q[300] | xm45 q[299] | xm45 q[298] | xm45 q[297] | xm45 q[296] | xm45 q[295] | xm45 q[294] | xm45 q[293] | xm45 q[292] | xm45 q[291] | xm45 q[290] | xm45 q[289] | xm45 q[288] | xm45 q[287] | xm45 q[286] | xm45 q[285] | xm45 q[284] | xm45 q[283] | xm45 q[282] | xm45 q[281] | xm45 q[280] | xm45 q[279] | xm45 q[278] | xm45 q[277] | xm45 q[276] | xm45 q[275] | xm45 q[274] | xm45 q[273] | xm45 q[272] | xm45 q[271] | xm45 q[270] | xm45 q[269] | xm45 q[268] | xm45 q[267] | xm45 q[266] | xm45 q[265] | xm45 q[264] | xm45 q[263] | xm45 q[262] | xm45 q[261] | xm45 q[260] | xm45 q[259] | xm45 q[258] | xm45 q[257] | xm45 q[256] | xm45 q[255] | xm45 q[254] | xm45 q[253] | xm45 q[252] | xm45 q[251] | xm45 q[250] | xm45 q[249] | xm45 q[248] | xm45 q[247] | xm45 q[246] | xm45 q[245] | xm45 q[244] | xm45 q[243] | xm45 q[242] | xm45 q[241] | xm45 q[240] | xm45 q[239] | xm45 q[238] | xm45 q[237] | xm45 q[236] | xm45 q[235] | xm45 q[234] | xm45 q[233] | xm45 q[232] | xm45 q[231] | xm45 q[230] | xm45 q[229] | xm45 q[228] | xm45 q[227] | xm45 q[226] | xm45 q[225] | xm45 q[224] | xm45 q[223] | xm45 q[222] | xm45 q[221] | xm45 q[220] | xm45 q[219] | xm45 q[218] | xm45 q[217] | xm45 q[216] | xm45 q[215] | xm45 q[214] | xm45 q[213] | xm45 q[212] | xm45 q[211] | xm45 q[210] | xm45 q[209] | xm45 q[208] | xm45 q[207] | xm45 q[206] | xm45 q[205] | xm45 q[204] | xm45 q[203] | xm45 q[202] | xm45 q[201] | xm45 q[200] | xm45 q[199] | xm45 q[198] | xm45 q[197] | xm45 q[196] | xm45 q[195] | xm45 q[194] | xm45 q[193] | xm45 q[192] | xm45 q[191] | xm45 q[190] | xm45 q[189] | xm45 q[188] | xm45 q[187] | xm45 q[186] | xm45 q[185] | xm45 q[184] | xm45 q[183] | xm45 q[182] | xm45 q[181] | xm45 q[180] | xm45 q[179] | xm45 q[178] | xm45 q[177] | xm45 q[176] | xm45 q[175] | xm45 q[174] | xm45 q[173] | xm45 q[172] | xm45 q[171] | xm45 q[170] | xm45 q[169] | xm45 q[168] | xm45 q[167] | xm45 q[166] | xm45 q[165] | xm45 q[164] | xm45 q[163] | xm45 q[162] | xm45 q[161] | xm45 q[160] | xm45 q[159] | xm45 q[158] | xm45 q[157] | xm45 q[156] | xm45 q[155] | xm45 q[154] | xm45 q[153] | xm45 q[152] | xm45 q[151] | xm45 q[150] | xm45 q[149] | xm45 q[148] | xm45 q[147] | xm45 q[146] | xm45 q[145] | xm45 q[144] | xm45 q[143] | xm45 q[142] | xm45 q[141] | xm45 q[140] | xm45 q[139] | xm45 q[138] | xm45 q[137] | xm45 q[136] | xm45 q[135] | xm45 q[134] | xm45 q[133] | xm45 q[132] | xm45 q[131] | xm45 q[130] | xm45 q[129] | xm45 q[128] | xm45 q[127] | xm45 q[126] | xm45 q[125] | xm45 q[124] | xm45 q[123] | xm45 q[122] | xm45 q[121] | xm45 q[120] | xm45 q[119] | xm45 q[118] | xm45 q[117] | xm45 q[116] | xm45 q[115] | xm45 q[114] | xm45 q[113] | xm45 q[112] | xm45 q[111] | xm45 q[110] | xm45 q[109] | xm45 q[108] | xm45 q[107] | xm45 q[106] | xm45 q[105] | xm45 q[104] | xm45 q[103] | xm45 q[102] | xm45 q[101] | xm45 q[100] | xm45 q[99] | xm45 q[98] | xm45 q[97] | xm45 q[96] | xm45 q[95] | xm45 q[94] | xm45 q[93] | xm45 q[92] | xm45 q[91] | xm45 q[90] | xm45 q[89] | xm45 q[88] | xm45 q[87] | xm45 q[86] | xm45 q[85] | xm45 q[84] | xm45 q[83] | xm45 q[82] | xm45 q[81] | xm45 q[80] | xm45 q[79] | xm45 q[78] | xm45 q[77] | xm45 q[76] | xm45 q[75] | xm45 q[74] | xm45 q[73] | xm45 q[72] | xm45 q[71] | xm45 q[70] | xm45 q[69] | xm45 q[68] | xm45 q[67] | xm45 q[66] | xm45 q[65] | xm45 q[64] | xm45 q[63] | xm45 q[62] | xm45 q[61] | xm45 q[60] | xm45 q[59] | xm45 q[58] | xm45 q[57] | xm45 q[56] | xm45 q[55] | xm45 q[54] | xm45 q[53] | xm45 q[52] | xm45 q[51] | xm45 q[50] | xm45 q[49] | xm45 q[48] | xm45 q[47] | xm45 q[46] | xm45 q[45] | xm45 q[44] | xm45 q[43] | xm45 q[42] | xm45 q[41] | xm45 q[40] | xm45 q[39] | xm45 q[38] | xm45 q[37] | xm45 q[36] | xm45 q[35] | xm45 q[34] | xm45 q[33] | xm45 q[32] | xm45 q[31] | xm45 q[30] | xm45 q[29] | xm45 q[28] | xm45 q[27] | xm45 q[26] | xm45 q[25] | xm45 q[24] | xm45 q[23] | xm45 q[22] | xm45 q[21] | xm45 q[20] | xm45 q[19] | xm45 q[18] | xm45 q[17] | xm45 q[16] | xm45 q[15] | xm45 q[14] | xm45 q[13] | xm45 q[12] | xm45 q[11] | xm45 q[10] | xm45 q[9] | xm45 q[8] | xm45 q[7] | xm45 q[6] | xm45 q[5] | xm45 q[4] | xm45 q[3] | xm45 q[2] | xm45 q[1] | xm45 q[0] }
+    { measure q[2047] | measure q[2046] | measure q[2045] | measure q[2044] | measure q[2043] | measure q[2042] | measure q[2041] | measure q[2040] | measure q[2039] | measure q[2038] | measure q[2037] | measure q[2036] | measure q[2035] | measure q[2034] | measure q[2033] | measure q[2032] | measure q[2031] | measure q[2030] | measure q[2029] | measure q[2028] | measure q[2027] | measure q[2026] | measure q[2025] | measure q[2024] | measure q[2023] | measure q[2022] | measure q[2021] | measure q[2020] | measure q[2019] | measure q[2018] | measure q[2017] | measure q[2016] | measure q[2015] | measure q[2014] | measure q[2013] | measure q[2012] | measure q[2011] | measure q[2010] | measure q[2009] | measure q[2008] | measure q[2007] | measure q[2006] | measure q[2005] | measure q[2004] | measure q[2003] | measure q[2002] | measure q[2001] | measure q[2000] | measure q[1999] | measure q[1998] | measure q[1997] | measure q[1996] | measure q[1995] | measure q[1994] | measure q[1993] | measure q[1992] | measure q[1991] | measure q[1990] | measure q[1989] | measure q[1988] | measure q[1987] | measure q[1986] | measure q[1985] | measure q[1984] | measure q[1983] | measure q[1982] | measure q[1981] | measure q[1980] | measure q[1979] | measure q[1978] | measure q[1977] | measure q[1976] | measure q[1975] | measure q[1974] | measure q[1973] | measure q[1972] | measure q[1971] | measure q[1970] | measure q[1969] | measure q[1968] | measure q[1967] | measure q[1966] | measure q[1965] | measure q[1964] | measure q[1963] | measure q[1962] | measure q[1961] | measure q[1960] | measure q[1959] | measure q[1958] | measure q[1957] | measure q[1956] | measure q[1955] | measure q[1954] | measure q[1953] | measure q[1952] | measure q[1951] | measure q[1950] | measure q[1949] | measure q[1948] | measure q[1947] | measure q[1946] | measure q[1945] | measure q[1944] | measure q[1943] | measure q[1942] | measure q[1941] | measure q[1940] | measure q[1939] | measure q[1938] | measure q[1937] | measure q[1936] | measure q[1935] | measure q[1934] | measure q[1933] | measure q[1932] | measure q[1931] | measure q[1930] | measure q[1929] | measure q[1928] | measure q[1927] | measure q[1926] | measure q[1925] | measure q[1924] | measure q[1923] | measure q[1922] | measure q[1921] | measure q[1920] | measure q[1919] | measure q[1918] | measure q[1917] | measure q[1916] | measure q[1915] | measure q[1914] | measure q[1913] | measure q[1912] | measure q[1911] | measure q[1910] | measure q[1909] | measure q[1908] | measure q[1907] | measure q[1906] | measure q[1905] | measure q[1904] | measure q[1903] | measure q[1902] | measure q[1901] | measure q[1900] | measure q[1899] | measure q[1898] | measure q[1897] | measure q[1896] | measure q[1895] | measure q[1894] | measure q[1893] | measure q[1892] | measure q[1891] | measure q[1890] | measure q[1889] | measure q[1888] | measure q[1887] | measure q[1886] | measure q[1885] | measure q[1884] | measure q[1883] | measure q[1882] | measure q[1881] | measure q[1880] | measure q[1879] | measure q[1878] | measure q[1877] | measure q[1876] | measure q[1875] | measure q[1874] | measure q[1873] | measure q[1872] | measure q[1871] | measure q[1870] | measure q[1869] | measure q[1868] | measure q[1867] | measure q[1866] | measure q[1865] | measure q[1864] | measure q[1863] | measure q[1862] | measure q[1861] | measure q[1860] | measure q[1859] | measure q[1858] | measure q[1857] | measure q[1856] | measure q[1855] | measure q[1854] | measure q[1853] | measure q[1852] | measure q[1851] | measure q[1850] | measure q[1849] | measure q[1848] | measure q[1847] | measure q[1846] | measure q[1845] | measure q[1844] | measure q[1843] | measure q[1842] | measure q[1841] | measure q[1840] | measure q[1839] | measure q[1838] | measure q[1837] | measure q[1836] | measure q[1835] | measure q[1834] | measure q[1833] | measure q[1832] | measure q[1831] | measure q[1830] | measure q[1829] | measure q[1828] | measure q[1827] | measure q[1826] | measure q[1825] | measure q[1824] | measure q[1823] | measure q[1822] | measure q[1821] | measure q[1820] | measure q[1819] | measure q[1818] | measure q[1817] | measure q[1816] | measure q[1815] | measure q[1814] | measure q[1813] | measure q[1812] | measure q[1811] | measure q[1810] | measure q[1809] | measure q[1808] | measure q[1807] | measure q[1806] | measure q[1805] | measure q[1804] | measure q[1803] | measure q[1802] | measure q[1801] | measure q[1800] | measure q[1799] | measure q[1798] | measure q[1797] | measure q[1796] | measure q[1795] | measure q[1794] | measure q[1793] | measure q[1792] | measure q[1791] | measure q[1790] | measure q[1789] | measure q[1788] | measure q[1787] | measure q[1786] | measure q[1785] | measure q[1784] | measure q[1783] | measure q[1782] | measure q[1781] | measure q[1780] | measure q[1779] | measure q[1778] | measure q[1777] | measure q[1776] | measure q[1775] | measure q[1774] | measure q[1773] | measure q[1772] | measure q[1771] | measure q[1770] | measure q[1769] | measure q[1768] | measure q[1767] | measure q[1766] | measure q[1765] | measure q[1764] | measure q[1763] | measure q[1762] | measure q[1761] | measure q[1760] | measure q[1759] | measure q[1758] | measure q[1757] | measure q[1756] | measure q[1755] | measure q[1754] | measure q[1753] | measure q[1752] | measure q[1751] | measure q[1750] | measure q[1749] | measure q[1748] | measure q[1747] | measure q[1746] | measure q[1745] | measure q[1744] | measure q[1743] | measure q[1742] | measure q[1741] | measure q[1740] | measure q[1739] | measure q[1738] | measure q[1737] | measure q[1736] | measure q[1735] | measure q[1734] | measure q[1733] | measure q[1732] | measure q[1731] | measure q[1730] | measure q[1729] | measure q[1728] | measure q[1727] | measure q[1726] | measure q[1725] | measure q[1724] | measure q[1723] | measure q[1722] | measure q[1721] | measure q[1720] | measure q[1719] | measure q[1718] | measure q[1717] | measure q[1716] | measure q[1715] | measure q[1714] | measure q[1713] | measure q[1712] | measure q[1711] | measure q[1710] | measure q[1709] | measure q[1708] | measure q[1707] | measure q[1706] | measure q[1705] | measure q[1704] | measure q[1703] | measure q[1702] | measure q[1701] | measure q[1700] | measure q[1699] | measure q[1698] | measure q[1697] | measure q[1696] | measure q[1695] | measure q[1694] | measure q[1693] | measure q[1692] | measure q[1691] | measure q[1690] | measure q[1689] | measure q[1688] | measure q[1687] | measure q[1686] | measure q[1685] | measure q[1684] | measure q[1683] | measure q[1682] | measure q[1681] | measure q[1680] | measure q[1679] | measure q[1678] | measure q[1677] | measure q[1676] | measure q[1675] | measure q[1674] | measure q[1673] | measure q[1672] | measure q[1671] | measure q[1670] | measure q[1669] | measure q[1668] | measure q[1667] | measure q[1666] | measure q[1665] | measure q[1664] | measure q[1663] | measure q[1662] | measure q[1661] | measure q[1660] | measure q[1659] | measure q[1658] | measure q[1657] | measure q[1656] | measure q[1655] | measure q[1654] | measure q[1653] | measure q[1652] | measure q[1651] | measure q[1650] | measure q[1649] | measure q[1648] | measure q[1647] | measure q[1646] | measure q[1645] | measure q[1644] | measure q[1643] | measure q[1642] | measure q[1641] | measure q[1640] | measure q[1639] | measure q[1638] | measure q[1637] | measure q[1636] | measure q[1635] | measure q[1634] | measure q[1633] | measure q[1632] | measure q[1631] | measure q[1630] | measure q[1629] | measure q[1628] | measure q[1627] | measure q[1626] | measure q[1625] | measure q[1624] | measure q[1623] | measure q[1622] | measure q[1621] | measure q[1620] | measure q[1619] | measure q[1618] | measure q[1617] | measure q[1616] | measure q[1615] | measure q[1614] | measure q[1613] | measure q[1612] | measure q[1611] | measure q[1610] | measure q[1609] | measure q[1608] | measure q[1607] | measure q[1606] | measure q[1605] | measure q[1604] | measure q[1603] | measure q[1602] | measure q[1601] | measure q[1600] | measure q[1599] | measure q[1598] | measure q[1597] | measure q[1596] | measure q[1595] | measure q[1594] | measure q[1593] | measure q[1592] | measure q[1591] | measure q[1590] | measure q[1589] | measure q[1588] | measure q[1587] | measure q[1586] | measure q[1585] | measure q[1584] | measure q[1583] | measure q[1582] | measure q[1581] | measure q[1580] | measure q[1579] | measure q[1578] | measure q[1577] | measure q[1576] | measure q[1575] | measure q[1574] | measure q[1573] | measure q[1572] | measure q[1571] | measure q[1570] | measure q[1569] | measure q[1568] | measure q[1567] | measure q[1566] | measure q[1565] | measure q[1564] | measure q[1563] | measure q[1562] | measure q[1561] | measure q[1560] | measure q[1559] | measure q[1558] | measure q[1557] | measure q[1556] | measure q[1555] | measure q[1554] | measure q[1553] | measure q[1552] | measure q[1551] | measure q[1550] | measure q[1549] | measure q[1548] | measure q[1547] | measure q[1546] | measure q[1545] | measure q[1544] | measure q[1543] | measure q[1542] | measure q[1541] | measure q[1540] | measure q[1539] | measure q[1538] | measure q[1537] | measure q[1536] | measure q[1535] | measure q[1534] | measure q[1533] | measure q[1532] | measure q[1531] | measure q[1530] | measure q[1529] | measure q[1528] | measure q[1527] | measure q[1526] | measure q[1525] | measure q[1524] | measure q[1523] | measure q[1522] | measure q[1521] | measure q[1520] | measure q[1519] | measure q[1518] | measure q[1517] | measure q[1516] | measure q[1515] | measure q[1514] | measure q[1513] | measure q[1512] | measure q[1511] | measure q[1510] | measure q[1509] | measure q[1508] | measure q[1507] | measure q[1506] | measure q[1505] | measure q[1504] | measure q[1503] | measure q[1502] | measure q[1501] | measure q[1500] | measure q[1499] | measure q[1498] | measure q[1497] | measure q[1496] | measure q[1495] | measure q[1494] | measure q[1493] | measure q[1492] | measure q[1491] | measure q[1490] | measure q[1489] | measure q[1488] | measure q[1487] | measure q[1486] | measure q[1485] | measure q[1484] | measure q[1483] | measure q[1482] | measure q[1481] | measure q[1480] | measure q[1479] | measure q[1478] | measure q[1477] | measure q[1476] | measure q[1475] | measure q[1474] | measure q[1473] | measure q[1472] | measure q[1471] | measure q[1470] | measure q[1469] | measure q[1468] | measure q[1467] | measure q[1466] | measure q[1465] | measure q[1464] | measure q[1463] | measure q[1462] | measure q[1461] | measure q[1460] | measure q[1459] | measure q[1458] | measure q[1457] | measure q[1456] | measure q[1455] | measure q[1454] | measure q[1453] | measure q[1452] | measure q[1451] | measure q[1450] | measure q[1449] | measure q[1448] | measure q[1447] | measure q[1446] | measure q[1445] | measure q[1444] | measure q[1443] | measure q[1442] | measure q[1441] | measure q[1440] | measure q[1439] | measure q[1438] | measure q[1437] | measure q[1436] | measure q[1435] | measure q[1434] | measure q[1433] | measure q[1432] | measure q[1431] | measure q[1430] | measure q[1429] | measure q[1428] | measure q[1427] | measure q[1426] | measure q[1425] | measure q[1424] | measure q[1423] | measure q[1422] | measure q[1421] | measure q[1420] | measure q[1419] | measure q[1418] | measure q[1417] | measure q[1416] | measure q[1415] | measure q[1414] | measure q[1413] | measure q[1412] | measure q[1411] | measure q[1410] | measure q[1409] | measure q[1408] | measure q[1407] | measure q[1406] | measure q[1405] | measure q[1404] | measure q[1403] | measure q[1402] | measure q[1401] | measure q[1400] | measure q[1399] | measure q[1398] | measure q[1397] | measure q[1396] | measure q[1395] | measure q[1394] | measure q[1393] | measure q[1392] | measure q[1391] | measure q[1390] | measure q[1389] | measure q[1388] | measure q[1387] | measure q[1386] | measure q[1385] | measure q[1384] | measure q[1383] | measure q[1382] | measure q[1381] | measure q[1380] | measure q[1379] | measure q[1378] | measure q[1377] | measure q[1376] | measure q[1375] | measure q[1374] | measure q[1373] | measure q[1372] | measure q[1371] | measure q[1370] | measure q[1369] | measure q[1368] | measure q[1367] | measure q[1366] | measure q[1365] | measure q[1364] | measure q[1363] | measure q[1362] | measure q[1361] | measure q[1360] | measure q[1359] | measure q[1358] | measure q[1357] | measure q[1356] | measure q[1355] | measure q[1354] | measure q[1353] | measure q[1352] | measure q[1351] | measure q[1350] | measure q[1349] | measure q[1348] | measure q[1347] | measure q[1346] | measure q[1345] | measure q[1344] | measure q[1343] | measure q[1342] | measure q[1341] | measure q[1340] | measure q[1339] | measure q[1338] | measure q[1337] | measure q[1336] | measure q[1335] | measure q[1334] | measure q[1333] | measure q[1332] | measure q[1331] | measure q[1330] | measure q[1329] | measure q[1328] | measure q[1327] | measure q[1326] | measure q[1325] | measure q[1324] | measure q[1323] | measure q[1322] | measure q[1321] | measure q[1320] | measure q[1319] | measure q[1318] | measure q[1317] | measure q[1316] | measure q[1315] | measure q[1314] | measure q[1313] | measure q[1312] | measure q[1311] | measure q[1310] | measure q[1309] | measure q[1308] | measure q[1307] | measure q[1306] | measure q[1305] | measure q[1304] | measure q[1303] | measure q[1302] | measure q[1301] | measure q[1300] | measure q[1299] | measure q[1298] | measure q[1297] | measure q[1296] | measure q[1295] | measure q[1294] | measure q[1293] | measure q[1292] | measure q[1291] | measure q[1290] | measure q[1289] | measure q[1288] | measure q[1287] | measure q[1286] | measure q[1285] | measure q[1284] | measure q[1283] | measure q[1282] | measure q[1281] | measure q[1280] | measure q[1279] | measure q[1278] | measure q[1277] | measure q[1276] | measure q[1275] | measure q[1274] | measure q[1273] | measure q[1272] | measure q[1271] | measure q[1270] | measure q[1269] | measure q[1268] | measure q[1267] | measure q[1266] | measure q[1265] | measure q[1264] | measure q[1263] | measure q[1262] | measure q[1261] | measure q[1260] | measure q[1259] | measure q[1258] | measure q[1257] | measure q[1256] | measure q[1255] | measure q[1254] | measure q[1253] | measure q[1252] | measure q[1251] | measure q[1250] | measure q[1249] | measure q[1248] | measure q[1247] | measure q[1246] | measure q[1245] | measure q[1244] | measure q[1243] | measure q[1242] | measure q[1241] | measure q[1240] | measure q[1239] | measure q[1238] | measure q[1237] | measure q[1236] | measure q[1235] | measure q[1234] | measure q[1233] | measure q[1232] | measure q[1231] | measure q[1230] | measure q[1229] | measure q[1228] | measure q[1227] | measure q[1226] | measure q[1225] | measure q[1224] | measure q[1223] | measure q[1222] | measure q[1221] | measure q[1220] | measure q[1219] | measure q[1218] | measure q[1217] | measure q[1216] | measure q[1215] | measure q[1214] | measure q[1213] | measure q[1212] | measure q[1211] | measure q[1210] | measure q[1209] | measure q[1208] | measure q[1207] | measure q[1206] | measure q[1205] | measure q[1204] | measure q[1203] | measure q[1202] | measure q[1201] | measure q[1200] | measure q[1199] | measure q[1198] | measure q[1197] | measure q[1196] | measure q[1195] | measure q[1194] | measure q[1193] | measure q[1192] | measure q[1191] | measure q[1190] | measure q[1189] | measure q[1188] | measure q[1187] | measure q[1186] | measure q[1185] | measure q[1184] | measure q[1183] | measure q[1182] | measure q[1181] | measure q[1180] | measure q[1179] | measure q[1178] | measure q[1177] | measure q[1176] | measure q[1175] | measure q[1174] | measure q[1173] | measure q[1172] | measure q[1171] | measure q[1170] | measure q[1169] | measure q[1168] | measure q[1167] | measure q[1166] | measure q[1165] | measure q[1164] | measure q[1163] | measure q[1162] | measure q[1161] | measure q[1160] | measure q[1159] | measure q[1158] | measure q[1157] | measure q[1156] | measure q[1155] | measure q[1154] | measure q[1153] | measure q[1152] | measure q[1151] | measure q[1150] | measure q[1149] | measure q[1148] | measure q[1147] | measure q[1146] | measure q[1145] | measure q[1144] | measure q[1143] | measure q[1142] | measure q[1141] | measure q[1140] | measure q[1139] | measure q[1138] | measure q[1137] | measure q[1136] | measure q[1135] | measure q[1134] | measure q[1133] | measure q[1132] | measure q[1131] | measure q[1130] | measure q[1129] | measure q[1128] | measure q[1127] | measure q[1126] | measure q[1125] | measure q[1124] | measure q[1123] | measure q[1122] | measure q[1121] | measure q[1120] | measure q[1119] | measure q[1118] | measure q[1117] | measure q[1116] | measure q[1115] | measure q[1114] | measure q[1113] | measure q[1112] | measure q[1111] | measure q[1110] | measure q[1109] | measure q[1108] | measure q[1107] | measure q[1106] | measure q[1105] | measure q[1104] | measure q[1103] | measure q[1102] | measure q[1101] | measure q[1100] | measure q[1099] | measure q[1098] | measure q[1097] | measure q[1096] | measure q[1095] | measure q[1094] | measure q[1093] | measure q[1092] | measure q[1091] | measure q[1090] | measure q[1089] | measure q[1088] | measure q[1087] | measure q[1086] | measure q[1085] | measure q[1084] | measure q[1083] | measure q[1082] | measure q[1081] | measure q[1080] | measure q[1079] | measure q[1078] | measure q[1077] | measure q[1076] | measure q[1075] | measure q[1074] | measure q[1073] | measure q[1072] | measure q[1071] | measure q[1070] | measure q[1069] | measure q[1068] | measure q[1067] | measure q[1066] | measure q[1065] | measure q[1064] | measure q[1063] | measure q[1062] | measure q[1061] | measure q[1060] | measure q[1059] | measure q[1058] | measure q[1057] | measure q[1056] | measure q[1055] | measure q[1054] | measure q[1053] | measure q[1052] | measure q[1051] | measure q[1050] | measure q[1049] | measure q[1048] | measure q[1047] | measure q[1046] | measure q[1045] | measure q[1044] | measure q[1043] | measure q[1042] | measure q[1041] | measure q[1040] | measure q[1039] | measure q[1038] | measure q[1037] | measure q[1036] | measure q[1035] | measure q[1034] | measure q[1033] | measure q[1032] | measure q[1031] | measure q[1030] | measure q[1029] | measure q[1028] | measure q[1027] | measure q[1026] | measure q[1025] | measure q[1024] | measure q[1023] | measure q[1022] | measure q[1021] | measure q[1020] | measure q[1019] | measure q[1018] | measure q[1017] | measure q[1016] | measure q[1015] | measure q[1014] | measure q[1013] | measure q[1012] | measure q[1011] | measure q[1010] | measure q[1009] | measure q[1008] | measure q[1007] | measure q[1006] | measure q[1005] | measure q[1004] | measure q[1003] | measure q[1002] | measure q[1001] | measure q[1000] | measure q[999] | measure q[998] | measure q[997] | measure q[996] | measure q[995] | measure q[994] | measure q[993] | measure q[992] | measure q[991] | measure q[990] | measure q[989] | measure q[988] | measure q[987] | measure q[986] | measure q[985] | measure q[984] | measure q[983] | measure q[982] | measure q[981] | measure q[980] | measure q[979] | measure q[978] | measure q[977] | measure q[976] | measure q[975] | measure q[974] | measure q[973] | measure q[972] | measure q[971] | measure q[970] | measure q[969] | measure q[968] | measure q[967] | measure q[966] | measure q[965] | measure q[964] | measure q[963] | measure q[962] | measure q[961] | measure q[960] | measure q[959] | measure q[958] | measure q[957] | measure q[956] | measure q[955] | measure q[954] | measure q[953] | measure q[952] | measure q[951] | measure q[950] | measure q[949] | measure q[948] | measure q[947] | measure q[946] | measure q[945] | measure q[944] | measure q[943] | measure q[942] | measure q[941] | measure q[940] | measure q[939] | measure q[938] | measure q[937] | measure q[936] | measure q[935] | measure q[934] | measure q[933] | measure q[932] | measure q[931] | measure q[930] | measure q[929] | measure q[928] | measure q[927] | measure q[926] | measure q[925] | measure q[924] | measure q[923] | measure q[922] | measure q[921] | measure q[920] | measure q[919] | measure q[918] | measure q[917] | measure q[916] | measure q[915] | measure q[914] | measure q[913] | measure q[912] | measure q[911] | measure q[910] | measure q[909] | measure q[908] | measure q[907] | measure q[906] | measure q[905] | measure q[904] | measure q[903] | measure q[902] | measure q[901] | measure q[900] | measure q[899] | measure q[898] | measure q[897] | measure q[896] | measure q[895] | measure q[894] | measure q[893] | measure q[892] | measure q[891] | measure q[890] | measure q[889] | measure q[888] | measure q[887] | measure q[886] | measure q[885] | measure q[884] | measure q[883] | measure q[882] | measure q[881] | measure q[880] | measure q[879] | measure q[878] | measure q[877] | measure q[876] | measure q[875] | measure q[874] | measure q[873] | measure q[872] | measure q[871] | measure q[870] | measure q[869] | measure q[868] | measure q[867] | measure q[866] | measure q[865] | measure q[864] | measure q[863] | measure q[862] | measure q[861] | measure q[860] | measure q[859] | measure q[858] | measure q[857] | measure q[856] | measure q[855] | measure q[854] | measure q[853] | measure q[852] | measure q[851] | measure q[850] | measure q[849] | measure q[848] | measure q[847] | measure q[846] | measure q[845] | measure q[844] | measure q[843] | measure q[842] | measure q[841] | measure q[840] | measure q[839] | measure q[838] | measure q[837] | measure q[836] | measure q[835] | measure q[834] | measure q[833] | measure q[832] | measure q[831] | measure q[830] | measure q[829] | measure q[828] | measure q[827] | measure q[826] | measure q[825] | measure q[824] | measure q[823] | measure q[822] | measure q[821] | measure q[820] | measure q[819] | measure q[818] | measure q[817] | measure q[816] | measure q[815] | measure q[814] | measure q[813] | measure q[812] | measure q[811] | measure q[810] | measure q[809] | measure q[808] | measure q[807] | measure q[806] | measure q[805] | measure q[804] | measure q[803] | measure q[802] | measure q[801] | measure q[800] | measure q[799] | measure q[798] | measure q[797] | measure q[796] | measure q[795] | measure q[794] | measure q[793] | measure q[792] | measure q[791] | measure q[790] | measure q[789] | measure q[788] | measure q[787] | measure q[786] | measure q[785] | measure q[784] | measure q[783] | measure q[782] | measure q[781] | measure q[780] | measure q[779] | measure q[778] | measure q[777] | measure q[776] | measure q[775] | measure q[774] | measure q[773] | measure q[772] | measure q[771] | measure q[770] | measure q[769] | measure q[768] | measure q[767] | measure q[766] | measure q[765] | measure q[764] | measure q[763] | measure q[762] | measure q[761] | measure q[760] | measure q[759] | measure q[758] | measure q[757] | measure q[756] | measure q[755] | measure q[754] | measure q[753] | measure q[752] | measure q[751] | measure q[750] | measure q[749] | measure q[748] | measure q[747] | measure q[746] | measure q[745] | measure q[744] | measure q[743] | measure q[742] | measure q[741] | measure q[740] | measure q[739] | measure q[738] | measure q[737] | measure q[736] | measure q[735] | measure q[734] | measure q[733] | measure q[732] | measure q[731] | measure q[730] | measure q[729] | measure q[728] | measure q[727] | measure q[726] | measure q[725] | measure q[724] | measure q[723] | measure q[722] | measure q[721] | measure q[720] | measure q[719] | measure q[718] | measure q[717] | measure q[716] | measure q[715] | measure q[714] | measure q[713] | measure q[712] | measure q[711] | measure q[710] | measure q[709] | measure q[708] | measure q[707] | measure q[706] | measure q[705] | measure q[704] | measure q[703] | measure q[702] | measure q[701] | measure q[700] | measure q[699] | measure q[698] | measure q[697] | measure q[696] | measure q[695] | measure q[694] | measure q[693] | measure q[692] | measure q[691] | measure q[690] | measure q[689] | measure q[688] | measure q[687] | measure q[686] | measure q[685] | measure q[684] | measure q[683] | measure q[682] | measure q[681] | measure q[680] | measure q[679] | measure q[678] | measure q[677] | measure q[676] | measure q[675] | measure q[674] | measure q[673] | measure q[672] | measure q[671] | measure q[670] | measure q[669] | measure q[668] | measure q[667] | measure q[666] | measure q[665] | measure q[664] | measure q[663] | measure q[662] | measure q[661] | measure q[660] | measure q[659] | measure q[658] | measure q[657] | measure q[656] | measure q[655] | measure q[654] | measure q[653] | measure q[652] | measure q[651] | measure q[650] | measure q[649] | measure q[648] | measure q[647] | measure q[646] | measure q[645] | measure q[644] | measure q[643] | measure q[642] | measure q[641] | measure q[640] | measure q[639] | measure q[638] | measure q[637] | measure q[636] | measure q[635] | measure q[634] | measure q[633] | measure q[632] | measure q[631] | measure q[630] | measure q[629] | measure q[628] | measure q[627] | measure q[626] | measure q[625] | measure q[624] | measure q[623] | measure q[622] | measure q[621] | measure q[620] | measure q[619] | measure q[618] | measure q[617] | measure q[616] | measure q[615] | measure q[614] | measure q[613] | measure q[612] | measure q[611] | measure q[610] | measure q[609] | measure q[608] | measure q[607] | measure q[606] | measure q[605] | measure q[604] | measure q[603] | measure q[602] | measure q[601] | measure q[600] | measure q[599] | measure q[598] | measure q[597] | measure q[596] | measure q[595] | measure q[594] | measure q[593] | measure q[592] | measure q[591] | measure q[590] | measure q[589] | measure q[588] | measure q[587] | measure q[586] | measure q[585] | measure q[584] | measure q[583] | measure q[582] | measure q[581] | measure q[580] | measure q[579] | measure q[578] | measure q[577] | measure q[576] | measure q[575] | measure q[574] | measure q[573] | measure q[572] | measure q[571] | measure q[570] | measure q[569] | measure q[568] | measure q[567] | measure q[566] | measure q[565] | measure q[564] | measure q[563] | measure q[562] | measure q[561] | measure q[560] | measure q[559] | measure q[558] | measure q[557] | measure q[556] | measure q[555] | measure q[554] | measure q[553] | measure q[552] | measure q[551] | measure q[550] | measure q[549] | measure q[548] | measure q[547] | measure q[546] | measure q[545] | measure q[544] | measure q[543] | measure q[542] | measure q[541] | measure q[540] | measure q[539] | measure q[538] | measure q[537] | measure q[536] | measure q[535] | measure q[534] | measure q[533] | measure q[532] | measure q[531] | measure q[530] | measure q[529] | measure q[528] | measure q[527] | measure q[526] | measure q[525] | measure q[524] | measure q[523] | measure q[522] | measure q[521] | measure q[520] | measure q[519] | measure q[518] | measure q[517] | measure q[516] | measure q[515] | measure q[514] | measure q[513] | measure q[512] | measure q[511] | measure q[510] | measure q[509] | measure q[508] | measure q[507] | measure q[506] | measure q[505] | measure q[504] | measure q[503] | measure q[502] | measure q[501] | measure q[500] | measure q[499] | measure q[498] | measure q[497] | measure q[496] | measure q[495] | measure q[494] | measure q[493] | measure q[492] | measure q[491] | measure q[490] | measure q[489] | measure q[488] | measure q[487] | measure q[486] | measure q[485] | measure q[484] | measure q[483] | measure q[482] | measure q[481] | measure q[480] | measure q[479] | measure q[478] | measure q[477] | measure q[476] | measure q[475] | measure q[474] | measure q[473] | measure q[472] | measure q[471] | measure q[470] | measure q[469] | measure q[468] | measure q[467] | measure q[466] | measure q[465] | measure q[464] | measure q[463] | measure q[462] | measure q[461] | measure q[460] | measure q[459] | measure q[458] | measure q[457] | measure q[456] | measure q[455] | measure q[454] | measure q[453] | measure q[452] | measure q[451] | measure q[450] | measure q[449] | measure q[448] | measure q[447] | measure q[446] | measure q[445] | measure q[444] | measure q[443] | measure q[442] | measure q[441] | measure q[440] | measure q[439] | measure q[438] | measure q[437] | measure q[436] | measure q[435] | measure q[434] | measure q[433] | measure q[432] | measure q[431] | measure q[430] | measure q[429] | measure q[428] | measure q[427] | measure q[426] | measure q[425] | measure q[424] | measure q[423] | measure q[422] | measure q[421] | measure q[420] | measure q[419] | measure q[418] | measure q[417] | measure q[416] | measure q[415] | measure q[414] | measure q[413] | measure q[412] | measure q[411] | measure q[410] | measure q[409] | measure q[408] | measure q[407] | measure q[406] | measure q[405] | measure q[404] | measure q[403] | measure q[402] | measure q[401] | measure q[400] | measure q[399] | measure q[398] | measure q[397] | measure q[396] | measure q[395] | measure q[394] | measure q[393] | measure q[392] | measure q[391] | measure q[390] | measure q[389] | measure q[388] | measure q[387] | measure q[386] | measure q[385] | measure q[384] | measure q[383] | measure q[382] | measure q[381] | measure q[380] | measure q[379] | measure q[378] | measure q[377] | measure q[376] | measure q[375] | measure q[374] | measure q[373] | measure q[372] | measure q[371] | measure q[370] | measure q[369] | measure q[368] | measure q[367] | measure q[366] | measure q[365] | measure q[364] | measure q[363] | measure q[362] | measure q[361] | measure q[360] | measure q[359] | measure q[358] | measure q[357] | measure q[356] | measure q[355] | measure q[354] | measure q[353] | measure q[352] | measure q[351] | measure q[350] | measure q[349] | measure q[348] | measure q[347] | measure q[346] | measure q[345] | measure q[344] | measure q[343] | measure q[342] | measure q[341] | measure q[340] | measure q[339] | measure q[338] | measure q[337] | measure q[336] | measure q[335] | measure q[334] | measure q[333] | measure q[332] | measure q[331] | measure q[330] | measure q[329] | measure q[328] | measure q[327] | measure q[326] | measure q[325] | measure q[324] | measure q[323] | measure q[322] | measure q[321] | measure q[320] | measure q[319] | measure q[318] | measure q[317] | measure q[316] | measure q[315] | measure q[314] | measure q[313] | measure q[312] | measure q[311] | measure q[310] | measure q[309] | measure q[308] | measure q[307] | measure q[306] | measure q[305] | measure q[304] | measure q[303] | measure q[302] | measure q[301] | measure q[300] | measure q[299] | measure q[298] | measure q[297] | measure q[296] | measure q[295] | measure q[294] | measure q[293] | measure q[292] | measure q[291] | measure q[290] | measure q[289] | measure q[288] | measure q[287] | measure q[286] | measure q[285] | measure q[284] | measure q[283] | measure q[282] | measure q[281] | measure q[280] | measure q[279] | measure q[278] | measure q[277] | measure q[276] | measure q[275] | measure q[274] | measure q[273] | measure q[272] | measure q[271] | measure q[270] | measure q[269] | measure q[268] | measure q[267] | measure q[266] | measure q[265] | measure q[264] | measure q[263] | measure q[262] | measure q[261] | measure q[260] | measure q[259] | measure q[258] | measure q[257] | measure q[256] | measure q[255] | measure q[254] | measure q[253] | measure q[252] | measure q[251] | measure q[250] | measure q[249] | measure q[248] | measure q[247] | measure q[246] | measure q[245] | measure q[244] | measure q[243] | measure q[242] | measure q[241] | measure q[240] | measure q[239] | measure q[238] | measure q[237] | measure q[236] | measure q[235] | measure q[234] | measure q[233] | measure q[232] | measure q[231] | measure q[230] | measure q[229] | measure q[228] | measure q[227] | measure q[226] | measure q[225] | measure q[224] | measure q[223] | measure q[222] | measure q[221] | measure q[220] | measure q[219] | measure q[218] | measure q[217] | measure q[216] | measure q[215] | measure q[214] | measure q[213] | measure q[212] | measure q[211] | measure q[210] | measure q[209] | measure q[208] | measure q[207] | measure q[206] | measure q[205] | measure q[204] | measure q[203] | measure q[202] | measure q[201] | measure q[200] | measure q[199] | measure q[198] | measure q[197] | measure q[196] | measure q[195] | measure q[194] | measure q[193] | measure q[192] | measure q[191] | measure q[190] | measure q[189] | measure q[188] | measure q[187] | measure q[186] | measure q[185] | measure q[184] | measure q[183] | measure q[182] | measure q[181] | measure q[180] | measure q[179] | measure q[178] | measure q[177] | measure q[176] | measure q[175] | measure q[174] | measure q[173] | measure q[172] | measure q[171] | measure q[170] | measure q[169] | measure q[168] | measure q[167] | measure q[166] | measure q[165] | measure q[164] | measure q[163] | measure q[162] | measure q[161] | measure q[160] | measure q[159] | measure q[158] | measure q[157] | measure q[156] | measure q[155] | measure q[154] | measure q[153] | measure q[152] | measure q[151] | measure q[150] | measure q[149] | measure q[148] | measure q[147] | measure q[146] | measure q[145] | measure q[144] | measure q[143] | measure q[142] | measure q[141] | measure q[140] | measure q[139] | measure q[138] | measure q[137] | measure q[136] | measure q[135] | measure q[134] | measure q[133] | measure q[132] | measure q[131] | measure q[130] | measure q[129] | measure q[128] | measure q[127] | measure q[126] | measure q[125] | measure q[124] | measure q[123] | measure q[122] | measure q[121] | measure q[120] | measure q[119] | measure q[118] | measure q[117] | measure q[116] | measure q[115] | measure q[114] | measure q[113] | measure q[112] | measure q[111] | measure q[110] | measure q[109] | measure q[108] | measure q[107] | measure q[106] | measure q[105] | measure q[104] | measure q[103] | measure q[102] | measure q[101] | measure q[100] | measure q[99] | measure q[98] | measure q[97] | measure q[96] | measure q[95] | measure q[94] | measure q[93] | measure q[92] | measure q[91] | measure q[90] | measure q[89] | measure q[88] | measure q[87] | measure q[86] | measure q[85] | measure q[84] | measure q[83] | measure q[82] | measure q[81] | measure q[80] | measure q[79] | measure q[78] | measure q[77] | measure q[76] | measure q[75] | measure q[74] | measure q[73] | measure q[72] | measure q[71] | measure q[70] | measure q[69] | measure q[68] | measure q[67] | measure q[66] | measure q[65] | measure q[64] | measure q[63] | measure q[62] | measure q[61] | measure q[60] | measure q[59] | measure q[58] | measure q[57] | measure q[56] | measure q[55] | measure q[54] | measure q[53] | measure q[52] | measure q[51] | measure q[50] | measure q[49] | measure q[48] | measure q[47] | measure q[46] | measure q[45] | measure q[44] | measure q[43] | measure q[42] | measure q[41] | measure q[40] | measure q[39] | measure q[38] | measure q[37] | measure q[36] | measure q[35] | measure q[34] | measure q[33] | measure q[32] | measure q[31] | measure q[30] | measure q[29] | measure q[28] | measure q[27] | measure q[26] | measure q[25] | measure q[24] | measure q[23] | measure q[22] | measure q[21] | measure q[20] | measure q[19] | measure q[18] | measure q[17] | measure q[16] | measure q[15] | measure q[14] | measure q[13] | measure q[12] | measure q[11] | measure q[10] | measure q[9] | measure q[8] | measure q[7] | measure q[6] | measure q[5] | measure q[4] | measure q[3] | measure q[2] | measure q[1] | measure q[0] }
+    wait 14
diff --git a/tests/test_multi_core_8x1024_full.json b/tests/test_multi_core_8x1024_full.json
new file mode 100644
index 000000000..952a478e1
--- /dev/null
+++ b/tests/test_multi_core_8x1024_full.json
@@ -0,0 +1,419 @@
+{
+    "eqasm_compiler" : "cc_light_compiler",
+
+    "hardware_settings": {
+        "qubit_number": 8192,
+        "cycle_time" : 20,  
+        "mw_mw_buffer": 0,
+        "mw_flux_buffer": 0,
+        "mw_readout_buffer": 0,
+        "flux_mw_buffer": 0,
+        "flux_flux_buffer": 0,
+        "flux_readout_buffer": 0,
+        "readout_mw_buffer": 0,
+        "readout_flux_buffer": 0,
+        "readout_readout_buffer": 0
+    },
+
+    "qubit_attributes":
+    {
+        "relaxation_times":
+        {
+        "0" : [3000, 1500],
+        "1" : [3000, 1500],
+        "2" : [3000, 1500],
+        "3" : [3000, 1500],
+        "4" : [3000, 1500]
+        }
+    },
+
+    "topology" : 
+    {
+        "number_of_cores":  1,
+        "connectivity": "full",
+        "form": "irregular",
+        "comm_qubits_per_core": 4
+    },
+
+    "resources":
+    {
+        "qubits":
+        {
+            "description": "Each qubit can be used by only one gate at a time. There are 'count' qubits.",
+            "count": 8192
+        },
+        "channels":
+        {
+            "description": "Each inter-core gate uses one channel in each core. There are 'count' such channels per core.",
+            "count": 4
+        }
+    },
+
+    "instructions": {
+        "prepx": {
+            "duration": 20,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "prepx",
+            "cc_light_opcode": 1
+        },
+        "prepz": {
+            "duration": 20,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "prepz",
+            "cc_light_opcode": 2
+        },
+        "measx": {
+            "duration": 340,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "readout",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "measx",
+            "cc_light_opcode": 4
+        },
+        "measz": {
+            "duration": 300,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "readout",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "measz",
+            "cc_light_opcode": 4
+        },
+        "measure": {
+            "duration": 300,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "readout",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "measz",
+            "cc_light_opcode": 4
+        },
+        "i": {
+            "duration": 20,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "i",
+            "cc_light_opcode": 5
+        },
+        "x": {
+            "duration": 20,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "x",
+            "cc_light_opcode": 6
+        },
+        "y": {
+            "duration": 20,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "y",
+            "cc_light_opcode": 7
+        },
+        "z": {
+            "duration": 40,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "z",
+            "cc_light_opcode": 8
+        },
+        "rx": {
+            "duration": 20,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "rx",
+            "cc_light_opcode": 6
+        },
+        "ry": {
+            "duration": 20,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "ry",
+            "cc_light_opcode": 7
+        },
+        "rz": {
+            "duration": 20,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "rz",
+            "cc_light_opcode": 8
+        },
+        "h": {
+            "duration": 40,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "h",
+            "cc_light_opcode": 9
+        },
+        "s": {
+            "duration": 60,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "s",
+            "cc_light_opcode": 10
+        },
+        "sdag": {
+            "duration": 60,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "sdag",
+            "cc_light_opcode": 11
+        },
+        "x90": {
+            "duration": 20,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "x90",
+            "cc_light_opcode": 12
+        },
+        "xm90": {
+            "duration": 20,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "xm90",
+            "cc_light_opcode": 13
+        },
+        "y90": {
+            "duration": 20,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "y90",
+            "cc_light_opcode": 14
+        },
+        "ym90": {
+            "duration": 20,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "ym90",
+            "cc_light_opcode": 15
+        },
+        "t": {
+            "duration": 60,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "t",
+            "cc_light_opcode": 16
+        },
+        "tdag": {
+            "duration": 60,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "tdag",
+            "cc_light_opcode": 17
+        },
+        "x45": {
+            "duration": 20,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "x45",
+            "cc_light_opcode": 18
+        },
+        "xm45": {
+            "duration": 20,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "xm45",
+            "cc_light_opcode": 19
+        },
+        "y45": {
+            "duration": 20,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "y45",
+            "cc_light_opcode": 18
+        },
+        "ym45": {
+            "duration": 20,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": false,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "ym45",
+            "cc_light_opcode": 19
+        },
+        "cz": {
+            "duration": 60,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": true,
+            "type": "flux",
+            "cc_light_instr_type": "two_qubit_gate",
+            "cc_light_instr": "cz",
+            "cc_light_opcode": 129
+        },
+        "cnot": {
+            "duration": 100,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": true,
+            "type": "flux",
+            "cc_light_instr_type": "two_qubit_gate",
+            "cc_light_instr": "cnot",
+            "cc_light_opcode": 128
+        },
+        "swap": {
+            "duration": 260,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": true,
+            "type": "flux",
+            "cc_light_instr_type": "two_qubit_gate",
+            "cc_light_instr": "swap",
+            "cc_light_opcode": 128
+        },
+        "move": {
+            "duration": 180,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": true,
+            "type": "flux",
+            "cc_light_instr_type": "two_qubit_gate",
+            "cc_light_instr": "move",
+            "cc_light_opcode": 128
+        },
+        "teleportswap": {
+            "duration": 1000,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": true,
+            "type": "extern",
+            "cc_light_instr_type": "two_qubit_gate",
+            "cc_light_instr": "teleportswap",
+            "cc_light_opcode": 128
+        },
+        "teleportmove": {
+            "duration": 600,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": true,
+            "type": "extern",
+            "cc_light_instr_type": "two_qubit_gate",
+            "cc_light_instr": "teleportmove",
+            "cc_light_opcode": 128
+        },
+        "preswap": {
+            "duration": 100,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": true,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "preswap",
+            "cc_light_opcode": 128
+        },
+        "premove": {
+            "duration": 100,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": true,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "premove",
+            "cc_light_opcode": 128
+        },
+        "postswap": {
+            "duration": 100,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": true,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "postswap",
+            "cc_light_opcode": 128
+        },
+        "postmove": {
+            "duration": 100,
+            "latency": 0,
+            "matrix": [ [0.0,1.0], [1.0,0.0], [1.0,0.0], [0.0,0.0] ],
+            "disable_optimization": true,
+            "type": "mw",
+            "cc_light_instr_type": "single_qubit_gate",
+            "cc_light_instr": "postmove",
+            "cc_light_opcode": 128
+        }
+    },
+
+    "gate_decomposition": {
+        "tswap_real %0,%1": ["preswap %0","teleportswap %0,%1","postswap %1"],
+        "tmove_real %0,%1": ["premove %0","teleportmove %0,%1","postmove %1"],
+        "rx180 %0" : ["x %0"],
+        "ry180 %0" : ["y %0"],
+        "rx90 %0" : ["x90 %0"],
+        "ry90 %0" : ["y90 %0"],
+        "mrx90 %0" : ["xm90 %0"],
+        "mry90 %0" : ["ym90 %0"],
+        "rx45 %0" : ["x45 %0"],
+        "ry45 %0" : ["y45 %0"],
+        "mrx45 %0" : ["xm45 %0"],
+        "mry45 %0" : ["ym45 %0"]
+    }
+}
diff --git a/tests/test_scale.py b/tests/test_scale.py
new file mode 100644
index 000000000..89f8f5bd9
--- /dev/null
+++ b/tests/test_scale.py
@@ -0,0 +1,82 @@
+# tests for scalability
+#
+# assumes config files: test_multi_core_8x1092_full.json
+#
+
+from openql import openql as ql
+import os
+import unittest
+from utils import file_compare
+
+
+curdir = os.path.dirname(os.path.realpath(__file__))
+output_dir = os.path.join(curdir, 'test_output')
+
+class Test_multi_core(unittest.TestCase):
+
+    def setUp(self):
+        ql.initialize()
+        # uses defaults of options in mapper branch except for output_dir and for maptiebreak
+        ql.set_option('output_dir', output_dir)     # this uses output_dir set above
+        ql.set_option('maptiebreak', 'first')       # this makes behavior deterministic to cmp with golden
+                                                    # and deviates from default
+
+        ql.set_option('log_level', 'LOG_INFO')
+        ql.set_option('optimize', 'no')
+        ql.set_option('use_default_gates', 'no')
+        ql.set_option('generate_code', 'no')
+
+        ql.set_option('decompose_toffoli', 'no')
+        ql.set_option('scheduler', 'ALAP')
+        ql.set_option('scheduler_uniform', 'no')
+        ql.set_option('scheduler_commute', 'yes')
+        ql.set_option('scheduler_commute_rotations', 'yes')
+        ql.set_option('prescheduler', 'yes')
+        ql.set_option('cz_mode', 'manual')
+        ql.set_option('print_dot_graphs', 'no')
+        
+        ql.set_option('clifford_premapper', 'yes')
+        ql.set_option('clifford_postmapper', 'no')
+        ql.set_option('mapper', 'minextend')
+        ql.set_option('mapinitone2one', 'yes')
+        ql.set_option('mapassumezeroinitstate', 'yes')
+        ql.set_option('initialplace', 'no')
+        ql.set_option('initialplace2qhorizon', '0')
+        ql.set_option('mapusemoves', 'yes')
+        ql.set_option('mapreverseswap', 'yes')
+        ql.set_option('mappathselect', 'all')
+        ql.set_option('maplookahead', 'noroutingfirst')
+        ql.set_option('maprecNN2q', 'no')
+        ql.set_option('mapselectmaxlevel', '0')
+        ql.set_option('mapselectmaxwidth', 'min')
+        
+        # ql.set_option('write_qasm_files', 'yes')
+        # ql.set_option('write_report_files', 'yes')
+
+    def test_mc_wide(self):
+        v = 'wide'
+        config = os.path.join(curdir, "test_multi_core_8x1024_full.json")
+        num_qubits = 2048
+
+        # create and set platform
+        prog_name = "test_mc_" + v
+        kernel_name = "kernel_" + v
+        starmon = ql.Platform("mc8x1092full", config)
+        prog = ql.Program(prog_name, starmon, num_qubits, 0)
+        k = ql.Kernel(kernel_name, starmon, num_qubits, 0)
+
+        for i in range(2048):
+            k.gate("xm45", [i])
+        for i in range(2048):
+            k.gate("measure", [i])
+
+        prog.add_kernel(k)
+        prog.compile()
+
+        gold_fn = curdir + '/golden/' + prog_name +'_last.qasm'
+        qasm_fn = os.path.join(output_dir, prog.name+'_last.qasm')
+        self.assertTrue( file_compare(qasm_fn, gold_fn) )
+
+if __name__ == '__main__':
+    # ql.set_option('log_level', 'LOG_INFO')
+    unittest.main()