From 6c992d5fbfcda63a26e17ed5c2df5f8eed65b770 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 2 Jun 2026 16:54:28 -0700 Subject: [PATCH 01/59] feat: implement randomized compiling --- pyquil/qpu/__init__.py | 0 pyquil/qpu/_extern_call.py | 0 pyquil/qpu/_randomized_compiling.py | 1587 +++++++++++++++++++++++++++ 3 files changed, 1587 insertions(+) create mode 100644 pyquil/qpu/__init__.py create mode 100644 pyquil/qpu/_extern_call.py create mode 100644 pyquil/qpu/_randomized_compiling.py diff --git a/pyquil/qpu/__init__.py b/pyquil/qpu/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/pyquil/qpu/_extern_call.py b/pyquil/qpu/_extern_call.py new file mode 100644 index 000000000..e69de29bb diff --git a/pyquil/qpu/_randomized_compiling.py b/pyquil/qpu/_randomized_compiling.py new file mode 100644 index 000000000..1f01ab8f4 --- /dev/null +++ b/pyquil/qpu/_randomized_compiling.py @@ -0,0 +1,1587 @@ +""" +Tests for randomized compilation of two-qubit cycles using the "merge_zxzxz_unitary_with_paulis" +suite of extern functions. Note that the test utilities here are built specifically for random compilation +with the ZXZXZ unitary decomposition. + +There are two tests of import here (everything else is a utility for these tests): + +* `test_randomized_compilation_flat`: Test randomized compilation on randomly generated mirror circuit. +* `test_randomized_compilation_looped_cases`: Test randomized compilation on a repeat base cycle within a loop. +""" + +import math +from abc import ABC, abstractmethod +from collections.abc import Generator, Sequence +from dataclasses import dataclass, field +from enum import Enum +from functools import cached_property +from typing import Literal, cast + +import numpy as np +from numpy.typing import NDArray +from qcs_sdk.client import QCSClient +from qcs_sdk.qpu.api import ExecutionOptionsBuilder +from qcs_sdk.qpu.isa import InstructionSetArchitecture +from pyquil.quil import Program +from pyquil.quilbase import Call, Declare, Delay, ClassicalMove, ArithmeticBinaryOp, Jump, JumpWhen, Label, Measurement, Gate, ClassicalComparison +from quil import expression as expr +from quil import instructions as inst +from quil import program as prog +from quil.instructions import MemoryReference +from scipy.stats import norm # type: ignore + +_BITS_PER_VALUE = 48 +_BITS_PER_PAULI = 2 +_PAULIS_PER_WORD = _BITS_PER_VALUE // _BITS_PER_PAULI +_ANGLES_PER_UNITARY = 3 +_NUMBER_PAULI_PAIRS = 16 + + +_TEdge = tuple[int, int] + + +@dataclass(frozen=True, kw_only=True) +class _TwoQubitCycle: + data: dict[int, _TEdge] = field(default_factory=dict) + + def add_edge(self, edge: _TEdge): + if edge[0] in self.data or edge[1] in self.data: + raise ValueError(f"edge {edge} overlaps with existing edges in cycle") + self.data[edge[0]] = edge + self.data[edge[1]] = edge + + def __getitem__(self, node: int) -> _TEdge: + return self.data[node] + + def __contains__(self, node: int) -> bool: + return node in self.data + + def __len__(self) -> int: + return len(self.data) // 2 + + @classmethod + def from_edges(cls, edges: Sequence[_TEdge]) -> "_TwoQubitCycle": + cycle = cls() + for edge in edges: + cycle.add_edge(edge) + return cycle + + +def _verify_final_memory( + final_memory: dict[str, list[int] | list[float]], + cycles: list[_TwoQubitCycle], + qubits_sorted: list[int], + shot_count: int, + shots_per_randomization: int | None, + original_memory: dict[str, list[int | float]], + two_qubit_gate_name: str, + names: "RandomizedCompilingVariables", + paulis_per_word: int = _PAULIS_PER_WORD, +): + """Verify that the final memory state matches expectations. + + Specifically, we take the Pauli seeds + specified in the original memory map and generate the expected final random value using + `generate_lfsr_v1_sequence` and the shot count. We then use this final seed to infer the + pair of Paulis merged for each qubit at every layer. We can then apply this Pauli pair to the + original unitaries specified for the (qubit, layer) and verify that the resulting unitary is + equal to the twirled unitaries read from the final memory for the (qubit, layer). + """ + final_pauli_cache = _FinalPauliSeedAndPairCache( + shot_count=shot_count, + shots_per_randomization=shots_per_randomization, + original_seeds={q: original_memory[names.pauli_seed(q)] for q in qubits_sorted}, + two_qubit_gate_name=two_qubit_gate_name, + cycles=cycles, + paulis_per_word=paulis_per_word, + ) + for q in qubits_sorted: + for layer_index in range(len(cycles) + 1): + seed_index = layer_index // paulis_per_word + expected_final_seed_value, final_pauli_pair = final_pauli_cache[q, layer_index] + if layer_index < len(cycles): + found_final_pauli_seed = final_memory[names.pauli_seed(q)][seed_index] + assert found_final_pauli_seed == expected_final_seed_value, ( + f"final seed value mismatch for q{q}, l{layer_index}: got " + f"{found_final_pauli_seed}, expected {expected_final_seed_value}" + ) + start_angle = layer_index * _ANGLES_PER_UNITARY + end_angle = start_angle + _ANGLES_PER_UNITARY + twirled_unitary_angles = tuple(final_memory[names.twirled_unitaries(q)][start_angle:end_angle]) + twirled_unitary = _compute_unitary_from_zxzxz_angles(twirled_unitary_angles) + unitary_angles = tuple(final_memory[names.source_unitaries(q)][start_angle:end_angle]) + expected_unitary = _compute_expected_merged_unitary(unitary_angles, final_pauli_pair) + assert _unitary_equal(twirled_unitary, expected_unitary), ( + f"unitary mismatch for q{q} layer {layer_index}: got {twirled_unitary_angles}, \ + expected {unitary_angles}, pauli pair: {final_pauli_pair}" + ) + + +def _generate_cycle_program_memory_map( + qubits_sorted: list[int], + names: "RandomizedCompilingVariables", + angles: NDArray[np.float64], +): + memory_map: dict[str, list[float | int]] = {} + _, u2_cycle_count, _ = angles.shape + for q_index, q in enumerate(qubits_sorted): + q_angles = cast(list[float], angles[q_index, :, :].reshape((u2_cycle_count * _ANGLES_PER_UNITARY,)).tolist()) + memory_map[names.unitaries(q)] = q_angles + return memory_map + + +def _generate_randomly_compiled_cycle_program_memory_map( + qubits_sorted: list[int], + u2_cycle_count: int, + names: "RandomizedCompilingVariables", + rng: np.random.Generator, + two_qubit_gate_name: Literal["CZ", "ISWAP"], + _seed_length: int, +): + memory_map: dict[str, list[float | int]] = { + names.pauli_conjugates_map: _build_pauli_conjugates_map(two_qubit_gate_name), + } + for q in qubits_sorted: + memory_map[names.pauli_seed(q)] = rng.integers(-(2**47), 2**47 - 1, size=_seed_length).tolist() + memory_map[names.twirled_unitaries(q)] = np.zeros((u2_cycle_count * _ANGLES_PER_UNITARY,), dtype=float).tolist() + return memory_map + + +def _generate_pauli_pairs( + cycles: list["_TwoQubitCycle"], qubits_sorted: list[int], names: "RandomizedCompilingVariables" +) -> list[list["_PauliPair"]]: + """ + Generate a `_PauliPair` for each qubit at each layer of the circuit; these pairs may be used to build the + instructions for randomized compilation. + """ + all_pauli_pairs = [] + depth = len(cycles) + for layer_index in range(depth + 1): + cycle_pauli_pairs = [] + + previous_cycle = cycles[layer_index - 1] if layer_index > 0 else None + for q in qubits_sorted: + if previous_cycle is not None: + previous_index = (layer_index - 1) // _PAULIS_PER_WORD + previous_pauli_index = (layer_index - 1) % _PAULIS_PER_WORD + if q in previous_cycle.data: + previous_edge = previous_cycle.data[q] + is_pauli_left = q == previous_edge[0] + conjugate = _PauliConjugate( + pauli_left=_PauliReference( + memory_reference=inst.MemoryReference(names.pauli_seed(previous_edge[0]), previous_index), + pauli_index=previous_pauli_index, + ), + pauli_right=_PauliReference( + memory_reference=inst.MemoryReference(names.pauli_seed(previous_edge[1]), previous_index), + pauli_index=previous_pauli_index, + ), + is_left_conjugate=is_pauli_left, + ) + else: + # If this qubit is not involved in a two qubit gate, we simply replay the random Pauli + # from the previous layer, since Pauli's are their own inverses. + conjugate = _PauliReference( + memory_reference=inst.MemoryReference(names.pauli_seed(q), previous_index), + pauli_index=previous_pauli_index, + ) + else: + # The conjugate for the first layer of the circuit is always the identity. + conjugate = _PauliLiteral.I + + if layer_index < len(cycles): + next_index = layer_index // _PAULIS_PER_WORD + next_pauli_index = layer_index % _PAULIS_PER_WORD + next_pauli = _PauliReference( + memory_reference=inst.MemoryReference(names.pauli_seed(q), next_index), + pauli_index=next_pauli_index, + ) + cycle_pauli_pairs.append( + _PauliPair( + previous=conjugate, + next=next_pauli, + ) + ) + else: + # The final layer must not apply a new random Pauli that requires conjugation. + cycle_pauli_pairs.append( + _PauliPair( + previous=conjugate, + next=_PauliLiteral.I, + ) + ) + all_pauli_pairs.append(cycle_pauli_pairs) + return all_pauli_pairs + + + + +@dataclass(frozen=True, kw_only=True) +class _FinalPauliSeedAndPairCache: + """A cache utility for storing and retrieving the final Pauli seeds and pairs for each qubit and layer in a + randomized compilation. Each layer beyond the first of the circuit requires knowledge of the previous + layer's Pauli pair in order to determine the conjugate. + """ + + shot_count: int + shots_per_randomization: int | None = None + original_seeds: dict[int, list[int | float]] + two_qubit_gate_name: str + cycles: list[_TwoQubitCycle] + seeds: dict[tuple[int, int], int] = field(default_factory=dict) + """Keys are are (qubit, layer_index)""" + + pauli_pairs: dict[tuple[int, int], tuple["_PauliLiteral", "_PauliLiteral"]] = field(default_factory=dict) + """Keys are (qubit, layer_index).""" + + paulis_per_word: int = _PAULIS_PER_WORD + + def _get_seed_value(self, key: tuple[int, int]) -> int: + sequence_index = self.shot_count - 1 + if self.shots_per_randomization is not None: + sequence_index = (self.shot_count - 1) // self.shots_per_randomization - 1 + q, layer_index = key + seed_index = layer_index // _PAULIS_PER_WORD + + seed_value = int(self.original_seeds[q][seed_index]) + if sequence_index >= 0: + seed_value = generate_lfsr_v1_sequence(seed_value, start_index=sequence_index, count=1)[0] + return seed_value + + def _get_random_pauli_for_seed_value(self, seed_value: int, layer_index: int) -> "_PauliLiteral": + pauli_index = layer_index % _PAULIS_PER_WORD + return _PauliLiteral(seed_value >> (2 * pauli_index) & 0b11) + + def _get_previous_random_pauli(self, key: tuple[int, int]) -> "_PauliLiteral": + q, layer_index = key + commutations = _PAULI_COMMUTATIONS[self.two_qubit_gate_name] + previous_layer_index = layer_index - 1 + previous_cycle = self.cycles[previous_layer_index] if previous_layer_index >= 0 else None + if previous_cycle is None: + previous_conjugate = _PauliLiteral.I + elif q in previous_cycle.data: + previous_edge = previous_cycle.data[q] + _, previous_pauli_pair_left = self[(previous_edge[0], previous_layer_index)] + _, previous_pauli_pair_right = self[(previous_edge[1], previous_layer_index)] + previous_pauli_pair_name = "".join([previous_pauli_pair_left[1].name, previous_pauli_pair_right[1].name]) + conjugate = commutations[previous_pauli_pair_name] + is_pauli_left = q == previous_edge[0] + previous_conjugate = _PauliLiteral.from_name(conjugate[0] if is_pauli_left else conjugate[1]) + else: + _, previous_pauli_pair = self[(q, previous_layer_index)] + previous_conjugate = previous_pauli_pair[1] + + return previous_conjugate + + def __getitem__(self, key: tuple[int, int]) -> tuple[int | None, tuple["_PauliLiteral", "_PauliLiteral"]]: + q, layer_index = key + if layer_index == len(self.cycles): + # there is no random Pauli to apply! + if key not in self.pauli_pairs: + next_pauli = _PauliLiteral.I + previous_conjugate = self._get_previous_random_pauli(key) + self.pauli_pairs[key] = (previous_conjugate, next_pauli) + return None, self.pauli_pairs[key] + if key not in self.seeds: + self.seeds[key] = self._get_seed_value(key) + seed_value = self.seeds[key] + if key not in self.pauli_pairs: + next_pauli = self._get_random_pauli_for_seed_value(seed_value, layer_index) + previous_conjugate = self._get_previous_random_pauli(key) + self.pauli_pairs[key] = (previous_conjugate, next_pauli) + pauli_pair = self.pauli_pairs[key] + return seed_value, pauli_pair + + +def _get_leading_delay_seconds(two_qubit_gate_name: Literal["CZ", "ISWAP"]) -> float: + match two_qubit_gate_name: + case "CZ": + return 2e-4 + case "ISWAP": + return 2e-3 + case _: + raise ValueError(f"unsupported two qubit gate name: {two_qubit_gate_name}") + + +def _generate_declarations_for_randomized_compiling( + qubits_sorted: list[int], + u2_cycle_count: int, + _seed_length: int, + names: "RandomizedCompilingVariables", +) -> tuple[inst.Instruction, ...]: + """Generate the Quil declaration instructions required for randomized compilation.""" + instructions = [] + instructions.append( + Declare( + names.pauli_conjugates_map, + "INTEGER", + _NUMBER_PAULI_PAIRS + ) + ) + + for q in qubits_sorted: + yield inst.Instruction.Declaration( + inst.Declaration(names.pauli_seed(q), inst.Vector(inst.ScalarType.INTEGER, _seed_length), None) + ) + for q in qubits_sorted: + yield inst.Instruction.Declaration( + inst.Declaration( + names.twirled_unitaries(q), + inst.Vector(inst.ScalarType.REAL, u2_cycle_count * _ANGLES_PER_UNITARY), + None, + ) + ) + + +def _generate_cycle_program_declarations( + qubits_sorted: list[int], depth: int, names: "_CycleNamingConventions" +) -> Generator[inst.Instruction]: + """Generate the Quil declaration instructions required for all cycle programs.""" + yield inst.Instruction.Declaration( + inst.Declaration("ro", inst.Vector(inst.ScalarType.BIT, len(qubits_sorted)), None) + ) + for q in qubits_sorted: + yield inst.Instruction.Declaration( + inst.Declaration( + names.unitaries(q), inst.Vector(inst.ScalarType.REAL, (depth + 1) * _ANGLES_PER_UNITARY), None + ) + ) + + +def _generate_random_compilation_preamble_from_pauli_pairs( + pauli_pairs: list[list["_PauliPair"]], + qubits_sorted: list[int], + depth: int, + rr_names: "_RandomizedReadoutNamingConventions | None", + names: "RandomizedCompilingVariables", +) -> Generator[inst.Instruction]: + """ + Generate the classical Quil instructions for computing the randomly compiled program's twirled unitaries for + each qubit at each layer. + """ + assert len(pauli_pairs) == depth + 1 + assert all(len(layer_literals) == len(qubits_sorted) for layer_literals in pauli_pairs) + + for q in qubits_sorted: + for seed_index in range(math.ceil(depth / _PAULIS_PER_WORD)): + yield inst.Instruction.Call( + inst.Call( + "prng_set_seed_and_step", + [ + inst.CallArgument.MemoryReference(MemoryReference(names.pauli_seed(q), seed_index)), + inst.CallArgument.MemoryReference(MemoryReference(names.pauli_seed(q), seed_index)), + ], + ) + ) + + for layer_index in range(depth + 1): + for q_index, q in enumerate(qubits_sorted): + source = names.source_unitaries(q) + if layer_index == depth and rr_names is not None: + for i in range(_ANGLES_PER_UNITARY): + yield inst.Instruction.Move( + inst.Move( + inst.MemoryReference(rr_names.readout_randomization(q), i), + inst.ArithmeticOperand.MemoryReference( + inst.MemoryReference(names.source_unitaries(q), layer_index * _ANGLES_PER_UNITARY + i) + ), + ) + ) + yield inst.Instruction.Call( + inst.Call( + "choose_random_real_sub_regions", + [ + inst.CallArgument.Identifier(rr_names.readout_randomization(q)), + inst.CallArgument.Identifier(rr_names.readout_randomization(q)), + inst.CallArgument.Immediate(complex(_ANGLES_PER_UNITARY, 0)), + inst.CallArgument.MemoryReference(MemoryReference(rr_names.readout_seed(q), 0)), + ], + ) + ) + for i in range(_ANGLES_PER_UNITARY): + yield inst.Instruction.Move( + inst.Move( + inst.MemoryReference(names.twirled_unitaries(q), layer_index * _ANGLES_PER_UNITARY + i), + inst.ArithmeticOperand.MemoryReference( + inst.MemoryReference(rr_names.readout_randomization(q), i) + ), + ) + ) + source = names.twirled_unitaries(q) + pauli_pair = pauli_pairs[layer_index][q_index] + angle_index = layer_index * _ANGLES_PER_UNITARY + yield pauli_pair.build_quil_call_instruction( + inst.CallArgument.Identifier(names.twirled_unitaries(q)), + inst.CallArgument.Identifier(source), + inst.CallArgument.Immediate(complex(angle_index, 0)), + ) + + +@dataclass(frozen=True, kw_only=True) +class RandomizedCompilingVariables: + pauli_conjugates_map: str = "pauli_conjugates_map" + unitaries_prefix: str = "unitaries" + twirled_unitaries_prefix: str = "twirled_unitaries" + pauli_seed_prefix: str = "pauli_seed" + + def source_unitaries(self, qubit: int) -> str: + return f"{self.unitaries_prefix}_q{qubit}" + + def source_unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> inst.MemoryReference: + return inst.MemoryReference(self.source_unitaries(qubit), layer_index * _ANGLES_PER_UNITARY + angle_index) + + def twirled_unitaries(self, qubit: int) -> str: + return f"{self.twirled_unitaries_prefix}_q{qubit}" + + def twirled_unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> inst.MemoryReference: + return inst.MemoryReference(self.twirled_unitaries(qubit), layer_index * _ANGLES_PER_UNITARY + angle_index) + + def pauli_seed(self, qubit: int) -> str: + return f"{self.pauli_seed_prefix}_q{qubit}" + + @property + def cycles(self) -> "_CycleNamingConventions": + return _CycleNamingConventions(unitaries_prefix=self.twirled_unitaries_prefix) + + +@dataclass(frozen=True, kw_only=True) +class _CycleNamingConventions: + unitaries_prefix: str = "unitaries" + + def unitaries(self, qubit: int) -> str: + return f"{self.unitaries_prefix}_q{qubit}" + + def unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> inst.MemoryReference: + return inst.MemoryReference(self.unitaries(qubit), layer_index * _ANGLES_PER_UNITARY + angle_index) + + +def _generate_gate_cycles( + qubits_sorted: list[int], + cycles: list[_TwoQubitCycle], + names: _CycleNamingConventions, + two_qubit_gate_name: Literal["ISWAP", "CZ"], +) -> Generator[inst.Instruction]: + """Generate the Quil instructions for the gate cycles of any cycle program.""" + all_qubits = [inst.Qubit.Fixed(q) for q in qubits_sorted] + depth = len(cycles) + yield (inst.Instruction.Fence(inst.Fence(all_qubits))) + for layer_index in range(depth + 1): + for q in qubits_sorted: + qubits = [inst.Qubit.Fixed(q)] + unitaries = names.unitaries_ref(q, layer_index, 0) + yield inst.Instruction.Gate( + inst.Gate("RZ", [utilities.radians_to_cycles(unitaries.name, unitaries.index)], qubits, []), + ) + yield inst.Instruction.Gate(utilities.sx(q)) + yield inst.Instruction.Fence(inst.Fence(all_qubits)) + for q in qubits_sorted: + qubits = [inst.Qubit.Fixed(q)] + unitaries = names.unitaries_ref(q, layer_index, 1) + yield inst.Instruction.Gate( + inst.Gate("RZ", [utilities.radians_to_cycles(unitaries.name, unitaries.index)], qubits, []), + ) + yield inst.Instruction.Gate(utilities.sx(q)) + yield inst.Instruction.Fence(inst.Fence(all_qubits)) + for q in qubits_sorted: + qubits = [inst.Qubit.Fixed(q)] + unitaries = names.unitaries_ref(q, layer_index, 2) + yield inst.Instruction.Gate( + inst.Gate("RZ", [utilities.radians_to_cycles(unitaries.name, unitaries.index)], qubits, []), + ) + if layer_index < depth: + cycle = cycles[layer_index] + for edge in set(cycle.data.values()): + qubits = [inst.Qubit.Fixed(edge[0]), inst.Qubit.Fixed(edge[1])] + yield inst.Instruction.Gate(inst.Gate(two_qubit_gate_name, [], qubits, [])) + yield inst.Instruction.Fence(inst.Fence(all_qubits)) + elif layer_index == depth: + for q in qubits_sorted: + qubit = inst.Qubit.Fixed(q) + yield inst.Instruction.Measurement(inst.Measurement(qubit, inst.MemoryReference("ro", q))) + + +def _build_cycle_program_with_randomized_compilation( + qubits_sorted: list[int], + cycles: list[_TwoQubitCycle], + two_qubit_gate_name: Literal["ISWAP", "CZ"], + pauli_pairs: list[list["_PauliPair"]], + leading_delay_seconds: float, + configuration: "_Configuration", + names: "RandomizedCompilingVariables", + _seed_length: int, +) -> prog.Program: + """Generate a cycle program with randomized compilation according to the specified configuration.""" + all_qubits = [inst.Qubit.Fixed(q) for q in qubits_sorted] + program = prog.Program() + program.add_instructions(list(utilities.generate_randomization_extern_signatures())) + program.add_instructions( + list(_generate_cycle_program_declarations(qubits_sorted, len(cycles), _CycleNamingConventions())) + ) + program.add_instructions( + list(_generate_declarations_for_randomized_compiling(qubits_sorted, len(cycles) + 1, _seed_length, names)) + ) + program.add_instructions(list(configuration.declarations(qubits_sorted))) + + if configuration.shots_per_randomization is not None: + program.add_instructions( + list(configuration.shots_per_randomization.generate_mod_shot_count_block(qubits_sorted)) + ) + else: + for q in all_qubits: + program.add_instruction( + inst.Instruction.Delay( + inst.Delay( + expr.Expression.Number(complex(leading_delay_seconds, 0)), + [], + [q], + ) + ) + ) + + program.add_instructions( + list( + _generate_random_compilation_preamble_from_pauli_pairs( + pauli_pairs, + qubits_sorted, + len(cycles), + configuration.rr_names, + names, + ) + ) + ) + if configuration.shots_per_randomization is not None: + program.add_instruction(configuration.shots_per_randomization.pulse_program_label) + if two_qubit_gate_name == "ISWAP": + # A delay here is only necessary for ISWAP. + for q in all_qubits: + program.add_instruction( + inst.Instruction.Delay(inst.Delay(expr.Expression.Number(complex(1e-5, 0)), [], [q])) + ) + else: + program.add_instruction(inst.Instruction.Fence(inst.Fence(all_qubits))) + + program.add_instructions(list(_generate_gate_cycles(qubits_sorted, cycles, names.cycles, two_qubit_gate_name))) + return program + + +def _build_cycle_program( + qubits_sorted: list[int], + cycles: list[_TwoQubitCycle], + two_qubit_gate_name: Literal["ISWAP", "CZ"], + names: _CycleNamingConventions, +) -> prog.Program: + """Generate a cycle program without randomized compilation.""" + program = prog.Program() + program.add_instructions(list(_generate_cycle_program_declarations(qubits_sorted, len(cycles), names))) + program.add_instructions(list(_generate_gate_cycles(qubits_sorted, cycles, names, two_qubit_gate_name))) + return program + + +_ZXZXZ_IDENTITY_ANGLES = [0.0, -0.5, -0.5] +_PAULI_COMMUTATIONS = { + "CZ": { + "II": "II", + "IX": "ZX", + "IY": "ZY", + "IZ": "IZ", + "XI": "XZ", + "XX": "YY", + "XY": "YX", + "XZ": "XI", + "YI": "YZ", + "YX": "XY", + "YY": "XX", + "YZ": "YI", + "ZI": "ZI", + "ZX": "IX", + "ZY": "IY", + "ZZ": "ZZ", + }, + "ISWAP": { + "II": "II", + "IX": "YZ", + "IY": "XZ", + "IZ": "ZI", + "XI": "ZY", + "XX": "XX", + "XY": "YX", + "XZ": "IY", + "YI": "ZX", + "YX": "XY", + "YY": "YY", + "YZ": "IX", + "ZI": "IZ", + "ZX": "YI", + "ZY": "XI", + "ZZ": "ZZ", + }, +} + + +def _build_pauli_conjugates_map(two_qubit_gate_name: str) -> list[int | float]: + """ + Build a map from each Pauli pair to its conjugate under the specified two-qubit gate. This essentially translates + `_PAULI_COMMUTATIONS` from a map of string to string to a map of int to int, which can be used as a Quil memory + reference for conjugation lookup on the QPU. + """ + pauli_conjugates_map: list[int | None] = [None] * _NUMBER_PAULI_PAIRS + for previous_paulis, next_paulis in _PAULI_COMMUTATIONS[two_qubit_gate_name].items(): + previous_pauli_index = _pauli_pair_to_int(previous_paulis) + next_pauli_index = _pauli_pair_to_int(next_paulis) + pauli_conjugates_map[previous_pauli_index] = next_pauli_index + return cast(list[int | float], pauli_conjugates_map) + + +def _pauli_pair_to_ints(pauli_pair: str) -> tuple[int, int]: + pauli_values = {"I": 0, "X": 1, "Y": 2, "Z": 3} + pauli_left = pauli_values[pauli_pair[0]] + pauli_right = pauli_values[pauli_pair[1]] + return pauli_left, pauli_right + + +def _pauli_pair_to_int(pauli_pair: str) -> int: + pauli_left, pauli_right = _pauli_pair_to_ints(pauli_pair) + return (pauli_left << _BITS_PER_PAULI) + pauli_right + + +def _unitary_equal(A: NDArray[np.complex128], B: NDArray[np.complex128]) -> bool: + """Check if two matrices are unitarily equal.""" + if A.shape != B.shape: + return False + dim = A.shape[0] + return np.isclose(np.abs(np.trace(A.T.conjugate() @ B) / dim), 1.0).item() + + +@dataclass(frozen=True, kw_only=True) +class _ShotsPerRandomizationNamingConventions: + pulse_program_label: str = "pulse_program" + randomization_label: str = "rc_main" + modulo_counter: str = "modulo_counter" + is_mod_zero: str = "is_mod_zero" + + +@dataclass(frozen=True, kw_only=True) +class _ShotsPerRandomization: + """ + Configuration for building a randomly compiled circuit that randomizes angles every + `shots_per_randomization` shots. We test this specific circuit construction in order + to verify that we use randomized compilation with active reset without incurring + the overhead of randomizing every shot. + """ + + shots_per_randomization: int + secondary_delay_seconds: float = 2e-4 + names: _ShotsPerRandomizationNamingConventions = field(default_factory=_ShotsPerRandomizationNamingConventions) + + @property + def declarations(self) -> Generator[inst.Instruction]: + yield inst.Instruction.Declaration( + inst.Declaration(self.variables.modulo_counter, inst.Vector(inst.ScalarType.INTEGER, 1), None) + ) + yield inst.Instruction.Declaration( + inst.Declaration(self.variables.is_mod_zero, inst.Vector(inst.ScalarType.BIT, 1), None) + ) + + @property + def pulse_program_label(self) -> inst.Instruction: + return inst.Instruction.Label(inst.Label(inst.Target.Fixed(self.variables.pulse_program_label))) + + def generate_mod_shot_count_block(self, qubits_sorted: list[int]) -> Generator[inst.Instruction]: + all_qubits = [inst.Qubit.Fixed(q) for q in qubits_sorted] + yield inst.Instruction.Arithmetic( + inst.Arithmetic( + inst.ArithmeticOperator.ADD, + inst.MemoryReference(self.variables.modulo_counter, 0), + inst.ArithmeticOperand.LiteralInteger(1), + ) + ) + yield inst.Instruction.Comparison( + inst.Comparison( + inst.ComparisonOperator.GREATER_THAN_OR_EQUAL, + inst.MemoryReference(self.variables.is_mod_zero, 0), + inst.MemoryReference(self.variables.modulo_counter, 0), + inst.ComparisonOperand.LiteralInteger(self.shots_per_randomization), + ) + ) + yield inst.Instruction.Call( + inst.Call( + "if_then_else_integer", + [ + # destination + inst.CallArgument.MemoryReference(inst.MemoryReference(self.variables.modulo_counter, 0)), + # condition + inst.CallArgument.MemoryReference(inst.MemoryReference(self.variables.is_mod_zero, 0)), + # true value + inst.CallArgument.Immediate(complex(0, 0)), + # false value + inst.CallArgument.MemoryReference(inst.MemoryReference(self.variables.modulo_counter, 0)), + ], + ), + ) + + yield inst.Instruction.JumpWhen( + inst.JumpWhen( + inst.Target.Fixed(self.variables.randomization_label), + inst.MemoryReference(self.variables.is_mod_zero, 0), + ) + ) + for q in all_qubits: + yield inst.Instruction.Delay( + inst.Delay( + expr.Expression.Number(complex(self.secondary_delay_seconds, 0)), + [], + [q], + ) + ) + yield inst.Instruction.Jump(inst.Jump(inst.Target.Fixed(self.variables.pulse_program_label))) + yield inst.Instruction.Label(inst.Label(inst.Target.Fixed(self.variables.randomization_label))) + + +@dataclass(frozen=True, kw_only=True) +class _RandomizedReadoutNamingConventions: + readout_seed_prefix: str = "readout_seed" + + def readout_randomization(self, qubit: int) -> str: + return f"readout_randomization_q{qubit}" + + def readout_seed(self, qubit: int) -> str: + return f"{self.readout_seed_prefix}_q{qubit}" + + +@dataclass(frozen=True, kw_only=True) +class _Configuration: + """Configuration for building a cycle program with randomized compilation.""" + + rr_names: _RandomizedReadoutNamingConventions | None = None + """Whether to apply readout randomization to the final layer.""" + + shots_per_randomization: _ShotsPerRandomization | None = None + """Number of shots per randomization.""" + + @property + def randomize_readout(self) -> bool: + return self.rr_names is not None + + @property + def name(self) -> str: + return f"randomze_readout={self.randomize_readout}_shots_per_randomization=\ + {self.shots_per_randomization is not None}" + + def declarations(self, qubits_sorted: list[int]) -> Generator[inst.Instruction]: + if self.shots_per_randomization is not None: + yield from self.shots_per_randomization.declarations + if self.rr_names is not None: + for q in qubits_sorted: + yield inst.Instruction.Declaration( + inst.Declaration(self.rr_names.readout_seed(q), inst.Vector(inst.ScalarType.INTEGER, 1), None) + ) + yield inst.Instruction.Declaration( + inst.Declaration(self.rr_names.readout_randomization(q), inst.Vector(inst.ScalarType.REAL, 3), None) + ) + + def memory(self, rng: np.random.Generator, qubits_sorted: list[int]) -> dict[str, list[int | float]]: + """The additional memory values required to execute this particular configuration.""" + memory = {} + if self.shots_per_randomization is not None: + memory[self.shots_per_randomization.names.modulo_counter] = [-1] + memory[self.shots_per_randomization.names.is_mod_zero] = [1] + if self.rr_names is not None: + seed_values = rng.integers(0, 2**32 - 1, size=len(qubits_sorted)) + for i, q in enumerate(qubits_sorted): + memory[self.rr_names.readout_seed(q)] = [int(seed_values[i])] + memory[self.rr_names.readout_randomization(q)] = [0] * _ANGLES_PER_UNITARY + return cast(dict[str, list[int | float]], memory) + + +class _ToQuilCallArguments(ABC): + @abstractmethod + def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: ... + + +class _PauliLiteral(Enum): + """A literal Pauli known at program construction time.""" + + I = 0 # noqa + X = 1 + Y = 2 + Z = 3 + + @property + def matrix(self) -> NDArray[np.complex128]: + match self: + case _PauliLiteral.I: + return np.eye(2, dtype=np.complex128) + case _PauliLiteral.X: + return np.asarray([[0, 1], [1, 0]], dtype=np.complex128) + case _PauliLiteral.Y: + return np.asarray([[0, -1j], [1j, 0]], dtype=np.complex128) + case _PauliLiteral.Z: + return np.asarray([[1, 0], [0, -1]], dtype=np.complex128) + case _: + raise ValueError(f"{self} cannot be cast to matrix") + + @classmethod + def from_name(cls, name: str) -> "_PauliLiteral": + match name: + case "I": + return cls.I + case "X": + return cls.X + case "Y": + return cls.Y + case "Z": + return cls.Z + case _: + raise ValueError(f"invalid pauli name: {name}") + + def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: + return (inst.CallArgument.Immediate(complex(self.value, 0)),) + + +@dataclass(frozen=True, kw_only=True) +class _PauliReference(_ToQuilCallArguments): + """ + A Pauli specified by a reference to a shared memory location on the QPU. Note that we fit + `_PAULIS_PER_WORD` in a single word of shared memory, so the precise Pauli within this + word is specified by `pauli_index` (the control system will shift and mask bits to get + the two bit Pauli representation). + """ + + memory_reference: inst.MemoryReference + pauli_index: int + + def to_call_arguments(self) -> tuple[inst.CallArgument, inst.CallArgument]: + return ( + inst.CallArgument.MemoryReference(self.memory_reference), + inst.CallArgument.Immediate(complex(self.pauli_index, 0)), + ) + + +@dataclass(frozen=True, kw_only=True) +class _PauliConjugate(_ToQuilCallArguments): + """A Pauli specified by a conjugation of two other Paulis. + + This is used a previous cycle applied two random Paulis before the two qubit gate. + We look these random Paulis up by reference and then index into `pauli_conjugates_map` + to get the two qubit conjugation; we then select one of these Paulis based on + `is_left_conjugate`. + """ + + pauli_left: _PauliReference + pauli_right: _PauliReference + is_left_conjugate: bool + pauli_conjugates_map: str = "pauli_conjugates_map" + + def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: + arguments = [] + arguments.extend(self.pauli_left.to_call_arguments()) + arguments.extend(self.pauli_right.to_call_arguments()) + + arguments.append(inst.CallArgument.Immediate(complex(1 if self.is_left_conjugate else 0, 0))) + arguments.append(inst.CallArgument.Identifier(self.pauli_conjugates_map)) + return tuple(arguments) + + +@dataclass(frozen=True, kw_only=True) +class _PauliPair: + """A pair of Paulis applied on a specific qubit at a specific layer. + + Such a Pauli pair is read on the control system and used to apply mutations to the + unitary angles for this (qubit, layer_index). + """ + + previous: _PauliReference | _PauliLiteral | _PauliConjugate + next: _PauliReference | _PauliLiteral + + def build_quil_call_instruction( + self, + destination: inst.CallArgument, + source: inst.CallArgument, + unitary_angle_offset: inst.CallArgument, + ) -> inst.Instruction: + """ + Build a Quil `inst.Call` instruction based on the Pauli pair. Each underlying union variant will + correspond to a different extern function signature. + """ + arguments = [destination, source, unitary_angle_offset] + arguments.extend(self.next.to_call_arguments()) + arguments.extend(self.previous.to_call_arguments()) + match (self.previous, self.next): + case (_PauliLiteral(), _PauliLiteral()): + return inst.Instruction.Call( + inst.Call( + "merge_zxzxz_unitary_with_paulis_literal_literal", + arguments, + ) + ) + case (_PauliReference(), _PauliLiteral()): + return inst.Instruction.Call( + inst.Call( + "merge_zxzxz_unitary_with_paulis_literal_reference", + arguments, + ) + ) + case (_PauliConjugate(), _PauliLiteral()): + return inst.Instruction.Call( + inst.Call( + "merge_zxzxz_unitary_with_paulis_literal_conjugate", + arguments, + ) + ) + case (_PauliReference(), _PauliReference()): + return inst.Instruction.Call( + inst.Call( + "merge_zxzxz_unitary_with_paulis_reference_reference", + arguments, + ) + ) + case (_PauliConjugate(), _PauliReference()): + return inst.Instruction.Call( + inst.Call( + "merge_zxzxz_unitary_with_paulis_reference_conjugate", + arguments, + ) + ) + case (_PauliLiteral(), _PauliReference()): + return inst.Instruction.Call( + inst.Call( + "merge_zxzxz_unitary_with_paulis_reference_literal", + arguments, + ) + ) + case _: + raise ValueError(f"invalid pauli pair: {self.previous}, {self.next}") + + +def _rz(phi: float) -> np.ndarray: + return np.array( + [ + [np.cos(phi / 2.0) - 1j * np.sin(phi / 2.0), 0], + [0, np.cos(phi / 2.0) + 1j * np.sin(phi / 2.0)], + ] + ) + + +def _compute_unitary_from_zxzxz_angles(unitary: Sequence[float]) -> NDArray[np.complex128]: + """ + Compute the unitary matrix from ZXZXZ angles. + """ + sx = np.asarray( + [ + [np.sqrt(0.5), -np.sqrt(0.5) * 1j], + [-np.sqrt(0.5) * 1j, np.sqrt(0.5)], + ] + ) + return cast( + NDArray[np.complex128], + _rz(unitary[2] * 2 * np.pi) @ sx @ _rz(unitary[1] * 2 * np.pi) @ sx @ _rz(unitary[0] * 2 * np.pi), + ) + + +def _compute_expected_merged_unitary( + unitary: tuple[float, ...], pauli_pair: tuple[_PauliLiteral, _PauliLiteral] +) -> NDArray[np.complex128]: + """ + Compute the expected merged unitary matrix from ZXZXZ angles and a pair of Pauli literals. + """ + return pauli_pair[1].matrix @ _compute_unitary_from_zxzxz_angles(unitary) @ pauli_pair[0].matrix + + +@dataclass(frozen=True, kw_only=True) +class RandomizedCompilingVariables: + seed_loop_label: str = "rc_seed_loop" + seed_loop_index: str = "rc_seed_loop_index" + seed_loop_inner_label: str = "rc_seed_loop_inner" + base_cycle_loop_label: str = "rc_base_cycle_loop" + base_cycle_loop_index: str = "rc_base_cycle_loop_index" + unitary_angle_offset: str = "unitary_angle_offset" + loop_break: str = "break" + current_seeds_prefix: str = "current_seeds" + pauli_conjugates_map: str = "pauli_conjugates_map" + unitaries_prefix: str = "unitaries" + twirled_unitaries_prefix: str = "twirled_unitaries" + pauli_seed_prefix: str = "pauli_seed" + + def current_seeds(self, qubit: int) -> str: + return f"{self.current_seeds_prefix}_q{qubit}" + + +@dataclass(frozen=True, kw_only=True) +class RandomizedCompilingConfiguration: + """A test utility for build a randomly compiled program using a loop structure over repeated base cycles.""" + + base_cycles: tuple[tuple[_TEdge, ...], ...] + qubits_sorted: tuple[int, ...] + base_cycle_repetitions: int + variables: RandomizedCompilingVariables = field(default_factory=RandomizedCompilingVariables) + + def __post_init__(self) -> None: + self._validate() + + def _validate(self) -> None: + if _PAULIS_PER_WORD % self._base_cycle_count != 0: + raise ValueError( + f"Base cycle length must be a multiple of {_PAULIS_PER_WORD}, but got {self._base_cycle_count}." + ) + if self.base_cycle_repetitions <= 1: + raise ValueError(f"Base cycle repetitions must be greater than 1, but got {self.base_cycle_repetitions}.") + + @property + def _base_cycle_count(self) -> int: + return len(self.base_cycles) + + @property + def _cycle_count(self) -> int: + return self._base_cycle_count * self.base_cycle_repetitions + + @property + def _seed_length(self) -> int: + return math.ceil(self._base_cycle_count * self.base_cycle_repetitions / _PAULIS_PER_WORD) + + @property + def _out_of_primary_loop_seed_change_required(self) -> bool: + return self.base_cycle_repetitions % _PAULIS_PER_WORD == 0 + + @property + def _seed_loop_length(self) -> int: + return self._seed_length - 1 + + @property + def _seed_loop_inner_length(self) -> int: + return int(_PAULIS_PER_WORD / self._base_cycle_count) - 1 + + @property + def _base_cycle_loop_length(self) -> int: + base_cycles_per_word = int(_PAULIS_PER_WORD / self._base_cycle_count) + primary_loop_base_cycles = self._seed_loop_length * base_cycles_per_word + # we add 1 below for the final cycle. + return self.base_cycle_repetitions - (primary_loop_base_cycles + 1) + + def _generate_declarations(self) -> list[inst.Instruction]: + declarations = [ + inst.Instruction.Declaration( + inst.Declaration(self.variables.unitary_angle_offset, inst.Vector(inst.ScalarType.INTEGER, 1), None), + ), + inst.Instruction.Declaration( + inst.Declaration(self.variables.loop_break, inst.Vector(inst.ScalarType.BIT, 1), None), + ), + ] + if self._seed_loop_length > 0: + declarations.extend( + [ + inst.Instruction.Declaration( + inst.Declaration(self.variables.seed_loop_index, inst.Vector(inst.ScalarType.INTEGER, 2), None), + ), + ] + ) + if self._base_cycle_loop_length > 0 or self._seed_loop_inner_length > 0: + declarations.extend( + [ + inst.Instruction.Declaration( + inst.Declaration( + self.variables.base_cycle_loop_index, inst.Vector(inst.ScalarType.INTEGER, 1), None + ), + ), + ] + ) + current__seed_length = 2 if self._seed_loop_length > 0 else 1 + for q in self.qubits_sorted: + declarations.append( + inst.Instruction.Declaration( + inst.Declaration( + self.variables.current_seeds(q), inst.Vector(inst.ScalarType.INTEGER, current__seed_length), None + ) + ) + ) + return cast(list[inst.Instruction], declarations) + + def build_memory_map(self) -> dict[str, list[int]]: + memory_map = {self.variables.unitary_angle_offset: [_ANGLES_PER_UNITARY], self.variables.loop_break: [0]} + if self._seed_loop_length > 0: + memory_map[self.variables.seed_loop_index] = [0, 1] + if self._base_cycle_loop_length > 0 or self._seed_loop_inner_length > 0: + memory_map[self.variables.base_cycle_loop_index] = [0] + + current_seed_length = 2 if self._seed_loop_length > 0 else 1 + for q in self.qubits_sorted: + memory_map[self.variables.current_seeds(q)] = [0] * current_seed_length + return memory_map + + def _generate_two_qubit_base_cycles(self) -> Generator[_TwoQubitCycle, None, None]: + for cycle in self.base_cycles: + yield _TwoQubitCycle.from_edges(cycle) + + def _build_quil_instructions_for_cycle(self) -> list[inst.Instruction]: + pauli_pairs = [] + for cycle in self._generate_two_qubit_base_cycles(): + cycle_pauli_pairs = [] + for q in cycle.data.keys(): + edge = cycle[q] + pauli_left = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), pauli_index=0 + ) + pauli_right = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), pauli_index=0 + ) + is_pauli_left = q == edge[0] + pauli_conjugate = _PauliConjugate( + pauli_left=pauli_left, + pauli_right=pauli_right, + is_left_conjugate=is_pauli_left, + ) + cycle_pauli_pairs.append( + ( + q, + _PauliPair( + previous=pauli_conjugate, + next=_PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 0), pauli_index=1 + ), + ), + ) + ) + for qubit in self.qubits_sorted: + if qubit not in cycle: + cycle_pauli_pairs.append( + ( + qubit, + _PauliPair( + previous=_PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), + pauli_index=0, + ), + next=_PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), + pauli_index=1, + ), + ), + ) + ) + pauli_pairs.append(cycle_pauli_pairs) + + instructions = [] + for cycle_index, cycle_pauli_pairs in enumerate(pauli_pairs): + instructions.extend( + pauli_pair.build_quil_call_instruction( + inst.CallArgument.Identifier(self.variables.twirled_unitaries(q)), + inst.CallArgument.Identifier(self.variables.source_unitaries(q)), + inst.CallArgument.MemoryReference(inst.MemoryReference(self.variables.unitary_angle_offset, 0)), + ) + for q, pauli_pair in cycle_pauli_pairs + ) + instructions.append( + inst.Instruction.Arithmetic( + inst.Arithmetic( + inst.ArithmeticOperator.ADD, + inst.MemoryReference(self.variables.unitary_angle_offset, 0), + inst.ArithmeticOperand.LiteralInteger(_ANGLES_PER_UNITARY), + ) + ), + ) + for q in self.qubits_sorted: + instructions.append( + inst.Instruction.BinaryLogic( + inst.BinaryLogic( + operator=inst.BinaryOperator.SHR, + destination=inst.MemoryReference(self.variables.current_seeds(q), 0), + source=inst.BinaryOperand.LiteralInteger(_BITS_PER_PAULI), + ) + ) + ) + + return instructions + + def _build_quil_instructions_for_seed_transition(self) -> list[inst.Instruction]: + pauli_pairs = [] + for cycle_index, cycle in enumerate(self._generate_two_qubit_base_cycles()): + cycle_pauli_pairs = [] + is_final_cycle = cycle_index == self._base_cycle_count - 1 + for q in cycle.data.keys(): + edge = cycle[q] + pauli_left = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), pauli_index=0 + ) + pauli_right = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), pauli_index=0 + ) + is_pauli_left = q == edge[0] + pauli_conjugate = _PauliConjugate( + pauli_left=pauli_left, + pauli_right=pauli_right, + is_left_conjugate=is_pauli_left, + ) + if is_final_cycle: + next_pauli = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 1), pauli_index=0 + ) + else: + next_pauli = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 0), pauli_index=1 + ) + cycle_pauli_pairs.append( + ( + q, + _PauliPair( + previous=pauli_conjugate, + next=next_pauli, + ), + ) + ) + for qubit in self.qubits_sorted: + if qubit not in cycle: + if is_final_cycle: + next_pauli = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 1), pauli_index=0 + ) + else: + next_pauli = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), pauli_index=1 + ) + cycle_pauli_pairs.append( + ( + qubit, + _PauliPair( + previous=_PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), + pauli_index=0, + ), + next=next_pauli, + ), + ) + ) + pauli_pairs.append(cycle_pauli_pairs) + + instructions = [] + for cycle_index, cycle_pauli_pairs in enumerate(pauli_pairs): + is_final_cycle = cycle_index == self._base_cycle_count - 1 + instructions.extend( + pauli_pair.build_quil_call_instruction( + inst.CallArgument.Identifier(self.variables.twirled_unitaries(q)), + inst.CallArgument.Identifier(self.variables.source_unitaries(q)), + inst.CallArgument.MemoryReference(inst.MemoryReference(self.variables.unitary_angle_offset, 0)), + ) + for q, pauli_pair in cycle_pauli_pairs + ) + instructions.append( + inst.Instruction.Arithmetic( + inst.Arithmetic( + inst.ArithmeticOperator.ADD, + inst.MemoryReference(self.variables.unitary_angle_offset, 0), + inst.ArithmeticOperand.LiteralInteger(_ANGLES_PER_UNITARY), + ) + ), + ) + if not is_final_cycle: + for q in self.qubits_sorted: + instructions.append( + inst.Instruction.BinaryLogic( + inst.BinaryLogic( + operator=inst.BinaryOperator.SHR, + destination=inst.MemoryReference(self.variables.current_seeds(q), 0), + source=inst.BinaryOperand.LiteralInteger(_BITS_PER_PAULI), + ) + ) + ) + + return instructions + + def _build_quil_instructions_for_final_base_cycle(self) -> list[inst.Instruction]: + pauli_pairs = [] + for cycle_index, cycle in enumerate(self._generate_two_qubit_base_cycles()): + cycle_pauli_pairs = [] + is_final_cycle = cycle_index == self._base_cycle_count - 1 + for q in cycle.data.keys(): + edge = cycle[q] + pauli_left = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), pauli_index=cycle_index + ) + pauli_right = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), pauli_index=cycle_index + ) + is_pauli_left = q == edge[0] + pauli_conjugate = _PauliConjugate( + pauli_left=pauli_left, + pauli_right=pauli_right, + is_left_conjugate=is_pauli_left, + ) + if is_final_cycle: + pauli_next = _PauliLiteral.I + else: + pauli_next = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 0), + pauli_index=cycle_index + 1, + ) + cycle_pauli_pairs.append( + ( + q, + _PauliPair( + previous=pauli_conjugate, + next=pauli_next, + ), + ) + ) + for qubit in self.qubits_sorted: + if qubit not in cycle: + if is_final_cycle: + pauli_next = _PauliLiteral.I + else: + pauli_next = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), + pauli_index=cycle_index + 1, + ) + cycle_pauli_pairs.append( + ( + qubit, + _PauliPair( + previous=_PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), + pauli_index=cycle_index, + ), + next=pauli_next, + ), + ) + ) + pauli_pairs.append(cycle_pauli_pairs) + + instructions = [] + for cycle_index, cycle_pauli_pairs in enumerate(pauli_pairs): + global_cycle_index = (self._cycle_count + 1) - self._base_cycle_count + cycle_index + instructions.extend( + pauli_pair.build_quil_call_instruction( + inst.CallArgument.Identifier(self.variables.twirled_unitaries(q)), + inst.CallArgument.Identifier(self.variables.source_unitaries(q)), + inst.CallArgument.Immediate(complex(global_cycle_index * _ANGLES_PER_UNITARY, 0)), + ) + for q, pauli_pair in cycle_pauli_pairs + ) + + return instructions + + def build_quil_instructions(self) -> list[inst.Instruction]: + instructions: list[inst.Instruction] = [] + for q in self.qubits_sorted: + for i in range(self._seed_length): + instructions.append( + inst.Instruction.Call( + inst.Call( + "prng_set_seed_and_step", + [ + inst.CallArgument.MemoryReference(inst.MemoryReference(self.variables.pauli_seed(q), i)), + inst.CallArgument.MemoryReference(inst.MemoryReference(self.variables.pauli_seed(q), i)), + ], + ) + ) + ) + for q in self.qubits_sorted: + pauli_pair = _PauliPair( + previous=_PauliLiteral.I, + next=_PauliReference( + memory_reference=inst.MemoryReference(self.variables.pauli_seed(q), 0), pauli_index=0 + ), + ) + instructions.append( + pauli_pair.build_quil_call_instruction( + inst.CallArgument.Identifier(self.variables.twirled_unitaries(q)), + inst.CallArgument.Identifier(self.variables.source_unitaries(q)), + inst.CallArgument.Immediate(complex(0, 0)), + ) + ) + for q in self.qubits_sorted: + instructions.append( + inst.Instruction.Move( + inst.Move( + inst.MemoryReference(self.variables.unitary_angle_offset, 0), + inst.ArithmeticOperand.LiteralInteger(_ANGLES_PER_UNITARY), + ) + ) + ) + + if self._seed_loop_length >= 1: + instructions.extend( + [ + inst.Instruction.Move( + inst.Move( + inst.MemoryReference(self.variables.seed_loop_index, 0), + inst.ArithmeticOperand.LiteralInteger(0), + ) + ), + inst.Instruction.Move( + inst.Move( + inst.MemoryReference(self.variables.seed_loop_index, 1), + inst.ArithmeticOperand.LiteralInteger(1), + ) + ), + inst.Instruction.Label(inst.Label(inst.Target.Fixed(self.variables.seed_loop_label))), + ] + ) + if self._seed_loop_inner_length >= 1: + instructions.append( + inst.Instruction.Move( + inst.Move( + inst.MemoryReference(self.variables.base_cycle_loop_index, 0), + inst.ArithmeticOperand.LiteralInteger(0), + ) + ), + ) + for q in self.qubits_sorted: + instructions.append( + inst.Instruction.Load( + inst.Load( + inst.MemoryReference(self.variables.current_seeds(q), 0), + self.variables.pauli_seed(q), + inst.MemoryReference(self.variables.seed_loop_index, 0), + ) + ) + ) + if self._seed_length > 1: + instructions.append( + inst.Instruction.Load( + inst.Load( + inst.MemoryReference(self.variables.current_seeds(q), 1), + self.variables.pauli_seed(q), + inst.MemoryReference(self.variables.seed_loop_index, 1), + ) + ), + ) + if self._seed_loop_inner_length >= 1: + instructions.append( + inst.Instruction.Label(inst.Label(inst.Target.Fixed(self.variables.seed_loop_inner_label))) + ) + instructions.extend(self._build_quil_instructions_for_cycle()) + instructions.extend( + [ + inst.Instruction.Arithmetic( + inst.Arithmetic( + inst.ArithmeticOperator.ADD, + inst.MemoryReference(self.variables.base_cycle_loop_index, 0), + inst.ArithmeticOperand.LiteralInteger(1), + ) + ), + inst.Instruction.Comparison( + inst.Comparison( + inst.ComparisonOperator.GREATER_THAN_OR_EQUAL, + inst.MemoryReference(self.variables.loop_break, 0), + inst.MemoryReference(self.variables.base_cycle_loop_index, 0), + inst.ComparisonOperand.LiteralInteger(self._seed_loop_inner_length), + ) + ), + inst.Instruction.JumpUnless( + inst.JumpUnless( + inst.Target.Fixed(self.variables.seed_loop_inner_label), + inst.MemoryReference(self.variables.loop_break, 0), + ) + ), + ] + ) + instructions.extend(self._build_quil_instructions_for_seed_transition()) + instructions.extend( + [ + inst.Instruction.Arithmetic( + inst.Arithmetic( + inst.ArithmeticOperator.ADD, + inst.MemoryReference(self.variables.seed_loop_index, 0), + inst.ArithmeticOperand.LiteralInteger(1), + ) + ), + inst.Instruction.Arithmetic( + inst.Arithmetic( + inst.ArithmeticOperator.ADD, + inst.MemoryReference(self.variables.seed_loop_index, 1), + inst.ArithmeticOperand.LiteralInteger(1), + ) + ), + inst.Instruction.Comparison( + inst.Comparison( + inst.ComparisonOperator.GREATER_THAN_OR_EQUAL, + inst.MemoryReference(self.variables.loop_break, 0), + inst.MemoryReference(self.variables.seed_loop_index, 0), + inst.ComparisonOperand.LiteralInteger(self._seed_loop_length), + ) + ), + inst.Instruction.JumpUnless( + inst.JumpUnless( + inst.Target.Fixed(self.variables.seed_loop_label), + inst.MemoryReference(self.variables.loop_break, 0), + ) + ), + ] + ) + for q in self.qubits_sorted: + instructions.append( + inst.Instruction.Move( + inst.Move( + inst.MemoryReference(self.variables.current_seeds(q), 0), + inst.ArithmeticOperand.MemoryReference( + inst.MemoryReference(self.variables.current_seeds(q), 1) + ), + ) + ), + ) + elif self._base_cycle_loop_length >= 1: + for q in self.qubits_sorted: + instructions.append( + inst.Instruction.Move( + inst.Move( + inst.MemoryReference(self.variables.current_seeds(q), 0), + inst.ArithmeticOperand.MemoryReference( + inst.MemoryReference(self.variables.pauli_seed(q), 0) + ), + ) + ), + ) + + if self._base_cycle_loop_length >= 1: + instructions.extend( + [ + inst.Instruction.Move( + inst.Move( + inst.MemoryReference(self.variables.base_cycle_loop_index, 0), + inst.ArithmeticOperand.LiteralInteger(0), + ) + ), + inst.Instruction.Label(inst.Label(inst.Target.Fixed(self.variables.base_cycle_loop_label))), + ] + ) + instructions.extend(self._build_quil_instructions_for_cycle()) + instructions.extend( + [ + inst.Instruction.Arithmetic( + inst.Arithmetic( + inst.ArithmeticOperator.ADD, + inst.MemoryReference(self.variables.base_cycle_loop_index, 0), + inst.ArithmeticOperand.LiteralInteger(1), + ) + ), + inst.Instruction.Comparison( + inst.Comparison( + inst.ComparisonOperator.GREATER_THAN_OR_EQUAL, + inst.MemoryReference(self.variables.loop_break, 0), + inst.MemoryReference(self.variables.base_cycle_loop_index, 0), + inst.ComparisonOperand.LiteralInteger(self._base_cycle_loop_length), + ) + ), + inst.Instruction.JumpUnless( + inst.JumpUnless( + inst.Target.Fixed(self.variables.base_cycle_loop_label), + inst.MemoryReference(self.variables.loop_break, 0), + ) + ), + ] + ) + + for q in self.qubits_sorted: + instructions.append( + inst.Instruction.Delay( + inst.Delay( + expr.Expression.Number(complex(2e-4, 0)), + [], + [inst.Qubit.Fixed(q)], + ) + ) + ) + + instructions.extend(self._build_quil_instructions_for_final_base_cycle()) + + return instructions + + From 1a3954c7fd6f95a7aa119ac32555d9067cb76705 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Thu, 4 Jun 2026 16:23:38 -0700 Subject: [PATCH 02/59] feat: bit shifts --- pyquil/quilbase.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pyquil/quilbase.py b/pyquil/quilbase.py index 768c4c8e2..ad65f98e7 100644 --- a/pyquil/quilbase.py +++ b/pyquil/quilbase.py @@ -1172,6 +1172,23 @@ class ClassicalExclusiveOr(LogicalBinaryOp): op = quil_rs.BinaryOperator.Xor +class ClassicalArithmeticShiftRight(LogicalBinaryOp): + """The arithmetic shift-right instruction.""" + + op = quil_rs.BinaryOperator.Ashr + + +class ClassicalShiftLeft(LogicalBinaryOp): + """The shift-left instruction.""" + + op = quil_rs.BinaryOperator.Shl + +class ClassicalShiftRight(LogicalBinaryOp): + """The shift-right instruction.""" + + op = quil_rs.BinaryOperator.Shr + + @_add_reduce_method class ArithmeticBinaryOp(quil_rs.Arithmetic, AbstractInstruction): """Base class for binary arithmetic classical instructions.""" From d0dabf26acd1a0d7082d587bb9e83720e24d4a07 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Thu, 4 Jun 2026 16:24:03 -0700 Subject: [PATCH 03/59] chore: convert to pyquil construction --- pyquil/qpu/_randomized_compiling.py | 842 ++++++++++++---------------- 1 file changed, 351 insertions(+), 491 deletions(-) diff --git a/pyquil/qpu/_randomized_compiling.py b/pyquil/qpu/_randomized_compiling.py index 1f01ab8f4..a1eff1de5 100644 --- a/pyquil/qpu/_randomized_compiling.py +++ b/pyquil/qpu/_randomized_compiling.py @@ -9,6 +9,14 @@ * `test_randomized_compilation_looped_cases`: Test randomized compilation on a repeat base cycle within a loop. """ +from pyquil.quilatom import FormalArgument +from pyquil.quilbase import JumpUnless +from pyquil.quilbase import ClassicalGreaterEqual +from pyquil.quilbase import JumpTarget +from pyquil.quilbase import ClassicalLoad +from pyquil.quilbase import ClassicalShiftRight +from pyquil.quilbase import ClassicalAdd +from pyquil import gates import math from abc import ABC, abstractmethod from collections.abc import Generator, Sequence @@ -17,17 +25,16 @@ from functools import cached_property from typing import Literal, cast +from qcs_sdk.qpu.experimental.random import PrngSeedValue, lfsr_v1_next import numpy as np from numpy.typing import NDArray from qcs_sdk.client import QCSClient from qcs_sdk.qpu.api import ExecutionOptionsBuilder from qcs_sdk.qpu.isa import InstructionSetArchitecture -from pyquil.quil import Program -from pyquil.quilbase import Call, Declare, Delay, ClassicalMove, ArithmeticBinaryOp, Jump, JumpWhen, Label, Measurement, Gate, ClassicalComparison -from quil import expression as expr +from pyquil.quilatom import Qubit +from pyquil.quil import Program, InstructionDesignator +from pyquil.quilbase import Call, Declare, Delay, ClassicalMove, ArithmeticBinaryOp, Jump, JumpWhen, Label, Measurement, Gate, ClassicalComparison, MemoryReference, Fence, Qubit, Expression from quil import instructions as inst -from quil import program as prog -from quil.instructions import MemoryReference from scipy.stats import norm # type: ignore _BITS_PER_VALUE = 48 @@ -126,7 +133,7 @@ def _generate_cycle_program_memory_map( _, u2_cycle_count, _ = angles.shape for q_index, q in enumerate(qubits_sorted): q_angles = cast(list[float], angles[q_index, :, :].reshape((u2_cycle_count * _ANGLES_PER_UNITARY,)).tolist()) - memory_map[names.unitaries(q)] = q_angles + memory_map[names.source_unitaries(q)] = q_angles return memory_map @@ -214,6 +221,15 @@ def _generate_pauli_pairs( return all_pauli_pairs +def _generate_lfsr_v1_sequence(seed_value: int, start_index: int, count: int) -> list[int]: + """Generate a sequence of values from the LFSR v1 PRNG given an initial seed value, a start index, and a count.""" + sequence = [] + current_value = PrngSeedValue(seed_value) + for i in range(start_index + count): + if i >= start_index: + sequence.append(current_value) + current_value = lfsr_v1_next(current_value) + return sequence @dataclass(frozen=True, kw_only=True) @@ -308,10 +324,10 @@ def _generate_declarations_for_randomized_compiling( u2_cycle_count: int, _seed_length: int, names: "RandomizedCompilingVariables", -) -> tuple[inst.Instruction, ...]: +) -> tuple[Declare, ...]: """Generate the Quil declaration instructions required for randomized compilation.""" - instructions = [] - instructions.append( + declarations: list[Declare] = [] + declarations.append( Declare( names.pauli_conjugates_map, "INTEGER", @@ -320,41 +336,44 @@ def _generate_declarations_for_randomized_compiling( ) for q in qubits_sorted: - yield inst.Instruction.Declaration( - inst.Declaration(names.pauli_seed(q), inst.Vector(inst.ScalarType.INTEGER, _seed_length), None) + declarations.append( + Declare(names.pauli_seed(q), "INTEGER", _seed_length) ) for q in qubits_sorted: - yield inst.Instruction.Declaration( - inst.Declaration( + declarations.append( + Declare( names.twirled_unitaries(q), - inst.Vector(inst.ScalarType.REAL, u2_cycle_count * _ANGLES_PER_UNITARY), - None, + "REAL", + u2_cycle_count * _ANGLES_PER_UNITARY, ) ) + return tuple(declarations) def _generate_cycle_program_declarations( qubits_sorted: list[int], depth: int, names: "_CycleNamingConventions" -) -> Generator[inst.Instruction]: +) -> tuple[Declare, ...]: """Generate the Quil declaration instructions required for all cycle programs.""" - yield inst.Instruction.Declaration( - inst.Declaration("ro", inst.Vector(inst.ScalarType.BIT, len(qubits_sorted)), None) + declarations: list[Declare] = [] + declarations.append( + Declare("ro", "BIT", len(qubits_sorted)) ) for q in qubits_sorted: - yield inst.Instruction.Declaration( - inst.Declaration( - names.unitaries(q), inst.Vector(inst.ScalarType.REAL, (depth + 1) * _ANGLES_PER_UNITARY), None + declarations.append( + Declare( + names.unitaries(q), "REAL", (depth + 1) * _ANGLES_PER_UNITARY ) ) + return tuple(declarations) def _generate_random_compilation_preamble_from_pauli_pairs( pauli_pairs: list[list["_PauliPair"]], qubits_sorted: list[int], depth: int, - rr_names: "_RandomizedReadoutNamingConventions | None", - names: "RandomizedCompilingVariables", -) -> Generator[inst.Instruction]: + variables: "RandomizedCompilingVariables", + readout_randomization_variables: "ReadoutRandomizationVariables | None", +) -> tuple[InstructionDesignator, ...]: """ Generate the classical Quil instructions for computing the randomly compiled program's twirled unitaries for each qubit at each layer. @@ -362,87 +381,51 @@ def _generate_random_compilation_preamble_from_pauli_pairs( assert len(pauli_pairs) == depth + 1 assert all(len(layer_literals) == len(qubits_sorted) for layer_literals in pauli_pairs) + instructions: list[InstructionDesignator] = [] + for q in qubits_sorted: for seed_index in range(math.ceil(depth / _PAULIS_PER_WORD)): - yield inst.Instruction.Call( - inst.Call( - "prng_set_seed_and_step", - [ - inst.CallArgument.MemoryReference(MemoryReference(names.pauli_seed(q), seed_index)), - inst.CallArgument.MemoryReference(MemoryReference(names.pauli_seed(q), seed_index)), - ], - ) - ) + instructions.append(Call( + "prng_set_seed_and_step", + [ + inst.CallArgument.from_memory_reference(inst.MemoryReference(variables.pauli_seed(q), seed_index)), + inst.CallArgument.from_memory_reference(inst.MemoryReference(variables.pauli_seed(q), seed_index)), + ], + )) for layer_index in range(depth + 1): for q_index, q in enumerate(qubits_sorted): - source = names.source_unitaries(q) - if layer_index == depth and rr_names is not None: + source = variables.source_unitaries(q) + if layer_index == depth and readout_randomization_variables is not None: for i in range(_ANGLES_PER_UNITARY): - yield inst.Instruction.Move( - inst.Move( - inst.MemoryReference(rr_names.readout_randomization(q), i), - inst.ArithmeticOperand.MemoryReference( - inst.MemoryReference(names.source_unitaries(q), layer_index * _ANGLES_PER_UNITARY + i) - ), - ) - ) - yield inst.Instruction.Call( - inst.Call( - "choose_random_real_sub_regions", - [ - inst.CallArgument.Identifier(rr_names.readout_randomization(q)), - inst.CallArgument.Identifier(rr_names.readout_randomization(q)), - inst.CallArgument.Immediate(complex(_ANGLES_PER_UNITARY, 0)), - inst.CallArgument.MemoryReference(MemoryReference(rr_names.readout_seed(q), 0)), - ], - ) - ) + instructions.append(ClassicalMove( + MemoryReference(readout_randomization_variables.readout_randomization(q), i), + MemoryReference(variables.source_unitaries(q), layer_index * _ANGLES_PER_UNITARY + i), + )) + instructions.append(Call( + "choose_random_real_sub_regions", + [ + inst.CallArgument.from_identifier(readout_randomization_variables.readout_randomization(q)), + inst.CallArgument.from_identifier(readout_randomization_variables.readout_randomization(q)), + inst.CallArgument.from_immediate(complex(_ANGLES_PER_UNITARY, 0)), + inst.CallArgument.from_memory_reference(inst.MemoryReference(readout_randomization_variables.readout_seed(q), 0)), + ], + )) for i in range(_ANGLES_PER_UNITARY): - yield inst.Instruction.Move( - inst.Move( - inst.MemoryReference(names.twirled_unitaries(q), layer_index * _ANGLES_PER_UNITARY + i), - inst.ArithmeticOperand.MemoryReference( - inst.MemoryReference(rr_names.readout_randomization(q), i) - ), - ) - ) - source = names.twirled_unitaries(q) + instructions.append(ClassicalMove( + MemoryReference(variables.twirled_unitaries(q), layer_index * _ANGLES_PER_UNITARY + i), + MemoryReference(readout_randomization_variables.readout_randomization(q), i), + )) + source = variables.twirled_unitaries(q) pauli_pair = pauli_pairs[layer_index][q_index] angle_index = layer_index * _ANGLES_PER_UNITARY - yield pauli_pair.build_quil_call_instruction( - inst.CallArgument.Identifier(names.twirled_unitaries(q)), - inst.CallArgument.Identifier(source), - inst.CallArgument.Immediate(complex(angle_index, 0)), - ) - - -@dataclass(frozen=True, kw_only=True) -class RandomizedCompilingVariables: - pauli_conjugates_map: str = "pauli_conjugates_map" - unitaries_prefix: str = "unitaries" - twirled_unitaries_prefix: str = "twirled_unitaries" - pauli_seed_prefix: str = "pauli_seed" - - def source_unitaries(self, qubit: int) -> str: - return f"{self.unitaries_prefix}_q{qubit}" - - def source_unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> inst.MemoryReference: - return inst.MemoryReference(self.source_unitaries(qubit), layer_index * _ANGLES_PER_UNITARY + angle_index) - - def twirled_unitaries(self, qubit: int) -> str: - return f"{self.twirled_unitaries_prefix}_q{qubit}" - - def twirled_unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> inst.MemoryReference: - return inst.MemoryReference(self.twirled_unitaries(qubit), layer_index * _ANGLES_PER_UNITARY + angle_index) - - def pauli_seed(self, qubit: int) -> str: - return f"{self.pauli_seed_prefix}_q{qubit}" - - @property - def cycles(self) -> "_CycleNamingConventions": - return _CycleNamingConventions(unitaries_prefix=self.twirled_unitaries_prefix) + instructions.append(pauli_pair.build_quil_call_instruction( + inst.CallArgument.from_identifier(variables.twirled_unitaries(q)), + inst.CallArgument.from_identifier(source), + inst.CallArgument.from_immediate(complex(angle_index, 0)), + )) + return tuple(instructions) @dataclass(frozen=True, kw_only=True) class _CycleNamingConventions: @@ -455,49 +438,47 @@ def unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> inst. return inst.MemoryReference(self.unitaries(qubit), layer_index * _ANGLES_PER_UNITARY + angle_index) +def _radians_to_cycles(region_name: str, index: int) -> Expression: + return MemoryReference(region_name, index) * 2 * math.pi + def _generate_gate_cycles( qubits_sorted: list[int], cycles: list[_TwoQubitCycle], names: _CycleNamingConventions, two_qubit_gate_name: Literal["ISWAP", "CZ"], -) -> Generator[inst.Instruction]: +) -> tuple[InstructionDesignator, ...]: """Generate the Quil instructions for the gate cycles of any cycle program.""" - all_qubits = [inst.Qubit.Fixed(q) for q in qubits_sorted] depth = len(cycles) - yield (inst.Instruction.Fence(inst.Fence(all_qubits))) + instructions: list[InstructionDesignator] = [] + all_qubits: list[Qubit | FormalArgument] = [Qubit(q) for q in qubits_sorted] + instructions.append(Fence(all_qubits)) for layer_index in range(depth + 1): for q in qubits_sorted: - qubits = [inst.Qubit.Fixed(q)] unitaries = names.unitaries_ref(q, layer_index, 0) - yield inst.Instruction.Gate( - inst.Gate("RZ", [utilities.radians_to_cycles(unitaries.name, unitaries.index)], qubits, []), - ) - yield inst.Instruction.Gate(utilities.sx(q)) - yield inst.Instruction.Fence(inst.Fence(all_qubits)) + instructions.append(gates.RZ(_radians_to_cycles(unitaries.name, unitaries.index), q)) + instructions.append(gates.RX(np.pi / 2, q)) + instructions.append(Fence(all_qubits)) for q in qubits_sorted: - qubits = [inst.Qubit.Fixed(q)] unitaries = names.unitaries_ref(q, layer_index, 1) - yield inst.Instruction.Gate( - inst.Gate("RZ", [utilities.radians_to_cycles(unitaries.name, unitaries.index)], qubits, []), + instructions.append( + gates.RZ(_radians_to_cycles(unitaries.name, unitaries.index), q), ) - yield inst.Instruction.Gate(utilities.sx(q)) - yield inst.Instruction.Fence(inst.Fence(all_qubits)) + instructions.append(gates.RX(np.pi / 2, q)) + instructions.append(Fence(all_qubits)) for q in qubits_sorted: - qubits = [inst.Qubit.Fixed(q)] unitaries = names.unitaries_ref(q, layer_index, 2) - yield inst.Instruction.Gate( - inst.Gate("RZ", [utilities.radians_to_cycles(unitaries.name, unitaries.index)], qubits, []), + instructions.append( + gates.RZ(_radians_to_cycles(unitaries.name, unitaries.index), q), ) if layer_index < depth: cycle = cycles[layer_index] for edge in set(cycle.data.values()): - qubits = [inst.Qubit.Fixed(edge[0]), inst.Qubit.Fixed(edge[1])] - yield inst.Instruction.Gate(inst.Gate(two_qubit_gate_name, [], qubits, [])) - yield inst.Instruction.Fence(inst.Fence(all_qubits)) + instructions.append(Gate(two_qubit_gate_name, [], [edge[0], edge[1]], [])) + instructions.append(Fence(all_qubits)) elif layer_index == depth: for q in qubits_sorted: - qubit = inst.Qubit.Fixed(q) - yield inst.Instruction.Measurement(inst.Measurement(qubit, inst.MemoryReference("ro", q))) + instructions.append(Measurement(q, MemoryReference("ro", q))) + return tuple(instructions) def _build_cycle_program_with_randomized_compilation( @@ -511,14 +492,13 @@ def _build_cycle_program_with_randomized_compilation( _seed_length: int, ) -> prog.Program: """Generate a cycle program with randomized compilation according to the specified configuration.""" - all_qubits = [inst.Qubit.Fixed(q) for q in qubits_sorted] program = prog.Program() program.add_instructions(list(utilities.generate_randomization_extern_signatures())) program.add_instructions( - list(_generate_cycle_program_declarations(qubits_sorted, len(cycles), _CycleNamingConventions())) + _generate_cycle_program_declarations(qubits_sorted, len(cycles), _CycleNamingConventions()) ) program.add_instructions( - list(_generate_declarations_for_randomized_compiling(qubits_sorted, len(cycles) + 1, _seed_length, names)) + _generate_declarations_for_randomized_compiling(qubits_sorted, len(cycles) + 1, _seed_length, names) ) program.add_instructions(list(configuration.declarations(qubits_sorted))) @@ -527,40 +507,28 @@ def _build_cycle_program_with_randomized_compilation( list(configuration.shots_per_randomization.generate_mod_shot_count_block(qubits_sorted)) ) else: - for q in all_qubits: - program.add_instruction( - inst.Instruction.Delay( - inst.Delay( - expr.Expression.Number(complex(leading_delay_seconds, 0)), - [], - [q], - ) - ) - ) + for q in qubits_sorted: + program.add_instruction(Delay([], [q], leading_delay_seconds)) program.add_instructions( - list( - _generate_random_compilation_preamble_from_pauli_pairs( - pauli_pairs, - qubits_sorted, - len(cycles), - configuration.rr_names, - names, - ) + _generate_random_compilation_preamble_from_pauli_pairs( + pauli_pairs, + qubits_sorted, + len(cycles), + configuration.rr_names, + names, ) ) if configuration.shots_per_randomization is not None: program.add_instruction(configuration.shots_per_randomization.pulse_program_label) if two_qubit_gate_name == "ISWAP": # A delay here is only necessary for ISWAP. - for q in all_qubits: - program.add_instruction( - inst.Instruction.Delay(inst.Delay(expr.Expression.Number(complex(1e-5, 0)), [], [q])) - ) + for q in qubits_sorted: + program.add_instruction(Delay([], [q], 1e-5)) else: - program.add_instruction(inst.Instruction.Fence(inst.Fence(all_qubits))) + program.add_instruction(Fence(qubits_sorted)) - program.add_instructions(list(_generate_gate_cycles(qubits_sorted, cycles, names.cycles, two_qubit_gate_name))) + program.add_instructions(_generate_gate_cycles(qubits_sorted, cycles, names.cycles, two_qubit_gate_name)) return program @@ -572,8 +540,8 @@ def _build_cycle_program( ) -> prog.Program: """Generate a cycle program without randomized compilation.""" program = prog.Program() - program.add_instructions(list(_generate_cycle_program_declarations(qubits_sorted, len(cycles), names))) - program.add_instructions(list(_generate_gate_cycles(qubits_sorted, cycles, names, two_qubit_gate_name))) + program.add_instructions(_generate_cycle_program_declarations(qubits_sorted, len(cycles), names)) + program.add_instructions(_generate_gate_cycles(qubits_sorted, cycles, names, two_qubit_gate_name)) return program @@ -653,7 +621,7 @@ def _unitary_equal(A: NDArray[np.complex128], B: NDArray[np.complex128]) -> bool @dataclass(frozen=True, kw_only=True) -class _ShotsPerRandomizationNamingConventions: +class ShotsPerRandomizationVariables: pulse_program_label: str = "pulse_program" randomization_label: str = "rc_main" modulo_counter: str = "modulo_counter" @@ -661,7 +629,7 @@ class _ShotsPerRandomizationNamingConventions: @dataclass(frozen=True, kw_only=True) -class _ShotsPerRandomization: +class ShotsPerRandomization: """ Configuration for building a randomly compiled circuit that randomizes angles every `shots_per_randomization` shots. We test this specific circuit construction in order @@ -671,74 +639,53 @@ class _ShotsPerRandomization: shots_per_randomization: int secondary_delay_seconds: float = 2e-4 - names: _ShotsPerRandomizationNamingConventions = field(default_factory=_ShotsPerRandomizationNamingConventions) + variables: ShotsPerRandomizationVariables = field(default_factory=ShotsPerRandomizationVariables) @property - def declarations(self) -> Generator[inst.Instruction]: - yield inst.Instruction.Declaration( - inst.Declaration(self.variables.modulo_counter, inst.Vector(inst.ScalarType.INTEGER, 1), None) - ) - yield inst.Instruction.Declaration( - inst.Declaration(self.variables.is_mod_zero, inst.Vector(inst.ScalarType.BIT, 1), None) - ) + def declarations(self) -> Generator[InstructionDesignator]: + yield Declare(self.variables.modulo_counter, "INTEGER", 1) + yield Declare(self.variables.is_mod_zero, "BIT", 1) @property - def pulse_program_label(self) -> inst.Instruction: - return inst.Instruction.Label(inst.Label(inst.Target.Fixed(self.variables.pulse_program_label))) - - def generate_mod_shot_count_block(self, qubits_sorted: list[int]) -> Generator[inst.Instruction]: - all_qubits = [inst.Qubit.Fixed(q) for q in qubits_sorted] - yield inst.Instruction.Arithmetic( - inst.Arithmetic( - inst.ArithmeticOperator.ADD, - inst.MemoryReference(self.variables.modulo_counter, 0), - inst.ArithmeticOperand.LiteralInteger(1), - ) + def pulse_program_label(self) -> InstructionDesignator: + return JumpTarget(Label(self.variables.pulse_program_label)) + + def generate_mod_shot_count_block(self, qubits_sorted: list[int]) -> Generator[InstructionDesignator]: + yield ClassicalAdd( + MemoryReference(self.variables.modulo_counter, 0), + 1, ) - yield inst.Instruction.Comparison( - inst.Comparison( - inst.ComparisonOperator.GREATER_THAN_OR_EQUAL, - inst.MemoryReference(self.variables.is_mod_zero, 0), - inst.MemoryReference(self.variables.modulo_counter, 0), - inst.ComparisonOperand.LiteralInteger(self.shots_per_randomization), - ) + yield ClassicalGreaterEqual( + MemoryReference(self.variables.is_mod_zero, 0), + MemoryReference(self.variables.modulo_counter, 0), + self.shots_per_randomization, ) - yield inst.Instruction.Call( - inst.Call( - "if_then_else_integer", - [ - # destination - inst.CallArgument.MemoryReference(inst.MemoryReference(self.variables.modulo_counter, 0)), - # condition - inst.CallArgument.MemoryReference(inst.MemoryReference(self.variables.is_mod_zero, 0)), - # true value - inst.CallArgument.Immediate(complex(0, 0)), - # false value - inst.CallArgument.MemoryReference(inst.MemoryReference(self.variables.modulo_counter, 0)), - ], - ), + yield Call( + "if_then_else_integer", + [ + # destination + inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.modulo_counter, 0)), + # condition + inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.is_mod_zero, 0)), + # true value + inst.CallArgument.from_immediate(complex(0, 0)), + # false value + inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.modulo_counter, 0)), + ], ) - yield inst.Instruction.JumpWhen( - inst.JumpWhen( - inst.Target.Fixed(self.variables.randomization_label), - inst.MemoryReference(self.variables.is_mod_zero, 0), - ) + yield JumpWhen( + Label(self.variables.randomization_label), + MemoryReference(self.variables.is_mod_zero, 0), ) - for q in all_qubits: - yield inst.Instruction.Delay( - inst.Delay( - expr.Expression.Number(complex(self.secondary_delay_seconds, 0)), - [], - [q], - ) - ) - yield inst.Instruction.Jump(inst.Jump(inst.Target.Fixed(self.variables.pulse_program_label))) - yield inst.Instruction.Label(inst.Label(inst.Target.Fixed(self.variables.randomization_label))) + for q in qubits_sorted: + yield Delay([], [q], self.secondary_delay_seconds) + yield Jump(Label(self.variables.pulse_program_label)) + yield JumpTarget(Label(self.variables.randomization_label)) @dataclass(frozen=True, kw_only=True) -class _RandomizedReadoutNamingConventions: +class ReadoutRandomizationVariables: readout_seed_prefix: str = "readout_seed" def readout_randomization(self, qubit: int) -> str: @@ -748,51 +695,6 @@ def readout_seed(self, qubit: int) -> str: return f"{self.readout_seed_prefix}_q{qubit}" -@dataclass(frozen=True, kw_only=True) -class _Configuration: - """Configuration for building a cycle program with randomized compilation.""" - - rr_names: _RandomizedReadoutNamingConventions | None = None - """Whether to apply readout randomization to the final layer.""" - - shots_per_randomization: _ShotsPerRandomization | None = None - """Number of shots per randomization.""" - - @property - def randomize_readout(self) -> bool: - return self.rr_names is not None - - @property - def name(self) -> str: - return f"randomze_readout={self.randomize_readout}_shots_per_randomization=\ - {self.shots_per_randomization is not None}" - - def declarations(self, qubits_sorted: list[int]) -> Generator[inst.Instruction]: - if self.shots_per_randomization is not None: - yield from self.shots_per_randomization.declarations - if self.rr_names is not None: - for q in qubits_sorted: - yield inst.Instruction.Declaration( - inst.Declaration(self.rr_names.readout_seed(q), inst.Vector(inst.ScalarType.INTEGER, 1), None) - ) - yield inst.Instruction.Declaration( - inst.Declaration(self.rr_names.readout_randomization(q), inst.Vector(inst.ScalarType.REAL, 3), None) - ) - - def memory(self, rng: np.random.Generator, qubits_sorted: list[int]) -> dict[str, list[int | float]]: - """The additional memory values required to execute this particular configuration.""" - memory = {} - if self.shots_per_randomization is not None: - memory[self.shots_per_randomization.names.modulo_counter] = [-1] - memory[self.shots_per_randomization.names.is_mod_zero] = [1] - if self.rr_names is not None: - seed_values = rng.integers(0, 2**32 - 1, size=len(qubits_sorted)) - for i, q in enumerate(qubits_sorted): - memory[self.rr_names.readout_seed(q)] = [int(seed_values[i])] - memory[self.rr_names.readout_randomization(q)] = [0] * _ANGLES_PER_UNITARY - return cast(dict[str, list[int | float]], memory) - - class _ToQuilCallArguments(ABC): @abstractmethod def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: ... @@ -835,7 +737,7 @@ def from_name(cls, name: str) -> "_PauliLiteral": raise ValueError(f"invalid pauli name: {name}") def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: - return (inst.CallArgument.Immediate(complex(self.value, 0)),) + return (inst.CallArgument.from_immediate(complex(self.value, 0)),) @dataclass(frozen=True, kw_only=True) @@ -852,8 +754,8 @@ class _PauliReference(_ToQuilCallArguments): def to_call_arguments(self) -> tuple[inst.CallArgument, inst.CallArgument]: return ( - inst.CallArgument.MemoryReference(self.memory_reference), - inst.CallArgument.Immediate(complex(self.pauli_index, 0)), + inst.CallArgument.from_memory_reference(self.memory_reference), + inst.CallArgument.from_immediate(complex(self.pauli_index, 0)), ) @@ -877,8 +779,8 @@ def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: arguments.extend(self.pauli_left.to_call_arguments()) arguments.extend(self.pauli_right.to_call_arguments()) - arguments.append(inst.CallArgument.Immediate(complex(1 if self.is_left_conjugate else 0, 0))) - arguments.append(inst.CallArgument.Identifier(self.pauli_conjugates_map)) + arguments.append(inst.CallArgument.from_immediate(complex(1 if self.is_left_conjugate else 0, 0))) + arguments.append(inst.CallArgument.from_identifier(self.pauli_conjugates_map)) return tuple(arguments) @@ -898,7 +800,7 @@ def build_quil_call_instruction( destination: inst.CallArgument, source: inst.CallArgument, unitary_angle_offset: inst.CallArgument, - ) -> inst.Instruction: + ) -> Call: """ Build a Quil `inst.Call` instruction based on the Pauli pair. Each underlying union variant will correspond to a different extern function signature. @@ -908,46 +810,34 @@ def build_quil_call_instruction( arguments.extend(self.previous.to_call_arguments()) match (self.previous, self.next): case (_PauliLiteral(), _PauliLiteral()): - return inst.Instruction.Call( - inst.Call( - "merge_zxzxz_unitary_with_paulis_literal_literal", - arguments, - ) + return Call( + "merge_zxzxz_unitary_with_paulis_literal_literal", + arguments, ) case (_PauliReference(), _PauliLiteral()): - return inst.Instruction.Call( - inst.Call( - "merge_zxzxz_unitary_with_paulis_literal_reference", - arguments, - ) + return Call( + "merge_zxzxz_unitary_with_paulis_literal_reference", + arguments, ) case (_PauliConjugate(), _PauliLiteral()): - return inst.Instruction.Call( - inst.Call( - "merge_zxzxz_unitary_with_paulis_literal_conjugate", - arguments, - ) + return Call( + "merge_zxzxz_unitary_with_paulis_literal_conjugate", + arguments, ) case (_PauliReference(), _PauliReference()): - return inst.Instruction.Call( - inst.Call( - "merge_zxzxz_unitary_with_paulis_reference_reference", - arguments, - ) + return Call( + "merge_zxzxz_unitary_with_paulis_reference_reference", + arguments, ) case (_PauliConjugate(), _PauliReference()): - return inst.Instruction.Call( - inst.Call( - "merge_zxzxz_unitary_with_paulis_reference_conjugate", - arguments, - ) + return Call( + "merge_zxzxz_unitary_with_paulis_reference_conjugate", + arguments, ) case (_PauliLiteral(), _PauliReference()): - return inst.Instruction.Call( - inst.Call( - "merge_zxzxz_unitary_with_paulis_reference_literal", - arguments, - ) + return Call( + "merge_zxzxz_unitary_with_paulis_reference_literal", + arguments, ) case _: raise ValueError(f"invalid pauli pair: {self.previous}, {self.next}") @@ -1005,6 +895,25 @@ class RandomizedCompilingVariables: def current_seeds(self, qubit: int) -> str: return f"{self.current_seeds_prefix}_q{qubit}" + def source_unitaries(self, qubit: int) -> str: + return f"{self.unitaries_prefix}_q{qubit}" + + def source_unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> inst.MemoryReference: + return inst.MemoryReference(self.source_unitaries(qubit), layer_index * _ANGLES_PER_UNITARY + angle_index) + + def twirled_unitaries(self, qubit: int) -> str: + return f"{self.twirled_unitaries_prefix}_q{qubit}" + + def twirled_unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> inst.MemoryReference: + return inst.MemoryReference(self.twirled_unitaries(qubit), layer_index * _ANGLES_PER_UNITARY + angle_index) + + def pauli_seed(self, qubit: int) -> str: + return f"{self.pauli_seed_prefix}_q{qubit}" + + @property + def cycles(self) -> "_CycleNamingConventions": + return _CycleNamingConventions(unitaries_prefix=self.twirled_unitaries_prefix) + @dataclass(frozen=True, kw_only=True) class RandomizedCompilingConfiguration: @@ -1013,8 +922,27 @@ class RandomizedCompilingConfiguration: base_cycles: tuple[tuple[_TEdge, ...], ...] qubits_sorted: tuple[int, ...] base_cycle_repetitions: int + readout_randomization: bool | None = None variables: RandomizedCompilingVariables = field(default_factory=RandomizedCompilingVariables) + readout_randomization_variables: ReadoutRandomizationVariables | None = None + """Whether to apply readout randomization to the final layer.""" + + shots_per_randomization: ShotsPerRandomization | None = None + """Number of shots per randomization.""" + + @property + def randomize_readout(self) -> bool: + return self.readout_randomization_variables is not None + + def declarations(self, qubits_sorted: list[int]) -> Generator[InstructionDesignator]: + if self.shots_per_randomization is not None: + yield from self.shots_per_randomization.declarations + if self.readout_randomization_variables is not None: + for q in qubits_sorted: + yield Declare(self.readout_randomization_variables.readout_seed(q), "INTEGER", 1) + yield Declare(self.readout_randomization_variables.readout_randomization(q), "REAL", 3) + def __post_init__(self) -> None: self._validate() @@ -1057,45 +985,41 @@ def _base_cycle_loop_length(self) -> int: # we add 1 below for the final cycle. return self.base_cycle_repetitions - (primary_loop_base_cycles + 1) - def _generate_declarations(self) -> list[inst.Instruction]: - declarations = [ - inst.Instruction.Declaration( - inst.Declaration(self.variables.unitary_angle_offset, inst.Vector(inst.ScalarType.INTEGER, 1), None), - ), - inst.Instruction.Declaration( - inst.Declaration(self.variables.loop_break, inst.Vector(inst.ScalarType.BIT, 1), None), - ), + def _generate_declarations(self) -> list[Declare]: + declarations: list[Declare] = [ + Declare(self.variables.unitary_angle_offset, "INTEGER", 1), + Declare(self.variables.loop_break, "BIT", 1), ] if self._seed_loop_length > 0: declarations.extend( [ - inst.Instruction.Declaration( - inst.Declaration(self.variables.seed_loop_index, inst.Vector(inst.ScalarType.INTEGER, 2), None), - ), + Declare(self.variables.seed_loop_index, "INTEGER", 2), ] ) if self._base_cycle_loop_length > 0 or self._seed_loop_inner_length > 0: declarations.extend( [ - inst.Instruction.Declaration( - inst.Declaration( - self.variables.base_cycle_loop_index, inst.Vector(inst.ScalarType.INTEGER, 1), None - ), + Declare( + self.variables.base_cycle_loop_index, "INTEGER", 1 ), ] ) current__seed_length = 2 if self._seed_loop_length > 0 else 1 for q in self.qubits_sorted: declarations.append( - inst.Instruction.Declaration( - inst.Declaration( - self.variables.current_seeds(q), inst.Vector(inst.ScalarType.INTEGER, current__seed_length), None - ) + Declare( + self.variables.current_seeds(q), "INTEGER", current__seed_length ) ) - return cast(list[inst.Instruction], declarations) + return declarations + + def generate_seed_values(self, rng: np.random.Generator) -> NDArray[np.int64]: + return rng.integers(-2**47, 2**47 - 1, size=len(self.qubits_sorted), dtype=np.int64) - def build_memory_map(self) -> dict[str, list[int]]: + def build_memory_map( + self, + seed_values: NDArray[np.int64], + ) -> dict[str, list[int]]: memory_map = {self.variables.unitary_angle_offset: [_ANGLES_PER_UNITARY], self.variables.loop_break: [0]} if self._seed_loop_length > 0: memory_map[self.variables.seed_loop_index] = [0, 1] @@ -1105,13 +1029,20 @@ def build_memory_map(self) -> dict[str, list[int]]: current_seed_length = 2 if self._seed_loop_length > 0 else 1 for q in self.qubits_sorted: memory_map[self.variables.current_seeds(q)] = [0] * current_seed_length + + if self.shots_per_randomization is not None: + memory_map[self.shots_per_randomization.variables.modulo_counter] = [-1] + memory_map[self.shots_per_randomization.variables.is_mod_zero] = [1] + if self.readout_randomization_variables is not None: + for i, q in enumerate(self.qubits_sorted): + memory_map[self.readout_randomization_variables.readout_seed(q)] = [int(seed_values[i])] + memory_map[self.readout_randomization_variables.readout_randomization(q)] = [0] * _ANGLES_PER_UNITARY return memory_map - def _generate_two_qubit_base_cycles(self) -> Generator[_TwoQubitCycle, None, None]: - for cycle in self.base_cycles: - yield _TwoQubitCycle.from_edges(cycle) + def _generate_two_qubit_base_cycles(self) -> tuple[_TwoQubitCycle, ...]: + return tuple(_TwoQubitCycle.from_edges(cycle) for cycle in self.base_cycles) - def _build_quil_instructions_for_cycle(self) -> list[inst.Instruction]: + def _build_quil_instructions_for_cycle(self) -> list[InstructionDesignator]: pauli_pairs = [] for cycle in self._generate_two_qubit_base_cycles(): cycle_pauli_pairs = [] @@ -1159,39 +1090,33 @@ def _build_quil_instructions_for_cycle(self) -> list[inst.Instruction]: ) pauli_pairs.append(cycle_pauli_pairs) - instructions = [] + instructions: list[InstructionDesignator] = [] for cycle_index, cycle_pauli_pairs in enumerate(pauli_pairs): instructions.extend( pauli_pair.build_quil_call_instruction( - inst.CallArgument.Identifier(self.variables.twirled_unitaries(q)), - inst.CallArgument.Identifier(self.variables.source_unitaries(q)), - inst.CallArgument.MemoryReference(inst.MemoryReference(self.variables.unitary_angle_offset, 0)), + inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), + inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), + inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.unitary_angle_offset, 0)), ) for q, pauli_pair in cycle_pauli_pairs ) instructions.append( - inst.Instruction.Arithmetic( - inst.Arithmetic( - inst.ArithmeticOperator.ADD, - inst.MemoryReference(self.variables.unitary_angle_offset, 0), - inst.ArithmeticOperand.LiteralInteger(_ANGLES_PER_UNITARY), - ) + ClassicalAdd( + MemoryReference(self.variables.unitary_angle_offset, 0), + _ANGLES_PER_UNITARY, ), ) for q in self.qubits_sorted: instructions.append( - inst.Instruction.BinaryLogic( - inst.BinaryLogic( - operator=inst.BinaryOperator.SHR, - destination=inst.MemoryReference(self.variables.current_seeds(q), 0), - source=inst.BinaryOperand.LiteralInteger(_BITS_PER_PAULI), - ) + ClassicalShiftRight( + MemoryReference(self.variables.current_seeds(q), 0), + _BITS_PER_PAULI, ) ) return instructions - def _build_quil_instructions_for_seed_transition(self) -> list[inst.Instruction]: + def _build_quil_instructions_for_seed_transition(self) -> list[InstructionDesignator]: pauli_pairs = [] for cycle_index, cycle in enumerate(self._generate_two_qubit_base_cycles()): cycle_pauli_pairs = [] @@ -1251,41 +1176,35 @@ def _build_quil_instructions_for_seed_transition(self) -> list[inst.Instruction] ) pauli_pairs.append(cycle_pauli_pairs) - instructions = [] + instructions: list[InstructionDesignator] = [] for cycle_index, cycle_pauli_pairs in enumerate(pauli_pairs): is_final_cycle = cycle_index == self._base_cycle_count - 1 instructions.extend( pauli_pair.build_quil_call_instruction( - inst.CallArgument.Identifier(self.variables.twirled_unitaries(q)), - inst.CallArgument.Identifier(self.variables.source_unitaries(q)), - inst.CallArgument.MemoryReference(inst.MemoryReference(self.variables.unitary_angle_offset, 0)), + inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), + inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), + inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.unitary_angle_offset, 0)), ) for q, pauli_pair in cycle_pauli_pairs ) instructions.append( - inst.Instruction.Arithmetic( - inst.Arithmetic( - inst.ArithmeticOperator.ADD, - inst.MemoryReference(self.variables.unitary_angle_offset, 0), - inst.ArithmeticOperand.LiteralInteger(_ANGLES_PER_UNITARY), - ) - ), + ClassicalAdd( + MemoryReference(self.variables.unitary_angle_offset, 0), + _ANGLES_PER_UNITARY + ) ) if not is_final_cycle: for q in self.qubits_sorted: instructions.append( - inst.Instruction.BinaryLogic( - inst.BinaryLogic( - operator=inst.BinaryOperator.SHR, - destination=inst.MemoryReference(self.variables.current_seeds(q), 0), - source=inst.BinaryOperand.LiteralInteger(_BITS_PER_PAULI), - ) + ClassicalShiftRight( + MemoryReference(self.variables.current_seeds(q), 0), + _BITS_PER_PAULI, ) ) return instructions - def _build_quil_instructions_for_final_base_cycle(self) -> list[inst.Instruction]: + def _build_quil_instructions_for_final_base_cycle(self) -> list[Call]: pauli_pairs = [] for cycle_index, cycle in enumerate(self._generate_two_qubit_base_cycles()): cycle_pauli_pairs = [] @@ -1343,35 +1262,33 @@ def _build_quil_instructions_for_final_base_cycle(self) -> list[inst.Instruction ) pauli_pairs.append(cycle_pauli_pairs) - instructions = [] + instructions: list[Call] = [] for cycle_index, cycle_pauli_pairs in enumerate(pauli_pairs): global_cycle_index = (self._cycle_count + 1) - self._base_cycle_count + cycle_index instructions.extend( pauli_pair.build_quil_call_instruction( - inst.CallArgument.Identifier(self.variables.twirled_unitaries(q)), - inst.CallArgument.Identifier(self.variables.source_unitaries(q)), - inst.CallArgument.Immediate(complex(global_cycle_index * _ANGLES_PER_UNITARY, 0)), + inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), + inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), + inst.CallArgument.from_immediate(complex(global_cycle_index * _ANGLES_PER_UNITARY, 0)), ) for q, pauli_pair in cycle_pauli_pairs ) return instructions - def build_quil_instructions(self) -> list[inst.Instruction]: - instructions: list[inst.Instruction] = [] + def build_quil_instructions(self) -> list[InstructionDesignator]: + instructions: list[InstructionDesignator] = [] for q in self.qubits_sorted: for i in range(self._seed_length): - instructions.append( - inst.Instruction.Call( - inst.Call( - "prng_set_seed_and_step", - [ - inst.CallArgument.MemoryReference(inst.MemoryReference(self.variables.pauli_seed(q), i)), - inst.CallArgument.MemoryReference(inst.MemoryReference(self.variables.pauli_seed(q), i)), - ], + instructions.append( + Call( + "prng_set_seed_and_step", + [ + inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.pauli_seed(q), i)), + inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.pauli_seed(q), i)), + ], + ) ) - ) - ) for q in self.qubits_sorted: pauli_pair = _PauliPair( previous=_PauliLiteral.I, @@ -1381,204 +1298,147 @@ def build_quil_instructions(self) -> list[inst.Instruction]: ) instructions.append( pauli_pair.build_quil_call_instruction( - inst.CallArgument.Identifier(self.variables.twirled_unitaries(q)), - inst.CallArgument.Identifier(self.variables.source_unitaries(q)), - inst.CallArgument.Immediate(complex(0, 0)), + inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), + inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), + inst.CallArgument.from_immediate(complex(0, 0)), ) ) for q in self.qubits_sorted: instructions.append( - inst.Instruction.Move( - inst.Move( - inst.MemoryReference(self.variables.unitary_angle_offset, 0), - inst.ArithmeticOperand.LiteralInteger(_ANGLES_PER_UNITARY), - ) + ClassicalMove( + MemoryReference(self.variables.unitary_angle_offset, 0), + _ANGLES_PER_UNITARY, ) ) if self._seed_loop_length >= 1: instructions.extend( - [ - inst.Instruction.Move( - inst.Move( - inst.MemoryReference(self.variables.seed_loop_index, 0), - inst.ArithmeticOperand.LiteralInteger(0), - ) + cast(list[InstructionDesignator], [ + ClassicalMove( + MemoryReference(self.variables.seed_loop_index, 0), + 0 ), - inst.Instruction.Move( - inst.Move( - inst.MemoryReference(self.variables.seed_loop_index, 1), - inst.ArithmeticOperand.LiteralInteger(1), - ) + ClassicalMove( + MemoryReference(self.variables.seed_loop_index, 1), + 1, ), - inst.Instruction.Label(inst.Label(inst.Target.Fixed(self.variables.seed_loop_label))), - ] + JumpTarget(Label(self.variables.seed_loop_label)), + ]) ) if self._seed_loop_inner_length >= 1: instructions.append( - inst.Instruction.Move( - inst.Move( - inst.MemoryReference(self.variables.base_cycle_loop_index, 0), - inst.ArithmeticOperand.LiteralInteger(0), - ) - ), + ClassicalMove( + MemoryReference(self.variables.base_cycle_loop_index, 0), + 0, + ) ) for q in self.qubits_sorted: instructions.append( - inst.Instruction.Load( - inst.Load( - inst.MemoryReference(self.variables.current_seeds(q), 0), - self.variables.pauli_seed(q), - inst.MemoryReference(self.variables.seed_loop_index, 0), - ) + ClassicalLoad( + MemoryReference(self.variables.current_seeds(q), 0), + self.variables.pauli_seed(q), + MemoryReference(self.variables.seed_loop_index, 0), ) ) if self._seed_length > 1: instructions.append( - inst.Instruction.Load( - inst.Load( - inst.MemoryReference(self.variables.current_seeds(q), 1), - self.variables.pauli_seed(q), - inst.MemoryReference(self.variables.seed_loop_index, 1), - ) - ), + ClassicalLoad( + MemoryReference(self.variables.current_seeds(q), 1), + self.variables.pauli_seed(q), + MemoryReference(self.variables.seed_loop_index, 1), + ) ) if self._seed_loop_inner_length >= 1: instructions.append( - inst.Instruction.Label(inst.Label(inst.Target.Fixed(self.variables.seed_loop_inner_label))) + JumpTarget(Label(self.variables.seed_loop_inner_label)) ) instructions.extend(self._build_quil_instructions_for_cycle()) instructions.extend( [ - inst.Instruction.Arithmetic( - inst.Arithmetic( - inst.ArithmeticOperator.ADD, - inst.MemoryReference(self.variables.base_cycle_loop_index, 0), - inst.ArithmeticOperand.LiteralInteger(1), - ) + ClassicalAdd( + MemoryReference(self.variables.base_cycle_loop_index, 0), + 1, ), - inst.Instruction.Comparison( - inst.Comparison( - inst.ComparisonOperator.GREATER_THAN_OR_EQUAL, - inst.MemoryReference(self.variables.loop_break, 0), - inst.MemoryReference(self.variables.base_cycle_loop_index, 0), - inst.ComparisonOperand.LiteralInteger(self._seed_loop_inner_length), - ) + ClassicalGreaterEqual( + MemoryReference(self.variables.loop_break, 0), + MemoryReference(self.variables.base_cycle_loop_index, 0), + self._seed_loop_inner_length, ), - inst.Instruction.JumpUnless( - inst.JumpUnless( - inst.Target.Fixed(self.variables.seed_loop_inner_label), - inst.MemoryReference(self.variables.loop_break, 0), - ) + JumpUnless( + Label(self.variables.seed_loop_inner_label), + MemoryReference(self.variables.loop_break, 0), ), ] ) instructions.extend(self._build_quil_instructions_for_seed_transition()) instructions.extend( [ - inst.Instruction.Arithmetic( - inst.Arithmetic( - inst.ArithmeticOperator.ADD, - inst.MemoryReference(self.variables.seed_loop_index, 0), - inst.ArithmeticOperand.LiteralInteger(1), - ) + ClassicalAdd( + MemoryReference(self.variables.seed_loop_index, 0), + 1, ), - inst.Instruction.Arithmetic( - inst.Arithmetic( - inst.ArithmeticOperator.ADD, - inst.MemoryReference(self.variables.seed_loop_index, 1), - inst.ArithmeticOperand.LiteralInteger(1), - ) + ClassicalAdd( + MemoryReference(self.variables.seed_loop_index, 1), + 1, ), - inst.Instruction.Comparison( - inst.Comparison( - inst.ComparisonOperator.GREATER_THAN_OR_EQUAL, - inst.MemoryReference(self.variables.loop_break, 0), - inst.MemoryReference(self.variables.seed_loop_index, 0), - inst.ComparisonOperand.LiteralInteger(self._seed_loop_length), - ) + ClassicalGreaterEqual( + MemoryReference(self.variables.loop_break, 0), + MemoryReference(self.variables.seed_loop_index, 0), + self._seed_loop_length, ), - inst.Instruction.JumpUnless( - inst.JumpUnless( - inst.Target.Fixed(self.variables.seed_loop_label), - inst.MemoryReference(self.variables.loop_break, 0), - ) + JumpUnless( + Label(self.variables.seed_loop_label), + MemoryReference(self.variables.loop_break, 0), ), ] ) for q in self.qubits_sorted: instructions.append( - inst.Instruction.Move( - inst.Move( - inst.MemoryReference(self.variables.current_seeds(q), 0), - inst.ArithmeticOperand.MemoryReference( - inst.MemoryReference(self.variables.current_seeds(q), 1) - ), - ) + ClassicalMove( + MemoryReference(self.variables.current_seeds(q), 0), + MemoryReference(self.variables.current_seeds(q), 1), ), ) elif self._base_cycle_loop_length >= 1: for q in self.qubits_sorted: instructions.append( - inst.Instruction.Move( - inst.Move( - inst.MemoryReference(self.variables.current_seeds(q), 0), - inst.ArithmeticOperand.MemoryReference( - inst.MemoryReference(self.variables.pauli_seed(q), 0) - ), - ) + ClassicalMove( + MemoryReference(self.variables.current_seeds(q), 0), + MemoryReference(self.variables.pauli_seed(q), 0), ), ) if self._base_cycle_loop_length >= 1: instructions.extend( [ - inst.Instruction.Move( - inst.Move( - inst.MemoryReference(self.variables.base_cycle_loop_index, 0), - inst.ArithmeticOperand.LiteralInteger(0), - ) + ClassicalMove( + MemoryReference(self.variables.base_cycle_loop_index, 0), + 0, ), - inst.Instruction.Label(inst.Label(inst.Target.Fixed(self.variables.base_cycle_loop_label))), + JumpTarget(Label(self.variables.base_cycle_loop_label)), ] ) instructions.extend(self._build_quil_instructions_for_cycle()) instructions.extend( [ - inst.Instruction.Arithmetic( - inst.Arithmetic( - inst.ArithmeticOperator.ADD, - inst.MemoryReference(self.variables.base_cycle_loop_index, 0), - inst.ArithmeticOperand.LiteralInteger(1), - ) + ClassicalAdd( + MemoryReference(self.variables.base_cycle_loop_index, 0), + 1, ), - inst.Instruction.Comparison( - inst.Comparison( - inst.ComparisonOperator.GREATER_THAN_OR_EQUAL, - inst.MemoryReference(self.variables.loop_break, 0), - inst.MemoryReference(self.variables.base_cycle_loop_index, 0), - inst.ComparisonOperand.LiteralInteger(self._base_cycle_loop_length), - ) + ClassicalGreaterEqual( + MemoryReference(self.variables.loop_break, 0), + MemoryReference(self.variables.base_cycle_loop_index, 0), + self._base_cycle_loop_length, ), - inst.Instruction.JumpUnless( - inst.JumpUnless( - inst.Target.Fixed(self.variables.base_cycle_loop_label), - inst.MemoryReference(self.variables.loop_break, 0), - ) + JumpUnless( + Label(self.variables.base_cycle_loop_label), + MemoryReference(self.variables.loop_break, 0), ), ] ) for q in self.qubits_sorted: - instructions.append( - inst.Instruction.Delay( - inst.Delay( - expr.Expression.Number(complex(2e-4, 0)), - [], - [inst.Qubit.Fixed(q)], - ) - ) - ) + instructions.append(Delay([], [q], 2e-4)) instructions.extend(self._build_quil_instructions_for_final_base_cycle()) From e4ca4411eeb4851a004ef9de628c6b950fe9c93f Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Thu, 4 Jun 2026 16:26:30 -0700 Subject: [PATCH 04/59] chore: ruff formatting and fixes --- pyquil/qpu/_randomized_compiling.py | 255 ++++++++++++++-------------- 1 file changed, 128 insertions(+), 127 deletions(-) diff --git a/pyquil/qpu/_randomized_compiling.py b/pyquil/qpu/_randomized_compiling.py index a1eff1de5..876991c65 100644 --- a/pyquil/qpu/_randomized_compiling.py +++ b/pyquil/qpu/_randomized_compiling.py @@ -1,5 +1,4 @@ -""" -Tests for randomized compilation of two-qubit cycles using the "merge_zxzxz_unitary_with_paulis" +"""Tests for randomized compilation of two-qubit cycles using the "merge_zxzxz_unitary_with_paulis" suite of extern functions. Note that the test utilities here are built specifically for random compilation with the ZXZXZ unitary decomposition. @@ -9,33 +8,42 @@ * `test_randomized_compilation_looped_cases`: Test randomized compilation on a repeat base cycle within a loop. """ -from pyquil.quilatom import FormalArgument -from pyquil.quilbase import JumpUnless -from pyquil.quilbase import ClassicalGreaterEqual -from pyquil.quilbase import JumpTarget -from pyquil.quilbase import ClassicalLoad -from pyquil.quilbase import ClassicalShiftRight -from pyquil.quilbase import ClassicalAdd -from pyquil import gates import math from abc import ABC, abstractmethod from collections.abc import Generator, Sequence from dataclasses import dataclass, field from enum import Enum -from functools import cached_property from typing import Literal, cast -from qcs_sdk.qpu.experimental.random import PrngSeedValue, lfsr_v1_next import numpy as np from numpy.typing import NDArray -from qcs_sdk.client import QCSClient -from qcs_sdk.qpu.api import ExecutionOptionsBuilder -from qcs_sdk.qpu.isa import InstructionSetArchitecture -from pyquil.quilatom import Qubit -from pyquil.quil import Program, InstructionDesignator -from pyquil.quilbase import Call, Declare, Delay, ClassicalMove, ArithmeticBinaryOp, Jump, JumpWhen, Label, Measurement, Gate, ClassicalComparison, MemoryReference, Fence, Qubit, Expression +from qcs_sdk.qpu.experimental.random import PrngSeedValue, lfsr_v1_next from quil import instructions as inst -from scipy.stats import norm # type: ignore + +from pyquil import gates +from pyquil.quil import InstructionDesignator +from pyquil.quilatom import FormalArgument, Qubit +from pyquil.quilbase import ( + Call, + ClassicalAdd, + ClassicalGreaterEqual, + ClassicalLoad, + ClassicalMove, + ClassicalShiftRight, + Declare, + Delay, + Expression, + Fence, + Gate, + Jump, + JumpTarget, + JumpUnless, + JumpWhen, + Label, + Measurement, + MemoryReference, + Qubit, +) _BITS_PER_VALUE = 48 _BITS_PER_PAULI = 2 @@ -118,10 +126,10 @@ def _verify_final_memory( twirled_unitary = _compute_unitary_from_zxzxz_angles(twirled_unitary_angles) unitary_angles = tuple(final_memory[names.source_unitaries(q)][start_angle:end_angle]) expected_unitary = _compute_expected_merged_unitary(unitary_angles, final_pauli_pair) - assert _unitary_equal(twirled_unitary, expected_unitary), ( - f"unitary mismatch for q{q} layer {layer_index}: got {twirled_unitary_angles}, \ + assert _unitary_equal( + twirled_unitary, expected_unitary + ), f"unitary mismatch for q{q} layer {layer_index}: got {twirled_unitary_angles}, \ expected {unitary_angles}, pauli pair: {final_pauli_pair}" - ) def _generate_cycle_program_memory_map( @@ -157,8 +165,7 @@ def _generate_randomly_compiled_cycle_program_memory_map( def _generate_pauli_pairs( cycles: list["_TwoQubitCycle"], qubits_sorted: list[int], names: "RandomizedCompilingVariables" ) -> list[list["_PauliPair"]]: - """ - Generate a `_PauliPair` for each qubit at each layer of the circuit; these pairs may be used to build the + """Generate a `_PauliPair` for each qubit at each layer of the circuit; these pairs may be used to build the instructions for randomized compilation. """ all_pauli_pairs = [] @@ -327,18 +334,10 @@ def _generate_declarations_for_randomized_compiling( ) -> tuple[Declare, ...]: """Generate the Quil declaration instructions required for randomized compilation.""" declarations: list[Declare] = [] - declarations.append( - Declare( - names.pauli_conjugates_map, - "INTEGER", - _NUMBER_PAULI_PAIRS - ) - ) + declarations.append(Declare(names.pauli_conjugates_map, "INTEGER", _NUMBER_PAULI_PAIRS)) for q in qubits_sorted: - declarations.append( - Declare(names.pauli_seed(q), "INTEGER", _seed_length) - ) + declarations.append(Declare(names.pauli_seed(q), "INTEGER", _seed_length)) for q in qubits_sorted: declarations.append( Declare( @@ -355,15 +354,9 @@ def _generate_cycle_program_declarations( ) -> tuple[Declare, ...]: """Generate the Quil declaration instructions required for all cycle programs.""" declarations: list[Declare] = [] - declarations.append( - Declare("ro", "BIT", len(qubits_sorted)) - ) + declarations.append(Declare("ro", "BIT", len(qubits_sorted))) for q in qubits_sorted: - declarations.append( - Declare( - names.unitaries(q), "REAL", (depth + 1) * _ANGLES_PER_UNITARY - ) - ) + declarations.append(Declare(names.unitaries(q), "REAL", (depth + 1) * _ANGLES_PER_UNITARY)) return tuple(declarations) @@ -374,8 +367,7 @@ def _generate_random_compilation_preamble_from_pauli_pairs( variables: "RandomizedCompilingVariables", readout_randomization_variables: "ReadoutRandomizationVariables | None", ) -> tuple[InstructionDesignator, ...]: - """ - Generate the classical Quil instructions for computing the randomly compiled program's twirled unitaries for + """Generate the classical Quil instructions for computing the randomly compiled program's twirled unitaries for each qubit at each layer. """ assert len(pauli_pairs) == depth + 1 @@ -385,48 +377,65 @@ def _generate_random_compilation_preamble_from_pauli_pairs( for q in qubits_sorted: for seed_index in range(math.ceil(depth / _PAULIS_PER_WORD)): - instructions.append(Call( - "prng_set_seed_and_step", - [ - inst.CallArgument.from_memory_reference(inst.MemoryReference(variables.pauli_seed(q), seed_index)), - inst.CallArgument.from_memory_reference(inst.MemoryReference(variables.pauli_seed(q), seed_index)), - ], - )) + instructions.append( + Call( + "prng_set_seed_and_step", + [ + inst.CallArgument.from_memory_reference( + inst.MemoryReference(variables.pauli_seed(q), seed_index) + ), + inst.CallArgument.from_memory_reference( + inst.MemoryReference(variables.pauli_seed(q), seed_index) + ), + ], + ) + ) for layer_index in range(depth + 1): for q_index, q in enumerate(qubits_sorted): source = variables.source_unitaries(q) if layer_index == depth and readout_randomization_variables is not None: for i in range(_ANGLES_PER_UNITARY): - instructions.append(ClassicalMove( - MemoryReference(readout_randomization_variables.readout_randomization(q), i), - MemoryReference(variables.source_unitaries(q), layer_index * _ANGLES_PER_UNITARY + i), - )) - instructions.append(Call( - "choose_random_real_sub_regions", - [ - inst.CallArgument.from_identifier(readout_randomization_variables.readout_randomization(q)), - inst.CallArgument.from_identifier(readout_randomization_variables.readout_randomization(q)), - inst.CallArgument.from_immediate(complex(_ANGLES_PER_UNITARY, 0)), - inst.CallArgument.from_memory_reference(inst.MemoryReference(readout_randomization_variables.readout_seed(q), 0)), - ], - )) + instructions.append( + ClassicalMove( + MemoryReference(readout_randomization_variables.readout_randomization(q), i), + MemoryReference(variables.source_unitaries(q), layer_index * _ANGLES_PER_UNITARY + i), + ) + ) + instructions.append( + Call( + "choose_random_real_sub_regions", + [ + inst.CallArgument.from_identifier(readout_randomization_variables.readout_randomization(q)), + inst.CallArgument.from_identifier(readout_randomization_variables.readout_randomization(q)), + inst.CallArgument.from_immediate(complex(_ANGLES_PER_UNITARY, 0)), + inst.CallArgument.from_memory_reference( + inst.MemoryReference(readout_randomization_variables.readout_seed(q), 0) + ), + ], + ) + ) for i in range(_ANGLES_PER_UNITARY): - instructions.append(ClassicalMove( - MemoryReference(variables.twirled_unitaries(q), layer_index * _ANGLES_PER_UNITARY + i), - MemoryReference(readout_randomization_variables.readout_randomization(q), i), - )) + instructions.append( + ClassicalMove( + MemoryReference(variables.twirled_unitaries(q), layer_index * _ANGLES_PER_UNITARY + i), + MemoryReference(readout_randomization_variables.readout_randomization(q), i), + ) + ) source = variables.twirled_unitaries(q) pauli_pair = pauli_pairs[layer_index][q_index] angle_index = layer_index * _ANGLES_PER_UNITARY - instructions.append(pauli_pair.build_quil_call_instruction( - inst.CallArgument.from_identifier(variables.twirled_unitaries(q)), - inst.CallArgument.from_identifier(source), - inst.CallArgument.from_immediate(complex(angle_index, 0)), - )) + instructions.append( + pauli_pair.build_quil_call_instruction( + inst.CallArgument.from_identifier(variables.twirled_unitaries(q)), + inst.CallArgument.from_identifier(source), + inst.CallArgument.from_immediate(complex(angle_index, 0)), + ) + ) return tuple(instructions) + @dataclass(frozen=True, kw_only=True) class _CycleNamingConventions: unitaries_prefix: str = "unitaries" @@ -441,6 +450,7 @@ def unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> inst. def _radians_to_cycles(region_name: str, index: int) -> Expression: return MemoryReference(region_name, index) * 2 * math.pi + def _generate_gate_cycles( qubits_sorted: list[int], cycles: list[_TwoQubitCycle], @@ -587,8 +597,7 @@ def _build_cycle_program( def _build_pauli_conjugates_map(two_qubit_gate_name: str) -> list[int | float]: - """ - Build a map from each Pauli pair to its conjugate under the specified two-qubit gate. This essentially translates + """Build a map from each Pauli pair to its conjugate under the specified two-qubit gate. This essentially translates `_PAULI_COMMUTATIONS` from a map of string to string to a map of int to int, which can be used as a Quil memory reference for conjugation lookup on the QPU. """ @@ -630,8 +639,7 @@ class ShotsPerRandomizationVariables: @dataclass(frozen=True, kw_only=True) class ShotsPerRandomization: - """ - Configuration for building a randomly compiled circuit that randomizes angles every + """Configuration for building a randomly compiled circuit that randomizes angles every `shots_per_randomization` shots. We test this specific circuit construction in order to verify that we use randomized compilation with active reset without incurring the overhead of randomizing every shot. @@ -742,8 +750,7 @@ def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: @dataclass(frozen=True, kw_only=True) class _PauliReference(_ToQuilCallArguments): - """ - A Pauli specified by a reference to a shared memory location on the QPU. Note that we fit + """A Pauli specified by a reference to a shared memory location on the QPU. Note that we fit `_PAULIS_PER_WORD` in a single word of shared memory, so the precise Pauli within this word is specified by `pauli_index` (the control system will shift and mask bits to get the two bit Pauli representation). @@ -801,8 +808,7 @@ def build_quil_call_instruction( source: inst.CallArgument, unitary_angle_offset: inst.CallArgument, ) -> Call: - """ - Build a Quil `inst.Call` instruction based on the Pauli pair. Each underlying union variant will + """Build a Quil `inst.Call` instruction based on the Pauli pair. Each underlying union variant will correspond to a different extern function signature. """ arguments = [destination, source, unitary_angle_offset] @@ -853,8 +859,7 @@ def _rz(phi: float) -> np.ndarray: def _compute_unitary_from_zxzxz_angles(unitary: Sequence[float]) -> NDArray[np.complex128]: - """ - Compute the unitary matrix from ZXZXZ angles. + """Compute the unitary matrix from ZXZXZ angles. """ sx = np.asarray( [ @@ -871,8 +876,7 @@ def _compute_unitary_from_zxzxz_angles(unitary: Sequence[float]) -> NDArray[np.c def _compute_expected_merged_unitary( unitary: tuple[float, ...], pauli_pair: tuple[_PauliLiteral, _PauliLiteral] ) -> NDArray[np.complex128]: - """ - Compute the expected merged unitary matrix from ZXZXZ angles and a pair of Pauli literals. + """Compute the expected merged unitary matrix from ZXZXZ angles and a pair of Pauli literals. """ return pauli_pair[1].matrix @ _compute_unitary_from_zxzxz_angles(unitary) @ pauli_pair[0].matrix @@ -999,22 +1003,16 @@ def _generate_declarations(self) -> list[Declare]: if self._base_cycle_loop_length > 0 or self._seed_loop_inner_length > 0: declarations.extend( [ - Declare( - self.variables.base_cycle_loop_index, "INTEGER", 1 - ), + Declare(self.variables.base_cycle_loop_index, "INTEGER", 1), ] ) current__seed_length = 2 if self._seed_loop_length > 0 else 1 for q in self.qubits_sorted: - declarations.append( - Declare( - self.variables.current_seeds(q), "INTEGER", current__seed_length - ) - ) + declarations.append(Declare(self.variables.current_seeds(q), "INTEGER", current__seed_length)) return declarations def generate_seed_values(self, rng: np.random.Generator) -> NDArray[np.int64]: - return rng.integers(-2**47, 2**47 - 1, size=len(self.qubits_sorted), dtype=np.int64) + return rng.integers(-(2**47), 2**47 - 1, size=len(self.qubits_sorted), dtype=np.int64) def build_memory_map( self, @@ -1096,7 +1094,9 @@ def _build_quil_instructions_for_cycle(self) -> list[InstructionDesignator]: pauli_pair.build_quil_call_instruction( inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), - inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.unitary_angle_offset, 0)), + inst.CallArgument.from_memory_reference( + inst.MemoryReference(self.variables.unitary_angle_offset, 0) + ), ) for q, pauli_pair in cycle_pauli_pairs ) @@ -1183,15 +1183,14 @@ def _build_quil_instructions_for_seed_transition(self) -> list[InstructionDesign pauli_pair.build_quil_call_instruction( inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), - inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.unitary_angle_offset, 0)), + inst.CallArgument.from_memory_reference( + inst.MemoryReference(self.variables.unitary_angle_offset, 0) + ), ) for q, pauli_pair in cycle_pauli_pairs ) instructions.append( - ClassicalAdd( - MemoryReference(self.variables.unitary_angle_offset, 0), - _ANGLES_PER_UNITARY - ) + ClassicalAdd(MemoryReference(self.variables.unitary_angle_offset, 0), _ANGLES_PER_UNITARY) ) if not is_final_cycle: for q in self.qubits_sorted: @@ -1212,10 +1211,12 @@ def _build_quil_instructions_for_final_base_cycle(self) -> list[Call]: for q in cycle.data.keys(): edge = cycle[q] pauli_left = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), pauli_index=cycle_index + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), + pauli_index=cycle_index, ) pauli_right = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), pauli_index=cycle_index + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), + pauli_index=cycle_index, ) is_pauli_left = q == edge[0] pauli_conjugate = _PauliConjugate( @@ -1280,15 +1281,19 @@ def build_quil_instructions(self) -> list[InstructionDesignator]: instructions: list[InstructionDesignator] = [] for q in self.qubits_sorted: for i in range(self._seed_length): - instructions.append( - Call( - "prng_set_seed_and_step", - [ - inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.pauli_seed(q), i)), - inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.pauli_seed(q), i)), - ], - ) - ) + instructions.append( + Call( + "prng_set_seed_and_step", + [ + inst.CallArgument.from_memory_reference( + inst.MemoryReference(self.variables.pauli_seed(q), i) + ), + inst.CallArgument.from_memory_reference( + inst.MemoryReference(self.variables.pauli_seed(q), i) + ), + ], + ) + ) for q in self.qubits_sorted: pauli_pair = _PauliPair( previous=_PauliLiteral.I, @@ -1313,17 +1318,17 @@ def build_quil_instructions(self) -> list[InstructionDesignator]: if self._seed_loop_length >= 1: instructions.extend( - cast(list[InstructionDesignator], [ - ClassicalMove( - MemoryReference(self.variables.seed_loop_index, 0), - 0 - ), - ClassicalMove( - MemoryReference(self.variables.seed_loop_index, 1), - 1, - ), - JumpTarget(Label(self.variables.seed_loop_label)), - ]) + cast( + list[InstructionDesignator], + [ + ClassicalMove(MemoryReference(self.variables.seed_loop_index, 0), 0), + ClassicalMove( + MemoryReference(self.variables.seed_loop_index, 1), + 1, + ), + JumpTarget(Label(self.variables.seed_loop_label)), + ], + ) ) if self._seed_loop_inner_length >= 1: instructions.append( @@ -1349,9 +1354,7 @@ def build_quil_instructions(self) -> list[InstructionDesignator]: ) ) if self._seed_loop_inner_length >= 1: - instructions.append( - JumpTarget(Label(self.variables.seed_loop_inner_label)) - ) + instructions.append(JumpTarget(Label(self.variables.seed_loop_inner_label))) instructions.extend(self._build_quil_instructions_for_cycle()) instructions.extend( [ @@ -1443,5 +1446,3 @@ def build_quil_instructions(self) -> list[InstructionDesignator]: instructions.extend(self._build_quil_instructions_for_final_base_cycle()) return instructions - - From 2a45412ed36bccc276a7df73fddb071ff18a9323 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Thu, 4 Jun 2026 16:34:58 -0700 Subject: [PATCH 05/59] chore: generators to tuples and pyquil docstrings --- pyquil/qpu/_randomized_compiling.py | 173 +++++++++++++++------------- 1 file changed, 93 insertions(+), 80 deletions(-) diff --git a/pyquil/qpu/_randomized_compiling.py b/pyquil/qpu/_randomized_compiling.py index 876991c65..4e5087dbc 100644 --- a/pyquil/qpu/_randomized_compiling.py +++ b/pyquil/qpu/_randomized_compiling.py @@ -1,6 +1,8 @@ -"""Tests for randomized compilation of two-qubit cycles using the "merge_zxzxz_unitary_with_paulis" -suite of extern functions. Note that the test utilities here are built specifically for random compilation -with the ZXZXZ unitary decomposition. +"""Test utilities for randomized compilation of two-qubit cycles. + +The test utilities here are built specifically for random compilation with the +ZXZXZ unitary decomposition using the "merge_zxzxz_unitary_with_paulis" suite +of extern functions. There are two tests of import here (everything else is a utility for these tests): @@ -10,7 +12,7 @@ import math from abc import ABC, abstractmethod -from collections.abc import Generator, Sequence +from collections.abc import Sequence from dataclasses import dataclass, field from enum import Enum from typing import Literal, cast @@ -95,12 +97,12 @@ def _verify_final_memory( ): """Verify that the final memory state matches expectations. - Specifically, we take the Pauli seeds - specified in the original memory map and generate the expected final random value using - `generate_lfsr_v1_sequence` and the shot count. We then use this final seed to infer the - pair of Paulis merged for each qubit at every layer. We can then apply this Pauli pair to the - original unitaries specified for the (qubit, layer) and verify that the resulting unitary is - equal to the twirled unitaries read from the final memory for the (qubit, layer). + Specifically, we take the Pauli seeds specified in the original memory map and + generate the expected final random value using `generate_lfsr_v1_sequence` and + the shot count. We then use this final seed to infer the pair of Paulis merged + for each qubit at every layer. We can then apply this Pauli pair to the original + unitaries specified for the (qubit, layer) and verify that the resulting unitary + is equal to the twirled unitaries read from the final memory for the (qubit, layer). """ final_pauli_cache = _FinalPauliSeedAndPairCache( shot_count=shot_count, @@ -165,8 +167,9 @@ def _generate_randomly_compiled_cycle_program_memory_map( def _generate_pauli_pairs( cycles: list["_TwoQubitCycle"], qubits_sorted: list[int], names: "RandomizedCompilingVariables" ) -> list[list["_PauliPair"]]: - """Generate a `_PauliPair` for each qubit at each layer of the circuit; these pairs may be used to build the - instructions for randomized compilation. + """Generate a `_PauliPair` for each qubit at each layer of the circuit. + + These pairs may be used to build the instructions for randomized compilation. """ all_pauli_pairs = [] depth = len(cycles) @@ -241,8 +244,9 @@ def _generate_lfsr_v1_sequence(seed_value: int, start_index: int, count: int) -> @dataclass(frozen=True, kw_only=True) class _FinalPauliSeedAndPairCache: - """A cache utility for storing and retrieving the final Pauli seeds and pairs for each qubit and layer in a - randomized compilation. Each layer beyond the first of the circuit requires knowledge of the previous + """Cache for final Pauli seeds and pairs per qubit and layer. + + Each layer beyond the first of the circuit requires knowledge of the previous layer's Pauli pair in order to determine the conjugate. """ @@ -268,7 +272,7 @@ def _get_seed_value(self, key: tuple[int, int]) -> int: seed_value = int(self.original_seeds[q][seed_index]) if sequence_index >= 0: - seed_value = generate_lfsr_v1_sequence(seed_value, start_index=sequence_index, count=1)[0] + seed_value = _generate_lfsr_v1_sequence(seed_value, start_index=sequence_index, count=1)[0] return seed_value def _get_random_pauli_for_seed_value(self, seed_value: int, layer_index: int) -> "_PauliLiteral": @@ -367,8 +371,9 @@ def _generate_random_compilation_preamble_from_pauli_pairs( variables: "RandomizedCompilingVariables", readout_randomization_variables: "ReadoutRandomizationVariables | None", ) -> tuple[InstructionDesignator, ...]: - """Generate the classical Quil instructions for computing the randomly compiled program's twirled unitaries for - each qubit at each layer. + """Generate classical Quil instructions for computing twirled unitaries. + + Computes the randomly compiled program's twirled unitaries for each qubit at each layer. """ assert len(pauli_pairs) == depth + 1 assert all(len(layer_literals) == len(qubits_sorted) for layer_literals in pauli_pairs) @@ -510,11 +515,11 @@ def _build_cycle_program_with_randomized_compilation( program.add_instructions( _generate_declarations_for_randomized_compiling(qubits_sorted, len(cycles) + 1, _seed_length, names) ) - program.add_instructions(list(configuration.declarations(qubits_sorted))) + program.add_instructions(configuration.declarations(qubits_sorted)) if configuration.shots_per_randomization is not None: program.add_instructions( - list(configuration.shots_per_randomization.generate_mod_shot_count_block(qubits_sorted)) + configuration.shots_per_randomization.generate_mod_shot_count_block(qubits_sorted) ) else: for q in qubits_sorted: @@ -597,9 +602,10 @@ def _build_cycle_program( def _build_pauli_conjugates_map(two_qubit_gate_name: str) -> list[int | float]: - """Build a map from each Pauli pair to its conjugate under the specified two-qubit gate. This essentially translates - `_PAULI_COMMUTATIONS` from a map of string to string to a map of int to int, which can be used as a Quil memory - reference for conjugation lookup on the QPU. + """Build a map from each Pauli pair to its conjugate under the specified two-qubit gate. + + This essentially translates `_PAULI_COMMUTATIONS` from a map of string to string to a map + of int to int, which can be used as a Quil memory reference for conjugation lookup on the QPU. """ pauli_conjugates_map: list[int | None] = [None] * _NUMBER_PAULI_PAIRS for previous_paulis, next_paulis in _PAULI_COMMUTATIONS[two_qubit_gate_name].items(): @@ -639,10 +645,11 @@ class ShotsPerRandomizationVariables: @dataclass(frozen=True, kw_only=True) class ShotsPerRandomization: - """Configuration for building a randomly compiled circuit that randomizes angles every - `shots_per_randomization` shots. We test this specific circuit construction in order - to verify that we use randomized compilation with active reset without incurring - the overhead of randomizing every shot. + """Configuration for randomizing angles every N shots. + + We test this specific circuit construction in order to verify that we use + randomized compilation with active reset without incurring the overhead of + randomizing every shot. """ shots_per_randomization: int @@ -650,46 +657,50 @@ class ShotsPerRandomization: variables: ShotsPerRandomizationVariables = field(default_factory=ShotsPerRandomizationVariables) @property - def declarations(self) -> Generator[InstructionDesignator]: - yield Declare(self.variables.modulo_counter, "INTEGER", 1) - yield Declare(self.variables.is_mod_zero, "BIT", 1) + def declarations(self) -> tuple[InstructionDesignator, ...]: + return ( + Declare(self.variables.modulo_counter, "INTEGER", 1), + Declare(self.variables.is_mod_zero, "BIT", 1), + ) @property def pulse_program_label(self) -> InstructionDesignator: return JumpTarget(Label(self.variables.pulse_program_label)) - def generate_mod_shot_count_block(self, qubits_sorted: list[int]) -> Generator[InstructionDesignator]: - yield ClassicalAdd( - MemoryReference(self.variables.modulo_counter, 0), - 1, - ) - yield ClassicalGreaterEqual( - MemoryReference(self.variables.is_mod_zero, 0), - MemoryReference(self.variables.modulo_counter, 0), - self.shots_per_randomization, - ) - yield Call( - "if_then_else_integer", - [ - # destination - inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.modulo_counter, 0)), - # condition - inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.is_mod_zero, 0)), - # true value - inst.CallArgument.from_immediate(complex(0, 0)), - # false value - inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.modulo_counter, 0)), - ], - ) - - yield JumpWhen( - Label(self.variables.randomization_label), - MemoryReference(self.variables.is_mod_zero, 0), - ) + def generate_mod_shot_count_block(self, qubits_sorted: list[int]) -> tuple[InstructionDesignator, ...]: + instructions: list[InstructionDesignator] = [ + ClassicalAdd( + MemoryReference(self.variables.modulo_counter, 0), + 1, + ), + ClassicalGreaterEqual( + MemoryReference(self.variables.is_mod_zero, 0), + MemoryReference(self.variables.modulo_counter, 0), + self.shots_per_randomization, + ), + Call( + "if_then_else_integer", + [ + # destination + inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.modulo_counter, 0)), + # condition + inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.is_mod_zero, 0)), + # true value + inst.CallArgument.from_immediate(complex(0, 0)), + # false value + inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.modulo_counter, 0)), + ], + ), + JumpWhen( + Label(self.variables.randomization_label), + MemoryReference(self.variables.is_mod_zero, 0), + ), + ] for q in qubits_sorted: - yield Delay([], [q], self.secondary_delay_seconds) - yield Jump(Label(self.variables.pulse_program_label)) - yield JumpTarget(Label(self.variables.randomization_label)) + instructions.append(Delay([], [q], self.secondary_delay_seconds)) + instructions.append(Jump(Label(self.variables.pulse_program_label))) + instructions.append(JumpTarget(Label(self.variables.randomization_label))) + return tuple(instructions) @dataclass(frozen=True, kw_only=True) @@ -750,10 +761,11 @@ def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: @dataclass(frozen=True, kw_only=True) class _PauliReference(_ToQuilCallArguments): - """A Pauli specified by a reference to a shared memory location on the QPU. Note that we fit - `_PAULIS_PER_WORD` in a single word of shared memory, so the precise Pauli within this - word is specified by `pauli_index` (the control system will shift and mask bits to get - the two bit Pauli representation). + """A Pauli specified by reference to shared memory on the QPU. + + We fit `_PAULIS_PER_WORD` in a single word of shared memory, so the precise + Pauli within this word is specified by `pauli_index` (the control system will + shift and mask bits to get the two bit Pauli representation). """ memory_reference: inst.MemoryReference @@ -768,12 +780,12 @@ def to_call_arguments(self) -> tuple[inst.CallArgument, inst.CallArgument]: @dataclass(frozen=True, kw_only=True) class _PauliConjugate(_ToQuilCallArguments): - """A Pauli specified by a conjugation of two other Paulis. + """A Pauli specified by conjugation of two other Paulis. - This is used a previous cycle applied two random Paulis before the two qubit gate. - We look these random Paulis up by reference and then index into `pauli_conjugates_map` - to get the two qubit conjugation; we then select one of these Paulis based on - `is_left_conjugate`. + This is used when a previous cycle applied two random Paulis before the two qubit + gate. We look these random Paulis up by reference and then index into + `pauli_conjugates_map` to get the two qubit conjugation; we then select one of + these Paulis based on `is_left_conjugate`. """ pauli_left: _PauliReference @@ -795,7 +807,7 @@ def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: class _PauliPair: """A pair of Paulis applied on a specific qubit at a specific layer. - Such a Pauli pair is read on the control system and used to apply mutations to the + The pair is read on the control system and used to apply mutations to the unitary angles for this (qubit, layer_index). """ @@ -808,8 +820,9 @@ def build_quil_call_instruction( source: inst.CallArgument, unitary_angle_offset: inst.CallArgument, ) -> Call: - """Build a Quil `inst.Call` instruction based on the Pauli pair. Each underlying union variant will - correspond to a different extern function signature. + """Build a Quil Call instruction based on the Pauli pair. + + Each underlying union variant will correspond to a different extern function signature. """ arguments = [destination, source, unitary_angle_offset] arguments.extend(self.next.to_call_arguments()) @@ -859,8 +872,7 @@ def _rz(phi: float) -> np.ndarray: def _compute_unitary_from_zxzxz_angles(unitary: Sequence[float]) -> NDArray[np.complex128]: - """Compute the unitary matrix from ZXZXZ angles. - """ + """Compute the unitary matrix from ZXZXZ angles.""" sx = np.asarray( [ [np.sqrt(0.5), -np.sqrt(0.5) * 1j], @@ -876,8 +888,7 @@ def _compute_unitary_from_zxzxz_angles(unitary: Sequence[float]) -> NDArray[np.c def _compute_expected_merged_unitary( unitary: tuple[float, ...], pauli_pair: tuple[_PauliLiteral, _PauliLiteral] ) -> NDArray[np.complex128]: - """Compute the expected merged unitary matrix from ZXZXZ angles and a pair of Pauli literals. - """ + """Compute the expected merged unitary from ZXZXZ angles and a Pauli pair.""" return pauli_pair[1].matrix @ _compute_unitary_from_zxzxz_angles(unitary) @ pauli_pair[0].matrix @@ -939,13 +950,15 @@ class RandomizedCompilingConfiguration: def randomize_readout(self) -> bool: return self.readout_randomization_variables is not None - def declarations(self, qubits_sorted: list[int]) -> Generator[InstructionDesignator]: + def declarations(self, qubits_sorted: list[int]) -> tuple[InstructionDesignator, ...]: + instructions: list[InstructionDesignator] = [] if self.shots_per_randomization is not None: - yield from self.shots_per_randomization.declarations + instructions.extend(self.shots_per_randomization.declarations) if self.readout_randomization_variables is not None: for q in qubits_sorted: - yield Declare(self.readout_randomization_variables.readout_seed(q), "INTEGER", 1) - yield Declare(self.readout_randomization_variables.readout_randomization(q), "REAL", 3) + instructions.append(Declare(self.readout_randomization_variables.readout_seed(q), "INTEGER", 1)) + instructions.append(Declare(self.readout_randomization_variables.readout_randomization(q), "REAL", 3)) + return tuple(instructions) def __post_init__(self) -> None: self._validate() From 1041b609fdc449fbdbc2364f1488ec50f29b578b Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Mon, 8 Jun 2026 10:13:38 -0700 Subject: [PATCH 06/59] chore: cleanup randomized compiling api --- pyquil/qpu/_randomized_compiling.py | 676 +++++++++------------------- 1 file changed, 215 insertions(+), 461 deletions(-) diff --git a/pyquil/qpu/_randomized_compiling.py b/pyquil/qpu/_randomized_compiling.py index 4e5087dbc..791784808 100644 --- a/pyquil/qpu/_randomized_compiling.py +++ b/pyquil/qpu/_randomized_compiling.py @@ -10,6 +10,7 @@ * `test_randomized_compilation_looped_cases`: Test randomized compilation on a repeat base cycle within a loop. """ +from functools import cached_property import math from abc import ABC, abstractmethod from collections.abc import Sequence @@ -19,11 +20,10 @@ import numpy as np from numpy.typing import NDArray -from qcs_sdk.qpu.experimental.random import PrngSeedValue, lfsr_v1_next from quil import instructions as inst from pyquil import gates -from pyquil.quil import InstructionDesignator +from pyquil.quil import InstructionDesignator, Program from pyquil.quilatom import FormalArgument, Qubit from pyquil.quilbase import ( Call, @@ -36,20 +36,17 @@ Delay, Expression, Fence, - Gate, Jump, JumpTarget, JumpUnless, JumpWhen, Label, - Measurement, MemoryReference, - Qubit, ) _BITS_PER_VALUE = 48 _BITS_PER_PAULI = 2 -_PAULIS_PER_WORD = _BITS_PER_VALUE // _BITS_PER_PAULI +_PAULIS_PER_VALUE = _BITS_PER_VALUE // _BITS_PER_PAULI _ANGLES_PER_UNITARY = 3 _NUMBER_PAULI_PAIRS = 16 @@ -84,161 +81,14 @@ def from_edges(cls, edges: Sequence[_TEdge]) -> "_TwoQubitCycle": return cycle -def _verify_final_memory( - final_memory: dict[str, list[int] | list[float]], - cycles: list[_TwoQubitCycle], - qubits_sorted: list[int], - shot_count: int, - shots_per_randomization: int | None, - original_memory: dict[str, list[int | float]], - two_qubit_gate_name: str, - names: "RandomizedCompilingVariables", - paulis_per_word: int = _PAULIS_PER_WORD, -): - """Verify that the final memory state matches expectations. - - Specifically, we take the Pauli seeds specified in the original memory map and - generate the expected final random value using `generate_lfsr_v1_sequence` and - the shot count. We then use this final seed to infer the pair of Paulis merged - for each qubit at every layer. We can then apply this Pauli pair to the original - unitaries specified for the (qubit, layer) and verify that the resulting unitary - is equal to the twirled unitaries read from the final memory for the (qubit, layer). - """ - final_pauli_cache = _FinalPauliSeedAndPairCache( - shot_count=shot_count, - shots_per_randomization=shots_per_randomization, - original_seeds={q: original_memory[names.pauli_seed(q)] for q in qubits_sorted}, - two_qubit_gate_name=two_qubit_gate_name, - cycles=cycles, - paulis_per_word=paulis_per_word, - ) - for q in qubits_sorted: - for layer_index in range(len(cycles) + 1): - seed_index = layer_index // paulis_per_word - expected_final_seed_value, final_pauli_pair = final_pauli_cache[q, layer_index] - if layer_index < len(cycles): - found_final_pauli_seed = final_memory[names.pauli_seed(q)][seed_index] - assert found_final_pauli_seed == expected_final_seed_value, ( - f"final seed value mismatch for q{q}, l{layer_index}: got " - f"{found_final_pauli_seed}, expected {expected_final_seed_value}" - ) - start_angle = layer_index * _ANGLES_PER_UNITARY - end_angle = start_angle + _ANGLES_PER_UNITARY - twirled_unitary_angles = tuple(final_memory[names.twirled_unitaries(q)][start_angle:end_angle]) - twirled_unitary = _compute_unitary_from_zxzxz_angles(twirled_unitary_angles) - unitary_angles = tuple(final_memory[names.source_unitaries(q)][start_angle:end_angle]) - expected_unitary = _compute_expected_merged_unitary(unitary_angles, final_pauli_pair) - assert _unitary_equal( - twirled_unitary, expected_unitary - ), f"unitary mismatch for q{q} layer {layer_index}: got {twirled_unitary_angles}, \ - expected {unitary_angles}, pauli pair: {final_pauli_pair}" - - -def _generate_cycle_program_memory_map( - qubits_sorted: list[int], - names: "RandomizedCompilingVariables", - angles: NDArray[np.float64], -): - memory_map: dict[str, list[float | int]] = {} - _, u2_cycle_count, _ = angles.shape - for q_index, q in enumerate(qubits_sorted): - q_angles = cast(list[float], angles[q_index, :, :].reshape((u2_cycle_count * _ANGLES_PER_UNITARY,)).tolist()) - memory_map[names.source_unitaries(q)] = q_angles - return memory_map - - -def _generate_randomly_compiled_cycle_program_memory_map( - qubits_sorted: list[int], - u2_cycle_count: int, - names: "RandomizedCompilingVariables", - rng: np.random.Generator, - two_qubit_gate_name: Literal["CZ", "ISWAP"], - _seed_length: int, -): - memory_map: dict[str, list[float | int]] = { - names.pauli_conjugates_map: _build_pauli_conjugates_map(two_qubit_gate_name), - } - for q in qubits_sorted: - memory_map[names.pauli_seed(q)] = rng.integers(-(2**47), 2**47 - 1, size=_seed_length).tolist() - memory_map[names.twirled_unitaries(q)] = np.zeros((u2_cycle_count * _ANGLES_PER_UNITARY,), dtype=float).tolist() - return memory_map - - -def _generate_pauli_pairs( - cycles: list["_TwoQubitCycle"], qubits_sorted: list[int], names: "RandomizedCompilingVariables" -) -> list[list["_PauliPair"]]: - """Generate a `_PauliPair` for each qubit at each layer of the circuit. - - These pairs may be used to build the instructions for randomized compilation. - """ - all_pauli_pairs = [] - depth = len(cycles) - for layer_index in range(depth + 1): - cycle_pauli_pairs = [] - - previous_cycle = cycles[layer_index - 1] if layer_index > 0 else None - for q in qubits_sorted: - if previous_cycle is not None: - previous_index = (layer_index - 1) // _PAULIS_PER_WORD - previous_pauli_index = (layer_index - 1) % _PAULIS_PER_WORD - if q in previous_cycle.data: - previous_edge = previous_cycle.data[q] - is_pauli_left = q == previous_edge[0] - conjugate = _PauliConjugate( - pauli_left=_PauliReference( - memory_reference=inst.MemoryReference(names.pauli_seed(previous_edge[0]), previous_index), - pauli_index=previous_pauli_index, - ), - pauli_right=_PauliReference( - memory_reference=inst.MemoryReference(names.pauli_seed(previous_edge[1]), previous_index), - pauli_index=previous_pauli_index, - ), - is_left_conjugate=is_pauli_left, - ) - else: - # If this qubit is not involved in a two qubit gate, we simply replay the random Pauli - # from the previous layer, since Pauli's are their own inverses. - conjugate = _PauliReference( - memory_reference=inst.MemoryReference(names.pauli_seed(q), previous_index), - pauli_index=previous_pauli_index, - ) - else: - # The conjugate for the first layer of the circuit is always the identity. - conjugate = _PauliLiteral.I - - if layer_index < len(cycles): - next_index = layer_index // _PAULIS_PER_WORD - next_pauli_index = layer_index % _PAULIS_PER_WORD - next_pauli = _PauliReference( - memory_reference=inst.MemoryReference(names.pauli_seed(q), next_index), - pauli_index=next_pauli_index, - ) - cycle_pauli_pairs.append( - _PauliPair( - previous=conjugate, - next=next_pauli, - ) - ) - else: - # The final layer must not apply a new random Pauli that requires conjugation. - cycle_pauli_pairs.append( - _PauliPair( - previous=conjugate, - next=_PauliLiteral.I, - ) - ) - all_pauli_pairs.append(cycle_pauli_pairs) - return all_pauli_pairs - - def _generate_lfsr_v1_sequence(seed_value: int, start_index: int, count: int) -> list[int]: """Generate a sequence of values from the LFSR v1 PRNG given an initial seed value, a start index, and a count.""" sequence = [] - current_value = PrngSeedValue(seed_value) + current_value = seed_value for i in range(start_index + count): if i >= start_index: sequence.append(current_value) - current_value = lfsr_v1_next(current_value) + current_value = _lfsr_v1_next(current_value) return sequence @@ -252,31 +102,29 @@ class _FinalPauliSeedAndPairCache: shot_count: int shots_per_randomization: int | None = None - original_seeds: dict[int, list[int | float]] + original_seeds: dict[int, list[int]] two_qubit_gate_name: str - cycles: list[_TwoQubitCycle] - seeds: dict[tuple[int, int], int] = field(default_factory=dict) - """Keys are are (qubit, layer_index)""" + cycles: tuple[_TwoQubitCycle, ...] - pauli_pairs: dict[tuple[int, int], tuple["_PauliLiteral", "_PauliLiteral"]] = field(default_factory=dict) + pauli_pairs: dict[tuple[int, int], tuple["_PauliLiteral", "_PauliLiteral"]] = field( + default_factory=dict, init=False + ) """Keys are (qubit, layer_index).""" - paulis_per_word: int = _PAULIS_PER_WORD - - def _get_seed_value(self, key: tuple[int, int]) -> int: + @cached_property + def _final_seeds(self) -> dict[int, tuple[int, ...]]: sequence_index = self.shot_count - 1 if self.shots_per_randomization is not None: sequence_index = (self.shot_count - 1) // self.shots_per_randomization - 1 - q, layer_index = key - seed_index = layer_index // _PAULIS_PER_WORD - - seed_value = int(self.original_seeds[q][seed_index]) - if sequence_index >= 0: - seed_value = _generate_lfsr_v1_sequence(seed_value, start_index=sequence_index, count=1)[0] - return seed_value + final_seeds = {} + for qubit, seeds in self.original_seeds.items(): + final_seeds[qubit] = tuple( + _generate_lfsr_v1_sequence(seed, start_index=sequence_index, count=1)[0] for seed in seeds + ) + return final_seeds def _get_random_pauli_for_seed_value(self, seed_value: int, layer_index: int) -> "_PauliLiteral": - pauli_index = layer_index % _PAULIS_PER_WORD + pauli_index = layer_index % _PAULIS_PER_VALUE return _PauliLiteral(seed_value >> (2 * pauli_index) & 0b11) def _get_previous_random_pauli(self, key: tuple[int, int]) -> "_PauliLiteral": @@ -309,9 +157,8 @@ def __getitem__(self, key: tuple[int, int]) -> tuple[int | None, tuple["_PauliLi previous_conjugate = self._get_previous_random_pauli(key) self.pauli_pairs[key] = (previous_conjugate, next_pauli) return None, self.pauli_pairs[key] - if key not in self.seeds: - self.seeds[key] = self._get_seed_value(key) - seed_value = self.seeds[key] + seed_index = layer_index // _PAULIS_PER_VALUE + seed_value = self._final_seeds[q][seed_index] if key not in self.pauli_pairs: next_pauli = self._get_random_pauli_for_seed_value(seed_value, layer_index) previous_conjugate = self._get_previous_random_pauli(key) @@ -320,244 +167,21 @@ def __getitem__(self, key: tuple[int, int]) -> tuple[int | None, tuple["_PauliLi return seed_value, pauli_pair -def _get_leading_delay_seconds(two_qubit_gate_name: Literal["CZ", "ISWAP"]) -> float: - match two_qubit_gate_name: - case "CZ": - return 2e-4 - case "ISWAP": - return 2e-3 - case _: - raise ValueError(f"unsupported two qubit gate name: {two_qubit_gate_name}") - - -def _generate_declarations_for_randomized_compiling( - qubits_sorted: list[int], - u2_cycle_count: int, - _seed_length: int, - names: "RandomizedCompilingVariables", -) -> tuple[Declare, ...]: - """Generate the Quil declaration instructions required for randomized compilation.""" - declarations: list[Declare] = [] - declarations.append(Declare(names.pauli_conjugates_map, "INTEGER", _NUMBER_PAULI_PAIRS)) - - for q in qubits_sorted: - declarations.append(Declare(names.pauli_seed(q), "INTEGER", _seed_length)) - for q in qubits_sorted: - declarations.append( - Declare( - names.twirled_unitaries(q), - "REAL", - u2_cycle_count * _ANGLES_PER_UNITARY, - ) - ) - return tuple(declarations) - - -def _generate_cycle_program_declarations( - qubits_sorted: list[int], depth: int, names: "_CycleNamingConventions" -) -> tuple[Declare, ...]: - """Generate the Quil declaration instructions required for all cycle programs.""" - declarations: list[Declare] = [] - declarations.append(Declare("ro", "BIT", len(qubits_sorted))) - for q in qubits_sorted: - declarations.append(Declare(names.unitaries(q), "REAL", (depth + 1) * _ANGLES_PER_UNITARY)) - return tuple(declarations) - - -def _generate_random_compilation_preamble_from_pauli_pairs( - pauli_pairs: list[list["_PauliPair"]], - qubits_sorted: list[int], - depth: int, - variables: "RandomizedCompilingVariables", - readout_randomization_variables: "ReadoutRandomizationVariables | None", -) -> tuple[InstructionDesignator, ...]: - """Generate classical Quil instructions for computing twirled unitaries. - - Computes the randomly compiled program's twirled unitaries for each qubit at each layer. - """ - assert len(pauli_pairs) == depth + 1 - assert all(len(layer_literals) == len(qubits_sorted) for layer_literals in pauli_pairs) - - instructions: list[InstructionDesignator] = [] - - for q in qubits_sorted: - for seed_index in range(math.ceil(depth / _PAULIS_PER_WORD)): - instructions.append( - Call( - "prng_set_seed_and_step", - [ - inst.CallArgument.from_memory_reference( - inst.MemoryReference(variables.pauli_seed(q), seed_index) - ), - inst.CallArgument.from_memory_reference( - inst.MemoryReference(variables.pauli_seed(q), seed_index) - ), - ], - ) - ) - - for layer_index in range(depth + 1): - for q_index, q in enumerate(qubits_sorted): - source = variables.source_unitaries(q) - if layer_index == depth and readout_randomization_variables is not None: - for i in range(_ANGLES_PER_UNITARY): - instructions.append( - ClassicalMove( - MemoryReference(readout_randomization_variables.readout_randomization(q), i), - MemoryReference(variables.source_unitaries(q), layer_index * _ANGLES_PER_UNITARY + i), - ) - ) - instructions.append( - Call( - "choose_random_real_sub_regions", - [ - inst.CallArgument.from_identifier(readout_randomization_variables.readout_randomization(q)), - inst.CallArgument.from_identifier(readout_randomization_variables.readout_randomization(q)), - inst.CallArgument.from_immediate(complex(_ANGLES_PER_UNITARY, 0)), - inst.CallArgument.from_memory_reference( - inst.MemoryReference(readout_randomization_variables.readout_seed(q), 0) - ), - ], - ) - ) - for i in range(_ANGLES_PER_UNITARY): - instructions.append( - ClassicalMove( - MemoryReference(variables.twirled_unitaries(q), layer_index * _ANGLES_PER_UNITARY + i), - MemoryReference(readout_randomization_variables.readout_randomization(q), i), - ) - ) - source = variables.twirled_unitaries(q) - pauli_pair = pauli_pairs[layer_index][q_index] - angle_index = layer_index * _ANGLES_PER_UNITARY - instructions.append( - pauli_pair.build_quil_call_instruction( - inst.CallArgument.from_identifier(variables.twirled_unitaries(q)), - inst.CallArgument.from_identifier(source), - inst.CallArgument.from_immediate(complex(angle_index, 0)), - ) - ) - - return tuple(instructions) - - -@dataclass(frozen=True, kw_only=True) -class _CycleNamingConventions: - unitaries_prefix: str = "unitaries" - - def unitaries(self, qubit: int) -> str: - return f"{self.unitaries_prefix}_q{qubit}" - - def unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> inst.MemoryReference: - return inst.MemoryReference(self.unitaries(qubit), layer_index * _ANGLES_PER_UNITARY + angle_index) - - def _radians_to_cycles(region_name: str, index: int) -> Expression: return MemoryReference(region_name, index) * 2 * math.pi -def _generate_gate_cycles( - qubits_sorted: list[int], - cycles: list[_TwoQubitCycle], - names: _CycleNamingConventions, - two_qubit_gate_name: Literal["ISWAP", "CZ"], -) -> tuple[InstructionDesignator, ...]: - """Generate the Quil instructions for the gate cycles of any cycle program.""" - depth = len(cycles) - instructions: list[InstructionDesignator] = [] - all_qubits: list[Qubit | FormalArgument] = [Qubit(q) for q in qubits_sorted] - instructions.append(Fence(all_qubits)) - for layer_index in range(depth + 1): - for q in qubits_sorted: - unitaries = names.unitaries_ref(q, layer_index, 0) - instructions.append(gates.RZ(_radians_to_cycles(unitaries.name, unitaries.index), q)) - instructions.append(gates.RX(np.pi / 2, q)) - instructions.append(Fence(all_qubits)) - for q in qubits_sorted: - unitaries = names.unitaries_ref(q, layer_index, 1) - instructions.append( - gates.RZ(_radians_to_cycles(unitaries.name, unitaries.index), q), - ) - instructions.append(gates.RX(np.pi / 2, q)) - instructions.append(Fence(all_qubits)) - for q in qubits_sorted: - unitaries = names.unitaries_ref(q, layer_index, 2) - instructions.append( - gates.RZ(_radians_to_cycles(unitaries.name, unitaries.index), q), - ) - if layer_index < depth: - cycle = cycles[layer_index] - for edge in set(cycle.data.values()): - instructions.append(Gate(two_qubit_gate_name, [], [edge[0], edge[1]], [])) - instructions.append(Fence(all_qubits)) - elif layer_index == depth: - for q in qubits_sorted: - instructions.append(Measurement(q, MemoryReference("ro", q))) - return tuple(instructions) - - -def _build_cycle_program_with_randomized_compilation( - qubits_sorted: list[int], - cycles: list[_TwoQubitCycle], - two_qubit_gate_name: Literal["ISWAP", "CZ"], - pauli_pairs: list[list["_PauliPair"]], - leading_delay_seconds: float, - configuration: "_Configuration", - names: "RandomizedCompilingVariables", - _seed_length: int, -) -> prog.Program: - """Generate a cycle program with randomized compilation according to the specified configuration.""" - program = prog.Program() - program.add_instructions(list(utilities.generate_randomization_extern_signatures())) - program.add_instructions( - _generate_cycle_program_declarations(qubits_sorted, len(cycles), _CycleNamingConventions()) - ) - program.add_instructions( - _generate_declarations_for_randomized_compiling(qubits_sorted, len(cycles) + 1, _seed_length, names) - ) - program.add_instructions(configuration.declarations(qubits_sorted)) +_MAX_SEQUENCER_VALUE = (1 << _BITS_PER_VALUE) - 1 +_TAPS = (47, 46, 20, 19) - if configuration.shots_per_randomization is not None: - program.add_instructions( - configuration.shots_per_randomization.generate_mod_shot_count_block(qubits_sorted) - ) - else: - for q in qubits_sorted: - program.add_instruction(Delay([], [q], leading_delay_seconds)) - - program.add_instructions( - _generate_random_compilation_preamble_from_pauli_pairs( - pauli_pairs, - qubits_sorted, - len(cycles), - configuration.rr_names, - names, - ) - ) - if configuration.shots_per_randomization is not None: - program.add_instruction(configuration.shots_per_randomization.pulse_program_label) - if two_qubit_gate_name == "ISWAP": - # A delay here is only necessary for ISWAP. - for q in qubits_sorted: - program.add_instruction(Delay([], [q], 1e-5)) - else: - program.add_instruction(Fence(qubits_sorted)) - - program.add_instructions(_generate_gate_cycles(qubits_sorted, cycles, names.cycles, two_qubit_gate_name)) - return program - - -def _build_cycle_program( - qubits_sorted: list[int], - cycles: list[_TwoQubitCycle], - two_qubit_gate_name: Literal["ISWAP", "CZ"], - names: _CycleNamingConventions, -) -> prog.Program: - """Generate a cycle program without randomized compilation.""" - program = prog.Program() - program.add_instructions(_generate_cycle_program_declarations(qubits_sorted, len(cycles), names)) - program.add_instructions(_generate_gate_cycles(qubits_sorted, cycles, names, two_qubit_gate_name)) - return program + +def _lfsr_v1_next(seed: int) -> int: + feedback_value = 0 + for tap in _TAPS: + base = 1 << tap + bit = int((seed & base) != 0) + feedback_value ^= bit + return ((seed << 1) & _MAX_SEQUENCER_VALUE) | feedback_value _ZXZXZ_IDENTITY_ANGLES = [0.0, -0.5, -0.5] @@ -656,18 +280,11 @@ class ShotsPerRandomization: secondary_delay_seconds: float = 2e-4 variables: ShotsPerRandomizationVariables = field(default_factory=ShotsPerRandomizationVariables) - @property - def declarations(self) -> tuple[InstructionDesignator, ...]: - return ( - Declare(self.variables.modulo_counter, "INTEGER", 1), - Declare(self.variables.is_mod_zero, "BIT", 1), - ) - @property def pulse_program_label(self) -> InstructionDesignator: return JumpTarget(Label(self.variables.pulse_program_label)) - def generate_mod_shot_count_block(self, qubits_sorted: list[int]) -> tuple[InstructionDesignator, ...]: + def generate_mod_shot_count_block(self, qubits_sorted: Sequence[int]) -> tuple[InstructionDesignator, ...]: instructions: list[InstructionDesignator] = [ ClassicalAdd( MemoryReference(self.variables.modulo_counter, 0), @@ -763,7 +380,7 @@ def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: class _PauliReference(_ToQuilCallArguments): """A Pauli specified by reference to shared memory on the QPU. - We fit `_PAULIS_PER_WORD` in a single word of shared memory, so the precise + We fit `_PAULIS_PER_VALUE` in a single word of shared memory, so the precise Pauli within this word is specified by `pauli_index` (the control system will shift and mask bits to get the two bit Pauli representation). """ @@ -925,10 +542,6 @@ def twirled_unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) def pauli_seed(self, qubit: int) -> str: return f"{self.pauli_seed_prefix}_q{qubit}" - @property - def cycles(self) -> "_CycleNamingConventions": - return _CycleNamingConventions(unitaries_prefix=self.twirled_unitaries_prefix) - @dataclass(frozen=True, kw_only=True) class RandomizedCompilingConfiguration: @@ -939,34 +552,20 @@ class RandomizedCompilingConfiguration: base_cycle_repetitions: int readout_randomization: bool | None = None variables: RandomizedCompilingVariables = field(default_factory=RandomizedCompilingVariables) - + leading_delay_seconds: float = 2e-4 readout_randomization_variables: ReadoutRandomizationVariables | None = None """Whether to apply readout randomization to the final layer.""" shots_per_randomization: ShotsPerRandomization | None = None """Number of shots per randomization.""" - @property - def randomize_readout(self) -> bool: - return self.readout_randomization_variables is not None - - def declarations(self, qubits_sorted: list[int]) -> tuple[InstructionDesignator, ...]: - instructions: list[InstructionDesignator] = [] - if self.shots_per_randomization is not None: - instructions.extend(self.shots_per_randomization.declarations) - if self.readout_randomization_variables is not None: - for q in qubits_sorted: - instructions.append(Declare(self.readout_randomization_variables.readout_seed(q), "INTEGER", 1)) - instructions.append(Declare(self.readout_randomization_variables.readout_randomization(q), "REAL", 3)) - return tuple(instructions) - def __post_init__(self) -> None: self._validate() def _validate(self) -> None: - if _PAULIS_PER_WORD % self._base_cycle_count != 0: + if _PAULIS_PER_VALUE % self._base_cycle_count != 0: raise ValueError( - f"Base cycle length must be a multiple of {_PAULIS_PER_WORD}, but got {self._base_cycle_count}." + f"Base cycle length must be a multiple of {_PAULIS_PER_VALUE}, but got {self._base_cycle_count}." ) if self.base_cycle_repetitions <= 1: raise ValueError(f"Base cycle repetitions must be greater than 1, but got {self.base_cycle_repetitions}.") @@ -981,11 +580,11 @@ def _cycle_count(self) -> int: @property def _seed_length(self) -> int: - return math.ceil(self._base_cycle_count * self.base_cycle_repetitions / _PAULIS_PER_WORD) + return math.ceil(self._base_cycle_count * self.base_cycle_repetitions / _PAULIS_PER_VALUE) @property def _out_of_primary_loop_seed_change_required(self) -> bool: - return self.base_cycle_repetitions % _PAULIS_PER_WORD == 0 + return self.base_cycle_repetitions % _PAULIS_PER_VALUE == 0 @property def _seed_loop_length(self) -> int: @@ -993,20 +592,48 @@ def _seed_loop_length(self) -> int: @property def _seed_loop_inner_length(self) -> int: - return int(_PAULIS_PER_WORD / self._base_cycle_count) - 1 + return int(_PAULIS_PER_VALUE / self._base_cycle_count) - 1 @property def _base_cycle_loop_length(self) -> int: - base_cycles_per_word = int(_PAULIS_PER_WORD / self._base_cycle_count) + base_cycles_per_word = int(_PAULIS_PER_VALUE / self._base_cycle_count) primary_loop_base_cycles = self._seed_loop_length * base_cycles_per_word # we add 1 below for the final cycle. return self.base_cycle_repetitions - (primary_loop_base_cycles + 1) - def _generate_declarations(self) -> list[Declare]: - declarations: list[Declare] = [ - Declare(self.variables.unitary_angle_offset, "INTEGER", 1), - Declare(self.variables.loop_break, "BIT", 1), - ] + def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: + declarations: list[Declare] = [] + declarations.append(Declare(self.variables.pauli_conjugates_map, "INTEGER", _NUMBER_PAULI_PAIRS)) + + for q in self.qubits_sorted: + declarations.append(Declare(self.variables.pauli_seed(q), "INTEGER", self._seed_length)) + for q in self.qubits_sorted: + declarations.append( + Declare( + self.variables.twirled_unitaries(q), + "REAL", + (self._cycle_count + 1) * _ANGLES_PER_UNITARY, + ) + ) + + if self.shots_per_randomization is not None: + declarations.extend( + ( + Declare(self.shots_per_randomization.variables.modulo_counter, "INTEGER", 1), + Declare(self.shots_per_randomization.variables.is_mod_zero, "BIT", 1), + ) + ) + if self.readout_randomization_variables is not None: + for q in self.qubits_sorted: + declarations.append(Declare(self.readout_randomization_variables.readout_seed(q), "INTEGER", 1)) + declarations.append(Declare(self.readout_randomization_variables.readout_randomization(q), "REAL", 3)) + + declarations.extend( + ( + Declare(self.variables.unitary_angle_offset, "INTEGER", 1), + Declare(self.variables.loop_break, "BIT", 1), + ) + ) if self._seed_loop_length > 0: declarations.extend( [ @@ -1019,24 +646,36 @@ def _generate_declarations(self) -> list[Declare]: Declare(self.variables.base_cycle_loop_index, "INTEGER", 1), ] ) - current__seed_length = 2 if self._seed_loop_length > 0 else 1 + current_seed_length = 2 if self._seed_loop_length > 0 else 1 for q in self.qubits_sorted: - declarations.append(Declare(self.variables.current_seeds(q), "INTEGER", current__seed_length)) - return declarations + declarations.append(Declare(self.variables.current_seeds(q), "INTEGER", current_seed_length)) + return tuple(declarations) def generate_seed_values(self, rng: np.random.Generator) -> NDArray[np.int64]: - return rng.integers(-(2**47), 2**47 - 1, size=len(self.qubits_sorted), dtype=np.int64) + size = (len(self.qubits_sorted), self._seed_length) + return rng.integers(-(2**47), 2**47 - 1, size=size, dtype=np.int64) def build_memory_map( self, seed_values: NDArray[np.int64], - ) -> dict[str, list[int]]: - memory_map = {self.variables.unitary_angle_offset: [_ANGLES_PER_UNITARY], self.variables.loop_break: [0]} + two_qubit_gate_name: str, + ) -> dict[str, list[int | float]]: + memory_map: dict[str, list[int | float]] = { + self.variables.unitary_angle_offset: [_ANGLES_PER_UNITARY], + self.variables.loop_break: [0], + } if self._seed_loop_length > 0: memory_map[self.variables.seed_loop_index] = [0, 1] if self._base_cycle_loop_length > 0 or self._seed_loop_inner_length > 0: memory_map[self.variables.base_cycle_loop_index] = [0] + memory_map[self.variables.pauli_conjugates_map] = _build_pauli_conjugates_map(two_qubit_gate_name) + for qubit_index, q in enumerate(self.qubits_sorted): + memory_map[self.variables.pauli_seed(q)] = seed_values[qubit_index].tolist() + memory_map[self.variables.twirled_unitaries(q)] = np.zeros( + ((self._cycle_count + 1) * _ANGLES_PER_UNITARY,), dtype=float + ).tolist() + current_seed_length = 2 if self._seed_loop_length > 0 else 1 for q in self.qubits_sorted: memory_map[self.variables.current_seeds(q)] = [0] * current_seed_length @@ -1045,8 +684,9 @@ def build_memory_map( memory_map[self.shots_per_randomization.variables.modulo_counter] = [-1] memory_map[self.shots_per_randomization.variables.is_mod_zero] = [1] if self.readout_randomization_variables is not None: - for i, q in enumerate(self.qubits_sorted): - memory_map[self.readout_randomization_variables.readout_seed(q)] = [int(seed_values[i])] + for qubit_index, q in enumerate(self.qubits_sorted): + # FIXME: we need a separate seed value for readout + memory_map[self.readout_randomization_variables.readout_seed(q)] = [int(seed_values[qubit_index])] memory_map[self.readout_randomization_variables.readout_randomization(q)] = [0] * _ANGLES_PER_UNITARY return memory_map @@ -1102,7 +742,7 @@ def _build_quil_instructions_for_cycle(self) -> list[InstructionDesignator]: pauli_pairs.append(cycle_pauli_pairs) instructions: list[InstructionDesignator] = [] - for cycle_index, cycle_pauli_pairs in enumerate(pauli_pairs): + for cycle_pauli_pairs in pauli_pairs: instructions.extend( pauli_pair.build_quil_call_instruction( inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), @@ -1216,7 +856,7 @@ def _build_quil_instructions_for_seed_transition(self) -> list[InstructionDesign return instructions - def _build_quil_instructions_for_final_base_cycle(self) -> list[Call]: + def _build_quil_instructions_for_final_base_cycle(self) -> list[InstructionDesignator]: pauli_pairs = [] for cycle_index, cycle in enumerate(self._generate_two_qubit_base_cycles()): cycle_pauli_pairs = [] @@ -1276,13 +916,51 @@ def _build_quil_instructions_for_final_base_cycle(self) -> list[Call]: ) pauli_pairs.append(cycle_pauli_pairs) - instructions: list[Call] = [] + instructions: list[InstructionDesignator] = [] for cycle_index, cycle_pauli_pairs in enumerate(pauli_pairs): global_cycle_index = (self._cycle_count + 1) - self._base_cycle_count + cycle_index + + source = self.variables.source_unitaries(q) + if cycle_index == len(pauli_pairs) - 1 and self.readout_randomization_variables is not None: + for i in range(_ANGLES_PER_UNITARY): + instructions.append( + ClassicalMove( + MemoryReference(self.readout_randomization_variables.readout_randomization(q), i), + MemoryReference( + self.variables.source_unitaries(q), global_cycle_index * _ANGLES_PER_UNITARY + i + ), + ) + ) + Call( + "choose_random_real_sub_regions", + [ + inst.CallArgument.from_identifier( + self.readout_randomization_variables.readout_randomization(q) + ), + inst.CallArgument.from_identifier( + self.readout_randomization_variables.readout_randomization(q) + ), + inst.CallArgument.from_immediate(complex(_ANGLES_PER_UNITARY, 0)), + inst.CallArgument.from_memory_reference( + inst.MemoryReference(self.readout_randomization_variables.readout_seed(q), 0) + ), + ], + ) + for i in range(_ANGLES_PER_UNITARY): + instructions.append( + ClassicalMove( + MemoryReference( + self.variables.twirled_unitaries(q), global_cycle_index * _ANGLES_PER_UNITARY + i + ), + MemoryReference(self.readout_randomization_variables.readout_randomization(q), i), + ) + ) + source = self.variables.twirled_unitaries(q) + instructions.extend( pauli_pair.build_quil_call_instruction( inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), - inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), + inst.CallArgument.from_identifier(source), inst.CallArgument.from_immediate(complex(global_cycle_index * _ANGLES_PER_UNITARY, 0)), ) for q, pauli_pair in cycle_pauli_pairs @@ -1290,8 +968,8 @@ def _build_quil_instructions_for_final_base_cycle(self) -> list[Call]: return instructions - def build_quil_instructions(self) -> list[InstructionDesignator]: - instructions: list[InstructionDesignator] = [] + def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[InstructionDesignator]: + instructions: list[InstructionDesignator] = list(self._generate_declarations()) for q in self.qubits_sorted: for i in range(self._seed_length): instructions.append( @@ -1454,8 +1132,84 @@ def build_quil_instructions(self) -> list[InstructionDesignator]: ) for q in self.qubits_sorted: - instructions.append(Delay([], [q], 2e-4)) + instructions.append(Delay([], [q], self.leading_delay_seconds)) instructions.extend(self._build_quil_instructions_for_final_base_cycle()) return instructions + + def build_quil_program( + self, + two_qubit_gate_name: Literal["ISWAP", "CZ"], + ) -> Program: + """Generate a cycle program with randomized compilation according to the specified configuration.""" + program = Program() + program += self._generate_declarations() + + if self.shots_per_randomization is not None: + program += self.shots_per_randomization.generate_mod_shot_count_block(self.qubits_sorted) + else: + for q in self.qubits_sorted: + program += Delay([], [q], self.leading_delay_seconds) + + program += self._build_quil_instructions_for_randomized_compiling_loop() + + if self.shots_per_randomization is not None: + program += self.shots_per_randomization.pulse_program_label + if two_qubit_gate_name == "ISWAP": + # A delay here is only necessary for ISWAP. + for q in self.qubits_sorted: + program += Delay([], [q], 1e-5) # FIXME: hardcoded delay + else: + program += Fence([Qubit(q) for q in self.qubits_sorted]) + + return program + + def verify_final_memory( + self, + final_memory: dict[str, list[int] | list[float]], + seeds: NDArray[np.int64], + shot_count: int, + two_qubit_gate_name: str, + ): + """Verify that the final memory state matches expectations. + + Specifically, we take the Pauli seeds specified in the original memory map and + generate the expected final random value using `generate_lfsr_v1_sequence` and + the shot count. We then use this final seed to infer the pair of Paulis merged + for each qubit at every layer. We can then apply this Pauli pair to the original + unitaries specified for the (qubit, layer) and verify that the resulting unitary + is equal to the twirled unitaries read from the final memory for the (qubit, layer). + """ + cycles = self._generate_two_qubit_base_cycles() + final_pauli_cache = _FinalPauliSeedAndPairCache( + shot_count=shot_count, + shots_per_randomization=self.shots_per_randomization.shots_per_randomization + if self.shots_per_randomization is not None + else None, + original_seeds={q: seeds[q].tolist() for q in self.qubits_sorted}, + two_qubit_gate_name=two_qubit_gate_name, + cycles=cycles, + ) + for q in self.qubits_sorted: + for layer_index in range(len(cycles) + 1): + seed_index = layer_index // _PAULIS_PER_VALUE + expected_final_seed_value, final_pauli_pair = final_pauli_cache[q, layer_index] + if layer_index < len(cycles): + found_final_pauli_seed = final_memory[self.variables.pauli_seed(q)][seed_index] + if found_final_pauli_seed != expected_final_seed_value: + raise ValueError( + f"final seed value mismatch for q{q}, l{layer_index}: got " + f"{found_final_pauli_seed}, expected {expected_final_seed_value}" + ) + start_angle = layer_index * _ANGLES_PER_UNITARY + end_angle = start_angle + _ANGLES_PER_UNITARY + twirled_unitary_angles = tuple(final_memory[self.variables.twirled_unitaries(q)][start_angle:end_angle]) + twirled_unitary = _compute_unitary_from_zxzxz_angles(twirled_unitary_angles) + unitary_angles = tuple(final_memory[self.variables.source_unitaries(q)][start_angle:end_angle]) + expected_unitary = _compute_expected_merged_unitary(unitary_angles, final_pauli_pair) + if not _unitary_equal(twirled_unitary, expected_unitary): + raise ValueError( + f"unitary mismatch for q{q} layer {layer_index}: got {twirled_unitary_angles}, " + f"expected {unitary_angles}, pauli pair: {final_pauli_pair}" + ) From b47404e087b590a05f631fda68b7d7820eeed662 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Mon, 8 Jun 2026 11:11:19 -0700 Subject: [PATCH 07/59] fix: verify final memory with readout randomization --- pyquil/qpu/_randomized_compiling.py | 109 ++++++++++++++++++++-------- 1 file changed, 79 insertions(+), 30 deletions(-) diff --git a/pyquil/qpu/_randomized_compiling.py b/pyquil/qpu/_randomized_compiling.py index 791784808..fce6caa9c 100644 --- a/pyquil/qpu/_randomized_compiling.py +++ b/pyquil/qpu/_randomized_compiling.py @@ -10,6 +10,8 @@ * `test_randomized_compilation_looped_cases`: Test randomized compilation on a repeat base cycle within a loop. """ +from typing import Mapping +from qcs_sdk.qpu.experimental.random import PrngSeedValue from functools import cached_property import math from abc import ABC, abstractmethod @@ -21,6 +23,7 @@ import numpy as np from numpy.typing import NDArray from quil import instructions as inst +from qcs_sdk.qpu.experimental.random import choose_random_real_sub_region_indices from pyquil import gates from pyquil.quil import InstructionDesignator, Program @@ -92,6 +95,12 @@ def _generate_lfsr_v1_sequence(seed_value: int, start_index: int, count: int) -> return sequence +@dataclass(frozen=True, kw_only=True) +class _PauliPairCacheKey: + qubit: int + layer_index: int + shot_index: int + @dataclass(frozen=True, kw_only=True) class _FinalPauliSeedAndPairCache: """Cache for final Pauli seeds and pairs per qubit and layer. @@ -102,14 +111,14 @@ class _FinalPauliSeedAndPairCache: shot_count: int shots_per_randomization: int | None = None - original_seeds: dict[int, list[int]] + random_seeds: "RandomSeeds" two_qubit_gate_name: str cycles: tuple[_TwoQubitCycle, ...] + qubits_sorted: tuple[int, ...] - pauli_pairs: dict[tuple[int, int], tuple["_PauliLiteral", "_PauliLiteral"]] = field( + pauli_pairs: dict[_PauliPairCacheKey, tuple["_PauliLiteral", "_PauliLiteral"]] = field( default_factory=dict, init=False ) - """Keys are (qubit, layer_index).""" @cached_property def _final_seeds(self) -> dict[int, tuple[int, ...]]: @@ -117,7 +126,8 @@ def _final_seeds(self) -> dict[int, tuple[int, ...]]: if self.shots_per_randomization is not None: sequence_index = (self.shot_count - 1) // self.shots_per_randomization - 1 final_seeds = {} - for qubit, seeds in self.original_seeds.items(): + for qubit_index, qubit in enumerate(self.qubits_sorted): + seeds = self.random_seeds.randomized_compiling[qubit_index].tolist() final_seeds[qubit] = tuple( _generate_lfsr_v1_sequence(seed, start_index=sequence_index, count=1)[0] for seed in seeds ) @@ -127,8 +137,8 @@ def _get_random_pauli_for_seed_value(self, seed_value: int, layer_index: int) -> pauli_index = layer_index % _PAULIS_PER_VALUE return _PauliLiteral(seed_value >> (2 * pauli_index) & 0b11) - def _get_previous_random_pauli(self, key: tuple[int, int]) -> "_PauliLiteral": - q, layer_index = key + def _get_previous_random_pauli(self, key: _PauliPairCacheKey) -> "_PauliLiteral": + q, layer_index = key.qubit, key.layer_index commutations = _PAULI_COMMUTATIONS[self.two_qubit_gate_name] previous_layer_index = layer_index - 1 previous_cycle = self.cycles[previous_layer_index] if previous_layer_index >= 0 else None @@ -136,20 +146,23 @@ def _get_previous_random_pauli(self, key: tuple[int, int]) -> "_PauliLiteral": previous_conjugate = _PauliLiteral.I elif q in previous_cycle.data: previous_edge = previous_cycle.data[q] - _, previous_pauli_pair_left = self[(previous_edge[0], previous_layer_index)] - _, previous_pauli_pair_right = self[(previous_edge[1], previous_layer_index)] + previous_left_key = _PauliPairCacheKey(qubit=previous_edge[0], layer_index=previous_layer_index, shot_index=key.shot_index) + previous_right_key = _PauliPairCacheKey(qubit=previous_edge[1], layer_index=previous_layer_index, shot_index=key.shot_index) + _, previous_pauli_pair_left = self[previous_left_key] + _, previous_pauli_pair_right = self[previous_right_key] previous_pauli_pair_name = "".join([previous_pauli_pair_left[1].name, previous_pauli_pair_right[1].name]) conjugate = commutations[previous_pauli_pair_name] is_pauli_left = q == previous_edge[0] previous_conjugate = _PauliLiteral.from_name(conjugate[0] if is_pauli_left else conjugate[1]) else: - _, previous_pauli_pair = self[(q, previous_layer_index)] + previous_key = _PauliPairCacheKey(qubit=q, layer_index=previous_layer_index, shot_index=key.shot_index) + _, previous_pauli_pair = self[previous_key] previous_conjugate = previous_pauli_pair[1] return previous_conjugate - def __getitem__(self, key: tuple[int, int]) -> tuple[int | None, tuple["_PauliLiteral", "_PauliLiteral"]]: - q, layer_index = key + def __getitem__(self, key: _PauliPairCacheKey) -> tuple[int | None, tuple["_PauliLiteral", "_PauliLiteral"]]: + q, layer_index = key.qubit, key.layer_index if layer_index == len(self.cycles): # there is no random Pauli to apply! if key not in self.pauli_pairs: @@ -543,6 +556,11 @@ def pauli_seed(self, qubit: int) -> str: return f"{self.pauli_seed_prefix}_q{qubit}" +@dataclass(frozen=True, kw_only=True) +class RandomSeeds: + randomized_compiling: NDArray[np.int64] + readout: NDArray[np.int64] | None = None + @dataclass(frozen=True, kw_only=True) class RandomizedCompilingConfiguration: """A test utility for build a randomly compiled program using a loop structure over repeated base cycles.""" @@ -651,13 +669,17 @@ def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: declarations.append(Declare(self.variables.current_seeds(q), "INTEGER", current_seed_length)) return tuple(declarations) - def generate_seed_values(self, rng: np.random.Generator) -> NDArray[np.int64]: + def generate_seed_values(self, rng: np.random.Generator) -> RandomSeeds: size = (len(self.qubits_sorted), self._seed_length) - return rng.integers(-(2**47), 2**47 - 1, size=size, dtype=np.int64) + randomized_compiling_seeds = rng.integers(-(2**47), 2**47 - 1, size=size, dtype=np.int64) + readout_seeds = None + if self.readout_randomization_variables is not None: + readout_seeds = rng.integers(-(2**47), 2**47 - 1, size=(len(self.qubits_sorted), 1), dtype=np.int64) + return RandomSeeds(randomized_compiling=randomized_compiling_seeds, readout=readout_seeds) def build_memory_map( self, - seed_values: NDArray[np.int64], + random_seeds: RandomSeeds, two_qubit_gate_name: str, ) -> dict[str, list[int | float]]: memory_map: dict[str, list[int | float]] = { @@ -671,7 +693,7 @@ def build_memory_map( memory_map[self.variables.pauli_conjugates_map] = _build_pauli_conjugates_map(two_qubit_gate_name) for qubit_index, q in enumerate(self.qubits_sorted): - memory_map[self.variables.pauli_seed(q)] = seed_values[qubit_index].tolist() + memory_map[self.variables.pauli_seed(q)] = random_seeds.randomized_compiling[qubit_index].tolist() memory_map[self.variables.twirled_unitaries(q)] = np.zeros( ((self._cycle_count + 1) * _ANGLES_PER_UNITARY,), dtype=float ).tolist() @@ -683,10 +705,12 @@ def build_memory_map( if self.shots_per_randomization is not None: memory_map[self.shots_per_randomization.variables.modulo_counter] = [-1] memory_map[self.shots_per_randomization.variables.is_mod_zero] = [1] + if self.readout_randomization_variables is not None: + if random_seeds.readout is None: + raise ValueError("readout seeds must be provided if readout randomization variables are specified") for qubit_index, q in enumerate(self.qubits_sorted): - # FIXME: we need a separate seed value for readout - memory_map[self.readout_randomization_variables.readout_seed(q)] = [int(seed_values[qubit_index])] + memory_map[self.readout_randomization_variables.readout_seed(q)] = [int(random_seeds.readout[qubit_index])] memory_map[self.readout_randomization_variables.readout_randomization(q)] = [0] * _ANGLES_PER_UNITARY return memory_map @@ -1159,7 +1183,7 @@ def build_quil_program( if two_qubit_gate_name == "ISWAP": # A delay here is only necessary for ISWAP. for q in self.qubits_sorted: - program += Delay([], [q], 1e-5) # FIXME: hardcoded delay + program += Delay([], [q], self.shots_per_randomization.secondary_delay_seconds) else: program += Fence([Qubit(q) for q in self.qubits_sorted]) @@ -1168,9 +1192,10 @@ def build_quil_program( def verify_final_memory( self, final_memory: dict[str, list[int] | list[float]], - seeds: NDArray[np.int64], + random_seeds: RandomSeeds, shot_count: int, two_qubit_gate_name: str, + readout_source_angles: Mapping[int, NDArray[np.float64]] | None = None, ): """Verify that the final memory state matches expectations. @@ -1187,26 +1212,50 @@ def verify_final_memory( shots_per_randomization=self.shots_per_randomization.shots_per_randomization if self.shots_per_randomization is not None else None, - original_seeds={q: seeds[q].tolist() for q in self.qubits_sorted}, + random_seeds=random_seeds, two_qubit_gate_name=two_qubit_gate_name, cycles=cycles, + qubits_sorted=self.qubits_sorted, ) - for q in self.qubits_sorted: + for q_index, q in enumerate(self.qubits_sorted): for layer_index in range(len(cycles) + 1): seed_index = layer_index // _PAULIS_PER_VALUE - expected_final_seed_value, final_pauli_pair = final_pauli_cache[q, layer_index] - if layer_index < len(cycles): - found_final_pauli_seed = final_memory[self.variables.pauli_seed(q)][seed_index] - if found_final_pauli_seed != expected_final_seed_value: - raise ValueError( - f"final seed value mismatch for q{q}, l{layer_index}: got " - f"{found_final_pauli_seed}, expected {expected_final_seed_value}" - ) + key = _PauliPairCacheKey( + qubit=q, + layer_index=layer_index, + shot_index=shot_count - 1 + ) + expected_final_seed_value, final_pauli_pair = final_pauli_cache[key] + found_final_pauli_seed = final_memory[self.variables.pauli_seed(q)][seed_index] + if found_final_pauli_seed != expected_final_seed_value: + raise ValueError( + f"final seed value mismatch for q{q}, l{layer_index}: got " + f"{found_final_pauli_seed}, expected {expected_final_seed_value}" + ) start_angle = layer_index * _ANGLES_PER_UNITARY end_angle = start_angle + _ANGLES_PER_UNITARY twirled_unitary_angles = tuple(final_memory[self.variables.twirled_unitaries(q)][start_angle:end_angle]) twirled_unitary = _compute_unitary_from_zxzxz_angles(twirled_unitary_angles) - unitary_angles = tuple(final_memory[self.variables.source_unitaries(q)][start_angle:end_angle]) + + if self.readout_randomization is not None and layer_index == len(cycles): + if random_seeds.readout is None or readout_source_angles is None: + raise ValueError("readout seeds must be provided if readout randomization is enabled") + unitaries = readout_source_angles[q] + sub_region_count, angles_per_unitary = unitaries.shape + if angles_per_unitary != _ANGLES_PER_UNITARY: + raise ValueError( + f"expected {_ANGLES_PER_UNITARY} angles per unitary, but got {angles_per_unitary}" + ) + seed_value = random_seeds.readout[q_index].item() + final_index = choose_random_real_sub_region_indices( + PrngSeedValue(seed_value), + shot_count - 1, + 1, + sub_region_count + )[0] + unitary_angles = tuple(unitaries[final_index].tolist()) + else: + unitary_angles = tuple(final_memory[self.variables.source_unitaries(q)][start_angle:end_angle]) expected_unitary = _compute_expected_merged_unitary(unitary_angles, final_pauli_pair) if not _unitary_equal(twirled_unitary, expected_unitary): raise ValueError( From 2aaf753765a0aa0c4f6cbdee3b8689d6ba8466d0 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 9 Jun 2026 11:41:37 -0700 Subject: [PATCH 08/59] refactor: verifying final memory --- pyquil/qpu/_randomized_compiling.py | 253 +++++++++++++++++----------- 1 file changed, 158 insertions(+), 95 deletions(-) diff --git a/pyquil/qpu/_randomized_compiling.py b/pyquil/qpu/_randomized_compiling.py index fce6caa9c..fb9d35c2d 100644 --- a/pyquil/qpu/_randomized_compiling.py +++ b/pyquil/qpu/_randomized_compiling.py @@ -10,24 +10,21 @@ * `test_randomized_compilation_looped_cases`: Test randomized compilation on a repeat base cycle within a loop. """ -from typing import Mapping -from qcs_sdk.qpu.experimental.random import PrngSeedValue -from functools import cached_property import math from abc import ABC, abstractmethod -from collections.abc import Sequence +from collections.abc import Mapping, Sequence from dataclasses import dataclass, field from enum import Enum -from typing import Literal, cast +from functools import cached_property +from typing import Literal, Self, cast import numpy as np from numpy.typing import NDArray +from qcs_sdk.qpu.experimental.random import PrngSeedValue, choose_random_real_sub_region_indices from quil import instructions as inst -from qcs_sdk.qpu.experimental.random import choose_random_real_sub_region_indices -from pyquil import gates from pyquil.quil import InstructionDesignator, Program -from pyquil.quilatom import FormalArgument, Qubit +from pyquil.quilatom import Qubit from pyquil.quilbase import ( Call, ClassicalAdd, @@ -99,7 +96,7 @@ def _generate_lfsr_v1_sequence(seed_value: int, start_index: int, count: int) -> class _PauliPairCacheKey: qubit: int layer_index: int - shot_index: int + @dataclass(frozen=True, kw_only=True) class _FinalPauliSeedAndPairCache: @@ -109,9 +106,8 @@ class _FinalPauliSeedAndPairCache: layer's Pauli pair in order to determine the conjugate. """ - shot_count: int - shots_per_randomization: int | None = None - random_seeds: "RandomSeeds" + prng_sequence_step_length: int + original_seeds: Mapping[int, Sequence[int]] two_qubit_gate_name: str cycles: tuple[_TwoQubitCycle, ...] qubits_sorted: tuple[int, ...] @@ -120,16 +116,43 @@ class _FinalPauliSeedAndPairCache: default_factory=dict, init=False ) + def accumulate( + self, sequences: int + ) -> "dict[_PauliPairCacheKey, tuple[int | None, tuple[_PauliLiteral, _PauliLiteral]]]": + current = self + pauli_pairs = {} + for sequence_index in range(sequences): + for qubit in self.qubits_sorted: + for layer_index in range(len(self.cycles) + 1): + key = _PauliPairCacheKey(qubit=qubit, layer_index=layer_index) + current_seed, pauli_pair = current[key] + if key in pauli_pairs: + _, previous_pauli_pair = pauli_pairs[key] + _, previous_pauli = pauli_pair[0] * previous_pauli_pair[0] + _, next_pauli = previous_pauli_pair[1] * pauli_pair[1] + pauli_pair = (previous_pauli, next_pauli) + pauli_pairs[key] = (current_seed, pauli_pair) + if sequence_index < sequences - 1: + current = next(current) + return pauli_pairs + + def __next__(self) -> Self: + return _FinalPauliSeedAndPairCache( + prng_sequence_step_length=self.prng_sequence_step_length, + original_seeds=self._final_seeds, + two_qubit_gate_name=self.two_qubit_gate_name, + cycles=self.cycles, + qubits_sorted=self.qubits_sorted, + ) + @cached_property def _final_seeds(self) -> dict[int, tuple[int, ...]]: - sequence_index = self.shot_count - 1 - if self.shots_per_randomization is not None: - sequence_index = (self.shot_count - 1) // self.shots_per_randomization - 1 final_seeds = {} - for qubit_index, qubit in enumerate(self.qubits_sorted): - seeds = self.random_seeds.randomized_compiling[qubit_index].tolist() + for qubit in self.qubits_sorted: + seeds = self.original_seeds[qubit] final_seeds[qubit] = tuple( - _generate_lfsr_v1_sequence(seed, start_index=sequence_index, count=1)[0] for seed in seeds + _generate_lfsr_v1_sequence(seed, start_index=self.prng_sequence_step_length, count=1)[0] + for seed in seeds ) return final_seeds @@ -146,8 +169,8 @@ def _get_previous_random_pauli(self, key: _PauliPairCacheKey) -> "_PauliLiteral" previous_conjugate = _PauliLiteral.I elif q in previous_cycle.data: previous_edge = previous_cycle.data[q] - previous_left_key = _PauliPairCacheKey(qubit=previous_edge[0], layer_index=previous_layer_index, shot_index=key.shot_index) - previous_right_key = _PauliPairCacheKey(qubit=previous_edge[1], layer_index=previous_layer_index, shot_index=key.shot_index) + previous_left_key = _PauliPairCacheKey(qubit=previous_edge[0], layer_index=previous_layer_index) + previous_right_key = _PauliPairCacheKey(qubit=previous_edge[1], layer_index=previous_layer_index) _, previous_pauli_pair_left = self[previous_left_key] _, previous_pauli_pair_right = self[previous_right_key] previous_pauli_pair_name = "".join([previous_pauli_pair_left[1].name, previous_pauli_pair_right[1].name]) @@ -155,7 +178,7 @@ def _get_previous_random_pauli(self, key: _PauliPairCacheKey) -> "_PauliLiteral" is_pauli_left = q == previous_edge[0] previous_conjugate = _PauliLiteral.from_name(conjugate[0] if is_pauli_left else conjugate[1]) else: - previous_key = _PauliPairCacheKey(qubit=q, layer_index=previous_layer_index, shot_index=key.shot_index) + previous_key = _PauliPairCacheKey(qubit=q, layer_index=previous_layer_index) _, previous_pauli_pair = self[previous_key] previous_conjugate = previous_pauli_pair[1] @@ -336,13 +359,18 @@ def generate_mod_shot_count_block(self, qubits_sorted: Sequence[int]) -> tuple[I @dataclass(frozen=True, kw_only=True) class ReadoutRandomizationVariables: readout_seed_prefix: str = "readout_seed" + source_unitaries_prefix: str = "readout_source_unitaries" + readout_randomization_prefix: str = "readout_randomization" - def readout_randomization(self, qubit: int) -> str: - return f"readout_randomization_q{qubit}" + def source_unitaries(self, qubit: int) -> str: + return f"{self.source_unitaries_prefix}_q{qubit}" def readout_seed(self, qubit: int) -> str: return f"{self.readout_seed_prefix}_q{qubit}" + def readout_randomization(self, qubit: int) -> str: + return f"{self.readout_randomization_prefix}_q{qubit}" + class _ToQuilCallArguments(ABC): @abstractmethod @@ -388,6 +416,33 @@ def from_name(cls, name: str) -> "_PauliLiteral": def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: return (inst.CallArgument.from_immediate(complex(self.value, 0)),) + def __rmul__(self, other: "_PauliLiteral") -> "tuple[complex, _PauliLiteral]": + match (self, other): + case (_PauliLiteral.I, _): + return 1, other + case (_, _PauliLiteral.I): + return 1, self + case (_PauliLiteral.X, _PauliLiteral.X): + return 1, _PauliLiteral.I + case (_PauliLiteral.Y, _PauliLiteral.Y): + return 1, _PauliLiteral.I + case (_PauliLiteral.Z, _PauliLiteral.Z): + return 1, _PauliLiteral.I + case (_PauliLiteral.X, _PauliLiteral.Y): + return 1j, _PauliLiteral.Z + case (_PauliLiteral.Y, _PauliLiteral.Z): + return 1j, _PauliLiteral.X + case (_PauliLiteral.Z, _PauliLiteral.X): + return 1j, _PauliLiteral.Y + case (_PauliLiteral.Y, _PauliLiteral.X): + return -1j, _PauliLiteral.Z + case (_PauliLiteral.Z, _PauliLiteral.Y): + return -1j, _PauliLiteral.X + case (_PauliLiteral.X, _PauliLiteral.Z): + return -1j, _PauliLiteral.Y + case _: + raise ValueError(f"invalid pauli multiplication: {self} * {other}") + @dataclass(frozen=True, kw_only=True) class _PauliReference(_ToQuilCallArguments): @@ -561,6 +616,7 @@ class RandomSeeds: randomized_compiling: NDArray[np.int64] readout: NDArray[np.int64] | None = None + @dataclass(frozen=True, kw_only=True) class RandomizedCompilingConfiguration: """A test utility for build a randomly compiled program using a loop structure over repeated base cycles.""" @@ -568,9 +624,9 @@ class RandomizedCompilingConfiguration: base_cycles: tuple[tuple[_TEdge, ...], ...] qubits_sorted: tuple[int, ...] base_cycle_repetitions: int - readout_randomization: bool | None = None variables: RandomizedCompilingVariables = field(default_factory=RandomizedCompilingVariables) leading_delay_seconds: float = 2e-4 + # FIXME: Define readout randomimzation configuration; include the readout groups readout_randomization_variables: ReadoutRandomizationVariables | None = None """Whether to apply readout randomization to the final layer.""" @@ -644,6 +700,9 @@ def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: if self.readout_randomization_variables is not None: for q in self.qubits_sorted: declarations.append(Declare(self.readout_randomization_variables.readout_seed(q), "INTEGER", 1)) + declarations.append( + Declare(self.readout_randomization_variables.source_unitaries(q), "REAL", 3) + ) # FIXME: we need to read length off of configuration declarations.append(Declare(self.readout_randomization_variables.readout_randomization(q), "REAL", 3)) declarations.extend( @@ -710,8 +769,12 @@ def build_memory_map( if random_seeds.readout is None: raise ValueError("readout seeds must be provided if readout randomization variables are specified") for qubit_index, q in enumerate(self.qubits_sorted): - memory_map[self.readout_randomization_variables.readout_seed(q)] = [int(random_seeds.readout[qubit_index])] + memory_map[self.readout_randomization_variables.readout_seed(q)] = [ + int(random_seeds.readout[qubit_index]) + ] memory_map[self.readout_randomization_variables.readout_randomization(q)] = [0] * _ANGLES_PER_UNITARY + # FIXME: source unitary values + memory_map[self.readout_randomization_variables.source_unitaries(q)] = [0] * _ANGLES_PER_UNITARY return memory_map def _generate_two_qubit_base_cycles(self) -> tuple[_TwoQubitCycle, ...]: @@ -946,29 +1009,20 @@ def _build_quil_instructions_for_final_base_cycle(self) -> list[InstructionDesig source = self.variables.source_unitaries(q) if cycle_index == len(pauli_pairs) - 1 and self.readout_randomization_variables is not None: - for i in range(_ANGLES_PER_UNITARY): - instructions.append( - ClassicalMove( - MemoryReference(self.readout_randomization_variables.readout_randomization(q), i), - MemoryReference( - self.variables.source_unitaries(q), global_cycle_index * _ANGLES_PER_UNITARY + i + instructions.append( + Call( + "choose_random_real_sub_regions", + [ + inst.CallArgument.from_identifier( + self.readout_randomization_variables.readout_randomization(q) ), - ) + inst.CallArgument.from_identifier(self.readout_randomization_variables.source_unitaries(q)), + inst.CallArgument.from_immediate(complex(_ANGLES_PER_UNITARY, 0)), + inst.CallArgument.from_memory_reference( + inst.MemoryReference(self.readout_randomization_variables.readout_seed(q), 0) + ), + ], ) - Call( - "choose_random_real_sub_regions", - [ - inst.CallArgument.from_identifier( - self.readout_randomization_variables.readout_randomization(q) - ), - inst.CallArgument.from_identifier( - self.readout_randomization_variables.readout_randomization(q) - ), - inst.CallArgument.from_immediate(complex(_ANGLES_PER_UNITARY, 0)), - inst.CallArgument.from_memory_reference( - inst.MemoryReference(self.readout_randomization_variables.readout_seed(q), 0) - ), - ], ) for i in range(_ANGLES_PER_UNITARY): instructions.append( @@ -1023,27 +1077,23 @@ def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[Instruc inst.CallArgument.from_immediate(complex(0, 0)), ) ) - for q in self.qubits_sorted: - instructions.append( - ClassicalMove( - MemoryReference(self.variables.unitary_angle_offset, 0), - _ANGLES_PER_UNITARY, - ) + instructions.append( + ClassicalMove( + MemoryReference(self.variables.unitary_angle_offset, 0), + _ANGLES_PER_UNITARY, ) + ) if self._seed_loop_length >= 1: instructions.extend( - cast( - list[InstructionDesignator], - [ - ClassicalMove(MemoryReference(self.variables.seed_loop_index, 0), 0), - ClassicalMove( - MemoryReference(self.variables.seed_loop_index, 1), - 1, - ), - JumpTarget(Label(self.variables.seed_loop_label)), - ], - ) + [ + ClassicalMove(MemoryReference(self.variables.seed_loop_index, 0), 0), + ClassicalMove( + MemoryReference(self.variables.seed_loop_index, 1), + 1, + ), + JumpTarget(Label(self.variables.seed_loop_label)), + ], ) if self._seed_loop_inner_length >= 1: instructions.append( @@ -1192,10 +1242,9 @@ def build_quil_program( def verify_final_memory( self, final_memory: dict[str, list[int] | list[float]], - random_seeds: RandomSeeds, + original_memory: dict[str, list[int] | list[float]], shot_count: int, two_qubit_gate_name: str, - readout_source_angles: Mapping[int, NDArray[np.float64]] | None = None, ): """Verify that the final memory state matches expectations. @@ -1207,25 +1256,36 @@ def verify_final_memory( is equal to the twirled unitaries read from the final memory for the (qubit, layer). """ cycles = self._generate_two_qubit_base_cycles() - final_pauli_cache = _FinalPauliSeedAndPairCache( - shot_count=shot_count, - shots_per_randomization=self.shots_per_randomization.shots_per_randomization - if self.shots_per_randomization is not None - else None, - random_seeds=random_seeds, + if self.shots_per_randomization is not None: + prng_sequence_length = shot_count // self.shots_per_randomization.shots_per_randomization + else: + prng_sequence_length = shot_count + + if self.variables.unitaries_prefix == self.variables.twirled_unitaries_prefix: + prng_sequence_step_length = 1 + prng_sequence_step_count = prng_sequence_length + else: + prng_sequence_step_length = prng_sequence_length + prng_sequence_step_count = 1 + pauli_cache = _FinalPauliSeedAndPairCache( + original_seeds={ + q: cast(list[int], original_memory[self.variables.pauli_seed(q)]) for q in self.qubits_sorted + }, two_qubit_gate_name=two_qubit_gate_name, cycles=cycles, qubits_sorted=self.qubits_sorted, + prng_sequence_step_length=prng_sequence_step_length, ) - for q_index, q in enumerate(self.qubits_sorted): + pauli_pairs = pauli_cache.accumulate(prng_sequence_step_count) + + for q in self.qubits_sorted: for layer_index in range(len(cycles) + 1): seed_index = layer_index // _PAULIS_PER_VALUE key = _PauliPairCacheKey( qubit=q, layer_index=layer_index, - shot_index=shot_count - 1 ) - expected_final_seed_value, final_pauli_pair = final_pauli_cache[key] + expected_final_seed_value, final_pauli_pair = pauli_pairs[key] found_final_pauli_seed = final_memory[self.variables.pauli_seed(q)][seed_index] if found_final_pauli_seed != expected_final_seed_value: raise ValueError( @@ -1234,31 +1294,34 @@ def verify_final_memory( ) start_angle = layer_index * _ANGLES_PER_UNITARY end_angle = start_angle + _ANGLES_PER_UNITARY - twirled_unitary_angles = tuple(final_memory[self.variables.twirled_unitaries(q)][start_angle:end_angle]) - twirled_unitary = _compute_unitary_from_zxzxz_angles(twirled_unitary_angles) - - if self.readout_randomization is not None and layer_index == len(cycles): - if random_seeds.readout is None or readout_source_angles is None: - raise ValueError("readout seeds must be provided if readout randomization is enabled") - unitaries = readout_source_angles[q] - sub_region_count, angles_per_unitary = unitaries.shape - if angles_per_unitary != _ANGLES_PER_UNITARY: + found_final_unitary_angles = tuple( + final_memory[self.variables.twirled_unitaries(q)][start_angle:end_angle] + ) + found_final_unitary = _compute_unitary_from_zxzxz_angles(found_final_unitary_angles) + + if self.readout_randomization_variables is not None and layer_index == len(cycles): + source_unitary_angles = tuple( + int(angle) + for angle in original_memory[self.readout_randomization_variables.source_unitaries(q)] + ) + if len(source_unitary_angles) % _ANGLES_PER_UNITARY != 0: raise ValueError( - f"expected {_ANGLES_PER_UNITARY} angles per unitary, but got {angles_per_unitary}" + f"source unitary angle count must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(source_unitary_angles)}" ) - seed_value = random_seeds.readout[q_index].item() + sub_region_count = len(source_unitary_angles) // _ANGLES_PER_UNITARY + seed_value = int(original_memory[self.readout_randomization_variables.readout_seed(q)][0]) final_index = choose_random_real_sub_region_indices( - PrngSeedValue(seed_value), - shot_count - 1, - 1, - sub_region_count + PrngSeedValue(seed_value), shot_count - 1, 1, sub_region_count )[0] - unitary_angles = tuple(unitaries[final_index].tolist()) + start_index = final_index * _ANGLES_PER_UNITARY + source_unitary_angles = source_unitary_angles[start_index : start_index + _ANGLES_PER_UNITARY] else: - unitary_angles = tuple(final_memory[self.variables.source_unitaries(q)][start_angle:end_angle]) - expected_unitary = _compute_expected_merged_unitary(unitary_angles, final_pauli_pair) - if not _unitary_equal(twirled_unitary, expected_unitary): + source_unitary_angles = tuple( + original_memory[self.variables.source_unitaries(q)][start_angle:end_angle] + ) + expected_unitary = _compute_expected_merged_unitary(source_unitary_angles, final_pauli_pair) + if not _unitary_equal(found_final_unitary, expected_unitary): raise ValueError( - f"unitary mismatch for q{q} layer {layer_index}: got {twirled_unitary_angles}, " - f"expected {unitary_angles}, pauli pair: {final_pauli_pair}" + f"unitary mismatch for q{q} layer {layer_index}: got {found_final_unitary_angles}, " + f"expected {source_unitary_angles}, pauli pair: {final_pauli_pair}" ) From de4f0f41d0fe2c744c6fef01c59251a66be9d2ad Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 9 Jun 2026 11:51:22 -0700 Subject: [PATCH 09/59] refactor: configure readout randomization unitary angles --- pyquil/qpu/_randomized_compiling.py | 60 +++++++++++++++++++---------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/pyquil/qpu/_randomized_compiling.py b/pyquil/qpu/_randomized_compiling.py index fb9d35c2d..888e9f84d 100644 --- a/pyquil/qpu/_randomized_compiling.py +++ b/pyquil/qpu/_randomized_compiling.py @@ -372,6 +372,25 @@ def readout_randomization(self, qubit: int) -> str: return f"{self.readout_randomization_prefix}_q{qubit}" +@dataclass(frozen=True, kw_only=True) +class ReadoutRandomization: + """Configuration for readout randomization on the final layer.""" + + variables: ReadoutRandomizationVariables = field(default_factory=ReadoutRandomizationVariables) + source_unitary_angles: Mapping[int, Sequence[float]] + + def __post_init__(self) -> None: + self._validate() + + def _validate(self) -> None: + for qubit, angles in self.source_unitary_angles.items(): + if len(angles) % _ANGLES_PER_UNITARY != 0: + raise ValueError(f"source unitary angles for qubit {qubit} must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(angles)}") + + def source_unitary_count(self, qubit: int) -> int: + return len(self.source_unitary_angles[qubit]) // _ANGLES_PER_UNITARY + + class _ToQuilCallArguments(ABC): @abstractmethod def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: ... @@ -626,8 +645,7 @@ class RandomizedCompilingConfiguration: base_cycle_repetitions: int variables: RandomizedCompilingVariables = field(default_factory=RandomizedCompilingVariables) leading_delay_seconds: float = 2e-4 - # FIXME: Define readout randomimzation configuration; include the readout groups - readout_randomization_variables: ReadoutRandomizationVariables | None = None + readout_randomization: ReadoutRandomization | None = None """Whether to apply readout randomization to the final layer.""" shots_per_randomization: ShotsPerRandomization | None = None @@ -697,13 +715,13 @@ def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: Declare(self.shots_per_randomization.variables.is_mod_zero, "BIT", 1), ) ) - if self.readout_randomization_variables is not None: + if self.readout_randomization is not None: for q in self.qubits_sorted: - declarations.append(Declare(self.readout_randomization_variables.readout_seed(q), "INTEGER", 1)) + declarations.append(Declare(self.readout_randomization.variables.readout_seed(q), "INTEGER", 1)) declarations.append( - Declare(self.readout_randomization_variables.source_unitaries(q), "REAL", 3) - ) # FIXME: we need to read length off of configuration - declarations.append(Declare(self.readout_randomization_variables.readout_randomization(q), "REAL", 3)) + Declare(self.readout_randomization.variables.source_unitaries(q), "REAL", len(self.readout_randomization.source_unitary_angles[q])) + ) + declarations.append(Declare(self.readout_randomization.variables.readout_randomization(q), "REAL", 3)) declarations.extend( ( @@ -732,7 +750,7 @@ def generate_seed_values(self, rng: np.random.Generator) -> RandomSeeds: size = (len(self.qubits_sorted), self._seed_length) randomized_compiling_seeds = rng.integers(-(2**47), 2**47 - 1, size=size, dtype=np.int64) readout_seeds = None - if self.readout_randomization_variables is not None: + if self.readout_randomization is not None: readout_seeds = rng.integers(-(2**47), 2**47 - 1, size=(len(self.qubits_sorted), 1), dtype=np.int64) return RandomSeeds(randomized_compiling=randomized_compiling_seeds, readout=readout_seeds) @@ -765,16 +783,15 @@ def build_memory_map( memory_map[self.shots_per_randomization.variables.modulo_counter] = [-1] memory_map[self.shots_per_randomization.variables.is_mod_zero] = [1] - if self.readout_randomization_variables is not None: + if self.readout_randomization is not None: if random_seeds.readout is None: raise ValueError("readout seeds must be provided if readout randomization variables are specified") for qubit_index, q in enumerate(self.qubits_sorted): - memory_map[self.readout_randomization_variables.readout_seed(q)] = [ + memory_map[self.readout_randomization.variables.readout_seed(q)] = [ int(random_seeds.readout[qubit_index]) ] - memory_map[self.readout_randomization_variables.readout_randomization(q)] = [0] * _ANGLES_PER_UNITARY - # FIXME: source unitary values - memory_map[self.readout_randomization_variables.source_unitaries(q)] = [0] * _ANGLES_PER_UNITARY + memory_map[self.readout_randomization.variables.readout_randomization(q)] = [0] * _ANGLES_PER_UNITARY + memory_map[self.readout_randomization.variables.source_unitaries(q)] = list(self.readout_randomization.source_unitary_angles[q]) return memory_map def _generate_two_qubit_base_cycles(self) -> tuple[_TwoQubitCycle, ...]: @@ -1008,18 +1025,18 @@ def _build_quil_instructions_for_final_base_cycle(self) -> list[InstructionDesig global_cycle_index = (self._cycle_count + 1) - self._base_cycle_count + cycle_index source = self.variables.source_unitaries(q) - if cycle_index == len(pauli_pairs) - 1 and self.readout_randomization_variables is not None: + if cycle_index == len(pauli_pairs) - 1 and self.readout_randomization is not None: instructions.append( Call( "choose_random_real_sub_regions", [ inst.CallArgument.from_identifier( - self.readout_randomization_variables.readout_randomization(q) + self.readout_randomization.variables.readout_randomization(q) ), - inst.CallArgument.from_identifier(self.readout_randomization_variables.source_unitaries(q)), + inst.CallArgument.from_identifier(self.readout_randomization.variables.source_unitaries(q)), inst.CallArgument.from_immediate(complex(_ANGLES_PER_UNITARY, 0)), inst.CallArgument.from_memory_reference( - inst.MemoryReference(self.readout_randomization_variables.readout_seed(q), 0) + inst.MemoryReference(self.readout_randomization.variables.readout_seed(q), 0) ), ], ) @@ -1030,7 +1047,7 @@ def _build_quil_instructions_for_final_base_cycle(self) -> list[InstructionDesig MemoryReference( self.variables.twirled_unitaries(q), global_cycle_index * _ANGLES_PER_UNITARY + i ), - MemoryReference(self.readout_randomization_variables.readout_randomization(q), i), + MemoryReference(self.readout_randomization.variables.readout_randomization(q), i), ) ) source = self.variables.twirled_unitaries(q) @@ -1299,17 +1316,18 @@ def verify_final_memory( ) found_final_unitary = _compute_unitary_from_zxzxz_angles(found_final_unitary_angles) - if self.readout_randomization_variables is not None and layer_index == len(cycles): + if self.readout_randomization is not None and layer_index == len(cycles): source_unitary_angles = tuple( int(angle) - for angle in original_memory[self.readout_randomization_variables.source_unitaries(q)] + for angle in original_memory[self.readout_randomization.variables.source_unitaries(q)] ) if len(source_unitary_angles) % _ANGLES_PER_UNITARY != 0: raise ValueError( f"source unitary angle count must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(source_unitary_angles)}" ) sub_region_count = len(source_unitary_angles) // _ANGLES_PER_UNITARY - seed_value = int(original_memory[self.readout_randomization_variables.readout_seed(q)][0]) + seed_value = int(original_memory[self.readout_randomization.variables.readout_seed(q)][0]) + # FIXME: should this be shot_count or shot_count - 1? final_index = choose_random_real_sub_region_indices( PrngSeedValue(seed_value), shot_count - 1, 1, sub_region_count )[0] From cb6dcce702cfc17d11354c3364e2eef029b22aba Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 9 Jun 2026 12:26:37 -0700 Subject: [PATCH 10/59] feat: support pauli frame tracking --- pyquil/qpu/_randomized_compiling.py | 285 ++++++++++++++++------------ 1 file changed, 167 insertions(+), 118 deletions(-) diff --git a/pyquil/qpu/_randomized_compiling.py b/pyquil/qpu/_randomized_compiling.py index 888e9f84d..1d0f7c50a 100644 --- a/pyquil/qpu/_randomized_compiling.py +++ b/pyquil/qpu/_randomized_compiling.py @@ -10,6 +10,8 @@ * `test_randomized_compilation_looped_cases`: Test randomized compilation on a repeat base cycle within a loop. """ +from operator import invert +from typing import Generator import math from abc import ABC, abstractmethod from collections.abc import Mapping, Sequence @@ -43,6 +45,7 @@ Label, MemoryReference, ) +from pyquil.simulation import matrices _BITS_PER_VALUE = 48 _BITS_PER_PAULI = 2 @@ -93,7 +96,7 @@ def _generate_lfsr_v1_sequence(seed_value: int, start_index: int, count: int) -> @dataclass(frozen=True, kw_only=True) -class _PauliPairCacheKey: +class PauliPairKey: qubit: int layer_index: int @@ -111,20 +114,20 @@ class _FinalPauliSeedAndPairCache: two_qubit_gate_name: str cycles: tuple[_TwoQubitCycle, ...] qubits_sorted: tuple[int, ...] - - pauli_pairs: dict[_PauliPairCacheKey, tuple["_PauliLiteral", "_PauliLiteral"]] = field( + invert_random_paulis: bool + pauli_pairs: dict[PauliPairKey, tuple["PauliLiteral", "PauliLiteral"]] = field( default_factory=dict, init=False ) def accumulate( - self, sequences: int - ) -> "dict[_PauliPairCacheKey, tuple[int | None, tuple[_PauliLiteral, _PauliLiteral]]]": + self, sequence_count: int + ) -> "dict[PauliPairKey, tuple[int | None, tuple[PauliLiteral, PauliLiteral]]]": current = self pauli_pairs = {} - for sequence_index in range(sequences): + for sequence_index in range(sequence_count): for qubit in self.qubits_sorted: for layer_index in range(len(self.cycles) + 1): - key = _PauliPairCacheKey(qubit=qubit, layer_index=layer_index) + key = PauliPairKey(qubit=qubit, layer_index=layer_index) current_seed, pauli_pair = current[key] if key in pauli_pairs: _, previous_pauli_pair = pauli_pairs[key] @@ -132,7 +135,7 @@ def accumulate( _, next_pauli = previous_pauli_pair[1] * pauli_pair[1] pauli_pair = (previous_pauli, next_pauli) pauli_pairs[key] = (current_seed, pauli_pair) - if sequence_index < sequences - 1: + if sequence_index < sequence_count - 1: current = next(current) return pauli_pairs @@ -143,6 +146,7 @@ def __next__(self) -> Self: two_qubit_gate_name=self.two_qubit_gate_name, cycles=self.cycles, qubits_sorted=self.qubits_sorted, + invert_random_paulis=self.invert_random_paulis, ) @cached_property @@ -156,40 +160,42 @@ def _final_seeds(self) -> dict[int, tuple[int, ...]]: ) return final_seeds - def _get_random_pauli_for_seed_value(self, seed_value: int, layer_index: int) -> "_PauliLiteral": + def _get_random_pauli_for_seed_value(self, seed_value: int, layer_index: int) -> "PauliLiteral": pauli_index = layer_index % _PAULIS_PER_VALUE - return _PauliLiteral(seed_value >> (2 * pauli_index) & 0b11) + return PauliLiteral(seed_value >> (2 * pauli_index) & 0b11) - def _get_previous_random_pauli(self, key: _PauliPairCacheKey) -> "_PauliLiteral": + def _get_previous_random_pauli(self, key: PauliPairKey) -> "PauliLiteral": + if not self.invert_random_paulis: + return PauliLiteral.I q, layer_index = key.qubit, key.layer_index commutations = _PAULI_COMMUTATIONS[self.two_qubit_gate_name] previous_layer_index = layer_index - 1 previous_cycle = self.cycles[previous_layer_index] if previous_layer_index >= 0 else None if previous_cycle is None: - previous_conjugate = _PauliLiteral.I + previous_conjugate = PauliLiteral.I elif q in previous_cycle.data: previous_edge = previous_cycle.data[q] - previous_left_key = _PauliPairCacheKey(qubit=previous_edge[0], layer_index=previous_layer_index) - previous_right_key = _PauliPairCacheKey(qubit=previous_edge[1], layer_index=previous_layer_index) + previous_left_key = PauliPairKey(qubit=previous_edge[0], layer_index=previous_layer_index) + previous_right_key = PauliPairKey(qubit=previous_edge[1], layer_index=previous_layer_index) _, previous_pauli_pair_left = self[previous_left_key] _, previous_pauli_pair_right = self[previous_right_key] previous_pauli_pair_name = "".join([previous_pauli_pair_left[1].name, previous_pauli_pair_right[1].name]) conjugate = commutations[previous_pauli_pair_name] is_pauli_left = q == previous_edge[0] - previous_conjugate = _PauliLiteral.from_name(conjugate[0] if is_pauli_left else conjugate[1]) + previous_conjugate = PauliLiteral.from_name(conjugate[0] if is_pauli_left else conjugate[1]) else: - previous_key = _PauliPairCacheKey(qubit=q, layer_index=previous_layer_index) + previous_key = PauliPairKey(qubit=q, layer_index=previous_layer_index) _, previous_pauli_pair = self[previous_key] previous_conjugate = previous_pauli_pair[1] return previous_conjugate - def __getitem__(self, key: _PauliPairCacheKey) -> tuple[int | None, tuple["_PauliLiteral", "_PauliLiteral"]]: + def __getitem__(self, key: PauliPairKey) -> tuple[int | None, tuple["PauliLiteral", "PauliLiteral"]]: q, layer_index = key.qubit, key.layer_index if layer_index == len(self.cycles): # there is no random Pauli to apply! if key not in self.pauli_pairs: - next_pauli = _PauliLiteral.I + next_pauli = PauliLiteral.I previous_conjugate = self._get_previous_random_pauli(key) self.pauli_pairs[key] = (previous_conjugate, next_pauli) return None, self.pauli_pairs[key] @@ -396,7 +402,7 @@ class _ToQuilCallArguments(ABC): def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: ... -class _PauliLiteral(Enum): +class PauliLiteral(Enum): """A literal Pauli known at program construction time.""" I = 0 # noqa @@ -407,19 +413,19 @@ class _PauliLiteral(Enum): @property def matrix(self) -> NDArray[np.complex128]: match self: - case _PauliLiteral.I: - return np.eye(2, dtype=np.complex128) - case _PauliLiteral.X: - return np.asarray([[0, 1], [1, 0]], dtype=np.complex128) - case _PauliLiteral.Y: - return np.asarray([[0, -1j], [1j, 0]], dtype=np.complex128) - case _PauliLiteral.Z: - return np.asarray([[1, 0], [0, -1]], dtype=np.complex128) + case PauliLiteral.I: + return matrices.I + case PauliLiteral.X: + return matrices.X + case PauliLiteral.Y: + return matrices.Y + case PauliLiteral.Z: + return matrices.Z case _: raise ValueError(f"{self} cannot be cast to matrix") @classmethod - def from_name(cls, name: str) -> "_PauliLiteral": + def from_name(cls, name: str) -> "PauliLiteral": match name: case "I": return cls.I @@ -435,30 +441,30 @@ def from_name(cls, name: str) -> "_PauliLiteral": def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: return (inst.CallArgument.from_immediate(complex(self.value, 0)),) - def __rmul__(self, other: "_PauliLiteral") -> "tuple[complex, _PauliLiteral]": + def __rmul__(self, other: "PauliLiteral") -> "tuple[complex, PauliLiteral]": match (self, other): - case (_PauliLiteral.I, _): + case (PauliLiteral.I, _): return 1, other - case (_, _PauliLiteral.I): + case (_, PauliLiteral.I): return 1, self - case (_PauliLiteral.X, _PauliLiteral.X): - return 1, _PauliLiteral.I - case (_PauliLiteral.Y, _PauliLiteral.Y): - return 1, _PauliLiteral.I - case (_PauliLiteral.Z, _PauliLiteral.Z): - return 1, _PauliLiteral.I - case (_PauliLiteral.X, _PauliLiteral.Y): - return 1j, _PauliLiteral.Z - case (_PauliLiteral.Y, _PauliLiteral.Z): - return 1j, _PauliLiteral.X - case (_PauliLiteral.Z, _PauliLiteral.X): - return 1j, _PauliLiteral.Y - case (_PauliLiteral.Y, _PauliLiteral.X): - return -1j, _PauliLiteral.Z - case (_PauliLiteral.Z, _PauliLiteral.Y): - return -1j, _PauliLiteral.X - case (_PauliLiteral.X, _PauliLiteral.Z): - return -1j, _PauliLiteral.Y + case (PauliLiteral.X, PauliLiteral.X): + return 1, PauliLiteral.I + case (PauliLiteral.Y, PauliLiteral.Y): + return 1, PauliLiteral.I + case (PauliLiteral.Z, PauliLiteral.Z): + return 1, PauliLiteral.I + case (PauliLiteral.X, PauliLiteral.Y): + return 1j, PauliLiteral.Z + case (PauliLiteral.Y, PauliLiteral.Z): + return 1j, PauliLiteral.X + case (PauliLiteral.Z, PauliLiteral.X): + return 1j, PauliLiteral.Y + case (PauliLiteral.Y, PauliLiteral.X): + return -1j, PauliLiteral.Z + case (PauliLiteral.Z, PauliLiteral.Y): + return -1j, PauliLiteral.X + case (PauliLiteral.X, PauliLiteral.Z): + return -1j, PauliLiteral.Y case _: raise ValueError(f"invalid pauli multiplication: {self} * {other}") @@ -515,8 +521,8 @@ class _PauliPair: unitary angles for this (qubit, layer_index). """ - previous: _PauliReference | _PauliLiteral | _PauliConjugate - next: _PauliReference | _PauliLiteral + previous: _PauliReference | PauliLiteral | _PauliConjugate + next: _PauliReference | PauliLiteral def build_quil_call_instruction( self, @@ -532,17 +538,17 @@ def build_quil_call_instruction( arguments.extend(self.next.to_call_arguments()) arguments.extend(self.previous.to_call_arguments()) match (self.previous, self.next): - case (_PauliLiteral(), _PauliLiteral()): + case (PauliLiteral(), PauliLiteral()): return Call( "merge_zxzxz_unitary_with_paulis_literal_literal", arguments, ) - case (_PauliReference(), _PauliLiteral()): + case (_PauliReference(), PauliLiteral()): return Call( "merge_zxzxz_unitary_with_paulis_literal_reference", arguments, ) - case (_PauliConjugate(), _PauliLiteral()): + case (_PauliConjugate(), PauliLiteral()): return Call( "merge_zxzxz_unitary_with_paulis_literal_conjugate", arguments, @@ -557,7 +563,7 @@ def build_quil_call_instruction( "merge_zxzxz_unitary_with_paulis_reference_conjugate", arguments, ) - case (_PauliLiteral(), _PauliReference()): + case (PauliLiteral(), _PauliReference()): return Call( "merge_zxzxz_unitary_with_paulis_reference_literal", arguments, @@ -590,7 +596,7 @@ def _compute_unitary_from_zxzxz_angles(unitary: Sequence[float]) -> NDArray[np.c def _compute_expected_merged_unitary( - unitary: tuple[float, ...], pauli_pair: tuple[_PauliLiteral, _PauliLiteral] + unitary: tuple[float, ...], pauli_pair: tuple[PauliLiteral, PauliLiteral] ) -> NDArray[np.complex128]: """Compute the expected merged unitary from ZXZXZ angles and a Pauli pair.""" return pauli_pair[1].matrix @ _compute_unitary_from_zxzxz_angles(unitary) @ pauli_pair[0].matrix @@ -651,6 +657,8 @@ class RandomizedCompilingConfiguration: shots_per_randomization: ShotsPerRandomization | None = None """Number of shots per randomization.""" + invert_random_paulis: bool = True + def __post_init__(self) -> None: self._validate() @@ -794,32 +802,35 @@ def build_memory_map( memory_map[self.readout_randomization.variables.source_unitaries(q)] = list(self.readout_randomization.source_unitary_angles[q]) return memory_map - def _generate_two_qubit_base_cycles(self) -> tuple[_TwoQubitCycle, ...]: + def _build_two_qubit_base_cycles(self) -> tuple[_TwoQubitCycle, ...]: return tuple(_TwoQubitCycle.from_edges(cycle) for cycle in self.base_cycles) def _build_quil_instructions_for_cycle(self) -> list[InstructionDesignator]: pauli_pairs = [] - for cycle in self._generate_two_qubit_base_cycles(): + for cycle in self._build_two_qubit_base_cycles(): cycle_pauli_pairs = [] for q in cycle.data.keys(): edge = cycle[q] - pauli_left = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), pauli_index=0 - ) - pauli_right = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), pauli_index=0 - ) - is_pauli_left = q == edge[0] - pauli_conjugate = _PauliConjugate( - pauli_left=pauli_left, - pauli_right=pauli_right, - is_left_conjugate=is_pauli_left, - ) + if self.invert_random_paulis: + pauli_left = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), pauli_index=0 + ) + pauli_right = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), pauli_index=0 + ) + is_pauli_left = q == edge[0] + previous = _PauliConjugate( + pauli_left=pauli_left, + pauli_right=pauli_right, + is_left_conjugate=is_pauli_left, + ) + else: + previous = PauliLiteral.I cycle_pauli_pairs.append( ( q, _PauliPair( - previous=pauli_conjugate, + previous=previous, next=_PauliReference( memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 0), pauli_index=1 ), @@ -828,14 +839,18 @@ def _build_quil_instructions_for_cycle(self) -> list[InstructionDesignator]: ) for qubit in self.qubits_sorted: if qubit not in cycle: + if self.invert_random_paulis: + previous = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), + pauli_index=0, + ) + else: + previous = PauliLiteral.I cycle_pauli_pairs.append( ( qubit, _PauliPair( - previous=_PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), - pauli_index=0, - ), + previous=previous, next=_PauliReference( memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), pauli_index=1, @@ -875,23 +890,26 @@ def _build_quil_instructions_for_cycle(self) -> list[InstructionDesignator]: def _build_quil_instructions_for_seed_transition(self) -> list[InstructionDesignator]: pauli_pairs = [] - for cycle_index, cycle in enumerate(self._generate_two_qubit_base_cycles()): + for cycle_index, cycle in enumerate(self._build_two_qubit_base_cycles()): cycle_pauli_pairs = [] is_final_cycle = cycle_index == self._base_cycle_count - 1 for q in cycle.data.keys(): edge = cycle[q] - pauli_left = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), pauli_index=0 - ) - pauli_right = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), pauli_index=0 - ) - is_pauli_left = q == edge[0] - pauli_conjugate = _PauliConjugate( - pauli_left=pauli_left, - pauli_right=pauli_right, - is_left_conjugate=is_pauli_left, - ) + if self.invert_random_paulis: + pauli_left = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), pauli_index=0 + ) + pauli_right = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), pauli_index=0 + ) + is_pauli_left = q == edge[0] + previous = _PauliConjugate( + pauli_left=pauli_left, + pauli_right=pauli_right, + is_left_conjugate=is_pauli_left, + ) + else: + previous = PauliLiteral.I if is_final_cycle: next_pauli = _PauliReference( memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 1), pauli_index=0 @@ -904,7 +922,7 @@ def _build_quil_instructions_for_seed_transition(self) -> list[InstructionDesign ( q, _PauliPair( - previous=pauli_conjugate, + previous=previous, next=next_pauli, ), ) @@ -919,14 +937,18 @@ def _build_quil_instructions_for_seed_transition(self) -> list[InstructionDesign next_pauli = _PauliReference( memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), pauli_index=1 ) + if self.invert_random_paulis: + previous = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), + pauli_index=0, + ) + else: + previous = PauliLiteral.I cycle_pauli_pairs.append( ( qubit, _PauliPair( - previous=_PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), - pauli_index=0, - ), + previous=previous, next=next_pauli, ), ) @@ -962,27 +984,30 @@ def _build_quil_instructions_for_seed_transition(self) -> list[InstructionDesign def _build_quil_instructions_for_final_base_cycle(self) -> list[InstructionDesignator]: pauli_pairs = [] - for cycle_index, cycle in enumerate(self._generate_two_qubit_base_cycles()): + for cycle_index, cycle in enumerate(self._build_two_qubit_base_cycles()): cycle_pauli_pairs = [] is_final_cycle = cycle_index == self._base_cycle_count - 1 for q in cycle.data.keys(): edge = cycle[q] - pauli_left = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), - pauli_index=cycle_index, - ) - pauli_right = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), - pauli_index=cycle_index, - ) - is_pauli_left = q == edge[0] - pauli_conjugate = _PauliConjugate( - pauli_left=pauli_left, - pauli_right=pauli_right, - is_left_conjugate=is_pauli_left, - ) + if self.invert_random_paulis: + pauli_left = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), + pauli_index=cycle_index, + ) + pauli_right = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), + pauli_index=cycle_index, + ) + is_pauli_left = q == edge[0] + previous = _PauliConjugate( + pauli_left=pauli_left, + pauli_right=pauli_right, + is_left_conjugate=is_pauli_left, + ) + else: + previous = PauliLiteral.I if is_final_cycle: - pauli_next = _PauliLiteral.I + pauli_next = PauliLiteral.I else: pauli_next = _PauliReference( memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 0), @@ -992,7 +1017,7 @@ def _build_quil_instructions_for_final_base_cycle(self) -> list[InstructionDesig ( q, _PauliPair( - previous=pauli_conjugate, + previous=previous, next=pauli_next, ), ) @@ -1000,20 +1025,24 @@ def _build_quil_instructions_for_final_base_cycle(self) -> list[InstructionDesig for qubit in self.qubits_sorted: if qubit not in cycle: if is_final_cycle: - pauli_next = _PauliLiteral.I + pauli_next = PauliLiteral.I else: pauli_next = _PauliReference( memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), pauli_index=cycle_index + 1, ) + if self.invert_random_paulis: + previous = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), + pauli_index=cycle_index, + ) + else: + previous = PauliLiteral.I cycle_pauli_pairs.append( ( qubit, _PauliPair( - previous=_PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), - pauli_index=cycle_index, - ), + previous=previous, next=pauli_next, ), ) @@ -1082,7 +1111,7 @@ def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[Instruc ) for q in self.qubits_sorted: pauli_pair = _PauliPair( - previous=_PauliLiteral.I, + previous=PauliLiteral.I, next=_PauliReference( memory_reference=inst.MemoryReference(self.variables.pauli_seed(q), 0), pauli_index=0 ), @@ -1272,7 +1301,7 @@ def verify_final_memory( unitaries specified for the (qubit, layer) and verify that the resulting unitary is equal to the twirled unitaries read from the final memory for the (qubit, layer). """ - cycles = self._generate_two_qubit_base_cycles() + cycles = self._build_two_qubit_base_cycles() if self.shots_per_randomization is not None: prng_sequence_length = shot_count // self.shots_per_randomization.shots_per_randomization else: @@ -1292,13 +1321,14 @@ def verify_final_memory( cycles=cycles, qubits_sorted=self.qubits_sorted, prng_sequence_step_length=prng_sequence_step_length, + invert_random_paulis=self.invert_random_paulis, ) pauli_pairs = pauli_cache.accumulate(prng_sequence_step_count) for q in self.qubits_sorted: for layer_index in range(len(cycles) + 1): seed_index = layer_index // _PAULIS_PER_VALUE - key = _PauliPairCacheKey( + key = PauliPairKey( qubit=q, layer_index=layer_index, ) @@ -1343,3 +1373,22 @@ def verify_final_memory( f"unitary mismatch for q{q} layer {layer_index}: got {found_final_unitary_angles}, " f"expected {source_unitary_angles}, pauli pair: {final_pauli_pair}" ) + + def track_pauli_frames( + self, + sequence_count: int, + ) -> Generator[dict[PauliPairKey, tuple[int | None, tuple[PauliLiteral, PauliLiteral]]], None, None]: + pauli_cache = _FinalPauliSeedAndPairCache( + original_seeds={q: [0] * self._seed_length for q in self.qubits_sorted}, + two_qubit_gate_name="", + cycles=self._build_two_qubit_base_cycles(), + qubits_sorted=self.qubits_sorted, + prng_sequence_step_length=1, + invert_random_paulis=self.invert_random_paulis, + ) + for sequence_index in range(sequence_count): + pauli_pairs = pauli_cache.accumulate(1) + yield pauli_pairs + if sequence_index == sequence_count - 1: + pauli_cache = next(pauli_cache) + From fdb60cb5b0216f30a9bd37a008167d59f70b040e Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 9 Jun 2026 13:10:18 -0700 Subject: [PATCH 11/59] refactor: pauli conjugates map types --- pyquil/qpu/_randomized_compiling.py | 175 +++++++++++++++------------- 1 file changed, 93 insertions(+), 82 deletions(-) diff --git a/pyquil/qpu/_randomized_compiling.py b/pyquil/qpu/_randomized_compiling.py index 1d0f7c50a..fec209c98 100644 --- a/pyquil/qpu/_randomized_compiling.py +++ b/pyquil/qpu/_randomized_compiling.py @@ -10,15 +10,13 @@ * `test_randomized_compilation_looped_cases`: Test randomized compilation on a repeat base cycle within a loop. """ -from operator import invert -from typing import Generator import math from abc import ABC, abstractmethod -from collections.abc import Mapping, Sequence +from collections.abc import Generator, Mapping, Sequence from dataclasses import dataclass, field from enum import Enum from functools import cached_property -from typing import Literal, Self, cast +from typing import Self, cast import numpy as np from numpy.typing import NDArray @@ -111,13 +109,11 @@ class _FinalPauliSeedAndPairCache: prng_sequence_step_length: int original_seeds: Mapping[int, Sequence[int]] - two_qubit_gate_name: str + pauli_conjugates_map: Mapping[tuple["PauliLiteral", "PauliLiteral"], tuple["PauliLiteral", "PauliLiteral"]] cycles: tuple[_TwoQubitCycle, ...] qubits_sorted: tuple[int, ...] invert_random_paulis: bool - pauli_pairs: dict[PauliPairKey, tuple["PauliLiteral", "PauliLiteral"]] = field( - default_factory=dict, init=False - ) + pauli_pairs: dict[PauliPairKey, tuple["PauliLiteral", "PauliLiteral"]] = field(default_factory=dict, init=False) def accumulate( self, sequence_count: int @@ -143,7 +139,7 @@ def __next__(self) -> Self: return _FinalPauliSeedAndPairCache( prng_sequence_step_length=self.prng_sequence_step_length, original_seeds=self._final_seeds, - two_qubit_gate_name=self.two_qubit_gate_name, + pauli_conjugates_map=self.pauli_conjugates_map, cycles=self.cycles, qubits_sorted=self.qubits_sorted, invert_random_paulis=self.invert_random_paulis, @@ -168,7 +164,6 @@ def _get_previous_random_pauli(self, key: PauliPairKey) -> "PauliLiteral": if not self.invert_random_paulis: return PauliLiteral.I q, layer_index = key.qubit, key.layer_index - commutations = _PAULI_COMMUTATIONS[self.two_qubit_gate_name] previous_layer_index = layer_index - 1 previous_cycle = self.cycles[previous_layer_index] if previous_layer_index >= 0 else None if previous_cycle is None: @@ -179,10 +174,9 @@ def _get_previous_random_pauli(self, key: PauliPairKey) -> "PauliLiteral": previous_right_key = PauliPairKey(qubit=previous_edge[1], layer_index=previous_layer_index) _, previous_pauli_pair_left = self[previous_left_key] _, previous_pauli_pair_right = self[previous_right_key] - previous_pauli_pair_name = "".join([previous_pauli_pair_left[1].name, previous_pauli_pair_right[1].name]) - conjugate = commutations[previous_pauli_pair_name] + conjugate = self.pauli_conjugates_map[(previous_pauli_pair_left[1], previous_pauli_pair_right[1])] is_pauli_left = q == previous_edge[0] - previous_conjugate = PauliLiteral.from_name(conjugate[0] if is_pauli_left else conjugate[1]) + previous_conjugate = conjugate[0] if is_pauli_left else conjugate[1] else: previous_key = PauliPairKey(qubit=q, layer_index=previous_layer_index) _, previous_pauli_pair = self[previous_key] @@ -226,71 +220,81 @@ def _lfsr_v1_next(seed: int) -> int: return ((seed << 1) & _MAX_SEQUENCER_VALUE) | feedback_value -_ZXZXZ_IDENTITY_ANGLES = [0.0, -0.5, -0.5] -_PAULI_COMMUTATIONS = { - "CZ": { - "II": "II", - "IX": "ZX", - "IY": "ZY", - "IZ": "IZ", - "XI": "XZ", - "XX": "YY", - "XY": "YX", - "XZ": "XI", - "YI": "YZ", - "YX": "XY", - "YY": "XX", - "YZ": "YI", - "ZI": "ZI", - "ZX": "IX", - "ZY": "IY", - "ZZ": "ZZ", - }, - "ISWAP": { - "II": "II", - "IX": "YZ", - "IY": "XZ", - "IZ": "ZI", - "XI": "ZY", - "XX": "XX", - "XY": "YX", - "XZ": "IY", - "YI": "ZX", - "YX": "XY", - "YY": "YY", - "YZ": "IX", - "ZI": "IZ", - "ZX": "YI", - "ZY": "XI", - "ZZ": "ZZ", - }, +def _pauli_conjugates_map_str_to_literals( + pauli_conjugates_map_str: Mapping[str, str], +) -> dict[tuple["PauliLiteral", "PauliLiteral"], tuple["PauliLiteral", "PauliLiteral"]]: + pauli_conjugates_map = {} + for previous_str, next_str in pauli_conjugates_map_str.items(): + previous_paulis = tuple(PauliLiteral.from_name(c) for c in previous_str) + next_paulis = tuple(PauliLiteral.from_name(c) for c in next_str) + if len(previous_paulis) != 2 or len(next_paulis) != 2: + raise ValueError(f"invalid pauli pair strings: {previous_str}, {next_str}") + pauli_conjugates_map[previous_paulis] = next_paulis + return pauli_conjugates_map + + +PAULI_CONJUGATES_MAPS = { + "CZ": _pauli_conjugates_map_str_to_literals( + { + "II": "II", + "IX": "ZX", + "IY": "ZY", + "IZ": "IZ", + "XI": "XZ", + "XX": "YY", + "XY": "YX", + "XZ": "XI", + "YI": "YZ", + "YX": "XY", + "YY": "XX", + "YZ": "YI", + "ZI": "ZI", + "ZX": "IX", + "ZY": "IY", + "ZZ": "ZZ", + } + ), + "ISWAP": _pauli_conjugates_map_str_to_literals( + { + "II": "II", + "IX": "YZ", + "IY": "XZ", + "IZ": "ZI", + "XI": "ZY", + "XX": "XX", + "XY": "YX", + "XZ": "IY", + "YI": "ZX", + "YX": "XY", + "YY": "YY", + "YZ": "IX", + "ZI": "IZ", + "ZX": "YI", + "ZY": "XI", + "ZZ": "ZZ", + } + ), } -def _build_pauli_conjugates_map(two_qubit_gate_name: str) -> list[int | float]: +def build_memory_values_for_paulis_conjugates_map( + pauli_conjugates_map: Mapping[tuple["PauliLiteral", "PauliLiteral"], tuple["PauliLiteral", "PauliLiteral"]], +) -> list[int | float]: """Build a map from each Pauli pair to its conjugate under the specified two-qubit gate. - This essentially translates `_PAULI_COMMUTATIONS` from a map of string to string to a map + This essentially translates `PAULI_CONJUGATES_MAPS` from a map of string to string to a map of int to int, which can be used as a Quil memory reference for conjugation lookup on the QPU. """ - pauli_conjugates_map: list[int | None] = [None] * _NUMBER_PAULI_PAIRS - for previous_paulis, next_paulis in _PAULI_COMMUTATIONS[two_qubit_gate_name].items(): + memory_values: list[int | None] = [None] * _NUMBER_PAULI_PAIRS + for previous_paulis, next_paulis in pauli_conjugates_map.items(): previous_pauli_index = _pauli_pair_to_int(previous_paulis) next_pauli_index = _pauli_pair_to_int(next_paulis) - pauli_conjugates_map[previous_pauli_index] = next_pauli_index + memory_values[previous_pauli_index] = next_pauli_index return cast(list[int | float], pauli_conjugates_map) -def _pauli_pair_to_ints(pauli_pair: str) -> tuple[int, int]: - pauli_values = {"I": 0, "X": 1, "Y": 2, "Z": 3} - pauli_left = pauli_values[pauli_pair[0]] - pauli_right = pauli_values[pauli_pair[1]] - return pauli_left, pauli_right - - -def _pauli_pair_to_int(pauli_pair: str) -> int: - pauli_left, pauli_right = _pauli_pair_to_ints(pauli_pair) - return (pauli_left << _BITS_PER_PAULI) + pauli_right +def _pauli_pair_to_int(pauli_pair: tuple["PauliLiteral", "PauliLiteral"]) -> int: + return (pauli_pair[0].value << _BITS_PER_PAULI) + pauli_pair[1].value def _unitary_equal(A: NDArray[np.complex128], B: NDArray[np.complex128]) -> bool: @@ -319,7 +323,7 @@ class ShotsPerRandomization: """ shots_per_randomization: int - secondary_delay_seconds: float = 2e-4 + secondary_delay_seconds: float | None = 2e-4 variables: ShotsPerRandomizationVariables = field(default_factory=ShotsPerRandomizationVariables) @property @@ -355,8 +359,9 @@ def generate_mod_shot_count_block(self, qubits_sorted: Sequence[int]) -> tuple[I MemoryReference(self.variables.is_mod_zero, 0), ), ] - for q in qubits_sorted: - instructions.append(Delay([], [q], self.secondary_delay_seconds)) + if self.secondary_delay_seconds is not None: + for q in qubits_sorted: + instructions.append(Delay([], [q], self.secondary_delay_seconds)) instructions.append(Jump(Label(self.variables.pulse_program_label))) instructions.append(JumpTarget(Label(self.variables.randomization_label))) return tuple(instructions) @@ -386,12 +391,14 @@ class ReadoutRandomization: source_unitary_angles: Mapping[int, Sequence[float]] def __post_init__(self) -> None: - self._validate() + self._validate() def _validate(self) -> None: for qubit, angles in self.source_unitary_angles.items(): if len(angles) % _ANGLES_PER_UNITARY != 0: - raise ValueError(f"source unitary angles for qubit {qubit} must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(angles)}") + raise ValueError( + f"source unitary angles for qubit {qubit} must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(angles)}" + ) def source_unitary_count(self, qubit: int) -> int: return len(self.source_unitary_angles[qubit]) // _ANGLES_PER_UNITARY @@ -727,7 +734,11 @@ def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: for q in self.qubits_sorted: declarations.append(Declare(self.readout_randomization.variables.readout_seed(q), "INTEGER", 1)) declarations.append( - Declare(self.readout_randomization.variables.source_unitaries(q), "REAL", len(self.readout_randomization.source_unitary_angles[q])) + Declare( + self.readout_randomization.variables.source_unitaries(q), + "REAL", + len(self.readout_randomization.source_unitary_angles[q]), + ) ) declarations.append(Declare(self.readout_randomization.variables.readout_randomization(q), "REAL", 3)) @@ -765,7 +776,7 @@ def generate_seed_values(self, rng: np.random.Generator) -> RandomSeeds: def build_memory_map( self, random_seeds: RandomSeeds, - two_qubit_gate_name: str, + pauli_conjugates_map: list[int | float], ) -> dict[str, list[int | float]]: memory_map: dict[str, list[int | float]] = { self.variables.unitary_angle_offset: [_ANGLES_PER_UNITARY], @@ -776,7 +787,7 @@ def build_memory_map( if self._base_cycle_loop_length > 0 or self._seed_loop_inner_length > 0: memory_map[self.variables.base_cycle_loop_index] = [0] - memory_map[self.variables.pauli_conjugates_map] = _build_pauli_conjugates_map(two_qubit_gate_name) + memory_map[self.variables.pauli_conjugates_map] = pauli_conjugates_map for qubit_index, q in enumerate(self.qubits_sorted): memory_map[self.variables.pauli_seed(q)] = random_seeds.randomized_compiling[qubit_index].tolist() memory_map[self.variables.twirled_unitaries(q)] = np.zeros( @@ -799,7 +810,9 @@ def build_memory_map( int(random_seeds.readout[qubit_index]) ] memory_map[self.readout_randomization.variables.readout_randomization(q)] = [0] * _ANGLES_PER_UNITARY - memory_map[self.readout_randomization.variables.source_unitaries(q)] = list(self.readout_randomization.source_unitary_angles[q]) + memory_map[self.readout_randomization.variables.source_unitaries(q)] = list( + self.readout_randomization.source_unitary_angles[q] + ) return memory_map def _build_two_qubit_base_cycles(self) -> tuple[_TwoQubitCycle, ...]: @@ -1260,7 +1273,6 @@ def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[Instruc def build_quil_program( self, - two_qubit_gate_name: Literal["ISWAP", "CZ"], ) -> Program: """Generate a cycle program with randomized compilation according to the specified configuration.""" program = Program() @@ -1276,8 +1288,7 @@ def build_quil_program( if self.shots_per_randomization is not None: program += self.shots_per_randomization.pulse_program_label - if two_qubit_gate_name == "ISWAP": - # A delay here is only necessary for ISWAP. + if self.shots_per_randomization.secondary_delay_seconds is not None: for q in self.qubits_sorted: program += Delay([], [q], self.shots_per_randomization.secondary_delay_seconds) else: @@ -1290,7 +1301,7 @@ def verify_final_memory( final_memory: dict[str, list[int] | list[float]], original_memory: dict[str, list[int] | list[float]], shot_count: int, - two_qubit_gate_name: str, + pauli_conjugates_map: Mapping[tuple[PauliLiteral, PauliLiteral], tuple[PauliLiteral, PauliLiteral]], ): """Verify that the final memory state matches expectations. @@ -1317,7 +1328,7 @@ def verify_final_memory( original_seeds={ q: cast(list[int], original_memory[self.variables.pauli_seed(q)]) for q in self.qubits_sorted }, - two_qubit_gate_name=two_qubit_gate_name, + pauli_conjugates_map=pauli_conjugates_map, cycles=cycles, qubits_sorted=self.qubits_sorted, prng_sequence_step_length=prng_sequence_step_length, @@ -1377,10 +1388,11 @@ def verify_final_memory( def track_pauli_frames( self, sequence_count: int, + pauli_conjugates_map: Mapping[tuple[PauliLiteral, PauliLiteral], tuple[PauliLiteral, PauliLiteral]], ) -> Generator[dict[PauliPairKey, tuple[int | None, tuple[PauliLiteral, PauliLiteral]]], None, None]: pauli_cache = _FinalPauliSeedAndPairCache( original_seeds={q: [0] * self._seed_length for q in self.qubits_sorted}, - two_qubit_gate_name="", + pauli_conjugates_map=pauli_conjugates_map, cycles=self._build_two_qubit_base_cycles(), qubits_sorted=self.qubits_sorted, prng_sequence_step_length=1, @@ -1391,4 +1403,3 @@ def track_pauli_frames( yield pauli_pairs if sequence_index == sequence_count - 1: pauli_cache = next(pauli_cache) - From b12838f81c6050c60920aaea3f6de165f4a08c23 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 9 Jun 2026 14:04:38 -0700 Subject: [PATCH 12/59] feat: support extern signatures --- pyquil/_qpu/__init__.py | 0 pyquil/_qpu/_extern_call.py | 194 ++++ pyquil/_qpu/_randomized_compiling.py | 1402 ++++++++++++++++++++++++++ 3 files changed, 1596 insertions(+) create mode 100644 pyquil/_qpu/__init__.py create mode 100644 pyquil/_qpu/_extern_call.py create mode 100644 pyquil/_qpu/_randomized_compiling.py diff --git a/pyquil/_qpu/__init__.py b/pyquil/_qpu/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/pyquil/_qpu/_extern_call.py b/pyquil/_qpu/_extern_call.py new file mode 100644 index 000000000..b118a16af --- /dev/null +++ b/pyquil/_qpu/_extern_call.py @@ -0,0 +1,194 @@ + +from quil import instructions as inst + +from pyquil.quilbase import Pragma + +_NUMBER_PAULI_PAIRS = 16 + + +def build_extern_function_signatures() -> dict[str, Pragma]: + """Build and return a map from extern function name to the corresponding EXTERN pragma. + + These signtures reflect extern function signatures publicly supported by various pyQuil features, such as + but not limited to randomized compiling. + """ + destination = inst.ExternParameter( + "destination", + True, + inst.ExternParameterType.from_variable_length_vector(inst.ScalarType.Real), + ) + unitary_angles = inst.ExternParameter( + "unitary_angles", + False, + inst.ExternParameterType.from_variable_length_vector(inst.ScalarType.Real), + ) + angle_offset = inst.ExternParameter( + "angle_offset", + False, + inst.ExternParameterType.from_scalar(inst.ScalarType.Integer), + ) + pauli_set = inst.ExternParameterType.from_scalar(inst.ScalarType.Integer) + pauli_index = inst.ExternParameterType.from_scalar(inst.ScalarType.Integer) + is_pauli_left = inst.ExternParameter( + "is_pauli_left", False, inst.ExternParameterType.from_scalar(inst.ScalarType.Bit) + ) + pauli_conjugates_map = inst.ExternParameter( + "pauli_conjugates_map", + False, + inst.ExternParameterType.from_fixed_length_vector(inst.Vector(inst.ScalarType.Integer, _NUMBER_PAULI_PAIRS)), + ) + pauli_literal = inst.ExternParameterType.from_scalar(inst.ScalarType.Integer) + signatures = [ + ( + "merge_zxzxz_unitary_with_paulis_reference_conjugate", + inst.ExternSignature( + parameters=[ + destination, + unitary_angles, + angle_offset, + inst.ExternParameter("next_paulis", False, pauli_set), + inst.ExternParameter("next_pauli_index", False, pauli_index), + inst.ExternParameter("previous_paulis_left", False, pauli_set), + inst.ExternParameter("previous_pauli_left_index", False, pauli_index), + inst.ExternParameter("previous_paulis_right", False, pauli_set), + inst.ExternParameter("previous_pauli_right_index", False, pauli_index), + is_pauli_left, + pauli_conjugates_map, + ], + return_type=None, + ).to_quil(), + ), + ( + "merge_zxzxz_unitary_with_paulis_literal_literal", + inst.ExternSignature( + parameters=[ + destination, + unitary_angles, + angle_offset, + inst.ExternParameter("next_pauli", False, pauli_literal), + inst.ExternParameter("conjugate_pauli", False, pauli_literal), + ], + return_type=None, + ).to_quil(), + ), + ( + "merge_zxzxz_unitary_with_paulis_literal_conjugate", + inst.ExternSignature( + parameters=[ + destination, + unitary_angles, + angle_offset, + inst.ExternParameter("next_pauli", False, pauli_literal), + inst.ExternParameter("previous_paulis_left", False, pauli_set), + inst.ExternParameter("previous_pauli_left_index", False, pauli_index), + inst.ExternParameter("previous_paulis_right", False, pauli_set), + inst.ExternParameter("previous_pauli_right_index", False, pauli_index), + is_pauli_left, + pauli_conjugates_map, + ], + return_type=None, + ).to_quil(), + ), + ( + "merge_zxzxz_unitary_with_paulis_reference_literal", + inst.ExternSignature( + parameters=[ + destination, + unitary_angles, + angle_offset, + inst.ExternParameter("next_paulis", False, pauli_set), + inst.ExternParameter("next_pauli_index", False, pauli_index), + inst.ExternParameter("conjugate_pauli", False, pauli_literal), + ], + return_type=None, + ).to_quil(), + ), + ( + "merge_zxzxz_unitary_with_paulis_literal_reference", + inst.ExternSignature( + parameters=[ + destination, + unitary_angles, + angle_offset, + inst.ExternParameter("next_pauli", False, pauli_literal), + inst.ExternParameter("previous_paulis", False, pauli_set), + inst.ExternParameter("previous_pauli_index", False, pauli_index), + ], + return_type=None, + ).to_quil(), + ), + ( + "merge_zxzxz_unitary_with_paulis_reference_reference", + inst.ExternSignature( + parameters=[ + destination, + unitary_angles, + angle_offset, + inst.ExternParameter("next_paulis", False, pauli_set), + inst.ExternParameter("next_pauli_index", False, pauli_index), + inst.ExternParameter("previous_paulis", False, pauli_set), + inst.ExternParameter("previous_pauli_index", False, pauli_index), + ], + return_type=None, + ).to_quil(), + ), + ( + "prng_set_seed_and_step", + inst.ExternSignature( + parameters=[ + inst.ExternParameter("seed", False, inst.ExternParameterType.from_scalar(inst.ScalarType.Integer)) + ], + return_type=inst.ScalarType.Integer, + ).to_quil(), + ), + ( + "prng_step", + inst.ExternSignature( + parameters=[], + return_type=inst.ScalarType.Integer, + ).to_quil(), + ), + ( + "if_then_else_integer", + inst.ExternSignature( + parameters=[ + inst.ExternParameter("condition", False, inst.ExternParameterType.from_scalar(inst.ScalarType.Bit)), + inst.ExternParameter( + "true_value", False, inst.ExternParameterType.from_scalar(inst.ScalarType.Integer) + ), + inst.ExternParameter( + "false_value", False, inst.ExternParameterType.from_scalar(inst.ScalarType.Integer) + ), + ], + return_type=inst.ScalarType.Integer, + ).to_quil(), + ), + ( + "if_then_else_real", + inst.ExternSignature( + parameters=[ + inst.ExternParameter("condition", False, inst.ExternParameterType.from_scalar(inst.ScalarType.Bit)), + inst.ExternParameter( + "true_value", False, inst.ExternParameterType.from_scalar(inst.ScalarType.Real) + ), + inst.ExternParameter( + "false_value", False, inst.ExternParameterType.from_scalar(inst.ScalarType.Real) + ), + ], + return_type=inst.ScalarType.Real, + ).to_quil(), + ), + ( + "choose_random_real_sub_regions", + inst.ExternSignature( + parameters=[ + inst.ExternParameter("destination", True, inst.ExternParameterType.from_variable_length_vector(inst.ScalarType.Real)), + inst.ExternParameter("source", False, inst.ExternParameterType.from_variable_length_vector(inst.ScalarType.Real)), + inst.ExternParameter("sub_region_size", False, inst.ExternParameterType.from_scalar(inst.ScalarType.Integer)), + inst.ExternParameter("seed", True, inst.ExternParameterType.from_scalar(inst.ScalarType.Integer)), + ], + return_type=None + ).to_quil() + ) + ] + return {name: Pragma("EXTERN", [name], signature) for name, signature in signatures} diff --git a/pyquil/_qpu/_randomized_compiling.py b/pyquil/_qpu/_randomized_compiling.py new file mode 100644 index 000000000..d67194117 --- /dev/null +++ b/pyquil/_qpu/_randomized_compiling.py @@ -0,0 +1,1402 @@ +"""Test utilities for randomized compilation of two-qubit cycles. + +The test utilities here are built specifically for random compilation with the +ZXZXZ unitary decomposition using the "merge_zxzxz_unitary_with_paulis" suite +of extern functions. + +There are two tests of import here (everything else is a utility for these tests): + +* `test_randomized_compilation_flat`: Test randomized compilation on randomly generated mirror circuit. +* `test_randomized_compilation_looped_cases`: Test randomized compilation on a repeat base cycle within a loop. +""" + +import math +from abc import ABC, abstractmethod +from collections.abc import Generator, Mapping, Sequence +from dataclasses import dataclass, field +from enum import Enum +from functools import cached_property +from typing import Self, cast + +import numpy as np +from numpy.typing import NDArray +from qcs_sdk.qpu.experimental.random import PrngSeedValue, choose_random_real_sub_region_indices +from quil import instructions as inst + +from pyquil.quil import InstructionDesignator, Program +from pyquil.quilatom import Qubit +from pyquil.quilbase import ( + Call, + ClassicalAdd, + ClassicalGreaterEqual, + ClassicalLoad, + ClassicalMove, + ClassicalShiftRight, + Declare, + Delay, + Expression, + Fence, + Jump, + JumpTarget, + JumpUnless, + JumpWhen, + Label, + MemoryReference, +) +from pyquil.simulation import matrices + +from ._extern_call import build_extern_function_signatures + +_BITS_PER_VALUE = 48 +_BITS_PER_PAULI = 2 +_PAULIS_PER_VALUE = _BITS_PER_VALUE // _BITS_PER_PAULI +_ANGLES_PER_UNITARY = 3 +_NUMBER_PAULI_PAIRS = 16 + + +_TEdge = tuple[int, int] + + +@dataclass(frozen=True, kw_only=True) +class _TwoQubitCycle: + data: dict[int, _TEdge] = field(default_factory=dict) + + def add_edge(self, edge: _TEdge): + if edge[0] in self.data or edge[1] in self.data: + raise ValueError(f"edge {edge} overlaps with existing edges in cycle") + self.data[edge[0]] = edge + self.data[edge[1]] = edge + + def __getitem__(self, node: int) -> _TEdge: + return self.data[node] + + def __contains__(self, node: int) -> bool: + return node in self.data + + def __len__(self) -> int: + return len(self.data) // 2 + + @classmethod + def from_edges(cls, edges: Sequence[_TEdge]) -> "_TwoQubitCycle": + cycle = cls() + for edge in edges: + cycle.add_edge(edge) + return cycle + + +def _generate_lfsr_v1_sequence(seed_value: int, start_index: int, count: int) -> list[int]: + """Generate a sequence of values from the LFSR v1 PRNG given an initial seed value, a start index, and a count.""" + sequence = [] + current_value = seed_value + for i in range(start_index + count): + if i >= start_index: + sequence.append(current_value) + current_value = _lfsr_v1_next(current_value) + return sequence + + +@dataclass(frozen=True, kw_only=True) +class PauliPairKey: + qubit: int + layer_index: int + + +@dataclass(frozen=True, kw_only=True) +class _FinalPauliSeedAndPairCache: + """Cache for final Pauli seeds and pairs per qubit and layer. + + Each layer beyond the first of the circuit requires knowledge of the previous + layer's Pauli pair in order to determine the conjugate. + """ + + prng_sequence_step_length: int + original_seeds: Mapping[int, Sequence[int]] + pauli_conjugates_map: Mapping[tuple["PauliLiteral", "PauliLiteral"], tuple["PauliLiteral", "PauliLiteral"]] + cycles: tuple[_TwoQubitCycle, ...] + qubits_sorted: tuple[int, ...] + invert_random_paulis: bool + pauli_pairs: dict[PauliPairKey, tuple["PauliLiteral", "PauliLiteral"]] = field(default_factory=dict, init=False) + + def accumulate( + self, sequence_count: int + ) -> "dict[PauliPairKey, tuple[int | None, tuple[PauliLiteral, PauliLiteral]]]": + current = self + pauli_pairs = {} + for sequence_index in range(sequence_count): + for qubit in self.qubits_sorted: + for layer_index in range(len(self.cycles) + 1): + key = PauliPairKey(qubit=qubit, layer_index=layer_index) + current_seed, pauli_pair = current[key] + if key in pauli_pairs: + _, previous_pauli_pair = pauli_pairs[key] + _, previous_pauli = pauli_pair[0] * previous_pauli_pair[0] + _, next_pauli = previous_pauli_pair[1] * pauli_pair[1] + pauli_pair = (previous_pauli, next_pauli) + pauli_pairs[key] = (current_seed, pauli_pair) + if sequence_index < sequence_count - 1: + current = next(current) + return pauli_pairs + + def __next__(self) -> Self: + return _FinalPauliSeedAndPairCache( + prng_sequence_step_length=self.prng_sequence_step_length, + original_seeds=self._final_seeds, + pauli_conjugates_map=self.pauli_conjugates_map, + cycles=self.cycles, + qubits_sorted=self.qubits_sorted, + invert_random_paulis=self.invert_random_paulis, + ) + + @cached_property + def _final_seeds(self) -> dict[int, tuple[int, ...]]: + final_seeds = {} + for qubit in self.qubits_sorted: + seeds = self.original_seeds[qubit] + final_seeds[qubit] = tuple( + _generate_lfsr_v1_sequence(seed, start_index=self.prng_sequence_step_length, count=1)[0] + for seed in seeds + ) + return final_seeds + + def _get_random_pauli_for_seed_value(self, seed_value: int, layer_index: int) -> "PauliLiteral": + pauli_index = layer_index % _PAULIS_PER_VALUE + return PauliLiteral(seed_value >> (2 * pauli_index) & 0b11) + + def _get_previous_random_pauli(self, key: PauliPairKey) -> "PauliLiteral": + if not self.invert_random_paulis: + return PauliLiteral.I + q, layer_index = key.qubit, key.layer_index + previous_layer_index = layer_index - 1 + previous_cycle = self.cycles[previous_layer_index] if previous_layer_index >= 0 else None + if previous_cycle is None: + previous_conjugate = PauliLiteral.I + elif q in previous_cycle.data: + previous_edge = previous_cycle.data[q] + previous_left_key = PauliPairKey(qubit=previous_edge[0], layer_index=previous_layer_index) + previous_right_key = PauliPairKey(qubit=previous_edge[1], layer_index=previous_layer_index) + _, previous_pauli_pair_left = self[previous_left_key] + _, previous_pauli_pair_right = self[previous_right_key] + conjugate = self.pauli_conjugates_map[(previous_pauli_pair_left[1], previous_pauli_pair_right[1])] + is_pauli_left = q == previous_edge[0] + previous_conjugate = conjugate[0] if is_pauli_left else conjugate[1] + else: + previous_key = PauliPairKey(qubit=q, layer_index=previous_layer_index) + _, previous_pauli_pair = self[previous_key] + previous_conjugate = previous_pauli_pair[1] + + return previous_conjugate + + def __getitem__(self, key: PauliPairKey) -> tuple[int | None, tuple["PauliLiteral", "PauliLiteral"]]: + q, layer_index = key.qubit, key.layer_index + if layer_index == len(self.cycles): + # there is no random Pauli to apply! + if key not in self.pauli_pairs: + next_pauli = PauliLiteral.I + previous_conjugate = self._get_previous_random_pauli(key) + self.pauli_pairs[key] = (previous_conjugate, next_pauli) + return None, self.pauli_pairs[key] + seed_index = layer_index // _PAULIS_PER_VALUE + seed_value = self._final_seeds[q][seed_index] + if key not in self.pauli_pairs: + next_pauli = self._get_random_pauli_for_seed_value(seed_value, layer_index) + previous_conjugate = self._get_previous_random_pauli(key) + self.pauli_pairs[key] = (previous_conjugate, next_pauli) + pauli_pair = self.pauli_pairs[key] + return seed_value, pauli_pair + + +def _radians_to_cycles(region_name: str, index: int) -> Expression: + return MemoryReference(region_name, index) * 2 * math.pi + + +_MAX_SEQUENCER_VALUE = (1 << _BITS_PER_VALUE) - 1 +_TAPS = (47, 46, 20, 19) + + +def _lfsr_v1_next(seed: int) -> int: + feedback_value = 0 + for tap in _TAPS: + base = 1 << tap + bit = int((seed & base) != 0) + feedback_value ^= bit + return ((seed << 1) & _MAX_SEQUENCER_VALUE) | feedback_value + + +def _pauli_conjugates_map_str_to_literals( + pauli_conjugates_map_str: Mapping[str, str], +) -> dict[tuple["PauliLiteral", "PauliLiteral"], tuple["PauliLiteral", "PauliLiteral"]]: + pauli_conjugates_map = {} + for previous_str, next_str in pauli_conjugates_map_str.items(): + previous_paulis = tuple(PauliLiteral.from_name(c) for c in previous_str) + next_paulis = tuple(PauliLiteral.from_name(c) for c in next_str) + if len(previous_paulis) != 2 or len(next_paulis) != 2: + raise ValueError(f"invalid pauli pair strings: {previous_str}, {next_str}") + pauli_conjugates_map[previous_paulis] = next_paulis + return pauli_conjugates_map + + +PAULI_CONJUGATES_MAPS = { + "CZ": _pauli_conjugates_map_str_to_literals( + { + "II": "II", + "IX": "ZX", + "IY": "ZY", + "IZ": "IZ", + "XI": "XZ", + "XX": "YY", + "XY": "YX", + "XZ": "XI", + "YI": "YZ", + "YX": "XY", + "YY": "XX", + "YZ": "YI", + "ZI": "ZI", + "ZX": "IX", + "ZY": "IY", + "ZZ": "ZZ", + } + ), + "ISWAP": _pauli_conjugates_map_str_to_literals( + { + "II": "II", + "IX": "YZ", + "IY": "XZ", + "IZ": "ZI", + "XI": "ZY", + "XX": "XX", + "XY": "YX", + "XZ": "IY", + "YI": "ZX", + "YX": "XY", + "YY": "YY", + "YZ": "IX", + "ZI": "IZ", + "ZX": "YI", + "ZY": "XI", + "ZZ": "ZZ", + } + ), +} + + +def build_memory_values_for_paulis_conjugates_map( + pauli_conjugates_map: Mapping[tuple["PauliLiteral", "PauliLiteral"], tuple["PauliLiteral", "PauliLiteral"]], +) -> list[int | float]: + """Build a map from each Pauli pair to its conjugate under the specified two-qubit gate. + + This essentially translates `PAULI_CONJUGATES_MAPS` from a map of string to string to a map + of int to int, which can be used as a Quil memory reference for conjugation lookup on the QPU. + """ + memory_values: list[int | None] = [None] * _NUMBER_PAULI_PAIRS + for previous_paulis, next_paulis in pauli_conjugates_map.items(): + previous_pauli_index = _pauli_pair_to_int(previous_paulis) + next_pauli_index = _pauli_pair_to_int(next_paulis) + memory_values[previous_pauli_index] = next_pauli_index + return cast(list[int | float], pauli_conjugates_map) + + +def _pauli_pair_to_int(pauli_pair: tuple["PauliLiteral", "PauliLiteral"]) -> int: + return (pauli_pair[0].value << _BITS_PER_PAULI) + pauli_pair[1].value + + +def _unitary_equal(A: NDArray[np.complex128], B: NDArray[np.complex128]) -> bool: + """Check if two matrices are unitarily equal.""" + if A.shape != B.shape: + return False + dim = A.shape[0] + return np.isclose(np.abs(np.trace(A.T.conjugate() @ B) / dim), 1.0).item() + + +@dataclass(frozen=True, kw_only=True) +class ShotsPerRandomizationVariables: + pulse_program_label: str = "pulse_program" + randomization_label: str = "rc_main" + modulo_counter: str = "modulo_counter" + is_mod_zero: str = "is_mod_zero" + + +@dataclass(frozen=True, kw_only=True) +class ShotsPerRandomization: + """Configuration for randomizing angles every N shots. + + We test this specific circuit construction in order to verify that we use + randomized compilation with active reset without incurring the overhead of + randomizing every shot. + """ + + shots_per_randomization: int + secondary_delay_seconds: float | None = 2e-4 + variables: ShotsPerRandomizationVariables = field(default_factory=ShotsPerRandomizationVariables) + + @property + def pulse_program_label(self) -> InstructionDesignator: + return JumpTarget(Label(self.variables.pulse_program_label)) + + def generate_mod_shot_count_block(self, qubits_sorted: Sequence[int]) -> tuple[InstructionDesignator, ...]: + instructions: list[InstructionDesignator] = [ + ClassicalAdd( + MemoryReference(self.variables.modulo_counter, 0), + 1, + ), + ClassicalGreaterEqual( + MemoryReference(self.variables.is_mod_zero, 0), + MemoryReference(self.variables.modulo_counter, 0), + self.shots_per_randomization, + ), + Call( + "if_then_else_integer", + [ + # destination + inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.modulo_counter, 0)), + # condition + inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.is_mod_zero, 0)), + # true value + inst.CallArgument.from_immediate(complex(0, 0)), + # false value + inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.modulo_counter, 0)), + ], + ), + JumpWhen( + Label(self.variables.randomization_label), + MemoryReference(self.variables.is_mod_zero, 0), + ), + ] + instructions.append(Jump(Label(self.variables.pulse_program_label))) + instructions.append(JumpTarget(Label(self.variables.randomization_label))) + return tuple(instructions) + + +@dataclass(frozen=True, kw_only=True) +class ReadoutRandomizationVariables: + readout_seed_prefix: str = "readout_seed" + source_unitaries_prefix: str = "readout_source_unitaries" + readout_randomization_prefix: str = "readout_randomization" + + def source_unitaries(self, qubit: int) -> str: + return f"{self.source_unitaries_prefix}_q{qubit}" + + def readout_seed(self, qubit: int) -> str: + return f"{self.readout_seed_prefix}_q{qubit}" + + def readout_randomization(self, qubit: int) -> str: + return f"{self.readout_randomization_prefix}_q{qubit}" + + +@dataclass(frozen=True, kw_only=True) +class ReadoutRandomization: + """Configuration for readout randomization on the final layer.""" + + variables: ReadoutRandomizationVariables = field(default_factory=ReadoutRandomizationVariables) + source_unitary_angles: Mapping[int, Sequence[float]] + + def __post_init__(self) -> None: + self._validate() + + def _validate(self) -> None: + for qubit, angles in self.source_unitary_angles.items(): + if len(angles) % _ANGLES_PER_UNITARY != 0: + raise ValueError( + f"source unitary angles for qubit {qubit} must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(angles)}" + ) + + def source_unitary_count(self, qubit: int) -> int: + return len(self.source_unitary_angles[qubit]) // _ANGLES_PER_UNITARY + + +class _ToQuilCallArguments(ABC): + @abstractmethod + def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: ... + + +class PauliLiteral(Enum): + """A literal Pauli known at program construction time.""" + + I = 0 # noqa + X = 1 + Y = 2 + Z = 3 + + @property + def matrix(self) -> NDArray[np.complex128]: + match self: + case PauliLiteral.I: + return matrices.I + case PauliLiteral.X: + return matrices.X + case PauliLiteral.Y: + return matrices.Y + case PauliLiteral.Z: + return matrices.Z + case _: + raise ValueError(f"{self} cannot be cast to matrix") + + @classmethod + def from_name(cls, name: str) -> "PauliLiteral": + match name: + case "I": + return cls.I + case "X": + return cls.X + case "Y": + return cls.Y + case "Z": + return cls.Z + case _: + raise ValueError(f"invalid pauli name: {name}") + + def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: + return (inst.CallArgument.from_immediate(complex(self.value, 0)),) + + def __rmul__(self, other: "PauliLiteral") -> "tuple[complex, PauliLiteral]": + match (self, other): + case (PauliLiteral.I, _): + return 1, other + case (_, PauliLiteral.I): + return 1, self + case (PauliLiteral.X, PauliLiteral.X): + return 1, PauliLiteral.I + case (PauliLiteral.Y, PauliLiteral.Y): + return 1, PauliLiteral.I + case (PauliLiteral.Z, PauliLiteral.Z): + return 1, PauliLiteral.I + case (PauliLiteral.X, PauliLiteral.Y): + return 1j, PauliLiteral.Z + case (PauliLiteral.Y, PauliLiteral.Z): + return 1j, PauliLiteral.X + case (PauliLiteral.Z, PauliLiteral.X): + return 1j, PauliLiteral.Y + case (PauliLiteral.Y, PauliLiteral.X): + return -1j, PauliLiteral.Z + case (PauliLiteral.Z, PauliLiteral.Y): + return -1j, PauliLiteral.X + case (PauliLiteral.X, PauliLiteral.Z): + return -1j, PauliLiteral.Y + case _: + raise ValueError(f"invalid pauli multiplication: {self} * {other}") + + +@dataclass(frozen=True, kw_only=True) +class _PauliReference(_ToQuilCallArguments): + """A Pauli specified by reference to shared memory on the QPU. + + We fit `_PAULIS_PER_VALUE` in a single word of shared memory, so the precise + Pauli within this word is specified by `pauli_index` (the control system will + shift and mask bits to get the two bit Pauli representation). + """ + + memory_reference: inst.MemoryReference + pauli_index: int + + def to_call_arguments(self) -> tuple[inst.CallArgument, inst.CallArgument]: + return ( + inst.CallArgument.from_memory_reference(self.memory_reference), + inst.CallArgument.from_immediate(complex(self.pauli_index, 0)), + ) + + +@dataclass(frozen=True, kw_only=True) +class _PauliConjugate(_ToQuilCallArguments): + """A Pauli specified by conjugation of two other Paulis. + + This is used when a previous cycle applied two random Paulis before the two qubit + gate. We look these random Paulis up by reference and then index into + `pauli_conjugates_map` to get the two qubit conjugation; we then select one of + these Paulis based on `is_left_conjugate`. + """ + + pauli_left: _PauliReference + pauli_right: _PauliReference + is_left_conjugate: bool + pauli_conjugates_map: str = "pauli_conjugates_map" + + def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: + arguments = [] + arguments.extend(self.pauli_left.to_call_arguments()) + arguments.extend(self.pauli_right.to_call_arguments()) + + arguments.append(inst.CallArgument.from_immediate(complex(1 if self.is_left_conjugate else 0, 0))) + arguments.append(inst.CallArgument.from_identifier(self.pauli_conjugates_map)) + return tuple(arguments) + + +@dataclass(frozen=True, kw_only=True) +class _PauliPair: + """A pair of Paulis applied on a specific qubit at a specific layer. + + The pair is read on the control system and used to apply mutations to the + unitary angles for this (qubit, layer_index). + """ + + previous: _PauliReference | PauliLiteral | _PauliConjugate + next: _PauliReference | PauliLiteral + + def build_quil_call_instruction( + self, + destination: inst.CallArgument, + source: inst.CallArgument, + unitary_angle_offset: inst.CallArgument, + ) -> Call: + """Build a Quil Call instruction based on the Pauli pair. + + Each underlying union variant will correspond to a different extern function signature. + """ + arguments = [destination, source, unitary_angle_offset] + arguments.extend(self.next.to_call_arguments()) + arguments.extend(self.previous.to_call_arguments()) + match (self.previous, self.next): + case (PauliLiteral(), PauliLiteral()): + return Call( + "merge_zxzxz_unitary_with_paulis_literal_literal", + arguments, + ) + case (_PauliReference(), PauliLiteral()): + return Call( + "merge_zxzxz_unitary_with_paulis_literal_reference", + arguments, + ) + case (_PauliConjugate(), PauliLiteral()): + return Call( + "merge_zxzxz_unitary_with_paulis_literal_conjugate", + arguments, + ) + case (_PauliReference(), _PauliReference()): + return Call( + "merge_zxzxz_unitary_with_paulis_reference_reference", + arguments, + ) + case (_PauliConjugate(), _PauliReference()): + return Call( + "merge_zxzxz_unitary_with_paulis_reference_conjugate", + arguments, + ) + case (PauliLiteral(), _PauliReference()): + return Call( + "merge_zxzxz_unitary_with_paulis_reference_literal", + arguments, + ) + case _: + raise ValueError(f"invalid pauli pair: {self.previous}, {self.next}") + + +def _rz(phi: float) -> np.ndarray: + return np.array( + [ + [np.cos(phi / 2.0) - 1j * np.sin(phi / 2.0), 0], + [0, np.cos(phi / 2.0) + 1j * np.sin(phi / 2.0)], + ] + ) + + +def _compute_unitary_from_zxzxz_angles(unitary: Sequence[float]) -> NDArray[np.complex128]: + """Compute the unitary matrix from ZXZXZ angles.""" + sx = np.asarray( + [ + [np.sqrt(0.5), -np.sqrt(0.5) * 1j], + [-np.sqrt(0.5) * 1j, np.sqrt(0.5)], + ] + ) + return cast( + NDArray[np.complex128], + _rz(unitary[2] * 2 * np.pi) @ sx @ _rz(unitary[1] * 2 * np.pi) @ sx @ _rz(unitary[0] * 2 * np.pi), + ) + + +def _compute_expected_merged_unitary( + unitary: tuple[float, ...], pauli_pair: tuple[PauliLiteral, PauliLiteral] +) -> NDArray[np.complex128]: + """Compute the expected merged unitary from ZXZXZ angles and a Pauli pair.""" + return pauli_pair[1].matrix @ _compute_unitary_from_zxzxz_angles(unitary) @ pauli_pair[0].matrix + + +@dataclass(frozen=True, kw_only=True) +class RandomizedCompilingVariables: + seed_loop_label: str = "rc_seed_loop" + seed_loop_index: str = "rc_seed_loop_index" + seed_loop_inner_label: str = "rc_seed_loop_inner" + base_cycle_loop_label: str = "rc_base_cycle_loop" + base_cycle_loop_index: str = "rc_base_cycle_loop_index" + unitary_angle_offset: str = "unitary_angle_offset" + loop_break: str = "break" + current_seeds_prefix: str = "current_seeds" + pauli_conjugates_map: str = "pauli_conjugates_map" + unitaries_prefix: str = "unitaries" + twirled_unitaries_prefix: str = "twirled_unitaries" + pauli_seed_prefix: str = "pauli_seed" + + def current_seeds(self, qubit: int) -> str: + return f"{self.current_seeds_prefix}_q{qubit}" + + def source_unitaries(self, qubit: int) -> str: + return f"{self.unitaries_prefix}_q{qubit}" + + def source_unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> inst.MemoryReference: + return inst.MemoryReference(self.source_unitaries(qubit), layer_index * _ANGLES_PER_UNITARY + angle_index) + + def twirled_unitaries(self, qubit: int) -> str: + return f"{self.twirled_unitaries_prefix}_q{qubit}" + + def twirled_unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> inst.MemoryReference: + return inst.MemoryReference(self.twirled_unitaries(qubit), layer_index * _ANGLES_PER_UNITARY + angle_index) + + def pauli_seed(self, qubit: int) -> str: + return f"{self.pauli_seed_prefix}_q{qubit}" + + +@dataclass(frozen=True, kw_only=True) +class RandomSeeds: + randomized_compiling: NDArray[np.int64] + readout: NDArray[np.int64] | None = None + + +@dataclass(frozen=True, kw_only=True) +class RandomizedCompilingConfiguration: + """A test utility for build a randomly compiled program using a loop structure over repeated base cycles.""" + + base_cycles: tuple[tuple[_TEdge, ...], ...] + qubits_sorted: tuple[int, ...] + base_cycle_repetitions: int + variables: RandomizedCompilingVariables = field(default_factory=RandomizedCompilingVariables) + leading_delay_seconds: float = 2e-4 + readout_randomization: ReadoutRandomization | None = None + """Whether to apply readout randomization to the final layer.""" + + shots_per_randomization: ShotsPerRandomization | None = None + """Number of shots per randomization.""" + + invert_random_paulis: bool = True + + def __post_init__(self) -> None: + self._validate() + + def _validate(self) -> None: + if _PAULIS_PER_VALUE % self._base_cycle_count != 0: + raise ValueError( + f"Base cycle length must be a multiple of {_PAULIS_PER_VALUE}, but got {self._base_cycle_count}." + ) + if self.base_cycle_repetitions <= 1: + raise ValueError(f"Base cycle repetitions must be greater than 1, but got {self.base_cycle_repetitions}.") + + @property + def _base_cycle_count(self) -> int: + return len(self.base_cycles) + + @property + def _cycle_count(self) -> int: + return self._base_cycle_count * self.base_cycle_repetitions + + @property + def _seed_length(self) -> int: + return math.ceil(self._base_cycle_count * self.base_cycle_repetitions / _PAULIS_PER_VALUE) + + @property + def _out_of_primary_loop_seed_change_required(self) -> bool: + return self.base_cycle_repetitions % _PAULIS_PER_VALUE == 0 + + @property + def _seed_loop_length(self) -> int: + return self._seed_length - 1 + + @property + def _seed_loop_inner_length(self) -> int: + return int(_PAULIS_PER_VALUE / self._base_cycle_count) - 1 + + @property + def _base_cycle_loop_length(self) -> int: + base_cycles_per_word = int(_PAULIS_PER_VALUE / self._base_cycle_count) + primary_loop_base_cycles = self._seed_loop_length * base_cycles_per_word + # we add 1 below for the final cycle. + return self.base_cycle_repetitions - (primary_loop_base_cycles + 1) + + def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: + declarations: list[Declare] = [] + declarations.append(Declare(self.variables.pauli_conjugates_map, "INTEGER", _NUMBER_PAULI_PAIRS)) + + for q in self.qubits_sorted: + declarations.append(Declare(self.variables.pauli_seed(q), "INTEGER", self._seed_length)) + for q in self.qubits_sorted: + declarations.append( + Declare( + self.variables.twirled_unitaries(q), + "REAL", + (self._cycle_count + 1) * _ANGLES_PER_UNITARY, + ) + ) + + if self.shots_per_randomization is not None: + declarations.extend( + ( + Declare(self.shots_per_randomization.variables.modulo_counter, "INTEGER", 1), + Declare(self.shots_per_randomization.variables.is_mod_zero, "BIT", 1), + ) + ) + if self.readout_randomization is not None: + for q in self.qubits_sorted: + declarations.append(Declare(self.readout_randomization.variables.readout_seed(q), "INTEGER", 1)) + declarations.append( + Declare( + self.readout_randomization.variables.source_unitaries(q), + "REAL", + len(self.readout_randomization.source_unitary_angles[q]), + ) + ) + declarations.append(Declare(self.readout_randomization.variables.readout_randomization(q), "REAL", 3)) + + declarations.extend( + ( + Declare(self.variables.unitary_angle_offset, "INTEGER", 1), + Declare(self.variables.loop_break, "BIT", 1), + ) + ) + if self._seed_loop_length > 0: + declarations.extend( + [ + Declare(self.variables.seed_loop_index, "INTEGER", 2), + ] + ) + if self._base_cycle_loop_length > 0 or self._seed_loop_inner_length > 0: + declarations.extend( + [ + Declare(self.variables.base_cycle_loop_index, "INTEGER", 1), + ] + ) + current_seed_length = 2 if self._seed_loop_length > 0 else 1 + for q in self.qubits_sorted: + declarations.append(Declare(self.variables.current_seeds(q), "INTEGER", current_seed_length)) + return tuple(declarations) + + def generate_seed_values(self, rng: np.random.Generator) -> RandomSeeds: + size = (len(self.qubits_sorted), self._seed_length) + randomized_compiling_seeds = rng.integers(-(2**47), 2**47 - 1, size=size, dtype=np.int64) + readout_seeds = None + if self.readout_randomization is not None: + readout_seeds = rng.integers(-(2**47), 2**47 - 1, size=(len(self.qubits_sorted), 1), dtype=np.int64) + return RandomSeeds(randomized_compiling=randomized_compiling_seeds, readout=readout_seeds) + + def build_memory_map( + self, + random_seeds: RandomSeeds, + pauli_conjugates_map: list[int | float], + ) -> dict[str, list[int | float]]: + memory_map: dict[str, list[int | float]] = { + self.variables.unitary_angle_offset: [_ANGLES_PER_UNITARY], + self.variables.loop_break: [0], + } + if self._seed_loop_length > 0: + memory_map[self.variables.seed_loop_index] = [0, 1] + if self._base_cycle_loop_length > 0 or self._seed_loop_inner_length > 0: + memory_map[self.variables.base_cycle_loop_index] = [0] + + memory_map[self.variables.pauli_conjugates_map] = pauli_conjugates_map + for qubit_index, q in enumerate(self.qubits_sorted): + memory_map[self.variables.pauli_seed(q)] = random_seeds.randomized_compiling[qubit_index].tolist() + memory_map[self.variables.twirled_unitaries(q)] = np.zeros( + ((self._cycle_count + 1) * _ANGLES_PER_UNITARY,), dtype=float + ).tolist() + + current_seed_length = 2 if self._seed_loop_length > 0 else 1 + for q in self.qubits_sorted: + memory_map[self.variables.current_seeds(q)] = [0] * current_seed_length + + if self.shots_per_randomization is not None: + memory_map[self.shots_per_randomization.variables.modulo_counter] = [-1] + memory_map[self.shots_per_randomization.variables.is_mod_zero] = [1] + + if self.readout_randomization is not None: + if random_seeds.readout is None: + raise ValueError("readout seeds must be provided if readout randomization variables are specified") + for qubit_index, q in enumerate(self.qubits_sorted): + memory_map[self.readout_randomization.variables.readout_seed(q)] = [ + int(random_seeds.readout[qubit_index]) + ] + memory_map[self.readout_randomization.variables.readout_randomization(q)] = [0] * _ANGLES_PER_UNITARY + memory_map[self.readout_randomization.variables.source_unitaries(q)] = list( + self.readout_randomization.source_unitary_angles[q] + ) + return memory_map + + def _build_two_qubit_base_cycles(self) -> tuple[_TwoQubitCycle, ...]: + return tuple(_TwoQubitCycle.from_edges(cycle) for cycle in self.base_cycles) + + def _build_quil_instructions_for_cycle(self) -> list[InstructionDesignator]: + pauli_pairs = [] + for cycle in self._build_two_qubit_base_cycles(): + cycle_pauli_pairs = [] + for q in cycle.data.keys(): + edge = cycle[q] + if self.invert_random_paulis: + pauli_left = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), pauli_index=0 + ) + pauli_right = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), pauli_index=0 + ) + is_pauli_left = q == edge[0] + previous = _PauliConjugate( + pauli_left=pauli_left, + pauli_right=pauli_right, + is_left_conjugate=is_pauli_left, + ) + else: + previous = PauliLiteral.I + cycle_pauli_pairs.append( + ( + q, + _PauliPair( + previous=previous, + next=_PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 0), pauli_index=1 + ), + ), + ) + ) + for qubit in self.qubits_sorted: + if qubit not in cycle: + if self.invert_random_paulis: + previous = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), + pauli_index=0, + ) + else: + previous = PauliLiteral.I + cycle_pauli_pairs.append( + ( + qubit, + _PauliPair( + previous=previous, + next=_PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), + pauli_index=1, + ), + ), + ) + ) + pauli_pairs.append(cycle_pauli_pairs) + + instructions: list[InstructionDesignator] = [] + for cycle_pauli_pairs in pauli_pairs: + instructions.extend( + pauli_pair.build_quil_call_instruction( + inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), + inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), + inst.CallArgument.from_memory_reference( + inst.MemoryReference(self.variables.unitary_angle_offset, 0) + ), + ) + for q, pauli_pair in cycle_pauli_pairs + ) + instructions.append( + ClassicalAdd( + MemoryReference(self.variables.unitary_angle_offset, 0), + _ANGLES_PER_UNITARY, + ), + ) + for q in self.qubits_sorted: + instructions.append( + ClassicalShiftRight( + MemoryReference(self.variables.current_seeds(q), 0), + _BITS_PER_PAULI, + ) + ) + + return instructions + + def _build_quil_instructions_for_seed_transition(self) -> list[InstructionDesignator]: + pauli_pairs = [] + for cycle_index, cycle in enumerate(self._build_two_qubit_base_cycles()): + cycle_pauli_pairs = [] + is_final_cycle = cycle_index == self._base_cycle_count - 1 + for q in cycle.data.keys(): + edge = cycle[q] + if self.invert_random_paulis: + pauli_left = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), pauli_index=0 + ) + pauli_right = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), pauli_index=0 + ) + is_pauli_left = q == edge[0] + previous = _PauliConjugate( + pauli_left=pauli_left, + pauli_right=pauli_right, + is_left_conjugate=is_pauli_left, + ) + else: + previous = PauliLiteral.I + if is_final_cycle: + next_pauli = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 1), pauli_index=0 + ) + else: + next_pauli = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 0), pauli_index=1 + ) + cycle_pauli_pairs.append( + ( + q, + _PauliPair( + previous=previous, + next=next_pauli, + ), + ) + ) + for qubit in self.qubits_sorted: + if qubit not in cycle: + if is_final_cycle: + next_pauli = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 1), pauli_index=0 + ) + else: + next_pauli = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), pauli_index=1 + ) + if self.invert_random_paulis: + previous = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), + pauli_index=0, + ) + else: + previous = PauliLiteral.I + cycle_pauli_pairs.append( + ( + qubit, + _PauliPair( + previous=previous, + next=next_pauli, + ), + ) + ) + pauli_pairs.append(cycle_pauli_pairs) + + instructions: list[InstructionDesignator] = [] + for cycle_index, cycle_pauli_pairs in enumerate(pauli_pairs): + is_final_cycle = cycle_index == self._base_cycle_count - 1 + instructions.extend( + pauli_pair.build_quil_call_instruction( + inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), + inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), + inst.CallArgument.from_memory_reference( + inst.MemoryReference(self.variables.unitary_angle_offset, 0) + ), + ) + for q, pauli_pair in cycle_pauli_pairs + ) + instructions.append( + ClassicalAdd(MemoryReference(self.variables.unitary_angle_offset, 0), _ANGLES_PER_UNITARY) + ) + if not is_final_cycle: + for q in self.qubits_sorted: + instructions.append( + ClassicalShiftRight( + MemoryReference(self.variables.current_seeds(q), 0), + _BITS_PER_PAULI, + ) + ) + + return instructions + + def _build_quil_instructions_for_final_base_cycle(self) -> list[InstructionDesignator]: + pauli_pairs = [] + for cycle_index, cycle in enumerate(self._build_two_qubit_base_cycles()): + cycle_pauli_pairs = [] + is_final_cycle = cycle_index == self._base_cycle_count - 1 + for q in cycle.data.keys(): + edge = cycle[q] + if self.invert_random_paulis: + pauli_left = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), + pauli_index=cycle_index, + ) + pauli_right = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), + pauli_index=cycle_index, + ) + is_pauli_left = q == edge[0] + previous = _PauliConjugate( + pauli_left=pauli_left, + pauli_right=pauli_right, + is_left_conjugate=is_pauli_left, + ) + else: + previous = PauliLiteral.I + if is_final_cycle: + pauli_next = PauliLiteral.I + else: + pauli_next = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 0), + pauli_index=cycle_index + 1, + ) + cycle_pauli_pairs.append( + ( + q, + _PauliPair( + previous=previous, + next=pauli_next, + ), + ) + ) + for qubit in self.qubits_sorted: + if qubit not in cycle: + if is_final_cycle: + pauli_next = PauliLiteral.I + else: + pauli_next = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), + pauli_index=cycle_index + 1, + ) + if self.invert_random_paulis: + previous = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), + pauli_index=cycle_index, + ) + else: + previous = PauliLiteral.I + cycle_pauli_pairs.append( + ( + qubit, + _PauliPair( + previous=previous, + next=pauli_next, + ), + ) + ) + pauli_pairs.append(cycle_pauli_pairs) + + instructions: list[InstructionDesignator] = [] + for cycle_index, cycle_pauli_pairs in enumerate(pauli_pairs): + global_cycle_index = (self._cycle_count + 1) - self._base_cycle_count + cycle_index + + source = self.variables.source_unitaries(q) + if cycle_index == len(pauli_pairs) - 1 and self.readout_randomization is not None: + instructions.append( + Call( + "choose_random_real_sub_regions", + [ + inst.CallArgument.from_identifier( + self.readout_randomization.variables.readout_randomization(q) + ), + inst.CallArgument.from_identifier(self.readout_randomization.variables.source_unitaries(q)), + inst.CallArgument.from_immediate(complex(_ANGLES_PER_UNITARY, 0)), + inst.CallArgument.from_memory_reference( + inst.MemoryReference(self.readout_randomization.variables.readout_seed(q), 0) + ), + ], + ) + ) + for i in range(_ANGLES_PER_UNITARY): + instructions.append( + ClassicalMove( + MemoryReference( + self.variables.twirled_unitaries(q), global_cycle_index * _ANGLES_PER_UNITARY + i + ), + MemoryReference(self.readout_randomization.variables.readout_randomization(q), i), + ) + ) + source = self.variables.twirled_unitaries(q) + + instructions.extend( + pauli_pair.build_quil_call_instruction( + inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), + inst.CallArgument.from_identifier(source), + inst.CallArgument.from_immediate(complex(global_cycle_index * _ANGLES_PER_UNITARY, 0)), + ) + for q, pauli_pair in cycle_pauli_pairs + ) + + return instructions + + def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[InstructionDesignator]: + instructions: list[InstructionDesignator] = list(self._generate_declarations()) + for q in self.qubits_sorted: + for i in range(self._seed_length): + instructions.append( + Call( + "prng_set_seed_and_step", + [ + inst.CallArgument.from_memory_reference( + inst.MemoryReference(self.variables.pauli_seed(q), i) + ), + inst.CallArgument.from_memory_reference( + inst.MemoryReference(self.variables.pauli_seed(q), i) + ), + ], + ) + ) + for q in self.qubits_sorted: + pauli_pair = _PauliPair( + previous=PauliLiteral.I, + next=_PauliReference( + memory_reference=inst.MemoryReference(self.variables.pauli_seed(q), 0), pauli_index=0 + ), + ) + instructions.append( + pauli_pair.build_quil_call_instruction( + inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), + inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), + inst.CallArgument.from_immediate(complex(0, 0)), + ) + ) + instructions.append( + ClassicalMove( + MemoryReference(self.variables.unitary_angle_offset, 0), + _ANGLES_PER_UNITARY, + ) + ) + + if self._seed_loop_length >= 1: + instructions.extend( + [ + ClassicalMove(MemoryReference(self.variables.seed_loop_index, 0), 0), + ClassicalMove( + MemoryReference(self.variables.seed_loop_index, 1), + 1, + ), + JumpTarget(Label(self.variables.seed_loop_label)), + ], + ) + if self._seed_loop_inner_length >= 1: + instructions.append( + ClassicalMove( + MemoryReference(self.variables.base_cycle_loop_index, 0), + 0, + ) + ) + for q in self.qubits_sorted: + instructions.append( + ClassicalLoad( + MemoryReference(self.variables.current_seeds(q), 0), + self.variables.pauli_seed(q), + MemoryReference(self.variables.seed_loop_index, 0), + ) + ) + if self._seed_length > 1: + instructions.append( + ClassicalLoad( + MemoryReference(self.variables.current_seeds(q), 1), + self.variables.pauli_seed(q), + MemoryReference(self.variables.seed_loop_index, 1), + ) + ) + if self._seed_loop_inner_length >= 1: + instructions.append(JumpTarget(Label(self.variables.seed_loop_inner_label))) + instructions.extend(self._build_quil_instructions_for_cycle()) + instructions.extend( + [ + ClassicalAdd( + MemoryReference(self.variables.base_cycle_loop_index, 0), + 1, + ), + ClassicalGreaterEqual( + MemoryReference(self.variables.loop_break, 0), + MemoryReference(self.variables.base_cycle_loop_index, 0), + self._seed_loop_inner_length, + ), + JumpUnless( + Label(self.variables.seed_loop_inner_label), + MemoryReference(self.variables.loop_break, 0), + ), + ] + ) + instructions.extend(self._build_quil_instructions_for_seed_transition()) + instructions.extend( + [ + ClassicalAdd( + MemoryReference(self.variables.seed_loop_index, 0), + 1, + ), + ClassicalAdd( + MemoryReference(self.variables.seed_loop_index, 1), + 1, + ), + ClassicalGreaterEqual( + MemoryReference(self.variables.loop_break, 0), + MemoryReference(self.variables.seed_loop_index, 0), + self._seed_loop_length, + ), + JumpUnless( + Label(self.variables.seed_loop_label), + MemoryReference(self.variables.loop_break, 0), + ), + ] + ) + for q in self.qubits_sorted: + instructions.append( + ClassicalMove( + MemoryReference(self.variables.current_seeds(q), 0), + MemoryReference(self.variables.current_seeds(q), 1), + ), + ) + elif self._base_cycle_loop_length >= 1: + for q in self.qubits_sorted: + instructions.append( + ClassicalMove( + MemoryReference(self.variables.current_seeds(q), 0), + MemoryReference(self.variables.pauli_seed(q), 0), + ), + ) + + if self._base_cycle_loop_length >= 1: + instructions.extend( + [ + ClassicalMove( + MemoryReference(self.variables.base_cycle_loop_index, 0), + 0, + ), + JumpTarget(Label(self.variables.base_cycle_loop_label)), + ] + ) + instructions.extend(self._build_quil_instructions_for_cycle()) + instructions.extend( + [ + ClassicalAdd( + MemoryReference(self.variables.base_cycle_loop_index, 0), + 1, + ), + ClassicalGreaterEqual( + MemoryReference(self.variables.loop_break, 0), + MemoryReference(self.variables.base_cycle_loop_index, 0), + self._base_cycle_loop_length, + ), + JumpUnless( + Label(self.variables.base_cycle_loop_label), + MemoryReference(self.variables.loop_break, 0), + ), + ] + ) + + instructions.extend(self._build_quil_instructions_for_final_base_cycle()) + + return instructions + + def build_quil_program( + self, + ) -> Program: + """Generate a cycle program with randomized compilation according to the specified configuration.""" + program = Program() + program += list(build_extern_function_signatures().values()) + program += self._generate_declarations() + + if self.shots_per_randomization is not None: + program += self.shots_per_randomization.generate_mod_shot_count_block(self.qubits_sorted) + + for q in self.qubits_sorted: + program += Delay([], [q], self.leading_delay_seconds) + + program += self._build_quil_instructions_for_randomized_compiling_loop() + + if self.shots_per_randomization is not None: + program += self.shots_per_randomization.pulse_program_label + if self.shots_per_randomization.secondary_delay_seconds is not None: + for q in self.qubits_sorted: + program += Delay([], [q], self.shots_per_randomization.secondary_delay_seconds) + else: + program += Fence([Qubit(q) for q in self.qubits_sorted]) + + return program + + def verify_final_memory( + self, + final_memory: dict[str, list[int] | list[float]], + original_memory: dict[str, list[int] | list[float]], + shot_count: int, + pauli_conjugates_map: Mapping[tuple[PauliLiteral, PauliLiteral], tuple[PauliLiteral, PauliLiteral]], + ): + """Verify that the final memory state matches expectations. + + Specifically, we take the Pauli seeds specified in the original memory map and + generate the expected final random value using `generate_lfsr_v1_sequence` and + the shot count. We then use this final seed to infer the pair of Paulis merged + for each qubit at every layer. We can then apply this Pauli pair to the original + unitaries specified for the (qubit, layer) and verify that the resulting unitary + is equal to the twirled unitaries read from the final memory for the (qubit, layer). + """ + cycles = self._build_two_qubit_base_cycles() + if self.shots_per_randomization is not None: + prng_sequence_length = shot_count // self.shots_per_randomization.shots_per_randomization + else: + prng_sequence_length = shot_count + + if self.variables.unitaries_prefix == self.variables.twirled_unitaries_prefix: + prng_sequence_step_length = 1 + prng_sequence_step_count = prng_sequence_length + else: + prng_sequence_step_length = prng_sequence_length + prng_sequence_step_count = 1 + pauli_cache = _FinalPauliSeedAndPairCache( + original_seeds={ + q: cast(list[int], original_memory[self.variables.pauli_seed(q)]) for q in self.qubits_sorted + }, + pauli_conjugates_map=pauli_conjugates_map, + cycles=cycles, + qubits_sorted=self.qubits_sorted, + prng_sequence_step_length=prng_sequence_step_length, + invert_random_paulis=self.invert_random_paulis, + ) + pauli_pairs = pauli_cache.accumulate(prng_sequence_step_count) + + for q in self.qubits_sorted: + for layer_index in range(len(cycles) + 1): + seed_index = layer_index // _PAULIS_PER_VALUE + key = PauliPairKey( + qubit=q, + layer_index=layer_index, + ) + expected_final_seed_value, final_pauli_pair = pauli_pairs[key] + found_final_pauli_seed = final_memory[self.variables.pauli_seed(q)][seed_index] + if found_final_pauli_seed != expected_final_seed_value: + raise ValueError( + f"final seed value mismatch for q{q}, l{layer_index}: got " + f"{found_final_pauli_seed}, expected {expected_final_seed_value}" + ) + start_angle = layer_index * _ANGLES_PER_UNITARY + end_angle = start_angle + _ANGLES_PER_UNITARY + found_final_unitary_angles = tuple( + final_memory[self.variables.twirled_unitaries(q)][start_angle:end_angle] + ) + found_final_unitary = _compute_unitary_from_zxzxz_angles(found_final_unitary_angles) + + if self.readout_randomization is not None and layer_index == len(cycles): + source_unitary_angles = tuple( + int(angle) + for angle in original_memory[self.readout_randomization.variables.source_unitaries(q)] + ) + if len(source_unitary_angles) % _ANGLES_PER_UNITARY != 0: + raise ValueError( + f"source unitary angle count must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(source_unitary_angles)}" + ) + sub_region_count = len(source_unitary_angles) // _ANGLES_PER_UNITARY + seed_value = int(original_memory[self.readout_randomization.variables.readout_seed(q)][0]) + # FIXME: should this be shot_count or shot_count - 1? + final_index = choose_random_real_sub_region_indices( + PrngSeedValue(seed_value), shot_count - 1, 1, sub_region_count + )[0] + start_index = final_index * _ANGLES_PER_UNITARY + source_unitary_angles = source_unitary_angles[start_index : start_index + _ANGLES_PER_UNITARY] + else: + source_unitary_angles = tuple( + original_memory[self.variables.source_unitaries(q)][start_angle:end_angle] + ) + expected_unitary = _compute_expected_merged_unitary(source_unitary_angles, final_pauli_pair) + if not _unitary_equal(found_final_unitary, expected_unitary): + raise ValueError( + f"unitary mismatch for q{q} layer {layer_index}: got {found_final_unitary_angles}, " + f"expected {source_unitary_angles}, pauli pair: {final_pauli_pair}" + ) + + def track_pauli_frames( + self, + sequence_count: int, + pauli_conjugates_map: Mapping[tuple[PauliLiteral, PauliLiteral], tuple[PauliLiteral, PauliLiteral]], + ) -> Generator[dict[PauliPairKey, tuple[int | None, tuple[PauliLiteral, PauliLiteral]]], None, None]: + pauli_cache = _FinalPauliSeedAndPairCache( + original_seeds={q: [0] * self._seed_length for q in self.qubits_sorted}, + pauli_conjugates_map=pauli_conjugates_map, + cycles=self._build_two_qubit_base_cycles(), + qubits_sorted=self.qubits_sorted, + prng_sequence_step_length=1, + invert_random_paulis=self.invert_random_paulis, + ) + for sequence_index in range(sequence_count): + pauli_pairs = pauli_cache.accumulate(1) + yield pauli_pairs + if sequence_index == sequence_count - 1: + pauli_cache = next(pauli_cache) From 5d2899457545951aa6031d041871a7f04ff8eda6 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 9 Jun 2026 14:12:00 -0700 Subject: [PATCH 13/59] refactor: use simulation matrices to verify final memory --- pyquil/_qpu/_randomized_compiling.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/pyquil/_qpu/_randomized_compiling.py b/pyquil/_qpu/_randomized_compiling.py index d67194117..8cc8b756d 100644 --- a/pyquil/_qpu/_randomized_compiling.py +++ b/pyquil/_qpu/_randomized_compiling.py @@ -578,26 +578,12 @@ def build_quil_call_instruction( raise ValueError(f"invalid pauli pair: {self.previous}, {self.next}") -def _rz(phi: float) -> np.ndarray: - return np.array( - [ - [np.cos(phi / 2.0) - 1j * np.sin(phi / 2.0), 0], - [0, np.cos(phi / 2.0) + 1j * np.sin(phi / 2.0)], - ] - ) - - def _compute_unitary_from_zxzxz_angles(unitary: Sequence[float]) -> NDArray[np.complex128]: """Compute the unitary matrix from ZXZXZ angles.""" - sx = np.asarray( - [ - [np.sqrt(0.5), -np.sqrt(0.5) * 1j], - [-np.sqrt(0.5) * 1j, np.sqrt(0.5)], - ] - ) + sx = matrices.RX(np.pi / 2) return cast( NDArray[np.complex128], - _rz(unitary[2] * 2 * np.pi) @ sx @ _rz(unitary[1] * 2 * np.pi) @ sx @ _rz(unitary[0] * 2 * np.pi), + matrices.RZ(unitary[2] * 2 * np.pi) @ sx @ matrices.RZ(unitary[1] * 2 * np.pi) @ sx @ matrices.RZ(unitary[0] * 2 * np.pi), ) From 12833973ad07b92a9fe04353d8d63be2a24edbb8 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 9 Jun 2026 18:32:29 -0700 Subject: [PATCH 14/59] test: test randomized compiling --- pyquil/_qpu/_randomized_compiling.py | 163 +++++++++++---------- test/unit/test_qpu_randomized_compiling.py | 108 ++++++++++++++ 2 files changed, 192 insertions(+), 79 deletions(-) create mode 100644 test/unit/test_qpu_randomized_compiling.py diff --git a/pyquil/_qpu/_randomized_compiling.py b/pyquil/_qpu/_randomized_compiling.py index 8cc8b756d..194dd7e4c 100644 --- a/pyquil/_qpu/_randomized_compiling.py +++ b/pyquil/_qpu/_randomized_compiling.py @@ -102,7 +102,7 @@ class PauliPairKey: @dataclass(frozen=True, kw_only=True) -class _FinalPauliSeedAndPairCache: +class _PauliSeedAndPairCache: """Cache for final Pauli seeds and pairs per qubit and layer. Each layer beyond the first of the circuit requires knowledge of the previous @@ -138,7 +138,7 @@ def accumulate( return pauli_pairs def __next__(self) -> Self: - return _FinalPauliSeedAndPairCache( + return _PauliSeedAndPairCache( prng_sequence_step_length=self.prng_sequence_step_length, original_seeds=self._final_seeds, pauli_conjugates_map=self.pauli_conjugates_map, @@ -235,66 +235,6 @@ def _pauli_conjugates_map_str_to_literals( return pauli_conjugates_map -PAULI_CONJUGATES_MAPS = { - "CZ": _pauli_conjugates_map_str_to_literals( - { - "II": "II", - "IX": "ZX", - "IY": "ZY", - "IZ": "IZ", - "XI": "XZ", - "XX": "YY", - "XY": "YX", - "XZ": "XI", - "YI": "YZ", - "YX": "XY", - "YY": "XX", - "YZ": "YI", - "ZI": "ZI", - "ZX": "IX", - "ZY": "IY", - "ZZ": "ZZ", - } - ), - "ISWAP": _pauli_conjugates_map_str_to_literals( - { - "II": "II", - "IX": "YZ", - "IY": "XZ", - "IZ": "ZI", - "XI": "ZY", - "XX": "XX", - "XY": "YX", - "XZ": "IY", - "YI": "ZX", - "YX": "XY", - "YY": "YY", - "YZ": "IX", - "ZI": "IZ", - "ZX": "YI", - "ZY": "XI", - "ZZ": "ZZ", - } - ), -} - - -def build_memory_values_for_paulis_conjugates_map( - pauli_conjugates_map: Mapping[tuple["PauliLiteral", "PauliLiteral"], tuple["PauliLiteral", "PauliLiteral"]], -) -> list[int | float]: - """Build a map from each Pauli pair to its conjugate under the specified two-qubit gate. - - This essentially translates `PAULI_CONJUGATES_MAPS` from a map of string to string to a map - of int to int, which can be used as a Quil memory reference for conjugation lookup on the QPU. - """ - memory_values: list[int | None] = [None] * _NUMBER_PAULI_PAIRS - for previous_paulis, next_paulis in pauli_conjugates_map.items(): - previous_pauli_index = _pauli_pair_to_int(previous_paulis) - next_pauli_index = _pauli_pair_to_int(next_paulis) - memory_values[previous_pauli_index] = next_pauli_index - return cast(list[int | float], pauli_conjugates_map) - - def _pauli_pair_to_int(pauli_pair: tuple["PauliLiteral", "PauliLiteral"]) -> int: return (pauli_pair[0].value << _BITS_PER_PAULI) + pauli_pair[1].value @@ -332,7 +272,7 @@ class ShotsPerRandomization: def pulse_program_label(self) -> InstructionDesignator: return JumpTarget(Label(self.variables.pulse_program_label)) - def generate_mod_shot_count_block(self, qubits_sorted: Sequence[int]) -> tuple[InstructionDesignator, ...]: + def generate_mod_shot_count_block(self) -> tuple[InstructionDesignator, ...]: instructions: list[InstructionDesignator] = [ ClassicalAdd( MemoryReference(self.variables.modulo_counter, 0), @@ -447,10 +387,10 @@ def from_name(cls, name: str) -> "PauliLiteral": def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: return (inst.CallArgument.from_immediate(complex(self.value, 0)),) - def __rmul__(self, other: "PauliLiteral") -> "tuple[complex, PauliLiteral]": - match (self, other): + def __mul__(self, rhs: "PauliLiteral") -> "tuple[complex, PauliLiteral]": + match (self, rhs): case (PauliLiteral.I, _): - return 1, other + return 1, rhs case (_, PauliLiteral.I): return 1, self case (PauliLiteral.X, PauliLiteral.X): @@ -472,7 +412,71 @@ def __rmul__(self, other: "PauliLiteral") -> "tuple[complex, PauliLiteral]": case (PauliLiteral.X, PauliLiteral.Z): return -1j, PauliLiteral.Y case _: - raise ValueError(f"invalid pauli multiplication: {self} * {other}") + raise ValueError(f"invalid pauli multiplication: {self} * {rhs}") + + @classmethod + def all(cls) -> tuple["PauliLiteral", ...]: + return (cls.I, cls.X, cls.Y, cls.Z) + + +PAULI_CONJUGATES_MAPS = { + "CZ": _pauli_conjugates_map_str_to_literals( + { + "II": "II", + "IX": "ZX", + "IY": "ZY", + "IZ": "IZ", + "XI": "XZ", + "XX": "YY", + "XY": "YX", + "XZ": "XI", + "YI": "YZ", + "YX": "XY", + "YY": "XX", + "YZ": "YI", + "ZI": "ZI", + "ZX": "IX", + "ZY": "IY", + "ZZ": "ZZ", + } + ), + "ISWAP": _pauli_conjugates_map_str_to_literals( + { + "II": "II", + "IX": "YZ", + "IY": "XZ", + "IZ": "ZI", + "XI": "ZY", + "XX": "XX", + "XY": "YX", + "XZ": "IY", + "YI": "ZX", + "YX": "XY", + "YY": "YY", + "YZ": "IX", + "ZI": "IZ", + "ZX": "YI", + "ZY": "XI", + "ZZ": "ZZ", + } + ), +} + + +def build_memory_values_for_paulis_conjugates_map( + pauli_conjugates_map: Mapping[tuple["PauliLiteral", "PauliLiteral"], tuple["PauliLiteral", "PauliLiteral"]], +) -> list[int | float]: + """Build a map from each Pauli pair to its conjugate under the specified two-qubit gate. + + This essentially translates `PAULI_CONJUGATES_MAPS` from a map of string to string to a map + of int to int, which can be used as a Quil memory reference for conjugation lookup on the QPU. + """ + memory_values: list[int | None] = [None] * _NUMBER_PAULI_PAIRS + for previous_paulis, next_paulis in pauli_conjugates_map.items(): + previous_pauli_index = _pauli_pair_to_int(previous_paulis) + next_pauli_index = _pauli_pair_to_int(next_paulis) + memory_values[previous_pauli_index] = next_pauli_index + return cast(list[int | float], pauli_conjugates_map) @dataclass(frozen=True, kw_only=True) @@ -659,8 +663,8 @@ def _validate(self) -> None: raise ValueError( f"Base cycle length must be a multiple of {_PAULIS_PER_VALUE}, but got {self._base_cycle_count}." ) - if self.base_cycle_repetitions <= 1: - raise ValueError(f"Base cycle repetitions must be greater than 1, but got {self.base_cycle_repetitions}.") + if self.base_cycle_repetitions <= 0: + raise ValueError(f"Base cycle repetitions must be greater than 0, but got {self.base_cycle_repetitions}.") @property def _base_cycle_count(self) -> int: @@ -752,10 +756,10 @@ def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: def generate_seed_values(self, rng: np.random.Generator) -> RandomSeeds: size = (len(self.qubits_sorted), self._seed_length) - randomized_compiling_seeds = rng.integers(-(2**47), 2**47 - 1, size=size, dtype=np.int64) + randomized_compiling_seeds = rng.integers(0, _MAX_SEQUENCER_VALUE + 1, size=size, dtype=np.int64) readout_seeds = None if self.readout_randomization is not None: - readout_seeds = rng.integers(-(2**47), 2**47 - 1, size=(len(self.qubits_sorted), 1), dtype=np.int64) + readout_seeds = rng.integers(0, _MAX_SEQUENCER_VALUE + 1, size=(len(self.qubits_sorted), 1), dtype=np.int64) return RandomSeeds(randomized_compiling=randomized_compiling_seeds, readout=readout_seeds) def build_memory_map( @@ -1262,7 +1266,7 @@ def build_quil_program( program += self._generate_declarations() if self.shots_per_randomization is not None: - program += self.shots_per_randomization.generate_mod_shot_count_block(self.qubits_sorted) + program += self.shots_per_randomization.generate_mod_shot_count_block() for q in self.qubits_sorted: program += Delay([], [q], self.leading_delay_seconds) @@ -1295,7 +1299,6 @@ def verify_final_memory( unitaries specified for the (qubit, layer) and verify that the resulting unitary is equal to the twirled unitaries read from the final memory for the (qubit, layer). """ - cycles = self._build_two_qubit_base_cycles() if self.shots_per_randomization is not None: prng_sequence_length = shot_count // self.shots_per_randomization.shots_per_randomization else: @@ -1307,7 +1310,8 @@ def verify_final_memory( else: prng_sequence_step_length = prng_sequence_length prng_sequence_step_count = 1 - pauli_cache = _FinalPauliSeedAndPairCache( + cycles = self._build_two_qubit_base_cycles() * self.base_cycle_repetitions + pauli_cache = _PauliSeedAndPairCache( original_seeds={ q: cast(list[int], original_memory[self.variables.pauli_seed(q)]) for q in self.qubits_sorted }, @@ -1351,7 +1355,6 @@ def verify_final_memory( ) sub_region_count = len(source_unitary_angles) // _ANGLES_PER_UNITARY seed_value = int(original_memory[self.readout_randomization.variables.readout_seed(q)][0]) - # FIXME: should this be shot_count or shot_count - 1? final_index = choose_random_real_sub_region_indices( PrngSeedValue(seed_value), shot_count - 1, 1, sub_region_count )[0] @@ -1372,11 +1375,13 @@ def track_pauli_frames( self, sequence_count: int, pauli_conjugates_map: Mapping[tuple[PauliLiteral, PauliLiteral], tuple[PauliLiteral, PauliLiteral]], + random_seeds: RandomSeeds ) -> Generator[dict[PauliPairKey, tuple[int | None, tuple[PauliLiteral, PauliLiteral]]], None, None]: - pauli_cache = _FinalPauliSeedAndPairCache( - original_seeds={q: [0] * self._seed_length for q in self.qubits_sorted}, + cycles = self._build_two_qubit_base_cycles() * self.base_cycle_repetitions + pauli_cache = _PauliSeedAndPairCache( + original_seeds={q: random_seeds.randomized_compiling[qubit_index].tolist() for qubit_index, q in enumerate(self.qubits_sorted)}, pauli_conjugates_map=pauli_conjugates_map, - cycles=self._build_two_qubit_base_cycles(), + cycles=cycles, qubits_sorted=self.qubits_sorted, prng_sequence_step_length=1, invert_random_paulis=self.invert_random_paulis, @@ -1384,5 +1389,5 @@ def track_pauli_frames( for sequence_index in range(sequence_count): pauli_pairs = pauli_cache.accumulate(1) yield pauli_pairs - if sequence_index == sequence_count - 1: + if sequence_index < sequence_count: pauli_cache = next(pauli_cache) diff --git a/test/unit/test_qpu_randomized_compiling.py b/test/unit/test_qpu_randomized_compiling.py new file mode 100644 index 000000000..22732d211 --- /dev/null +++ b/test/unit/test_qpu_randomized_compiling.py @@ -0,0 +1,108 @@ +from pyquil._qpu._randomized_compiling import PauliPairKey +import pytest +from test.unit.test_paulis import test_paulisum_indexing +from itertools import product + +from hypothesis import strategies as st +from hypothesis import given +import numpy as np + + +from qcs_sdk.qpu.experimental.random import PrngSeedValue, lfsr_v1_next +from pyquil._qpu import _randomized_compiling as rc +from pyquil.simulation import matrices + + +# @given(seed=st.integers(min_value=-(2**47), max_value=2**47 - 1)) +# def test_lfsr_v1_next( +# seed: int +# ): +# result = rc._lfsr_v1_next(seed) +# assert PrngSeedValue(result) == lfsr_v1_next(PrngSeedValue(seed)) + + +def test_pauli_conjugates_map(): + for gate_name, pauli_conjugates_map in rc.PAULI_CONJUGATES_MAPS.items(): + gate_matrix = getattr(matrices, gate_name) + for previous_paulis, next_paulis in pauli_conjugates_map.items(): + previous = np.kron(previous_paulis[0].matrix, previous_paulis[1].matrix) + next_ = np.kron(next_paulis[0].matrix, next_paulis[1].matrix) + result = next_ @ gate_matrix @ previous + assert rc._unitary_equal(result, gate_matrix), f"Failed for gate {gate_name} with previous {previous_paulis} and next {next_paulis}" + + +def test_pauli_literal_multiplication(): + for pauli_left, pauli_right in product(rc.PauliLiteral.all(), repeat=2): + coefficient, result = pauli_left * pauli_right + assert np.allclose(coefficient * result.matrix, pauli_left.matrix @ pauli_right.matrix), f"Failed for {pauli_left} * {pauli_right}" + + +def _get_expected_pauli_pair( + seeds: list[int], + layer_index: int, + layer_count: int, + sequence_index: int +) -> tuple[int | None, rc.PauliLiteral]: + if layer_index == layer_count - 1: + return None, rc.PauliLiteral.I + seed_index = layer_index // rc._PAULIS_PER_VALUE + pauli_index = layer_index % rc._PAULIS_PER_VALUE + seed = seeds[seed_index] + values = [] + for _ in range(sequence_index + 1): + seed = rc._lfsr_v1_next(seed) + values.append(seed) + pauli_value = (seed >> (2 * pauli_index)) & 0b11 + return seed, rc.PauliLiteral(pauli_value) + + +@pytest.mark.parametrize("configuration", [ + rc.RandomizedCompilingConfiguration( + base_cycles=(((0, 1),),), + qubits_sorted=(0, 1), + base_cycle_repetitions=1, + ), + rc.RandomizedCompilingConfiguration( + base_cycles=(((0, 1),), ((1, 2),)), + qubits_sorted=(0, 1, 2), + base_cycle_repetitions=13, + ), +]) +def test_pauli_frame_tracking(configuration: rc.RandomizedCompilingConfiguration): + rng = np.random.default_rng(seed=685_522_415) + random_seeds = configuration.generate_seed_values(rng) + pauli_conjugates_map = rc.PAULI_CONJUGATES_MAPS["CZ"] + all_pauli_pairs = list(configuration.track_pauli_frames(10, pauli_conjugates_map, random_seeds)) + assert len(all_pauli_pairs) == 10 + seeds = { + q: random_seeds.randomized_compiling[qubit_index].tolist() for qubit_index, q in enumerate(configuration.qubits_sorted) + } + for sequence_index, pauli_pairs in enumerate(all_pauli_pairs): + # Check that the randomly generated Paulis match expectations. + for qubit in configuration.qubits_sorted: + for layer_index in range(len(configuration.base_cycles) + 1): + key = rc.PauliPairKey(qubit=qubit, layer_index=layer_index) + seed, pauli_pair = pauli_pairs[key] + expected_seed, expected_next_pauli = _get_expected_pauli_pair(seeds[qubit], layer_index, len(configuration.base_cycles) + 1, sequence_index) + assert seed == expected_seed, f"Seed mismatch for qubit {qubit} at layer {layer_index}: expected {expected_seed}, got {seed}" + assert pauli_pair[1] == expected_next_pauli, f"Pauli mismatch for qubit {qubit} at layer {layer_index}: expected {expected_next_pauli}, got {pauli_pair[1]}" + + for layer_index, cycle in enumerate(configuration.base_cycles * configuration.base_cycle_repetitions): + for edge in cycle: + # Check that each 2Q gate conjugates the Paulis as expected. + before_pauli_left = pauli_pairs[rc.PauliPairKey(qubit=edge[0], layer_index=layer_index)][1][1] + before_pauli_right = pauli_pairs[rc.PauliPairKey(qubit=edge[1], layer_index=layer_index)][1][1] + before_paulis = np.kron(before_pauli_left.matrix, before_pauli_right.matrix) + after_pauli_left = pauli_pairs[rc.PauliPairKey(qubit=edge[0], layer_index=layer_index + 1)][1][0] + after_pauli_right = pauli_pairs[rc.PauliPairKey(qubit=edge[1], layer_index=layer_index + 1)][1][0] + after_paulis = np.kron(after_pauli_left.matrix, after_pauli_right.matrix) + result = after_paulis @ matrices.CZ @ before_paulis + assert rc._unitary_equal(result, matrices.CZ), f"Failed at sequence {sequence_index} for cycle {cycle} at layer {layer_index}: found {result}" + + # Check that qubits not involved in the 2Q gate cycle have pauli pairs that multiply to the identity. + non_cycle_qubits = set(configuration.qubits_sorted) - set(qubit for edge in cycle for qubit in edge) + for qubit in non_cycle_qubits: + before_pauli = pauli_pairs[rc.PauliPairKey(qubit=qubit, layer_index=layer_index)][1][1] + after_pauli = pauli_pairs[rc.PauliPairKey(qubit=qubit, layer_index=layer_index + 1)][1][0] + result = after_pauli.matrix @ before_pauli.matrix + assert rc._unitary_equal(result, matrices.I), f"Failed at sequence {sequence_index} for non-cycle qubit {qubit} at layer {layer_index}: found {result}" From 9ea5011193f8527bd4b62c64a51e7437816d556f Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Wed, 10 Jun 2026 10:55:22 -0700 Subject: [PATCH 15/59] test: add table test for lfsr_v1_next --- pyquil/_qpu/_randomized_compiling.py | 2 + test/unit/test_qpu_randomized_compiling.py | 232 ++++++++++++++++----- 2 files changed, 186 insertions(+), 48 deletions(-) diff --git a/pyquil/_qpu/_randomized_compiling.py b/pyquil/_qpu/_randomized_compiling.py index 194dd7e4c..10d2d7377 100644 --- a/pyquil/_qpu/_randomized_compiling.py +++ b/pyquil/_qpu/_randomized_compiling.py @@ -135,6 +135,8 @@ def accumulate( pauli_pairs[key] = (current_seed, pauli_pair) if sequence_index < sequence_count - 1: current = next(current) + print('accumulate orignal', self.original_seeds) + print(f'accumulate final ({sequence_count} @ {self.prng_sequence_step_length})', current._final_seeds) return pauli_pairs def __next__(self) -> Self: diff --git a/test/unit/test_qpu_randomized_compiling.py b/test/unit/test_qpu_randomized_compiling.py index 22732d211..e678516d0 100644 --- a/test/unit/test_qpu_randomized_compiling.py +++ b/test/unit/test_qpu_randomized_compiling.py @@ -1,47 +1,77 @@ -from pyquil._qpu._randomized_compiling import PauliPairKey -import pytest -from test.unit.test_paulis import test_paulisum_indexing +"""Unit tests for `pyquil._qpu._randomized_compiling`. + +Note, we test several underlying internal features here where much of the complexity lies. These are indeed +implementation details but they provide a robust scaffolding for testing the overall correctness of the +randomized compiling implementation. +""" + from itertools import product -from hypothesis import strategies as st -from hypothesis import given import numpy as np +import pytest - -from qcs_sdk.qpu.experimental.random import PrngSeedValue, lfsr_v1_next from pyquil._qpu import _randomized_compiling as rc from pyquil.simulation import matrices -# @given(seed=st.integers(min_value=-(2**47), max_value=2**47 - 1)) -# def test_lfsr_v1_next( -# seed: int -# ): -# result = rc._lfsr_v1_next(seed) -# assert PrngSeedValue(result) == lfsr_v1_next(PrngSeedValue(seed)) +@pytest.mark.parametrize( + "seed, sequence_length, expected_value", + ( + (231018089914722, 7864, 72130689498700), + (48337553834185, 348, 222126916911797), + (238228272237383, 9224, 68566226079270), + (99359104223091, 191, 102235786504924), + (152395841476258, 7155, 150130174624373), + (7208143265828, 8430, 172575543901836), + (150372856527354, 5036, 32355578502344), + (11890978449387, 8599, 50433886160564), + (32925875164545, 9860, 119857684629909), + (1518961100800, 5757, 131378683707906), + ), +) +def test_lfsr_v1_next(seed: int, sequence_length: int, expected_value: int): + """Test that `rc._lfsr_v1_next` produces the expected value after a given number of iterations for a given seed. + + Note that `qcs_sdk.qpu.experimental.random.lfsr_v1_next` is _the_ source of truth for the control system PRNG. However, because the current + version of the QCS SDK does not expose the inner value of `PrngSeedValue` over the Python API, we have to re-implement the functionality + here as a stopgap until we can update the QCS SDK. In the meantime, this test simply tests the Python results against results + generated from an updated version of the QCS SDK. + """ + for _ in range(sequence_length): + seed = rc._lfsr_v1_next(seed) + assert ( + seed == expected_value + ), f"Expected {expected_value} but found {seed} after {sequence_length} iterations of _lfsr_v1_next starting from {seed}" def test_pauli_conjugates_map(): + """Test that the `rc.PAULI_CONJUGATES_MAPS` defines accurate conjugations. + + Specifically, this checks that multiplying the conjugages, the 2Q gate, and the previous paulis produces the + 2Q gate unitary, up to a global phase. + """ for gate_name, pauli_conjugates_map in rc.PAULI_CONJUGATES_MAPS.items(): gate_matrix = getattr(matrices, gate_name) for previous_paulis, next_paulis in pauli_conjugates_map.items(): previous = np.kron(previous_paulis[0].matrix, previous_paulis[1].matrix) next_ = np.kron(next_paulis[0].matrix, next_paulis[1].matrix) result = next_ @ gate_matrix @ previous - assert rc._unitary_equal(result, gate_matrix), f"Failed for gate {gate_name} with previous {previous_paulis} and next {next_paulis}" + assert rc._unitary_equal( + result, gate_matrix + ), f"Failed for gate {gate_name} with previous {previous_paulis} and next {next_paulis}" def test_pauli_literal_multiplication(): + """Test that multiplying two `rc.PauliLiteral`s produces the expected coefficient and resulting `rc.PauliLiteral`.""" for pauli_left, pauli_right in product(rc.PauliLiteral.all(), repeat=2): coefficient, result = pauli_left * pauli_right - assert np.allclose(coefficient * result.matrix, pauli_left.matrix @ pauli_right.matrix), f"Failed for {pauli_left} * {pauli_right}" + assert np.allclose( + coefficient * result.matrix, pauli_left.matrix @ pauli_right.matrix + ), f"Failed for {pauli_left} * {pauli_right}" def _get_expected_pauli_pair( - seeds: list[int], - layer_index: int, - layer_count: int, - sequence_index: int + seeds: list[int], layer_index: int, layer_count: int, sequence_index: int ) -> tuple[int | None, rc.PauliLiteral]: if layer_index == layer_count - 1: return None, rc.PauliLiteral.I @@ -56,53 +86,159 @@ def _get_expected_pauli_pair( return seed, rc.PauliLiteral(pauli_value) -@pytest.mark.parametrize("configuration", [ +_CONFIGURATION_TEST_CASES = [ + # Most basic test case. rc.RandomizedCompilingConfiguration( base_cycles=(((0, 1),),), qubits_sorted=(0, 1), base_cycle_repetitions=1, ), + # Note that qubits {0, 5} idle in the second 2Q cycle. Additionally, note that the 13 base cycle reptitions require + # more than 48 bits, so we test the Pauli frame tracking over multiple seed values. + rc.RandomizedCompilingConfiguration( + base_cycles=(((0, 1), (2, 3), (4, 5)), ((1, 2), (3, 4))), + qubits_sorted=tuple(range(6)), + base_cycle_repetitions=13, + ), + # Same as previous case but without Pauli inversion. rc.RandomizedCompilingConfiguration( - base_cycles=(((0, 1),), ((1, 2),)), - qubits_sorted=(0, 1, 2), + base_cycles=(((0, 1), (2, 3), (4, 5)), ((1, 2), (3, 4))), + qubits_sorted=tuple(range(6)), base_cycle_repetitions=13, + invert_random_paulis=False, ), -]) +] + + +@pytest.mark.parametrize("configuration", _CONFIGURATION_TEST_CASES) def test_pauli_frame_tracking(configuration: rc.RandomizedCompilingConfiguration): + """Test that `rc.RandomizedCompilingConfiguration.track_pauli_frames` produces the expected tracked Paulis for a given configuration and random seed. + + This test checks the following: + + * Randomly generated Paulis match expectations for the given random seed (see `_get_expected_pauli_pair`). + * If `configuration.invert_random_paulis` is `True`, then the tracked Paulis conjugate through the 2Q gates and 1Q identities as expected. + * If `configuration.invert_random_paulis` is `False`, then all previous Paulis are the identity. + + Conjugation assertions assume that the `rc.PAULI_CONJUGATES_MAPS` are correct. + """ rng = np.random.default_rng(seed=685_522_415) random_seeds = configuration.generate_seed_values(rng) pauli_conjugates_map = rc.PAULI_CONJUGATES_MAPS["CZ"] all_pauli_pairs = list(configuration.track_pauli_frames(10, pauli_conjugates_map, random_seeds)) assert len(all_pauli_pairs) == 10 + all_cycles = configuration.base_cycles * configuration.base_cycle_repetitions + assert all( + len(pauli_pairs) == len(configuration.qubits_sorted) * (len(all_cycles) + 1) for pauli_pairs in all_pauli_pairs + ) seeds = { - q: random_seeds.randomized_compiling[qubit_index].tolist() for qubit_index, q in enumerate(configuration.qubits_sorted) + q: random_seeds.randomized_compiling[qubit_index].tolist() + for qubit_index, q in enumerate(configuration.qubits_sorted) } for sequence_index, pauli_pairs in enumerate(all_pauli_pairs): # Check that the randomly generated Paulis match expectations. for qubit in configuration.qubits_sorted: - for layer_index in range(len(configuration.base_cycles) + 1): + for layer_index in range(len(all_cycles) + 1): key = rc.PauliPairKey(qubit=qubit, layer_index=layer_index) seed, pauli_pair = pauli_pairs[key] - expected_seed, expected_next_pauli = _get_expected_pauli_pair(seeds[qubit], layer_index, len(configuration.base_cycles) + 1, sequence_index) - assert seed == expected_seed, f"Seed mismatch for qubit {qubit} at layer {layer_index}: expected {expected_seed}, got {seed}" - assert pauli_pair[1] == expected_next_pauli, f"Pauli mismatch for qubit {qubit} at layer {layer_index}: expected {expected_next_pauli}, got {pauli_pair[1]}" - - for layer_index, cycle in enumerate(configuration.base_cycles * configuration.base_cycle_repetitions): - for edge in cycle: - # Check that each 2Q gate conjugates the Paulis as expected. - before_pauli_left = pauli_pairs[rc.PauliPairKey(qubit=edge[0], layer_index=layer_index)][1][1] - before_pauli_right = pauli_pairs[rc.PauliPairKey(qubit=edge[1], layer_index=layer_index)][1][1] - before_paulis = np.kron(before_pauli_left.matrix, before_pauli_right.matrix) - after_pauli_left = pauli_pairs[rc.PauliPairKey(qubit=edge[0], layer_index=layer_index + 1)][1][0] - after_pauli_right = pauli_pairs[rc.PauliPairKey(qubit=edge[1], layer_index=layer_index + 1)][1][0] - after_paulis = np.kron(after_pauli_left.matrix, after_pauli_right.matrix) - result = after_paulis @ matrices.CZ @ before_paulis - assert rc._unitary_equal(result, matrices.CZ), f"Failed at sequence {sequence_index} for cycle {cycle} at layer {layer_index}: found {result}" - - # Check that qubits not involved in the 2Q gate cycle have pauli pairs that multiply to the identity. - non_cycle_qubits = set(configuration.qubits_sorted) - set(qubit for edge in cycle for qubit in edge) - for qubit in non_cycle_qubits: - before_pauli = pauli_pairs[rc.PauliPairKey(qubit=qubit, layer_index=layer_index)][1][1] - after_pauli = pauli_pairs[rc.PauliPairKey(qubit=qubit, layer_index=layer_index + 1)][1][0] - result = after_pauli.matrix @ before_pauli.matrix - assert rc._unitary_equal(result, matrices.I), f"Failed at sequence {sequence_index} for non-cycle qubit {qubit} at layer {layer_index}: found {result}" + expected_seed, expected_next_pauli = _get_expected_pauli_pair( + seeds[qubit], layer_index, len(all_cycles) + 1, sequence_index + ) + assert ( + seed == expected_seed + ), f"Seed mismatch for qubit {qubit} at layer {layer_index}: expected {expected_seed}, got {seed}" + assert ( + pauli_pair[1] == expected_next_pauli + ), f"Pauli mismatch for qubit {qubit} at layer {layer_index}: expected {expected_next_pauli}, got {pauli_pair[1]}" + + if configuration.invert_random_paulis: + # Check that the Paulis conjugate as expected. + for layer_index, cycle in enumerate(all_cycles): + # Check conjugation through 2Q gates. + for edge in cycle: + before_pauli_left = pauli_pairs[rc.PauliPairKey(qubit=edge[0], layer_index=layer_index)][1][1] + before_pauli_right = pauli_pairs[rc.PauliPairKey(qubit=edge[1], layer_index=layer_index)][1][1] + before_paulis = np.kron(before_pauli_left.matrix, before_pauli_right.matrix) + after_pauli_left = pauli_pairs[rc.PauliPairKey(qubit=edge[0], layer_index=layer_index + 1)][1][0] + after_pauli_right = pauli_pairs[rc.PauliPairKey(qubit=edge[1], layer_index=layer_index + 1)][1][0] + after_paulis = np.kron(after_pauli_left.matrix, after_pauli_right.matrix) + result = after_paulis @ matrices.CZ @ before_paulis + assert rc._unitary_equal( + result, matrices.CZ + ), f"Failed at sequence {sequence_index} for cycle {cycle} at layer {layer_index}: found {result}" + + # Check conjugation over 1Q identity. + non_cycle_qubits = set(configuration.qubits_sorted) - set(qubit for edge in cycle for qubit in edge) + for qubit in non_cycle_qubits: + before_pauli = pauli_pairs[rc.PauliPairKey(qubit=qubit, layer_index=layer_index)][1][1] + after_pauli = pauli_pairs[rc.PauliPairKey(qubit=qubit, layer_index=layer_index + 1)][1][0] + result = after_pauli.matrix @ before_pauli.matrix + assert rc._unitary_equal( + result, matrices.I + ), f"Failed at sequence {sequence_index} for non-cycle qubit {qubit} at layer {layer_index}: found {result}" + else: + # If Paulis are not inverted then we can simply asssert that all previous Paulis are the identity. + for qubit in configuration.qubits_sorted: + for layer_index in range(len(all_cycles) + 1): + key = rc.PauliPairKey(qubit=qubit, layer_index=layer_index) + _, pauli_pair = pauli_pairs[key] + assert ( + pauli_pair[0] == rc.PauliLiteral.I + ), f"Expected identity for previous Pauli but found {pauli_pair[0]} for qubit {qubit} at layer {layer_index}" + + +@pytest.mark.parametrize("configuration", _CONFIGURATION_TEST_CASES) +def test_pauli_cache_accumulation(configuration: rc.RandomizedCompilingConfiguration): + """Test `rc._PauliSeedAndPairCache.accumulate` against manual accumulation of the tracked Paulis from `configuration.track_pauli_frames`. + + This test assumes the following features are correctly implemented: + + * Pauli multiplication (see `test_pauli_literal_multiplication` above). + * Pauli frame tracking (see `test_pauli_frame_tracking` above). + * `rc.PAULI_CONJUGATES_MAPS` (see `test_pauli_conjugates_map` above). + """ + rng = np.random.default_rng(seed=685_522_415) + random_seeds = configuration.generate_seed_values(rng) + pauli_conjugates_map = rc.PAULI_CONJUGATES_MAPS["CZ"] + + pauli_cache = rc._PauliSeedAndPairCache( + original_seeds={ + q: random_seeds.randomized_compiling[qubit_index].tolist() + for qubit_index, q in enumerate(configuration.qubits_sorted) + }, + pauli_conjugates_map=pauli_conjugates_map, + cycles=configuration._build_two_qubit_base_cycles() * configuration.base_cycle_repetitions, + qubits_sorted=configuration.qubits_sorted, + prng_sequence_step_length=1, + invert_random_paulis=configuration.invert_random_paulis, + ) + + accumulation_steps = 10 + tracked_paulis = configuration.track_pauli_frames(accumulation_steps, pauli_conjugates_map, random_seeds) + manually_accumulated_paulis = {} + for pauli_pairs in tracked_paulis: + assert len(pauli_pairs) == len(configuration.qubits_sorted) * (len(pauli_cache.cycles) + 1) + for key, value in pauli_pairs.items(): + if key not in manually_accumulated_paulis: + manually_accumulated_paulis[key] = value + else: + _, accumulated_pauli_pair = manually_accumulated_paulis[key] + current_seed, current_pauli_pair = value + _, previous_pauli = current_pauli_pair[0] * accumulated_pauli_pair[0] + _, next_pauli = accumulated_pauli_pair[1] * current_pauli_pair[1] + manually_accumulated_paulis[key] = (current_seed, (previous_pauli, next_pauli)) + + accumulated_paulis = pauli_cache.accumulate(accumulation_steps) + all_cycles = configuration.base_cycles * configuration.base_cycle_repetitions + assert len(accumulated_paulis) == len(configuration.qubits_sorted) * (len(all_cycles) + 1) + for qubit in configuration.qubits_sorted: + for layer_index in range(len(all_cycles) + 1): + key = rc.PauliPairKey(qubit=qubit, layer_index=layer_index) + seed, pauli_pair = accumulated_paulis[key] + expected_seed, expected_pauli_pair = manually_accumulated_paulis[key] + assert ( + seed == expected_seed + ), f"Seed mismatch for qubit {qubit} at layer {layer_index}: expected {expected_seed}, got {seed}" + assert ( + pauli_pair == expected_pauli_pair + ), f"Pauli pair mismatch for qubit {qubit} at layer {layer_index}: expected {expected_pauli_pair}, got {pauli_pair}" From ab06411ab7121658df43688d80393f468dfbd725 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Thu, 11 Jun 2026 15:11:59 -0700 Subject: [PATCH 16/59] refactor: simplify randomized compiling loops --- pyquil/_qpu/_extern_call.py | 19 +- pyquil/_qpu/_randomized_compiling.py | 707 ++++++++------------- test/e2e/test_qpu_randomized_compiling.py | 200 ++++++ test/unit/test_qpu_randomized_compiling.py | 112 +++- 4 files changed, 583 insertions(+), 455 deletions(-) create mode 100644 test/e2e/test_qpu_randomized_compiling.py diff --git a/pyquil/_qpu/_extern_call.py b/pyquil/_qpu/_extern_call.py index b118a16af..dc99b163b 100644 --- a/pyquil/_qpu/_extern_call.py +++ b/pyquil/_qpu/_extern_call.py @@ -1,4 +1,3 @@ - from quil import instructions as inst from pyquil.quilbase import Pragma @@ -182,13 +181,19 @@ def build_extern_function_signatures() -> dict[str, Pragma]: "choose_random_real_sub_regions", inst.ExternSignature( parameters=[ - inst.ExternParameter("destination", True, inst.ExternParameterType.from_variable_length_vector(inst.ScalarType.Real)), - inst.ExternParameter("source", False, inst.ExternParameterType.from_variable_length_vector(inst.ScalarType.Real)), - inst.ExternParameter("sub_region_size", False, inst.ExternParameterType.from_scalar(inst.ScalarType.Integer)), + inst.ExternParameter( + "destination", True, inst.ExternParameterType.from_variable_length_vector(inst.ScalarType.Real) + ), + inst.ExternParameter( + "source", False, inst.ExternParameterType.from_variable_length_vector(inst.ScalarType.Real) + ), + inst.ExternParameter( + "sub_region_size", False, inst.ExternParameterType.from_scalar(inst.ScalarType.Integer) + ), inst.ExternParameter("seed", True, inst.ExternParameterType.from_scalar(inst.ScalarType.Integer)), ], - return_type=None - ).to_quil() - ) + return_type=None, + ).to_quil(), + ), ] return {name: Pragma("EXTERN", [name], signature) for name, signature in signatures} diff --git a/pyquil/_qpu/_randomized_compiling.py b/pyquil/_qpu/_randomized_compiling.py index 10d2d7377..2b9ce5e5b 100644 --- a/pyquil/_qpu/_randomized_compiling.py +++ b/pyquil/_qpu/_randomized_compiling.py @@ -109,7 +109,7 @@ class _PauliSeedAndPairCache: layer's Pauli pair in order to determine the conjugate. """ - prng_sequence_step_length: int + prng_sequence_steps: int original_seeds: Mapping[int, Sequence[int]] pauli_conjugates_map: Mapping[tuple["PauliLiteral", "PauliLiteral"], tuple["PauliLiteral", "PauliLiteral"]] cycles: tuple[_TwoQubitCycle, ...] @@ -135,13 +135,11 @@ def accumulate( pauli_pairs[key] = (current_seed, pauli_pair) if sequence_index < sequence_count - 1: current = next(current) - print('accumulate orignal', self.original_seeds) - print(f'accumulate final ({sequence_count} @ {self.prng_sequence_step_length})', current._final_seeds) return pauli_pairs def __next__(self) -> Self: return _PauliSeedAndPairCache( - prng_sequence_step_length=self.prng_sequence_step_length, + prng_sequence_steps=self.prng_sequence_steps, original_seeds=self._final_seeds, pauli_conjugates_map=self.pauli_conjugates_map, cycles=self.cycles, @@ -155,8 +153,7 @@ def _final_seeds(self) -> dict[int, tuple[int, ...]]: for qubit in self.qubits_sorted: seeds = self.original_seeds[qubit] final_seeds[qubit] = tuple( - _generate_lfsr_v1_sequence(seed, start_index=self.prng_sequence_step_length, count=1)[0] - for seed in seeds + _generate_lfsr_v1_sequence(seed, start_index=self.prng_sequence_steps, count=1)[0] for seed in seeds ) return final_seeds @@ -267,7 +264,7 @@ class ShotsPerRandomization: """ shots_per_randomization: int - secondary_delay_seconds: float | None = 2e-4 + secondary_delay_seconds: float | None = None variables: ShotsPerRandomizationVariables = field(default_factory=ShotsPerRandomizationVariables) @property @@ -467,7 +464,7 @@ def all(cls) -> tuple["PauliLiteral", ...]: def build_memory_values_for_paulis_conjugates_map( pauli_conjugates_map: Mapping[tuple["PauliLiteral", "PauliLiteral"], tuple["PauliLiteral", "PauliLiteral"]], -) -> list[int | float]: +) -> list[int] | list[float]: """Build a map from each Pauli pair to its conjugate under the specified two-qubit gate. This essentially translates `PAULI_CONJUGATES_MAPS` from a map of string to string to a map @@ -478,7 +475,7 @@ def build_memory_values_for_paulis_conjugates_map( previous_pauli_index = _pauli_pair_to_int(previous_paulis) next_pauli_index = _pauli_pair_to_int(next_paulis) memory_values[previous_pauli_index] = next_pauli_index - return cast(list[int | float], pauli_conjugates_map) + return cast(list[int] | list[float], memory_values) @dataclass(frozen=True, kw_only=True) @@ -589,7 +586,11 @@ def _compute_unitary_from_zxzxz_angles(unitary: Sequence[float]) -> NDArray[np.c sx = matrices.RX(np.pi / 2) return cast( NDArray[np.complex128], - matrices.RZ(unitary[2] * 2 * np.pi) @ sx @ matrices.RZ(unitary[1] * 2 * np.pi) @ sx @ matrices.RZ(unitary[0] * 2 * np.pi), + matrices.RZ(unitary[2] * 2 * np.pi) + @ sx + @ matrices.RZ(unitary[1] * 2 * np.pi) + @ sx + @ matrices.RZ(unitary[0] * 2 * np.pi), ) @@ -603,7 +604,7 @@ def _compute_expected_merged_unitary( @dataclass(frozen=True, kw_only=True) class RandomizedCompilingVariables: seed_loop_label: str = "rc_seed_loop" - seed_loop_index: str = "rc_seed_loop_index" + seed_index: str = "rc_seed_index" seed_loop_inner_label: str = "rc_seed_loop_inner" base_cycle_loop_label: str = "rc_base_cycle_loop" base_cycle_loop_index: str = "rc_base_cycle_loop_index" @@ -621,14 +622,14 @@ def current_seeds(self, qubit: int) -> str: def source_unitaries(self, qubit: int) -> str: return f"{self.unitaries_prefix}_q{qubit}" - def source_unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> inst.MemoryReference: - return inst.MemoryReference(self.source_unitaries(qubit), layer_index * _ANGLES_PER_UNITARY + angle_index) + def source_unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> MemoryReference: + return MemoryReference(self.source_unitaries(qubit), layer_index * _ANGLES_PER_UNITARY + angle_index) def twirled_unitaries(self, qubit: int) -> str: return f"{self.twirled_unitaries_prefix}_q{qubit}" - def twirled_unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> inst.MemoryReference: - return inst.MemoryReference(self.twirled_unitaries(qubit), layer_index * _ANGLES_PER_UNITARY + angle_index) + def twirled_unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> MemoryReference: + return MemoryReference(self.twirled_unitaries(qubit), layer_index * _ANGLES_PER_UNITARY + angle_index) def pauli_seed(self, qubit: int) -> str: return f"{self.pauli_seed_prefix}_q{qubit}" @@ -640,6 +641,28 @@ class RandomSeeds: readout: NDArray[np.int64] | None = None +@dataclass(frozen=True, kw_only=True) +class _PauliCursor: + previous_seed_index: int = 0 + previous_seed_pauli_index: int = 0 + next_seed_pauli_index: int = 1 + + @classmethod + def after_seed_transition(cls) -> "_PauliCursor": + return cls(previous_seed_index=1, previous_seed_pauli_index=0, next_seed_pauli_index=0) + + def next_ref(self, current_seed_name: str) -> _PauliReference: + return _PauliReference( + memory_reference=inst.MemoryReference(current_seed_name, 0), pauli_index=self.next_seed_pauli_index + ) + + def previous_ref(self, current_seed_name: str) -> _PauliReference: + return _PauliReference( + memory_reference=inst.MemoryReference(current_seed_name, self.previous_seed_index), + pauli_index=self.previous_seed_pauli_index, + ) + + @dataclass(frozen=True, kw_only=True) class RandomizedCompilingConfiguration: """A test utility for build a randomly compiled program using a loop structure over repeated base cycles.""" @@ -661,43 +684,50 @@ def __post_init__(self) -> None: self._validate() def _validate(self) -> None: - if _PAULIS_PER_VALUE % self._base_cycle_count != 0: + if _PAULIS_PER_VALUE % self._base_cycle_length != 0: raise ValueError( - f"Base cycle length must be a multiple of {_PAULIS_PER_VALUE}, but got {self._base_cycle_count}." + f"Base cycle length must be a multiple of {_PAULIS_PER_VALUE}, but got {self._base_cycle_length}." ) if self.base_cycle_repetitions <= 0: raise ValueError(f"Base cycle repetitions must be greater than 0, but got {self.base_cycle_repetitions}.") @property - def _base_cycle_count(self) -> int: + def _base_cycle_length(self) -> int: return len(self.base_cycles) @property def _cycle_count(self) -> int: - return self._base_cycle_count * self.base_cycle_repetitions + return self._base_cycle_length * self.base_cycle_repetitions @property def _seed_length(self) -> int: - return math.ceil(self._base_cycle_count * self.base_cycle_repetitions / _PAULIS_PER_VALUE) - - @property - def _out_of_primary_loop_seed_change_required(self) -> bool: - return self.base_cycle_repetitions % _PAULIS_PER_VALUE == 0 + return math.ceil(self._cycle_count / _PAULIS_PER_VALUE) @property def _seed_loop_length(self) -> int: - return self._seed_length - 1 + if self._base_cycle_length < _PAULIS_PER_VALUE: + return self._seed_length - 1 + return 0 @property def _seed_loop_inner_length(self) -> int: - return int(_PAULIS_PER_VALUE / self._base_cycle_count) - 1 + if self._seed_loop_length >= 1: + return _PAULIS_PER_VALUE // self._base_cycle_length - 1 + else: + return 0 @property def _base_cycle_loop_length(self) -> int: - base_cycles_per_word = int(_PAULIS_PER_VALUE / self._base_cycle_count) - primary_loop_base_cycles = self._seed_loop_length * base_cycles_per_word - # we add 1 below for the final cycle. - return self.base_cycle_repetitions - (primary_loop_base_cycles + 1) + base_cycles_per_seed_value = _PAULIS_PER_VALUE // self._base_cycle_length + completed_base_cycles = self._seed_loop_length * base_cycles_per_seed_value + if self._base_cycle_length == 1: + total_required_u2_cycles = self.base_cycle_repetitions + 1 + # we subtract 2 for the initial and final cycles. + return total_required_u2_cycles - completed_base_cycles - 2 + # in the base case, we complete a base cycle (sans the first cycle within the base cycle) + # after the base cycle loop. + completed_base_cycles += 1 + return self.base_cycle_repetitions - completed_base_cycles def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: declarations: list[Declare] = [] @@ -740,16 +770,12 @@ def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: ) ) if self._seed_loop_length > 0: - declarations.extend( - [ - Declare(self.variables.seed_loop_index, "INTEGER", 2), - ] + declarations.append( + Declare(self.variables.seed_index, "INTEGER", 2), ) if self._base_cycle_loop_length > 0 or self._seed_loop_inner_length > 0: - declarations.extend( - [ - Declare(self.variables.base_cycle_loop_index, "INTEGER", 1), - ] + declarations.append( + Declare(self.variables.base_cycle_loop_index, "INTEGER", 1), ) current_seed_length = 2 if self._seed_loop_length > 0 else 1 for q in self.qubits_sorted: @@ -767,14 +793,14 @@ def generate_seed_values(self, rng: np.random.Generator) -> RandomSeeds: def build_memory_map( self, random_seeds: RandomSeeds, - pauli_conjugates_map: list[int | float], - ) -> dict[str, list[int | float]]: - memory_map: dict[str, list[int | float]] = { + pauli_conjugates_map: list[int] | list[float], + ) -> dict[str, list[int] | list[float]]: + memory_map: dict[str, list[int] | list[float]] = { self.variables.unitary_angle_offset: [_ANGLES_PER_UNITARY], self.variables.loop_break: [0], } if self._seed_loop_length > 0: - memory_map[self.variables.seed_loop_index] = [0, 1] + memory_map[self.variables.seed_index] = [0, 1] if self._base_cycle_loop_length > 0 or self._seed_loop_inner_length > 0: memory_map[self.variables.base_cycle_loop_index] = [0] @@ -809,292 +835,140 @@ def build_memory_map( def _build_two_qubit_base_cycles(self) -> tuple[_TwoQubitCycle, ...]: return tuple(_TwoQubitCycle.from_edges(cycle) for cycle in self.base_cycles) - def _build_quil_instructions_for_cycle(self) -> list[InstructionDesignator]: - pauli_pairs = [] - for cycle in self._build_two_qubit_base_cycles(): - cycle_pauli_pairs = [] - for q in cycle.data.keys(): - edge = cycle[q] - if self.invert_random_paulis: - pauli_left = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), pauli_index=0 - ) - pauli_right = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), pauli_index=0 - ) - is_pauli_left = q == edge[0] - previous = _PauliConjugate( - pauli_left=pauli_left, - pauli_right=pauli_right, - is_left_conjugate=is_pauli_left, - ) - else: - previous = PauliLiteral.I - cycle_pauli_pairs.append( - ( - q, - _PauliPair( - previous=previous, - next=_PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 0), pauli_index=1 - ), - ), - ) - ) - for qubit in self.qubits_sorted: - if qubit not in cycle: - if self.invert_random_paulis: - previous = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), - pauli_index=0, - ) - else: - previous = PauliLiteral.I - cycle_pauli_pairs.append( - ( - qubit, - _PauliPair( - previous=previous, - next=_PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), - pauli_index=1, - ), - ), - ) - ) - pauli_pairs.append(cycle_pauli_pairs) - + def _build_quil_instructions_for_cycle( + self, + /, + transition_to_next_seed_on_last_cycle: bool = False, + is_final_base_cycle: bool = False, + ) -> list[InstructionDesignator]: instructions: list[InstructionDesignator] = [] - for cycle_pauli_pairs in pauli_pairs: - instructions.extend( - pauli_pair.build_quil_call_instruction( - inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), - inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), - inst.CallArgument.from_memory_reference( - inst.MemoryReference(self.variables.unitary_angle_offset, 0) - ), - ) - for q, pauli_pair in cycle_pauli_pairs - ) - instructions.append( - ClassicalAdd( - MemoryReference(self.variables.unitary_angle_offset, 0), - _ANGLES_PER_UNITARY, - ), - ) - for q in self.qubits_sorted: - instructions.append( - ClassicalShiftRight( - MemoryReference(self.variables.current_seeds(q), 0), - _BITS_PER_PAULI, - ) - ) - return instructions - - def _build_quil_instructions_for_seed_transition(self) -> list[InstructionDesignator]: - pauli_pairs = [] for cycle_index, cycle in enumerate(self._build_two_qubit_base_cycles()): - cycle_pauli_pairs = [] - is_final_cycle = cycle_index == self._base_cycle_count - 1 - for q in cycle.data.keys(): - edge = cycle[q] - if self.invert_random_paulis: - pauli_left = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), pauli_index=0 - ) - pauli_right = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), pauli_index=0 - ) - is_pauli_left = q == edge[0] + is_final_cycle = cycle_index == self._base_cycle_length - 1 + requires_seed_transition = is_final_cycle and transition_to_next_seed_on_last_cycle + requires_seed_transition |= cycle_index > 0 and cycle_index % _PAULIS_PER_VALUE == 0 + if requires_seed_transition: + instructions.extend(self._build_quil_instructions_for_seed_transition()) + cursor = _PauliCursor.after_seed_transition() + else: + cursor = _PauliCursor() + + for qubit in self.qubits_sorted: + edge = cycle[qubit] if qubit in cycle.data else None + if self.invert_random_paulis and edge is not None: + pauli_left = cursor.previous_ref(self.variables.current_seeds(edge[0])) + pauli_right = cursor.previous_ref(self.variables.current_seeds(edge[1])) + is_pauli_left = qubit == edge[0] previous = _PauliConjugate( pauli_left=pauli_left, pauli_right=pauli_right, is_left_conjugate=is_pauli_left, ) + elif self.invert_random_paulis and edge is None: + previous = cursor.previous_ref(self.variables.current_seeds(qubit)) else: previous = PauliLiteral.I - if is_final_cycle: - next_pauli = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 1), pauli_index=0 - ) + + if is_final_cycle and is_final_base_cycle: + next_ = PauliLiteral.I else: - next_pauli = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 0), pauli_index=1 - ) - cycle_pauli_pairs.append( - ( - q, - _PauliPair( - previous=previous, - next=next_pauli, + next_ = cursor.next_ref(self.variables.current_seeds(qubit)) + pauli_pair = _PauliPair( + previous=previous, + next=next_, + ) + instructions.append( + pauli_pair.build_quil_call_instruction( + inst.CallArgument.from_identifier(self.variables.twirled_unitaries(qubit)), + inst.CallArgument.from_identifier(self.variables.source_unitaries(qubit)), + inst.CallArgument.from_memory_reference( + inst.MemoryReference(self.variables.unitary_angle_offset, 0) ), ) ) - for qubit in self.qubits_sorted: - if qubit not in cycle: - if is_final_cycle: - next_pauli = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 1), pauli_index=0 - ) - else: - next_pauli = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), pauli_index=1 - ) - if self.invert_random_paulis: - previous = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), - pauli_index=0, - ) - else: - previous = PauliLiteral.I - cycle_pauli_pairs.append( - ( - qubit, - _PauliPair( - previous=previous, - next=next_pauli, - ), - ) - ) - pauli_pairs.append(cycle_pauli_pairs) - instructions: list[InstructionDesignator] = [] - for cycle_index, cycle_pauli_pairs in enumerate(pauli_pairs): - is_final_cycle = cycle_index == self._base_cycle_count - 1 - instructions.extend( - pauli_pair.build_quil_call_instruction( - inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), - inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), - inst.CallArgument.from_memory_reference( - inst.MemoryReference(self.variables.unitary_angle_offset, 0) + if not (is_final_cycle and is_final_base_cycle): + instructions.append( + ClassicalAdd( + MemoryReference(self.variables.unitary_angle_offset, 0), + _ANGLES_PER_UNITARY, ), ) - for q, pauli_pair in cycle_pauli_pairs - ) - instructions.append( - ClassicalAdd(MemoryReference(self.variables.unitary_angle_offset, 0), _ANGLES_PER_UNITARY) - ) - if not is_final_cycle: - for q in self.qubits_sorted: - instructions.append( - ClassicalShiftRight( - MemoryReference(self.variables.current_seeds(q), 0), - _BITS_PER_PAULI, + + if not requires_seed_transition: + for q in self.qubits_sorted: + instructions.append( + ClassicalShiftRight( + MemoryReference(self.variables.current_seeds(q), 0), + _BITS_PER_PAULI, + ) ) - ) return instructions - def _build_quil_instructions_for_final_base_cycle(self) -> list[InstructionDesignator]: - pauli_pairs = [] - for cycle_index, cycle in enumerate(self._build_two_qubit_base_cycles()): - cycle_pauli_pairs = [] - is_final_cycle = cycle_index == self._base_cycle_count - 1 - for q in cycle.data.keys(): - edge = cycle[q] - if self.invert_random_paulis: - pauli_left = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), - pauli_index=cycle_index, - ) - pauli_right = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), - pauli_index=cycle_index, - ) - is_pauli_left = q == edge[0] - previous = _PauliConjugate( - pauli_left=pauli_left, - pauli_right=pauli_right, - is_left_conjugate=is_pauli_left, - ) - else: - previous = PauliLiteral.I - if is_final_cycle: - pauli_next = PauliLiteral.I - else: - pauli_next = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 0), - pauli_index=cycle_index + 1, - ) - cycle_pauli_pairs.append( - ( - q, - _PauliPair( - previous=previous, - next=pauli_next, - ), - ) - ) - for qubit in self.qubits_sorted: - if qubit not in cycle: - if is_final_cycle: - pauli_next = PauliLiteral.I - else: - pauli_next = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), - pauli_index=cycle_index + 1, - ) - if self.invert_random_paulis: - previous = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), - pauli_index=cycle_index, - ) - else: - previous = PauliLiteral.I - cycle_pauli_pairs.append( - ( - qubit, - _PauliPair( - previous=previous, - next=pauli_next, - ), - ) - ) - pauli_pairs.append(cycle_pauli_pairs) - + def _build_quil_instructions_for_seed_transition(self) -> list[InstructionDesignator]: instructions: list[InstructionDesignator] = [] - for cycle_index, cycle_pauli_pairs in enumerate(pauli_pairs): - global_cycle_index = (self._cycle_count + 1) - self._base_cycle_count + cycle_index - - source = self.variables.source_unitaries(q) - if cycle_index == len(pauli_pairs) - 1 and self.readout_randomization is not None: - instructions.append( - Call( - "choose_random_real_sub_regions", - [ - inst.CallArgument.from_identifier( - self.readout_randomization.variables.readout_randomization(q) - ), - inst.CallArgument.from_identifier(self.readout_randomization.variables.source_unitaries(q)), - inst.CallArgument.from_immediate(complex(_ANGLES_PER_UNITARY, 0)), - inst.CallArgument.from_memory_reference( - inst.MemoryReference(self.readout_randomization.variables.readout_seed(q), 0) - ), - ], - ) + instructions.extend( + [ + ClassicalLoad( + MemoryReference(self.variables.current_seeds(qubit), 0), + self.variables.pauli_seed(qubit), + MemoryReference(self.variables.seed_index, 0), ) - for i in range(_ANGLES_PER_UNITARY): - instructions.append( - ClassicalMove( - MemoryReference( - self.variables.twirled_unitaries(q), global_cycle_index * _ANGLES_PER_UNITARY + i - ), - MemoryReference(self.readout_randomization.variables.readout_randomization(q), i), - ) - ) - source = self.variables.twirled_unitaries(q) + for qubit in self.qubits_sorted + ] + ) + instructions.append( + ClassicalAdd( + MemoryReference(self.variables.seed_index, 0), + 1, + ) + ) + instructions.extend( + [ + ClassicalLoad( + MemoryReference(self.variables.current_seeds(qubit), 1), + self.variables.pauli_seed(qubit), + MemoryReference(self.variables.seed_index, 0), + ) + for qubit in self.qubits_sorted + ] + ) + return instructions - instructions.extend( - pauli_pair.build_quil_call_instruction( - inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), - inst.CallArgument.from_identifier(source), - inst.CallArgument.from_immediate(complex(global_cycle_index * _ANGLES_PER_UNITARY, 0)), + def _build_quil_loop_instructions( + self, + instructions: list[InstructionDesignator], + loop_label: str, + loop_index_variable: str, + loop_count: int, + loop_index_increment: int | None = 1, + ) -> list[InstructionDesignator]: + loop_instructions: list[InstructionDesignator] = [] + loop_instructions.append(ClassicalMove(MemoryReference(loop_index_variable, 0), 0)) + loop_instructions.append(JumpTarget(Label(loop_label))) + loop_instructions.extend(instructions) + if loop_index_increment is not None: + loop_instructions.append( + ClassicalAdd( + MemoryReference(loop_index_variable, 0), + loop_index_increment, ) - for q, pauli_pair in cycle_pauli_pairs ) - - return instructions + loop_instructions.append( + ClassicalGreaterEqual( + MemoryReference(self.variables.loop_break, 0), + MemoryReference(loop_index_variable, 0), + loop_count, + ) + ) + loop_instructions.append( + JumpUnless( + Label(loop_label), + MemoryReference(self.variables.loop_break, 0), + ) + ) + return loop_instructions def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[InstructionDesignator]: instructions: list[InstructionDesignator] = list(self._generate_declarations()) @@ -1113,6 +987,7 @@ def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[Instruc ], ) ) + # first cycle. for q in self.qubits_sorted: pauli_pair = _PauliPair( previous=PauliLiteral.I, @@ -1127,135 +1002,59 @@ def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[Instruc inst.CallArgument.from_immediate(complex(0, 0)), ) ) - instructions.append( - ClassicalMove( - MemoryReference(self.variables.unitary_angle_offset, 0), - _ANGLES_PER_UNITARY, - ) + instructions.extend( + [ + ClassicalMove( + MemoryReference(self.variables.unitary_angle_offset, 0), + _ANGLES_PER_UNITARY, + ), + ClassicalMove( + MemoryReference(self.variables.seed_index, 0), + 0, + ), + ] ) + for qubit in self.qubits_sorted: + instructions.append( + ClassicalMove( + MemoryReference(self.variables.current_seeds(qubit), 0), + MemoryReference(self.variables.pauli_seed(qubit), 0), + ) + ) if self._seed_loop_length >= 1: - instructions.extend( - [ - ClassicalMove(MemoryReference(self.variables.seed_loop_index, 0), 0), - ClassicalMove( - MemoryReference(self.variables.seed_loop_index, 1), - 1, - ), - JumpTarget(Label(self.variables.seed_loop_label)), - ], - ) + seed_loop_instructions = [] if self._seed_loop_inner_length >= 1: - instructions.append( - ClassicalMove( - MemoryReference(self.variables.base_cycle_loop_index, 0), - 0, - ) + inner_loop = self._build_quil_loop_instructions( + self._build_quil_instructions_for_cycle(), + loop_label=self.variables.seed_loop_inner_label, + loop_index_variable=self.variables.base_cycle_loop_index, + loop_count=self._seed_loop_inner_length, ) - for q in self.qubits_sorted: - instructions.append( - ClassicalLoad( - MemoryReference(self.variables.current_seeds(q), 0), - self.variables.pauli_seed(q), - MemoryReference(self.variables.seed_loop_index, 0), - ) - ) - if self._seed_length > 1: - instructions.append( - ClassicalLoad( - MemoryReference(self.variables.current_seeds(q), 1), - self.variables.pauli_seed(q), - MemoryReference(self.variables.seed_loop_index, 1), - ) - ) - if self._seed_loop_inner_length >= 1: - instructions.append(JumpTarget(Label(self.variables.seed_loop_inner_label))) - instructions.extend(self._build_quil_instructions_for_cycle()) - instructions.extend( - [ - ClassicalAdd( - MemoryReference(self.variables.base_cycle_loop_index, 0), - 1, - ), - ClassicalGreaterEqual( - MemoryReference(self.variables.loop_break, 0), - MemoryReference(self.variables.base_cycle_loop_index, 0), - self._seed_loop_inner_length, - ), - JumpUnless( - Label(self.variables.seed_loop_inner_label), - MemoryReference(self.variables.loop_break, 0), - ), - ] - ) - instructions.extend(self._build_quil_instructions_for_seed_transition()) - instructions.extend( - [ - ClassicalAdd( - MemoryReference(self.variables.seed_loop_index, 0), - 1, - ), - ClassicalAdd( - MemoryReference(self.variables.seed_loop_index, 1), - 1, - ), - ClassicalGreaterEqual( - MemoryReference(self.variables.loop_break, 0), - MemoryReference(self.variables.seed_loop_index, 0), - self._seed_loop_length, - ), - JumpUnless( - Label(self.variables.seed_loop_label), - MemoryReference(self.variables.loop_break, 0), - ), - ] + seed_loop_instructions.extend(inner_loop) + seed_loop_instructions.extend( + self._build_quil_instructions_for_cycle(transition_to_next_seed_on_last_cycle=True) ) - for q in self.qubits_sorted: - instructions.append( - ClassicalMove( - MemoryReference(self.variables.current_seeds(q), 0), - MemoryReference(self.variables.current_seeds(q), 1), - ), - ) - elif self._base_cycle_loop_length >= 1: - for q in self.qubits_sorted: - instructions.append( - ClassicalMove( - MemoryReference(self.variables.current_seeds(q), 0), - MemoryReference(self.variables.pauli_seed(q), 0), - ), - ) + seed_loop = self._build_quil_loop_instructions( + seed_loop_instructions, + loop_label=self.variables.seed_loop_label, + loop_index_variable=self.variables.seed_index, + loop_count=self._seed_loop_length, + loop_index_increment=None, + ) + instructions.extend(seed_loop) if self._base_cycle_loop_length >= 1: - instructions.extend( - [ - ClassicalMove( - MemoryReference(self.variables.base_cycle_loop_index, 0), - 0, - ), - JumpTarget(Label(self.variables.base_cycle_loop_label)), - ] - ) - instructions.extend(self._build_quil_instructions_for_cycle()) - instructions.extend( - [ - ClassicalAdd( - MemoryReference(self.variables.base_cycle_loop_index, 0), - 1, - ), - ClassicalGreaterEqual( - MemoryReference(self.variables.loop_break, 0), - MemoryReference(self.variables.base_cycle_loop_index, 0), - self._base_cycle_loop_length, - ), - JumpUnless( - Label(self.variables.base_cycle_loop_label), - MemoryReference(self.variables.loop_break, 0), - ), - ] + base_loop = self._build_quil_loop_instructions( + self._build_quil_instructions_for_cycle(), + loop_label=self.variables.base_cycle_loop_label, + loop_index_variable=self.variables.base_cycle_loop_index, + loop_count=self._base_cycle_loop_length, ) + instructions.extend(base_loop) - instructions.extend(self._build_quil_instructions_for_final_base_cycle()) + final_base_cycle = self._build_quil_instructions_for_cycle(is_final_base_cycle=True) + instructions.extend(final_base_cycle) return instructions @@ -1265,13 +1064,13 @@ def build_quil_program( """Generate a cycle program with randomized compilation according to the specified configuration.""" program = Program() program += list(build_extern_function_signatures().values()) - program += self._generate_declarations() + program += list(self._generate_declarations()) if self.shots_per_randomization is not None: - program += self.shots_per_randomization.generate_mod_shot_count_block() + program += list(self.shots_per_randomization.generate_mod_shot_count_block()) - for q in self.qubits_sorted: - program += Delay([], [q], self.leading_delay_seconds) + for qubit in self.qubits_sorted: + program += Delay([], [qubit], self.leading_delay_seconds) program += self._build_quil_instructions_for_randomized_compiling_loop() @@ -1301,17 +1100,23 @@ def verify_final_memory( unitaries specified for the (qubit, layer) and verify that the resulting unitary is equal to the twirled unitaries read from the final memory for the (qubit, layer). """ + if shot_count == 0: + raise ValueError("shot_count must be greater than 0 for final memory verification") if self.shots_per_randomization is not None: - prng_sequence_length = shot_count // self.shots_per_randomization.shots_per_randomization + prng_sequence_length = math.ceil(shot_count / self.shots_per_randomization.shots_per_randomization) - 1 + if prng_sequence_length == 0: + raise ValueError( + f"shot_count {shot_count} is too low for the specified shots_per_randomization {self.shots_per_randomization.shots_per_randomization}" + ) else: prng_sequence_length = shot_count if self.variables.unitaries_prefix == self.variables.twirled_unitaries_prefix: - prng_sequence_step_length = 1 - prng_sequence_step_count = prng_sequence_length + prng_sequence_steps = 1 + prng_sequence_count = prng_sequence_length else: - prng_sequence_step_length = prng_sequence_length - prng_sequence_step_count = 1 + prng_sequence_steps = prng_sequence_length + prng_sequence_count = 1 cycles = self._build_two_qubit_base_cycles() * self.base_cycle_repetitions pauli_cache = _PauliSeedAndPairCache( original_seeds={ @@ -1320,25 +1125,26 @@ def verify_final_memory( pauli_conjugates_map=pauli_conjugates_map, cycles=cycles, qubits_sorted=self.qubits_sorted, - prng_sequence_step_length=prng_sequence_step_length, + prng_sequence_steps=prng_sequence_steps, invert_random_paulis=self.invert_random_paulis, ) - pauli_pairs = pauli_cache.accumulate(prng_sequence_step_count) + pauli_pairs = pauli_cache.accumulate(prng_sequence_count) for q in self.qubits_sorted: for layer_index in range(len(cycles) + 1): - seed_index = layer_index // _PAULIS_PER_VALUE key = PauliPairKey( qubit=q, layer_index=layer_index, ) expected_final_seed_value, final_pauli_pair = pauli_pairs[key] - found_final_pauli_seed = final_memory[self.variables.pauli_seed(q)][seed_index] - if found_final_pauli_seed != expected_final_seed_value: - raise ValueError( - f"final seed value mismatch for q{q}, l{layer_index}: got " - f"{found_final_pauli_seed}, expected {expected_final_seed_value}" - ) + if expected_final_seed_value is not None: + seed_index = layer_index // _PAULIS_PER_VALUE + found_final_pauli_seed = final_memory[self.variables.pauli_seed(q)][seed_index] + if _i48_to_u48(int(found_final_pauli_seed)) != expected_final_seed_value: + raise ValueError( + f"final seed value mismatch for q{q}, l{layer_index}: got " + f"{found_final_pauli_seed}, expected {expected_final_seed_value}" + ) start_angle = layer_index * _ANGLES_PER_UNITARY end_angle = start_angle + _ANGLES_PER_UNITARY found_final_unitary_angles = tuple( @@ -1357,10 +1163,10 @@ def verify_final_memory( ) sub_region_count = len(source_unitary_angles) // _ANGLES_PER_UNITARY seed_value = int(original_memory[self.readout_randomization.variables.readout_seed(q)][0]) - final_index = choose_random_real_sub_region_indices( + final_region_index = choose_random_real_sub_region_indices( PrngSeedValue(seed_value), shot_count - 1, 1, sub_region_count )[0] - start_index = final_index * _ANGLES_PER_UNITARY + start_index = final_region_index * _ANGLES_PER_UNITARY source_unitary_angles = source_unitary_angles[start_index : start_index + _ANGLES_PER_UNITARY] else: source_unitary_angles = tuple( @@ -1369,23 +1175,26 @@ def verify_final_memory( expected_unitary = _compute_expected_merged_unitary(source_unitary_angles, final_pauli_pair) if not _unitary_equal(found_final_unitary, expected_unitary): raise ValueError( - f"unitary mismatch for q{q} layer {layer_index}: got {found_final_unitary_angles}, " - f"expected {source_unitary_angles}, pauli pair: {final_pauli_pair}" + f"unitary mismatch for q{q} layer {layer_index}: got {found_final_unitary_angles} " + f"for source {source_unitary_angles} and final pauli pair: {final_pauli_pair}" ) def track_pauli_frames( self, sequence_count: int, pauli_conjugates_map: Mapping[tuple[PauliLiteral, PauliLiteral], tuple[PauliLiteral, PauliLiteral]], - random_seeds: RandomSeeds + random_seeds: RandomSeeds, ) -> Generator[dict[PauliPairKey, tuple[int | None, tuple[PauliLiteral, PauliLiteral]]], None, None]: cycles = self._build_two_qubit_base_cycles() * self.base_cycle_repetitions pauli_cache = _PauliSeedAndPairCache( - original_seeds={q: random_seeds.randomized_compiling[qubit_index].tolist() for qubit_index, q in enumerate(self.qubits_sorted)}, + original_seeds={ + q: random_seeds.randomized_compiling[qubit_index].tolist() + for qubit_index, q in enumerate(self.qubits_sorted) + }, pauli_conjugates_map=pauli_conjugates_map, cycles=cycles, qubits_sorted=self.qubits_sorted, - prng_sequence_step_length=1, + prng_sequence_steps=1, invert_random_paulis=self.invert_random_paulis, ) for sequence_index in range(sequence_count): @@ -1393,3 +1202,9 @@ def track_pauli_frames( yield pauli_pairs if sequence_index < sequence_count: pauli_cache = next(pauli_cache) + + +def _i48_to_u48(value: int) -> int: + if value < 0: + value = (-value ^ _MAX_SEQUENCER_VALUE) + 1 + return value diff --git a/test/e2e/test_qpu_randomized_compiling.py b/test/e2e/test_qpu_randomized_compiling.py new file mode 100644 index 000000000..dc6f3e57d --- /dev/null +++ b/test/e2e/test_qpu_randomized_compiling.py @@ -0,0 +1,200 @@ +from pyquil.quilbase import Declare +import pytest + +import numpy as np +from numpy.typing import NDArray +from scipy.stats import unitary_group +from qcs_sdk.client import QCSClient +from qcs_sdk.qpu.api import ExecutionOptionsBuilder, retrieve_results, submit +from qcs_sdk.qpu.translation import translate, TranslationResult + +from pyquil import gates +from pyquil.quil import Program +from pyquil._qpu import _randomized_compiling as rc + + +def _get_bitstrings_and_final_memory( + live_quantum_processor_id: str, + translation_result: TranslationResult, + memory_map: dict[str, list[int] | list[float]], + execution_options: ExecutionOptionsBuilder, + qcs_client: QCSClient, +) -> tuple[NDArray[np.int8], dict[str, list[int] | list[float]]]: + job_id = submit(translation_result.program, memory_map, live_quantum_processor_id, qcs_client, execution_options.build()) + results = retrieve_results( + job_id, + quantum_processor_id=live_quantum_processor_id, + execution_options=execution_options.build(), + client=qcs_client, + ) + final_memory: dict[str, list[int] | list[float]] = {k: v.inner() for k, v in results.memory.items()} + [execution_result for name, execution_result in results.buffers.items() if "_classified" in name] + return np.array( + [execution_result.data for name, execution_result in results.buffers.items() if "_classified" in name] + ).transpose(), final_memory + +_TEST_BASE_CYCLES = (((0, 1), (2, 3), (4, 5)), ((1, 2), (3, 4))) +_TEST_QUBITS = tuple(range(6)) +_TETRAHEDRAL_ANGLES = np.array([[ 0.0, 0.5, 0.5], + [-1./4, 0.0, -1./4], + [ 0.0, 0.0, 0.5], + [ 1./4, 0.5, -1./4], + [ 0.0, 1./4, -1./4], + [ 0.5, 1./4, -1./4], + [ 0.5, 1./4, 1./4], + [ 0.0, 1./4, 1./4], + [ -1./4, 1./4, 0.0], + [ 1./4, 1./4, 0.5], + [-1./4, 1./4, 0.5], + [ 1./4, 1./4, 0.0]], dtype=np.float64).flatten().tolist() +_RANDOMIZED_READOUT_ANGLES = {qubit: _TETRAHEDRAL_ANGLES for qubit in _TEST_QUBITS} + +""" +* no loops: 1 cycle +* base cycle only +* seed cycle only (without inner) +* seed cycle only (with inner) +* seed cycle (without inner) + base cycle +* seed cycle (with inner) + base cycle + +Also, + +* case where base cycle length > _PAULIS_PER_VALUE? +""" + + +_TEST_CONFIGURATIONS = [ + # simple base case + rc.RandomizedCompilingConfiguration( + base_cycles=(((0, 1),),), + qubits_sorted=(0, 1), + base_cycle_repetitions=1, + ), + rc.RandomizedCompilingConfiguration( + base_cycles=_TEST_BASE_CYCLES, + qubits_sorted=_TEST_QUBITS, + base_cycle_repetitions=13, + ), + rc.RandomizedCompilingConfiguration( + base_cycles=_TEST_BASE_CYCLES, + qubits_sorted=_TEST_QUBITS, + base_cycle_repetitions=13, + shots_per_randomization=rc.ShotsPerRandomization( + shots_per_randomization=50, + ) + ), + rc.RandomizedCompilingConfiguration( + base_cycles=_TEST_BASE_CYCLES, + qubits_sorted=_TEST_QUBITS, + base_cycle_repetitions=13, + readout_randomization=rc.ReadoutRandomization( + source_unitary_angles=_RANDOMIZED_READOUT_ANGLES, + ) + ), + rc.RandomizedCompilingConfiguration( + base_cycles=_TEST_BASE_CYCLES, + qubits_sorted=_TEST_QUBITS, + base_cycle_repetitions=13, + shots_per_randomization=rc.ShotsPerRandomization( + shots_per_randomization=50, + ), + readout_randomization=rc.ReadoutRandomization( + source_unitary_angles=_RANDOMIZED_READOUT_ANGLES, + ) + ), +] + +@pytest.fixture +def qcs_client() -> QCSClient: + return QCSClient.load() + + +@pytest.fixture +def execution_options() -> ExecutionOptionsBuilder: + return ExecutionOptionsBuilder() + + +@pytest.fixture +def live_quantum_processor_id() -> str: + return "Cepheus-1-108Q" + + +def _sx(qubit: int) -> gates.Gate: + return gates.RX(np.pi / 2, qubit) + + +def _zxzxz(configuration: rc.RandomizedCompilingConfiguration, layer_index: int) -> Program: + program = Program() + for qubit in configuration.qubits_sorted: + program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 0), qubit) + program += _sx(qubit) + program += gates.FENCE(qubit) + + program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 1), qubit) + program += _sx(qubit) + program += gates.FENCE(qubit) + + program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 2), qubit) + return program + + +def _build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> Program: + program = Program() + cycle_count = configuration.base_cycle_repetitions * len(configuration.base_cycles) + 1 + for qubit in configuration.qubits_sorted: + program += Declare(configuration.variables.source_unitaries(qubit), "REAL", cycle_count * rc._ANGLES_PER_UNITARY) + for rep_index in range(configuration.base_cycle_repetitions): + for base_index, cycle in enumerate(configuration.base_cycles): + layer_index = rep_index * len(configuration.base_cycles) + base_index + program += _zxzxz(configuration, layer_index) + for edge in cycle: + program += gates.CZ(edge[0], edge[1]) + program += gates.FENCE(edge[0], edge[1]) + + program += _zxzxz(configuration, configuration.base_cycle_repetitions * len(configuration.base_cycles)) + + return program + +def _generate_source_unitaries(configuration: rc.RandomizedCompilingConfiguration, rng: np.random.Generator) -> dict[str, list[float]]: + source_unitaries = {} + cycle_count = configuration.base_cycle_repetitions * len(configuration.base_cycles) + 1 + for qubit in configuration.qubits_sorted: + source_unitaries[configuration.variables.source_unitaries(qubit)] = rng.uniform(-0.5, 0.5, size=rc._ANGLES_PER_UNITARY * cycle_count).tolist() + return source_unitaries + + +@pytest.mark.parametrize("configuration", _TEST_CONFIGURATIONS) +def test_qpu_randomized_compiling( + live_quantum_processor_id: str, + qcs_client: QCSClient, + execution_options: ExecutionOptionsBuilder, + configuration: rc.RandomizedCompilingConfiguration, +) -> None: + rng = np.random.default_rng(238_992_958) + random_seeds = configuration.generate_seed_values(rng) + program = configuration.build_quil_program() + program += _build_cycle_program(configuration) + + pauli_conjugates_map = rc.PAULI_CONJUGATES_MAPS["CZ"] + memory_map = configuration.build_memory_map(random_seeds, rc.build_memory_values_for_paulis_conjugates_map(pauli_conjugates_map)) + memory_map.update(_generate_source_unitaries(configuration, rng)) + + # FIXME: 2_500 + shot_count = 2_500 + translation_result = translate(program.out(), shot_count, live_quantum_processor_id, qcs_client) + bitstrings, final_memory = _get_bitstrings_and_final_memory( + live_quantum_processor_id, + translation_result, + memory_map, + execution_options=execution_options, + qcs_client=qcs_client, + ) + # FIXME: + with open('program.quil', 'w') as f: + f.write(program.out()) + configuration.verify_final_memory( + final_memory, + memory_map, + shot_count, + pauli_conjugates_map, + ) diff --git a/test/unit/test_qpu_randomized_compiling.py b/test/unit/test_qpu_randomized_compiling.py index e678516d0..e76ea02ce 100644 --- a/test/unit/test_qpu_randomized_compiling.py +++ b/test/unit/test_qpu_randomized_compiling.py @@ -5,6 +5,7 @@ randomized compiling implementation. """ +from dataclasses import dataclass from itertools import product import numpy as np @@ -122,7 +123,7 @@ def test_pauli_frame_tracking(configuration: rc.RandomizedCompilingConfiguration Conjugation assertions assume that the `rc.PAULI_CONJUGATES_MAPS` are correct. """ - rng = np.random.default_rng(seed=685_522_415) + rng = np.random.default_rng(seed=156_548_857) random_seeds = configuration.generate_seed_values(rng) pauli_conjugates_map = rc.PAULI_CONJUGATES_MAPS["CZ"] all_pauli_pairs = list(configuration.track_pauli_frames(10, pauli_conjugates_map, random_seeds)) @@ -209,7 +210,7 @@ def test_pauli_cache_accumulation(configuration: rc.RandomizedCompilingConfigura pauli_conjugates_map=pauli_conjugates_map, cycles=configuration._build_two_qubit_base_cycles() * configuration.base_cycle_repetitions, qubits_sorted=configuration.qubits_sorted, - prng_sequence_step_length=1, + prng_sequence_steps=1, invert_random_paulis=configuration.invert_random_paulis, ) @@ -242,3 +243,110 @@ def test_pauli_cache_accumulation(configuration: rc.RandomizedCompilingConfigura assert ( pauli_pair == expected_pauli_pair ), f"Pauli pair mismatch for qubit {qubit} at layer {layer_index}: expected {expected_pauli_pair}, got {pauli_pair}" + + +@dataclass(frozen=True, kw_only=True) +class LoopingStructureTestCase: + configuration: rc.RandomizedCompilingConfiguration + seed_loop_length: int = 0 + seed_loop_inner_length: int = 0 + base_cycle_loop_length: int = 0 + + +_SIMPLE_TEST_CYCLE = ((0, 1),) + +@pytest.mark.parametrize( + "test_case", + [ + LoopingStructureTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,), + qubits_sorted=(0, 1), + base_cycle_repetitions=1, + ), + ), + LoopingStructureTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,), + qubits_sorted=(0, 1), + base_cycle_repetitions=2, + ), + base_cycle_loop_length=1 + ), + LoopingStructureTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,), + qubits_sorted=(0, 1), + base_cycle_repetitions=24, + ), + base_cycle_loop_length=23 + ), + LoopingStructureTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,), + qubits_sorted=(0, 1), + base_cycle_repetitions=25, + ), + seed_loop_length=1, + seed_loop_inner_length=23, + ), + LoopingStructureTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,) * 2, + qubits_sorted=(0, 1), + base_cycle_repetitions=12, + ), + base_cycle_loop_length=11 + ), + LoopingStructureTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,) * 2, + qubits_sorted=(0, 1), + base_cycle_repetitions=14, + ), + seed_loop_length=1, + seed_loop_inner_length=11, + base_cycle_loop_length=1 + ), + LoopingStructureTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,) * 4, + qubits_sorted=(0, 1), + base_cycle_repetitions=5, + ), + base_cycle_loop_length=4 + ), + LoopingStructureTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,) * 4, + qubits_sorted=(0, 1), + base_cycle_repetitions=7, + ), + seed_loop_length=1, + seed_loop_inner_length=5, + ), + LoopingStructureTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,) * rc._PAULIS_PER_VALUE, + qubits_sorted=(0, 1), + base_cycle_repetitions=7, + ), + base_cycle_loop_length=6, + ), + ], +) +def test_looping_structures(test_case: LoopingStructureTestCase): + assert test_case.configuration._seed_loop_length == test_case.seed_loop_length + assert test_case.configuration._seed_loop_inner_length == test_case.seed_loop_inner_length + assert test_case.configuration._base_cycle_loop_length == test_case.base_cycle_loop_length + expected_total_u2_cycles = test_case.configuration.base_cycle_repetitions * len(test_case.configuration.base_cycles) + 1 + looped_base_cycles = test_case.seed_loop_length * (test_case.seed_loop_inner_length + 1) + test_case.base_cycle_loop_length + # after the seed and base loop cycles, we complete a final base cycle. + completed_base_cycles = looped_base_cycles + 1 + # after the final base cycle completes, we have one more u2 cycle + completed_u2_cycles = completed_base_cycles * len(test_case.configuration.base_cycles) + 1 + assert expected_total_u2_cycles == completed_u2_cycles + + + # assert test_case.configuration.build_quil_program().out() == snapshot + From 142bd3802e62f198d957d431b1460c485af6d589 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 11:02:12 -0700 Subject: [PATCH 17/59] fix: randomized compiling final memory verification --- pyquil/_qpu/_randomized_compiling.py | 310 ++++++++++++++++----- test/e2e/test_qpu_randomized_compiling.py | 38 ++- test/unit/test_qpu_randomized_compiling.py | 17 +- 3 files changed, 274 insertions(+), 91 deletions(-) diff --git a/pyquil/_qpu/_randomized_compiling.py b/pyquil/_qpu/_randomized_compiling.py index 2b9ce5e5b..16f09ed90 100644 --- a/pyquil/_qpu/_randomized_compiling.py +++ b/pyquil/_qpu/_randomized_compiling.py @@ -1,13 +1,23 @@ -"""Test utilities for randomized compilation of two-qubit cycles. +"""A utility for building programs and memory maps for randomized compiling on the QPU. -The test utilities here are built specifically for random compilation with the +The utilities here are built specifically for random compilation with the ZXZXZ unitary decomposition using the "merge_zxzxz_unitary_with_paulis" suite of extern functions. -There are two tests of import here (everything else is a utility for these tests): +The main entrypoint is the `RandomizedCompilingConfiguration` dataclass which can: -* `test_randomized_compilation_flat`: Test randomized compilation on randomly generated mirror circuit. -* `test_randomized_compilation_looped_cases`: Test randomized compilation on a repeat base cycle within a loop. +* build the classical instructions to randomly compile 2Q gate cycles by modifying + the phase angles of the ZXZXZ decomposition (see + `RandomizedCompilingConfiguration.build_quil_program`). +* generate random seeds for drawing random Paulis on the QPU (see + `RandomizedCompilingConfiguration.generate_random_seeds`). +* build a memory map for QPU execution (see `RandomizedCompilingConfiguration.build_memory_map`). +* track Pauli frames on a per shot basis (see `RandomizedCompilingConfiguration.track_pauli_frames`). +* verify the final memory after execution to check that the correct Pauli frames were applied (see + `RandomizedCompilingConfiguration.verify_final_memory`). + +Note, these utilities do not build the cycle program itself nor the source unitaries for that cycle +program. """ import math @@ -49,7 +59,7 @@ _BITS_PER_VALUE = 48 _BITS_PER_PAULI = 2 -_PAULIS_PER_VALUE = _BITS_PER_VALUE // _BITS_PER_PAULI +_MAX_PAULIS_PER_VALUE = _BITS_PER_VALUE // _BITS_PER_PAULI _ANGLES_PER_UNITARY = 3 _NUMBER_PAULI_PAIRS = 16 @@ -97,6 +107,12 @@ def _generate_lfsr_v1_sequence(seed_value: int, start_index: int, count: int) -> @dataclass(frozen=True, kw_only=True) class PauliPairKey: + """A key for looking up the random Pauli pair for a specific qubit and layer index. + + This key is used within the context of a single shot of the cycle program. See + `RandomizedCompilingConfiguration.track_pauli_frames` for more details. + """ + qubit: int layer_index: int @@ -116,10 +132,17 @@ class _PauliSeedAndPairCache: qubits_sorted: tuple[int, ...] invert_random_paulis: bool pauli_pairs: dict[PauliPairKey, tuple["PauliLiteral", "PauliLiteral"]] = field(default_factory=dict, init=False) + paulis_per_value: int def accumulate( self, sequence_count: int ) -> "dict[PauliPairKey, tuple[int | None, tuple[PauliLiteral, PauliLiteral]]]": + """Iterate over the requested `sequence_count` and accumulate the final Pauli pair for each qubit and layer index. + + "Accumulation" in this context means applying random Pauli pair successively over the sequence count. This + is useful in the context where the twirled unitary angles are overwritten each shot and, therefore, the Paulis + accumulate over the shot sequence rather than act independently. + """ current = self pauli_pairs = {} for sequence_index in range(sequence_count): @@ -138,6 +161,11 @@ def accumulate( return pauli_pairs def __next__(self) -> Self: + """Return the "next" cache in the sequence. + + This returns a fresh cache with the original seeds set to the final seed values from this cache. + The "next" cache thus implies that the sequence advances by "prng_sequence_steps". + """ return _PauliSeedAndPairCache( prng_sequence_steps=self.prng_sequence_steps, original_seeds=self._final_seeds, @@ -145,6 +173,7 @@ def __next__(self) -> Self: cycles=self.cycles, qubits_sorted=self.qubits_sorted, invert_random_paulis=self.invert_random_paulis, + paulis_per_value=self.paulis_per_value, ) @cached_property @@ -158,7 +187,7 @@ def _final_seeds(self) -> dict[int, tuple[int, ...]]: return final_seeds def _get_random_pauli_for_seed_value(self, seed_value: int, layer_index: int) -> "PauliLiteral": - pauli_index = layer_index % _PAULIS_PER_VALUE + pauli_index = layer_index % self.paulis_per_value return PauliLiteral(seed_value >> (2 * pauli_index) & 0b11) def _get_previous_random_pauli(self, key: PauliPairKey) -> "PauliLiteral": @@ -194,7 +223,7 @@ def __getitem__(self, key: PauliPairKey) -> tuple[int | None, tuple["PauliLitera previous_conjugate = self._get_previous_random_pauli(key) self.pauli_pairs[key] = (previous_conjugate, next_pauli) return None, self.pauli_pairs[key] - seed_index = layer_index // _PAULIS_PER_VALUE + seed_index = layer_index // self.paulis_per_value seed_value = self._final_seeds[q][seed_index] if key not in self.pauli_pairs: next_pauli = self._get_random_pauli_for_seed_value(seed_value, layer_index) @@ -213,6 +242,12 @@ def _radians_to_cycles(region_name: str, index: int) -> Expression: def _lfsr_v1_next(seed: int) -> int: + """Return the next value in the PRNG sequence available on the QPU. + + This implementation is necessary as `qcs_sdk.qpu.experimental.random` does not currently have a way to get + expose the inner value of the `PrngSeedValue` to Python; we can drop this in favor of the QCS SDK version + once pyQuil updates to a version of the QCS SDK that has this capability. + """ feedback_value = 0 for tap in _TAPS: base = 1 << tap @@ -258,13 +293,12 @@ class ShotsPerRandomizationVariables: class ShotsPerRandomization: """Configuration for randomizing angles every N shots. - We test this specific circuit construction in order to verify that we use - randomized compilation with active reset without incurring the overhead of - randomizing every shot. + This configuration may be useful in the context of active reset so as to avoid the + overhead of randomizing every shot. """ shots_per_randomization: int - secondary_delay_seconds: float | None = None + secondary_delay_seconds: float | None = 2e-4 variables: ShotsPerRandomizationVariables = field(default_factory=ShotsPerRandomizationVariables) @property @@ -307,6 +341,8 @@ def generate_mod_shot_count_block(self) -> tuple[InstructionDesignator, ...]: @dataclass(frozen=True, kw_only=True) class ReadoutRandomizationVariables: + """Memory variable names for readout randomization.""" + readout_seed_prefix: str = "readout_seed" source_unitaries_prefix: str = "readout_source_unitaries" readout_randomization_prefix: str = "readout_randomization" @@ -327,6 +363,10 @@ class ReadoutRandomization: variables: ReadoutRandomizationVariables = field(default_factory=ReadoutRandomizationVariables) source_unitary_angles: Mapping[int, Sequence[float]] + """A map from qubit to the memory values representing the source unitaries for readout randomization. + + Angles must be provided as cycles (not radians). The length of each sequence must be a multiple of 3. + """ def __post_init__(self) -> None: self._validate() @@ -460,15 +500,16 @@ def all(cls) -> tuple["PauliLiteral", ...]: } ), } +"""Maps from each Pauli pair to its conjugate under the specified two-qubit gate.""" def build_memory_values_for_paulis_conjugates_map( pauli_conjugates_map: Mapping[tuple["PauliLiteral", "PauliLiteral"], tuple["PauliLiteral", "PauliLiteral"]], ) -> list[int] | list[float]: - """Build a map from each Pauli pair to its conjugate under the specified two-qubit gate. + """Convert a Pauli conjugates map to a list of integers representing the next Pauli pair for each previous Pauli pair. - This essentially translates `PAULI_CONJUGATES_MAPS` from a map of string to string to a map - of int to int, which can be used as a Quil memory reference for conjugation lookup on the QPU. + The result may be supplied as the memory values for the `pauli_conjugates_map` memory region on the QPU (see + `RandomizedCompilingVariables.pauli_conjugates_map`). """ memory_values: list[int | None] = [None] * _NUMBER_PAULI_PAIRS for previous_paulis, next_paulis in pauli_conjugates_map.items(): @@ -482,7 +523,7 @@ def build_memory_values_for_paulis_conjugates_map( class _PauliReference(_ToQuilCallArguments): """A Pauli specified by reference to shared memory on the QPU. - We fit `_PAULIS_PER_VALUE` in a single word of shared memory, so the precise + We fit a given number of Paulis in a single word of shared memory, so the precise Pauli within this word is specified by `pauli_index` (the control system will shift and mask bits to get the two bit Pauli representation). """ @@ -603,6 +644,8 @@ def _compute_expected_merged_unitary( @dataclass(frozen=True, kw_only=True) class RandomizedCompilingVariables: + """Memory variable names for randomized compiling.""" + seed_loop_label: str = "rc_seed_loop" seed_index: str = "rc_seed_index" seed_loop_inner_label: str = "rc_seed_loop_inner" @@ -637,12 +680,39 @@ def pauli_seed(self, qubit: int) -> str: @dataclass(frozen=True, kw_only=True) class RandomSeeds: + """The random seeds for each qubit used to generate the random Paulis on the QPU.""" + randomized_compiling: NDArray[np.int64] + """ + Random seeds for generating random Paulis for randomized compiling. Shape is + (qubit_count, seed_length) where seed_length is determined by the number of layers and + the number of Paulis per seed value. + """ + readout: NDArray[np.int64] | None = None + """ + Random seeds for selecting random unitaries for readout randomization. + Shape is (qubit_count,). + """ @dataclass(frozen=True, kw_only=True) class _PauliCursor: + """Tracks the memory location of the previous and next Paulis. + + In order to effectively loop over random compilation seeds on the QPU to support deeper + circuits, throughout the Quil program, we point to the `RandomCompilingVariables.current_seeds` + at specific offsets representing different `_PauliReference`s. + + More specifically, the previous Pauli is generally at `_PauliReference` pointing to the first + Pauli at `current_seeds[0]` and Pauli index 0, while the next Pauli is at `current_seeds[1]` + and Pauli index 0. + + The exception is after we transition from one seed value to the next, in which case the + previous Pauli is at `current_seeds[1]` Pauli index 0 and the next Pauli is at `current_seeds[0]` + Pauli index 0. + """ + previous_seed_index: int = 0 previous_seed_pauli_index: int = 0 next_seed_pauli_index: int = 1 @@ -665,32 +735,104 @@ def previous_ref(self, current_seed_name: str) -> _PauliReference: @dataclass(frozen=True, kw_only=True) class RandomizedCompilingConfiguration: - """A test utility for build a randomly compiled program using a loop structure over repeated base cycles.""" + """A utility for configuring randomized compiling on a Rigetti QPU. + + This class supports the following functionality: + + * Building a Quil program that applies random Pauli gates in sequence according to specified + base cycles and twirls the angles of the specified ZXZXZ unitaries accordingly (see + `build_quil_program`). + * Generating the random seeds for the random Paulis on the QPU given a numpy random generator and + the number of qubits and layers (see `generate_random_seeds`). + * Building a memory map for QPU execution (see `build_memory_map`). + * Tracking the Paulis played on each qubit at each layer over a sequence of shots (see + `track_pauli_frames`). + * Verifying that the final memory read off the QPU is consistent with the expected random Paulis calculated + on the client (see `verify_final_paulis`)that the final memory read off the QPU is consistent with the expected random Paulis calculated + on the client (see `verify_final_paulis`) and, more generally, verifying + + This class does not: + + * build the gate program. + * generate source unitaries for the gate program. + """ base_cycles: tuple[tuple[_TEdge, ...], ...] + """ + A list of cycles (which itself is a list of edges) representing the base cycles to apply in sequence + for randomized compiling. + + The length must be either a multiple of _MAX_PAULIS_PER_VALUE or less than or equal to + _MAX_PAULIS_PER_VALUE (24). + """ + qubits_sorted: tuple[int, ...] + """ + All qubits involved in the circuit. This may include qubits that are not included in any edge + of the base cycles. + """ + base_cycle_repetitions: int + """ + The number of times to repeat the full set of base cycles. + + Note maximum execution efficiency is achieved by configuring the (base cycle length * repetitions) to be + equal to `_base_cycle_length` plus some multiple of `_paulis_per_value / _base_cycle_length`. For instance, + given a base cycle length 4, `_paulis_per_value` is 24. Choosing 16 repetitions, `4 * 16 = 64` and + `4 + (24 / 4) * 10 = 64`. + """ + variables: RandomizedCompilingVariables = field(default_factory=RandomizedCompilingVariables) + """Configuration for variable naming conventions in the generated Quil program.""" + leading_delay_seconds: float = 2e-4 + """The delay to insert before starting the gate program.""" + readout_randomization: ReadoutRandomization | None = None - """Whether to apply readout randomization to the final layer.""" + """Configuration for using readout randomization in conjunction with randomized compiling.""" shots_per_randomization: ShotsPerRandomization | None = None - """Number of shots per randomization.""" + """Configuration for randomizing only a subset of shots.""" invert_random_paulis: bool = True + """ + Whether to invert the random Paulis from the previous layer. Setting this to False may be useful + in conjuction with `track_pauli_frames`. + """ def __post_init__(self) -> None: self._validate() def _validate(self) -> None: - if _PAULIS_PER_VALUE % self._base_cycle_length != 0: + if self._base_cycle_length > _MAX_PAULIS_PER_VALUE and self._base_cycle_length % _MAX_PAULIS_PER_VALUE != 0: raise ValueError( - f"Base cycle length must be a multiple of {_PAULIS_PER_VALUE}, but got {self._base_cycle_length}." + f"Base cycle length must be a multiple of {_MAX_PAULIS_PER_VALUE} if it exceeds {_MAX_PAULIS_PER_VALUE}, but got {self._base_cycle_length}." ) if self.base_cycle_repetitions <= 0: raise ValueError(f"Base cycle repetitions must be greater than 0, but got {self.base_cycle_repetitions}.") + @property + def _paulis_per_value(self) -> int: + """The number of Paulis reprensented in a single INTEGER memory value. + + If the base cycle length is less than `_MAX_PAULIS_PER_VALUE` and it is not a factor of `_MAX_PAULIS_PER_VALUE`, + this will be the largest multiple of the base cycle length that is less than `_MAX_PAULIS_PER_VALUE`. This ensures + transitioning from one seed value to the next within a loop can consistently occur at a given index. For instance, + if the base cycle length is 5, 4 base cycles will fit within a single seed value and `_paulis_per_word` is therefore + 5 * 4 = 20. After the fourth base cycle, we drop the remaining 4 bits (2 Paulis) and transition to the next seed value; + otherwise, we would transition after the second base cycle in the next iteration, which adds substantial complexity + to the program at runtime. + + This assumes that when the base cycle length exceeds `_MAX_PAULIS_PER_VALUE`, the base cycle length is a multiple of + `_MAX_PAULIS_PER_VALUE`, which is validated in `__post_init__`. + """ + if self._base_cycle_length > _MAX_PAULIS_PER_VALUE: + return _MAX_PAULIS_PER_VALUE + elif _MAX_PAULIS_PER_VALUE % self._base_cycle_length == 0: + return _MAX_PAULIS_PER_VALUE + else: + return self._base_cycle_length * math.floor(_MAX_PAULIS_PER_VALUE / self._base_cycle_length) + @property def _base_cycle_length(self) -> int: return len(self.base_cycles) @@ -701,24 +843,24 @@ def _cycle_count(self) -> int: @property def _seed_length(self) -> int: - return math.ceil(self._cycle_count / _PAULIS_PER_VALUE) + return math.ceil(self._cycle_count / self._paulis_per_value) @property def _seed_loop_length(self) -> int: - if self._base_cycle_length < _PAULIS_PER_VALUE: + if self._base_cycle_length < self._paulis_per_value: return self._seed_length - 1 return 0 @property def _seed_loop_inner_length(self) -> int: if self._seed_loop_length >= 1: - return _PAULIS_PER_VALUE // self._base_cycle_length - 1 + return self._paulis_per_value // self._base_cycle_length - 1 else: return 0 @property def _base_cycle_loop_length(self) -> int: - base_cycles_per_seed_value = _PAULIS_PER_VALUE // self._base_cycle_length + base_cycles_per_seed_value = self._paulis_per_value // self._base_cycle_length completed_base_cycles = self._seed_loop_length * base_cycles_per_seed_value if self._base_cycle_length == 1: total_required_u2_cycles = self.base_cycle_repetitions + 1 @@ -783,6 +925,10 @@ def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: return tuple(declarations) def generate_seed_values(self, rng: np.random.Generator) -> RandomSeeds: + """Generate random seed values for the random Paulis on the QPU. + + This will also include readout randomization seeds if `self.readout_randomization` is not None. + """ size = (len(self.qubits_sorted), self._seed_length) randomized_compiling_seeds = rng.integers(0, _MAX_SEQUENCER_VALUE + 1, size=size, dtype=np.int64) readout_seeds = None @@ -795,6 +941,10 @@ def build_memory_map( random_seeds: RandomSeeds, pauli_conjugates_map: list[int] | list[float], ) -> dict[str, list[int] | list[float]]: + """Build the memory map for executing the randomized compiling program on the QPU. + + This does not include the source unitary angles, which must separately be supplied by the user. + """ memory_map: dict[str, list[int] | list[float]] = { self.variables.unitary_angle_offset: [_ANGLES_PER_UNITARY], self.variables.loop_break: [0], @@ -845,8 +995,9 @@ def _build_quil_instructions_for_cycle( for cycle_index, cycle in enumerate(self._build_two_qubit_base_cycles()): is_final_cycle = cycle_index == self._base_cycle_length - 1 + requires_seed_transition = is_final_cycle and transition_to_next_seed_on_last_cycle - requires_seed_transition |= cycle_index > 0 and cycle_index % _PAULIS_PER_VALUE == 0 + requires_seed_transition |= cycle_index > 0 and cycle_index % self._paulis_per_value == 0 if requires_seed_transition: instructions.extend(self._build_quil_instructions_for_seed_transition()) cursor = _PauliCursor.after_seed_transition() @@ -854,6 +1005,31 @@ def _build_quil_instructions_for_cycle( cursor = _PauliCursor() for qubit in self.qubits_sorted: + source_unitaries = self.variables.source_unitaries(qubit) + if is_final_cycle and is_final_base_cycle and self.readout_randomization is not None: + instructions.append( + Call( + "choose_random_real_sub_regions", + [ + inst.CallArgument.from_identifier(self.readout_randomization.variables.readout_randomization(qubit)), + inst.CallArgument.from_identifier(self.readout_randomization.variables.source_unitaries(qubit)), + inst.CallArgument.from_immediate(complex(_ANGLES_PER_UNITARY, 0)), + inst.CallArgument.from_memory_reference( + inst.MemoryReference(self.readout_randomization.variables.readout_seed(qubit), 0) + ), + ], + ) + ) + global_cycle_index = self._base_cycle_length * self.base_cycle_repetitions + for i in range(_ANGLES_PER_UNITARY): + instructions.append( + ClassicalMove( + self.variables.twirled_unitaries_ref(qubit, global_cycle_index, i), + MemoryReference(self.readout_randomization.variables.readout_randomization(qubit), i), + ) + ) + source_unitaries = self.variables.twirled_unitaries(qubit) + edge = cycle[qubit] if qubit in cycle.data else None if self.invert_random_paulis and edge is not None: pauli_left = cursor.previous_ref(self.variables.current_seeds(edge[0])) @@ -880,7 +1056,7 @@ def _build_quil_instructions_for_cycle( instructions.append( pauli_pair.build_quil_call_instruction( inst.CallArgument.from_identifier(self.variables.twirled_unitaries(qubit)), - inst.CallArgument.from_identifier(self.variables.source_unitaries(qubit)), + inst.CallArgument.from_identifier(source_unitaries), inst.CallArgument.from_memory_reference( inst.MemoryReference(self.variables.unitary_angle_offset, 0) ), @@ -910,24 +1086,17 @@ def _build_quil_instructions_for_seed_transition(self) -> list[InstructionDesign instructions: list[InstructionDesignator] = [] instructions.extend( [ - ClassicalLoad( + ClassicalMove( + MemoryReference(self.variables.current_seeds(qubit), 1), MemoryReference(self.variables.current_seeds(qubit), 0), - self.variables.pauli_seed(qubit), - MemoryReference(self.variables.seed_index, 0), ) for qubit in self.qubits_sorted ] ) - instructions.append( - ClassicalAdd( - MemoryReference(self.variables.seed_index, 0), - 1, - ) - ) instructions.extend( [ ClassicalLoad( - MemoryReference(self.variables.current_seeds(qubit), 1), + MemoryReference(self.variables.current_seeds(qubit), 0), self.variables.pauli_seed(qubit), MemoryReference(self.variables.seed_index, 0), ) @@ -941,11 +1110,12 @@ def _build_quil_loop_instructions( instructions: list[InstructionDesignator], loop_label: str, loop_index_variable: str, - loop_count: int, + loop_index_end: int, + loop_index_start: int = 0, loop_index_increment: int | None = 1, ) -> list[InstructionDesignator]: loop_instructions: list[InstructionDesignator] = [] - loop_instructions.append(ClassicalMove(MemoryReference(loop_index_variable, 0), 0)) + loop_instructions.append(ClassicalMove(MemoryReference(loop_index_variable, 0), loop_index_start)) loop_instructions.append(JumpTarget(Label(loop_label))) loop_instructions.extend(instructions) if loop_index_increment is not None: @@ -959,7 +1129,7 @@ def _build_quil_loop_instructions( ClassicalGreaterEqual( MemoryReference(self.variables.loop_break, 0), MemoryReference(loop_index_variable, 0), - loop_count, + loop_index_end, ) ) loop_instructions.append( @@ -1002,17 +1172,11 @@ def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[Instruc inst.CallArgument.from_immediate(complex(0, 0)), ) ) - instructions.extend( - [ - ClassicalMove( - MemoryReference(self.variables.unitary_angle_offset, 0), - _ANGLES_PER_UNITARY, - ), - ClassicalMove( - MemoryReference(self.variables.seed_index, 0), - 0, - ), - ] + instructions.append( + ClassicalMove( + MemoryReference(self.variables.unitary_angle_offset, 0), + _ANGLES_PER_UNITARY, + ), ) for qubit in self.qubits_sorted: instructions.append( @@ -1029,7 +1193,7 @@ def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[Instruc self._build_quil_instructions_for_cycle(), loop_label=self.variables.seed_loop_inner_label, loop_index_variable=self.variables.base_cycle_loop_index, - loop_count=self._seed_loop_inner_length, + loop_index_end=self._seed_loop_inner_length, ) seed_loop_instructions.extend(inner_loop) seed_loop_instructions.extend( @@ -1039,19 +1203,24 @@ def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[Instruc seed_loop_instructions, loop_label=self.variables.seed_loop_label, loop_index_variable=self.variables.seed_index, - loop_count=self._seed_loop_length, - loop_index_increment=None, + loop_index_end=self._seed_loop_length + 1, + loop_index_start=1, ) instructions.extend(seed_loop) + if self._base_cycle_loop_length == 0: + for qubit in self.qubits_sorted: + instructions.append(Delay([], [qubit], self.leading_delay_seconds)) if self._base_cycle_loop_length >= 1: base_loop = self._build_quil_loop_instructions( self._build_quil_instructions_for_cycle(), loop_label=self.variables.base_cycle_loop_label, loop_index_variable=self.variables.base_cycle_loop_index, - loop_count=self._base_cycle_loop_length, + loop_index_end=self._base_cycle_loop_length, ) instructions.extend(base_loop) + for qubit in self.qubits_sorted: + instructions.append(Delay([], [qubit], self.leading_delay_seconds)) final_base_cycle = self._build_quil_instructions_for_cycle(is_final_base_cycle=True) instructions.extend(final_base_cycle) @@ -1061,7 +1230,10 @@ def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[Instruc def build_quil_program( self, ) -> Program: - """Generate a cycle program with randomized compilation according to the specified configuration.""" + """Generate a cycle program with randomized compilation according to the specified configuration. + + Note, this does not include the gate program instructions. + """ program = Program() program += list(build_extern_function_signatures().values()) program += list(self._generate_declarations()) @@ -1069,8 +1241,9 @@ def build_quil_program( if self.shots_per_randomization is not None: program += list(self.shots_per_randomization.generate_mod_shot_count_block()) - for qubit in self.qubits_sorted: - program += Delay([], [qubit], self.leading_delay_seconds) + if self._seed_loop_length == 0 and self._base_cycle_loop_length == 0: + for qubit in self.qubits_sorted: + program += Delay([], [qubit], self.leading_delay_seconds) program += self._build_quil_instructions_for_randomized_compiling_loop() @@ -1094,7 +1267,7 @@ def verify_final_memory( """Verify that the final memory state matches expectations. Specifically, we take the Pauli seeds specified in the original memory map and - generate the expected final random value using `generate_lfsr_v1_sequence` and + generate the expected final random value using `_generate_lfsr_v1_sequence` and the shot count. We then use this final seed to infer the pair of Paulis merged for each qubit at every layer. We can then apply this Pauli pair to the original unitaries specified for the (qubit, layer) and verify that the resulting unitary @@ -1127,6 +1300,7 @@ def verify_final_memory( qubits_sorted=self.qubits_sorted, prng_sequence_steps=prng_sequence_steps, invert_random_paulis=self.invert_random_paulis, + paulis_per_value=self._paulis_per_value, ) pauli_pairs = pauli_cache.accumulate(prng_sequence_count) @@ -1138,7 +1312,7 @@ def verify_final_memory( ) expected_final_seed_value, final_pauli_pair = pauli_pairs[key] if expected_final_seed_value is not None: - seed_index = layer_index // _PAULIS_PER_VALUE + seed_index = layer_index // self._paulis_per_value found_final_pauli_seed = final_memory[self.variables.pauli_seed(q)][seed_index] if _i48_to_u48(int(found_final_pauli_seed)) != expected_final_seed_value: raise ValueError( @@ -1153,21 +1327,18 @@ def verify_final_memory( found_final_unitary = _compute_unitary_from_zxzxz_angles(found_final_unitary_angles) if self.readout_randomization is not None and layer_index == len(cycles): - source_unitary_angles = tuple( - int(angle) - for angle in original_memory[self.readout_randomization.variables.source_unitaries(q)] - ) - if len(source_unitary_angles) % _ANGLES_PER_UNITARY != 0: + all_source_unitary_angles = tuple(original_memory[self.readout_randomization.variables.source_unitaries(q)]) + if len(all_source_unitary_angles) % _ANGLES_PER_UNITARY != 0: raise ValueError( - f"source unitary angle count must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(source_unitary_angles)}" + f"source unitary angle count must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(all_source_unitary_angles)}" ) - sub_region_count = len(source_unitary_angles) // _ANGLES_PER_UNITARY + sub_region_count = len(all_source_unitary_angles) // _ANGLES_PER_UNITARY seed_value = int(original_memory[self.readout_randomization.variables.readout_seed(q)][0]) final_region_index = choose_random_real_sub_region_indices( - PrngSeedValue(seed_value), shot_count - 1, 1, sub_region_count + PrngSeedValue(seed_value), prng_sequence_length - 1, 1, sub_region_count )[0] start_index = final_region_index * _ANGLES_PER_UNITARY - source_unitary_angles = source_unitary_angles[start_index : start_index + _ANGLES_PER_UNITARY] + source_unitary_angles = all_source_unitary_angles[start_index : start_index + _ANGLES_PER_UNITARY] else: source_unitary_angles = tuple( original_memory[self.variables.source_unitaries(q)][start_angle:end_angle] @@ -1196,6 +1367,7 @@ def track_pauli_frames( qubits_sorted=self.qubits_sorted, prng_sequence_steps=1, invert_random_paulis=self.invert_random_paulis, + paulis_per_value=self._paulis_per_value, ) for sequence_index in range(sequence_count): pauli_pairs = pauli_cache.accumulate(1) diff --git a/test/e2e/test_qpu_randomized_compiling.py b/test/e2e/test_qpu_randomized_compiling.py index dc6f3e57d..33ea3f44f 100644 --- a/test/e2e/test_qpu_randomized_compiling.py +++ b/test/e2e/test_qpu_randomized_compiling.py @@ -50,31 +50,36 @@ def _get_bitstrings_and_final_memory( _RANDOMIZED_READOUT_ANGLES = {qubit: _TETRAHEDRAL_ANGLES for qubit in _TEST_QUBITS} """ -* no loops: 1 cycle -* base cycle only -* seed cycle only (without inner) -* seed cycle only (with inner) -* seed cycle (without inner) + base cycle -* seed cycle (with inner) + base cycle - -Also, - * case where base cycle length > _PAULIS_PER_VALUE? """ _TEST_CONFIGURATIONS = [ - # simple base case + # 0) simple base case; no loops required rc.RandomizedCompilingConfiguration( base_cycles=(((0, 1),),), qubits_sorted=(0, 1), base_cycle_repetitions=1, ), + # 1) 4 looped base cycles + final base cycle. rc.RandomizedCompilingConfiguration( base_cycles=_TEST_BASE_CYCLES, qubits_sorted=_TEST_QUBITS, - base_cycle_repetitions=13, + base_cycle_repetitions=5, ), + # 2) 2 seed loop iterations + final base cycle. + rc.RandomizedCompilingConfiguration( + base_cycles=_TEST_BASE_CYCLES, + qubits_sorted=_TEST_QUBITS, + base_cycle_repetitions=25, + ), + # 3) 2 seed loop iterations + 2 base cycle iterations + final base cycle. + rc.RandomizedCompilingConfiguration( + base_cycles=_TEST_BASE_CYCLES, + qubits_sorted=_TEST_QUBITS, + base_cycle_repetitions=27, + ), + # 4) 2 seed loop iterations + 2 base cycle iterations + final base cycle with shots per randomization. rc.RandomizedCompilingConfiguration( base_cycles=_TEST_BASE_CYCLES, qubits_sorted=_TEST_QUBITS, @@ -83,6 +88,7 @@ def _get_bitstrings_and_final_memory( shots_per_randomization=50, ) ), + # 5) rc.RandomizedCompilingConfiguration( base_cycles=_TEST_BASE_CYCLES, qubits_sorted=_TEST_QUBITS, @@ -91,6 +97,7 @@ def _get_bitstrings_and_final_memory( source_unitary_angles=_RANDOMIZED_READOUT_ANGLES, ) ), + # 6) rc.RandomizedCompilingConfiguration( base_cycles=_TEST_BASE_CYCLES, qubits_sorted=_TEST_QUBITS, @@ -175,13 +182,16 @@ def test_qpu_randomized_compiling( program = configuration.build_quil_program() program += _build_cycle_program(configuration) + with open('program.quil', 'w') as f: + f.write(program.out()) + pauli_conjugates_map = rc.PAULI_CONJUGATES_MAPS["CZ"] memory_map = configuration.build_memory_map(random_seeds, rc.build_memory_values_for_paulis_conjugates_map(pauli_conjugates_map)) memory_map.update(_generate_source_unitaries(configuration, rng)) - # FIXME: 2_500 shot_count = 2_500 translation_result = translate(program.out(), shot_count, live_quantum_processor_id, qcs_client) + print(memory_map) bitstrings, final_memory = _get_bitstrings_and_final_memory( live_quantum_processor_id, translation_result, @@ -189,9 +199,7 @@ def test_qpu_randomized_compiling( execution_options=execution_options, qcs_client=qcs_client, ) - # FIXME: - with open('program.quil', 'w') as f: - f.write(program.out()) + configuration.verify_final_memory( final_memory, memory_map, diff --git a/test/unit/test_qpu_randomized_compiling.py b/test/unit/test_qpu_randomized_compiling.py index e76ea02ce..1f9efc660 100644 --- a/test/unit/test_qpu_randomized_compiling.py +++ b/test/unit/test_qpu_randomized_compiling.py @@ -33,6 +33,8 @@ def test_lfsr_v1_next(seed: int, sequence_length: int, expected_value: int): """Test that `rc._lfsr_v1_next` produces the expected value after a given number of iterations for a given seed. + The test cases here were randomly generated and the expected value was generated from the QCS SDK. + Note that `qcs_sdk.qpu.experimental.random.lfsr_v1_next` is _the_ source of truth for the control system PRNG. However, because the current version of the QCS SDK does not expose the inner value of `PrngSeedValue` over the Python API, we have to re-implement the functionality here as a stopgap until we can update the QCS SDK. In the meantime, this test simply tests the Python results against results @@ -72,12 +74,12 @@ def test_pauli_literal_multiplication(): def _get_expected_pauli_pair( - seeds: list[int], layer_index: int, layer_count: int, sequence_index: int + seeds: list[int], layer_index: int, layer_count: int, sequence_index: int, paulis_per_value: int ) -> tuple[int | None, rc.PauliLiteral]: if layer_index == layer_count - 1: return None, rc.PauliLiteral.I - seed_index = layer_index // rc._PAULIS_PER_VALUE - pauli_index = layer_index % rc._PAULIS_PER_VALUE + seed_index = layer_index // paulis_per_value + pauli_index = layer_index % paulis_per_value seed = seeds[seed_index] values = [] for _ in range(sequence_index + 1): @@ -143,7 +145,7 @@ def test_pauli_frame_tracking(configuration: rc.RandomizedCompilingConfiguration key = rc.PauliPairKey(qubit=qubit, layer_index=layer_index) seed, pauli_pair = pauli_pairs[key] expected_seed, expected_next_pauli = _get_expected_pauli_pair( - seeds[qubit], layer_index, len(all_cycles) + 1, sequence_index + seeds[qubit], layer_index, len(all_cycles) + 1, sequence_index, configuration._paulis_per_value ) assert ( seed == expected_seed @@ -212,6 +214,7 @@ def test_pauli_cache_accumulation(configuration: rc.RandomizedCompilingConfigura qubits_sorted=configuration.qubits_sorted, prng_sequence_steps=1, invert_random_paulis=configuration.invert_random_paulis, + paulis_per_value=configuration._paulis_per_value, ) accumulation_steps = 10 @@ -327,7 +330,7 @@ class LoopingStructureTestCase: ), LoopingStructureTestCase( configuration=rc.RandomizedCompilingConfiguration( - base_cycles=(_SIMPLE_TEST_CYCLE,) * rc._PAULIS_PER_VALUE, + base_cycles=(_SIMPLE_TEST_CYCLE,) * rc._MAX_PAULIS_PER_VALUE, qubits_sorted=(0, 1), base_cycle_repetitions=7, ), @@ -336,6 +339,7 @@ class LoopingStructureTestCase: ], ) def test_looping_structures(test_case: LoopingStructureTestCase): + """Test that the provided configuration matches expectations for the loop structure.""" assert test_case.configuration._seed_loop_length == test_case.seed_loop_length assert test_case.configuration._seed_loop_inner_length == test_case.seed_loop_inner_length assert test_case.configuration._base_cycle_loop_length == test_case.base_cycle_loop_length @@ -343,10 +347,9 @@ def test_looping_structures(test_case: LoopingStructureTestCase): looped_base_cycles = test_case.seed_loop_length * (test_case.seed_loop_inner_length + 1) + test_case.base_cycle_loop_length # after the seed and base loop cycles, we complete a final base cycle. completed_base_cycles = looped_base_cycles + 1 - # after the final base cycle completes, we have one more u2 cycle + # we add one for the initial cycle (i.e. where there were no previous random Paulis to invert). completed_u2_cycles = completed_base_cycles * len(test_case.configuration.base_cycles) + 1 assert expected_total_u2_cycles == completed_u2_cycles - # assert test_case.configuration.build_quil_program().out() == snapshot From cdccf9e6fae9d6da07730a3a05d7dcfb8025361a Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 12:51:27 -0700 Subject: [PATCH 18/59] fix: do not shift before seed transitions --- pyquil/_qpu/_randomized_compiling.py | 30 +++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/pyquil/_qpu/_randomized_compiling.py b/pyquil/_qpu/_randomized_compiling.py index 16f09ed90..41c26f0b2 100644 --- a/pyquil/_qpu/_randomized_compiling.py +++ b/pyquil/_qpu/_randomized_compiling.py @@ -719,7 +719,7 @@ class _PauliCursor: @classmethod def after_seed_transition(cls) -> "_PauliCursor": - return cls(previous_seed_index=1, previous_seed_pauli_index=0, next_seed_pauli_index=0) + return cls(previous_seed_index=1, previous_seed_pauli_index=1, next_seed_pauli_index=0) def next_ref(self, current_seed_name: str) -> _PauliReference: return _PauliReference( @@ -733,6 +733,17 @@ def previous_ref(self, current_seed_name: str) -> _PauliReference: ) +def _requires_seed_transition( + cycle_index: int, + is_final_cycle: bool, + transition_to_next_seed_on_last_cycle: bool, + paulis_per_value: int, +) -> bool: + requires_seed_transition = is_final_cycle and transition_to_next_seed_on_last_cycle + requires_seed_transition |= (cycle_index + 1) % paulis_per_value == 0 + return requires_seed_transition + + @dataclass(frozen=True, kw_only=True) class RandomizedCompilingConfiguration: """A utility for configuring randomized compiling on a Rigetti QPU. @@ -995,9 +1006,12 @@ def _build_quil_instructions_for_cycle( for cycle_index, cycle in enumerate(self._build_two_qubit_base_cycles()): is_final_cycle = cycle_index == self._base_cycle_length - 1 - - requires_seed_transition = is_final_cycle and transition_to_next_seed_on_last_cycle - requires_seed_transition |= cycle_index > 0 and cycle_index % self._paulis_per_value == 0 + requires_seed_transition = _requires_seed_transition( + cycle_index=cycle_index, + is_final_cycle=is_final_cycle, + transition_to_next_seed_on_last_cycle=transition_to_next_seed_on_last_cycle, + paulis_per_value=self._paulis_per_value, + ) if requires_seed_transition: instructions.extend(self._build_quil_instructions_for_seed_transition()) cursor = _PauliCursor.after_seed_transition() @@ -1071,7 +1085,13 @@ def _build_quil_instructions_for_cycle( ), ) - if not requires_seed_transition: + next_requires_seed_transition = _requires_seed_transition( + cycle_index=cycle_index + 1, + is_final_cycle=cycle_index + 1 == self._base_cycle_length - 1, + transition_to_next_seed_on_last_cycle=transition_to_next_seed_on_last_cycle, + paulis_per_value=self._paulis_per_value, + ) + if not requires_seed_transition and not next_requires_seed_transition: for q in self.qubits_sorted: instructions.append( ClassicalShiftRight( From 67610a2366eec52203c5d34d9f9055c7816d2726 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 12:58:47 -0700 Subject: [PATCH 19/59] refactor: pauli cursor as enum --- pyquil/_qpu/_randomized_compiling.py | 39 +++++++++++++++-------- test/e2e/test_qpu_randomized_compiling.py | 29 ++++++++--------- 2 files changed, 39 insertions(+), 29 deletions(-) diff --git a/pyquil/_qpu/_randomized_compiling.py b/pyquil/_qpu/_randomized_compiling.py index 41c26f0b2..cbf8b2a4f 100644 --- a/pyquil/_qpu/_randomized_compiling.py +++ b/pyquil/_qpu/_randomized_compiling.py @@ -20,6 +20,7 @@ program. """ +from respx.router import DEFAULT import math from abc import ABC, abstractmethod from collections.abc import Generator, Mapping, Sequence @@ -696,8 +697,7 @@ class RandomSeeds: """ -@dataclass(frozen=True, kw_only=True) -class _PauliCursor: +class _PauliCursor(Enum): """Tracks the memory location of the previous and next Paulis. In order to effectively loop over random compilation seeds on the QPU to support deeper @@ -713,23 +713,34 @@ class _PauliCursor: Pauli index 0. """ - previous_seed_index: int = 0 - previous_seed_pauli_index: int = 0 - next_seed_pauli_index: int = 1 - - @classmethod - def after_seed_transition(cls) -> "_PauliCursor": - return cls(previous_seed_index=1, previous_seed_pauli_index=1, next_seed_pauli_index=0) + DEFAULT_POSITION = 0 + AFTER_SEED_TRANSITION = 1 def next_ref(self, current_seed_name: str) -> _PauliReference: + match self: + case _PauliCursor.DEFAULT_POSITION: + next_pauli_seed_index = 1 + case _PauliCursor.AFTER_SEED_TRANSITION: + next_pauli_seed_index = 0 + case _: + raise ValueError(f"invalid Pauli cursor: {self}") return _PauliReference( - memory_reference=inst.MemoryReference(current_seed_name, 0), pauli_index=self.next_seed_pauli_index + memory_reference=inst.MemoryReference(current_seed_name, 0), pauli_index=next_pauli_seed_index ) def previous_ref(self, current_seed_name: str) -> _PauliReference: + match self: + case _PauliCursor.DEFAULT_POSITION: + previous_seed_index = 0 + previous_seed_pauli_index = 0 + case _PauliCursor.AFTER_SEED_TRANSITION: + previous_seed_index = 1 + previous_seed_pauli_index = 1 + case _: + raise ValueError(f"invalid Pauli cursor: {self}") return _PauliReference( - memory_reference=inst.MemoryReference(current_seed_name, self.previous_seed_index), - pauli_index=self.previous_seed_pauli_index, + memory_reference=inst.MemoryReference(current_seed_name, previous_seed_index), + pauli_index=previous_seed_pauli_index, ) @@ -1014,9 +1025,9 @@ def _build_quil_instructions_for_cycle( ) if requires_seed_transition: instructions.extend(self._build_quil_instructions_for_seed_transition()) - cursor = _PauliCursor.after_seed_transition() + cursor = _PauliCursor.AFTER_SEED_TRANSITION else: - cursor = _PauliCursor() + cursor = _PauliCursor.DEFAULT_POSITION for qubit in self.qubits_sorted: source_unitaries = self.variables.source_unitaries(qubit) diff --git a/test/e2e/test_qpu_randomized_compiling.py b/test/e2e/test_qpu_randomized_compiling.py index 33ea3f44f..bd662af00 100644 --- a/test/e2e/test_qpu_randomized_compiling.py +++ b/test/e2e/test_qpu_randomized_compiling.py @@ -191,18 +191,17 @@ def test_qpu_randomized_compiling( shot_count = 2_500 translation_result = translate(program.out(), shot_count, live_quantum_processor_id, qcs_client) - print(memory_map) - bitstrings, final_memory = _get_bitstrings_and_final_memory( - live_quantum_processor_id, - translation_result, - memory_map, - execution_options=execution_options, - qcs_client=qcs_client, - ) - - configuration.verify_final_memory( - final_memory, - memory_map, - shot_count, - pauli_conjugates_map, - ) + # bitstrings, final_memory = _get_bitstrings_and_final_memory( + # live_quantum_processor_id, + # translation_result, + # memory_map, + # execution_options=execution_options, + # qcs_client=qcs_client, + # ) + + # configuration.verify_final_memory( + # final_memory, + # memory_map, + # shot_count, + # pauli_conjugates_map, + # ) From c7bbbcf92473bab0f08a9f4253b2fda4f7436e0d Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 13:05:38 -0700 Subject: [PATCH 20/59] test: do not declare final unitary layer with readout randomization --- test/e2e/test_qpu_randomized_compiling.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/e2e/test_qpu_randomized_compiling.py b/test/e2e/test_qpu_randomized_compiling.py index bd662af00..f58528312 100644 --- a/test/e2e/test_qpu_randomized_compiling.py +++ b/test/e2e/test_qpu_randomized_compiling.py @@ -148,6 +148,9 @@ def _zxzxz(configuration: rc.RandomizedCompilingConfiguration, layer_index: int) def _build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> Program: program = Program() cycle_count = configuration.base_cycle_repetitions * len(configuration.base_cycles) + 1 + if configuration.readout_randomization is not None: + # in the case of readout randomization, the final base cycle is replaced by readout randomization unitaries. + cycle_count -= 1 for qubit in configuration.qubits_sorted: program += Declare(configuration.variables.source_unitaries(qubit), "REAL", cycle_count * rc._ANGLES_PER_UNITARY) for rep_index in range(configuration.base_cycle_repetitions): @@ -165,6 +168,9 @@ def _build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> def _generate_source_unitaries(configuration: rc.RandomizedCompilingConfiguration, rng: np.random.Generator) -> dict[str, list[float]]: source_unitaries = {} cycle_count = configuration.base_cycle_repetitions * len(configuration.base_cycles) + 1 + if configuration.readout_randomization is not None: + # in the case of readout randomization, source unitaries are separately declared. + cycle_count -= 1 for qubit in configuration.qubits_sorted: source_unitaries[configuration.variables.source_unitaries(qubit)] = rng.uniform(-0.5, 0.5, size=rc._ANGLES_PER_UNITARY * cycle_count).tolist() return source_unitaries From afb50c3eefa0c8a37b4511dca9eba24ef09ba71e Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 13:15:51 -0700 Subject: [PATCH 21/59] feat: support global readout randomization source --- pyquil/_qpu/_randomized_compiling.py | 36 +++++++++++++++++++++------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/pyquil/_qpu/_randomized_compiling.py b/pyquil/_qpu/_randomized_compiling.py index cbf8b2a4f..8757e4932 100644 --- a/pyquil/_qpu/_randomized_compiling.py +++ b/pyquil/_qpu/_randomized_compiling.py @@ -20,7 +20,6 @@ program. """ -from respx.router import DEFAULT import math from abc import ABC, abstractmethod from collections.abc import Generator, Mapping, Sequence @@ -363,7 +362,7 @@ class ReadoutRandomization: """Configuration for readout randomization on the final layer.""" variables: ReadoutRandomizationVariables = field(default_factory=ReadoutRandomizationVariables) - source_unitary_angles: Mapping[int, Sequence[float]] + source_unitary_angles: Mapping[int, Sequence[float]] | Sequence[float] """A map from qubit to the memory values representing the source unitaries for readout randomization. Angles must be provided as cycles (not radians). The length of each sequence must be a multiple of 3. @@ -373,14 +372,35 @@ def __post_init__(self) -> None: self._validate() def _validate(self) -> None: - for qubit, angles in self.source_unitary_angles.items(): - if len(angles) % _ANGLES_PER_UNITARY != 0: + if isinstance(self.source_unitary_angles, Sequence): + if len(self.source_unitary_angles) % _ANGLES_PER_UNITARY != 0: raise ValueError( - f"source unitary angles for qubit {qubit} must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(angles)}" + f"source unitary angles must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(self.source_unitary_angles)}" ) + elif isinstance(self.source_unitary_angles, Mapping): + for qubit, angles in self.source_unitary_angles.items(): + if len(angles) % _ANGLES_PER_UNITARY != 0: + raise ValueError( + f"source unitary angles for qubit {qubit} must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(angles)}" + ) + else: + raise ValueError(f"source unitary angles must be a sequence or a mapping, but got {type(self.source_unitary_angles)}") def source_unitary_count(self, qubit: int) -> int: - return len(self.source_unitary_angles[qubit]) // _ANGLES_PER_UNITARY + if isinstance(self.source_unitary_angles, Sequence): + return len(self.source_unitary_angles) // _ANGLES_PER_UNITARY + elif isinstance(self.source_unitary_angles, Mapping): + return len(self.source_unitary_angles[qubit]) // _ANGLES_PER_UNITARY + else: + raise ValueError(f"source unitary angles must be a sequence or a mapping, but got {type(self.source_unitary_angles)}") + + def source_unitary_angles_for_qubit(self, qubit: int) -> Sequence[float]: + if isinstance(self.source_unitary_angles, Sequence): + return self.source_unitary_angles + elif isinstance(self.source_unitary_angles, Mapping): + return self.source_unitary_angles[qubit] + else: + raise ValueError(f"source unitary angles must be a sequence or a mapping, but got {type(self.source_unitary_angles)}") class _ToQuilCallArguments(ABC): @@ -922,7 +942,7 @@ def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: Declare( self.readout_randomization.variables.source_unitaries(q), "REAL", - len(self.readout_randomization.source_unitary_angles[q]), + len(self.readout_randomization.source_unitary_angles_for_qubit(q)), ) ) declarations.append(Declare(self.readout_randomization.variables.readout_randomization(q), "REAL", 3)) @@ -1000,7 +1020,7 @@ def build_memory_map( ] memory_map[self.readout_randomization.variables.readout_randomization(q)] = [0] * _ANGLES_PER_UNITARY memory_map[self.readout_randomization.variables.source_unitaries(q)] = list( - self.readout_randomization.source_unitary_angles[q] + self.readout_randomization.source_unitary_angles_for_qubit(q) ) return memory_map From 97c1ee9dc2f773f8a47c7fa07febe6e2e6de469b Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 13:18:54 -0700 Subject: [PATCH 22/59] test: add snapshot tests for randomized compiling --- .../test_qpu_randomized_compiling.ambr | 822 ++++++++++++++++++ test/unit/test_qpu_randomized_compiling.py | 4 +- 2 files changed, 824 insertions(+), 2 deletions(-) create mode 100644 test/unit/__snapshots__/test_qpu_randomized_compiling.ambr diff --git a/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr new file mode 100644 index 000000000..84d120dd0 --- /dev/null +++ b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr @@ -0,0 +1,822 @@ +# serializer version: 1 +# name: test_looping_structures[test_case0] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[1] + DECLARE pauli_seed_q1 INTEGER[1] + DECLARE twirled_unitaries_q0 REAL[6] + DECLARE twirled_unitaries_q1 REAL[6] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE current_seeds_q0 INTEGER[1] + DECLARE current_seeds_q1 INTEGER[1] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- +# name: test_looping_structures[test_case1] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[1] + DECLARE pauli_seed_q1 INTEGER[1] + DECLARE twirled_unitaries_q0 REAL[9] + DECLARE twirled_unitaries_q1 REAL[9] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[1] + DECLARE current_seeds_q1 INTEGER[1] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_base_cycle_loop + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 1 + JUMP-UNLESS @rc_base_cycle_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- +# name: test_looping_structures[test_case2] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[1] + DECLARE pauli_seed_q1 INTEGER[1] + DECLARE twirled_unitaries_q0 REAL[75] + DECLARE twirled_unitaries_q1 REAL[75] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[1] + DECLARE current_seeds_q1 INTEGER[1] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_base_cycle_loop + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 23 + JUMP-UNLESS @rc_base_cycle_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- +# name: test_looping_structures[test_case3] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[2] + DECLARE pauli_seed_q1 INTEGER[2] + DECLARE twirled_unitaries_q0 REAL[78] + DECLARE twirled_unitaries_q1 REAL[78] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_seed_index INTEGER[2] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[2] + DECLARE current_seeds_q1 INTEGER[2] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_seed_index[0] 1 + LABEL @rc_seed_loop + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_seed_loop_inner + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 23 + JUMP-UNLESS @rc_seed_loop_inner break[0] + MOVE current_seeds_q0[1] current_seeds_q0[0] + MOVE current_seeds_q1[1] current_seeds_q1[0] + LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] + LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + ADD rc_seed_index[0] 1 + GE break[0] rc_seed_index[0] 2 + JUMP-UNLESS @rc_seed_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- +# name: test_looping_structures[test_case4] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[1] + DECLARE pauli_seed_q1 INTEGER[1] + DECLARE twirled_unitaries_q0 REAL[75] + DECLARE twirled_unitaries_q1 REAL[75] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[1] + DECLARE current_seeds_q1 INTEGER[1] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_base_cycle_loop + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 11 + JUMP-UNLESS @rc_base_cycle_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- +# name: test_looping_structures[test_case5] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[2] + DECLARE pauli_seed_q1 INTEGER[2] + DECLARE twirled_unitaries_q0 REAL[87] + DECLARE twirled_unitaries_q1 REAL[87] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_seed_index INTEGER[2] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[2] + DECLARE current_seeds_q1 INTEGER[2] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_seed_index[0] 1 + LABEL @rc_seed_loop + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_seed_loop_inner + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 11 + JUMP-UNLESS @rc_seed_loop_inner break[0] + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + MOVE current_seeds_q0[1] current_seeds_q0[0] + MOVE current_seeds_q1[1] current_seeds_q1[0] + LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] + LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + ADD rc_seed_index[0] 1 + GE break[0] rc_seed_index[0] 2 + JUMP-UNLESS @rc_seed_loop break[0] + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_base_cycle_loop + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 1 + JUMP-UNLESS @rc_base_cycle_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- +# name: test_looping_structures[test_case6] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[1] + DECLARE pauli_seed_q1 INTEGER[1] + DECLARE twirled_unitaries_q0 REAL[63] + DECLARE twirled_unitaries_q1 REAL[63] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[1] + DECLARE current_seeds_q1 INTEGER[1] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_base_cycle_loop + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 4 + JUMP-UNLESS @rc_base_cycle_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- +# name: test_looping_structures[test_case7] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[2] + DECLARE pauli_seed_q1 INTEGER[2] + DECLARE twirled_unitaries_q0 REAL[87] + DECLARE twirled_unitaries_q1 REAL[87] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_seed_index INTEGER[2] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[2] + DECLARE current_seeds_q1 INTEGER[2] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_seed_index[0] 1 + LABEL @rc_seed_loop + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_seed_loop_inner + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 5 + JUMP-UNLESS @rc_seed_loop_inner break[0] + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + MOVE current_seeds_q0[1] current_seeds_q0[0] + MOVE current_seeds_q1[1] current_seeds_q1[0] + LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] + LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + ADD rc_seed_index[0] 1 + GE break[0] rc_seed_index[0] 2 + JUMP-UNLESS @rc_seed_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- +# name: test_looping_structures[test_case8] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[7] + DECLARE pauli_seed_q1 INTEGER[7] + DECLARE twirled_unitaries_q0 REAL[507] + DECLARE twirled_unitaries_q1 REAL[507] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[1] + DECLARE current_seeds_q1 INTEGER[1] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] + CALL prng_set_seed_and_step pauli_seed_q0[2] pauli_seed_q0[2] + CALL prng_set_seed_and_step pauli_seed_q0[3] pauli_seed_q0[3] + CALL prng_set_seed_and_step pauli_seed_q0[4] pauli_seed_q0[4] + CALL prng_set_seed_and_step pauli_seed_q0[5] pauli_seed_q0[5] + CALL prng_set_seed_and_step pauli_seed_q0[6] pauli_seed_q0[6] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] + CALL prng_set_seed_and_step pauli_seed_q1[2] pauli_seed_q1[2] + CALL prng_set_seed_and_step pauli_seed_q1[3] pauli_seed_q1[3] + CALL prng_set_seed_and_step pauli_seed_q1[4] pauli_seed_q1[4] + CALL prng_set_seed_and_step pauli_seed_q1[5] pauli_seed_q1[5] + CALL prng_set_seed_and_step pauli_seed_q1[6] pauli_seed_q1[6] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_base_cycle_loop + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + MOVE current_seeds_q0[1] current_seeds_q0[0] + MOVE current_seeds_q1[1] current_seeds_q1[0] + LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] + LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 6 + JUMP-UNLESS @rc_base_cycle_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + MOVE current_seeds_q0[1] current_seeds_q0[0] + MOVE current_seeds_q1[1] current_seeds_q1[0] + LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] + LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- diff --git a/test/unit/test_qpu_randomized_compiling.py b/test/unit/test_qpu_randomized_compiling.py index 1f9efc660..6b4a5b48d 100644 --- a/test/unit/test_qpu_randomized_compiling.py +++ b/test/unit/test_qpu_randomized_compiling.py @@ -338,7 +338,7 @@ class LoopingStructureTestCase: ), ], ) -def test_looping_structures(test_case: LoopingStructureTestCase): +def test_looping_structures(test_case: LoopingStructureTestCase, snapshot: str): """Test that the provided configuration matches expectations for the loop structure.""" assert test_case.configuration._seed_loop_length == test_case.seed_loop_length assert test_case.configuration._seed_loop_inner_length == test_case.seed_loop_inner_length @@ -351,5 +351,5 @@ def test_looping_structures(test_case: LoopingStructureTestCase): completed_u2_cycles = completed_base_cycles * len(test_case.configuration.base_cycles) + 1 assert expected_total_u2_cycles == completed_u2_cycles - # assert test_case.configuration.build_quil_program().out() == snapshot + assert test_case.configuration.build_quil_program().out() == snapshot From 3eaae4b24a0f84d5ebf92cd040fc04065db511f1 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 13:24:15 -0700 Subject: [PATCH 23/59] test: name syrupy snapshots --- .../test_qpu_randomized_compiling.ambr | 18 +++++++++--------- test/unit/test_qpu_randomized_compiling.py | 5 +++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr index 84d120dd0..f9795bc76 100644 --- a/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr +++ b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr @@ -1,5 +1,5 @@ # serializer version: 1 -# name: test_looping_structures[test_case0] +# name: test_looping_structures[test_case0][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -36,7 +36,7 @@ ''' # --- -# name: test_looping_structures[test_case1] +# name: test_looping_structures[test_case1][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -84,7 +84,7 @@ ''' # --- -# name: test_looping_structures[test_case2] +# name: test_looping_structures[test_case2][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -132,7 +132,7 @@ ''' # --- -# name: test_looping_structures[test_case3] +# name: test_looping_structures[test_case3][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -195,7 +195,7 @@ ''' # --- -# name: test_looping_structures[test_case4] +# name: test_looping_structures[test_case4][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -253,7 +253,7 @@ ''' # --- -# name: test_looping_structures[test_case5] +# name: test_looping_structures[test_case5][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -344,7 +344,7 @@ ''' # --- -# name: test_looping_structures[test_case6] +# name: test_looping_structures[test_case6][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -422,7 +422,7 @@ ''' # --- -# name: test_looping_structures[test_case7] +# name: test_looping_structures[test_case7][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -528,7 +528,7 @@ ''' # --- -# name: test_looping_structures[test_case8] +# name: test_looping_structures[test_case8][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" diff --git a/test/unit/test_qpu_randomized_compiling.py b/test/unit/test_qpu_randomized_compiling.py index 6b4a5b48d..1f266fc0e 100644 --- a/test/unit/test_qpu_randomized_compiling.py +++ b/test/unit/test_qpu_randomized_compiling.py @@ -10,6 +10,7 @@ import numpy as np import pytest +from syrupy.assertion import SnapshotAssertion from pyquil._qpu import _randomized_compiling as rc from pyquil.simulation import matrices @@ -338,7 +339,7 @@ class LoopingStructureTestCase: ), ], ) -def test_looping_structures(test_case: LoopingStructureTestCase, snapshot: str): +def test_looping_structures(test_case: LoopingStructureTestCase, snapshot: SnapshotAssertion): """Test that the provided configuration matches expectations for the loop structure.""" assert test_case.configuration._seed_loop_length == test_case.seed_loop_length assert test_case.configuration._seed_loop_inner_length == test_case.seed_loop_inner_length @@ -351,5 +352,5 @@ def test_looping_structures(test_case: LoopingStructureTestCase, snapshot: str): completed_u2_cycles = completed_base_cycles * len(test_case.configuration.base_cycles) + 1 assert expected_total_u2_cycles == completed_u2_cycles - assert test_case.configuration.build_quil_program().out() == snapshot + assert test_case.configuration.build_quil_program().out() == snapshot(name="quil") From 928f08a204f7fc6d5de58cc0712422202ceb7111 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 13:29:15 -0700 Subject: [PATCH 24/59] test: cleanup comments and file writes --- pyquil/_qpu/_randomized_compiling.py | 24 +++++++++---- test/e2e/test_qpu_randomized_compiling.py | 41 ++++++++++------------- 2 files changed, 36 insertions(+), 29 deletions(-) diff --git a/pyquil/_qpu/_randomized_compiling.py b/pyquil/_qpu/_randomized_compiling.py index 8757e4932..e9e39f61f 100644 --- a/pyquil/_qpu/_randomized_compiling.py +++ b/pyquil/_qpu/_randomized_compiling.py @@ -384,7 +384,9 @@ def _validate(self) -> None: f"source unitary angles for qubit {qubit} must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(angles)}" ) else: - raise ValueError(f"source unitary angles must be a sequence or a mapping, but got {type(self.source_unitary_angles)}") + raise ValueError( + f"source unitary angles must be a sequence or a mapping, but got {type(self.source_unitary_angles)}" + ) def source_unitary_count(self, qubit: int) -> int: if isinstance(self.source_unitary_angles, Sequence): @@ -392,7 +394,9 @@ def source_unitary_count(self, qubit: int) -> int: elif isinstance(self.source_unitary_angles, Mapping): return len(self.source_unitary_angles[qubit]) // _ANGLES_PER_UNITARY else: - raise ValueError(f"source unitary angles must be a sequence or a mapping, but got {type(self.source_unitary_angles)}") + raise ValueError( + f"source unitary angles must be a sequence or a mapping, but got {type(self.source_unitary_angles)}" + ) def source_unitary_angles_for_qubit(self, qubit: int) -> Sequence[float]: if isinstance(self.source_unitary_angles, Sequence): @@ -400,7 +404,9 @@ def source_unitary_angles_for_qubit(self, qubit: int) -> Sequence[float]: elif isinstance(self.source_unitary_angles, Mapping): return self.source_unitary_angles[qubit] else: - raise ValueError(f"source unitary angles must be a sequence or a mapping, but got {type(self.source_unitary_angles)}") + raise ValueError( + f"source unitary angles must be a sequence or a mapping, but got {type(self.source_unitary_angles)}" + ) class _ToQuilCallArguments(ABC): @@ -1056,8 +1062,12 @@ def _build_quil_instructions_for_cycle( Call( "choose_random_real_sub_regions", [ - inst.CallArgument.from_identifier(self.readout_randomization.variables.readout_randomization(qubit)), - inst.CallArgument.from_identifier(self.readout_randomization.variables.source_unitaries(qubit)), + inst.CallArgument.from_identifier( + self.readout_randomization.variables.readout_randomization(qubit) + ), + inst.CallArgument.from_identifier( + self.readout_randomization.variables.source_unitaries(qubit) + ), inst.CallArgument.from_immediate(complex(_ANGLES_PER_UNITARY, 0)), inst.CallArgument.from_memory_reference( inst.MemoryReference(self.readout_randomization.variables.readout_seed(qubit), 0) @@ -1378,7 +1388,9 @@ def verify_final_memory( found_final_unitary = _compute_unitary_from_zxzxz_angles(found_final_unitary_angles) if self.readout_randomization is not None and layer_index == len(cycles): - all_source_unitary_angles = tuple(original_memory[self.readout_randomization.variables.source_unitaries(q)]) + all_source_unitary_angles = tuple( + original_memory[self.readout_randomization.variables.source_unitaries(q)] + ) if len(all_source_unitary_angles) % _ANGLES_PER_UNITARY != 0: raise ValueError( f"source unitary angle count must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(all_source_unitary_angles)}" diff --git a/test/e2e/test_qpu_randomized_compiling.py b/test/e2e/test_qpu_randomized_compiling.py index f58528312..04503c8da 100644 --- a/test/e2e/test_qpu_randomized_compiling.py +++ b/test/e2e/test_qpu_randomized_compiling.py @@ -1,16 +1,14 @@ -from pyquil.quilbase import Declare -import pytest - import numpy as np +import pytest from numpy.typing import NDArray -from scipy.stats import unitary_group from qcs_sdk.client import QCSClient from qcs_sdk.qpu.api import ExecutionOptionsBuilder, retrieve_results, submit -from qcs_sdk.qpu.translation import translate, TranslationResult +from qcs_sdk.qpu.translation import TranslationResult, translate from pyquil import gates -from pyquil.quil import Program from pyquil._qpu import _randomized_compiling as rc +from pyquil.quil import Program +from pyquil.quilbase import Declare def _get_bitstrings_and_final_memory( @@ -188,26 +186,23 @@ def test_qpu_randomized_compiling( program = configuration.build_quil_program() program += _build_cycle_program(configuration) - with open('program.quil', 'w') as f: - f.write(program.out()) - pauli_conjugates_map = rc.PAULI_CONJUGATES_MAPS["CZ"] memory_map = configuration.build_memory_map(random_seeds, rc.build_memory_values_for_paulis_conjugates_map(pauli_conjugates_map)) memory_map.update(_generate_source_unitaries(configuration, rng)) shot_count = 2_500 translation_result = translate(program.out(), shot_count, live_quantum_processor_id, qcs_client) - # bitstrings, final_memory = _get_bitstrings_and_final_memory( - # live_quantum_processor_id, - # translation_result, - # memory_map, - # execution_options=execution_options, - # qcs_client=qcs_client, - # ) - - # configuration.verify_final_memory( - # final_memory, - # memory_map, - # shot_count, - # pauli_conjugates_map, - # ) + bitstrings, final_memory = _get_bitstrings_and_final_memory( + live_quantum_processor_id, + translation_result, + memory_map, + execution_options=execution_options, + qcs_client=qcs_client, + ) + + configuration.verify_final_memory( + final_memory, + memory_map, + shot_count, + pauli_conjugates_map, + ) From 10461df03fc64ecee50d32bf1d509fedbf7b0f48 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 13:30:05 -0700 Subject: [PATCH 25/59] chore: delete old qpu module --- pyquil/qpu/__init__.py | 0 pyquil/qpu/_extern_call.py | 0 pyquil/qpu/_randomized_compiling.py | 1405 --------------------------- 3 files changed, 1405 deletions(-) delete mode 100644 pyquil/qpu/__init__.py delete mode 100644 pyquil/qpu/_extern_call.py delete mode 100644 pyquil/qpu/_randomized_compiling.py diff --git a/pyquil/qpu/__init__.py b/pyquil/qpu/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/pyquil/qpu/_extern_call.py b/pyquil/qpu/_extern_call.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/pyquil/qpu/_randomized_compiling.py b/pyquil/qpu/_randomized_compiling.py deleted file mode 100644 index fec209c98..000000000 --- a/pyquil/qpu/_randomized_compiling.py +++ /dev/null @@ -1,1405 +0,0 @@ -"""Test utilities for randomized compilation of two-qubit cycles. - -The test utilities here are built specifically for random compilation with the -ZXZXZ unitary decomposition using the "merge_zxzxz_unitary_with_paulis" suite -of extern functions. - -There are two tests of import here (everything else is a utility for these tests): - -* `test_randomized_compilation_flat`: Test randomized compilation on randomly generated mirror circuit. -* `test_randomized_compilation_looped_cases`: Test randomized compilation on a repeat base cycle within a loop. -""" - -import math -from abc import ABC, abstractmethod -from collections.abc import Generator, Mapping, Sequence -from dataclasses import dataclass, field -from enum import Enum -from functools import cached_property -from typing import Self, cast - -import numpy as np -from numpy.typing import NDArray -from qcs_sdk.qpu.experimental.random import PrngSeedValue, choose_random_real_sub_region_indices -from quil import instructions as inst - -from pyquil.quil import InstructionDesignator, Program -from pyquil.quilatom import Qubit -from pyquil.quilbase import ( - Call, - ClassicalAdd, - ClassicalGreaterEqual, - ClassicalLoad, - ClassicalMove, - ClassicalShiftRight, - Declare, - Delay, - Expression, - Fence, - Jump, - JumpTarget, - JumpUnless, - JumpWhen, - Label, - MemoryReference, -) -from pyquil.simulation import matrices - -_BITS_PER_VALUE = 48 -_BITS_PER_PAULI = 2 -_PAULIS_PER_VALUE = _BITS_PER_VALUE // _BITS_PER_PAULI -_ANGLES_PER_UNITARY = 3 -_NUMBER_PAULI_PAIRS = 16 - - -_TEdge = tuple[int, int] - - -@dataclass(frozen=True, kw_only=True) -class _TwoQubitCycle: - data: dict[int, _TEdge] = field(default_factory=dict) - - def add_edge(self, edge: _TEdge): - if edge[0] in self.data or edge[1] in self.data: - raise ValueError(f"edge {edge} overlaps with existing edges in cycle") - self.data[edge[0]] = edge - self.data[edge[1]] = edge - - def __getitem__(self, node: int) -> _TEdge: - return self.data[node] - - def __contains__(self, node: int) -> bool: - return node in self.data - - def __len__(self) -> int: - return len(self.data) // 2 - - @classmethod - def from_edges(cls, edges: Sequence[_TEdge]) -> "_TwoQubitCycle": - cycle = cls() - for edge in edges: - cycle.add_edge(edge) - return cycle - - -def _generate_lfsr_v1_sequence(seed_value: int, start_index: int, count: int) -> list[int]: - """Generate a sequence of values from the LFSR v1 PRNG given an initial seed value, a start index, and a count.""" - sequence = [] - current_value = seed_value - for i in range(start_index + count): - if i >= start_index: - sequence.append(current_value) - current_value = _lfsr_v1_next(current_value) - return sequence - - -@dataclass(frozen=True, kw_only=True) -class PauliPairKey: - qubit: int - layer_index: int - - -@dataclass(frozen=True, kw_only=True) -class _FinalPauliSeedAndPairCache: - """Cache for final Pauli seeds and pairs per qubit and layer. - - Each layer beyond the first of the circuit requires knowledge of the previous - layer's Pauli pair in order to determine the conjugate. - """ - - prng_sequence_step_length: int - original_seeds: Mapping[int, Sequence[int]] - pauli_conjugates_map: Mapping[tuple["PauliLiteral", "PauliLiteral"], tuple["PauliLiteral", "PauliLiteral"]] - cycles: tuple[_TwoQubitCycle, ...] - qubits_sorted: tuple[int, ...] - invert_random_paulis: bool - pauli_pairs: dict[PauliPairKey, tuple["PauliLiteral", "PauliLiteral"]] = field(default_factory=dict, init=False) - - def accumulate( - self, sequence_count: int - ) -> "dict[PauliPairKey, tuple[int | None, tuple[PauliLiteral, PauliLiteral]]]": - current = self - pauli_pairs = {} - for sequence_index in range(sequence_count): - for qubit in self.qubits_sorted: - for layer_index in range(len(self.cycles) + 1): - key = PauliPairKey(qubit=qubit, layer_index=layer_index) - current_seed, pauli_pair = current[key] - if key in pauli_pairs: - _, previous_pauli_pair = pauli_pairs[key] - _, previous_pauli = pauli_pair[0] * previous_pauli_pair[0] - _, next_pauli = previous_pauli_pair[1] * pauli_pair[1] - pauli_pair = (previous_pauli, next_pauli) - pauli_pairs[key] = (current_seed, pauli_pair) - if sequence_index < sequence_count - 1: - current = next(current) - return pauli_pairs - - def __next__(self) -> Self: - return _FinalPauliSeedAndPairCache( - prng_sequence_step_length=self.prng_sequence_step_length, - original_seeds=self._final_seeds, - pauli_conjugates_map=self.pauli_conjugates_map, - cycles=self.cycles, - qubits_sorted=self.qubits_sorted, - invert_random_paulis=self.invert_random_paulis, - ) - - @cached_property - def _final_seeds(self) -> dict[int, tuple[int, ...]]: - final_seeds = {} - for qubit in self.qubits_sorted: - seeds = self.original_seeds[qubit] - final_seeds[qubit] = tuple( - _generate_lfsr_v1_sequence(seed, start_index=self.prng_sequence_step_length, count=1)[0] - for seed in seeds - ) - return final_seeds - - def _get_random_pauli_for_seed_value(self, seed_value: int, layer_index: int) -> "PauliLiteral": - pauli_index = layer_index % _PAULIS_PER_VALUE - return PauliLiteral(seed_value >> (2 * pauli_index) & 0b11) - - def _get_previous_random_pauli(self, key: PauliPairKey) -> "PauliLiteral": - if not self.invert_random_paulis: - return PauliLiteral.I - q, layer_index = key.qubit, key.layer_index - previous_layer_index = layer_index - 1 - previous_cycle = self.cycles[previous_layer_index] if previous_layer_index >= 0 else None - if previous_cycle is None: - previous_conjugate = PauliLiteral.I - elif q in previous_cycle.data: - previous_edge = previous_cycle.data[q] - previous_left_key = PauliPairKey(qubit=previous_edge[0], layer_index=previous_layer_index) - previous_right_key = PauliPairKey(qubit=previous_edge[1], layer_index=previous_layer_index) - _, previous_pauli_pair_left = self[previous_left_key] - _, previous_pauli_pair_right = self[previous_right_key] - conjugate = self.pauli_conjugates_map[(previous_pauli_pair_left[1], previous_pauli_pair_right[1])] - is_pauli_left = q == previous_edge[0] - previous_conjugate = conjugate[0] if is_pauli_left else conjugate[1] - else: - previous_key = PauliPairKey(qubit=q, layer_index=previous_layer_index) - _, previous_pauli_pair = self[previous_key] - previous_conjugate = previous_pauli_pair[1] - - return previous_conjugate - - def __getitem__(self, key: PauliPairKey) -> tuple[int | None, tuple["PauliLiteral", "PauliLiteral"]]: - q, layer_index = key.qubit, key.layer_index - if layer_index == len(self.cycles): - # there is no random Pauli to apply! - if key not in self.pauli_pairs: - next_pauli = PauliLiteral.I - previous_conjugate = self._get_previous_random_pauli(key) - self.pauli_pairs[key] = (previous_conjugate, next_pauli) - return None, self.pauli_pairs[key] - seed_index = layer_index // _PAULIS_PER_VALUE - seed_value = self._final_seeds[q][seed_index] - if key not in self.pauli_pairs: - next_pauli = self._get_random_pauli_for_seed_value(seed_value, layer_index) - previous_conjugate = self._get_previous_random_pauli(key) - self.pauli_pairs[key] = (previous_conjugate, next_pauli) - pauli_pair = self.pauli_pairs[key] - return seed_value, pauli_pair - - -def _radians_to_cycles(region_name: str, index: int) -> Expression: - return MemoryReference(region_name, index) * 2 * math.pi - - -_MAX_SEQUENCER_VALUE = (1 << _BITS_PER_VALUE) - 1 -_TAPS = (47, 46, 20, 19) - - -def _lfsr_v1_next(seed: int) -> int: - feedback_value = 0 - for tap in _TAPS: - base = 1 << tap - bit = int((seed & base) != 0) - feedback_value ^= bit - return ((seed << 1) & _MAX_SEQUENCER_VALUE) | feedback_value - - -def _pauli_conjugates_map_str_to_literals( - pauli_conjugates_map_str: Mapping[str, str], -) -> dict[tuple["PauliLiteral", "PauliLiteral"], tuple["PauliLiteral", "PauliLiteral"]]: - pauli_conjugates_map = {} - for previous_str, next_str in pauli_conjugates_map_str.items(): - previous_paulis = tuple(PauliLiteral.from_name(c) for c in previous_str) - next_paulis = tuple(PauliLiteral.from_name(c) for c in next_str) - if len(previous_paulis) != 2 or len(next_paulis) != 2: - raise ValueError(f"invalid pauli pair strings: {previous_str}, {next_str}") - pauli_conjugates_map[previous_paulis] = next_paulis - return pauli_conjugates_map - - -PAULI_CONJUGATES_MAPS = { - "CZ": _pauli_conjugates_map_str_to_literals( - { - "II": "II", - "IX": "ZX", - "IY": "ZY", - "IZ": "IZ", - "XI": "XZ", - "XX": "YY", - "XY": "YX", - "XZ": "XI", - "YI": "YZ", - "YX": "XY", - "YY": "XX", - "YZ": "YI", - "ZI": "ZI", - "ZX": "IX", - "ZY": "IY", - "ZZ": "ZZ", - } - ), - "ISWAP": _pauli_conjugates_map_str_to_literals( - { - "II": "II", - "IX": "YZ", - "IY": "XZ", - "IZ": "ZI", - "XI": "ZY", - "XX": "XX", - "XY": "YX", - "XZ": "IY", - "YI": "ZX", - "YX": "XY", - "YY": "YY", - "YZ": "IX", - "ZI": "IZ", - "ZX": "YI", - "ZY": "XI", - "ZZ": "ZZ", - } - ), -} - - -def build_memory_values_for_paulis_conjugates_map( - pauli_conjugates_map: Mapping[tuple["PauliLiteral", "PauliLiteral"], tuple["PauliLiteral", "PauliLiteral"]], -) -> list[int | float]: - """Build a map from each Pauli pair to its conjugate under the specified two-qubit gate. - - This essentially translates `PAULI_CONJUGATES_MAPS` from a map of string to string to a map - of int to int, which can be used as a Quil memory reference for conjugation lookup on the QPU. - """ - memory_values: list[int | None] = [None] * _NUMBER_PAULI_PAIRS - for previous_paulis, next_paulis in pauli_conjugates_map.items(): - previous_pauli_index = _pauli_pair_to_int(previous_paulis) - next_pauli_index = _pauli_pair_to_int(next_paulis) - memory_values[previous_pauli_index] = next_pauli_index - return cast(list[int | float], pauli_conjugates_map) - - -def _pauli_pair_to_int(pauli_pair: tuple["PauliLiteral", "PauliLiteral"]) -> int: - return (pauli_pair[0].value << _BITS_PER_PAULI) + pauli_pair[1].value - - -def _unitary_equal(A: NDArray[np.complex128], B: NDArray[np.complex128]) -> bool: - """Check if two matrices are unitarily equal.""" - if A.shape != B.shape: - return False - dim = A.shape[0] - return np.isclose(np.abs(np.trace(A.T.conjugate() @ B) / dim), 1.0).item() - - -@dataclass(frozen=True, kw_only=True) -class ShotsPerRandomizationVariables: - pulse_program_label: str = "pulse_program" - randomization_label: str = "rc_main" - modulo_counter: str = "modulo_counter" - is_mod_zero: str = "is_mod_zero" - - -@dataclass(frozen=True, kw_only=True) -class ShotsPerRandomization: - """Configuration for randomizing angles every N shots. - - We test this specific circuit construction in order to verify that we use - randomized compilation with active reset without incurring the overhead of - randomizing every shot. - """ - - shots_per_randomization: int - secondary_delay_seconds: float | None = 2e-4 - variables: ShotsPerRandomizationVariables = field(default_factory=ShotsPerRandomizationVariables) - - @property - def pulse_program_label(self) -> InstructionDesignator: - return JumpTarget(Label(self.variables.pulse_program_label)) - - def generate_mod_shot_count_block(self, qubits_sorted: Sequence[int]) -> tuple[InstructionDesignator, ...]: - instructions: list[InstructionDesignator] = [ - ClassicalAdd( - MemoryReference(self.variables.modulo_counter, 0), - 1, - ), - ClassicalGreaterEqual( - MemoryReference(self.variables.is_mod_zero, 0), - MemoryReference(self.variables.modulo_counter, 0), - self.shots_per_randomization, - ), - Call( - "if_then_else_integer", - [ - # destination - inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.modulo_counter, 0)), - # condition - inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.is_mod_zero, 0)), - # true value - inst.CallArgument.from_immediate(complex(0, 0)), - # false value - inst.CallArgument.from_memory_reference(inst.MemoryReference(self.variables.modulo_counter, 0)), - ], - ), - JumpWhen( - Label(self.variables.randomization_label), - MemoryReference(self.variables.is_mod_zero, 0), - ), - ] - if self.secondary_delay_seconds is not None: - for q in qubits_sorted: - instructions.append(Delay([], [q], self.secondary_delay_seconds)) - instructions.append(Jump(Label(self.variables.pulse_program_label))) - instructions.append(JumpTarget(Label(self.variables.randomization_label))) - return tuple(instructions) - - -@dataclass(frozen=True, kw_only=True) -class ReadoutRandomizationVariables: - readout_seed_prefix: str = "readout_seed" - source_unitaries_prefix: str = "readout_source_unitaries" - readout_randomization_prefix: str = "readout_randomization" - - def source_unitaries(self, qubit: int) -> str: - return f"{self.source_unitaries_prefix}_q{qubit}" - - def readout_seed(self, qubit: int) -> str: - return f"{self.readout_seed_prefix}_q{qubit}" - - def readout_randomization(self, qubit: int) -> str: - return f"{self.readout_randomization_prefix}_q{qubit}" - - -@dataclass(frozen=True, kw_only=True) -class ReadoutRandomization: - """Configuration for readout randomization on the final layer.""" - - variables: ReadoutRandomizationVariables = field(default_factory=ReadoutRandomizationVariables) - source_unitary_angles: Mapping[int, Sequence[float]] - - def __post_init__(self) -> None: - self._validate() - - def _validate(self) -> None: - for qubit, angles in self.source_unitary_angles.items(): - if len(angles) % _ANGLES_PER_UNITARY != 0: - raise ValueError( - f"source unitary angles for qubit {qubit} must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(angles)}" - ) - - def source_unitary_count(self, qubit: int) -> int: - return len(self.source_unitary_angles[qubit]) // _ANGLES_PER_UNITARY - - -class _ToQuilCallArguments(ABC): - @abstractmethod - def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: ... - - -class PauliLiteral(Enum): - """A literal Pauli known at program construction time.""" - - I = 0 # noqa - X = 1 - Y = 2 - Z = 3 - - @property - def matrix(self) -> NDArray[np.complex128]: - match self: - case PauliLiteral.I: - return matrices.I - case PauliLiteral.X: - return matrices.X - case PauliLiteral.Y: - return matrices.Y - case PauliLiteral.Z: - return matrices.Z - case _: - raise ValueError(f"{self} cannot be cast to matrix") - - @classmethod - def from_name(cls, name: str) -> "PauliLiteral": - match name: - case "I": - return cls.I - case "X": - return cls.X - case "Y": - return cls.Y - case "Z": - return cls.Z - case _: - raise ValueError(f"invalid pauli name: {name}") - - def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: - return (inst.CallArgument.from_immediate(complex(self.value, 0)),) - - def __rmul__(self, other: "PauliLiteral") -> "tuple[complex, PauliLiteral]": - match (self, other): - case (PauliLiteral.I, _): - return 1, other - case (_, PauliLiteral.I): - return 1, self - case (PauliLiteral.X, PauliLiteral.X): - return 1, PauliLiteral.I - case (PauliLiteral.Y, PauliLiteral.Y): - return 1, PauliLiteral.I - case (PauliLiteral.Z, PauliLiteral.Z): - return 1, PauliLiteral.I - case (PauliLiteral.X, PauliLiteral.Y): - return 1j, PauliLiteral.Z - case (PauliLiteral.Y, PauliLiteral.Z): - return 1j, PauliLiteral.X - case (PauliLiteral.Z, PauliLiteral.X): - return 1j, PauliLiteral.Y - case (PauliLiteral.Y, PauliLiteral.X): - return -1j, PauliLiteral.Z - case (PauliLiteral.Z, PauliLiteral.Y): - return -1j, PauliLiteral.X - case (PauliLiteral.X, PauliLiteral.Z): - return -1j, PauliLiteral.Y - case _: - raise ValueError(f"invalid pauli multiplication: {self} * {other}") - - -@dataclass(frozen=True, kw_only=True) -class _PauliReference(_ToQuilCallArguments): - """A Pauli specified by reference to shared memory on the QPU. - - We fit `_PAULIS_PER_VALUE` in a single word of shared memory, so the precise - Pauli within this word is specified by `pauli_index` (the control system will - shift and mask bits to get the two bit Pauli representation). - """ - - memory_reference: inst.MemoryReference - pauli_index: int - - def to_call_arguments(self) -> tuple[inst.CallArgument, inst.CallArgument]: - return ( - inst.CallArgument.from_memory_reference(self.memory_reference), - inst.CallArgument.from_immediate(complex(self.pauli_index, 0)), - ) - - -@dataclass(frozen=True, kw_only=True) -class _PauliConjugate(_ToQuilCallArguments): - """A Pauli specified by conjugation of two other Paulis. - - This is used when a previous cycle applied two random Paulis before the two qubit - gate. We look these random Paulis up by reference and then index into - `pauli_conjugates_map` to get the two qubit conjugation; we then select one of - these Paulis based on `is_left_conjugate`. - """ - - pauli_left: _PauliReference - pauli_right: _PauliReference - is_left_conjugate: bool - pauli_conjugates_map: str = "pauli_conjugates_map" - - def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: - arguments = [] - arguments.extend(self.pauli_left.to_call_arguments()) - arguments.extend(self.pauli_right.to_call_arguments()) - - arguments.append(inst.CallArgument.from_immediate(complex(1 if self.is_left_conjugate else 0, 0))) - arguments.append(inst.CallArgument.from_identifier(self.pauli_conjugates_map)) - return tuple(arguments) - - -@dataclass(frozen=True, kw_only=True) -class _PauliPair: - """A pair of Paulis applied on a specific qubit at a specific layer. - - The pair is read on the control system and used to apply mutations to the - unitary angles for this (qubit, layer_index). - """ - - previous: _PauliReference | PauliLiteral | _PauliConjugate - next: _PauliReference | PauliLiteral - - def build_quil_call_instruction( - self, - destination: inst.CallArgument, - source: inst.CallArgument, - unitary_angle_offset: inst.CallArgument, - ) -> Call: - """Build a Quil Call instruction based on the Pauli pair. - - Each underlying union variant will correspond to a different extern function signature. - """ - arguments = [destination, source, unitary_angle_offset] - arguments.extend(self.next.to_call_arguments()) - arguments.extend(self.previous.to_call_arguments()) - match (self.previous, self.next): - case (PauliLiteral(), PauliLiteral()): - return Call( - "merge_zxzxz_unitary_with_paulis_literal_literal", - arguments, - ) - case (_PauliReference(), PauliLiteral()): - return Call( - "merge_zxzxz_unitary_with_paulis_literal_reference", - arguments, - ) - case (_PauliConjugate(), PauliLiteral()): - return Call( - "merge_zxzxz_unitary_with_paulis_literal_conjugate", - arguments, - ) - case (_PauliReference(), _PauliReference()): - return Call( - "merge_zxzxz_unitary_with_paulis_reference_reference", - arguments, - ) - case (_PauliConjugate(), _PauliReference()): - return Call( - "merge_zxzxz_unitary_with_paulis_reference_conjugate", - arguments, - ) - case (PauliLiteral(), _PauliReference()): - return Call( - "merge_zxzxz_unitary_with_paulis_reference_literal", - arguments, - ) - case _: - raise ValueError(f"invalid pauli pair: {self.previous}, {self.next}") - - -def _rz(phi: float) -> np.ndarray: - return np.array( - [ - [np.cos(phi / 2.0) - 1j * np.sin(phi / 2.0), 0], - [0, np.cos(phi / 2.0) + 1j * np.sin(phi / 2.0)], - ] - ) - - -def _compute_unitary_from_zxzxz_angles(unitary: Sequence[float]) -> NDArray[np.complex128]: - """Compute the unitary matrix from ZXZXZ angles.""" - sx = np.asarray( - [ - [np.sqrt(0.5), -np.sqrt(0.5) * 1j], - [-np.sqrt(0.5) * 1j, np.sqrt(0.5)], - ] - ) - return cast( - NDArray[np.complex128], - _rz(unitary[2] * 2 * np.pi) @ sx @ _rz(unitary[1] * 2 * np.pi) @ sx @ _rz(unitary[0] * 2 * np.pi), - ) - - -def _compute_expected_merged_unitary( - unitary: tuple[float, ...], pauli_pair: tuple[PauliLiteral, PauliLiteral] -) -> NDArray[np.complex128]: - """Compute the expected merged unitary from ZXZXZ angles and a Pauli pair.""" - return pauli_pair[1].matrix @ _compute_unitary_from_zxzxz_angles(unitary) @ pauli_pair[0].matrix - - -@dataclass(frozen=True, kw_only=True) -class RandomizedCompilingVariables: - seed_loop_label: str = "rc_seed_loop" - seed_loop_index: str = "rc_seed_loop_index" - seed_loop_inner_label: str = "rc_seed_loop_inner" - base_cycle_loop_label: str = "rc_base_cycle_loop" - base_cycle_loop_index: str = "rc_base_cycle_loop_index" - unitary_angle_offset: str = "unitary_angle_offset" - loop_break: str = "break" - current_seeds_prefix: str = "current_seeds" - pauli_conjugates_map: str = "pauli_conjugates_map" - unitaries_prefix: str = "unitaries" - twirled_unitaries_prefix: str = "twirled_unitaries" - pauli_seed_prefix: str = "pauli_seed" - - def current_seeds(self, qubit: int) -> str: - return f"{self.current_seeds_prefix}_q{qubit}" - - def source_unitaries(self, qubit: int) -> str: - return f"{self.unitaries_prefix}_q{qubit}" - - def source_unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> inst.MemoryReference: - return inst.MemoryReference(self.source_unitaries(qubit), layer_index * _ANGLES_PER_UNITARY + angle_index) - - def twirled_unitaries(self, qubit: int) -> str: - return f"{self.twirled_unitaries_prefix}_q{qubit}" - - def twirled_unitaries_ref(self, qubit: int, layer_index: int, angle_index: int) -> inst.MemoryReference: - return inst.MemoryReference(self.twirled_unitaries(qubit), layer_index * _ANGLES_PER_UNITARY + angle_index) - - def pauli_seed(self, qubit: int) -> str: - return f"{self.pauli_seed_prefix}_q{qubit}" - - -@dataclass(frozen=True, kw_only=True) -class RandomSeeds: - randomized_compiling: NDArray[np.int64] - readout: NDArray[np.int64] | None = None - - -@dataclass(frozen=True, kw_only=True) -class RandomizedCompilingConfiguration: - """A test utility for build a randomly compiled program using a loop structure over repeated base cycles.""" - - base_cycles: tuple[tuple[_TEdge, ...], ...] - qubits_sorted: tuple[int, ...] - base_cycle_repetitions: int - variables: RandomizedCompilingVariables = field(default_factory=RandomizedCompilingVariables) - leading_delay_seconds: float = 2e-4 - readout_randomization: ReadoutRandomization | None = None - """Whether to apply readout randomization to the final layer.""" - - shots_per_randomization: ShotsPerRandomization | None = None - """Number of shots per randomization.""" - - invert_random_paulis: bool = True - - def __post_init__(self) -> None: - self._validate() - - def _validate(self) -> None: - if _PAULIS_PER_VALUE % self._base_cycle_count != 0: - raise ValueError( - f"Base cycle length must be a multiple of {_PAULIS_PER_VALUE}, but got {self._base_cycle_count}." - ) - if self.base_cycle_repetitions <= 1: - raise ValueError(f"Base cycle repetitions must be greater than 1, but got {self.base_cycle_repetitions}.") - - @property - def _base_cycle_count(self) -> int: - return len(self.base_cycles) - - @property - def _cycle_count(self) -> int: - return self._base_cycle_count * self.base_cycle_repetitions - - @property - def _seed_length(self) -> int: - return math.ceil(self._base_cycle_count * self.base_cycle_repetitions / _PAULIS_PER_VALUE) - - @property - def _out_of_primary_loop_seed_change_required(self) -> bool: - return self.base_cycle_repetitions % _PAULIS_PER_VALUE == 0 - - @property - def _seed_loop_length(self) -> int: - return self._seed_length - 1 - - @property - def _seed_loop_inner_length(self) -> int: - return int(_PAULIS_PER_VALUE / self._base_cycle_count) - 1 - - @property - def _base_cycle_loop_length(self) -> int: - base_cycles_per_word = int(_PAULIS_PER_VALUE / self._base_cycle_count) - primary_loop_base_cycles = self._seed_loop_length * base_cycles_per_word - # we add 1 below for the final cycle. - return self.base_cycle_repetitions - (primary_loop_base_cycles + 1) - - def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: - declarations: list[Declare] = [] - declarations.append(Declare(self.variables.pauli_conjugates_map, "INTEGER", _NUMBER_PAULI_PAIRS)) - - for q in self.qubits_sorted: - declarations.append(Declare(self.variables.pauli_seed(q), "INTEGER", self._seed_length)) - for q in self.qubits_sorted: - declarations.append( - Declare( - self.variables.twirled_unitaries(q), - "REAL", - (self._cycle_count + 1) * _ANGLES_PER_UNITARY, - ) - ) - - if self.shots_per_randomization is not None: - declarations.extend( - ( - Declare(self.shots_per_randomization.variables.modulo_counter, "INTEGER", 1), - Declare(self.shots_per_randomization.variables.is_mod_zero, "BIT", 1), - ) - ) - if self.readout_randomization is not None: - for q in self.qubits_sorted: - declarations.append(Declare(self.readout_randomization.variables.readout_seed(q), "INTEGER", 1)) - declarations.append( - Declare( - self.readout_randomization.variables.source_unitaries(q), - "REAL", - len(self.readout_randomization.source_unitary_angles[q]), - ) - ) - declarations.append(Declare(self.readout_randomization.variables.readout_randomization(q), "REAL", 3)) - - declarations.extend( - ( - Declare(self.variables.unitary_angle_offset, "INTEGER", 1), - Declare(self.variables.loop_break, "BIT", 1), - ) - ) - if self._seed_loop_length > 0: - declarations.extend( - [ - Declare(self.variables.seed_loop_index, "INTEGER", 2), - ] - ) - if self._base_cycle_loop_length > 0 or self._seed_loop_inner_length > 0: - declarations.extend( - [ - Declare(self.variables.base_cycle_loop_index, "INTEGER", 1), - ] - ) - current_seed_length = 2 if self._seed_loop_length > 0 else 1 - for q in self.qubits_sorted: - declarations.append(Declare(self.variables.current_seeds(q), "INTEGER", current_seed_length)) - return tuple(declarations) - - def generate_seed_values(self, rng: np.random.Generator) -> RandomSeeds: - size = (len(self.qubits_sorted), self._seed_length) - randomized_compiling_seeds = rng.integers(-(2**47), 2**47 - 1, size=size, dtype=np.int64) - readout_seeds = None - if self.readout_randomization is not None: - readout_seeds = rng.integers(-(2**47), 2**47 - 1, size=(len(self.qubits_sorted), 1), dtype=np.int64) - return RandomSeeds(randomized_compiling=randomized_compiling_seeds, readout=readout_seeds) - - def build_memory_map( - self, - random_seeds: RandomSeeds, - pauli_conjugates_map: list[int | float], - ) -> dict[str, list[int | float]]: - memory_map: dict[str, list[int | float]] = { - self.variables.unitary_angle_offset: [_ANGLES_PER_UNITARY], - self.variables.loop_break: [0], - } - if self._seed_loop_length > 0: - memory_map[self.variables.seed_loop_index] = [0, 1] - if self._base_cycle_loop_length > 0 or self._seed_loop_inner_length > 0: - memory_map[self.variables.base_cycle_loop_index] = [0] - - memory_map[self.variables.pauli_conjugates_map] = pauli_conjugates_map - for qubit_index, q in enumerate(self.qubits_sorted): - memory_map[self.variables.pauli_seed(q)] = random_seeds.randomized_compiling[qubit_index].tolist() - memory_map[self.variables.twirled_unitaries(q)] = np.zeros( - ((self._cycle_count + 1) * _ANGLES_PER_UNITARY,), dtype=float - ).tolist() - - current_seed_length = 2 if self._seed_loop_length > 0 else 1 - for q in self.qubits_sorted: - memory_map[self.variables.current_seeds(q)] = [0] * current_seed_length - - if self.shots_per_randomization is not None: - memory_map[self.shots_per_randomization.variables.modulo_counter] = [-1] - memory_map[self.shots_per_randomization.variables.is_mod_zero] = [1] - - if self.readout_randomization is not None: - if random_seeds.readout is None: - raise ValueError("readout seeds must be provided if readout randomization variables are specified") - for qubit_index, q in enumerate(self.qubits_sorted): - memory_map[self.readout_randomization.variables.readout_seed(q)] = [ - int(random_seeds.readout[qubit_index]) - ] - memory_map[self.readout_randomization.variables.readout_randomization(q)] = [0] * _ANGLES_PER_UNITARY - memory_map[self.readout_randomization.variables.source_unitaries(q)] = list( - self.readout_randomization.source_unitary_angles[q] - ) - return memory_map - - def _build_two_qubit_base_cycles(self) -> tuple[_TwoQubitCycle, ...]: - return tuple(_TwoQubitCycle.from_edges(cycle) for cycle in self.base_cycles) - - def _build_quil_instructions_for_cycle(self) -> list[InstructionDesignator]: - pauli_pairs = [] - for cycle in self._build_two_qubit_base_cycles(): - cycle_pauli_pairs = [] - for q in cycle.data.keys(): - edge = cycle[q] - if self.invert_random_paulis: - pauli_left = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), pauli_index=0 - ) - pauli_right = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), pauli_index=0 - ) - is_pauli_left = q == edge[0] - previous = _PauliConjugate( - pauli_left=pauli_left, - pauli_right=pauli_right, - is_left_conjugate=is_pauli_left, - ) - else: - previous = PauliLiteral.I - cycle_pauli_pairs.append( - ( - q, - _PauliPair( - previous=previous, - next=_PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 0), pauli_index=1 - ), - ), - ) - ) - for qubit in self.qubits_sorted: - if qubit not in cycle: - if self.invert_random_paulis: - previous = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), - pauli_index=0, - ) - else: - previous = PauliLiteral.I - cycle_pauli_pairs.append( - ( - qubit, - _PauliPair( - previous=previous, - next=_PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), - pauli_index=1, - ), - ), - ) - ) - pauli_pairs.append(cycle_pauli_pairs) - - instructions: list[InstructionDesignator] = [] - for cycle_pauli_pairs in pauli_pairs: - instructions.extend( - pauli_pair.build_quil_call_instruction( - inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), - inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), - inst.CallArgument.from_memory_reference( - inst.MemoryReference(self.variables.unitary_angle_offset, 0) - ), - ) - for q, pauli_pair in cycle_pauli_pairs - ) - instructions.append( - ClassicalAdd( - MemoryReference(self.variables.unitary_angle_offset, 0), - _ANGLES_PER_UNITARY, - ), - ) - for q in self.qubits_sorted: - instructions.append( - ClassicalShiftRight( - MemoryReference(self.variables.current_seeds(q), 0), - _BITS_PER_PAULI, - ) - ) - - return instructions - - def _build_quil_instructions_for_seed_transition(self) -> list[InstructionDesignator]: - pauli_pairs = [] - for cycle_index, cycle in enumerate(self._build_two_qubit_base_cycles()): - cycle_pauli_pairs = [] - is_final_cycle = cycle_index == self._base_cycle_count - 1 - for q in cycle.data.keys(): - edge = cycle[q] - if self.invert_random_paulis: - pauli_left = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), pauli_index=0 - ) - pauli_right = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), pauli_index=0 - ) - is_pauli_left = q == edge[0] - previous = _PauliConjugate( - pauli_left=pauli_left, - pauli_right=pauli_right, - is_left_conjugate=is_pauli_left, - ) - else: - previous = PauliLiteral.I - if is_final_cycle: - next_pauli = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 1), pauli_index=0 - ) - else: - next_pauli = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 0), pauli_index=1 - ) - cycle_pauli_pairs.append( - ( - q, - _PauliPair( - previous=previous, - next=next_pauli, - ), - ) - ) - for qubit in self.qubits_sorted: - if qubit not in cycle: - if is_final_cycle: - next_pauli = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 1), pauli_index=0 - ) - else: - next_pauli = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), pauli_index=1 - ) - if self.invert_random_paulis: - previous = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), - pauli_index=0, - ) - else: - previous = PauliLiteral.I - cycle_pauli_pairs.append( - ( - qubit, - _PauliPair( - previous=previous, - next=next_pauli, - ), - ) - ) - pauli_pairs.append(cycle_pauli_pairs) - - instructions: list[InstructionDesignator] = [] - for cycle_index, cycle_pauli_pairs in enumerate(pauli_pairs): - is_final_cycle = cycle_index == self._base_cycle_count - 1 - instructions.extend( - pauli_pair.build_quil_call_instruction( - inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), - inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), - inst.CallArgument.from_memory_reference( - inst.MemoryReference(self.variables.unitary_angle_offset, 0) - ), - ) - for q, pauli_pair in cycle_pauli_pairs - ) - instructions.append( - ClassicalAdd(MemoryReference(self.variables.unitary_angle_offset, 0), _ANGLES_PER_UNITARY) - ) - if not is_final_cycle: - for q in self.qubits_sorted: - instructions.append( - ClassicalShiftRight( - MemoryReference(self.variables.current_seeds(q), 0), - _BITS_PER_PAULI, - ) - ) - - return instructions - - def _build_quil_instructions_for_final_base_cycle(self) -> list[InstructionDesignator]: - pauli_pairs = [] - for cycle_index, cycle in enumerate(self._build_two_qubit_base_cycles()): - cycle_pauli_pairs = [] - is_final_cycle = cycle_index == self._base_cycle_count - 1 - for q in cycle.data.keys(): - edge = cycle[q] - if self.invert_random_paulis: - pauli_left = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[0]), 0), - pauli_index=cycle_index, - ) - pauli_right = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(edge[1]), 0), - pauli_index=cycle_index, - ) - is_pauli_left = q == edge[0] - previous = _PauliConjugate( - pauli_left=pauli_left, - pauli_right=pauli_right, - is_left_conjugate=is_pauli_left, - ) - else: - previous = PauliLiteral.I - if is_final_cycle: - pauli_next = PauliLiteral.I - else: - pauli_next = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(q), 0), - pauli_index=cycle_index + 1, - ) - cycle_pauli_pairs.append( - ( - q, - _PauliPair( - previous=previous, - next=pauli_next, - ), - ) - ) - for qubit in self.qubits_sorted: - if qubit not in cycle: - if is_final_cycle: - pauli_next = PauliLiteral.I - else: - pauli_next = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), - pauli_index=cycle_index + 1, - ) - if self.invert_random_paulis: - previous = _PauliReference( - memory_reference=inst.MemoryReference(self.variables.current_seeds(qubit), 0), - pauli_index=cycle_index, - ) - else: - previous = PauliLiteral.I - cycle_pauli_pairs.append( - ( - qubit, - _PauliPair( - previous=previous, - next=pauli_next, - ), - ) - ) - pauli_pairs.append(cycle_pauli_pairs) - - instructions: list[InstructionDesignator] = [] - for cycle_index, cycle_pauli_pairs in enumerate(pauli_pairs): - global_cycle_index = (self._cycle_count + 1) - self._base_cycle_count + cycle_index - - source = self.variables.source_unitaries(q) - if cycle_index == len(pauli_pairs) - 1 and self.readout_randomization is not None: - instructions.append( - Call( - "choose_random_real_sub_regions", - [ - inst.CallArgument.from_identifier( - self.readout_randomization.variables.readout_randomization(q) - ), - inst.CallArgument.from_identifier(self.readout_randomization.variables.source_unitaries(q)), - inst.CallArgument.from_immediate(complex(_ANGLES_PER_UNITARY, 0)), - inst.CallArgument.from_memory_reference( - inst.MemoryReference(self.readout_randomization.variables.readout_seed(q), 0) - ), - ], - ) - ) - for i in range(_ANGLES_PER_UNITARY): - instructions.append( - ClassicalMove( - MemoryReference( - self.variables.twirled_unitaries(q), global_cycle_index * _ANGLES_PER_UNITARY + i - ), - MemoryReference(self.readout_randomization.variables.readout_randomization(q), i), - ) - ) - source = self.variables.twirled_unitaries(q) - - instructions.extend( - pauli_pair.build_quil_call_instruction( - inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), - inst.CallArgument.from_identifier(source), - inst.CallArgument.from_immediate(complex(global_cycle_index * _ANGLES_PER_UNITARY, 0)), - ) - for q, pauli_pair in cycle_pauli_pairs - ) - - return instructions - - def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[InstructionDesignator]: - instructions: list[InstructionDesignator] = list(self._generate_declarations()) - for q in self.qubits_sorted: - for i in range(self._seed_length): - instructions.append( - Call( - "prng_set_seed_and_step", - [ - inst.CallArgument.from_memory_reference( - inst.MemoryReference(self.variables.pauli_seed(q), i) - ), - inst.CallArgument.from_memory_reference( - inst.MemoryReference(self.variables.pauli_seed(q), i) - ), - ], - ) - ) - for q in self.qubits_sorted: - pauli_pair = _PauliPair( - previous=PauliLiteral.I, - next=_PauliReference( - memory_reference=inst.MemoryReference(self.variables.pauli_seed(q), 0), pauli_index=0 - ), - ) - instructions.append( - pauli_pair.build_quil_call_instruction( - inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), - inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), - inst.CallArgument.from_immediate(complex(0, 0)), - ) - ) - instructions.append( - ClassicalMove( - MemoryReference(self.variables.unitary_angle_offset, 0), - _ANGLES_PER_UNITARY, - ) - ) - - if self._seed_loop_length >= 1: - instructions.extend( - [ - ClassicalMove(MemoryReference(self.variables.seed_loop_index, 0), 0), - ClassicalMove( - MemoryReference(self.variables.seed_loop_index, 1), - 1, - ), - JumpTarget(Label(self.variables.seed_loop_label)), - ], - ) - if self._seed_loop_inner_length >= 1: - instructions.append( - ClassicalMove( - MemoryReference(self.variables.base_cycle_loop_index, 0), - 0, - ) - ) - for q in self.qubits_sorted: - instructions.append( - ClassicalLoad( - MemoryReference(self.variables.current_seeds(q), 0), - self.variables.pauli_seed(q), - MemoryReference(self.variables.seed_loop_index, 0), - ) - ) - if self._seed_length > 1: - instructions.append( - ClassicalLoad( - MemoryReference(self.variables.current_seeds(q), 1), - self.variables.pauli_seed(q), - MemoryReference(self.variables.seed_loop_index, 1), - ) - ) - if self._seed_loop_inner_length >= 1: - instructions.append(JumpTarget(Label(self.variables.seed_loop_inner_label))) - instructions.extend(self._build_quil_instructions_for_cycle()) - instructions.extend( - [ - ClassicalAdd( - MemoryReference(self.variables.base_cycle_loop_index, 0), - 1, - ), - ClassicalGreaterEqual( - MemoryReference(self.variables.loop_break, 0), - MemoryReference(self.variables.base_cycle_loop_index, 0), - self._seed_loop_inner_length, - ), - JumpUnless( - Label(self.variables.seed_loop_inner_label), - MemoryReference(self.variables.loop_break, 0), - ), - ] - ) - instructions.extend(self._build_quil_instructions_for_seed_transition()) - instructions.extend( - [ - ClassicalAdd( - MemoryReference(self.variables.seed_loop_index, 0), - 1, - ), - ClassicalAdd( - MemoryReference(self.variables.seed_loop_index, 1), - 1, - ), - ClassicalGreaterEqual( - MemoryReference(self.variables.loop_break, 0), - MemoryReference(self.variables.seed_loop_index, 0), - self._seed_loop_length, - ), - JumpUnless( - Label(self.variables.seed_loop_label), - MemoryReference(self.variables.loop_break, 0), - ), - ] - ) - for q in self.qubits_sorted: - instructions.append( - ClassicalMove( - MemoryReference(self.variables.current_seeds(q), 0), - MemoryReference(self.variables.current_seeds(q), 1), - ), - ) - elif self._base_cycle_loop_length >= 1: - for q in self.qubits_sorted: - instructions.append( - ClassicalMove( - MemoryReference(self.variables.current_seeds(q), 0), - MemoryReference(self.variables.pauli_seed(q), 0), - ), - ) - - if self._base_cycle_loop_length >= 1: - instructions.extend( - [ - ClassicalMove( - MemoryReference(self.variables.base_cycle_loop_index, 0), - 0, - ), - JumpTarget(Label(self.variables.base_cycle_loop_label)), - ] - ) - instructions.extend(self._build_quil_instructions_for_cycle()) - instructions.extend( - [ - ClassicalAdd( - MemoryReference(self.variables.base_cycle_loop_index, 0), - 1, - ), - ClassicalGreaterEqual( - MemoryReference(self.variables.loop_break, 0), - MemoryReference(self.variables.base_cycle_loop_index, 0), - self._base_cycle_loop_length, - ), - JumpUnless( - Label(self.variables.base_cycle_loop_label), - MemoryReference(self.variables.loop_break, 0), - ), - ] - ) - - for q in self.qubits_sorted: - instructions.append(Delay([], [q], self.leading_delay_seconds)) - - instructions.extend(self._build_quil_instructions_for_final_base_cycle()) - - return instructions - - def build_quil_program( - self, - ) -> Program: - """Generate a cycle program with randomized compilation according to the specified configuration.""" - program = Program() - program += self._generate_declarations() - - if self.shots_per_randomization is not None: - program += self.shots_per_randomization.generate_mod_shot_count_block(self.qubits_sorted) - else: - for q in self.qubits_sorted: - program += Delay([], [q], self.leading_delay_seconds) - - program += self._build_quil_instructions_for_randomized_compiling_loop() - - if self.shots_per_randomization is not None: - program += self.shots_per_randomization.pulse_program_label - if self.shots_per_randomization.secondary_delay_seconds is not None: - for q in self.qubits_sorted: - program += Delay([], [q], self.shots_per_randomization.secondary_delay_seconds) - else: - program += Fence([Qubit(q) for q in self.qubits_sorted]) - - return program - - def verify_final_memory( - self, - final_memory: dict[str, list[int] | list[float]], - original_memory: dict[str, list[int] | list[float]], - shot_count: int, - pauli_conjugates_map: Mapping[tuple[PauliLiteral, PauliLiteral], tuple[PauliLiteral, PauliLiteral]], - ): - """Verify that the final memory state matches expectations. - - Specifically, we take the Pauli seeds specified in the original memory map and - generate the expected final random value using `generate_lfsr_v1_sequence` and - the shot count. We then use this final seed to infer the pair of Paulis merged - for each qubit at every layer. We can then apply this Pauli pair to the original - unitaries specified for the (qubit, layer) and verify that the resulting unitary - is equal to the twirled unitaries read from the final memory for the (qubit, layer). - """ - cycles = self._build_two_qubit_base_cycles() - if self.shots_per_randomization is not None: - prng_sequence_length = shot_count // self.shots_per_randomization.shots_per_randomization - else: - prng_sequence_length = shot_count - - if self.variables.unitaries_prefix == self.variables.twirled_unitaries_prefix: - prng_sequence_step_length = 1 - prng_sequence_step_count = prng_sequence_length - else: - prng_sequence_step_length = prng_sequence_length - prng_sequence_step_count = 1 - pauli_cache = _FinalPauliSeedAndPairCache( - original_seeds={ - q: cast(list[int], original_memory[self.variables.pauli_seed(q)]) for q in self.qubits_sorted - }, - pauli_conjugates_map=pauli_conjugates_map, - cycles=cycles, - qubits_sorted=self.qubits_sorted, - prng_sequence_step_length=prng_sequence_step_length, - invert_random_paulis=self.invert_random_paulis, - ) - pauli_pairs = pauli_cache.accumulate(prng_sequence_step_count) - - for q in self.qubits_sorted: - for layer_index in range(len(cycles) + 1): - seed_index = layer_index // _PAULIS_PER_VALUE - key = PauliPairKey( - qubit=q, - layer_index=layer_index, - ) - expected_final_seed_value, final_pauli_pair = pauli_pairs[key] - found_final_pauli_seed = final_memory[self.variables.pauli_seed(q)][seed_index] - if found_final_pauli_seed != expected_final_seed_value: - raise ValueError( - f"final seed value mismatch for q{q}, l{layer_index}: got " - f"{found_final_pauli_seed}, expected {expected_final_seed_value}" - ) - start_angle = layer_index * _ANGLES_PER_UNITARY - end_angle = start_angle + _ANGLES_PER_UNITARY - found_final_unitary_angles = tuple( - final_memory[self.variables.twirled_unitaries(q)][start_angle:end_angle] - ) - found_final_unitary = _compute_unitary_from_zxzxz_angles(found_final_unitary_angles) - - if self.readout_randomization is not None and layer_index == len(cycles): - source_unitary_angles = tuple( - int(angle) - for angle in original_memory[self.readout_randomization.variables.source_unitaries(q)] - ) - if len(source_unitary_angles) % _ANGLES_PER_UNITARY != 0: - raise ValueError( - f"source unitary angle count must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(source_unitary_angles)}" - ) - sub_region_count = len(source_unitary_angles) // _ANGLES_PER_UNITARY - seed_value = int(original_memory[self.readout_randomization.variables.readout_seed(q)][0]) - # FIXME: should this be shot_count or shot_count - 1? - final_index = choose_random_real_sub_region_indices( - PrngSeedValue(seed_value), shot_count - 1, 1, sub_region_count - )[0] - start_index = final_index * _ANGLES_PER_UNITARY - source_unitary_angles = source_unitary_angles[start_index : start_index + _ANGLES_PER_UNITARY] - else: - source_unitary_angles = tuple( - original_memory[self.variables.source_unitaries(q)][start_angle:end_angle] - ) - expected_unitary = _compute_expected_merged_unitary(source_unitary_angles, final_pauli_pair) - if not _unitary_equal(found_final_unitary, expected_unitary): - raise ValueError( - f"unitary mismatch for q{q} layer {layer_index}: got {found_final_unitary_angles}, " - f"expected {source_unitary_angles}, pauli pair: {final_pauli_pair}" - ) - - def track_pauli_frames( - self, - sequence_count: int, - pauli_conjugates_map: Mapping[tuple[PauliLiteral, PauliLiteral], tuple[PauliLiteral, PauliLiteral]], - ) -> Generator[dict[PauliPairKey, tuple[int | None, tuple[PauliLiteral, PauliLiteral]]], None, None]: - pauli_cache = _FinalPauliSeedAndPairCache( - original_seeds={q: [0] * self._seed_length for q in self.qubits_sorted}, - pauli_conjugates_map=pauli_conjugates_map, - cycles=self._build_two_qubit_base_cycles(), - qubits_sorted=self.qubits_sorted, - prng_sequence_step_length=1, - invert_random_paulis=self.invert_random_paulis, - ) - for sequence_index in range(sequence_count): - pauli_pairs = pauli_cache.accumulate(1) - yield pauli_pairs - if sequence_index == sequence_count - 1: - pauli_cache = next(pauli_cache) From c2e71776e51596e784096ce5c5a86846323d7bda Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 13:30:27 -0700 Subject: [PATCH 26/59] chore: remove hypothesis and pyrefly --- poetry.lock | 39 +++++++++------------------------------ pyproject.toml | 2 +- 2 files changed, 10 insertions(+), 31 deletions(-) diff --git a/poetry.lock b/poetry.lock index fb05d37c1..dd7447d0c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.4 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.4.1 and should not be changed by hand. [[package]] name = "alabaster" @@ -1211,6 +1211,7 @@ files = [ {file = "jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67"}, {file = "jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d"}, ] +markers = {main = "extra == \"docs\""} [package.dependencies] MarkupSafe = ">=2.0" @@ -1233,7 +1234,7 @@ files = [ [package.dependencies] attrs = ">=22.2.0" -jsonschema-specifications = ">=2023.03.6" +jsonschema-specifications = ">=2023.3.6" referencing = ">=0.28.4" rpds-py = ">=0.7.1" @@ -1678,6 +1679,7 @@ files = [ {file = "markupsafe-3.0.3-cp39-cp39-win_arm64.whl", hash = "sha256:38664109c14ffc9e7437e86b4dceb442b0096dfe3541d7864d9cbe1da4cf36c8"}, {file = "markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698"}, ] +markers = {main = "extra == \"docs\""} [[package]] name = "matplotlib" @@ -3389,38 +3391,13 @@ pyquil = ["pyquil (==4.14.2)"] [[package]] name = "quil" -version = "0.17.0" +version = "0.18.0rc1" description = "A Python package for building and parsing Quil programs." optional = false python-versions = "<3.13,>=3.9" groups = ["main"] files = [ - {file = "quil-0.17.0-cp310-cp310-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:b86bdbb88ea0efdddcbab1141b5319929ee7d176bb827e1b8eadad4160cb8d47"}, - {file = "quil-0.17.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab9aefe04f1a0eb84be4f0a85b6132e906afc910c018acfaa454bf03e5af9010"}, - {file = "quil-0.17.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:772d292490333a74b2d8b4605064ef81a4f0b000ed0cab048f7d8d9c77ea7a58"}, - {file = "quil-0.17.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7318de8370ad10950987e6596306aef900631d7365e272f1396879532966148"}, - {file = "quil-0.17.0-cp310-cp310-win_amd64.whl", hash = "sha256:7bf073400052dc1271c89cf860a427f9d4e2aeffd3bdadcf244b1db15c764906"}, - {file = "quil-0.17.0-cp311-cp311-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:e64c5192528947227e8576f1bfbc8fc482673615286cca2b63509328dc4a8c4c"}, - {file = "quil-0.17.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24fc50550a6fb997179d0884fdae92548d165d37d09795b805eab2292876c8c0"}, - {file = "quil-0.17.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:78a29082cc484a92dcda2d6ad2f95ac2ff7e401fc48cdf9e1d6fda82b8fc0b10"}, - {file = "quil-0.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a7e699bc5b43be6365e0ca5fc244985c90e8345c7bfca8edcdbfcc8ff8be7f62"}, - {file = "quil-0.17.0-cp311-cp311-win_amd64.whl", hash = "sha256:76e6a1cef43f082fe039b704babc9a1200788a8b45b8d65b4fb856667eed23c3"}, - {file = "quil-0.17.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:7c0a644f5a0a23e7d2bde47b035ce2377f0cce3870a142607e92675e9229e47b"}, - {file = "quil-0.17.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a6c004801df9d645409e36b3eb80c79045e1dc2385fee71c6b01da82b8c66a32"}, - {file = "quil-0.17.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:965db0df11e5bc22bbd3b203613d279552759a57dbb74805e91295e0a69876a6"}, - {file = "quil-0.17.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb54dd8f9769ce9c3cd4f0c0413b7dac344d0fb04c6f7e88e532b7bb9ce08037"}, - {file = "quil-0.17.0-cp312-cp312-win_amd64.whl", hash = "sha256:bdd370e45f1405163ad63ce58dd75c2b6315272f7ec68ed5c18ada5eaae21506"}, - {file = "quil-0.17.0-cp38-cp38-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:db4d3416e050993afd5323d0b72b648727819234f5a65248e5125958a35f4153"}, - {file = "quil-0.17.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a652b61c57832043fe738fe7f8a1ed37756703b5f9f888ed3d5c7f780e2c8ca"}, - {file = "quil-0.17.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:97b7cf27e24a055738bfe027a63df96ec713ff601b5fd91a0ef079788640fe0f"}, - {file = "quil-0.17.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d9415c208168011468235819ea7c9576d1fdda696cef24e668d72f8efc3d45e3"}, - {file = "quil-0.17.0-cp38-cp38-win_amd64.whl", hash = "sha256:70719a3da80807a1d2dd4a8b70e5d0591b8b80dc60faecef45cc4fd6c3aa84f3"}, - {file = "quil-0.17.0-cp39-cp39-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:4830b0b40d397291de9402c99a1a4d9bcbc21f69d718d66b725b49eb2bb8aef1"}, - {file = "quil-0.17.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2707ed23f37bada6c90768687b7e293a8343fece9fcb9941bd443faec59c39a8"}, - {file = "quil-0.17.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:02668e3e68c8b0c4845392a60e5b9cf1a957b3a1851dfcab63359a503016cbb1"}, - {file = "quil-0.17.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c92ee8563869840b311a314778bd30cc7f021ce04dcdc48a981b8df77481b2ca"}, - {file = "quil-0.17.0-cp39-cp39-win_amd64.whl", hash = "sha256:98634a586733042688449e8d7bc695d5ed1557b04d1a8e352592c7d8701be070"}, - {file = "quil-0.17.0.tar.gz", hash = "sha256:ee9bc5db5e695354aaff371ef88eb2a16ec653b7b6ff1320242fbc60eed01b62"}, + {file = "quil-0.18.0rc1.tar.gz", hash = "sha256:815080c38d7f52c9c5bfb3e31f71665cc16ef5ecb64456583926e29dd1f95a14"}, ] [package.dependencies] @@ -3751,6 +3728,8 @@ files = [ {file = "ruamel.yaml.clib-0.2.14-cp39-cp39-win32.whl", hash = "sha256:6d5472f63a31b042aadf5ed28dd3ef0523da49ac17f0463e10fda9c4a2773352"}, {file = "ruamel.yaml.clib-0.2.14-cp39-cp39-win_amd64.whl", hash = "sha256:8dd3c2cc49caa7a8d64b67146462aed6723a0495e44bf0aa0a2e94beaa8432f6"}, {file = "ruamel.yaml.clib-0.2.14.tar.gz", hash = "sha256:803f5044b13602d58ea378576dd75aa759f52116a0232608e8fdada4da33752e"}, + {file = "ruamel_yaml_clib-0.2.14-cp314-cp314-win32.whl", hash = "sha256:9b4104bf43ca0cd4e6f738cb86326a3b2f6eef00f417bd1e7efb7bdffe74c539"}, + {file = "ruamel_yaml_clib-0.2.14-cp314-cp314-win_amd64.whl", hash = "sha256:13997d7d354a9890ea1ec5937a219817464e5cc344805b37671562a401ca3008"}, ] [[package]] @@ -4532,4 +4511,4 @@ latex = ["ipython"] [metadata] lock-version = "2.1" python-versions = "^3.9,<3.13" -content-hash = "7497c2e55515737cc5b451578890b87969f1899daf957fe71ffe1b1b9eac7974" +content-hash = "94543ff74ecbad4d41ee3accae3972445d35fe07631636361d54f82db862f3fc" diff --git a/pyproject.toml b/pyproject.toml index b1dc24166..eddff1598 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ scipy = "^1.11" rpcq = "^3.11.0" networkx = ">=2.5" qcs-sdk-python = ">=0.20.1,<0.22" -quil = ">=0.15.3,<0.18" +quil = "0.18.0rc1" packaging = ">=23.1" deprecated = "^1.2.14" types-deprecated = "^1.2.9.3" From 63ac2e41e3ea6518ed58b5bb29279e715cf77230 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 13:30:56 -0700 Subject: [PATCH 27/59] chore: clean up formatting --- pyquil/quilbase.py | 1 + test/unit/test_parameters.py | 1 + test/unit/test_qpu.py | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pyquil/quilbase.py b/pyquil/quilbase.py index ad65f98e7..f1aa2ef17 100644 --- a/pyquil/quilbase.py +++ b/pyquil/quilbase.py @@ -1183,6 +1183,7 @@ class ClassicalShiftLeft(LogicalBinaryOp): op = quil_rs.BinaryOperator.Shl + class ClassicalShiftRight(LogicalBinaryOp): """The shift-right instruction.""" diff --git a/test/unit/test_parameters.py b/test/unit/test_parameters.py index 827a0679a..ddc0c7010 100644 --- a/test/unit/test_parameters.py +++ b/test/unit/test_parameters.py @@ -15,6 +15,7 @@ substitute_array, ) + def test_format_parameter(): test_cases = [ (1, "1"), diff --git a/test/unit/test_qpu.py b/test/unit/test_qpu.py index 9d8952d5e..1e6253485 100644 --- a/test/unit/test_qpu.py +++ b/test/unit/test_qpu.py @@ -1,5 +1,4 @@ import pickle -from typing import Any from unittest.mock import MagicMock, patch import numpy as np From 0f1b41be81b1a77c1fb69994a110d4e7c4b61a3b Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 13:31:45 -0700 Subject: [PATCH 28/59] chore: ignore pyrefly configuration --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 211099dd1..52e3f472e 100644 --- a/.gitignore +++ b/.gitignore @@ -188,6 +188,7 @@ fabric.properties **/.vscode/ pyrightconfig.json +pyrefly.toml # unversioned developer notes .scratch/ From ed4b66af7ac4994b8186b2c0c688e3f6882ba619 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 13:36:13 -0700 Subject: [PATCH 29/59] refactor: make extern signatures and randomized compiling module public --- pyquil/_qpu/{_extern_call.py => extern_signatures.py} | 0 .../_qpu/{_randomized_compiling.py => randomized_compiling.py} | 2 +- test/e2e/test_qpu_randomized_compiling.py | 2 +- test/unit/test_qpu_randomized_compiling.py | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename pyquil/_qpu/{_extern_call.py => extern_signatures.py} (100%) rename pyquil/_qpu/{_randomized_compiling.py => randomized_compiling.py} (99%) diff --git a/pyquil/_qpu/_extern_call.py b/pyquil/_qpu/extern_signatures.py similarity index 100% rename from pyquil/_qpu/_extern_call.py rename to pyquil/_qpu/extern_signatures.py diff --git a/pyquil/_qpu/_randomized_compiling.py b/pyquil/_qpu/randomized_compiling.py similarity index 99% rename from pyquil/_qpu/_randomized_compiling.py rename to pyquil/_qpu/randomized_compiling.py index e9e39f61f..e6c32895b 100644 --- a/pyquil/_qpu/_randomized_compiling.py +++ b/pyquil/_qpu/randomized_compiling.py @@ -55,7 +55,7 @@ ) from pyquil.simulation import matrices -from ._extern_call import build_extern_function_signatures +from .extern_signatures import build_extern_function_signatures _BITS_PER_VALUE = 48 _BITS_PER_PAULI = 2 diff --git a/test/e2e/test_qpu_randomized_compiling.py b/test/e2e/test_qpu_randomized_compiling.py index 04503c8da..48c92dc4e 100644 --- a/test/e2e/test_qpu_randomized_compiling.py +++ b/test/e2e/test_qpu_randomized_compiling.py @@ -6,7 +6,7 @@ from qcs_sdk.qpu.translation import TranslationResult, translate from pyquil import gates -from pyquil._qpu import _randomized_compiling as rc +from pyquil._qpu import randomized_compiling as rc from pyquil.quil import Program from pyquil.quilbase import Declare diff --git a/test/unit/test_qpu_randomized_compiling.py b/test/unit/test_qpu_randomized_compiling.py index 1f266fc0e..65563e36c 100644 --- a/test/unit/test_qpu_randomized_compiling.py +++ b/test/unit/test_qpu_randomized_compiling.py @@ -12,7 +12,7 @@ import pytest from syrupy.assertion import SnapshotAssertion -from pyquil._qpu import _randomized_compiling as rc +from pyquil._qpu import randomized_compiling as rc from pyquil.simulation import matrices From 03ffb9aab7341132f3e91d309b1eb8c59e505c6a Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 13:52:21 -0700 Subject: [PATCH 30/59] refactor: for python 3.9 compatibility --- pyquil/_qpu/randomized_compiling.py | 226 ++++++++++----------- test/e2e/test_qpu_randomized_compiling.py | 12 +- test/unit/test_qpu_randomized_compiling.py | 5 +- 3 files changed, 118 insertions(+), 125 deletions(-) diff --git a/pyquil/_qpu/randomized_compiling.py b/pyquil/_qpu/randomized_compiling.py index e6c32895b..33c67d103 100644 --- a/pyquil/_qpu/randomized_compiling.py +++ b/pyquil/_qpu/randomized_compiling.py @@ -26,7 +26,7 @@ from dataclasses import dataclass, field from enum import Enum from functools import cached_property -from typing import Self, cast +from typing import Optional, Self, Union, cast import numpy as np from numpy.typing import NDArray @@ -136,7 +136,7 @@ class _PauliSeedAndPairCache: def accumulate( self, sequence_count: int - ) -> "dict[PauliPairKey, tuple[int | None, tuple[PauliLiteral, PauliLiteral]]]": + ) -> "dict[PauliPairKey, tuple[Optional[int], tuple[PauliLiteral, PauliLiteral]]]": """Iterate over the requested `sequence_count` and accumulate the final Pauli pair for each qubit and layer index. "Accumulation" in this context means applying random Pauli pair successively over the sequence count. This @@ -214,7 +214,7 @@ def _get_previous_random_pauli(self, key: PauliPairKey) -> "PauliLiteral": return previous_conjugate - def __getitem__(self, key: PauliPairKey) -> tuple[int | None, tuple["PauliLiteral", "PauliLiteral"]]: + def __getitem__(self, key: PauliPairKey) -> "tuple[Optional[int], tuple[PauliLiteral, PauliLiteral]]": q, layer_index = key.qubit, key.layer_index if layer_index == len(self.cycles): # there is no random Pauli to apply! @@ -298,7 +298,7 @@ class ShotsPerRandomization: """ shots_per_randomization: int - secondary_delay_seconds: float | None = 2e-4 + secondary_delay_seconds: Optional[float] = 2e-4 variables: ShotsPerRandomizationVariables = field(default_factory=ShotsPerRandomizationVariables) @property @@ -362,7 +362,7 @@ class ReadoutRandomization: """Configuration for readout randomization on the final layer.""" variables: ReadoutRandomizationVariables = field(default_factory=ReadoutRandomizationVariables) - source_unitary_angles: Mapping[int, Sequence[float]] | Sequence[float] + source_unitary_angles: Union[Mapping[int, Sequence[float]], Sequence[float]] """A map from qubit to the memory values representing the source unitaries for readout randomization. Angles must be provided as cycles (not radians). The length of each sequence must be a multiple of 3. @@ -424,61 +424,58 @@ class PauliLiteral(Enum): @property def matrix(self) -> NDArray[np.complex128]: - match self: - case PauliLiteral.I: - return matrices.I - case PauliLiteral.X: - return matrices.X - case PauliLiteral.Y: - return matrices.Y - case PauliLiteral.Z: - return matrices.Z - case _: - raise ValueError(f"{self} cannot be cast to matrix") + if self == PauliLiteral.I: + return matrices.I + elif self == PauliLiteral.X: + return matrices.X + elif self == PauliLiteral.Y: + return matrices.Y + elif self == PauliLiteral.Z: + return matrices.Z + else: + raise ValueError(f"{self} cannot be cast to matrix") @classmethod def from_name(cls, name: str) -> "PauliLiteral": - match name: - case "I": - return cls.I - case "X": - return cls.X - case "Y": - return cls.Y - case "Z": - return cls.Z - case _: - raise ValueError(f"invalid pauli name: {name}") + if name == "I": + return cls.I + elif name == "X": + return cls.X + elif name == "Y": + return cls.Y + elif name == "Z": + return cls.Z + else: + raise ValueError(f"invalid pauli name: {name}") def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: return (inst.CallArgument.from_immediate(complex(self.value, 0)),) def __mul__(self, rhs: "PauliLiteral") -> "tuple[complex, PauliLiteral]": - match (self, rhs): - case (PauliLiteral.I, _): - return 1, rhs - case (_, PauliLiteral.I): - return 1, self - case (PauliLiteral.X, PauliLiteral.X): - return 1, PauliLiteral.I - case (PauliLiteral.Y, PauliLiteral.Y): - return 1, PauliLiteral.I - case (PauliLiteral.Z, PauliLiteral.Z): - return 1, PauliLiteral.I - case (PauliLiteral.X, PauliLiteral.Y): - return 1j, PauliLiteral.Z - case (PauliLiteral.Y, PauliLiteral.Z): - return 1j, PauliLiteral.X - case (PauliLiteral.Z, PauliLiteral.X): - return 1j, PauliLiteral.Y - case (PauliLiteral.Y, PauliLiteral.X): - return -1j, PauliLiteral.Z - case (PauliLiteral.Z, PauliLiteral.Y): - return -1j, PauliLiteral.X - case (PauliLiteral.X, PauliLiteral.Z): - return -1j, PauliLiteral.Y - case _: - raise ValueError(f"invalid pauli multiplication: {self} * {rhs}") + if self == PauliLiteral.I: + return 1, rhs + elif rhs == PauliLiteral.I: + return 1, self + elif (self, rhs) == (PauliLiteral.X, PauliLiteral.X): + return 1, PauliLiteral.I + elif (self, rhs) == (PauliLiteral.Y, PauliLiteral.Y): + return 1, PauliLiteral.I + elif (self, rhs) == (PauliLiteral.Z, PauliLiteral.Z): + return 1, PauliLiteral.I + elif (self, rhs) == (PauliLiteral.X, PauliLiteral.Y): + return 1j, PauliLiteral.Z + elif (self, rhs) == (PauliLiteral.Y, PauliLiteral.Z): + return 1j, PauliLiteral.X + elif (self, rhs) == (PauliLiteral.Z, PauliLiteral.X): + return 1j, PauliLiteral.Y + elif (self, rhs) == (PauliLiteral.Y, PauliLiteral.X): + return -1j, PauliLiteral.Z + elif (self, rhs) == (PauliLiteral.Z, PauliLiteral.Y): + return -1j, PauliLiteral.X + elif (self, rhs) == (PauliLiteral.X, PauliLiteral.Z): + return -1j, PauliLiteral.Y + else: + raise ValueError(f"invalid pauli multiplication: {self} * {rhs}") @classmethod def all(cls) -> tuple["PauliLiteral", ...]: @@ -532,18 +529,18 @@ def all(cls) -> tuple["PauliLiteral", ...]: def build_memory_values_for_paulis_conjugates_map( pauli_conjugates_map: Mapping[tuple["PauliLiteral", "PauliLiteral"], tuple["PauliLiteral", "PauliLiteral"]], -) -> list[int] | list[float]: +) -> Union[list[int], list[float]]: """Convert a Pauli conjugates map to a list of integers representing the next Pauli pair for each previous Pauli pair. The result may be supplied as the memory values for the `pauli_conjugates_map` memory region on the QPU (see `RandomizedCompilingVariables.pauli_conjugates_map`). """ - memory_values: list[int | None] = [None] * _NUMBER_PAULI_PAIRS + memory_values: list[Optional[int]] = [None] * _NUMBER_PAULI_PAIRS for previous_paulis, next_paulis in pauli_conjugates_map.items(): previous_pauli_index = _pauli_pair_to_int(previous_paulis) next_pauli_index = _pauli_pair_to_int(next_paulis) memory_values[previous_pauli_index] = next_pauli_index - return cast(list[int] | list[float], memory_values) + return cast(Union[list[int], list[float]], memory_values) @dataclass(frozen=True, kw_only=True) @@ -598,8 +595,8 @@ class _PauliPair: unitary angles for this (qubit, layer_index). """ - previous: _PauliReference | PauliLiteral | _PauliConjugate - next: _PauliReference | PauliLiteral + previous: Union[_PauliReference, PauliLiteral, _PauliConjugate] + next: Union[_PauliReference, PauliLiteral] def build_quil_call_instruction( self, @@ -614,39 +611,38 @@ def build_quil_call_instruction( arguments = [destination, source, unitary_angle_offset] arguments.extend(self.next.to_call_arguments()) arguments.extend(self.previous.to_call_arguments()) - match (self.previous, self.next): - case (PauliLiteral(), PauliLiteral()): - return Call( - "merge_zxzxz_unitary_with_paulis_literal_literal", - arguments, - ) - case (_PauliReference(), PauliLiteral()): - return Call( - "merge_zxzxz_unitary_with_paulis_literal_reference", - arguments, - ) - case (_PauliConjugate(), PauliLiteral()): - return Call( - "merge_zxzxz_unitary_with_paulis_literal_conjugate", - arguments, - ) - case (_PauliReference(), _PauliReference()): - return Call( - "merge_zxzxz_unitary_with_paulis_reference_reference", - arguments, - ) - case (_PauliConjugate(), _PauliReference()): - return Call( - "merge_zxzxz_unitary_with_paulis_reference_conjugate", - arguments, - ) - case (PauliLiteral(), _PauliReference()): - return Call( - "merge_zxzxz_unitary_with_paulis_reference_literal", - arguments, - ) - case _: - raise ValueError(f"invalid pauli pair: {self.previous}, {self.next}") + if isinstance(self.previous, PauliLiteral) and isinstance(self.next, PauliLiteral): + return Call( + "merge_zxzxz_unitary_with_paulis_literal_literal", + arguments, + ) + elif isinstance(self.previous, _PauliReference) and isinstance(self.next, PauliLiteral): + return Call( + "merge_zxzxz_unitary_with_paulis_literal_reference", + arguments, + ) + elif isinstance(self.previous, _PauliConjugate) and isinstance(self.next, PauliLiteral): + return Call( + "merge_zxzxz_unitary_with_paulis_literal_conjugate", + arguments, + ) + elif isinstance(self.previous, _PauliReference) and isinstance(self.next, _PauliReference): + return Call( + "merge_zxzxz_unitary_with_paulis_reference_reference", + arguments, + ) + elif isinstance(self.previous, _PauliConjugate) and isinstance(self.next, _PauliReference): + return Call( + "merge_zxzxz_unitary_with_paulis_reference_conjugate", + arguments, + ) + elif isinstance(self.previous, PauliLiteral) and isinstance(self.next, _PauliReference): + return Call( + "merge_zxzxz_unitary_with_paulis_reference_literal", + arguments, + ) + else: + raise ValueError(f"invalid pauli pair: {self.previous}, {self.next}") def _compute_unitary_from_zxzxz_angles(unitary: Sequence[float]) -> NDArray[np.complex128]: @@ -716,7 +712,7 @@ class RandomSeeds: the number of Paulis per seed value. """ - readout: NDArray[np.int64] | None = None + readout: Optional[NDArray[np.int64]] = None """ Random seeds for selecting random unitaries for readout randomization. Shape is (qubit_count,). @@ -743,27 +739,25 @@ class _PauliCursor(Enum): AFTER_SEED_TRANSITION = 1 def next_ref(self, current_seed_name: str) -> _PauliReference: - match self: - case _PauliCursor.DEFAULT_POSITION: - next_pauli_seed_index = 1 - case _PauliCursor.AFTER_SEED_TRANSITION: - next_pauli_seed_index = 0 - case _: - raise ValueError(f"invalid Pauli cursor: {self}") + if self == _PauliCursor.DEFAULT_POSITION: + next_pauli_seed_index = 1 + elif self == _PauliCursor.AFTER_SEED_TRANSITION: + next_pauli_seed_index = 0 + else: + raise ValueError(f"invalid Pauli cursor: {self}") return _PauliReference( memory_reference=inst.MemoryReference(current_seed_name, 0), pauli_index=next_pauli_seed_index ) def previous_ref(self, current_seed_name: str) -> _PauliReference: - match self: - case _PauliCursor.DEFAULT_POSITION: - previous_seed_index = 0 - previous_seed_pauli_index = 0 - case _PauliCursor.AFTER_SEED_TRANSITION: - previous_seed_index = 1 - previous_seed_pauli_index = 1 - case _: - raise ValueError(f"invalid Pauli cursor: {self}") + if self == _PauliCursor.DEFAULT_POSITION: + previous_seed_index = 0 + previous_seed_pauli_index = 0 + elif self == _PauliCursor.AFTER_SEED_TRANSITION: + previous_seed_index = 1 + previous_seed_pauli_index = 1 + else: + raise ValueError(f"invalid Pauli cursor: {self}") return _PauliReference( memory_reference=inst.MemoryReference(current_seed_name, previous_seed_index), pauli_index=previous_seed_pauli_index, @@ -836,10 +830,10 @@ class RandomizedCompilingConfiguration: leading_delay_seconds: float = 2e-4 """The delay to insert before starting the gate program.""" - readout_randomization: ReadoutRandomization | None = None + readout_randomization: Optional[ReadoutRandomization] = None """Configuration for using readout randomization in conjunction with randomized compiling.""" - shots_per_randomization: ShotsPerRandomization | None = None + shots_per_randomization: Optional[ShotsPerRandomization] = None """Configuration for randomizing only a subset of shots.""" invert_random_paulis: bool = True @@ -987,13 +981,13 @@ def generate_seed_values(self, rng: np.random.Generator) -> RandomSeeds: def build_memory_map( self, random_seeds: RandomSeeds, - pauli_conjugates_map: list[int] | list[float], - ) -> dict[str, list[int] | list[float]]: + pauli_conjugates_map: Union[list[int], list[float]], + ) -> dict[str, Union[list[int], list[float]]]: """Build the memory map for executing the randomized compiling program on the QPU. This does not include the source unitary angles, which must separately be supplied by the user. """ - memory_map: dict[str, list[int] | list[float]] = { + memory_map: dict[str, Union[list[int], list[float]]] = { self.variables.unitary_angle_offset: [_ANGLES_PER_UNITARY], self.variables.loop_break: [0], } @@ -1173,7 +1167,7 @@ def _build_quil_loop_instructions( loop_index_variable: str, loop_index_end: int, loop_index_start: int = 0, - loop_index_increment: int | None = 1, + loop_index_increment: Optional[int] = 1, ) -> list[InstructionDesignator]: loop_instructions: list[InstructionDesignator] = [] loop_instructions.append(ClassicalMove(MemoryReference(loop_index_variable, 0), loop_index_start)) @@ -1320,8 +1314,8 @@ def build_quil_program( def verify_final_memory( self, - final_memory: dict[str, list[int] | list[float]], - original_memory: dict[str, list[int] | list[float]], + final_memory: dict[str, Union[list[int], list[float]]], + original_memory: dict[str, Union[list[int], list[float]]], shot_count: int, pauli_conjugates_map: Mapping[tuple[PauliLiteral, PauliLiteral], tuple[PauliLiteral, PauliLiteral]], ): @@ -1418,7 +1412,7 @@ def track_pauli_frames( sequence_count: int, pauli_conjugates_map: Mapping[tuple[PauliLiteral, PauliLiteral], tuple[PauliLiteral, PauliLiteral]], random_seeds: RandomSeeds, - ) -> Generator[dict[PauliPairKey, tuple[int | None, tuple[PauliLiteral, PauliLiteral]]], None, None]: + ) -> Generator[dict[PauliPairKey, tuple[Optional[int], tuple[PauliLiteral, PauliLiteral]]], None, None]: cycles = self._build_two_qubit_base_cycles() * self.base_cycle_repetitions pauli_cache = _PauliSeedAndPairCache( original_seeds={ diff --git a/test/e2e/test_qpu_randomized_compiling.py b/test/e2e/test_qpu_randomized_compiling.py index 48c92dc4e..9c7df7940 100644 --- a/test/e2e/test_qpu_randomized_compiling.py +++ b/test/e2e/test_qpu_randomized_compiling.py @@ -1,3 +1,5 @@ +from typing import Union + import numpy as np import pytest from numpy.typing import NDArray @@ -14,10 +16,10 @@ def _get_bitstrings_and_final_memory( live_quantum_processor_id: str, translation_result: TranslationResult, - memory_map: dict[str, list[int] | list[float]], + memory_map: dict[str, Union[list[int], list[float]]], execution_options: ExecutionOptionsBuilder, qcs_client: QCSClient, -) -> tuple[NDArray[np.int8], dict[str, list[int] | list[float]]]: +) -> tuple[NDArray[np.int8], dict[str, Union[list[int], list[float]]]]: job_id = submit(translation_result.program, memory_map, live_quantum_processor_id, qcs_client, execution_options.build()) results = retrieve_results( job_id, @@ -25,7 +27,7 @@ def _get_bitstrings_and_final_memory( execution_options=execution_options.build(), client=qcs_client, ) - final_memory: dict[str, list[int] | list[float]] = {k: v.inner() for k, v in results.memory.items()} + final_memory: dict[str, Union[list[int], list[float]]] = {k: v.inner() for k, v in results.memory.items()} [execution_result for name, execution_result in results.buffers.items() if "_classified" in name] return np.array( [execution_result.data for name, execution_result in results.buffers.items() if "_classified" in name] @@ -47,10 +49,6 @@ def _get_bitstrings_and_final_memory( [ 1./4, 1./4, 0.0]], dtype=np.float64).flatten().tolist() _RANDOMIZED_READOUT_ANGLES = {qubit: _TETRAHEDRAL_ANGLES for qubit in _TEST_QUBITS} -""" -* case where base cycle length > _PAULIS_PER_VALUE? -""" - _TEST_CONFIGURATIONS = [ # 0) simple base case; no loops required diff --git a/test/unit/test_qpu_randomized_compiling.py b/test/unit/test_qpu_randomized_compiling.py index 65563e36c..6cbe7ebb3 100644 --- a/test/unit/test_qpu_randomized_compiling.py +++ b/test/unit/test_qpu_randomized_compiling.py @@ -1,4 +1,4 @@ -"""Unit tests for `pyquil._qpu._randomized_compiling`. +"""Unit tests for `pyquil._qpu.randomized_compiling`. Note, we test several underlying internal features here where much of the complexity lies. These are indeed implementation details but they provide a robust scaffolding for testing the overall correctness of the @@ -7,6 +7,7 @@ from dataclasses import dataclass from itertools import product +from typing import Optional import numpy as np import pytest @@ -76,7 +77,7 @@ def test_pauli_literal_multiplication(): def _get_expected_pauli_pair( seeds: list[int], layer_index: int, layer_count: int, sequence_index: int, paulis_per_value: int -) -> tuple[int | None, rc.PauliLiteral]: +) -> tuple[Optional[int], rc.PauliLiteral]: if layer_index == layer_count - 1: return None, rc.PauliLiteral.I seed_index = layer_index // paulis_per_value From 594b826021b488c3fefcdaf379fd9f95cb61ce5b Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 14:03:19 -0700 Subject: [PATCH 31/59] chore: mypy fixes --- pyquil/_qpu/randomized_compiling.py | 48 ++++++++++++++++------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/pyquil/_qpu/randomized_compiling.py b/pyquil/_qpu/randomized_compiling.py index 33c67d103..2d4286b5d 100644 --- a/pyquil/_qpu/randomized_compiling.py +++ b/pyquil/_qpu/randomized_compiling.py @@ -26,7 +26,7 @@ from dataclasses import dataclass, field from enum import Enum from functools import cached_property -from typing import Optional, Self, Union, cast +from typing import Optional, Union, cast import numpy as np from numpy.typing import NDArray @@ -67,11 +67,11 @@ _TEdge = tuple[int, int] -@dataclass(frozen=True, kw_only=True) +@dataclass(frozen=True) class _TwoQubitCycle: data: dict[int, _TEdge] = field(default_factory=dict) - def add_edge(self, edge: _TEdge): + def add_edge(self, edge: _TEdge) -> None: if edge[0] in self.data or edge[1] in self.data: raise ValueError(f"edge {edge} overlaps with existing edges in cycle") self.data[edge[0]] = edge @@ -105,7 +105,7 @@ def _generate_lfsr_v1_sequence(seed_value: int, start_index: int, count: int) -> return sequence -@dataclass(frozen=True, kw_only=True) +@dataclass(frozen=True) class PauliPairKey: """A key for looking up the random Pauli pair for a specific qubit and layer index. @@ -117,7 +117,7 @@ class PauliPairKey: layer_index: int -@dataclass(frozen=True, kw_only=True) +@dataclass(frozen=True) class _PauliSeedAndPairCache: """Cache for final Pauli seeds and pairs per qubit and layer. @@ -144,7 +144,7 @@ def accumulate( accumulate over the shot sequence rather than act independently. """ current = self - pauli_pairs = {} + pauli_pairs: dict[PauliPairKey, tuple[Optional[int], tuple[PauliLiteral, PauliLiteral]]] = {} for sequence_index in range(sequence_count): for qubit in self.qubits_sorted: for layer_index in range(len(self.cycles) + 1): @@ -160,7 +160,7 @@ def accumulate( current = next(current) return pauli_pairs - def __next__(self) -> Self: + def __next__(self) -> "_PauliSeedAndPairCache": """Return the "next" cache in the sequence. This returns a fresh cache with the original seeds set to the final seed values from this cache. @@ -278,10 +278,10 @@ def _unitary_equal(A: NDArray[np.complex128], B: NDArray[np.complex128]) -> bool if A.shape != B.shape: return False dim = A.shape[0] - return np.isclose(np.abs(np.trace(A.T.conjugate() @ B) / dim), 1.0).item() + return cast(bool, np.isclose(np.abs(np.trace(A.T.conjugate() @ B) / dim), 1.0)) -@dataclass(frozen=True, kw_only=True) +@dataclass(frozen=True) class ShotsPerRandomizationVariables: pulse_program_label: str = "pulse_program" randomization_label: str = "rc_main" @@ -289,7 +289,7 @@ class ShotsPerRandomizationVariables: is_mod_zero: str = "is_mod_zero" -@dataclass(frozen=True, kw_only=True) +@dataclass(frozen=True) class ShotsPerRandomization: """Configuration for randomizing angles every N shots. @@ -339,7 +339,7 @@ def generate_mod_shot_count_block(self) -> tuple[InstructionDesignator, ...]: return tuple(instructions) -@dataclass(frozen=True, kw_only=True) +@dataclass(frozen=True) class ReadoutRandomizationVariables: """Memory variable names for readout randomization.""" @@ -357,17 +357,19 @@ def readout_randomization(self, qubit: int) -> str: return f"{self.readout_randomization_prefix}_q{qubit}" -@dataclass(frozen=True, kw_only=True) +@dataclass(frozen=True) class ReadoutRandomization: """Configuration for readout randomization on the final layer.""" - variables: ReadoutRandomizationVariables = field(default_factory=ReadoutRandomizationVariables) source_unitary_angles: Union[Mapping[int, Sequence[float]], Sequence[float]] - """A map from qubit to the memory values representing the source unitaries for readout randomization. + """ + A map from qubit to the memory values representing the source unitaries for readout randomization. Angles must be provided as cycles (not radians). The length of each sequence must be a multiple of 3. """ + variables: ReadoutRandomizationVariables = field(default_factory=ReadoutRandomizationVariables) + def __post_init__(self) -> None: self._validate() @@ -543,7 +545,7 @@ def build_memory_values_for_paulis_conjugates_map( return cast(Union[list[int], list[float]], memory_values) -@dataclass(frozen=True, kw_only=True) +@dataclass(frozen=True) class _PauliReference(_ToQuilCallArguments): """A Pauli specified by reference to shared memory on the QPU. @@ -562,7 +564,7 @@ def to_call_arguments(self) -> tuple[inst.CallArgument, inst.CallArgument]: ) -@dataclass(frozen=True, kw_only=True) +@dataclass(frozen=True) class _PauliConjugate(_ToQuilCallArguments): """A Pauli specified by conjugation of two other Paulis. @@ -578,7 +580,7 @@ class _PauliConjugate(_ToQuilCallArguments): pauli_conjugates_map: str = "pauli_conjugates_map" def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: - arguments = [] + arguments: list[inst.CallArgument] = [] arguments.extend(self.pauli_left.to_call_arguments()) arguments.extend(self.pauli_right.to_call_arguments()) @@ -587,7 +589,7 @@ def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: return tuple(arguments) -@dataclass(frozen=True, kw_only=True) +@dataclass(frozen=True) class _PauliPair: """A pair of Paulis applied on a specific qubit at a specific layer. @@ -665,7 +667,7 @@ def _compute_expected_merged_unitary( return pauli_pair[1].matrix @ _compute_unitary_from_zxzxz_angles(unitary) @ pauli_pair[0].matrix -@dataclass(frozen=True, kw_only=True) +@dataclass(frozen=True) class RandomizedCompilingVariables: """Memory variable names for randomized compiling.""" @@ -701,7 +703,7 @@ def pauli_seed(self, qubit: int) -> str: return f"{self.pauli_seed_prefix}_q{qubit}" -@dataclass(frozen=True, kw_only=True) +@dataclass(frozen=True) class RandomSeeds: """The random seeds for each qubit used to generate the random Paulis on the QPU.""" @@ -775,7 +777,7 @@ def _requires_seed_transition( return requires_seed_transition -@dataclass(frozen=True, kw_only=True) +@dataclass(frozen=True) class RandomizedCompilingConfiguration: """A utility for configuring randomized compiling on a Rigetti QPU. @@ -1080,6 +1082,7 @@ def _build_quil_instructions_for_cycle( source_unitaries = self.variables.twirled_unitaries(qubit) edge = cycle[qubit] if qubit in cycle.data else None + previous: Union[_PauliConjugate, _PauliReference, PauliLiteral] if self.invert_random_paulis and edge is not None: pauli_left = cursor.previous_ref(self.variables.current_seeds(edge[0])) pauli_right = cursor.previous_ref(self.variables.current_seeds(edge[1])) @@ -1094,6 +1097,7 @@ def _build_quil_instructions_for_cycle( else: previous = PauliLiteral.I + next_: Union[_PauliReference, PauliLiteral] if is_final_cycle and is_final_base_cycle: next_ = PauliLiteral.I else: @@ -1318,7 +1322,7 @@ def verify_final_memory( original_memory: dict[str, Union[list[int], list[float]]], shot_count: int, pauli_conjugates_map: Mapping[tuple[PauliLiteral, PauliLiteral], tuple[PauliLiteral, PauliLiteral]], - ): + ) -> None: """Verify that the final memory state matches expectations. Specifically, we take the Pauli seeds specified in the original memory map and From a1cd2a7bf91f755c0418559cf11dfa8040a6ee6d Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 14:17:50 -0700 Subject: [PATCH 32/59] chore: address osv scanner issues --- .github/workflows/test.yml | 4 +- .osv-scanner.toml | 60 ++++++ poetry.lock | 430 ++++++++++++++++++++++++++++--------- 3 files changed, 389 insertions(+), 105 deletions(-) create mode 100644 .osv-scanner.toml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c94022271..4b2bc19cc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -98,7 +98,7 @@ jobs: go install github.com/google/osv-scanner/cmd/osv-scanner@latest - name: Run OSV scanner run: | - osv-scanner --lockfile=./poetry.lock + osv-scanner scan --config=.osv-scanner.toml --lockfile=./poetry.lock test-doctest: name: Run Doctests @@ -153,7 +153,7 @@ jobs: poetry run make test - name: Report Coverage if: matrix.python-version == '3.11' && github.event_name == 'pull_request' - continue-on-error: true + continue-on-error: true uses: orgoro/coverage@v3.1 with: coverageFile: coverage.xml diff --git a/.osv-scanner.toml b/.osv-scanner.toml new file mode 100644 index 000000000..bb2601863 --- /dev/null +++ b/.osv-scanner.toml @@ -0,0 +1,60 @@ +# See https://github.com/rigetti/pyquil/issues/1852 +# pillow 11.3.0 - locked for python <3.11 via matplotlib (docs extra) +# Fixed in pillow 12.x which requires python >=3.10 +[[IgnoredVulns]] +id = "GHSA-5xmw-vc9v-4wf2" +reason = "pillow 11.3.0 only resolved for python <3.11 (docs extra); fix requires dropping python 3.9 support" + +[[IgnoredVulns]] +id = "GHSA-cfh3-3jmp-rvhc" +reason = "pillow 11.3.0 only resolved for python <3.11 (docs extra); fix requires dropping python 3.9 support" + +[[IgnoredVulns]] +id = "GHSA-pwv6-vv43-88gr" +reason = "pillow 11.3.0 only resolved for python <3.11 (docs extra); fix requires dropping python 3.9 support" + +[[IgnoredVulns]] +id = "GHSA-r73j-pqj5-w3x7" +reason = "pillow 11.3.0 only resolved for python <3.11 (docs extra); fix requires dropping python 3.9 support" + +[[IgnoredVulns]] +id = "GHSA-whj4-6x5x-4v2j" +reason = "pillow 11.3.0 only resolved for python <3.11 (docs extra); fix requires dropping python 3.9 support" + +[[IgnoredVulns]] +id = "PYSEC-2026-165" +reason = "pillow 11.3.0 only resolved for python <3.11 (docs extra); fix requires dropping python 3.9 support" + +[[IgnoredVulns]] +id = "GHSA-wjx4-4jcj-g98j" +reason = "pillow 11.3.0 only resolved for python <3.11 (docs extra); fix requires dropping python 3.9 support" + +# pytest 8.4.2 - dev dependency only, not shipped to users +# Fixed in pytest 9.x but requires bumping pytest-benchmark and other plugins +[[IgnoredVulns]] +id = "GHSA-6w46-j5rx-g56g" +reason = "pytest is a dev dependency only; fix requires bumping to pytest ^9 and updating plugins" + +# requests 2.32.5 - locked for python <3.11 via sphinx (docs extra) +# Fixed in requests 2.34.x which requires python >=3.10 +[[IgnoredVulns]] +id = "GHSA-gc5v-m9x4-r6x2" +reason = "requests 2.32.5 only resolved for python <3.11 (docs extra); fix requires dropping python 3.9 support" + +# urllib3 2.6.3 - locked for python <3.11 via sphinx/requests (docs extra) +# Fixed in urllib3 2.7.x which requires python >=3.10 +[[IgnoredVulns]] +id = "PYSEC-2026-142" +reason = "urllib3 2.6.3 only resolved for python <3.11 (docs extra); fix requires dropping python 3.9 support" + +[[IgnoredVulns]] +id = "GHSA-mf9v-mfxr-j63j" +reason = "urllib3 2.6.3 only resolved for python <3.11 (docs extra); fix requires dropping python 3.9 support" + +[[IgnoredVulns]] +id = "PYSEC-2026-141" +reason = "urllib3 2.6.3 only resolved for python <3.11 (docs extra); fix requires dropping python 3.9 support" + +[[IgnoredVulns]] +id = "GHSA-qccp-gfcp-xxvc" +reason = "urllib3 2.6.3 only resolved for python <3.11 (docs extra); fix requires dropping python 3.9 support" diff --git a/poetry.lock b/poetry.lock index dd7447d0c..3e807ef68 100644 --- a/poetry.lock +++ b/poetry.lock @@ -778,84 +778,158 @@ devel = ["colorama", "json-spec", "jsonschema", "pylint", "pytest", "pytest-benc [[package]] name = "fonttools" -version = "4.60.1" +version = "4.60.2" description = "Tools to manipulate font files" optional = true python-versions = ">=3.9" groups = ["main"] -markers = "extra == \"docs\"" +markers = "python_version < \"3.11\" and extra == \"docs\"" +files = [ + {file = "fonttools-4.60.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4e36fadcf7e8ca6e34d490eef86ed638d6fd9c55d2f514b05687622cfc4a7050"}, + {file = "fonttools-4.60.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6e500fc9c04bee749ceabfc20cb4903f6981c2139050d85720ea7ada61b75d5c"}, + {file = "fonttools-4.60.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:22efea5e784e1d1cd8d7b856c198e360a979383ebc6dea4604743b56da1cbc34"}, + {file = "fonttools-4.60.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:677aa92d84d335e4d301d8ba04afca6f575316bc647b6782cb0921943fcb6343"}, + {file = "fonttools-4.60.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:edd49d3defbf35476e78b61ff737ff5efea811acff68d44233a95a5a48252334"}, + {file = "fonttools-4.60.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:126839492b69cecc5baf2bddcde60caab2ffafd867bbae2a88463fce6078ca3a"}, + {file = "fonttools-4.60.2-cp310-cp310-win32.whl", hash = "sha256:ffcab6f5537136046ca902ed2491ab081ba271b07591b916289b7c27ff845f96"}, + {file = "fonttools-4.60.2-cp310-cp310-win_amd64.whl", hash = "sha256:9c68b287c7ffcd29dd83b5f961004b2a54a862a88825d52ea219c6220309ba45"}, + {file = "fonttools-4.60.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:a2aed0a7931401b3875265717a24c726f87ecfedbb7b3426c2ca4d2812e281ae"}, + {file = "fonttools-4.60.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:dea6868e9d2b816c9076cfea77754686f3c19149873bdbc5acde437631c15df1"}, + {file = "fonttools-4.60.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2fa27f34950aa1fe0f0b1abe25eed04770a3b3b34ad94e5ace82cc341589678a"}, + {file = "fonttools-4.60.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:13a53d479d187b09bfaa4a35ffcbc334fc494ff355f0a587386099cb66674f1e"}, + {file = "fonttools-4.60.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:fac5e921d3bd0ca3bb8517dced2784f0742bc8ca28579a68b139f04ea323a779"}, + {file = "fonttools-4.60.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:648f4f9186fd7f1f3cd57dbf00d67a583720d5011feca67a5e88b3a491952cfb"}, + {file = "fonttools-4.60.2-cp311-cp311-win32.whl", hash = "sha256:3274e15fad871bead5453d5ce02658f6d0c7bc7e7021e2a5b8b04e2f9e40da1a"}, + {file = "fonttools-4.60.2-cp311-cp311-win_amd64.whl", hash = "sha256:91d058d5a483a1525b367803abb69de0923fbd45e1f82ebd000f5c8aa65bc78e"}, + {file = "fonttools-4.60.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e0164b7609d2b5c5dd4e044b8085b7bd7ca7363ef8c269a4ab5b5d4885a426b2"}, + {file = "fonttools-4.60.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:1dd3d9574fc595c1e97faccae0f264dc88784ddf7fbf54c939528378bacc0033"}, + {file = "fonttools-4.60.2-cp312-cp312-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:98d0719f1b11c2817307d2da2e94296a3b2a3503f8d6252a101dca3ee663b917"}, + {file = "fonttools-4.60.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9d3ea26957dd07209f207b4fff64c702efe5496de153a54d3b91007ec28904dd"}, + {file = "fonttools-4.60.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:1ee301273b0850f3a515299f212898f37421f42ff9adfc341702582ca5073c13"}, + {file = "fonttools-4.60.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c6eb4694cc3b9c03b7c01d65a9cf35b577f21aa6abdbeeb08d3114b842a58153"}, + {file = "fonttools-4.60.2-cp312-cp312-win32.whl", hash = "sha256:57f07b616c69c244cc1a5a51072eeef07dddda5ebef9ca5c6e9cf6d59ae65b70"}, + {file = "fonttools-4.60.2-cp312-cp312-win_amd64.whl", hash = "sha256:310035802392f1fe5a7cf43d76f6ff4a24c919e4c72c0352e7b8176e2584b8a0"}, + {file = "fonttools-4.60.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:2bb5fd231e56ccd7403212636dcccffc96c5ae0d6f9e4721fa0a32cb2e3ca432"}, + {file = "fonttools-4.60.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:536b5fab7b6fec78ccf59b5c59489189d9d0a8b0d3a77ed1858be59afb096696"}, + {file = "fonttools-4.60.2-cp313-cp313-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:6b9288fc38252ac86a9570f19313ecbc9ff678982e0f27c757a85f1f284d3400"}, + {file = "fonttools-4.60.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:93fcb420791d839ef592eada2b69997c445d0ce9c969b5190f2e16828ec10607"}, + {file = "fonttools-4.60.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:7916a381b094db4052ac284255186aebf74c5440248b78860cb41e300036f598"}, + {file = "fonttools-4.60.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:58c8c393d5e16b15662cfc2d988491940458aa87894c662154f50c7b49440bef"}, + {file = "fonttools-4.60.2-cp313-cp313-win32.whl", hash = "sha256:19c6e0afd8b02008caa0aa08ab896dfce5d0bcb510c49b2c499541d5cb95a963"}, + {file = "fonttools-4.60.2-cp313-cp313-win_amd64.whl", hash = "sha256:6a500dc59e11b2338c2dba1f8cf11a4ae8be35ec24af8b2628b8759a61457b76"}, + {file = "fonttools-4.60.2-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:9387c532acbe323bbf2a920f132bce3c408a609d5f9dcfc6532fbc7e37f8ccbb"}, + {file = "fonttools-4.60.2-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:e6f1c824185b5b8fb681297f315f26ae55abb0d560c2579242feea8236b1cfef"}, + {file = "fonttools-4.60.2-cp314-cp314-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:55a3129d1e4030b1a30260f1b32fe76781b585fb2111d04a988e141c09eb6403"}, + {file = "fonttools-4.60.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b196e63753abc33b3b97a6fd6de4b7c4fef5552c0a5ba5e562be214d1e9668e0"}, + {file = "fonttools-4.60.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:de76c8d740fb55745f3b154f0470c56db92ae3be27af8ad6c2e88f1458260c9a"}, + {file = "fonttools-4.60.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:6ba6303225c95998c9fda2d410aa792c3d2c1390a09df58d194b03e17583fa25"}, + {file = "fonttools-4.60.2-cp314-cp314-win32.whl", hash = "sha256:0a89728ce10d7c816fedaa5380c06d2793e7a8a634d7ce16810e536c22047384"}, + {file = "fonttools-4.60.2-cp314-cp314-win_amd64.whl", hash = "sha256:fa8446e6ab8bd778b82cb1077058a2addba86f30de27ab9cc18ed32b34bc8667"}, + {file = "fonttools-4.60.2-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:4063bc81ac5a4137642865cb63dd270e37b3cd1f55a07c0d6e41d072699ccca2"}, + {file = "fonttools-4.60.2-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:ebfdb66fa69732ed604ab8e2a0431e6deff35e933a11d73418cbc7823d03b8e1"}, + {file = "fonttools-4.60.2-cp314-cp314t-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:50b10b3b1a72d1d54c61b0e59239e1a94c0958f4a06a1febf97ce75388dd91a4"}, + {file = "fonttools-4.60.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:beae16891a13b4a2ddec9b39b4de76092a3025e4d1c82362e3042b62295d5e4d"}, + {file = "fonttools-4.60.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:522f017fdb3766fd5d2d321774ef351cc6ce88ad4e6ac9efe643e4a2b9d528db"}, + {file = "fonttools-4.60.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:82cceceaf9c09a965a75b84a4b240dd3768e596ffb65ef53852681606fe7c9ba"}, + {file = "fonttools-4.60.2-cp314-cp314t-win32.whl", hash = "sha256:bbfbc918a75437fe7e6d64d1b1e1f713237df1cf00f3a36dedae910b2ba01cee"}, + {file = "fonttools-4.60.2-cp314-cp314t-win_amd64.whl", hash = "sha256:0e5cd9b0830f6550d58c84f3ab151a9892b50c4f9d538c5603c0ce6fff2eb3f1"}, + {file = "fonttools-4.60.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:a3c75b8b42f7f93906bdba9eb1197bb76aecbe9a0a7cf6feec75f7605b5e8008"}, + {file = "fonttools-4.60.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0f86c8c37bc0ec0b9c141d5e90c717ff614e93c187f06d80f18c7057097f71bc"}, + {file = "fonttools-4.60.2-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fe905403fe59683b0e9a45f234af2866834376b8821f34633b1c76fb731b6311"}, + {file = "fonttools-4.60.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:38ce703b60a906e421e12d9e3a7f064883f5e61bb23e8961f4be33cfe578500b"}, + {file = "fonttools-4.60.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:9e810c06f3e79185cecf120e58b343ea5a89b54dd695fd644446bcf8c026da5e"}, + {file = "fonttools-4.60.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:38faec8cc1d12122599814d15a402183f5123fb7608dac956121e7c6742aebc5"}, + {file = "fonttools-4.60.2-cp39-cp39-win32.whl", hash = "sha256:80a45cf7bf659acb7b36578f300231873daba67bd3ca8cce181c73f861f14a37"}, + {file = "fonttools-4.60.2-cp39-cp39-win_amd64.whl", hash = "sha256:c355d5972071938e1b1e0f5a1df001f68ecf1a62f34a3407dc8e0beccf052501"}, + {file = "fonttools-4.60.2-py3-none-any.whl", hash = "sha256:73cf92eeda67cf6ff10c8af56fc8f4f07c1647d989a979be9e388a49be26552a"}, + {file = "fonttools-4.60.2.tar.gz", hash = "sha256:d29552e6b155ebfc685b0aecf8d429cb76c14ab734c22ef5d3dea6fdf800c92c"}, +] + +[package.extras] +all = ["brotli (>=1.0.1) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\"", "lxml (>=4.0)", "lz4 (>=1.7.4.2)", "matplotlib", "munkres ; platform_python_implementation == \"PyPy\"", "pycairo", "scipy ; platform_python_implementation != \"PyPy\"", "skia-pathops (>=0.5.0)", "sympy", "uharfbuzz (>=0.45.0)", "unicodedata2 (>=17.0.0) ; python_version <= \"3.14\"", "xattr ; sys_platform == \"darwin\"", "zopfli (>=0.1.4)"] +graphite = ["lz4 (>=1.7.4.2)"] +interpolatable = ["munkres ; platform_python_implementation == \"PyPy\"", "pycairo", "scipy ; platform_python_implementation != \"PyPy\""] +lxml = ["lxml (>=4.0)"] +pathops = ["skia-pathops (>=0.5.0)"] +plot = ["matplotlib"] +repacker = ["uharfbuzz (>=0.45.0)"] +symfont = ["sympy"] +type1 = ["xattr ; sys_platform == \"darwin\""] +unicode = ["unicodedata2 (>=17.0.0) ; python_version <= \"3.14\""] +woff = ["brotli (>=1.0.1) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\"", "zopfli (>=0.1.4)"] + +[[package]] +name = "fonttools" +version = "4.63.0" +description = "Tools to manipulate font files" +optional = true +python-versions = ">=3.10" +groups = ["main"] +markers = "python_version >= \"3.11\" and extra == \"docs\"" files = [ - {file = "fonttools-4.60.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:9a52f254ce051e196b8fe2af4634c2d2f02c981756c6464dc192f1b6050b4e28"}, - {file = "fonttools-4.60.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c7420a2696a44650120cdd269a5d2e56a477e2bfa9d95e86229059beb1c19e15"}, - {file = "fonttools-4.60.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee0c0b3b35b34f782afc673d503167157094a16f442ace7c6c5e0ca80b08f50c"}, - {file = "fonttools-4.60.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:282dafa55f9659e8999110bd8ed422ebe1c8aecd0dc396550b038e6c9a08b8ea"}, - {file = "fonttools-4.60.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4ba4bd646e86de16160f0fb72e31c3b9b7d0721c3e5b26b9fa2fc931dfdb2652"}, - {file = "fonttools-4.60.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:0b0835ed15dd5b40d726bb61c846a688f5b4ce2208ec68779bc81860adb5851a"}, - {file = "fonttools-4.60.1-cp310-cp310-win32.whl", hash = "sha256:1525796c3ffe27bb6268ed2a1bb0dcf214d561dfaf04728abf01489eb5339dce"}, - {file = "fonttools-4.60.1-cp310-cp310-win_amd64.whl", hash = "sha256:268ecda8ca6cb5c4f044b1fb9b3b376e8cd1b361cef275082429dc4174907038"}, - {file = "fonttools-4.60.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7b4c32e232a71f63a5d00259ca3d88345ce2a43295bb049d21061f338124246f"}, - {file = "fonttools-4.60.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3630e86c484263eaac71d117085d509cbcf7b18f677906824e4bace598fb70d2"}, - {file = "fonttools-4.60.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5c1015318e4fec75dd4943ad5f6a206d9727adf97410d58b7e32ab644a807914"}, - {file = "fonttools-4.60.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e6c58beb17380f7c2ea181ea11e7db8c0ceb474c9dd45f48e71e2cb577d146a1"}, - {file = "fonttools-4.60.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ec3681a0cb34c255d76dd9d865a55f260164adb9fa02628415cdc2d43ee2c05d"}, - {file = "fonttools-4.60.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f4b5c37a5f40e4d733d3bbaaef082149bee5a5ea3156a785ff64d949bd1353fa"}, - {file = "fonttools-4.60.1-cp311-cp311-win32.whl", hash = "sha256:398447f3d8c0c786cbf1209711e79080a40761eb44b27cdafffb48f52bcec258"}, - {file = "fonttools-4.60.1-cp311-cp311-win_amd64.whl", hash = "sha256:d066ea419f719ed87bc2c99a4a4bfd77c2e5949cb724588b9dd58f3fd90b92bf"}, - {file = "fonttools-4.60.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:7b0c6d57ab00dae9529f3faf187f2254ea0aa1e04215cf2f1a8ec277c96661bc"}, - {file = "fonttools-4.60.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:839565cbf14645952d933853e8ade66a463684ed6ed6c9345d0faf1f0e868877"}, - {file = "fonttools-4.60.1-cp312-cp312-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:8177ec9676ea6e1793c8a084a90b65a9f778771998eb919d05db6d4b1c0b114c"}, - {file = "fonttools-4.60.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:996a4d1834524adbb423385d5a629b868ef9d774670856c63c9a0408a3063401"}, - {file = "fonttools-4.60.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a46b2f450bc79e06ef3b6394f0c68660529ed51692606ad7f953fc2e448bc903"}, - {file = "fonttools-4.60.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:6ec722ee589e89a89f5b7574f5c45604030aa6ae24cb2c751e2707193b466fed"}, - {file = "fonttools-4.60.1-cp312-cp312-win32.whl", hash = "sha256:b2cf105cee600d2de04ca3cfa1f74f1127f8455b71dbad02b9da6ec266e116d6"}, - {file = "fonttools-4.60.1-cp312-cp312-win_amd64.whl", hash = "sha256:992775c9fbe2cf794786fa0ffca7f09f564ba3499b8fe9f2f80bd7197db60383"}, - {file = "fonttools-4.60.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6f68576bb4bbf6060c7ab047b1574a1ebe5c50a17de62830079967b211059ebb"}, - {file = "fonttools-4.60.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:eedacb5c5d22b7097482fa834bda0dafa3d914a4e829ec83cdea2a01f8c813c4"}, - {file = "fonttools-4.60.1-cp313-cp313-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b33a7884fabd72bdf5f910d0cf46be50dce86a0362a65cfc746a4168c67eb96c"}, - {file = "fonttools-4.60.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2409d5fb7b55fd70f715e6d34e7a6e4f7511b8ad29a49d6df225ee76da76dd77"}, - {file = "fonttools-4.60.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c8651e0d4b3bdeda6602b85fdc2abbefc1b41e573ecb37b6779c4ca50753a199"}, - {file = "fonttools-4.60.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:145daa14bf24824b677b9357c5e44fd8895c2a8f53596e1b9ea3496081dc692c"}, - {file = "fonttools-4.60.1-cp313-cp313-win32.whl", hash = "sha256:2299df884c11162617a66b7c316957d74a18e3758c0274762d2cc87df7bc0272"}, - {file = "fonttools-4.60.1-cp313-cp313-win_amd64.whl", hash = "sha256:a3db56f153bd4c5c2b619ab02c5db5192e222150ce5a1bc10f16164714bc39ac"}, - {file = "fonttools-4.60.1-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:a884aef09d45ba1206712c7dbda5829562d3fea7726935d3289d343232ecb0d3"}, - {file = "fonttools-4.60.1-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8a44788d9d91df72d1a5eac49b31aeb887a5f4aab761b4cffc4196c74907ea85"}, - {file = "fonttools-4.60.1-cp314-cp314-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:e852d9dda9f93ad3651ae1e3bb770eac544ec93c3807888798eccddf84596537"}, - {file = "fonttools-4.60.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:154cb6ee417e417bf5f7c42fe25858c9140c26f647c7347c06f0cc2d47eff003"}, - {file = "fonttools-4.60.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:5664fd1a9ea7f244487ac8f10340c4e37664675e8667d6fee420766e0fb3cf08"}, - {file = "fonttools-4.60.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:583b7f8e3c49486e4d489ad1deacfb8d5be54a8ef34d6df824f6a171f8511d99"}, - {file = "fonttools-4.60.1-cp314-cp314-win32.whl", hash = "sha256:66929e2ea2810c6533a5184f938502cfdaea4bc3efb7130d8cc02e1c1b4108d6"}, - {file = "fonttools-4.60.1-cp314-cp314-win_amd64.whl", hash = "sha256:f3d5be054c461d6a2268831f04091dc82753176f6ea06dc6047a5e168265a987"}, - {file = "fonttools-4.60.1-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:b6379e7546ba4ae4b18f8ae2b9bc5960936007a1c0e30b342f662577e8bc3299"}, - {file = "fonttools-4.60.1-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:9d0ced62b59e0430b3690dbc5373df1c2aa7585e9a8ce38eff87f0fd993c5b01"}, - {file = "fonttools-4.60.1-cp314-cp314t-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:875cb7764708b3132637f6c5fb385b16eeba0f7ac9fa45a69d35e09b47045801"}, - {file = "fonttools-4.60.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a184b2ea57b13680ab6d5fbde99ccef152c95c06746cb7718c583abd8f945ccc"}, - {file = "fonttools-4.60.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:026290e4ec76583881763fac284aca67365e0be9f13a7fb137257096114cb3bc"}, - {file = "fonttools-4.60.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f0e8817c7d1a0c2eedebf57ef9a9896f3ea23324769a9a2061a80fe8852705ed"}, - {file = "fonttools-4.60.1-cp314-cp314t-win32.whl", hash = "sha256:1410155d0e764a4615774e5c2c6fc516259fe3eca5882f034eb9bfdbee056259"}, - {file = "fonttools-4.60.1-cp314-cp314t-win_amd64.whl", hash = "sha256:022beaea4b73a70295b688f817ddc24ed3e3418b5036ffcd5658141184ef0d0c"}, - {file = "fonttools-4.60.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:122e1a8ada290423c493491d002f622b1992b1ab0b488c68e31c413390dc7eb2"}, - {file = "fonttools-4.60.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a140761c4ff63d0cb9256ac752f230460ee225ccef4ad8f68affc723c88e2036"}, - {file = "fonttools-4.60.1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0eae96373e4b7c9e45d099d7a523444e3554360927225c1cdae221a58a45b856"}, - {file = "fonttools-4.60.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:596ecaca36367027d525b3b426d8a8208169d09edcf8c7506aceb3a38bfb55c7"}, - {file = "fonttools-4.60.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2ee06fc57512144d8b0445194c2da9f190f61ad51e230f14836286470c99f854"}, - {file = "fonttools-4.60.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:b42d86938e8dda1cd9a1a87a6d82f1818eaf933348429653559a458d027446da"}, - {file = "fonttools-4.60.1-cp39-cp39-win32.whl", hash = "sha256:8b4eb332f9501cb1cd3d4d099374a1e1306783ff95489a1026bde9eb02ccc34a"}, - {file = "fonttools-4.60.1-cp39-cp39-win_amd64.whl", hash = "sha256:7473a8ed9ed09aeaa191301244a5a9dbe46fe0bf54f9d6cd21d83044c3321217"}, - {file = "fonttools-4.60.1-py3-none-any.whl", hash = "sha256:906306ac7afe2156fcf0042173d6ebbb05416af70f6b370967b47f8f00103bbb"}, - {file = "fonttools-4.60.1.tar.gz", hash = "sha256:ef00af0439ebfee806b25f24c8f92109157ff3fac5731dc7867957812e87b8d9"}, + {file = "fonttools-4.63.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e3297a6a4059b4acc3a1e9a8b04741f240a80044eef08ebd32e8b5bcdddce75b"}, + {file = "fonttools-4.63.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b1cd75a03ad8cb5bc40c90bfde68c0c47de423aa19e5c0f362b43520645eea94"}, + {file = "fonttools-4.63.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c0425b277a59cff3d80ca42162a8de360f318438a2ac83570842a678d826d579"}, + {file = "fonttools-4.63.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d7e5c9973aa04c95650c96e5f5ad865fbf42d62079163ecfab1e01cbc2504c22"}, + {file = "fonttools-4.63.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cb014d58140a38135f16064c74c652ed57aa0b75cbf8bb59cac821f7edb5334e"}, + {file = "fonttools-4.63.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:032038247a96c1690f9f31e377c389383c902531b085aa4e4dabd6f57f870e69"}, + {file = "fonttools-4.63.0-cp310-cp310-win32.whl", hash = "sha256:a8b33a82979e0a6a34ff435cc81317be1f95ec1ebb7a3a2d1c8a6a54f02ae44e"}, + {file = "fonttools-4.63.0-cp310-cp310-win_amd64.whl", hash = "sha256:0c18358a155d75034911c5ee397a5b44cd19dd325dbb8b35fb60bf421d6a72ac"}, + {file = "fonttools-4.63.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:2b8ae05d9eacf6081414d759c0a352769ac28ce31280d6bb8e77b03f9e3c449f"}, + {file = "fonttools-4.63.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:79cdc9f567aec74a72918fd060283911406750cbc9fd28c1316023deb6ce31a9"}, + {file = "fonttools-4.63.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2c14b4fd138c4bafcca294765c547914e1aa431ae1ca94ab99d8db08c958bd3b"}, + {file = "fonttools-4.63.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d76ac49f929aecaf82d83250b8347e099d7aecba0f4726c1d9b6df3b8bb5fe18"}, + {file = "fonttools-4.63.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:dcf076a4474fe0d7367e5bbf5b052c7284fa1feca729c04176ce513521afd8a0"}, + {file = "fonttools-4.63.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7dd683fef0663e9f0f45cf541d788d24caa3ec9db50796b588e1757d8b3bc007"}, + {file = "fonttools-4.63.0-cp311-cp311-win32.whl", hash = "sha256:afefc1ed0a59785a7fb06ea7e1678e849c193e1e387db783579bc7b3056fcfcb"}, + {file = "fonttools-4.63.0-cp311-cp311-win_amd64.whl", hash = "sha256:063e08bd17bd5a90127a14123de0d6a952dbc847695fd98b63c043d58057f90c"}, + {file = "fonttools-4.63.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:37dd23e621e3b0aef1baa70a303b80aaf38449632cfc8fd2a55fb285bbccfc02"}, + {file = "fonttools-4.63.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:a9faff9e0c1f76f9fd55899d2ce785832efebab37eb8ae13995853aef178bef0"}, + {file = "fonttools-4.63.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ef3048ef05dbb552b89817713d9cac912e00d0fde4a3105c00d29e52e10c89af"}, + {file = "fonttools-4.63.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:58dc6bb86a78d782f00f9190ca02c119cf5bbe2807536e361e18d42019f877d8"}, + {file = "fonttools-4.63.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ee08ebfa58f6e1aeff5697ab9582105bb620008c1caafb681e4c557e7483027b"}, + {file = "fonttools-4.63.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:27fdc65af8da6f88b9c6121c47a464cbe359fcfff7ff6fc2d37a1f395d755b78"}, + {file = "fonttools-4.63.0-cp312-cp312-win32.whl", hash = "sha256:af2fd1664d00a397d75f806985ddb36282091c2131a73a6485c23b4a34722263"}, + {file = "fonttools-4.63.0-cp312-cp312-win_amd64.whl", hash = "sha256:59ac449f8cca9b4ffa08d2e7bbadad87ce710d69d1eda5c3c1ce579baa987272"}, + {file = "fonttools-4.63.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:cd7e9857e5e63738b9d9fd707bc1f59c8b09e5177726d23664db393c59bb08bd"}, + {file = "fonttools-4.63.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:c2a2a42198b696a6f48fad91709afb55176e66a5e566131219dba372fb7f8c59"}, + {file = "fonttools-4.63.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1e874792a8212b44583ea02189d9e693906b2f78b261f372f95d6c563210ac1d"}, + {file = "fonttools-4.63.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:22135da48a348785c5e2d5d2d9d6bec5ed44adacbaeb9db12d9493bf6c6bfa68"}, + {file = "fonttools-4.63.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ccf41f2efdf56994d22d73bef4ced1052161958169428d06ba9724ea9e9a64be"}, + {file = "fonttools-4.63.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9ced0bd02ac751dd6319b0da88aaef24414e3b0dbc32bb4f24944821a3741a27"}, + {file = "fonttools-4.63.0-cp313-cp313-win32.whl", hash = "sha256:85be818f5506e8a7753153def2c9550178f0ecae6a47b5e0e8dbb23f7cc90380"}, + {file = "fonttools-4.63.0-cp313-cp313-win_amd64.whl", hash = "sha256:ba04cb5891d4c0c21b6da95eda8d7b090021508a294fff33464fc7d241e0856b"}, + {file = "fonttools-4.63.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:fd1e3094f42d806d3d7c79162fc59e5910fcbe3a7360c385b8da969bc4493745"}, + {file = "fonttools-4.63.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:6e528da43bc3791085f8cb6141b1d13e459226790240340fcbb4625649238b03"}, + {file = "fonttools-4.63.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b2248c5decb223562f7902ff6325077a073f608ee8e33e88ad88db734eb9f49"}, + {file = "fonttools-4.63.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:308f957cdeaf8abe4e5f2f124902ef405448af92c90f80e302a3b771c2e6116b"}, + {file = "fonttools-4.63.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:bf00f21eb5fb721dbaf73d1e9da6d02a1af7768f2ebcf9798be98beab8ba90f6"}, + {file = "fonttools-4.63.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:c1aaa4b9c75798400ac043ce04d74e7830376c85095a5a6ed7cba2f17a266bf4"}, + {file = "fonttools-4.63.0-cp314-cp314-win32.whl", hash = "sha256:22693918177bd9ceabec4736d338045f357769416fc6b0b2508eefef75b08616"}, + {file = "fonttools-4.63.0-cp314-cp314-win_amd64.whl", hash = "sha256:7d782fac32985914c351556f68ac0855391572bcd87de50e05970d3cd4c96fc5"}, + {file = "fonttools-4.63.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:6db5140a60a5d731d21ec076745b40a310607731b0a565b50776393188649001"}, + {file = "fonttools-4.63.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:7d76edbff9014094dbf03bd2d074709dfa6ec7aba13d838c937a2b33d2d6a86e"}, + {file = "fonttools-4.63.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0eac00b9118c3c2f87d272e45341871c5b3066baa3c86897fa634a7c3fb59096"}, + {file = "fonttools-4.63.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:51394295f1a51de8b5f30bdb1e1b9a4231536c7064ef5c6e211eec19fa36036f"}, + {file = "fonttools-4.63.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:9e12f105d2b6342c559c298afb674006bb2893afc7102dcf8a1b55b0486b4e40"}, + {file = "fonttools-4.63.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:796f27556dbe094c4824f75ca85267e4df776c79036c8441469a4df37038c196"}, + {file = "fonttools-4.63.0-cp314-cp314t-win32.whl", hash = "sha256:948428a275741f0b64b113c955425a953314f4b9ab9997f73a72c83e68e569c8"}, + {file = "fonttools-4.63.0-cp314-cp314t-win_amd64.whl", hash = "sha256:6d4741eb179121cab9eea4cb2393d24492373a260d7945006358c08cfbf45419"}, + {file = "fonttools-4.63.0-py3-none-any.whl", hash = "sha256:445af2eab030a16b9171ea8bdda7ebf7d96bda2df88ee182a464252f6e05e20d"}, + {file = "fonttools-4.63.0.tar.gz", hash = "sha256:caeb583deeb5168e694b65cda8b4ee62abedfa66cf88488734466f2366b9c4e0"}, ] [package.extras] -all = ["brotli (>=1.0.1) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\"", "lxml (>=4.0)", "lz4 (>=1.7.4.2)", "matplotlib", "munkres ; platform_python_implementation == \"PyPy\"", "pycairo", "scipy ; platform_python_implementation != \"PyPy\"", "skia-pathops (>=0.5.0)", "sympy", "uharfbuzz (>=0.23.0)", "unicodedata2 (>=15.1.0) ; python_version <= \"3.12\"", "xattr ; sys_platform == \"darwin\"", "zopfli (>=0.1.4)"] +all = ["brotli (>=1.0.1) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\"", "lxml (>=4.0)", "lz4 (>=1.7.4.2)", "matplotlib", "munkres ; platform_python_implementation == \"PyPy\"", "pycairo", "scipy ; platform_python_implementation != \"PyPy\"", "skia-pathops (>=0.5.0)", "sympy", "uharfbuzz (>=0.45.0)", "unicodedata2 (>=17.0.0) ; python_version <= \"3.14\"", "xattr ; sys_platform == \"darwin\"", "zopfli (>=0.1.4)"] graphite = ["lz4 (>=1.7.4.2)"] interpolatable = ["munkres ; platform_python_implementation == \"PyPy\"", "pycairo", "scipy ; platform_python_implementation != \"PyPy\""] lxml = ["lxml (>=4.0)"] pathops = ["skia-pathops (>=0.5.0)"] plot = ["matplotlib"] -repacker = ["uharfbuzz (>=0.23.0)"] +repacker = ["uharfbuzz (>=0.45.0)"] symfont = ["sympy"] type1 = ["xattr ; sys_platform == \"darwin\""] -unicode = ["unicodedata2 (>=15.1.0) ; python_version <= \"3.12\""] +unicode = ["unicodedata2 (>=17.0.0) ; python_version <= \"3.14\""] woff = ["brotli (>=1.0.1) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\"", "zopfli (>=0.1.4)"] [[package]] @@ -1014,18 +1088,18 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "idna" -version = "3.10" +version = "3.18" description = "Internationalized Domain Names in Applications (IDNA)" optional = false -python-versions = ">=3.6" +python-versions = ">=3.9" groups = ["main", "dev"] files = [ - {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, - {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, + {file = "idna-3.18-py3-none-any.whl", hash = "sha256:7f952cbe720b688055e3f87de14f5c3e5fdaa8bc3928985c4077ca689de849a2"}, + {file = "idna-3.18.tar.gz", hash = "sha256:ffb385a7e039654cef1ab9ef32c6fafe283c0c0467bba1d9029738ce4a14a848"}, ] [package.extras] -all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] +all = ["mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"] [[package]] name = "imagesize" @@ -1900,15 +1974,15 @@ files = [ [[package]] name = "mistune" -version = "3.1.4" +version = "3.2.1" description = "A sane and fast Markdown parser with useful plugins and renderers" optional = true python-versions = ">=3.8" groups = ["main"] markers = "extra == \"docs\"" files = [ - {file = "mistune-3.1.4-py3-none-any.whl", hash = "sha256:93691da911e5d9d2e23bc54472892aff676df27a75274962ff9edc210364266d"}, - {file = "mistune-3.1.4.tar.gz", hash = "sha256:b5a7f801d389f724ec702840c11d8fc48f2b33519102fc7ee739e8177b672164"}, + {file = "mistune-3.2.1-py3-none-any.whl", hash = "sha256:78cdb0ba5e938053ccf63651b352508d2efa9411dc8810bfb05f2dc5140c0048"}, + {file = "mistune-3.2.1.tar.gz", hash = "sha256:7c8e5501d38bac1582e067e46c8343f17d57ea1aaa735823f3aba1fd59c88a28"}, ] [package.dependencies] @@ -2113,15 +2187,15 @@ test = ["flaky", "ipykernel (>=6.19.3)", "ipython", "ipywidgets", "nbconvert (>= [[package]] name = "nbconvert" -version = "7.16.6" -description = "Converting Jupyter Notebooks (.ipynb files) to other formats. Output formats include asciidoc, html, latex, markdown, pdf, py, rst, script. nbconvert can be used both as a Python library (`import nbconvert`) or as a command line tool (invoked as `jupyter nbconvert ...`)." +version = "7.17.1" +description = "Convert Jupyter Notebooks (.ipynb files) to other formats." optional = true -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] markers = "extra == \"docs\"" files = [ - {file = "nbconvert-7.16.6-py3-none-any.whl", hash = "sha256:1375a7b67e0c2883678c48e506dc320febb57685e5ee67faa51b18a90f3a712b"}, - {file = "nbconvert-7.16.6.tar.gz", hash = "sha256:576a7e37c6480da7b8465eefa66c17844243816ce1ccc372633c6b71c3c0f582"}, + {file = "nbconvert-7.17.1-py3-none-any.whl", hash = "sha256:aa85c087b435e7bf1ffd03319f658e285f2b89eccab33bc1ba7025495ab3e7c8"}, + {file = "nbconvert-7.17.1.tar.gz", hash = "sha256:34d0d0a7e73ce3cbab6c5aae8f4f468797280b01fd8bd2ca746da8569eddd7d2"}, ] [package.dependencies] @@ -2142,8 +2216,8 @@ pygments = ">=2.4.1" traitlets = ">=5.1" [package.extras] -all = ["flaky", "ipykernel", "ipython", "ipywidgets (>=7.5)", "myst-parser", "nbsphinx (>=0.2.12)", "playwright", "pydata-sphinx-theme", "pyqtwebengine (>=5.15)", "pytest (>=7)", "sphinx (==5.0.2)", "sphinxcontrib-spelling", "tornado (>=6.1)"] -docs = ["ipykernel", "ipython", "myst-parser", "nbsphinx (>=0.2.12)", "pydata-sphinx-theme", "sphinx (==5.0.2)", "sphinxcontrib-spelling"] +all = ["flaky", "intersphinx-registry", "ipykernel", "ipython", "ipywidgets (>=7.5)", "myst-parser", "nbsphinx (>=0.2.12)", "playwright", "pydata-sphinx-theme", "pyqtwebengine (>=5.15)", "pytest (>=7)", "sphinx (>=5.0.2)", "sphinxcontrib-spelling", "tornado (>=6.1)"] +docs = ["intersphinx-registry", "ipykernel", "ipython", "myst-parser", "nbsphinx (>=0.2.12)", "pydata-sphinx-theme", "sphinx (>=5.0.2)", "sphinxcontrib-spelling"] qtpdf = ["pyqtwebengine (>=5.15)"] qtpng = ["pyqtwebengine (>=5.15)"] serve = ["tornado (>=6.1)"] @@ -2572,7 +2646,7 @@ description = "Python Imaging Library (Fork)" optional = true python-versions = ">=3.9" groups = ["main"] -markers = "extra == \"docs\"" +markers = "python_version < \"3.11\" and extra == \"docs\"" files = [ {file = "pillow-11.3.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:1b9c17fd4ace828b3003dfd1e30bff24863e0eb59b535e8f80194d9cc7ecf860"}, {file = "pillow-11.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:65dc69160114cdd0ca0f35cb434633c75e8e7fad4cf855177a05bf38678f73ad"}, @@ -2691,6 +2765,116 @@ tests = ["check-manifest", "coverage (>=7.4.2)", "defusedxml", "markdown2", "ole typing = ["typing-extensions ; python_version < \"3.10\""] xmp = ["defusedxml"] +[[package]] +name = "pillow" +version = "12.2.0" +description = "Python Imaging Library (fork)" +optional = true +python-versions = ">=3.10" +groups = ["main"] +markers = "python_version >= \"3.11\" and extra == \"docs\"" +files = [ + {file = "pillow-12.2.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:a4e8f36e677d3336f35089648c8955c51c6d386a13cf6ee9c189c5f5bd713a9f"}, + {file = "pillow-12.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2e589959f10d9824d39b350472b92f0ce3b443c0a3442ebf41c40cb8361c5b97"}, + {file = "pillow-12.2.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:a52edc8bfff4429aaabdf4d9ee0daadbbf8562364f940937b941f87a4290f5ff"}, + {file = "pillow-12.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:975385f4776fafde056abb318f612ef6285b10a1f12b8570f3647ad0d74b48ec"}, + {file = "pillow-12.2.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bd9c0c7a0c681a347b3194c500cb1e6ca9cab053ea4d82a5cf45b6b754560136"}, + {file = "pillow-12.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:88d387ff40b3ff7c274947ed3125dedf5262ec6919d83946753b5f3d7c67ea4c"}, + {file = "pillow-12.2.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:51c4167c34b0d8ba05b547a3bb23578d0ba17b80a5593f93bd8ecb123dd336a3"}, + {file = "pillow-12.2.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:34c0d99ecccea270c04882cb3b86e7b57296079c9a4aff88cb3b33563d95afaa"}, + {file = "pillow-12.2.0-cp310-cp310-win32.whl", hash = "sha256:b85f66ae9eb53e860a873b858b789217ba505e5e405a24b85c0464822fe88032"}, + {file = "pillow-12.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:673aa32138f3e7531ccdbca7b3901dba9b70940a19ccecc6a37c77d5fdeb05b5"}, + {file = "pillow-12.2.0-cp310-cp310-win_arm64.whl", hash = "sha256:3e080565d8d7c671db5802eedfb438e5565ffa40115216eabb8cd52d0ecce024"}, + {file = "pillow-12.2.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:8be29e59487a79f173507c30ddf57e733a357f67881430449bb32614075a40ab"}, + {file = "pillow-12.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:71cde9a1e1551df7d34a25462fc60325e8a11a82cc2e2f54578e5e9a1e153d65"}, + {file = "pillow-12.2.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f490f9368b6fc026f021db16d7ec2fbf7d89e2edb42e8ec09d2c60505f5729c7"}, + {file = "pillow-12.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8bd7903a5f2a4545f6fd5935c90058b89d30045568985a71c79f5fd6edf9b91e"}, + {file = "pillow-12.2.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3997232e10d2920a68d25191392e3a4487d8183039e1c74c2297f00ed1c50705"}, + {file = "pillow-12.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e74473c875d78b8e9d5da2a70f7099549f9eb37ded4e2f6a463e60125bccd176"}, + {file = "pillow-12.2.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:56a3f9c60a13133a98ecff6197af34d7824de9b7b38c3654861a725c970c197b"}, + {file = "pillow-12.2.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:90e6f81de50ad6b534cab6e5aef77ff6e37722b2f5d908686f4a5c9eba17a909"}, + {file = "pillow-12.2.0-cp311-cp311-win32.whl", hash = "sha256:8c984051042858021a54926eb597d6ee3012393ce9c181814115df4c60b9a808"}, + {file = "pillow-12.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:6e6b2a0c538fc200b38ff9eb6628228b77908c319a005815f2dde585a0664b60"}, + {file = "pillow-12.2.0-cp311-cp311-win_arm64.whl", hash = "sha256:9a8a34cc89c67a65ea7437ce257cea81a9dad65b29805f3ecee8c8fe8ff25ffe"}, + {file = "pillow-12.2.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:2d192a155bbcec180f8564f693e6fd9bccff5a7af9b32e2e4bf8c9c69dbad6b5"}, + {file = "pillow-12.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f3f40b3c5a968281fd507d519e444c35f0ff171237f4fdde090dd60699458421"}, + {file = "pillow-12.2.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:03e7e372d5240cc23e9f07deca4d775c0817bffc641b01e9c3af208dbd300987"}, + {file = "pillow-12.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b86024e52a1b269467a802258c25521e6d742349d760728092e1bc2d135b4d76"}, + {file = "pillow-12.2.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7371b48c4fa448d20d2714c9a1f775a81155050d383333e0a6c15b1123dda005"}, + {file = "pillow-12.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:62f5409336adb0663b7caa0da5c7d9e7bdbaae9ce761d34669420c2a801b2780"}, + {file = "pillow-12.2.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:01afa7cf67f74f09523699b4e88c73fb55c13346d212a59a2db1f86b0a63e8c5"}, + {file = "pillow-12.2.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fc3d34d4a8fbec3e88a79b92e5465e0f9b842b628675850d860b8bd300b159f5"}, + {file = "pillow-12.2.0-cp312-cp312-win32.whl", hash = "sha256:58f62cc0f00fd29e64b29f4fd923ffdb3859c9f9e6105bfc37ba1d08994e8940"}, + {file = "pillow-12.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:7f84204dee22a783350679a0333981df803dac21a0190d706a50475e361c93f5"}, + {file = "pillow-12.2.0-cp312-cp312-win_arm64.whl", hash = "sha256:af73337013e0b3b46f175e79492d96845b16126ddf79c438d7ea7ff27783a414"}, + {file = "pillow-12.2.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:8297651f5b5679c19968abefd6bb84d95fe30ef712eb1b2d9b2d31ca61267f4c"}, + {file = "pillow-12.2.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:50d8520da2a6ce0af445fa6d648c4273c3eeefbc32d7ce049f22e8b5c3daecc2"}, + {file = "pillow-12.2.0-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:766cef22385fa1091258ad7e6216792b156dc16d8d3fa607e7545b2b72061f1c"}, + {file = "pillow-12.2.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5d2fd0fa6b5d9d1de415060363433f28da8b1526c1c129020435e186794b3795"}, + {file = "pillow-12.2.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:56b25336f502b6ed02e889f4ece894a72612fe885889a6e8c4c80239ff6e5f5f"}, + {file = "pillow-12.2.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f1c943e96e85df3d3478f7b691f229887e143f81fedab9b20205349ab04d73ed"}, + {file = "pillow-12.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:03f6fab9219220f041c74aeaa2939ff0062bd5c364ba9ce037197f4c6d498cd9"}, + {file = "pillow-12.2.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5cdfebd752ec52bf5bb4e35d9c64b40826bc5b40a13df7c3cda20a2c03a0f5ed"}, + {file = "pillow-12.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:eedf4b74eda2b5a4b2b2fb4c006d6295df3bf29e459e198c90ea48e130dc75c3"}, + {file = "pillow-12.2.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:00a2865911330191c0b818c59103b58a5e697cae67042366970a6b6f1b20b7f9"}, + {file = "pillow-12.2.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:1e1757442ed87f4912397c6d35a0db6a7b52592156014706f17658ff58bbf795"}, + {file = "pillow-12.2.0-cp313-cp313-win32.whl", hash = "sha256:144748b3af2d1b358d41286056d0003f47cb339b8c43a9ea42f5fea4d8c66b6e"}, + {file = "pillow-12.2.0-cp313-cp313-win_amd64.whl", hash = "sha256:390ede346628ccc626e5730107cde16c42d3836b89662a115a921f28440e6a3b"}, + {file = "pillow-12.2.0-cp313-cp313-win_arm64.whl", hash = "sha256:8023abc91fba39036dbce14a7d6535632f99c0b857807cbbbf21ecc9f4717f06"}, + {file = "pillow-12.2.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:042db20a421b9bafecc4b84a8b6e444686bd9d836c7fd24542db3e7df7baad9b"}, + {file = "pillow-12.2.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:dd025009355c926a84a612fecf58bb315a3f6814b17ead51a8e48d3823d9087f"}, + {file = "pillow-12.2.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:88ddbc66737e277852913bd1e07c150cc7bb124539f94c4e2df5344494e0a612"}, + {file = "pillow-12.2.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d362d1878f00c142b7e1a16e6e5e780f02be8195123f164edf7eddd911eefe7c"}, + {file = "pillow-12.2.0-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2c727a6d53cb0018aadd8018c2b938376af27914a68a492f59dfcaca650d5eea"}, + {file = "pillow-12.2.0-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:efd8c21c98c5cc60653bcb311bef2ce0401642b7ce9d09e03a7da87c878289d4"}, + {file = "pillow-12.2.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9f08483a632889536b8139663db60f6724bfcb443c96f1b18855860d7d5c0fd4"}, + {file = "pillow-12.2.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:dac8d77255a37e81a2efcbd1fc05f1c15ee82200e6c240d7e127e25e365c39ea"}, + {file = "pillow-12.2.0-cp313-cp313t-win32.whl", hash = "sha256:ee3120ae9dff32f121610bb08e4313be87e03efeadfc6c0d18f89127e24d0c24"}, + {file = "pillow-12.2.0-cp313-cp313t-win_amd64.whl", hash = "sha256:325ca0528c6788d2a6c3d40e3568639398137346c3d6e66bb61db96b96511c98"}, + {file = "pillow-12.2.0-cp313-cp313t-win_arm64.whl", hash = "sha256:2e5a76d03a6c6dcef67edabda7a52494afa4035021a79c8558e14af25313d453"}, + {file = "pillow-12.2.0-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:3adc9215e8be0448ed6e814966ecf3d9952f0ea40eb14e89a102b87f450660d8"}, + {file = "pillow-12.2.0-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:6a9adfc6d24b10f89588096364cc726174118c62130c817c2837c60cf08a392b"}, + {file = "pillow-12.2.0-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:6a6e67ea2e6feda684ed370f9a1c52e7a243631c025ba42149a2cc5934dec295"}, + {file = "pillow-12.2.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:2bb4a8d594eacdfc59d9e5ad972aa8afdd48d584ffd5f13a937a664c3e7db0ed"}, + {file = "pillow-12.2.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:80b2da48193b2f33ed0c32c38140f9d3186583ce7d516526d462645fd98660ae"}, + {file = "pillow-12.2.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:22db17c68434de69d8ecfc2fe821569195c0c373b25cccb9cbdacf2c6e53c601"}, + {file = "pillow-12.2.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7b14cc0106cd9aecda615dd6903840a058b4700fcb817687d0ee4fc8b6e389be"}, + {file = "pillow-12.2.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8cbeb542b2ebc6fcdacabf8aca8c1a97c9b3ad3927d46b8723f9d4f033288a0f"}, + {file = "pillow-12.2.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4bfd07bc812fbd20395212969e41931001fd59eb55a60658b0e5710872e95286"}, + {file = "pillow-12.2.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:9aba9a17b623ef750a4d11b742cbafffeb48a869821252b30ee21b5e91392c50"}, + {file = "pillow-12.2.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:deede7c263feb25dba4e82ea23058a235dcc2fe1f6021025dc71f2b618e26104"}, + {file = "pillow-12.2.0-cp314-cp314-win32.whl", hash = "sha256:632ff19b2778e43162304d50da0181ce24ac5bb8180122cbe1bf4673428328c7"}, + {file = "pillow-12.2.0-cp314-cp314-win_amd64.whl", hash = "sha256:4e6c62e9d237e9b65fac06857d511e90d8461a32adcc1b9065ea0c0fa3a28150"}, + {file = "pillow-12.2.0-cp314-cp314-win_arm64.whl", hash = "sha256:b1c1fbd8a5a1af3412a0810d060a78b5136ec0836c8a4ef9aa11807f2a22f4e1"}, + {file = "pillow-12.2.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:57850958fe9c751670e49b2cecf6294acc99e562531f4bd317fa5ddee2068463"}, + {file = "pillow-12.2.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:d5d38f1411c0ed9f97bcb49b7bd59b6b7c314e0e27420e34d99d844b9ce3b6f3"}, + {file = "pillow-12.2.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5c0a9f29ca8e79f09de89293f82fc9b0270bb4af1d58bc98f540cc4aedf03166"}, + {file = "pillow-12.2.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1610dd6c61621ae1cf811bef44d77e149ce3f7b95afe66a4512f8c59f25d9ebe"}, + {file = "pillow-12.2.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0a34329707af4f73cf1782a36cd2289c0368880654a2c11f027bcee9052d35dd"}, + {file = "pillow-12.2.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e9c4f5b3c546fa3458a29ab22646c1c6c787ea8f5ef51300e5a60300736905e"}, + {file = "pillow-12.2.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:fb043ee2f06b41473269765c2feae53fc2e2fbf96e5e22ca94fb5ad677856f06"}, + {file = "pillow-12.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f278f034eb75b4e8a13a54a876cc4a5ab39173d2cdd93a638e1b467fc545ac43"}, + {file = "pillow-12.2.0-cp314-cp314t-win32.whl", hash = "sha256:6bb77b2dcb06b20f9f4b4a8454caa581cd4dd0643a08bacf821216a16d9c8354"}, + {file = "pillow-12.2.0-cp314-cp314t-win_amd64.whl", hash = "sha256:6562ace0d3fb5f20ed7290f1f929cae41b25ae29528f2af1722966a0a02e2aa1"}, + {file = "pillow-12.2.0-cp314-cp314t-win_arm64.whl", hash = "sha256:aa88ccfe4e32d362816319ed727a004423aab09c5cea43c01a4b435643fa34eb"}, + {file = "pillow-12.2.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0538bd5e05efec03ae613fd89c4ce0368ecd2ba239cc25b9f9be7ed426b0af1f"}, + {file = "pillow-12.2.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:394167b21da716608eac917c60aa9b969421b5dcbbe02ae7f013e7b85811c69d"}, + {file = "pillow-12.2.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5d04bfa02cc2d23b497d1e90a0f927070043f6cbf303e738300532379a4b4e0f"}, + {file = "pillow-12.2.0-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0c838a5125cee37e68edec915651521191cef1e6aa336b855f495766e77a366e"}, + {file = "pillow-12.2.0-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4a6c9fa44005fa37a91ebfc95d081e8079757d2e904b27103f4f5fa6f0bf78c0"}, + {file = "pillow-12.2.0-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:25373b66e0dd5905ed63fa3cae13c82fbddf3079f2c8bf15c6fb6a35586324c1"}, + {file = "pillow-12.2.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:bfa9c230d2fe991bed5318a5f119bd6780cda2915cca595393649fc118ab895e"}, + {file = "pillow-12.2.0.tar.gz", hash = "sha256:a830b1a40919539d07806aa58e1b114df53ddd43213d9c8b75847eee6c0182b5"}, +] + +[package.extras] +docs = ["furo", "olefile", "sphinx (>=8.2)", "sphinx-autobuild", "sphinx-copybutton", "sphinx-inline-tabs", "sphinxext-opengraph"] +fpx = ["olefile"] +mic = ["olefile"] +test-arrow = ["arro3-compute", "arro3-core", "nanoarrow", "pyarrow"] +tests = ["check-manifest", "coverage (>=7.4.2)", "defusedxml", "markdown2", "olefile", "packaging", "pyroma (>=5)", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "trove-classifiers (>=2024.10.12)"] +xmp = ["defusedxml"] + [[package]] name = "platformdirs" version = "4.4.0" @@ -2832,14 +3016,14 @@ files = [ [[package]] name = "pygments" -version = "2.19.2" +version = "2.20.0" description = "Pygments is a syntax highlighting package written in Python." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main", "dev"] files = [ - {file = "pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b"}, - {file = "pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887"}, + {file = "pygments-2.20.0-py3-none-any.whl", hash = "sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176"}, + {file = "pygments-2.20.0.tar.gz", hash = "sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f"}, ] markers = {main = "extra == \"latex\" or extra == \"docs\""} @@ -3431,7 +3615,7 @@ description = "Python HTTP for Humans." optional = true python-versions = ">=3.9" groups = ["main"] -markers = "extra == \"docs\"" +markers = "python_version < \"3.11\" and extra == \"docs\"" files = [ {file = "requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6"}, {file = "requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf"}, @@ -3447,6 +3631,29 @@ urllib3 = ">=1.21.1,<3" socks = ["PySocks (>=1.5.6,!=1.5.7)"] use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] +[[package]] +name = "requests" +version = "2.34.2" +description = "Python HTTP for Humans." +optional = true +python-versions = ">=3.10" +groups = ["main"] +markers = "python_version >= \"3.11\" and extra == \"docs\"" +files = [ + {file = "requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0"}, + {file = "requests-2.34.2.tar.gz", hash = "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed"}, +] + +[package.dependencies] +certifi = ">=2023.5.7" +charset_normalizer = ">=2,<4" +idna = ">=2.5,<4" +urllib3 = ">=1.26,<3" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<8)"] + [[package]] name = "respx" version = "0.21.1" @@ -4273,25 +4480,23 @@ markers = {main = "python_version < \"3.11\" and extra == \"docs\"", dev = "pyth [[package]] name = "tornado" -version = "6.5.2" +version = "6.5.7" description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." optional = true python-versions = ">=3.9" groups = ["main"] markers = "extra == \"docs\"" files = [ - {file = "tornado-6.5.2-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:2436822940d37cde62771cff8774f4f00b3c8024fe482e16ca8387b8a2724db6"}, - {file = "tornado-6.5.2-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:583a52c7aa94ee046854ba81d9ebb6c81ec0fd30386d96f7640c96dad45a03ef"}, - {file = "tornado-6.5.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b0fe179f28d597deab2842b86ed4060deec7388f1fd9c1b4a41adf8af058907e"}, - {file = "tornado-6.5.2-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b186e85d1e3536d69583d2298423744740986018e393d0321df7340e71898882"}, - {file = "tornado-6.5.2-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e792706668c87709709c18b353da1f7662317b563ff69f00bab83595940c7108"}, - {file = "tornado-6.5.2-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:06ceb1300fd70cb20e43b1ad8aaee0266e69e7ced38fa910ad2e03285009ce7c"}, - {file = "tornado-6.5.2-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:74db443e0f5251be86cbf37929f84d8c20c27a355dd452a5cfa2aada0d001ec4"}, - {file = "tornado-6.5.2-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b5e735ab2889d7ed33b32a459cac490eda71a1ba6857b0118de476ab6c366c04"}, - {file = "tornado-6.5.2-cp39-abi3-win32.whl", hash = "sha256:c6f29e94d9b37a95013bb669616352ddb82e3bfe8326fccee50583caebc8a5f0"}, - {file = "tornado-6.5.2-cp39-abi3-win_amd64.whl", hash = "sha256:e56a5af51cc30dd2cae649429af65ca2f6571da29504a07995175df14c18f35f"}, - {file = "tornado-6.5.2-cp39-abi3-win_arm64.whl", hash = "sha256:d6c33dc3672e3a1f3618eb63b7ef4683a7688e7b9e6e8f0d9aa5726360a004af"}, - {file = "tornado-6.5.2.tar.gz", hash = "sha256:ab53c8f9a0fa351e2c0741284e06c7a45da86afb544133201c5cc8578eb076a0"}, + {file = "tornado-6.5.7-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:148b2eb15c2c765a50796172c1e499649b35f30d2e3c3d3e15913cfa56bfb163"}, + {file = "tornado-6.5.7-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:9da38de27f1da3b78a966f0dae12b5a1ea9afe72ca805d84ff06508272ddf100"}, + {file = "tornado-6.5.7-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:8d759e71906ee783f8867b93bf26a265743da4c1e2f4a018464c1ba019862972"}, + {file = "tornado-6.5.7-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8a46347a18f23fb92b396beebe0fb78f61dda0cc302445202c16203d8a18848b"}, + {file = "tornado-6.5.7-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:7778b30bef919231265e91c69963ce0f49a1e9c07ac900bbe75b19ce2575ba92"}, + {file = "tornado-6.5.7-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:e726f0c75da7726eec023aa62751ff8878bd2737e34fbdd33b1ae5897d2200f5"}, + {file = "tornado-6.5.7-cp39-abi3-win32.whl", hash = "sha256:f8de3bf12d3efdd0cbe7c8887868198f8a91415e3f29fcf258d9b8eb7b1d9ae4"}, + {file = "tornado-6.5.7-cp39-abi3-win_amd64.whl", hash = "sha256:de942f843533a039ef9fa3d9c88c7cd8a7c94553fb5ad0154270989b3d99a2c4"}, + {file = "tornado-6.5.7-cp39-abi3-win_arm64.whl", hash = "sha256:ff934fce95643af5f11efdae618eaa73d469dc588641e5c8d19295a0c65c4796"}, + {file = "tornado-6.5.7.tar.gz", hash = "sha256:66c513a76cda70d53907bc27cf1447557699c2e95aa48ba27a442ff61c3ddfc2"}, ] [[package]] @@ -4349,22 +4554,41 @@ files = [ [[package]] name = "urllib3" -version = "2.5.0" +version = "2.6.3" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = true python-versions = ">=3.9" groups = ["main"] -markers = "extra == \"docs\"" +markers = "python_version < \"3.11\" and extra == \"docs\"" files = [ - {file = "urllib3-2.5.0-py3-none-any.whl", hash = "sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc"}, - {file = "urllib3-2.5.0.tar.gz", hash = "sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760"}, + {file = "urllib3-2.6.3-py3-none-any.whl", hash = "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4"}, + {file = "urllib3-2.6.3.tar.gz", hash = "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed"}, ] [package.extras] -brotli = ["brotli (>=1.0.9) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\""] +brotli = ["brotli (>=1.2.0) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=1.2.0.0) ; platform_python_implementation != \"CPython\""] h2 = ["h2 (>=4,<5)"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] -zstd = ["zstandard (>=0.18.0)"] +zstd = ["backports-zstd (>=1.0.0) ; python_version < \"3.14\""] + +[[package]] +name = "urllib3" +version = "2.7.0" +description = "HTTP library with thread-safe connection pooling, file post, and more." +optional = true +python-versions = ">=3.10" +groups = ["main"] +markers = "python_version >= \"3.11\" and extra == \"docs\"" +files = [ + {file = "urllib3-2.7.0-py3-none-any.whl", hash = "sha256:9fb4c81ebbb1ce9531cce37674bbc6f1360472bc18ca9a553ede278ef7276897"}, + {file = "urllib3-2.7.0.tar.gz", hash = "sha256:231e0ec3b63ceb14667c67be60f2f2c40a518cb38b03af60abc813da26505f4c"}, +] + +[package.extras] +brotli = ["brotli (>=1.2.0) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=1.2.0.0) ; platform_python_implementation != \"CPython\""] +h2 = ["h2 (>=4,<5)"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["backports-zstd (>=1.0.0) ; python_version < \"3.14\""] [[package]] name = "wcwidth" From b412df1847fc829866ce148eda31f22add2b9ba4 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 14:18:47 -0700 Subject: [PATCH 33/59] test: delete live qpu test --- test/e2e/test_qpu_randomized_compiling.py | 206 ---------------------- 1 file changed, 206 deletions(-) delete mode 100644 test/e2e/test_qpu_randomized_compiling.py diff --git a/test/e2e/test_qpu_randomized_compiling.py b/test/e2e/test_qpu_randomized_compiling.py deleted file mode 100644 index 9c7df7940..000000000 --- a/test/e2e/test_qpu_randomized_compiling.py +++ /dev/null @@ -1,206 +0,0 @@ -from typing import Union - -import numpy as np -import pytest -from numpy.typing import NDArray -from qcs_sdk.client import QCSClient -from qcs_sdk.qpu.api import ExecutionOptionsBuilder, retrieve_results, submit -from qcs_sdk.qpu.translation import TranslationResult, translate - -from pyquil import gates -from pyquil._qpu import randomized_compiling as rc -from pyquil.quil import Program -from pyquil.quilbase import Declare - - -def _get_bitstrings_and_final_memory( - live_quantum_processor_id: str, - translation_result: TranslationResult, - memory_map: dict[str, Union[list[int], list[float]]], - execution_options: ExecutionOptionsBuilder, - qcs_client: QCSClient, -) -> tuple[NDArray[np.int8], dict[str, Union[list[int], list[float]]]]: - job_id = submit(translation_result.program, memory_map, live_quantum_processor_id, qcs_client, execution_options.build()) - results = retrieve_results( - job_id, - quantum_processor_id=live_quantum_processor_id, - execution_options=execution_options.build(), - client=qcs_client, - ) - final_memory: dict[str, Union[list[int], list[float]]] = {k: v.inner() for k, v in results.memory.items()} - [execution_result for name, execution_result in results.buffers.items() if "_classified" in name] - return np.array( - [execution_result.data for name, execution_result in results.buffers.items() if "_classified" in name] - ).transpose(), final_memory - -_TEST_BASE_CYCLES = (((0, 1), (2, 3), (4, 5)), ((1, 2), (3, 4))) -_TEST_QUBITS = tuple(range(6)) -_TETRAHEDRAL_ANGLES = np.array([[ 0.0, 0.5, 0.5], - [-1./4, 0.0, -1./4], - [ 0.0, 0.0, 0.5], - [ 1./4, 0.5, -1./4], - [ 0.0, 1./4, -1./4], - [ 0.5, 1./4, -1./4], - [ 0.5, 1./4, 1./4], - [ 0.0, 1./4, 1./4], - [ -1./4, 1./4, 0.0], - [ 1./4, 1./4, 0.5], - [-1./4, 1./4, 0.5], - [ 1./4, 1./4, 0.0]], dtype=np.float64).flatten().tolist() -_RANDOMIZED_READOUT_ANGLES = {qubit: _TETRAHEDRAL_ANGLES for qubit in _TEST_QUBITS} - - -_TEST_CONFIGURATIONS = [ - # 0) simple base case; no loops required - rc.RandomizedCompilingConfiguration( - base_cycles=(((0, 1),),), - qubits_sorted=(0, 1), - base_cycle_repetitions=1, - ), - # 1) 4 looped base cycles + final base cycle. - rc.RandomizedCompilingConfiguration( - base_cycles=_TEST_BASE_CYCLES, - qubits_sorted=_TEST_QUBITS, - base_cycle_repetitions=5, - ), - # 2) 2 seed loop iterations + final base cycle. - rc.RandomizedCompilingConfiguration( - base_cycles=_TEST_BASE_CYCLES, - qubits_sorted=_TEST_QUBITS, - base_cycle_repetitions=25, - ), - # 3) 2 seed loop iterations + 2 base cycle iterations + final base cycle. - rc.RandomizedCompilingConfiguration( - base_cycles=_TEST_BASE_CYCLES, - qubits_sorted=_TEST_QUBITS, - base_cycle_repetitions=27, - ), - # 4) 2 seed loop iterations + 2 base cycle iterations + final base cycle with shots per randomization. - rc.RandomizedCompilingConfiguration( - base_cycles=_TEST_BASE_CYCLES, - qubits_sorted=_TEST_QUBITS, - base_cycle_repetitions=13, - shots_per_randomization=rc.ShotsPerRandomization( - shots_per_randomization=50, - ) - ), - # 5) - rc.RandomizedCompilingConfiguration( - base_cycles=_TEST_BASE_CYCLES, - qubits_sorted=_TEST_QUBITS, - base_cycle_repetitions=13, - readout_randomization=rc.ReadoutRandomization( - source_unitary_angles=_RANDOMIZED_READOUT_ANGLES, - ) - ), - # 6) - rc.RandomizedCompilingConfiguration( - base_cycles=_TEST_BASE_CYCLES, - qubits_sorted=_TEST_QUBITS, - base_cycle_repetitions=13, - shots_per_randomization=rc.ShotsPerRandomization( - shots_per_randomization=50, - ), - readout_randomization=rc.ReadoutRandomization( - source_unitary_angles=_RANDOMIZED_READOUT_ANGLES, - ) - ), -] - -@pytest.fixture -def qcs_client() -> QCSClient: - return QCSClient.load() - - -@pytest.fixture -def execution_options() -> ExecutionOptionsBuilder: - return ExecutionOptionsBuilder() - - -@pytest.fixture -def live_quantum_processor_id() -> str: - return "Cepheus-1-108Q" - - -def _sx(qubit: int) -> gates.Gate: - return gates.RX(np.pi / 2, qubit) - - -def _zxzxz(configuration: rc.RandomizedCompilingConfiguration, layer_index: int) -> Program: - program = Program() - for qubit in configuration.qubits_sorted: - program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 0), qubit) - program += _sx(qubit) - program += gates.FENCE(qubit) - - program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 1), qubit) - program += _sx(qubit) - program += gates.FENCE(qubit) - - program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 2), qubit) - return program - - -def _build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> Program: - program = Program() - cycle_count = configuration.base_cycle_repetitions * len(configuration.base_cycles) + 1 - if configuration.readout_randomization is not None: - # in the case of readout randomization, the final base cycle is replaced by readout randomization unitaries. - cycle_count -= 1 - for qubit in configuration.qubits_sorted: - program += Declare(configuration.variables.source_unitaries(qubit), "REAL", cycle_count * rc._ANGLES_PER_UNITARY) - for rep_index in range(configuration.base_cycle_repetitions): - for base_index, cycle in enumerate(configuration.base_cycles): - layer_index = rep_index * len(configuration.base_cycles) + base_index - program += _zxzxz(configuration, layer_index) - for edge in cycle: - program += gates.CZ(edge[0], edge[1]) - program += gates.FENCE(edge[0], edge[1]) - - program += _zxzxz(configuration, configuration.base_cycle_repetitions * len(configuration.base_cycles)) - - return program - -def _generate_source_unitaries(configuration: rc.RandomizedCompilingConfiguration, rng: np.random.Generator) -> dict[str, list[float]]: - source_unitaries = {} - cycle_count = configuration.base_cycle_repetitions * len(configuration.base_cycles) + 1 - if configuration.readout_randomization is not None: - # in the case of readout randomization, source unitaries are separately declared. - cycle_count -= 1 - for qubit in configuration.qubits_sorted: - source_unitaries[configuration.variables.source_unitaries(qubit)] = rng.uniform(-0.5, 0.5, size=rc._ANGLES_PER_UNITARY * cycle_count).tolist() - return source_unitaries - - -@pytest.mark.parametrize("configuration", _TEST_CONFIGURATIONS) -def test_qpu_randomized_compiling( - live_quantum_processor_id: str, - qcs_client: QCSClient, - execution_options: ExecutionOptionsBuilder, - configuration: rc.RandomizedCompilingConfiguration, -) -> None: - rng = np.random.default_rng(238_992_958) - random_seeds = configuration.generate_seed_values(rng) - program = configuration.build_quil_program() - program += _build_cycle_program(configuration) - - pauli_conjugates_map = rc.PAULI_CONJUGATES_MAPS["CZ"] - memory_map = configuration.build_memory_map(random_seeds, rc.build_memory_values_for_paulis_conjugates_map(pauli_conjugates_map)) - memory_map.update(_generate_source_unitaries(configuration, rng)) - - shot_count = 2_500 - translation_result = translate(program.out(), shot_count, live_quantum_processor_id, qcs_client) - bitstrings, final_memory = _get_bitstrings_and_final_memory( - live_quantum_processor_id, - translation_result, - memory_map, - execution_options=execution_options, - qcs_client=qcs_client, - ) - - configuration.verify_final_memory( - final_memory, - memory_map, - shot_count, - pauli_conjugates_map, - ) From b4de342a0cd2f741d85df1fade5eb137fee3b038 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 14:25:34 -0700 Subject: [PATCH 34/59] test: ensure python 3.9 and qpu support --- test/e2e/test_qpu_randomized_compiling.py | 207 +++++++++++++++++++++ test/unit/test_qpu_randomized_compiling.py | 2 +- 2 files changed, 208 insertions(+), 1 deletion(-) create mode 100644 test/e2e/test_qpu_randomized_compiling.py diff --git a/test/e2e/test_qpu_randomized_compiling.py b/test/e2e/test_qpu_randomized_compiling.py new file mode 100644 index 000000000..bea5145bf --- /dev/null +++ b/test/e2e/test_qpu_randomized_compiling.py @@ -0,0 +1,207 @@ +from typing import Union + +import numpy as np +import pytest +from numpy.typing import NDArray +from qcs_sdk.client import QCSClient +from qcs_sdk.qpu.api import ExecutionOptionsBuilder, retrieve_results, submit +from qcs_sdk.qpu.translation import TranslationResult, translate + +from pyquil import gates +from pyquil._qpu import randomized_compiling as rc +from pyquil.quil import Program +from pyquil.quilbase import Declare + + +def _get_bitstrings_and_final_memory( + live_quantum_processor_id: str, + translation_result: TranslationResult, + memory_map: dict[str, Union[list[int], list[float]]], + execution_options: ExecutionOptionsBuilder, + qcs_client: QCSClient, +) -> tuple[NDArray[np.int8], dict[str, Union[list[int], list[float]]]]: + job_id = submit(translation_result.program, memory_map, live_quantum_processor_id, qcs_client, execution_options.build()) + results = retrieve_results( + job_id, + quantum_processor_id=live_quantum_processor_id, + execution_options=execution_options.build(), + client=qcs_client, + ) + final_memory: dict[str, Union[list[int], list[float]]] = {k: v.inner() for k, v in results.memory.items()} + [execution_result for name, execution_result in results.buffers.items() if "_classified" in name] + return np.array( + [execution_result.data for name, execution_result in results.buffers.items() if "_classified" in name] + ).transpose(), final_memory + +_TEST_BASE_CYCLES = (((0, 1), (2, 3), (4, 5)), ((1, 2), (3, 4))) +_TEST_QUBITS = tuple(range(6)) +_TETRAHEDRAL_ANGLES = np.array([[ 0.0, 0.5, 0.5], + [-1./4, 0.0, -1./4], + [ 0.0, 0.0, 0.5], + [ 1./4, 0.5, -1./4], + [ 0.0, 1./4, -1./4], + [ 0.5, 1./4, -1./4], + [ 0.5, 1./4, 1./4], + [ 0.0, 1./4, 1./4], + [ -1./4, 1./4, 0.0], + [ 1./4, 1./4, 0.5], + [-1./4, 1./4, 0.5], + [ 1./4, 1./4, 0.0]], dtype=np.float64).flatten().tolist() +_RANDOMIZED_READOUT_ANGLES = {qubit: _TETRAHEDRAL_ANGLES for qubit in _TEST_QUBITS} + + +@pytest.fixture +def qcs_client() -> QCSClient: + return QCSClient.load() + + +@pytest.fixture +def execution_options() -> ExecutionOptionsBuilder: + return ExecutionOptionsBuilder() + + +@pytest.fixture +def live_quantum_processor_id() -> str: + return "Cepheus-1-108Q" + + +def _sx(qubit: int) -> gates.Gate: + return gates.RX(np.pi / 2, qubit) + + +def _zxzxz(configuration: rc.RandomizedCompilingConfiguration, layer_index: int) -> Program: + program = Program() + for qubit in configuration.qubits_sorted: + program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 0), qubit) + program += _sx(qubit) + program += gates.FENCE(qubit) + + program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 1), qubit) + program += _sx(qubit) + program += gates.FENCE(qubit) + + program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 2), qubit) + return program + + +def _build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> Program: + program = Program() + cycle_count = configuration.base_cycle_repetitions * len(configuration.base_cycles) + 1 + if configuration.readout_randomization is not None: + # in the case of readout randomization, the final base cycle is replaced by readout randomization unitaries. + cycle_count -= 1 + for qubit in configuration.qubits_sorted: + program += Declare(configuration.variables.source_unitaries(qubit), "REAL", cycle_count * rc._ANGLES_PER_UNITARY) + for rep_index in range(configuration.base_cycle_repetitions): + for base_index, cycle in enumerate(configuration.base_cycles): + layer_index = rep_index * len(configuration.base_cycles) + base_index + program += _zxzxz(configuration, layer_index) + for edge in cycle: + program += gates.CZ(edge[0], edge[1]) + program += gates.FENCE(edge[0], edge[1]) + + program += _zxzxz(configuration, configuration.base_cycle_repetitions * len(configuration.base_cycles)) + + return program + +def _generate_source_unitaries(configuration: rc.RandomizedCompilingConfiguration, rng: np.random.Generator) -> dict[str, list[float]]: + source_unitaries = {} + cycle_count = configuration.base_cycle_repetitions * len(configuration.base_cycles) + 1 + if configuration.readout_randomization is not None: + # in the case of readout randomization, source unitaries are separately declared. + cycle_count -= 1 + for qubit in configuration.qubits_sorted: + source_unitaries[configuration.variables.source_unitaries(qubit)] = rng.uniform(-0.5, 0.5, size=rc._ANGLES_PER_UNITARY * cycle_count).tolist() + return source_unitaries + +_TEST_CONFIGURATIONS = [ + # 0) simple base case; no loops required + rc.RandomizedCompilingConfiguration( + base_cycles=(((0, 1),),), + qubits_sorted=(0, 1), + base_cycle_repetitions=1, + ), + # 1) 4 looped base cycles + final base cycle. + rc.RandomizedCompilingConfiguration( + base_cycles=_TEST_BASE_CYCLES, + qubits_sorted=_TEST_QUBITS, + base_cycle_repetitions=5, + ), + # 2) 2 seed loop iterations + final base cycle. + rc.RandomizedCompilingConfiguration( + base_cycles=_TEST_BASE_CYCLES, + qubits_sorted=_TEST_QUBITS, + base_cycle_repetitions=25, + ), + # 3) 2 seed loop iterations + 2 base cycle iterations + final base cycle. + rc.RandomizedCompilingConfiguration( + base_cycles=_TEST_BASE_CYCLES, + qubits_sorted=_TEST_QUBITS, + base_cycle_repetitions=27, + ), + # 4) 2 seed loop iterations + 2 base cycle iterations + final base cycle with shots per randomization. + rc.RandomizedCompilingConfiguration( + base_cycles=_TEST_BASE_CYCLES, + qubits_sorted=_TEST_QUBITS, + base_cycle_repetitions=13, + shots_per_randomization=rc.ShotsPerRandomization( + shots_per_randomization=50, + ) + ), + # 5) + rc.RandomizedCompilingConfiguration( + base_cycles=_TEST_BASE_CYCLES, + qubits_sorted=_TEST_QUBITS, + base_cycle_repetitions=13, + readout_randomization=rc.ReadoutRandomization( + source_unitary_angles=_RANDOMIZED_READOUT_ANGLES, + ) + ), + # 6) + rc.RandomizedCompilingConfiguration( + base_cycles=_TEST_BASE_CYCLES, + qubits_sorted=_TEST_QUBITS, + base_cycle_repetitions=13, + shots_per_randomization=rc.ShotsPerRandomization( + shots_per_randomization=50, + ), + readout_randomization=rc.ReadoutRandomization( + source_unitary_angles=_RANDOMIZED_READOUT_ANGLES, + ) + ), +] + + +@pytest.mark.parametrize("configuration", _TEST_CONFIGURATIONS) +def test_qpu_randomized_compiling( + live_quantum_processor_id: str, + qcs_client: QCSClient, + execution_options: ExecutionOptionsBuilder, + configuration: rc.RandomizedCompilingConfiguration, +) -> None: + pytest.skip(reason="This test requires QPU access, which is not generally configurable in CI.") + rng = np.random.default_rng(238_992_958) + random_seeds = configuration.generate_seed_values(rng) + program = configuration.build_quil_program() + program += _build_cycle_program(configuration) + + pauli_conjugates_map = rc.PAULI_CONJUGATES_MAPS["CZ"] + memory_map = configuration.build_memory_map(random_seeds, rc.build_memory_values_for_paulis_conjugates_map(pauli_conjugates_map)) + memory_map.update(_generate_source_unitaries(configuration, rng)) + + shot_count = 2_500 + translation_result = translate(program.out(), shot_count, live_quantum_processor_id, qcs_client) + bitstrings, final_memory = _get_bitstrings_and_final_memory( + live_quantum_processor_id, + translation_result, + memory_map, + execution_options=execution_options, + qcs_client=qcs_client, + ) + + configuration.verify_final_memory( + final_memory, + memory_map, + shot_count, + pauli_conjugates_map, + ) diff --git a/test/unit/test_qpu_randomized_compiling.py b/test/unit/test_qpu_randomized_compiling.py index 6cbe7ebb3..385909338 100644 --- a/test/unit/test_qpu_randomized_compiling.py +++ b/test/unit/test_qpu_randomized_compiling.py @@ -250,7 +250,7 @@ def test_pauli_cache_accumulation(configuration: rc.RandomizedCompilingConfigura ), f"Pauli pair mismatch for qubit {qubit} at layer {layer_index}: expected {expected_pauli_pair}, got {pauli_pair}" -@dataclass(frozen=True, kw_only=True) +@dataclass(frozen=True) class LoopingStructureTestCase: configuration: rc.RandomizedCompilingConfiguration seed_loop_length: int = 0 From 8cfe454bcdc816d37ce5c670f8bba3dde2c89745 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 15:47:16 -0700 Subject: [PATCH 35/59] chore: update quil release candidate --- poetry.lock | 6 +++--- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 3e807ef68..6282235d1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -3575,13 +3575,13 @@ pyquil = ["pyquil (==4.14.2)"] [[package]] name = "quil" -version = "0.18.0rc1" +version = "0.18.0rc2" description = "A Python package for building and parsing Quil programs." optional = false python-versions = "<3.13,>=3.9" groups = ["main"] files = [ - {file = "quil-0.18.0rc1.tar.gz", hash = "sha256:815080c38d7f52c9c5bfb3e31f71665cc16ef5ecb64456583926e29dd1f95a14"}, + {file = "quil-0.18.0rc2.tar.gz", hash = "sha256:a936418d37f6be31854b3e721ba11e590fffae79d3b87f20b253b9cd3da30354"}, ] [package.dependencies] @@ -4735,4 +4735,4 @@ latex = ["ipython"] [metadata] lock-version = "2.1" python-versions = "^3.9,<3.13" -content-hash = "94543ff74ecbad4d41ee3accae3972445d35fe07631636361d54f82db862f3fc" +content-hash = "0c435be554d89df1278f7cc2ccb2d8ac650537383b62474aa32fff24647508c0" diff --git a/pyproject.toml b/pyproject.toml index eddff1598..f896bd22d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ scipy = "^1.11" rpcq = "^3.11.0" networkx = ">=2.5" qcs-sdk-python = ">=0.20.1,<0.22" -quil = "0.18.0rc1" +quil = "0.18.0rc2" packaging = ">=23.1" deprecated = "^1.2.14" types-deprecated = "^1.2.9.3" From 5f1b54c5725227c1465bb37c0bbd1d202eb1464b Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 15:48:41 -0700 Subject: [PATCH 36/59] fix: unitaries must be same length as twirled unitaries --- test/e2e/test_qpu_randomized_compiling.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/e2e/test_qpu_randomized_compiling.py b/test/e2e/test_qpu_randomized_compiling.py index bea5145bf..05eb31cab 100644 --- a/test/e2e/test_qpu_randomized_compiling.py +++ b/test/e2e/test_qpu_randomized_compiling.py @@ -87,9 +87,6 @@ def _zxzxz(configuration: rc.RandomizedCompilingConfiguration, layer_index: int) def _build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> Program: program = Program() cycle_count = configuration.base_cycle_repetitions * len(configuration.base_cycles) + 1 - if configuration.readout_randomization is not None: - # in the case of readout randomization, the final base cycle is replaced by readout randomization unitaries. - cycle_count -= 1 for qubit in configuration.qubits_sorted: program += Declare(configuration.variables.source_unitaries(qubit), "REAL", cycle_count * rc._ANGLES_PER_UNITARY) for rep_index in range(configuration.base_cycle_repetitions): @@ -107,9 +104,6 @@ def _build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> def _generate_source_unitaries(configuration: rc.RandomizedCompilingConfiguration, rng: np.random.Generator) -> dict[str, list[float]]: source_unitaries = {} cycle_count = configuration.base_cycle_repetitions * len(configuration.base_cycles) + 1 - if configuration.readout_randomization is not None: - # in the case of readout randomization, source unitaries are separately declared. - cycle_count -= 1 for qubit in configuration.qubits_sorted: source_unitaries[configuration.variables.source_unitaries(qubit)] = rng.uniform(-0.5, 0.5, size=rc._ANGLES_PER_UNITARY * cycle_count).tolist() return source_unitaries From d4f61f2cdc08ce37e18f9664bc3194e6b1492a95 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Fri, 12 Jun 2026 15:58:20 -0700 Subject: [PATCH 37/59] chore: bump version for prerelease --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f896bd22d..ed650ee26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pyquil" -version = "4.17.1-rc.0" +version = "4.18.0-rc.1" description = "A Python library for creating Quantum Instruction Language (Quil) programs." authors = ["Rigetti Computing "] readme = "README.md" From 0be125f30c9963b5eb52a70995b913f5b6e0b68d Mon Sep 17 00:00:00 2001 From: Eric Hulburd <3526083+erichulburd@users.noreply.github.com> Date: Fri, 12 Jun 2026 16:17:16 -0700 Subject: [PATCH 38/59] docs: fix pauli previous pauli index --- pyquil/_qpu/randomized_compiling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyquil/_qpu/randomized_compiling.py b/pyquil/_qpu/randomized_compiling.py index 2d4286b5d..d73e90b7f 100644 --- a/pyquil/_qpu/randomized_compiling.py +++ b/pyquil/_qpu/randomized_compiling.py @@ -733,7 +733,7 @@ class _PauliCursor(Enum): and Pauli index 0. The exception is after we transition from one seed value to the next, in which case the - previous Pauli is at `current_seeds[1]` Pauli index 0 and the next Pauli is at `current_seeds[0]` + previous Pauli is at `current_seeds[1]` Pauli index 1 and the next Pauli is at `current_seeds[0]` Pauli index 0. """ From 3808d18532aebe269ed4cb08313074eee2d38d7c Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Mon, 15 Jun 2026 17:21:14 -0700 Subject: [PATCH 39/59] fix: account for base cycle length of 1 or >= paulis per value --- pyquil/_qpu/randomized_compiling.py | 46 +++++++++++++++-------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/pyquil/_qpu/randomized_compiling.py b/pyquil/_qpu/randomized_compiling.py index d73e90b7f..940c22842 100644 --- a/pyquil/_qpu/randomized_compiling.py +++ b/pyquil/_qpu/randomized_compiling.py @@ -757,7 +757,7 @@ def previous_ref(self, current_seed_name: str) -> _PauliReference: previous_seed_pauli_index = 0 elif self == _PauliCursor.AFTER_SEED_TRANSITION: previous_seed_index = 1 - previous_seed_pauli_index = 1 + previous_seed_pauli_index = 0 else: raise ValueError(f"invalid Pauli cursor: {self}") return _PauliReference( @@ -955,9 +955,9 @@ def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: Declare(self.variables.loop_break, "BIT", 1), ) ) - if self._seed_loop_length > 0: + if self._seed_loop_length > 0 or self._base_cycle_length >= self._paulis_per_value: declarations.append( - Declare(self.variables.seed_index, "INTEGER", 2), + Declare(self.variables.seed_index, "INTEGER", 1), ) if self._base_cycle_loop_length > 0 or self._seed_loop_inner_length > 0: declarations.append( @@ -993,8 +993,8 @@ def build_memory_map( self.variables.unitary_angle_offset: [_ANGLES_PER_UNITARY], self.variables.loop_break: [0], } - if self._seed_loop_length > 0: - memory_map[self.variables.seed_index] = [0, 1] + if self._seed_loop_length > 0 or self._base_cycle_length >= self._paulis_per_value: + memory_map[self.variables.seed_index] = [0] if self._base_cycle_loop_length > 0 or self._seed_loop_inner_length > 0: memory_map[self.variables.base_cycle_loop_index] = [0] @@ -1029,7 +1029,7 @@ def build_memory_map( def _build_two_qubit_base_cycles(self) -> tuple[_TwoQubitCycle, ...]: return tuple(_TwoQubitCycle.from_edges(cycle) for cycle in self.base_cycles) - def _build_quil_instructions_for_cycle( + def _build_quil_instructions_for_base_cycle( self, /, transition_to_next_seed_on_last_cycle: bool = False, @@ -1124,13 +1124,7 @@ def _build_quil_instructions_for_cycle( ), ) - next_requires_seed_transition = _requires_seed_transition( - cycle_index=cycle_index + 1, - is_final_cycle=cycle_index + 1 == self._base_cycle_length - 1, - transition_to_next_seed_on_last_cycle=transition_to_next_seed_on_last_cycle, - paulis_per_value=self._paulis_per_value, - ) - if not requires_seed_transition and not next_requires_seed_transition: + if not requires_seed_transition: for q in self.qubits_sorted: instructions.append( ClassicalShiftRight( @@ -1249,14 +1243,14 @@ def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[Instruc seed_loop_instructions = [] if self._seed_loop_inner_length >= 1: inner_loop = self._build_quil_loop_instructions( - self._build_quil_instructions_for_cycle(), + self._build_quil_instructions_for_base_cycle(), loop_label=self.variables.seed_loop_inner_label, loop_index_variable=self.variables.base_cycle_loop_index, loop_index_end=self._seed_loop_inner_length, ) seed_loop_instructions.extend(inner_loop) seed_loop_instructions.extend( - self._build_quil_instructions_for_cycle(transition_to_next_seed_on_last_cycle=True) + self._build_quil_instructions_for_base_cycle(transition_to_next_seed_on_last_cycle=True) ) seed_loop = self._build_quil_loop_instructions( seed_loop_instructions, @@ -1269,10 +1263,17 @@ def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[Instruc if self._base_cycle_loop_length == 0: for qubit in self.qubits_sorted: instructions.append(Delay([], [qubit], self.leading_delay_seconds)) + elif self._base_cycle_length >= self._paulis_per_value: + instructions.append( + ClassicalMove( + MemoryReference(self.variables.seed_index, 0), + 1, + ) + ) if self._base_cycle_loop_length >= 1: base_loop = self._build_quil_loop_instructions( - self._build_quil_instructions_for_cycle(), + self._build_quil_instructions_for_base_cycle(), loop_label=self.variables.base_cycle_loop_label, loop_index_variable=self.variables.base_cycle_loop_index, loop_index_end=self._base_cycle_loop_length, @@ -1281,7 +1282,7 @@ def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[Instruc for qubit in self.qubits_sorted: instructions.append(Delay([], [qubit], self.leading_delay_seconds)) - final_base_cycle = self._build_quil_instructions_for_cycle(is_final_base_cycle=True) + final_base_cycle = self._build_quil_instructions_for_base_cycle(is_final_base_cycle=True) instructions.extend(final_base_cycle) return instructions @@ -1369,15 +1370,16 @@ def verify_final_memory( qubit=q, layer_index=layer_index, ) - expected_final_seed_value, final_pauli_pair = pauli_pairs[key] + expected_final_seed_value, expected_final_pauli_pair = pauli_pairs[key] if expected_final_seed_value is not None: seed_index = layer_index // self._paulis_per_value - found_final_pauli_seed = final_memory[self.variables.pauli_seed(q)][seed_index] - if _i48_to_u48(int(found_final_pauli_seed)) != expected_final_seed_value: + found_final_pauli_seed = _i48_to_u48(int(final_memory[self.variables.pauli_seed(q)][seed_index])) + if found_final_pauli_seed != expected_final_seed_value: raise ValueError( f"final seed value mismatch for q{q}, l{layer_index}: got " f"{found_final_pauli_seed}, expected {expected_final_seed_value}" ) + start_angle = layer_index * _ANGLES_PER_UNITARY end_angle = start_angle + _ANGLES_PER_UNITARY found_final_unitary_angles = tuple( @@ -1404,11 +1406,11 @@ def verify_final_memory( source_unitary_angles = tuple( original_memory[self.variables.source_unitaries(q)][start_angle:end_angle] ) - expected_unitary = _compute_expected_merged_unitary(source_unitary_angles, final_pauli_pair) + expected_unitary = _compute_expected_merged_unitary(source_unitary_angles, expected_final_pauli_pair) if not _unitary_equal(found_final_unitary, expected_unitary): raise ValueError( f"unitary mismatch for q{q} layer {layer_index}: got {found_final_unitary_angles} " - f"for source {source_unitary_angles} and final pauli pair: {final_pauli_pair}" + f"for source {source_unitary_angles} and final pauli pair: {expected_final_pauli_pair}" ) def track_pauli_frames( From d9248d5e1c09b2a0f53aea710729522b598d789f Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 16 Jun 2026 10:37:22 -0700 Subject: [PATCH 40/59] test: support randomized compiling unit and e2e shared test cases --- pyquil/_qpu/randomized_compiling.py | 51 +- test/e2e/test_qpu_randomized_compiling.py | 164 +- ...mpiling_configuration[configuration0].json | 1 + ...piling_configuration[configuration10].json | 1 + ...piling_configuration[configuration11].json | 1 + ...piling_configuration[configuration12].json | 1 + ...piling_configuration[configuration13].json | 1 + ...piling_configuration[configuration14].json | 1 + ...mpiling_configuration[configuration1].json | 1 + ...mpiling_configuration[configuration2].json | 1 + ...mpiling_configuration[configuration3].json | 1 + ...mpiling_configuration[configuration4].json | 1 + ...mpiling_configuration[configuration5].json | 1 + ...mpiling_configuration[configuration6].json | 1 + ...mpiling_configuration[configuration7].json | 1 + ...mpiling_configuration[configuration8].json | 1 + ...mpiling_configuration[configuration9].json | 1 + .../test_qpu_randomized_compiling.ambr | 1964 ++++++++++++++++- test/unit/test_qpu_randomized_compiling.py | 341 ++- 19 files changed, 2255 insertions(+), 280 deletions(-) create mode 100644 test/unit/__fixtures__/test_randomized_compiling_configuration[configuration0].json create mode 100644 test/unit/__fixtures__/test_randomized_compiling_configuration[configuration10].json create mode 100644 test/unit/__fixtures__/test_randomized_compiling_configuration[configuration11].json create mode 100644 test/unit/__fixtures__/test_randomized_compiling_configuration[configuration12].json create mode 100644 test/unit/__fixtures__/test_randomized_compiling_configuration[configuration13].json create mode 100644 test/unit/__fixtures__/test_randomized_compiling_configuration[configuration14].json create mode 100644 test/unit/__fixtures__/test_randomized_compiling_configuration[configuration1].json create mode 100644 test/unit/__fixtures__/test_randomized_compiling_configuration[configuration2].json create mode 100644 test/unit/__fixtures__/test_randomized_compiling_configuration[configuration3].json create mode 100644 test/unit/__fixtures__/test_randomized_compiling_configuration[configuration4].json create mode 100644 test/unit/__fixtures__/test_randomized_compiling_configuration[configuration5].json create mode 100644 test/unit/__fixtures__/test_randomized_compiling_configuration[configuration6].json create mode 100644 test/unit/__fixtures__/test_randomized_compiling_configuration[configuration7].json create mode 100644 test/unit/__fixtures__/test_randomized_compiling_configuration[configuration8].json create mode 100644 test/unit/__fixtures__/test_randomized_compiling_configuration[configuration9].json diff --git a/pyquil/_qpu/randomized_compiling.py b/pyquil/_qpu/randomized_compiling.py index 940c22842..65e0a876d 100644 --- a/pyquil/_qpu/randomized_compiling.py +++ b/pyquil/_qpu/randomized_compiling.py @@ -963,7 +963,9 @@ def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: declarations.append( Declare(self.variables.base_cycle_loop_index, "INTEGER", 1), ) - current_seed_length = 2 if self._seed_loop_length > 0 else 1 + current_seed_length = ( + 2 if self._seed_loop_length > 0 or self._base_cycle_length >= self._paulis_per_value else 1 + ) for q in self.qubits_sorted: declarations.append(Declare(self.variables.current_seeds(q), "INTEGER", current_seed_length)) return tuple(declarations) @@ -1005,7 +1007,9 @@ def build_memory_map( ((self._cycle_count + 1) * _ANGLES_PER_UNITARY,), dtype=float ).tolist() - current_seed_length = 2 if self._seed_loop_length > 0 else 1 + current_seed_length = ( + 2 if self._seed_loop_length > 0 or self._base_cycle_length >= self._paulis_per_value else 1 + ) for q in self.qubits_sorted: memory_map[self.variables.current_seeds(q)] = [0] * current_seed_length @@ -1046,7 +1050,11 @@ def _build_quil_instructions_for_base_cycle( paulis_per_value=self._paulis_per_value, ) if requires_seed_transition: - instructions.extend(self._build_quil_instructions_for_seed_transition()) + instructions.extend( + self._build_quil_instructions_for_seed_transition( + advance_next_seed=not (is_final_cycle and is_final_base_cycle) + ) + ) cursor = _PauliCursor.AFTER_SEED_TRANSITION else: cursor = _PauliCursor.DEFAULT_POSITION @@ -1135,7 +1143,9 @@ def _build_quil_instructions_for_base_cycle( return instructions - def _build_quil_instructions_for_seed_transition(self) -> list[InstructionDesignator]: + def _build_quil_instructions_for_seed_transition( + self, advance_next_seed: bool = True + ) -> list[InstructionDesignator]: instructions: list[InstructionDesignator] = [] instructions.extend( [ @@ -1146,16 +1156,23 @@ def _build_quil_instructions_for_seed_transition(self) -> list[InstructionDesign for qubit in self.qubits_sorted ] ) - instructions.extend( - [ - ClassicalLoad( - MemoryReference(self.variables.current_seeds(qubit), 0), - self.variables.pauli_seed(qubit), + if advance_next_seed: + instructions.extend( + [ + ClassicalLoad( + MemoryReference(self.variables.current_seeds(qubit), 0), + self.variables.pauli_seed(qubit), + MemoryReference(self.variables.seed_index, 0), + ) + for qubit in self.qubits_sorted + ] + ) + instructions.append( + ClassicalAdd( MemoryReference(self.variables.seed_index, 0), + 1, ) - for qubit in self.qubits_sorted - ] - ) + ) return instructions def _build_quil_loop_instructions( @@ -1193,8 +1210,8 @@ def _build_quil_loop_instructions( ) return loop_instructions - def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[InstructionDesignator]: - instructions: list[InstructionDesignator] = list(self._generate_declarations()) + def _build_quil_instructions_for_randomized_compiling(self) -> list[InstructionDesignator]: + instructions: list[InstructionDesignator] = [] for q in self.qubits_sorted: for i in range(self._seed_length): instructions.append( @@ -1256,8 +1273,10 @@ def _build_quil_instructions_for_randomized_compiling_loop(self) -> list[Instruc seed_loop_instructions, loop_label=self.variables.seed_loop_label, loop_index_variable=self.variables.seed_index, - loop_index_end=self._seed_loop_length + 1, loop_index_start=1, + loop_index_end=self._seed_loop_length + 1, + # seed index is incremented within the seed transition instructions + loop_index_increment=None, ) instructions.extend(seed_loop) if self._base_cycle_loop_length == 0: @@ -1305,7 +1324,7 @@ def build_quil_program( for qubit in self.qubits_sorted: program += Delay([], [qubit], self.leading_delay_seconds) - program += self._build_quil_instructions_for_randomized_compiling_loop() + program += self._build_quil_instructions_for_randomized_compiling() if self.shots_per_randomization is not None: program += self.shots_per_randomization.pulse_program_label diff --git a/test/e2e/test_qpu_randomized_compiling.py b/test/e2e/test_qpu_randomized_compiling.py index 05eb31cab..120664b9e 100644 --- a/test/e2e/test_qpu_randomized_compiling.py +++ b/test/e2e/test_qpu_randomized_compiling.py @@ -7,10 +7,9 @@ from qcs_sdk.qpu.api import ExecutionOptionsBuilder, retrieve_results, submit from qcs_sdk.qpu.translation import TranslationResult, translate -from pyquil import gates from pyquil._qpu import randomized_compiling as rc -from pyquil.quil import Program -from pyquil.quilbase import Declare + +from ..unit import test_qpu_randomized_compiling as trc def _get_bitstrings_and_final_memory( @@ -28,174 +27,49 @@ def _get_bitstrings_and_final_memory( client=qcs_client, ) final_memory: dict[str, Union[list[int], list[float]]] = {k: v.inner() for k, v in results.memory.items()} - [execution_result for name, execution_result in results.buffers.items() if "_classified" in name] return np.array( - [execution_result.data for name, execution_result in results.buffers.items() if "_classified" in name] + [execution_result.data.to_i32() for name, execution_result in results.buffers.items() if "_classified" in name] ).transpose(), final_memory -_TEST_BASE_CYCLES = (((0, 1), (2, 3), (4, 5)), ((1, 2), (3, 4))) -_TEST_QUBITS = tuple(range(6)) -_TETRAHEDRAL_ANGLES = np.array([[ 0.0, 0.5, 0.5], - [-1./4, 0.0, -1./4], - [ 0.0, 0.0, 0.5], - [ 1./4, 0.5, -1./4], - [ 0.0, 1./4, -1./4], - [ 0.5, 1./4, -1./4], - [ 0.5, 1./4, 1./4], - [ 0.0, 1./4, 1./4], - [ -1./4, 1./4, 0.0], - [ 1./4, 1./4, 0.5], - [-1./4, 1./4, 0.5], - [ 1./4, 1./4, 0.0]], dtype=np.float64).flatten().tolist() -_RANDOMIZED_READOUT_ANGLES = {qubit: _TETRAHEDRAL_ANGLES for qubit in _TEST_QUBITS} - - -@pytest.fixture -def qcs_client() -> QCSClient: - return QCSClient.load() - @pytest.fixture def execution_options() -> ExecutionOptionsBuilder: return ExecutionOptionsBuilder() -@pytest.fixture -def live_quantum_processor_id() -> str: - return "Cepheus-1-108Q" - - -def _sx(qubit: int) -> gates.Gate: - return gates.RX(np.pi / 2, qubit) - - -def _zxzxz(configuration: rc.RandomizedCompilingConfiguration, layer_index: int) -> Program: - program = Program() - for qubit in configuration.qubits_sorted: - program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 0), qubit) - program += _sx(qubit) - program += gates.FENCE(qubit) - - program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 1), qubit) - program += _sx(qubit) - program += gates.FENCE(qubit) - - program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 2), qubit) - return program - - -def _build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> Program: - program = Program() - cycle_count = configuration.base_cycle_repetitions * len(configuration.base_cycles) + 1 - for qubit in configuration.qubits_sorted: - program += Declare(configuration.variables.source_unitaries(qubit), "REAL", cycle_count * rc._ANGLES_PER_UNITARY) - for rep_index in range(configuration.base_cycle_repetitions): - for base_index, cycle in enumerate(configuration.base_cycles): - layer_index = rep_index * len(configuration.base_cycles) + base_index - program += _zxzxz(configuration, layer_index) - for edge in cycle: - program += gates.CZ(edge[0], edge[1]) - program += gates.FENCE(edge[0], edge[1]) - - program += _zxzxz(configuration, configuration.base_cycle_repetitions * len(configuration.base_cycles)) - - return program - -def _generate_source_unitaries(configuration: rc.RandomizedCompilingConfiguration, rng: np.random.Generator) -> dict[str, list[float]]: - source_unitaries = {} - cycle_count = configuration.base_cycle_repetitions * len(configuration.base_cycles) + 1 - for qubit in configuration.qubits_sorted: - source_unitaries[configuration.variables.source_unitaries(qubit)] = rng.uniform(-0.5, 0.5, size=rc._ANGLES_PER_UNITARY * cycle_count).tolist() - return source_unitaries - -_TEST_CONFIGURATIONS = [ - # 0) simple base case; no loops required - rc.RandomizedCompilingConfiguration( - base_cycles=(((0, 1),),), - qubits_sorted=(0, 1), - base_cycle_repetitions=1, - ), - # 1) 4 looped base cycles + final base cycle. - rc.RandomizedCompilingConfiguration( - base_cycles=_TEST_BASE_CYCLES, - qubits_sorted=_TEST_QUBITS, - base_cycle_repetitions=5, - ), - # 2) 2 seed loop iterations + final base cycle. - rc.RandomizedCompilingConfiguration( - base_cycles=_TEST_BASE_CYCLES, - qubits_sorted=_TEST_QUBITS, - base_cycle_repetitions=25, - ), - # 3) 2 seed loop iterations + 2 base cycle iterations + final base cycle. - rc.RandomizedCompilingConfiguration( - base_cycles=_TEST_BASE_CYCLES, - qubits_sorted=_TEST_QUBITS, - base_cycle_repetitions=27, - ), - # 4) 2 seed loop iterations + 2 base cycle iterations + final base cycle with shots per randomization. - rc.RandomizedCompilingConfiguration( - base_cycles=_TEST_BASE_CYCLES, - qubits_sorted=_TEST_QUBITS, - base_cycle_repetitions=13, - shots_per_randomization=rc.ShotsPerRandomization( - shots_per_randomization=50, - ) - ), - # 5) - rc.RandomizedCompilingConfiguration( - base_cycles=_TEST_BASE_CYCLES, - qubits_sorted=_TEST_QUBITS, - base_cycle_repetitions=13, - readout_randomization=rc.ReadoutRandomization( - source_unitary_angles=_RANDOMIZED_READOUT_ANGLES, - ) - ), - # 6) - rc.RandomizedCompilingConfiguration( - base_cycles=_TEST_BASE_CYCLES, - qubits_sorted=_TEST_QUBITS, - base_cycle_repetitions=13, - shots_per_randomization=rc.ShotsPerRandomization( - shots_per_randomization=50, - ), - readout_randomization=rc.ReadoutRandomization( - source_unitary_angles=_RANDOMIZED_READOUT_ANGLES, - ) - ), -] - - -@pytest.mark.parametrize("configuration", _TEST_CONFIGURATIONS) +@pytest.mark.parametrize("test_case", trc.CONFIGURATION_TEST_CASES) def test_qpu_randomized_compiling( - live_quantum_processor_id: str, - qcs_client: QCSClient, + quantum_processor_id: str, + client_configuration: QCSClient, execution_options: ExecutionOptionsBuilder, - configuration: rc.RandomizedCompilingConfiguration, + test_case: trc.ConfigurationTestCase, + live_qpu_access: bool, ) -> None: - pytest.skip(reason="This test requires QPU access, which is not generally configurable in CI.") - rng = np.random.default_rng(238_992_958) + if not live_qpu_access: + pytest.skip(reason="skipping this test since it requires live access to a QPU (use --live-qpu-access to run)") + configuration = test_case.configuration + rng = np.random.default_rng(trc.CONFIGURATION_TEST_SEED) random_seeds = configuration.generate_seed_values(rng) program = configuration.build_quil_program() - program += _build_cycle_program(configuration) + program += trc.build_cycle_program(configuration) pauli_conjugates_map = rc.PAULI_CONJUGATES_MAPS["CZ"] memory_map = configuration.build_memory_map(random_seeds, rc.build_memory_values_for_paulis_conjugates_map(pauli_conjugates_map)) - memory_map.update(_generate_source_unitaries(configuration, rng)) + memory_map.update(trc.generate_source_unitaries(configuration, rng)) - shot_count = 2_500 - translation_result = translate(program.out(), shot_count, live_quantum_processor_id, qcs_client) + translation_result = translate(program.out(), trc.TEST_SHOT_COUNT, quantum_processor_id, client_configuration) bitstrings, final_memory = _get_bitstrings_and_final_memory( - live_quantum_processor_id, + quantum_processor_id, translation_result, memory_map, execution_options=execution_options, - qcs_client=qcs_client, + qcs_client=client_configuration, ) configuration.verify_final_memory( final_memory, memory_map, - shot_count, + trc.TEST_SHOT_COUNT, pauli_conjugates_map, ) + diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration0].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration0].json new file mode 100644 index 000000000..5cb02e1c7 --- /dev/null +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration0].json @@ -0,0 +1 @@ +{"twirled_unitaries_q1": [0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376], "pauli_seed_q1": [60576142310008], "twirled_unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033], "current_seeds_q0": [-13838434709596], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "unitary_angle_offset": [3], "unitaries_q1": [0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376], "current_seeds_q1": [60576142310008], "pauli_seed_q0": [-13838434709596], "unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration10].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration10].json new file mode 100644 index 000000000..2702a1990 --- /dev/null +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration10].json @@ -0,0 +1 @@ +{"unitaries_q2": [-0.4019790567990782, -0.2997854884655027, -0.2146600639917331, 0.29287237689083767, -0.1596973714315837, 0.4060575610720214, 0.258661210979799, 0.185835345332638, 0.37074082635203354, -0.1459133170689384, -0.004975097634783765, -0.4839970882809759, -0.4165459335296404, 0.4894086579308805, 0.012196213778462806, 0.22934045114803325, -0.1442416045013175, 0.32767994031297576, 0.40234032300345746, 0.32971884186395783, 0.3448177027767301, -0.4584829871144649, 0.08509713625245752, -0.060495617944042124, -0.4439617577671342, -0.21225113115551508, 0.054088724382374664, -0.23892899918584476, -0.125309330460194, 0.060092742372248154, 0.4896137555816509, -0.4003084970981625, 0.40239532697192004, -0.27427209221451676, 0.3886045247436556, 0.4320039786933343, -0.3638867534321797, 0.28223449889285135, 0.12276746487499324, -0.08321214542590027, 0.4506729327841903, -0.49557296959474684, -0.1265520133216782, -0.26256977331275166, 0.03058157694307795, 0.40620047609760235, 0.1973131805413999, -0.11804061453004167, 0.05462618005151043, 0.07135232308423767, -0.2489185291095879, 0.13974379002293702, 0.41662052915091863, 0.06818086771210474, -0.16721244956765702, -0.38720928037740876, -0.1117919539837331, 0.2860409549541778, -0.4285359332075629, -0.1573891629055062, -0.17441844222633307, -0.41876241161401495, -0.20547837357075238, 0.473611069732506, -0.3783608350757284, -0.07842265526315728, 0.3925317756770923, 0.2595075211066167, -0.24233783883737559, 0.1429872906517069, 0.19320114364873575, 0.18916516162934727, -0.13975925770959208, 0.35974087642598107, 0.0910327241743758, -0.17685534791162993, 0.46825986056713376, -0.028095447670452245, 0.21121214619110518, 0.025306114815080605, 0.23576781990978546, 0.08316050282518717, 0.31848275278510485, 0.400213131759525, -0.3517301944760227, -0.05158170486511793, -0.12568734236262458, -0.4865840148088658, 0.33147630175334797, 0.021009841695313725, -0.47988603256257534, 0.06447247771077258, 0.08805243674673235, -0.1870609049750307, 0.3776046805460531, 0.3109844258745511, 0.36390183284432354, 0.4611227243477174, -0.22440520452503776, 0.1680911213450038, 0.13693298667517695, -0.20914928335500704, 0.13952487632665367, 0.35148149681080554, 0.44237399269967526, -0.20788732949937128, -0.42125761916947013, -0.26848903953135306, 0.44346653122211066, 0.1360182062364892, 0.2380340409652426, 0.3971106996721616, 0.14197951721286017, 0.3404604798712434, -0.15289293302358686, 0.12489626579553814, 0.1506412529301997, -0.13751949964263233, 0.4916932343136651, -0.008483669473928757, 0.19366711301472606, 0.3064881637397292, 0.17038852402531646, 0.08098004605518128, 0.19399838117309542, -0.46421182113421366, 0.49744699376657664, 0.3195963535447355, 0.34197805774659074, 0.42257028044813794, 0.2866464046533963, -0.048068057122417684, 0.12794233735865745, -0.4711880464251408, -0.44868171025627746, -0.3434915792021904, -0.16903330759792823, -0.09463038726272543, -0.31216367909048515, 0.13905289215915317, 0.15978147959978628, 0.05617742517105029, -0.06458650101018293, 0.21016554839495427, 0.30954878428748955, -0.4245386550744783, -0.03693104996670726, -0.015578394763785752, -0.13476795769143735, 0.056311052859296495, -0.3715304328143034, -0.19139346063203533, 0.02053440149051511], "pauli_seed_q1": [27946020799016, -50982158722643, 119343881614275], "twirled_unitaries_q3": [0.1391393899933604, 0.3499140847639808, -0.23649482115613196, 0.1472656749712904, 0.23230153972988887, 0.10812050711245647, -0.29619104176566324, 0.18340129072693045, -0.1960361804853754, -0.46737966354565685, -0.17676888165335924, 0.05397516644787004, -0.3078347140316957, 0.06713160476753188, 0.22181377205755837, -0.45050461907741024, 0.21852285157608975, 0.07161741018938628, 0.16208734362142252, 0.3156707770678331, 0.40276701807278315, 0.4089499305662727, 0.04559884867776631, -0.12868402921577982, -0.28779306223370327, -0.38382575941465547, -0.11316011308353424, -0.4980797326092343, -0.36844150855908353, 0.07253083102530766, 0.07684935298946982, 0.22640888532581727, -0.11689771197381305, 0.20661542520757337, 0.15067200142144088, -0.42444301195577694, 0.2518989936612961, -0.09901443022165424, 0.45165155867490725, -0.3375784448864749, 0.4277766470209876, -0.18433331386209062, 0.05534255703864943, -0.3484940255716431, -0.24168043211857082, -0.19263827101165987, -0.4591314616117721, 0.3603184301374789, 0.4429579035694111, 0.03645135393487209, 0.059857955898813486, -0.29246932438280737, 0.32866971539473866, -0.266571214753089, 0.23037736702080736, -0.3607562767338486, 0.047604139458051975, 0.29578822720942455, -0.20113339303479094, 0.27368430731425164, -0.27463288514010387, -0.1395472141561953, 0.2369198123537508, 0.4844920244300397, -0.4014595120061486, -0.33205651562059657, -0.13945664967836535, -0.47061612189078517, 0.335464323326935, 0.1729345691125168, -0.03548124641430306, 0.35082186984901753, 0.42048729749866354, -0.36565842821295647, -0.3473023819489818, 0.24808159091771032, 0.29234041842599723, -0.03401143471811707, -0.40100747778062384, -0.051402888029578264, -0.242254432495578, 0.349967089436543, -0.13497024366043675, 0.40083945843355906, -0.4793331010252686, 0.3934275438587207, -0.2382759407985091, 0.15487290188413283, 0.06819789376531205, -0.08326984592501319, -0.1843345541589052, -0.4927041869662183, 0.3660944866015825, 0.2250681231870928, -0.15159345037332628, 0.3138582238854397, 0.32489774504065494, 0.470106309632758, 0.16719361903857433, -0.3445219070669907, -0.24621565493408326, 0.3244659508727459, 0.21784592407162506, -0.4862016199112702, 0.42086817973683566, -0.10580086934452737, -0.05415291685963908, -0.08453543324226942, 0.4239686119935584, 0.15969555676859315, -0.044508509998252066, -0.47693360687788555, -0.48930915320842416, 0.20216511259732783, -0.06719830312912123, -0.11103231378987388, -0.2566858861477179, -0.20449950183250465, 0.3700178864721657, 0.3145433331972818, -0.23490791649510356, -7.040941621738739e-06, 0.09368362642523564, 0.26730030984167286, -0.18770345633291896, 0.4112376446768877, -0.04148883294810446, 0.2982250450633437, 0.36470940806892926, -0.4579841397279161, -0.37064313157396, 0.16197546810121466, 0.036298159115208506, -0.24319845180762556, -0.21765036331441223, -0.14324863479629357, 0.14305929493931302, -0.030082387532232246, 0.49940352427913126, -0.06423638896882622, -0.01962215023295144, -0.11053739497305415, -0.148184702068189, -0.3952183640428153, 0.34227238589241793, 0.2420469868186892, 0.34115127486314734, -0.24582752492616677, -0.026688867726463172, -0.33772791918613976, 0.46807268539201274, -0.2559411012568056, 0.1342745972448789], "twirled_unitaries_q1": [0.4413383368652397, 0.33425268937282837, -0.23636418826195538, -0.15396173955647896, 0.3048825069023309, -0.0854317187436564, -0.4630714074908795, 0.059332429419090005, -0.2944662830567353, 0.0859309855169279, 0.14970634357845114, 0.2857981714650535, 0.18760028191363887, -0.21514255278739114, -0.057318521323395544, -0.22201092389900978, 0.47367514134620947, 0.3624484324247135, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, -0.3177235489138397, -0.16885000522517402, 0.07938718192367133, -0.10882401546969689, -0.29308952850711734, -0.32399096841614394, 0.009100451273553745, 0.48333014377647743, -0.13176156160845665, -0.4642748186488568, -0.07037465869650461, 0.16046335532868028, -0.28977728519420864, -0.4127736568831999, -0.2284462147227977, 0.19373663828146093, 0.3866124655850989, -0.2815125184840035, -0.1177400591091029, 0.07358068439263832, -0.14088216697814104, 0.4980383678436553, -0.0769597740948278, 0.15377505192719454, -0.1375695796222196, -0.11134404259463437, -0.03588381796728868, -0.2122644303870267, 0.4151805693951154, 0.2457015010787451, -0.20076546001369877, -0.45957636539721136, 0.38195891683453453, -0.03859037256674469, -0.08978167650477431, 0.07808595139374575, 0.45834207293470186, 0.37243126123017944, -0.4374360835014812, -0.31177994003055787, -0.44384141722735393, 0.2722341089927305, -0.3855950011202296, -0.02604531885600636, 0.3880041097036475, -0.11709447484012614, 0.41894082221451256, 0.05473129170245272, -0.2319884785423838, -0.4357020266360898, 0.40176015336168547, 0.4720817472009138, 0.1352842273606072, 0.3337281049196612, 0.46163591823072636, 0.3662952235666772, -0.32533129436627917, 0.1765877048535387, -0.4361980782679602, 0.012161642034783426, 0.23889962098470718, 0.26096195281205326, 0.32494991468407974, -0.05117471301904075, 0.21751509762007615, 0.1197319469040572, -0.2730510105090431, 0.1723272746916713, 0.13920345844470106, 0.444153837704679, -0.23214969542699038, -0.20040028666454646, -0.2797248113332209, -0.21277422419174385, 0.4481968228582396, -0.31241562029034853, 0.4748645481993421, -0.41925850582989455, -0.08136501636392879, -0.054728813629211004, -0.11199236531999546, 0.3310447281338149, 0.3038510777441168, 0.25635721054248606, 0.08626212498747066, -0.00924419505930274, -0.004993821532753628, -0.04517698380747248, 0.3736056255881408, 0.23042832066938956, -0.48660858755684444, 0.4355398681503253, 0.13488961790957887, 0.21860666928347428, -0.08633332620212997, 0.14230310373283928, 0.031850165179228895, 0.1215744180596694, 0.4021117303101249, 0.45182440906799926, 0.05123781271171168, -0.48170724460221237, 0.23451311792852536, 0.07076615400635333, 0.39977187405517967, -0.1703562718193048, 0.4662901341384327, -0.07786597094141712, -0.25690596776971475, -0.2626546274601331, 0.19190429382765473, -0.4098307847526783, -0.34710985644882797, 0.32171991367954433, 0.3344122924782482, 0.10393190734831492, 0.26237626860959296, -0.0613204268378027, -0.02917801601742198, -0.024064861372878, -0.22827181533629215, 0.10133381022337673, 0.22346762715176283, 0.20423403798586293, 0.19835690373631465, -0.0879613077568635, -0.14091562292604465, 0.008288686447901483, 0.1907282900268754, -0.019769226618983282, 0.0488876292027669, 0.08227861161092775], "current_seeds_q2": [39601121661092, 0], "unitaries_q5": [-0.3523655032636981, -0.02982383579946557, -0.10818748535482214, 0.41775533113815655, 0.3578033953949813, 0.4872992123316351, 0.06749647647991353, 0.33718026623042263, -0.09399007955388328, -0.006147254774553801, -0.033616747391167934, 0.49871944627420817, -0.06395260206394227, 0.42669180084460834, 0.21307543060681766, 0.25184484520283945, -0.04695450904013043, -0.034431004261108455, 0.33976440346837933, -0.07139190190221711, 0.4934662112070747, 0.15108942830796224, -0.33026404858366476, -0.4640305854546334, 0.2594576184647792, -0.024636146775240064, 0.19898137960705853, 0.15055111072566874, -0.04827977325262012, -0.40414800994601663, -0.2688553214909426, 0.0919891592106552, -0.02624933566012544, 0.45789847698850394, -0.3736429769014329, 0.05033026365363469, 0.18471591147003963, 0.22209464950747915, -0.19181515167520402, -0.04329571005713717, -0.05162484585410354, -0.27532068950345234, -0.498190086359525, -0.19183373180161212, -0.4101079377657335, 0.0606320128179334, 0.3895360459685939, -0.4645186199840978, -0.08333875411389968, -0.4063605064529838, -0.14596845252507507, -0.02474966116506394, -0.2691465462702922, 0.3506115951917508, 0.25057605454827936, 0.46073857470511115, -0.4316785755689132, -0.3368314462919706, 0.16676615434938213, 0.07042281291563057, -0.4819707863313134, -0.08844771735993007, 0.4359695622379647, 0.26084162722957416, -0.34749039534677095, 0.14221574910517631, 0.4446150541983229, 0.07853727916683795, -0.05095620533766265, 0.029863347966966103, 0.26016521458993935, -0.04457939964792956, -0.0949861858722656, -0.041240547961546525, 0.4785886111955051, -0.2038805182551222, -0.19406954145355826, 0.05014170949665697, -0.007256538485293618, -0.38416138197242233, 0.003375528733023714, 0.024186816646199816, 0.4598981746590134, -0.4701814934734365, -0.08840251534018151, 0.32010521831938377, 0.0903669192227099, -0.32765836740340504, -0.14684326874886722, -0.35286990719531985, 0.4917157605445439, -0.313677213731026, -0.22671009548664145, -0.18483553136969277, -0.3582880776236159, 0.3700069303726572, -0.06842221881493771, -0.4798450747618155, 0.2746584166331445, -0.4304092442926617, 0.4087331555338629, -0.2709286399245059, -0.08391168428384432, 0.47317660876485945, -0.3385793110512054, 0.025115040337826855, -0.17583558012539768, 0.040582178411970204, -0.0397716594608859, -0.22252193154559308, 0.1699724441821644, 0.18567604654762704, -0.10497746991913104, 0.17322349954469018, 0.4559961715058556, 0.1957093944958359, -0.16363675740087302, -0.40131181591005216, 0.010825877707873133, -0.1878725186798782, -0.31492110970005527, 0.004919904505747752, -0.4990342487322472, -0.45316532094197726, -0.09199769987692719, -0.10747107417268609, -0.20598014533686637, -0.013393126915598685, 0.18171358684117678, -0.21571534573847018, -0.1427166159187223, 0.08730468474056252, 0.3655905624561022, -0.487294321015586, -0.2136098950308245, -0.2916533976215483, -0.07888475516168114, 0.15880830322828388, -0.07473096346862462, 0.4931147557221536, -0.13758097991771123, -0.17360408832940522, 0.39599467534025123, 0.3558378985265307, -0.23266806737144918, -0.10901070998026086, 0.026162054010612223, 0.01358893291052965, 0.39621120526584264, -0.4988511865045382, -0.07020466023228167, 0.13703762996570745, -0.33307028519226733], "rc_seed_index": [3], "twirled_unitaries_q5": [-0.3523655032636981, -0.02982383579946557, -0.10818748535482214, 0.41775533113815655, 0.3578033953949813, 0.4872992123316351, -0.4325035235200865, 0.16281973376957737, 0.09399007955388328, -0.4938527452254462, -0.46638325260883207, 0.49871944627420817, -0.06395260206394227, 0.07330819915539166, 0.28692456939318234, -0.25184484520283945, -0.45304549095986957, 0.46556899573889154, -0.16023559653162067, -0.4286080980977829, 0.006533788792925321, -0.15108942830796224, -0.16973595141633524, -0.4640305854546334, 0.2594576184647792, -0.47536385322475994, -0.19898137960705853, -0.15055111072566874, -0.04827977325262012, 0.40414800994601663, -0.2311446785090574, 0.4080108407893448, 0.47375066433987456, -0.042101523011496056, -0.3736429769014329, 0.05033026365363469, -0.31528408852996037, 0.27790535049252085, -0.308184848324796, 0.04329571005713717, -0.05162484585410354, 0.27532068950345234, -0.0018099136404750027, -0.3081662681983879, -0.4101079377657335, -0.4393679871820666, 0.3895360459685939, -0.4645186199840978, -0.08333875411389968, -0.4063605064529838, 0.35403154747492493, -0.02474966116506394, -0.23085345372970778, 0.14938840480824922, -0.25057605454827936, 0.46073857470511115, 0.4316785755689132, -0.1631685537080294, 0.16676615434938213, -0.07042281291563057, 0.4819707863313134, -0.08844771735993007, 0.06403043776203532, 0.23915837277042584, -0.34749039534677095, 0.3577842508948237, -0.4446150541983229, 0.42146272083316205, -0.05095620533766265, -0.4701366520330339, 0.23983478541006065, 0.04457939964792956, 0.0949861858722656, -0.4587594520384535, 0.4785886111955051, -0.2038805182551222, -0.19406954145355826, -0.44985829050334303, 0.4927434615147064, -0.38416138197242233, -0.4966244712669763, 0.024186816646199816, 0.4598981746590134, -0.4701814934734365, -0.08840251534018151, 0.32010521831938377, 0.0903669192227099, -0.32765836740340504, -0.14684326874886722, 0.14713009280468015, 0.4917157605445439, -0.18632278626897403, 0.22671009548664145, 0.18483553136969277, -0.3582880776236159, -0.3700069303726572, -0.4315777811850623, -0.020154925238184518, 0.2746584166331445, 0.0695907557073383, 0.4087331555338629, -0.2709286399245059, 0.4160883157161557, 0.026823391235140548, 0.3385793110512054, 0.47488495966217315, -0.3241644198746023, -0.4594178215880298, 0.4602283405391141, -0.2774780684544069, 0.3300275558178356, -0.18567604654762704, -0.39502253008086896, 0.17322349954469018, -0.044003828494144415, 0.1957093944958359, 0.336363242599127, 0.09868818408994784, 0.48917412229212687, -0.3121274813201218, 0.31492110970005527, 0.004919904505747752, -0.0009657512677527791, 0.45316532094197726, -0.09199769987692719, 0.10747107417268609, -0.29401985466313363, -0.4866068730844013, -0.3182864131588232, 0.2842846542615298, -0.1427166159187223, 0.08730468474056252, 0.3655905624561022, -0.487294321015586, 0.2863901049691755, -0.2916533976215483, -0.42111524483831886, -0.15880830322828388, 0.07473096346862462, 0.006885244277846425, 0.36241902008228877, 0.3263959116705948, 0.39599467534025123, -0.1441621014734693, 0.2673319326285508, -0.10901070998026086, -0.4738379459893878, 0.01358893291052965, 0.39621120526584264, -0.4988511865045382, -0.07020466023228167, 0.13703762996570745, -0.33307028519226733], "unitaries_q4": [0.3561709325161395, 0.15930777969874654, -0.1743684630615263, 0.4351044771524286, 0.28767067813391023, 0.11498356328391779, 0.2725347964291771, -0.3827096860492283, 0.45029847827993663, -0.3157236284655447, -0.41355170309384803, 0.07336459361452796, 0.36188219450578885, -0.3457670284594414, -0.15275135756452585, 0.4245576725424698, 0.47429673001817463, 0.1107047995485182, -0.013522917225923692, -0.11041981647017707, -0.4008246547094032, 0.4420287772725402, 0.0013192802017201188, 0.1269807880766507, 0.2920418739306072, 0.42226643955146415, -0.13532693696735265, -0.24349100008328506, -0.4554971197233115, -0.48098639183325176, 0.08946454111710267, 0.2597819994871422, -0.020791505910061403, -0.37968443396493257, 0.0250526177052528, 0.23572250843111675, 0.04118869363063382, -0.26982819623783527, 0.0006698988647499959, 0.22581835658949956, -0.40855000317554513, -0.15645179890231375, -0.22510263821953203, -0.01358345030937258, -0.16098848986846548, 0.20924282676022443, -0.17567365241441735, -0.4064368458493739, 0.08281245738859866, -0.38468217357713996, 0.40795297576058687, 0.09799822417052084, -0.34573686510049484, -0.4395503243121226, 0.012615100456947914, -0.3522556999089659, 0.1411387010591696, 0.4277411061530749, -0.3969579774883627, -0.21086125028359604, -0.012877630822472952, 0.04488364094157404, 0.3082213810547856, -0.45889714750449073, 0.14858994875559972, -0.27500590721741247, -0.28651423855326996, 0.27342246652462165, 0.22479296629159862, 0.4602059637223732, -0.05576467983967248, 0.16616029932721688, 0.1478199224786394, 0.47661640375647707, 0.44929360922303374, 0.10097998101087668, 0.44403909909200934, 0.05534568119137617, 0.20624619538096667, 0.11066181028252231, 0.18789003168236107, 0.1974182994887812, -0.2955508591364122, 0.4841687968278414, -0.3915337452075214, -0.25858545563052715, -0.4690715590729795, 0.3629769221630532, -0.27076522361798894, 0.17619620087508636, 0.30816246211988485, -0.22050279190613153, 0.4547783937957881, 0.4932130563306565, 0.4556195731010604, -0.4845322861772168, -0.2996778280486936, 0.028208470508662487, -0.08519764345145475, 0.16644302521805088, -0.03792969220075193, -0.31491594537605394, -0.3502749300908725, -0.4258532522736722, -0.328648872716105, 0.24209864609888498, 0.2424720323024161, -0.15982125109609768, 0.094057937586836, -0.20103091550763352, 0.3671254467924854, 0.42018251464321565, 0.38749885419025176, 0.19857770137940634, 0.03002161765239464, -0.36587895832421324, -0.22331447600723564, -0.0036222571105888335, 0.17220300115257814, -0.4923931017814738, 0.48614853536786384, -0.36404034977247335, 0.43164527732906777, -0.06767318227930019, 0.16460461827785977, -0.2836948593010149, 0.08100541276814965, -0.19739004869117593, 0.03978963166579774, 0.42699026063679213, -0.3946448342733646, 0.39693818854017593, -0.3578651726396487, -0.2638606975362272, -0.33951338543768017, 0.4584640014322865, 0.05537101858648086, -0.05270872698714868, -0.29743473075654236, 0.24917773121447695, -0.4225002607311872, 0.49432812778376345, 0.16442563343126793, -0.2757608624458001, -0.16093142158291585, 0.015413464370283236, -0.023233678416008985, -0.28242440632625687, -0.13661053456698014, -0.2266696828838981, -0.33677319237660086, 0.012643282516574317, 0.24244446505569073], "pauli_seed_q5": [129378273583824, -62630319121345, -73332466885869], "break": [1], "pauli_seed_q0": [-13838434709596, 60576142310008, 34470019755655], "current_seeds_q4": [4258326626610, 1], "twirled_unitaries_q2": [0.0980209432009218, -0.20021451153449732, -0.2853399360082669, -0.29287237689083767, -0.3403026285684163, -0.0939424389279786, -0.241338789020201, 0.185835345332638, -0.12925917364796646, 0.3540866829310616, -0.004975097634783765, 0.016002911719024127, 0.08345406647035958, 0.4894086579308805, 0.012196213778462806, 0.22934045114803325, -0.1442416045013175, -0.17232005968702424, -0.09765967699654254, 0.32971884186395783, -0.15518229722326993, 0.04151701288553511, 0.4149028637475425, -0.4395043820559579, 0.4439617577671342, -0.2877488688444849, 0.054088724382374664, 0.26107100081415524, -0.125309330460194, 0.060092742372248154, -0.010386244418349122, -0.4003084970981625, -0.09760467302807996, 0.22572790778548324, 0.3886045247436556, 0.4320039786933343, 0.1361132465678203, 0.28223449889285135, 0.12276746487499324, 0.4167878545740997, 0.4506729327841903, -0.49557296959474684, -0.1265520133216782, -0.26256977331275166, -0.46941842305692205, 0.40620047609760235, 0.3026868194586001, 0.11804061453004167, -0.05462618005151043, 0.07135232308423767, 0.2489185291095879, 0.360256209977063, 0.08337947084908137, -0.43181913228789526, -0.16721244956765702, -0.11279071962259124, -0.3882080460162669, 0.2139590450458222, -0.4285359332075629, -0.3426108370944938, -0.32558155777366693, -0.08123758838598505, 0.2945216264292476, 0.473611069732506, -0.12163916492427163, 0.07842265526315728, 0.1074682243229077, 0.24049247889338332, -0.24233783883737559, 0.1429872906517069, 0.19320114364873575, -0.31083483837065273, -0.13975925770959208, 0.14025912357401893, 0.4089672758256242, 0.17685534791162993, 0.03174013943286624, -0.028095447670452245, 0.21121214619110518, 0.4746938851849194, -0.23576781990978546, 0.41683949717481283, 0.31848275278510485, 0.099786868240475, 0.3517301944760227, -0.05158170486511793, -0.3743126576373754, 0.4865840148088658, 0.33147630175334797, 0.4789901583046863, -0.020113967437424662, 0.4355275222892274, -0.41194756325326765, 0.3129390950249693, 0.12239531945394688, -0.3109844258745511, 0.13609816715567646, 0.4611227243477174, -0.27559479547496224, 0.3319088786549962, 0.13693298667517695, 0.20914928335500704, -0.13952487632665367, 0.14851850318919446, 0.44237399269967526, -0.20788732949937128, -0.42125761916947013, 0.23151096046864694, -0.05653346877788934, 0.3639817937635108, 0.2619659590347574, 0.10288930032783838, 0.3580204827871398, -0.1595395201287566, -0.15289293302358686, 0.37510373420446186, 0.3493587470698003, 0.13751949964263233, 0.4916932343136651, 0.008483669473928757, -0.19366711301472606, 0.3064881637397292, 0.32961147597468354, 0.4190199539448187, 0.19399838117309542, -0.035788178865786335, -0.49744699376657664, 0.18040364645526452, 0.34197805774659074, -0.07742971955186206, 0.2133535953466037, 0.048068057122417684, 0.37205766264134255, -0.028811953574859217, 0.051318289743722545, -0.3434915792021904, -0.16903330759792823, -0.09463038726272543, -0.31216367909048515, 0.13905289215915317, 0.15978147959978628, 0.05617742517105029, -0.06458650101018293, 0.21016554839495427, -0.19045121571251045, -0.0754613449255217, 0.03693104996670726, 0.015578394763785752, -0.36523204230856265, -0.4436889471407035, -0.3715304328143034, -0.19139346063203533, 0.02053440149051511], "unitary_angle_offset": [150], "current_seeds_q5": [52035627456196, 3], "current_seeds_q1": [29835970403568, 3], "pauli_seed_q4": [114829320934051, 114697805194205, 17033306506441], "unitaries_q3": [-0.3608606100066396, 0.15008591523601922, 0.23649482115613196, 0.3527343250287096, 0.2676984602701111, 0.10812050711245647, 0.20380895823433676, 0.18340129072693045, -0.1960361804853754, -0.46737966354565685, -0.17676888165335924, -0.44602483355212996, -0.3078347140316957, 0.06713160476753188, -0.27818622794244163, 0.04949538092258976, 0.21852285157608975, -0.4283825898106137, 0.16208734362142252, 0.18432922293216691, -0.40276701807278315, -0.4089499305662727, 0.4544011513222337, 0.3713159707842202, 0.21220693776629673, -0.38382575941465547, -0.11316011308353424, -0.4980797326092343, -0.36844150855908353, 0.07253083102530766, 0.07684935298946982, 0.22640888532581727, 0.38310228802618695, 0.20661542520757337, 0.3493279985785591, -0.07555698804422306, -0.2518989936612961, -0.09901443022165424, -0.45165155867490725, 0.3375784448864749, 0.4277766470209876, -0.3156666861379094, 0.44465744296135057, -0.1515059744283569, 0.2583195678814292, 0.30736172898834013, -0.040868538388227904, 0.13968156986252112, 0.057042096430588884, 0.4635486460651279, -0.4401420441011865, 0.20753067561719263, 0.32866971539473866, 0.23342878524691102, 0.23037736702080736, -0.13924372326615142, -0.047604139458051975, 0.20421177279057545, -0.29886660696520906, 0.27368430731425164, 0.22536711485989613, -0.3604527858438047, 0.2630801876462492, 0.015507975569960308, -0.0985404879938514, -0.33205651562059657, 0.36054335032163465, -0.029383878109214834, -0.335464323326935, -0.1729345691125168, -0.46451875358569694, -0.14917813015098247, 0.42048729749866354, -0.13434157178704353, -0.15269761805101822, -0.24808159091771032, 0.20765958157400277, -0.03401143471811707, 0.09899252221937616, -0.051402888029578264, 0.257745567504422, 0.349967089436543, -0.13497024366043675, 0.40083945843355906, 0.020666898974731396, 0.1065724561412793, 0.2382759407985091, -0.15487290188413283, 0.06819789376531205, 0.08326984592501319, -0.3156654458410948, -0.007295813033781684, -0.1339055133984175, 0.2250681231870928, -0.15159345037332628, -0.1861417761145603, 0.32489774504065494, 0.470106309632758, 0.16719361903857433, 0.1554780929330093, -0.24621565493408326, -0.17553404912725412, 0.21784592407162506, -0.0137983800887298, 0.07913182026316434, -0.39419913065547263, -0.4458470831403609, -0.08453543324226942, -0.0760313880064416, 0.15969555676859315, -0.044508509998252066, 0.023066393122114448, -0.48930915320842416, -0.29783488740267217, -0.06719830312912123, -0.11103231378987388, -0.2566858861477179, -0.20449950183250465, 0.1299821135278343, 0.18545666680271822, -0.26509208350489644, -0.49999295905837826, -0.40631637357476436, 0.26730030984167286, -0.31229654366708104, 0.08876235532311227, 0.04148883294810446, 0.2982250450633437, 0.13529059193107074, 0.4579841397279161, -0.12935686842604, -0.33802453189878534, -0.4637018408847915, -0.24319845180762556, -0.21765036331441223, 0.3567513652037064, 0.356940705060687, 0.030082387532232246, 0.0005964757208687388, -0.4357636110311738, -0.01962215023295144, 0.38946260502694585, -0.148184702068189, -0.3952183640428153, -0.15772761410758207, 0.2420469868186892, 0.34115127486314734, 0.2541724750738332, -0.026688867726463172, -0.33772791918613976, -0.031927314607987256, -0.2559411012568056, 0.1342745972448789], "pauli_seed_q2": [-12771350299406, 505245418846, -123070490066287], "current_seeds_q0": [8617504938913, 0], "twirled_unitaries_q4": [0.3561709325161395, 0.15930777969874654, 0.3256315369384737, -0.06489552284757139, 0.28767067813391023, 0.11498356328391779, -0.2274652035708229, -0.11729031395077172, 0.04970152172006337, -0.1842763715344553, -0.41355170309384803, -0.07336459361452796, -0.36188219450578885, -0.3457670284594414, 0.15275135756452585, -0.4245576725424698, 0.025703269981825372, -0.3892952004514818, 0.4864770827740763, -0.38958018352982293, 0.4008246547094032, -0.4420287772725402, 0.0013192802017201188, 0.3730192119233493, 0.2079581260693928, 0.42226643955146415, 0.13532693696735265, 0.24349100008328506, -0.04450288027668847, 0.01901360816674824, -0.41053545888289733, 0.2402180005128578, -0.4792084940899386, -0.12031556603506743, 0.4749473822947472, 0.23572250843111675, 0.04118869363063382, -0.26982819623783527, 0.0006698988647499959, 0.22581835658949956, -0.09144999682445487, -0.34354820109768625, 0.22510263821953203, -0.4864165496906274, 0.3390115101315345, 0.20924282676022443, -0.17567365241441735, 0.0935631541506261, 0.08281245738859866, -0.38468217357713996, -0.09204702423941313, -0.40200177582947916, -0.34573686510049484, 0.0604496756878774, 0.012615100456947914, -0.14774430009103412, 0.3588612989408304, 0.07225889384692508, -0.3969579774883627, -0.28913874971640396, 0.012877630822472952, 0.45511635905842596, -0.19177861894521442, -0.45889714750449073, 0.3514100512444003, -0.22499409278258753, 0.28651423855326996, 0.27342246652462165, -0.22479296629159862, -0.4602059637223732, -0.05576467983967248, 0.3338397006727831, 0.3521800775213606, 0.47661640375647707, 0.05070639077696626, -0.10097998101087668, 0.05596090090799066, 0.05534568119137617, 0.20624619538096667, 0.3893381897174777, -0.18789003168236107, -0.1974182994887812, -0.20444914086358779, 0.4841687968278414, 0.10846625479247862, -0.25858545563052715, 0.030928440927020517, -0.13702307783694678, -0.27076522361798894, 0.17619620087508636, 0.30816246211988485, -0.27949720809386847, 0.045221606204211895, 0.006786943669343515, 0.4556195731010604, -0.015467713822783224, 0.2996778280486936, 0.4717915294913375, -0.08519764345145475, -0.3335569747819491, -0.03792969220075193, 0.18508405462394606, -0.3502749300908725, -0.07414674772632779, -0.171351127283895, -0.24209864609888498, 0.2575279676975839, -0.15982125109609768, 0.094057937586836, -0.2989690844923665, -0.3671254467924854, -0.42018251464321565, 0.38749885419025176, -0.19857770137940634, -0.03002161765239464, -0.36587895832421324, 0.22331447600723564, -0.49637774288941117, 0.32779699884742186, 0.007606898218526226, 0.48614853536786384, -0.13595965022752665, -0.43164527732906777, -0.4323268177206998, 0.33539538172214023, 0.2163051406989851, 0.08100541276814965, -0.30260995130882407, -0.03978963166579774, 0.07300973936320787, -0.3946448342733646, 0.10306181145982407, 0.3578651726396487, -0.2361393024637728, 0.16048661456231983, -0.041535998567713506, 0.44462898141351914, -0.4472912730128513, -0.20256526924345764, 0.24917773121447695, 0.4225002607311872, -0.49432812778376345, 0.16442563343126793, -0.22423913755419989, -0.33906857841708415, 0.015413464370283236, -0.476766321583991, -0.21757559367374313, -0.13661053456698014, 0.2266696828838981, -0.16322680762339914, 0.4873567174834257, -0.2575555349443093], "twirled_unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, 0.4731909991248422, -0.15171013965482416, 0.4607650836825492, -0.12315582717864615, 0.47110093793493135, 0.20420834050016623, 0.18029413960657692, 0.2520273229900738, 0.18624585452333164, -0.49105233325456865, 0.08201948178145457, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, 0.2926416855894409, -0.2567003523160629, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, 0.17073608461863543, -0.44990811567888755, 0.34029098228440446, -0.39341591753839467, 0.24481879726496558, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, -0.2846662038892873, 0.307376580132793, -0.4951949435326988, 0.49089066447141505, 0.0344985394231756, -0.17201116439296982, 0.31032298247400547, 0.07448506389936327, 0.20665942225402745, 0.08872518057716405, 0.42201221928209165, -0.4695275208591738, -0.1293619641527073, -0.33980968285915836, 0.1696033162756727, 0.1614914491827939, -0.3817490270312973, 0.13890870450366322, -0.24209820089131995, -0.49320924723211945, 0.4569557480242459, 0.32738600345714275, 0.24772931986974456, 0.30339346036759807, 0.385197581175035, -0.172704433349967, -0.1306577643126623, 0.05031939073900915, -0.42638081326169797, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, 0.026563378638172708, 0.1572765640302265, 0.27092919654169023, -0.2402723677717553, -0.3177048344177287, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.3948500346756276, 0.1185831188857982, -0.23219873717626527, 0.20566515099794458, 0.30565501841008924, -0.015880959898169067, -0.3057762984495298, -0.4168508201115806, 0.18571149745641335, -0.21220376686260067, 0.339972912082672, 0.3520932401429775, -0.06995349644153848, 0.08771408961433025, -0.34981970641761606, -0.3725604991977569, -0.00728211962388059, -0.4925164648993672, -0.22100626514078314, 0.03366269558096491, 0.2347203298500311, -0.3059358469084721, -0.004259973013947871, -0.07934844926123219, 0.20003673498231578, -0.4724426590122235, 0.4796988074039099, -0.2288914205712942, 0.3572385478026021, 0.2606958900527516, 0.06832291882974673, 0.06752295976617262, 0.006259113990971343, 0.4882741764914904, 0.1904833928861862, 0.38152574068700673, 0.2237896470331293, -0.14045948982839107, 0.17773461296227566, -0.21233047984366493, 0.18236373147040297, -0.3830795306205417, -0.356367840362811, 0.44639406555807426, 0.2705349101205172, -0.2164034875761871, 0.4047643307788249, -0.22063635836623874, 0.25125128247756123, -0.4689717709380474, 0.1617411090224934, 0.28028169533084935, -0.06018639817481031, -0.4031368826142234, -0.06717542216274452, -0.35829684548359, -0.49565929289516575, 0.38558393453215345, 0.38054151056773833, -0.3706034854176288, -0.4643162198608053, -0.45227955351385773, 0.10900193868114982, -0.03522460819027984, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, 0.3571480415801709, 0.4115821917662892, 0.12189580615840612, -0.44607081183047725, -0.08867370901765526, -0.37178913337915986, 0.44493207735456863], "unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366], "rc_base_cycle_loop_index": [11], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "current_seeds_q3": [9312591013124, 0], "pauli_seed_q3": [33932501327821, 57280048187710, 37250364052496], "unitaries_q1": [0.4413383368652397, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353, -0.0859309855169279, 0.35029365642154886, -0.21420182853494651, -0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.331149994774826, 0.42061281807632867, 0.10882401546969689, -0.20691047149288266, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028, 0.28977728519420864, -0.4127736568831999, 0.2284462147227977, 0.3062633617185391, 0.11338753441490113, 0.2184874815159965, 0.3822599408908971, 0.07358068439263832, -0.14088216697814104, 0.4980383678436553, -0.0769597740948278, -0.34622494807280546, -0.1375695796222196, -0.3886559574053656, -0.4641161820327113, -0.2877355696129733, 0.4151805693951154, -0.2457015010787451, -0.29923453998630123, -0.45957636539721136, -0.38195891683453453, 0.03859037256674469, -0.08978167650477431, -0.07808595139374575, 0.04165792706529814, 0.37243126123017944, -0.06256391649851878, 0.31177994003055787, -0.44384141722735393, 0.22776589100726952, -0.1144049988797704, -0.02604531885600636, -0.3880041097036475, -0.38290552515987386, 0.41894082221451256, 0.4452687082975473, 0.2319884785423838, -0.06429797336391019, -0.09823984663831453, -0.02791825279908622, 0.3647157726393928, -0.3337281049196612, -0.46163591823072636, 0.1337047764333228, -0.32533129436627917, 0.1765877048535387, -0.0638019217320398, 0.4878383579652166, -0.23889962098470718, 0.26096195281205326, -0.32494991468407974, -0.44882528698095925, 0.21751509762007615, 0.3802680530959428, 0.2730510105090431, 0.1723272746916713, -0.13920345844470106, 0.05584616229532102, -0.23214969542699038, -0.29959971333545354, 0.2797248113332209, -0.28722577580825615, -0.051803177141760415, -0.31241562029034853, 0.025135451800657904, -0.08074149417010545, -0.4186349836360712, -0.054728813629211004, 0.11199236531999546, -0.3310447281338149, 0.1961489222558832, -0.24364278945751394, -0.41373787501252934, -0.49075580494069726, -0.49500617846724637, 0.04517698380747248, 0.3736056255881408, -0.23042832066938956, 0.48660858755684444, 0.4355398681503253, -0.13488961790957887, 0.2813933307165257, -0.41366667379787003, -0.3576968962671607, 0.031850165179228895, 0.1215744180596694, -0.09788826968987507, -0.048175590932000745, 0.4487621872882883, 0.48170724460221237, -0.23451311792852536, 0.42923384599364667, -0.10022812594482033, -0.1703562718193048, 0.03370986586156732, -0.4221340290585829, -0.24309403223028525, -0.2626546274601331, -0.19190429382765473, -0.09016921524732169, -0.34710985644882797, 0.17828008632045567, -0.3344122924782482, 0.3960680926516851, -0.23762373139040704, 0.4386795731621973, -0.470821983982578, 0.024064861372878, 0.22827181533629215, 0.39866618977662327, 0.22346762715176283, -0.2957659620141371, 0.19835690373631465, 0.4120386922431365, 0.35908437707395535, 0.008288686447901483, 0.1907282900268754, -0.019769226618983282, 0.0488876292027669, 0.08227861161092775]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration11].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration11].json new file mode 100644 index 000000000..2dc7b860d --- /dev/null +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration11].json @@ -0,0 +1 @@ +{"break": [1], "pauli_seed_q5": [129378273583824, -62630319121345, -73332466885869], "twirled_unitaries_q3": [0.2481010063387039, -0.40098556977834576, 0.45165155867490725, 0.16242155511352507, 0.07222335297901239, -0.3156666861379094, -0.05534255703864943, -0.1515059744283569, 0.2583195678814292, 0.30736172898834013, -0.040868538388227904, -0.3603184301374789, 0.057042096430588884, 0.4635486460651279, 0.059857955898813486, -0.29246932438280737, 0.32866971539473866, -0.266571214753089, 0.23037736702080736, -0.3607562767338486, 0.047604139458051975, -0.20421177279057545, -0.20113339303479094, -0.22631569268574836, -0.27463288514010387, -0.3604527858438047, 0.2630801876462492, 0.015507975569960308, -0.0985404879938514, -0.33205651562059657, 0.36054335032163465, -0.029383878109214834, 0.164535676673065, -0.1729345691125168, -0.03548124641430306, -0.35082186984901753, -0.42048729749866354, -0.13434157178704353, 0.15269761805101822, 0.24808159091771032, 0.20765958157400277, -0.4659885652818829, 0.40100747778062384, -0.44859711197042174, -0.242254432495578, -0.15003291056345702, -0.36502975633956325, 0.09916054156644094, 0.4793331010252686, 0.3934275438587207, -0.2617240592014909, 0.34512709811586717, 0.06819789376531205, -0.4167301540749868, -0.3156654458410948, -0.4927041869662183, 0.1339055133984175, 0.2749318768129072, -0.3484065496266737, -0.1861417761145603, -0.17510225495934506, 0.029893690367241987, 0.3328063809614257, 0.3445219070669907, -0.25378434506591674, -0.17553404912725412, -0.28215407592837494, -0.4862016199112702, -0.07913182026316434, 0.39419913065547263, -0.05415291685963908, 0.4154645667577306, -0.0760313880064416, 0.34030444323140685, -0.45549149000174793, -0.023066393122114448, -0.010690846791575837, -0.29783488740267217, 0.43280169687087877, -0.11103231378987388, 0.24331411385228208, -0.20449950183250465, 0.1299821135278343, 0.18545666680271822, 0.23490791649510356, -7.040941621738739e-06, 0.40631637357476436, -0.26730030984167286, -0.31229654366708104, -0.08876235532311227, 0.45851116705189554, 0.20177495493665631, -0.36470940806892926, 0.4579841397279161, -0.12935686842604, 0.16197546810121466, -0.4637018408847915, -0.24319845180762556, -0.21765036331441223, -0.14324863479629357, 0.356940705060687, -0.46991761246776775, 0.0005964757208687388, -0.06423638896882622, -0.48037784976704856, 0.11053739497305415, -0.351815297931811, -0.3952183640428153, 0.34227238589241793, 0.2420469868186892, 0.34115127486314734, -0.24582752492616677, -0.026688867726463172, 0.16227208081386024, -0.031927314607987256, -0.2559411012568056, 0.1342745972448789, 0.3561709325161395, 0.34069222030125346, -0.3256315369384737, 0.06489552284757139, 0.21232932186608977, -0.3850164367160822, 0.2725347964291771, -0.11729031395077172, 0.04970152172006337, 0.3157236284655447, -0.41355170309384803, 0.42663540638547204, -0.36188219450578885, -0.1542329715405586, 0.34724864243547415, -0.07544232745753021, 0.47429673001817463, 0.1107047995485182, 0.4864770827740763, -0.38958018352982293, 0.4008246547094032, 0.057971222727459804, 0.4986807197982799, 0.1269807880766507, -0.2079581260693928, 0.42226643955146415, -0.13532693696735265, 0.25650899991671494, -0.4554971197233115, -0.48098639183325176, -0.41053545888289733, 0.2597819994871422, -0.020791505910061403, -0.37968443396493257, 0.4749473822947472, -0.23572250843111675, 0.4588113063693662, -0.23017180376216473, -0.49933010113525, 0.22581835658949956, -0.40855000317554513, -0.15645179890231375, -0.22510263821953203, -0.4864165496906274, 0.16098848986846548, 0.29075717323977557, -0.32432634758558265, 0.0935631541506261], "pauli_seed_q3": [33932501327821, 57280048187710, 37250364052496], "unitary_angle_offset": [162], "rc_seed_index": [3], "unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353, -0.0859309855169279, 0.35029365642154886, -0.21420182853494651], "current_seeds_q3": [36377308645, 0], "current_seeds_q0": [33662128667, 0], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "unitaries_q4": [0.08281245738859866, -0.38468217357713996, 0.40795297576058687, 0.09799822417052084, -0.34573686510049484, -0.4395503243121226, 0.012615100456947914, -0.3522556999089659, 0.1411387010591696, 0.4277411061530749, -0.3969579774883627, -0.21086125028359604, -0.012877630822472952, 0.04488364094157404, 0.3082213810547856, -0.45889714750449073, 0.14858994875559972, -0.27500590721741247, -0.28651423855326996, 0.27342246652462165, 0.22479296629159862, 0.4602059637223732, -0.05576467983967248, 0.16616029932721688, 0.1478199224786394, 0.47661640375647707, 0.44929360922303374, 0.10097998101087668, 0.44403909909200934, 0.05534568119137617, 0.20624619538096667, 0.11066181028252231, 0.18789003168236107, 0.1974182994887812, -0.2955508591364122, 0.4841687968278414, -0.3915337452075214, -0.25858545563052715, -0.4690715590729795, 0.3629769221630532, -0.27076522361798894, 0.17619620087508636, 0.30816246211988485, -0.22050279190613153, 0.4547783937957881, 0.4932130563306565, 0.4556195731010604, -0.4845322861772168, -0.2996778280486936, 0.028208470508662487, -0.08519764345145475, 0.16644302521805088, -0.03792969220075193, -0.31491594537605394, -0.3502749300908725, -0.4258532522736722, -0.328648872716105, 0.24209864609888498, 0.2424720323024161, -0.15982125109609768, 0.094057937586836, -0.20103091550763352, 0.3671254467924854, 0.42018251464321565, 0.38749885419025176, 0.19857770137940634, 0.03002161765239464, -0.36587895832421324, -0.22331447600723564, -0.0036222571105888335, 0.17220300115257814, -0.4923931017814738, 0.48614853536786384, -0.36404034977247335, 0.43164527732906777, -0.06767318227930019, 0.16460461827785977, -0.2836948593010149, 0.08100541276814965, -0.19739004869117593, 0.03978963166579774, 0.42699026063679213, -0.3946448342733646, 0.39693818854017593, -0.3578651726396487, -0.2638606975362272, -0.33951338543768017, 0.4584640014322865, 0.05537101858648086, -0.05270872698714868, -0.29743473075654236, 0.24917773121447695, -0.4225002607311872, 0.49432812778376345, 0.16442563343126793, -0.2757608624458001, -0.16093142158291585, 0.015413464370283236, -0.023233678416008985, -0.28242440632625687, -0.13661053456698014, -0.2266696828838981, -0.33677319237660086, 0.012643282516574317, 0.24244446505569073, -0.3523655032636981, -0.02982383579946557, -0.10818748535482214, 0.41775533113815655, 0.3578033953949813, 0.4872992123316351, 0.06749647647991353, 0.33718026623042263, -0.09399007955388328, -0.006147254774553801, -0.033616747391167934, 0.49871944627420817, -0.06395260206394227, 0.42669180084460834, 0.21307543060681766, 0.25184484520283945, -0.04695450904013043, -0.034431004261108455, 0.33976440346837933, -0.07139190190221711, 0.4934662112070747, 0.15108942830796224, -0.33026404858366476, -0.4640305854546334, 0.2594576184647792, -0.024636146775240064, 0.19898137960705853, 0.15055111072566874, -0.04827977325262012, -0.40414800994601663, -0.2688553214909426, 0.0919891592106552, -0.02624933566012544, 0.45789847698850394, -0.3736429769014329, 0.05033026365363469, 0.18471591147003963, 0.22209464950747915, -0.19181515167520402, -0.04329571005713717, -0.05162484585410354, -0.27532068950345234, -0.498190086359525, -0.19183373180161212, -0.4101079377657335, 0.0606320128179334, 0.3895360459685939, -0.4645186199840978, -0.08333875411389968, -0.4063605064529838, -0.14596845252507507, -0.02474966116506394, -0.2691465462702922, 0.3506115951917508, 0.25057605454827936, 0.46073857470511115, -0.4316785755689132, -0.3368314462919706, 0.16676615434938213, 0.07042281291563057], "twirled_unitaries_q2": [0.0560382422328658, -0.2877488688444849, 0.44591127561762534, 0.23892899918584476, -0.374690669539806, -0.43990725762775185, -0.010386244418349122, -0.4003084970981625, -0.09760467302807996, 0.22572790778548324, 0.3886045247436556, -0.06799602130666571, 0.1361132465678203, 0.28223449889285135, 0.12276746487499324, -0.08321214542590027, 0.4506729327841903, 0.004427030405253163, 0.3734479866783218, -0.26256977331275166, -0.46941842305692205, -0.09379952390239765, 0.3026868194586001, -0.38195938546995833, -0.05462618005151043, 0.42864767691576233, -0.2489185291095879, -0.360256209977063, 0.41662052915091863, 0.06818086771210474, 0.332787550432343, -0.38720928037740876, 0.3882080460162669, -0.2139590450458222, -0.4285359332075629, -0.1573891629055062, 0.32558155777366693, -0.41876241161401495, -0.20547837357075238, -0.026388930267494004, -0.3783608350757284, -0.07842265526315728, 0.3925317756770923, 0.2595075211066167, 0.2576621611626244, 0.1429872906517069, 0.30679885635126425, -0.18916516162934727, 0.13975925770959208, 0.35974087642598107, -0.0910327241743758, -0.32314465208837007, 0.03174013943286624, 0.47190455232954776, 0.21121214619110518, 0.4746938851849194, 0.26423218009021454, 0.41683949717481283, 0.31848275278510485, 0.099786868240475, -0.14826980552397728, -0.4484182951348821, 0.3743126576373754, -0.4865840148088658, 0.16852369824665203, -0.021009841695313725, -0.020113967437424662, 0.4355275222892274, 0.08805243674673235, -0.1870609049750307, 0.3776046805460531, -0.1890155741254489, 0.36390183284432354, 0.038877275652282606, -0.27559479547496224, -0.1680911213450038, 0.36306701332482305, -0.20914928335500704, 0.13952487632665367, 0.14851850318919446, -0.44237399269967526, -0.2921126705006287, -0.42125761916947013, -0.23151096046864694, -0.44346653122211066, 0.1360182062364892, 0.2619659590347574, -0.3971106996721616, 0.14197951721286017, 0.1595395201287566, -0.34710706697641314, 0.37510373420446186, -0.3493587470698003, 0.3624805003573677, 0.008306765686334927, 0.008483669473928757, 0.30633288698527394, 0.3064881637397292, 0.32961147597468354, 0.4190199539448187, 0.19399838117309542, 0.46421182113421366, -0.49744699376657664, 0.18040364645526452, 0.34197805774659074, 0.42257028044813794, 0.2866464046533963, 0.4519319428775823, -0.37205766264134255, -0.028811953574859217, -0.051318289743722545, -0.15650842079780958, -0.33096669240207177, 0.40536961273727457, -0.31216367909048515, 0.3609471078408468, 0.3402185204002137, -0.05617742517105029, -0.06458650101018293, -0.21016554839495427, -0.30954878428748955, -0.4245386550744783, -0.46306895003329274, -0.48442160523621425, -0.13476795769143735, 0.4436889471407035, 0.3715304328143034, -0.30860653936796467, 0.02053440149051511, 0.1391393899933604, 0.3499140847639808, -0.23649482115613196, 0.1472656749712904, 0.23230153972988887, -0.39187949288754353, 0.20380895823433676, 0.18340129072693045, -0.1960361804853754, -0.46737966354565685, -0.17676888165335924, -0.44602483355212996, -0.3078347140316957, 0.06713160476753188, -0.27818622794244163, -0.45050461907741024, 0.28147714842391025, 0.4283825898106137, -0.16208734362142252, 0.3156707770678331, 0.09723298192721685, 0.09105006943372729, 0.04559884867776631, -0.3713159707842202, -0.21220693776629673, -0.38382575941465547, 0.11316011308353424, 0.4980797326092343, -0.36844150855908353, -0.07253083102530766, 0.4231506470105302, 0.27359111467418273, -0.11689771197381305, 0.20661542520757337, 0.3493279985785591, -0.07555698804422306], "pauli_seed_q2": [-12771350299406, 505245418846, -123070490066287], "current_seeds_q4": [16634088385, 1], "unitaries_q1": [-0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.331149994774826, 0.42061281807632867, 0.10882401546969689, -0.20691047149288266, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028, 0.28977728519420864, -0.4127736568831999, 0.2284462147227977, 0.3062633617185391, 0.11338753441490113, 0.2184874815159965, 0.3822599408908971, 0.07358068439263832, -0.14088216697814104, 0.4980383678436553, -0.0769597740948278, -0.34622494807280546, -0.1375695796222196, -0.3886559574053656, -0.4641161820327113, -0.2877355696129733, 0.4151805693951154, -0.2457015010787451, -0.29923453998630123, -0.45957636539721136, -0.38195891683453453, 0.03859037256674469, -0.08978167650477431, -0.07808595139374575, 0.04165792706529814, 0.37243126123017944, -0.06256391649851878, 0.31177994003055787, -0.44384141722735393, 0.22776589100726952, -0.1144049988797704, -0.02604531885600636, -0.3880041097036475, -0.38290552515987386, 0.41894082221451256, 0.4452687082975473, 0.2319884785423838, -0.06429797336391019, -0.09823984663831453, -0.02791825279908622, 0.3647157726393928, -0.3337281049196612, -0.46163591823072636, 0.1337047764333228, -0.32533129436627917, 0.1765877048535387, -0.0638019217320398, 0.4878383579652166, -0.23889962098470718, 0.26096195281205326, -0.32494991468407974, -0.44882528698095925, 0.21751509762007615, 0.3802680530959428, 0.2730510105090431, 0.1723272746916713, -0.13920345844470106, 0.05584616229532102, -0.23214969542699038, -0.29959971333545354, 0.2797248113332209, -0.28722577580825615, -0.051803177141760415, -0.31241562029034853, 0.025135451800657904, -0.08074149417010545, -0.4186349836360712, -0.054728813629211004, 0.11199236531999546, -0.3310447281338149, 0.1961489222558832, -0.24364278945751394, -0.41373787501252934, -0.49075580494069726, -0.49500617846724637, 0.04517698380747248, 0.3736056255881408, -0.23042832066938956, 0.48660858755684444, 0.4355398681503253, -0.13488961790957887, 0.2813933307165257, -0.41366667379787003, -0.3576968962671607, 0.031850165179228895, 0.1215744180596694, -0.09788826968987507, -0.048175590932000745, 0.4487621872882883, 0.48170724460221237, -0.23451311792852536, 0.42923384599364667, -0.10022812594482033, -0.1703562718193048, 0.03370986586156732, -0.4221340290585829, -0.24309403223028525, -0.2626546274601331, -0.19190429382765473, -0.09016921524732169, -0.34710985644882797, 0.17828008632045567, -0.3344122924782482, 0.3960680926516851, -0.23762373139040704, 0.4386795731621973, -0.470821983982578, 0.024064861372878, 0.22827181533629215, 0.39866618977662327, 0.22346762715176283, -0.2957659620141371, 0.19835690373631465, 0.4120386922431365, 0.35908437707395535, 0.008288686447901483, 0.1907282900268754, -0.019769226618983282, 0.0488876292027669, 0.08227861161092775, -0.4019790567990782, -0.2997854884655027, -0.2146600639917331, 0.29287237689083767, -0.1596973714315837, 0.4060575610720214, 0.258661210979799, 0.185835345332638, 0.37074082635203354, -0.1459133170689384, -0.004975097634783765, -0.4839970882809759, -0.4165459335296404, 0.4894086579308805, 0.012196213778462806, 0.22934045114803325, -0.1442416045013175, 0.32767994031297576, 0.40234032300345746, 0.32971884186395783, 0.3448177027767301, -0.4584829871144649, 0.08509713625245752, -0.060495617944042124], "pauli_seed_q0": [-13838434709596, 60576142310008, 34470019755655], "unitaries_q3": [-0.2518989936612961, -0.09901443022165424, -0.45165155867490725, 0.3375784448864749, 0.4277766470209876, -0.3156666861379094, 0.44465744296135057, -0.1515059744283569, 0.2583195678814292, 0.30736172898834013, -0.040868538388227904, 0.13968156986252112, 0.057042096430588884, 0.4635486460651279, -0.4401420441011865, 0.20753067561719263, 0.32866971539473866, 0.23342878524691102, 0.23037736702080736, -0.13924372326615142, -0.047604139458051975, 0.20421177279057545, -0.29886660696520906, 0.27368430731425164, 0.22536711485989613, -0.3604527858438047, 0.2630801876462492, 0.015507975569960308, -0.0985404879938514, -0.33205651562059657, 0.36054335032163465, -0.029383878109214834, -0.335464323326935, -0.1729345691125168, -0.46451875358569694, -0.14917813015098247, 0.42048729749866354, -0.13434157178704353, -0.15269761805101822, -0.24808159091771032, 0.20765958157400277, -0.03401143471811707, 0.09899252221937616, -0.051402888029578264, 0.257745567504422, 0.349967089436543, -0.13497024366043675, 0.40083945843355906, 0.020666898974731396, 0.1065724561412793, 0.2382759407985091, -0.15487290188413283, 0.06819789376531205, 0.08326984592501319, -0.3156654458410948, -0.007295813033781684, -0.1339055133984175, 0.2250681231870928, -0.15159345037332628, -0.1861417761145603, 0.32489774504065494, 0.470106309632758, 0.16719361903857433, 0.1554780929330093, -0.24621565493408326, -0.17553404912725412, 0.21784592407162506, -0.0137983800887298, 0.07913182026316434, -0.39419913065547263, -0.4458470831403609, -0.08453543324226942, -0.0760313880064416, 0.15969555676859315, -0.044508509998252066, 0.023066393122114448, -0.48930915320842416, -0.29783488740267217, -0.06719830312912123, -0.11103231378987388, -0.2566858861477179, -0.20449950183250465, 0.1299821135278343, 0.18545666680271822, -0.26509208350489644, -0.49999295905837826, -0.40631637357476436, 0.26730030984167286, -0.31229654366708104, 0.08876235532311227, 0.04148883294810446, 0.2982250450633437, 0.13529059193107074, 0.4579841397279161, -0.12935686842604, -0.33802453189878534, -0.4637018408847915, -0.24319845180762556, -0.21765036331441223, 0.3567513652037064, 0.356940705060687, 0.030082387532232246, 0.0005964757208687388, -0.4357636110311738, -0.01962215023295144, 0.38946260502694585, -0.148184702068189, -0.3952183640428153, -0.15772761410758207, 0.2420469868186892, 0.34115127486314734, 0.2541724750738332, -0.026688867726463172, -0.33772791918613976, -0.031927314607987256, -0.2559411012568056, 0.1342745972448789, 0.3561709325161395, 0.15930777969874654, -0.1743684630615263, 0.4351044771524286, 0.28767067813391023, 0.11498356328391779, 0.2725347964291771, -0.3827096860492283, 0.45029847827993663, -0.3157236284655447, -0.41355170309384803, 0.07336459361452796, 0.36188219450578885, -0.3457670284594414, -0.15275135756452585, 0.4245576725424698, 0.47429673001817463, 0.1107047995485182, -0.013522917225923692, -0.11041981647017707, -0.4008246547094032, 0.4420287772725402, 0.0013192802017201188, 0.1269807880766507, 0.2920418739306072, 0.42226643955146415, -0.13532693696735265, -0.24349100008328506, -0.4554971197233115, -0.48098639183325176, 0.08946454111710267, 0.2597819994871422, -0.020791505910061403, -0.37968443396493257, 0.0250526177052528, 0.23572250843111675, 0.04118869363063382, -0.26982819623783527, 0.0006698988647499959, 0.22581835658949956, -0.40855000317554513, -0.15645179890231375, -0.22510263821953203, -0.01358345030937258, -0.16098848986846548, 0.20924282676022443, -0.17567365241441735, -0.4064368458493739], "twirled_unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, 0.4731909991248422, -0.15171013965482416, 0.4607650836825492, -0.12315582717864615, 0.47110093793493135, 0.20420834050016623, 0.18029413960657692, 0.2520273229900738, 0.18624585452333164, -0.49105233325456865, 0.08201948178145457, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, 0.2926416855894409, -0.2567003523160629, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, 0.17073608461863543, -0.44990811567888755, 0.34029098228440446, -0.39341591753839467, 0.24481879726496558, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, -0.2846662038892873, 0.307376580132793, -0.4951949435326988, 0.49089066447141505, 0.0344985394231756, -0.17201116439296982, 0.31032298247400547, 0.07448506389936327, 0.20665942225402745, 0.08872518057716405, 0.42201221928209165, -0.4695275208591738, -0.1293619641527073, -0.33980968285915836, 0.1696033162756727, 0.1614914491827939, -0.3817490270312973, 0.13890870450366322, -0.24209820089131995, -0.49320924723211945, 0.4569557480242459, 0.32738600345714275, 0.24772931986974456, 0.30339346036759807, 0.385197581175035, -0.172704433349967, -0.1306577643126623, 0.05031939073900915, -0.42638081326169797, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, 0.026563378638172708, 0.1572765640302265, 0.27092919654169023, -0.2402723677717553, -0.3177048344177287, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.3948500346756276, 0.1185831188857982, -0.23219873717626527, 0.20566515099794458, 0.30565501841008924, -0.015880959898169067, -0.3057762984495298, -0.4168508201115806, 0.18571149745641335, -0.21220376686260067, 0.339972912082672, 0.3520932401429775, -0.06995349644153848, 0.08771408961433025, -0.34981970641761606, -0.3725604991977569, -0.00728211962388059, -0.4925164648993672, -0.22100626514078314, 0.03366269558096491, 0.2347203298500311, -0.3059358469084721, -0.004259973013947871, -0.07934844926123219, 0.20003673498231578, -0.4724426590122235, 0.4796988074039099, -0.2288914205712942, 0.3572385478026021, 0.2606958900527516, 0.06832291882974673, 0.06752295976617262, 0.006259113990971343, 0.4882741764914904, 0.1904833928861862, 0.38152574068700673, 0.2237896470331293, -0.14045948982839107, 0.17773461296227566, -0.21233047984366493, 0.18236373147040297, -0.3830795306205417, -0.356367840362811, 0.44639406555807426, 0.2705349101205172, -0.2164034875761871, 0.4047643307788249, -0.22063635836623874, 0.25125128247756123, -0.4689717709380474, 0.1617411090224934, 0.28028169533084935, -0.06018639817481031, -0.4031368826142234, -0.06717542216274452, -0.35829684548359, -0.49565929289516575, 0.38558393453215345, 0.38054151056773833, -0.3706034854176288, -0.4643162198608053, -0.45227955351385773, 0.10900193868114982, -0.03522460819027984, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, 0.3571480415801709, 0.4115821917662892, 0.12189580615840612, -0.44607081183047725, -0.08867370901765526, -0.37178913337915986, 0.44493207735456863, -0.05866166313476029, 0.16574731062717163, -0.2636358117380446, -0.34603826044352104, 0.19511749309766913, 0.4145682812563436, 0.036928592509120506, 0.44066757058091, 0.2944662830567353, 0.4140690144830721, 0.35029365642154886, -0.21420182853494651], "twirled_unitaries_q1": [-0.31239971808636113, -0.28485744721260886, -0.44268147867660446, 0.22201092389900978, 0.47367514134620947, -0.3624484324247135, -0.04875864716369449, -0.029349912099974063, -0.1734552494365822, -0.1822764510861603, -0.16885000522517402, -0.07938718192367133, -0.3911759845303031, -0.29308952850711734, 0.32399096841614394, -0.009100451273553745, 0.48333014377647743, -0.36823843839154335, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028, -0.21022271480579136, -0.08722634311680011, 0.2715537852772023, -0.3062633617185391, 0.3866124655850989, -0.2815125184840035, -0.1177400591091029, 0.4264193156073617, 0.14088216697814104, 0.001961632156344706, -0.0769597740948278, 0.34622494807280546, 0.1375695796222196, -0.3886559574053656, 0.4641161820327113, -0.2122644303870267, 0.08481943060488462, 0.2542984989212549, 0.20076546001369877, -0.45957636539721136, -0.38195891683453453, 0.03859037256674469, -0.08978167650477431, 0.42191404860625425, 0.04165792706529814, 0.12756873876982056, -0.4374360835014812, 0.18822005996944213, -0.44384141722735393, -0.22776589100726952, -0.3855950011202296, -0.02604531885600636, 0.3880041097036475, 0.38290552515987386, 0.41894082221451256, -0.4452687082975473, 0.2680115214576162, -0.06429797336391019, -0.40176015336168547, 0.02791825279908622, 0.3647157726393928, -0.1662718950803388, -0.03836408176927364, 0.1337047764333228, 0.32533129436627917, 0.3234122951464613, -0.0638019217320398, 0.012161642034783426, 0.23889962098470718, 0.23903804718794674, 0.17505008531592026, 0.05117471301904075, 0.28248490237992385, -0.3802680530959428, -0.2730510105090431, 0.3276727253083287, -0.13920345844470106, 0.05584616229532102, -0.2678503045730096, -0.20040028666454646, -0.2797248113332209, -0.28722577580825615, 0.051803177141760415, -0.18758437970965147, 0.025135451800657904, -0.41925850582989455, 0.4186349836360712, -0.054728813629211004, -0.11199236531999546, -0.16895527186618509, 0.1961489222558832, -0.25635721054248606, 0.41373787501252934, -0.00924419505930274, 0.004993821532753628, 0.04517698380747248, 0.1263943744118592, -0.26957167933061044, 0.01339141244315556, 0.4355398681503253, 0.13488961790957887, -0.2813933307165257, -0.08633332620212997, 0.14230310373283928, -0.4681498348207711, 0.3784255819403306, -0.4021117303101249, 0.048175590932000745, 0.4487621872882883, -0.48170724460221237, 0.23451311792852536, 0.42923384599364667, 0.10022812594482033, -0.3296437281806952, 0.4662901341384327, 0.07786597094141712, -0.24309403223028525, -0.2626546274601331, 0.3080957061723453, 0.4098307847526783, -0.15289014355117203, -0.17828008632045567, 0.3344122924782482, 0.10393190734831492, 0.26237626860959296, 0.4386795731621973, -0.02917801601742198, 0.475935138627122, 0.27172818466370785, 0.39866618977662327, -0.22346762715176283, -0.20423403798586293, 0.19835690373631465, 0.0879613077568635, -0.35908437707395535, 0.4917113135520985, -0.3092717099731246, 0.4802307733810167, 0.4511123707972331, -0.08227861161092775, 0.4019790567990782, -0.20021451153449732, -0.2146600639917331, -0.20712762310916233, -0.1596973714315837, -0.0939424389279786, -0.241338789020201, 0.185835345332638, 0.37074082635203354, -0.1459133170689384, -0.004975097634783765, -0.4839970882809759, -0.4165459335296404, 0.4894086579308805, -0.4878037862215372, 0.22934045114803325, -0.1442416045013175, -0.17232005968702424, 0.40234032300345746, 0.32971884186395783, 0.3448177027767301, -0.4584829871144649, 0.08509713625245752, -0.060495617944042124], "current_seeds_q2": [154691881488, 0], "current_seeds_q5": [203264169750, 3], "unitaries_q2": [-0.4439617577671342, -0.21225113115551508, 0.054088724382374664, -0.23892899918584476, -0.125309330460194, 0.060092742372248154, 0.4896137555816509, -0.4003084970981625, 0.40239532697192004, -0.27427209221451676, 0.3886045247436556, 0.4320039786933343, -0.3638867534321797, 0.28223449889285135, 0.12276746487499324, -0.08321214542590027, 0.4506729327841903, -0.49557296959474684, -0.1265520133216782, -0.26256977331275166, 0.03058157694307795, 0.40620047609760235, 0.1973131805413999, -0.11804061453004167, 0.05462618005151043, 0.07135232308423767, -0.2489185291095879, 0.13974379002293702, 0.41662052915091863, 0.06818086771210474, -0.16721244956765702, -0.38720928037740876, -0.1117919539837331, 0.2860409549541778, -0.4285359332075629, -0.1573891629055062, -0.17441844222633307, -0.41876241161401495, -0.20547837357075238, 0.473611069732506, -0.3783608350757284, -0.07842265526315728, 0.3925317756770923, 0.2595075211066167, -0.24233783883737559, 0.1429872906517069, 0.19320114364873575, 0.18916516162934727, -0.13975925770959208, 0.35974087642598107, 0.0910327241743758, -0.17685534791162993, 0.46825986056713376, -0.028095447670452245, 0.21121214619110518, 0.025306114815080605, 0.23576781990978546, 0.08316050282518717, 0.31848275278510485, 0.400213131759525, -0.3517301944760227, -0.05158170486511793, -0.12568734236262458, -0.4865840148088658, 0.33147630175334797, 0.021009841695313725, -0.47988603256257534, 0.06447247771077258, 0.08805243674673235, -0.1870609049750307, 0.3776046805460531, 0.3109844258745511, 0.36390183284432354, 0.4611227243477174, -0.22440520452503776, 0.1680911213450038, 0.13693298667517695, -0.20914928335500704, 0.13952487632665367, 0.35148149681080554, 0.44237399269967526, -0.20788732949937128, -0.42125761916947013, -0.26848903953135306, 0.44346653122211066, 0.1360182062364892, 0.2380340409652426, 0.3971106996721616, 0.14197951721286017, 0.3404604798712434, -0.15289293302358686, 0.12489626579553814, 0.1506412529301997, -0.13751949964263233, 0.4916932343136651, -0.008483669473928757, 0.19366711301472606, 0.3064881637397292, 0.17038852402531646, 0.08098004605518128, 0.19399838117309542, -0.46421182113421366, 0.49744699376657664, 0.3195963535447355, 0.34197805774659074, 0.42257028044813794, 0.2866464046533963, -0.048068057122417684, 0.12794233735865745, -0.4711880464251408, -0.44868171025627746, -0.3434915792021904, -0.16903330759792823, -0.09463038726272543, -0.31216367909048515, 0.13905289215915317, 0.15978147959978628, 0.05617742517105029, -0.06458650101018293, 0.21016554839495427, 0.30954878428748955, -0.4245386550744783, -0.03693104996670726, -0.015578394763785752, -0.13476795769143735, 0.056311052859296495, -0.3715304328143034, -0.19139346063203533, 0.02053440149051511, -0.3608606100066396, 0.15008591523601922, 0.23649482115613196, 0.3527343250287096, 0.2676984602701111, 0.10812050711245647, 0.20380895823433676, 0.18340129072693045, -0.1960361804853754, -0.46737966354565685, -0.17676888165335924, -0.44602483355212996, -0.3078347140316957, 0.06713160476753188, -0.27818622794244163, 0.04949538092258976, 0.21852285157608975, -0.4283825898106137, 0.16208734362142252, 0.18432922293216691, -0.40276701807278315, -0.4089499305662727, 0.4544011513222337, 0.3713159707842202, 0.21220693776629673, -0.38382575941465547, -0.11316011308353424, -0.4980797326092343, -0.36844150855908353, 0.07253083102530766, 0.07684935298946982, 0.22640888532581727, 0.38310228802618695, 0.20661542520757337, 0.3493279985785591, -0.07555698804422306], "rc_base_cycle_loop_index": [2], "pauli_seed_q4": [114829320934051, 114697805194205, 17033306506441], "twirled_unitaries_q5": [-0.4819707863313134, -0.08844771735993007, 0.4359695622379647, 0.26084162722957416, -0.34749039534677095, 0.14221574910517631, -0.05538494580167708, 0.42146272083316205, 0.05095620533766265, 0.4701366520330339, 0.23983478541006065, -0.04457939964792956, -0.0949861858722656, -0.4587594520384535, 0.02141138880449489, 0.2038805182551222, -0.30593045854644174, -0.44985829050334303, 0.4927434615147064, -0.11583861802757767, 0.4966244712669763, -0.024186816646199816, 0.04010182534098661, -0.4701814934734365, -0.08840251534018151, 0.17989478168061623, -0.0903669192227099, 0.32765836740340504, -0.14684326874886722, 0.35286990719531985, 0.008284239455456088, -0.18632278626897403, 0.27328990451335855, 0.3151644686303072, -0.3582880776236159, 0.3700069303726572, 0.4315777811850623, -0.020154925238184518, 0.2253415833668555, 0.4304092442926617, 0.4087331555338629, 0.2709286399245059, -0.4160883157161557, 0.026823391235140548, -0.3385793110512054, -0.47488495966217315, -0.17583558012539768, 0.040582178411970204, -0.0397716594608859, -0.22252193154559308, -0.3300275558178356, 0.18567604654762704, -0.39502253008086896, 0.3267765004553098, -0.4559961715058556, 0.1957093944958359, 0.16363675740087302, -0.09868818408994784, 0.010825877707873133, 0.1878725186798782, 0.31492110970005527, 0.004919904505747752, -0.0009657512677527791, -0.04683467905802274, -0.09199769987692719, -0.3925289258273139, 0.20598014533686637, -0.4866068730844013, 0.18171358684117678, 0.2842846542615298, -0.3572833840812777, -0.08730468474056252, -0.3655905624561022, -0.012705678984413993, -0.2136098950308245, -0.2916533976215483, -0.07888475516168114, -0.3411916967717161, 0.4252690365313754, 0.4931147557221536, 0.36241902008228877, -0.17360408832940522, 0.39599467534025123, 0.3558378985265307, -0.23266806737144918, -0.10901070998026086, 0.026162054010612223, 0.01358893291052965, 0.39621120526584264, 0.001148813495461809, -0.07020466023228167, 0.36296237003429255, 0.33307028519226733, -0.13781543341138658, -0.08752926336434186, -0.4288589240512799, 0.10015600170912009, 0.08749852554168314, -0.14745679538857814, -0.1278255398527186, -0.372413267420054, -0.433801126674652, 0.11312827426420924, 0.36477734808608986, -0.16993554987825377, -0.19002807155204593, -0.4067920719748841, -0.2968611173446263, -0.050028633514550336, 0.1868254558737661, 0.15349650556155225, 0.23982720184961437, -0.2818115453175878, -0.005815345945226369, 0.35418675084773454, 0.4779674854323126, -0.48267804939080605, -0.4184438949105136, -0.30281239718277675, 0.10028509788905637, 0.10548466834978498, 0.44225825433250776, -0.49984871484965154, 0.08779585941206847, 0.3405804008862461, 0.06456474201942086, 0.10391858459446368, 0.24091035021342577, 0.16602193359196704, -0.1524605866070381, -0.229048668926783, 0.18413008997232438, -0.1674318933114769, 0.4433477497281082, -0.2088354387557949, -0.41457613530977255, -0.3127009618372192, 0.4016672567940027, -0.39491924511555254, 0.15703065912508407, -0.11424473325971007, -0.3664919322605087, -0.3016757205012972, 0.08876390219019825, 0.06828018719360074, 0.08303334841532717, -0.3336361363205249, 0.15030577131813416, 0.026977407163474965, 0.19359576537733858, 0.4326496221286149, -0.32275559448434876, 0.39565114363741927, 0.2593502457256136, 0.10498561338349788, -0.3212321935238869, -0.3467416200484763, 0.041244518528138485, -0.2721769570694086, -0.3576817372840182, 0.4736905767279538, -0.14172314128512653, -0.49978191206374944, 0.4644469200357335, -0.2449520965727494], "current_seeds_q1": [116546759388, 3], "twirled_unitaries_q4": [0.08281245738859866, -0.38468217357713996, -0.09204702423941313, -0.40200177582947916, -0.34573686510049484, -0.4395503243121226, -0.4873848995430521, -0.14774430009103412, 0.3588612989408304, 0.07225889384692508, -0.3969579774883627, 0.21086125028359604, 0.012877630822472952, 0.04488364094157404, -0.3082213810547856, 0.45889714750449073, 0.3514100512444003, 0.22499409278258753, 0.21348576144673004, 0.22657753347537835, -0.22479296629159862, -0.4602059637223732, -0.05576467983967248, 0.3338397006727831, 0.3521800775213606, 0.47661640375647707, -0.44929360922303374, -0.10097998101087668, 0.05596090090799066, -0.4446543188086238, -0.29375380461903333, 0.3893381897174777, 0.31210996831763893, 0.3025817005112188, -0.20444914086358779, 0.4841687968278414, -0.3915337452075214, -0.25858545563052715, -0.4690715590729795, 0.3629769221630532, -0.22923477638201106, 0.32380379912491364, -0.30816246211988485, -0.27949720809386847, -0.045221606204211895, 0.4932130563306565, 0.4556195731010604, 0.015467713822783224, -0.2996778280486936, 0.028208470508662487, 0.41480235654854525, -0.3335569747819491, -0.03792969220075193, 0.18508405462394606, -0.3502749300908725, -0.07414674772632779, -0.171351127283895, 0.257901353901115, 0.2424720323024161, -0.3401787489039023, -0.094057937586836, -0.2989690844923665, -0.13287455320751462, 0.42018251464321565, 0.11250114580974824, 0.30142229862059366, -0.03002161765239464, -0.36587895832421324, 0.22331447600723564, 0.0036222571105888335, 0.17220300115257814, -0.007606898218526226, 0.013851464632136157, -0.36404034977247335, 0.06835472267093223, 0.06767318227930019, 0.33539538172214023, -0.2836948593010149, 0.08100541276814965, -0.30260995130882407, -0.03978963166579774, -0.42699026063679213, -0.10535516572663539, 0.39693818854017593, 0.14213482736035132, -0.2638606975362272, 0.16048661456231983, -0.041535998567713506, 0.05537101858648086, -0.05270872698714868, -0.29743473075654236, 0.25082226878552305, -0.07749973926881282, 0.005671872216236551, 0.16442563343126793, -0.22423913755419989, 0.16093142158291585, 0.48458653562971676, -0.023233678416008985, 0.21757559367374313, -0.13661053456698014, 0.2733303171161019, -0.33677319237660086, 0.4873567174834257, 0.2575555349443093, 0.3523655032636981, -0.47017616420053443, -0.10818748535482214, 0.41775533113815655, 0.1421966046050187, -0.4872992123316351, -0.06749647647991353, 0.33718026623042263, 0.09399007955388328, 0.006147254774553801, -0.033616747391167934, -0.49871944627420817, -0.43604739793605773, 0.07330819915539166, -0.28692456939318234, 0.25184484520283945, -0.45304549095986957, 0.034431004261108455, 0.16023559653162067, -0.4286080980977829, -0.006533788792925321, 0.15108942830796224, -0.16973595141633524, 0.4640305854546334, 0.24054238153522078, -0.024636146775240064, 0.30101862039294147, -0.15055111072566874, -0.4517202267473799, 0.09585199005398337, 0.2311446785090574, 0.4080108407893448, -0.47375066433987456, 0.042101523011496056, -0.3736429769014329, -0.05033026365363469, -0.18471591147003963, 0.22209464950747915, -0.308184848324796, -0.45670428994286283, -0.05162484585410354, -0.22467931049654766, -0.0018099136404750027, -0.19183373180161212, 0.4101079377657335, 0.4393679871820666, 0.11046395403140608, 0.035481380015902175, 0.4166612458861003, -0.4063605064529838, 0.35403154747492493, 0.47525033883493606, -0.2691465462702922, 0.3506115951917508, -0.24942394545172064, 0.03926142529488885, 0.4316785755689132, -0.1631685537080294, 0.33323384565061787, -0.4295771870843694], "pauli_seed_q1": [27946020799016, -50982158722643, 119343881614275], "unitaries_q5": [-0.4819707863313134, -0.08844771735993007, 0.4359695622379647, 0.26084162722957416, -0.34749039534677095, 0.14221574910517631, 0.4446150541983229, 0.07853727916683795, -0.05095620533766265, 0.029863347966966103, 0.26016521458993935, -0.04457939964792956, -0.0949861858722656, -0.041240547961546525, 0.4785886111955051, -0.2038805182551222, -0.19406954145355826, 0.05014170949665697, -0.007256538485293618, -0.38416138197242233, 0.003375528733023714, 0.024186816646199816, 0.4598981746590134, -0.4701814934734365, -0.08840251534018151, 0.32010521831938377, 0.0903669192227099, -0.32765836740340504, -0.14684326874886722, -0.35286990719531985, 0.4917157605445439, -0.313677213731026, -0.22671009548664145, -0.18483553136969277, -0.3582880776236159, 0.3700069303726572, -0.06842221881493771, -0.4798450747618155, 0.2746584166331445, -0.4304092442926617, 0.4087331555338629, -0.2709286399245059, -0.08391168428384432, 0.47317660876485945, -0.3385793110512054, 0.025115040337826855, -0.17583558012539768, 0.040582178411970204, -0.0397716594608859, -0.22252193154559308, 0.1699724441821644, 0.18567604654762704, -0.10497746991913104, 0.17322349954469018, 0.4559961715058556, 0.1957093944958359, -0.16363675740087302, -0.40131181591005216, 0.010825877707873133, -0.1878725186798782, -0.31492110970005527, 0.004919904505747752, -0.4990342487322472, -0.45316532094197726, -0.09199769987692719, -0.10747107417268609, -0.20598014533686637, -0.013393126915598685, 0.18171358684117678, -0.21571534573847018, -0.1427166159187223, 0.08730468474056252, 0.3655905624561022, -0.487294321015586, -0.2136098950308245, -0.2916533976215483, -0.07888475516168114, 0.15880830322828388, -0.07473096346862462, 0.4931147557221536, -0.13758097991771123, -0.17360408832940522, 0.39599467534025123, 0.3558378985265307, -0.23266806737144918, -0.10901070998026086, 0.026162054010612223, 0.01358893291052965, 0.39621120526584264, -0.4988511865045382, -0.07020466023228167, 0.13703762996570745, -0.33307028519226733, 0.13781543341138658, -0.08752926336434186, 0.4288589240512799, 0.3998439982908799, 0.41250147445831686, -0.14745679538857814, 0.3721744601472814, -0.372413267420054, -0.433801126674652, -0.38687172573579076, 0.13522265191391014, 0.16993554987825377, -0.30997192844795407, -0.0932079280251159, 0.20313888265537372, 0.44997136648544966, 0.3131745441262339, 0.34650349443844775, -0.23982720184961437, -0.21818845468241221, -0.005815345945226369, -0.14581324915226546, 0.4779674854323126, 0.017321950609193948, 0.08155610508948641, -0.19718760281722325, 0.3997149021109436, -0.10548466834978498, 0.44225825433250776, -0.0001512851503484569, -0.08779585941206847, 0.3405804008862461, -0.06456474201942086, 0.3960814154055363, 0.2590896497865742, -0.33397806640803296, 0.3475394133929619, -0.229048668926783, 0.18413008997232438, -0.1674318933114769, 0.4433477497281082, 0.2911645612442051, -0.41457613530977255, -0.18729903816278082, -0.4016672567940027, 0.39491924511555254, 0.34296934087491593, 0.3857552667402899, 0.1335080677394913, -0.3016757205012972, -0.41123609780980175, -0.43171981280639926, 0.08303334841532717, 0.1663638636794751, 0.15030577131813416, 0.026977407163474965, 0.19359576537733858, -0.06735037787138509, -0.17724440551565124, -0.39565114363741927, -0.2593502457256136, 0.3950143866165021, 0.17876780647611312, -0.3467416200484763, 0.041244518528138485, 0.2278230429305914, -0.3576817372840182, 0.026309423272046217, -0.35827685871487347, -0.000218087936250555, 0.03555307996426649, 0.2550479034272506]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration12].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration12].json new file mode 100644 index 000000000..73505a445 --- /dev/null +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration12].json @@ -0,0 +1 @@ +{"unitaries_q3": [-0.44882528698095925, 0.21751509762007615, 0.3802680530959428, 0.2730510105090431, 0.1723272746916713, -0.13920345844470106, 0.05584616229532102, -0.23214969542699038, -0.29959971333545354, 0.2797248113332209, -0.28722577580825615, -0.051803177141760415, -0.31241562029034853, 0.025135451800657904, -0.08074149417010545, -0.4186349836360712, -0.054728813629211004, 0.11199236531999546, -0.3310447281338149, 0.1961489222558832, -0.24364278945751394, -0.41373787501252934, -0.49075580494069726, -0.49500617846724637, 0.04517698380747248, 0.3736056255881408, -0.23042832066938956, 0.48660858755684444, 0.4355398681503253, -0.13488961790957887, 0.2813933307165257, -0.41366667379787003, -0.3576968962671607, 0.031850165179228895, 0.1215744180596694, -0.09788826968987507, -0.048175590932000745, 0.4487621872882883, 0.48170724460221237, -0.23451311792852536, 0.42923384599364667, -0.10022812594482033, -0.1703562718193048, 0.03370986586156732, -0.4221340290585829, -0.24309403223028525, -0.2626546274601331, -0.19190429382765473, -0.09016921524732169, -0.34710985644882797, 0.17828008632045567, -0.3344122924782482, 0.3960680926516851, -0.23762373139040704, 0.4386795731621973, -0.470821983982578, 0.024064861372878, 0.22827181533629215, 0.39866618977662327, 0.22346762715176283, -0.2957659620141371, 0.19835690373631465, 0.4120386922431365, 0.35908437707395535, 0.008288686447901483, 0.1907282900268754, -0.019769226618983282, 0.0488876292027669, 0.08227861161092775, -0.4019790567990782, -0.2997854884655027, -0.2146600639917331, 0.29287237689083767, -0.1596973714315837, 0.4060575610720214, 0.258661210979799, 0.185835345332638, 0.37074082635203354, -0.1459133170689384, -0.004975097634783765, -0.4839970882809759], "rc_base_cycle_loop_index": [11], "twirled_unitaries_q3": [-0.44882528698095925, 0.21751509762007615, -0.1197319469040572, -0.22694898949095688, 0.1723272746916713, 0.36079654155529894, 0.05584616229532102, -0.2678503045730096, -0.20040028666454646, -0.2797248113332209, -0.28722577580825615, 0.051803177141760415, 0.31241562029034853, 0.4748645481993421, 0.41925850582989455, -0.4186349836360712, -0.445271186370789, -0.11199236531999546, -0.16895527186618509, 0.3038510777441168, -0.24364278945751394, 0.08626212498747066, -0.49075580494069726, -0.49500617846724637, 0.04517698380747248, 0.3736056255881408, -0.23042832066938956, -0.01339141244315556, 0.4355398681503253, -0.13488961790957887, -0.21860666928347428, -0.08633332620212997, -0.14230310373283928, -0.031850165179228895, 0.1215744180596694, 0.09788826968987507, 0.048175590932000745, 0.4487621872882883, -0.48170724460221237, 0.23451311792852536, 0.42923384599364667, 0.10022812594482033, -0.3296437281806952, 0.4662901341384327, 0.07786597094141712, 0.25690596776971475, -0.2626546274601331, 0.3080957061723453, 0.4098307847526783, -0.15289014355117203, 0.32171991367954433, -0.16558770752175178, 0.10393190734831492, 0.26237626860959296, -0.0613204268378027, -0.02917801601742198, 0.475935138627122, -0.22827181533629215, 0.39866618977662327, 0.2765323728482372, -0.20423403798586293, 0.19835690373631465, -0.4120386922431365, 0.14091562292604465, 0.008288686447901483, 0.3092717099731246, -0.4802307733810167, 0.4511123707972331, 0.08227861161092775, 0.0980209432009218, -0.2997854884655027, -0.2146600639917331, 0.29287237689083767, -0.3403026285684163, 0.0939424389279786, -0.258661210979799, 0.314164654667362, -0.12925917364796646, -0.1459133170689384, -0.004975097634783765, -0.4839970882809759], "twirled_unitaries_q4": [0.08345406647035958, 0.010591342069119491, -0.012196213778462806, 0.27065954885196675, -0.3557583954986825, -0.17232005968702424, 0.40234032300345746, 0.32971884186395783, -0.15518229722326993, 0.04151701288553511, 0.4149028637475425, 0.060495617944042124, 0.4439617577671342, -0.21225113115551508, -0.054088724382374664, 0.23892899918584476, -0.125309330460194, -0.060092742372248154, -0.4896137555816509, -0.09969150290183748, 0.40239532697192004, -0.27427209221451676, 0.3886045247436556, 0.4320039786933343, 0.1361132465678203, 0.21776550110714865, 0.37723253512500676, 0.08321214542590027, 0.049327067215809706, 0.004427030405253163, -0.1265520133216782, -0.26256977331275166, 0.03058157694307795, 0.40620047609760235, 0.1973131805413999, 0.38195938546995833, -0.44537381994848957, 0.42864767691576233, 0.2489185291095879, -0.13974379002293702, 0.08337947084908137, 0.06818086771210474, -0.16721244956765702, -0.38720928037740876, 0.3882080460162669, -0.2139590450458222, -0.07146406679243711, -0.3426108370944938, -0.32558155777366693, -0.08123758838598505, 0.2945216264292476, 0.473611069732506, -0.3783608350757284, -0.07842265526315728, 0.3925317756770923, 0.2595075211066167, -0.24233783883737559, 0.1429872906517069, 0.19320114364873575, -0.31083483837065273, -0.13975925770959208, 0.35974087642598107, -0.4089672758256242, 0.32314465208837007, 0.03174013943286624, 0.028095447670452245, 0.2887878538088948, 0.4746938851849194, -0.26423218009021454, -0.41683949717481283, 0.18151724721489515, 0.099786868240475, 0.3517301944760227, -0.05158170486511793, 0.12568734236262458, 0.4865840148088658, 0.16852369824665203, 0.021009841695313725, 0.020113967437424662, 0.06447247771077258, 0.08805243674673235], "pauli_seed_q4": [-132213089617295, -136889955735746], "twirled_unitaries_q0": [0.4712154313820385, -0.42572259206511376, -0.42111592564365097, -0.2668778554191107, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, 0.2985251306765164, 0.4731909991248422, -0.34828986034517584, -0.4607650836825492, 0.12315582717864615, 0.028899062065068648, 0.20420834050016623, 0.18029413960657692, 0.2520273229900738, -0.31375414547666836, 0.008947666745431349, 0.08201948178145457, -0.2836154606077912, 0.18180393326804634, 0.05523301804827341, -0.20735831441055907, -0.2567003523160629, -0.03291592648032449, 0.3433998074271578, 0.4670244868340099, -0.012842477370785588, -0.17073608461863543, 0.44990811567888755, 0.34029098228440446, -0.10658408246160533, 0.2551812027350344, 0.21711220189177283, -0.3225331758216612, 0.3927726383275072, -0.44759812516522146, -0.40011916609044107, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.07448506389936327, -0.20665942225402745, -0.08872518057716405, 0.42201221928209165, 0.4695275208591738, -0.3706380358472927, -0.33980968285915836, -0.1696033162756727, 0.3385085508172061, -0.11825097296870268, 0.13890870450366322, -0.24209820089131995, -0.006790752767880548, 0.04304425197575412, -0.32738600345714275, 0.24772931986974456, 0.19660653963240193, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, -0.26228990149481035, 0.1496960222960304, -0.28778184548331254, 0.06876404255354984, -0.23108886334528123, -0.4803542081018186, 0.4734366213618273, 0.3427234359697735, 0.27092919654169023, -0.2597276322282447, 0.3177048344177287, -0.439668073429921, 0.447220912180196], "twirled_unitaries_q2": [0.34603826044352104, 0.19511749309766913, -0.4145682812563436, -0.036928592509120506, 0.44066757058091, -0.2944662830567353, 0.0859309855169279, 0.14970634357845114, -0.21420182853494651, -0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.47367514134620947, 0.13755156757528653, 0.4512413528363055, -0.029349912099974063, -0.1734552494365822, 0.3177235489138397, -0.16885000522517402, -0.07938718192367133, -0.3911759845303031, -0.29308952850711734, 0.32399096841614394, 0.49089954872644626, 0.016669856223522572, -0.13176156160845665, 0.03572518135114322, -0.07037465869650461, -0.3395366446713197, -0.28977728519420864, -0.08722634311680011, -0.2715537852772023, -0.19373663828146093, 0.11338753441490113, -0.2815125184840035, 0.3822599408908971, 0.07358068439263832, 0.35911783302185896, 0.4980383678436553, -0.0769597740948278, -0.34622494807280546, -0.1375695796222196, -0.11134404259463437, -0.03588381796728868, 0.2877355696129733, 0.4151805693951154, -0.2542984989212549, 0.29923453998630123, -0.04042363460278864, 0.11804108316546547, -0.4614096274332553, -0.08978167650477431, 0.42191404860625425, 0.04165792706529814, 0.37243126123017944, 0.4374360835014812, 0.31177994003055787, -0.44384141722735393, -0.2722341089927305, 0.3855950011202296, -0.47395468114399364, -0.11199589029635248, -0.11709447484012614, 0.41894082221451256, 0.05473129170245272, 0.2680115214576162, -0.4357020266360898, 0.40176015336168547, 0.4720817472009138, 0.1352842273606072, -0.1662718950803388, 0.46163591823072636, 0.1337047764333228, -0.17466870563372083, -0.1765877048535387, -0.0638019217320398, -0.4878383579652166, -0.2611003790152928, 0.23903804718794674, 0.17505008531592026], "current_seeds_q3": [31155819389228, 0], "unitaries_q0": [0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005], "pauli_seed_q1": [60017443263372, 139478054485503], "pauli_seed_q0": [56235133306163, 46271745691961], "rc_seed_index": [2], "current_seeds_q0": [11567936422990, 0], "modulo_counter": [49], "current_seeds_q2": [13648660503014, 2], "unitaries_q2": [0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353, -0.0859309855169279, 0.35029365642154886, -0.21420182853494651, -0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.331149994774826, 0.42061281807632867, 0.10882401546969689, -0.20691047149288266, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028, 0.28977728519420864, -0.4127736568831999, 0.2284462147227977, 0.3062633617185391, 0.11338753441490113, 0.2184874815159965, 0.3822599408908971, 0.07358068439263832, -0.14088216697814104, 0.4980383678436553, -0.0769597740948278, -0.34622494807280546, -0.1375695796222196, -0.3886559574053656, -0.4641161820327113, -0.2877355696129733, 0.4151805693951154, -0.2457015010787451, -0.29923453998630123, -0.45957636539721136, -0.38195891683453453, 0.03859037256674469, -0.08978167650477431, -0.07808595139374575, 0.04165792706529814, 0.37243126123017944, -0.06256391649851878, 0.31177994003055787, -0.44384141722735393, 0.22776589100726952, -0.1144049988797704, -0.02604531885600636, -0.3880041097036475, -0.38290552515987386, 0.41894082221451256, 0.4452687082975473, 0.2319884785423838, -0.06429797336391019, -0.09823984663831453, -0.02791825279908622, 0.3647157726393928, -0.3337281049196612, -0.46163591823072636, 0.1337047764333228, -0.32533129436627917, 0.1765877048535387, -0.0638019217320398, 0.4878383579652166, -0.23889962098470718, 0.26096195281205326, -0.32494991468407974], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "current_seeds_q5": [32963532974897, 2], "is_mod_zero": [0], "pauli_seed_q5": [-133041699791850, 131854131899589], "current_seeds_q1": [34869513621375, 0], "unitary_angle_offset": [78], "twirled_unitaries_q5": [0.3129390950249693, 0.12239531945394688, 0.1890155741254489, 0.13609816715567646, 0.4611227243477174, -0.27559479547496224, 0.3319088786549962, 0.13693298667517695, -0.29085071664499296, -0.13952487632665367, 0.14851850318919446, -0.057626007300324744, -0.20788732949937128, -0.42125761916947013, -0.26848903953135306, -0.05653346877788934, 0.1360182062364892, -0.2619659590347574, 0.3971106996721616, 0.3580204827871398, -0.3404604798712434, -0.34710706697641314, 0.12489626579553814, 0.3493587470698003, -0.3624805003573677, 0.4916932343136651, 0.008483669473928757, -0.19366711301472606, 0.1935118362602708, 0.17038852402531646, -0.4190199539448187, 0.19399838117309542, 0.035788178865786335, 0.49744699376657664, 0.18040364645526452, 0.15802194225340926, 0.07742971955186206, 0.2133535953466037, 0.4519319428775823, -0.37205766264134255, -0.4711880464251408, -0.44868171025627746, 0.15650842079780958, -0.33096669240207177, 0.09463038726272543, 0.31216367909048515, 0.3609471078408468, 0.15978147959978628, -0.4438225748289497, -0.06458650101018293, -0.28983445160504573, -0.19045121571251045, -0.4245386550744783, 0.46306895003329274, 0.48442160523621425, -0.13476795769143735, -0.4436889471407035, 0.12846956718569658, -0.19139346063203533, -0.4794655985094849, -0.3608606100066396, 0.3499140847639808, 0.26350517884386804, -0.3527343250287096, 0.2676984602701111, 0.39187949288754353, -0.20380895823433676, 0.31659870927306955, 0.3039638195146246, 0.032620336454343146, -0.32323111834664076, -0.05397516644787004, 0.3078347140316957, 0.06713160476753188, -0.22181377205755837, -0.04949538092258976, 0.21852285157608975, -0.07161741018938628, -0.16208734362142252, 0.3156707770678331, 0.09723298192721685], "unitaries_q5": [-0.1870609049750307, 0.3776046805460531, 0.3109844258745511, 0.36390183284432354, 0.4611227243477174, -0.22440520452503776, 0.1680911213450038, 0.13693298667517695, -0.20914928335500704, 0.13952487632665367, 0.35148149681080554, 0.44237399269967526, -0.20788732949937128, -0.42125761916947013, -0.26848903953135306, 0.44346653122211066, 0.1360182062364892, 0.2380340409652426, 0.3971106996721616, 0.14197951721286017, 0.3404604798712434, -0.15289293302358686, 0.12489626579553814, 0.1506412529301997, -0.13751949964263233, 0.4916932343136651, -0.008483669473928757, 0.19366711301472606, 0.3064881637397292, 0.17038852402531646, 0.08098004605518128, 0.19399838117309542, -0.46421182113421366, 0.49744699376657664, 0.3195963535447355, 0.34197805774659074, 0.42257028044813794, 0.2866464046533963, -0.048068057122417684, 0.12794233735865745, -0.4711880464251408, -0.44868171025627746, -0.3434915792021904, -0.16903330759792823, -0.09463038726272543, -0.31216367909048515, 0.13905289215915317, 0.15978147959978628, 0.05617742517105029, -0.06458650101018293, 0.21016554839495427, 0.30954878428748955, -0.4245386550744783, -0.03693104996670726, -0.015578394763785752, -0.13476795769143735, 0.056311052859296495, -0.3715304328143034, -0.19139346063203533, 0.02053440149051511, -0.3608606100066396, 0.15008591523601922, 0.23649482115613196, 0.3527343250287096, 0.2676984602701111, 0.10812050711245647, 0.20380895823433676, 0.18340129072693045, -0.1960361804853754, -0.46737966354565685, -0.17676888165335924, -0.44602483355212996, -0.3078347140316957, 0.06713160476753188, -0.27818622794244163, 0.04949538092258976, 0.21852285157608975, -0.4283825898106137, 0.16208734362142252, 0.18432922293216691, -0.40276701807278315], "pauli_seed_q2": [-133056412874444, 54594642012057], "current_seeds_q4": [36146255243727, 2], "break": [1], "pauli_seed_q3": [59797934191791, 124623277556914], "unitaries_q1": [0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538], "twirled_unitaries_q1": [0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, -0.19434498158991076, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, -0.18571149745641335, -0.2877962331373993, -0.160027087917328, 0.3520932401429775, -0.4300465035584615, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.22100626514078314, -0.4663373044190351, 0.2347203298500311, -0.1940641530915279, -0.49574002698605213, 0.07934844926123219, 0.20003673498231578, 0.4724426590122235, -0.4796988074039099, -0.2711085794287058, 0.3572385478026021, 0.2606958900527516, 0.06832291882974673, -0.4324770402338274, -0.49374088600902866, 0.011725823508509592, 0.3095166071138138, -0.38152574068700673, 0.2762103529668707, 0.35954051017160893, -0.32226538703772434, -0.28766952015633507, 0.31763626852959703, 0.3830795306205417, -0.356367840362811, 0.05360593444192574, -0.2705349101205172, -0.2835965124238129, -0.0952356692211751, -0.22063635836623874, 0.25125128247756123, -0.4689717709380474, -0.3382588909775066, 0.28028169533084935, -0.06018639817481031, -0.4031368826142234, -0.4328245778372555, 0.35829684548359, 0.49565929289516575, 0.38558393453215345, 0.11945848943226167, -0.12939651458237122, -0.03568378013919471, -0.45227955351385773, 0.10900193868114982, -0.46477539180972016, 0.2218792895229953, -0.008494055987057436, 0.018503482111370317, 0.05312386930746982, 0.4177095451891617, 0.3382932840446351, -0.14285195841982912, -0.08841780823371082, 0.3781041938415939, -0.053929188169522746, 0.08867370901765526, -0.12821086662084014, 0.44493207735456863, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538], "unitaries_q4": [-0.4165459335296404, 0.4894086579308805, 0.012196213778462806, 0.22934045114803325, -0.1442416045013175, 0.32767994031297576, 0.40234032300345746, 0.32971884186395783, 0.3448177027767301, -0.4584829871144649, 0.08509713625245752, -0.060495617944042124, -0.4439617577671342, -0.21225113115551508, 0.054088724382374664, -0.23892899918584476, -0.125309330460194, 0.060092742372248154, 0.4896137555816509, -0.4003084970981625, 0.40239532697192004, -0.27427209221451676, 0.3886045247436556, 0.4320039786933343, -0.3638867534321797, 0.28223449889285135, 0.12276746487499324, -0.08321214542590027, 0.4506729327841903, -0.49557296959474684, -0.1265520133216782, -0.26256977331275166, 0.03058157694307795, 0.40620047609760235, 0.1973131805413999, -0.11804061453004167, 0.05462618005151043, 0.07135232308423767, -0.2489185291095879, 0.13974379002293702, 0.41662052915091863, 0.06818086771210474, -0.16721244956765702, -0.38720928037740876, -0.1117919539837331, 0.2860409549541778, -0.4285359332075629, -0.1573891629055062, -0.17441844222633307, -0.41876241161401495, -0.20547837357075238, 0.473611069732506, -0.3783608350757284, -0.07842265526315728, 0.3925317756770923, 0.2595075211066167, -0.24233783883737559, 0.1429872906517069, 0.19320114364873575, 0.18916516162934727, -0.13975925770959208, 0.35974087642598107, 0.0910327241743758, -0.17685534791162993, 0.46825986056713376, -0.028095447670452245, 0.21121214619110518, 0.025306114815080605, 0.23576781990978546, 0.08316050282518717, 0.31848275278510485, 0.400213131759525, -0.3517301944760227, -0.05158170486511793, -0.12568734236262458, -0.4865840148088658, 0.33147630175334797, 0.021009841695313725, -0.47988603256257534, 0.06447247771077258, 0.08805243674673235]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration13].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration13].json new file mode 100644 index 000000000..65bab3ce0 --- /dev/null +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration13].json @@ -0,0 +1 @@ +{"readout_randomization_q3": [-0.25, 0.25, 0.0], "pauli_seed_q0": [-13838434709596, 60576142310008], "rc_seed_index": [2], "readout_seed_q1": [114697805194205], "readout_source_unitaries_q5": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "readout_source_unitaries_q0": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "current_seeds_q4": [8483125331955, 2], "readout_source_unitaries_q1": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "twirled_unitaries_q3": [-0.444153837704679, -0.2678503045730096, -0.20040028666454646, -0.2797248113332209, -0.21277422419174385, 0.4481968228582396, -0.31241562029034853, 0.025135451800657904, 0.41925850582989455, -0.4186349836360712, -0.054728813629211004, -0.38800763468000454, -0.3310447281338149, 0.1961489222558832, -0.24364278945751394, 0.08626212498747066, -0.49075580494069726, 0.004993821532753628, -0.4548230161925275, 0.3736056255881408, 0.26957167933061044, -0.01339141244315556, 0.0644601318496747, -0.3651103820904211, -0.2813933307165257, -0.08633332620212997, -0.3576968962671607, 0.031850165179228895, 0.1215744180596694, -0.09788826968987507, 0.45182440906799926, 0.4487621872882883, -0.01829275539778763, 0.26548688207147464, 0.42923384599364667, -0.10022812594482033, -0.1703562718193048, 0.03370986586156732, -0.4221340290585829, 0.25690596776971475, -0.2626546274601331, -0.19190429382765473, 0.4098307847526783, -0.34710985644882797, -0.32171991367954433, -0.3344122924782482, 0.10393190734831492, 0.23762373139040704, -0.4386795731621973, -0.470821983982578, -0.024064861372878, -0.22827181533629215, 0.10133381022337673, -0.2765323728482372, 0.20423403798586293, 0.30164309626368535, 0.0879613077568635, 0.14091562292604465, 0.008288686447901483, 0.3092717099731246, 0.019769226618983282, 0.4511123707972331, -0.41772138838907225, -0.4019790567990782, -0.20021451153449732, 0.2146600639917331, -0.29287237689083767, -0.3403026285684163, 0.4060575610720214, 0.258661210979799, 0.185835345332638, -0.12925917364796646, 0.3540866829310616, -0.49502490236521624, -0.016002911719024127, -0.08345406647035958, 0.010591342069119491, 0.012196213778462806, 0.25, 0.25, 0.0], "readout_randomization_q5": [0.25, 0.25, 0.0], "readout_source_unitaries_q2": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "unitaries_q4": [0.40234032300345746, 0.32971884186395783, 0.3448177027767301, -0.4584829871144649, 0.08509713625245752, -0.060495617944042124, -0.4439617577671342, -0.21225113115551508, 0.054088724382374664, -0.23892899918584476, -0.125309330460194, 0.060092742372248154, 0.4896137555816509, -0.4003084970981625, 0.40239532697192004, -0.27427209221451676, 0.3886045247436556, 0.4320039786933343, -0.3638867534321797, 0.28223449889285135, 0.12276746487499324, -0.08321214542590027, 0.4506729327841903, -0.49557296959474684, -0.1265520133216782, -0.26256977331275166, 0.03058157694307795, 0.40620047609760235, 0.1973131805413999, -0.11804061453004167, 0.05462618005151043, 0.07135232308423767, -0.2489185291095879, 0.13974379002293702, 0.41662052915091863, 0.06818086771210474, -0.16721244956765702, -0.38720928037740876, -0.1117919539837331, 0.2860409549541778, -0.4285359332075629, -0.1573891629055062, -0.17441844222633307, -0.41876241161401495, -0.20547837357075238, 0.473611069732506, -0.3783608350757284, -0.07842265526315728, 0.3925317756770923, 0.2595075211066167, -0.24233783883737559, 0.1429872906517069, 0.19320114364873575, 0.18916516162934727, -0.13975925770959208, 0.35974087642598107, 0.0910327241743758, -0.17685534791162993, 0.46825986056713376, -0.028095447670452245, 0.21121214619110518, 0.025306114815080605, 0.23576781990978546, 0.08316050282518717, 0.31848275278510485, 0.400213131759525, -0.3517301944760227, -0.05158170486511793, -0.12568734236262458, -0.4865840148088658, 0.33147630175334797, 0.021009841695313725, -0.47988603256257534, 0.06447247771077258, 0.08805243674673235, -0.1870609049750307, 0.3776046805460531, 0.3109844258745511, 0.36390183284432354, 0.4611227243477174, -0.22440520452503776], "unitaries_q5": [0.1680911213450038, 0.13693298667517695, -0.20914928335500704, 0.13952487632665367, 0.35148149681080554, 0.44237399269967526, -0.20788732949937128, -0.42125761916947013, -0.26848903953135306, 0.44346653122211066, 0.1360182062364892, 0.2380340409652426, 0.3971106996721616, 0.14197951721286017, 0.3404604798712434, -0.15289293302358686, 0.12489626579553814, 0.1506412529301997, -0.13751949964263233, 0.4916932343136651, -0.008483669473928757, 0.19366711301472606, 0.3064881637397292, 0.17038852402531646, 0.08098004605518128, 0.19399838117309542, -0.46421182113421366, 0.49744699376657664, 0.3195963535447355, 0.34197805774659074, 0.42257028044813794, 0.2866464046533963, -0.048068057122417684, 0.12794233735865745, -0.4711880464251408, -0.44868171025627746, -0.3434915792021904, -0.16903330759792823, -0.09463038726272543, -0.31216367909048515, 0.13905289215915317, 0.15978147959978628, 0.05617742517105029, -0.06458650101018293, 0.21016554839495427, 0.30954878428748955, -0.4245386550744783, -0.03693104996670726, -0.015578394763785752, -0.13476795769143735, 0.056311052859296495, -0.3715304328143034, -0.19139346063203533, 0.02053440149051511, -0.3608606100066396, 0.15008591523601922, 0.23649482115613196, 0.3527343250287096, 0.2676984602701111, 0.10812050711245647, 0.20380895823433676, 0.18340129072693045, -0.1960361804853754, -0.46737966354565685, -0.17676888165335924, -0.44602483355212996, -0.3078347140316957, 0.06713160476753188, -0.27818622794244163, 0.04949538092258976, 0.21852285157608975, -0.4283825898106137, 0.16208734362142252, 0.18432922293216691, -0.40276701807278315, -0.4089499305662727, 0.4544011513222337, 0.3713159707842202, 0.21220693776629673, -0.38382575941465547, -0.11316011308353424], "readout_randomization_q1": [-0.5, 0.25, -0.25], "current_seeds_q2": [29835970403568, 3], "current_seeds_q1": [6986505199754, 0], "readout_source_unitaries_q3": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "unitaries_q1": [0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353], "twirled_unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, 0.4731909991248422, -0.15171013965482416, 0.4607650836825492, -0.12315582717864615, 0.47110093793493135, 0.20420834050016623, -0.3197058603934231, 0.2520273229900738, 0.18624585452333164, -0.49105233325456865, 0.08201948178145457, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, 0.2926416855894409, -0.2567003523160629, -0.4670840735196755, -0.3433998074271578, 0.03297551316599012, -0.012842477370785588, 0.17073608461863543, -0.44990811567888755, 0.34029098228440446, -0.39341591753839467, 0.24481879726496558, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, 0.49089066447141505, 0.0344985394231756, -0.17201116439296982, -0.18967701752599453, 0.07448506389936327, 0.20665942225402745, 0.08872518057716405, 0.42201221928209165, -0.4695275208591738, 0.3706380358472927, -0.33980968285915836, 0.1696033162756727, 0.1614914491827939, -0.3817490270312973, 0.13890870450366322, -0.24209820089131995, -0.49320924723211945, 0.4569557480242459, 0.32738600345714275, 0.24772931986974456, 0.30339346036759807, 0.385197581175035, -0.172704433349967, -0.1306577643126623, 0.05031939073900915, -0.42638081326169797, 0.23771009850518965, 0.1496960222960304, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, 0.026563378638172708, 0.1572765640302265, 0.27092919654169023, -0.2402723677717553, -0.3177048344177287, -0.06033192657007902, -0.052779087819804005, -0.1170996965485891, 0.3948500346756276, 0.1185831188857982, 0.25, 0.25, -0.5], "readout_seed_q0": [114829320934051], "pauli_seed_q1": [34470019755655, 27946020799016], "unitary_angle_offset": [78], "readout_seed_q3": [129378273583824], "readout_seed_q2": [17033306506441], "break": [1], "readout_seed_q5": [-73332466885869], "readout_source_unitaries_q4": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "unitaries_q3": [0.05584616229532102, -0.23214969542699038, -0.29959971333545354, 0.2797248113332209, -0.28722577580825615, -0.051803177141760415, -0.31241562029034853, 0.025135451800657904, -0.08074149417010545, -0.4186349836360712, -0.054728813629211004, 0.11199236531999546, -0.3310447281338149, 0.1961489222558832, -0.24364278945751394, -0.41373787501252934, -0.49075580494069726, -0.49500617846724637, 0.04517698380747248, 0.3736056255881408, -0.23042832066938956, 0.48660858755684444, 0.4355398681503253, -0.13488961790957887, 0.2813933307165257, -0.41366667379787003, -0.3576968962671607, 0.031850165179228895, 0.1215744180596694, -0.09788826968987507, -0.048175590932000745, 0.4487621872882883, 0.48170724460221237, -0.23451311792852536, 0.42923384599364667, -0.10022812594482033, -0.1703562718193048, 0.03370986586156732, -0.4221340290585829, -0.24309403223028525, -0.2626546274601331, -0.19190429382765473, -0.09016921524732169, -0.34710985644882797, 0.17828008632045567, -0.3344122924782482, 0.3960680926516851, -0.23762373139040704, 0.4386795731621973, -0.470821983982578, 0.024064861372878, 0.22827181533629215, 0.39866618977662327, 0.22346762715176283, -0.2957659620141371, 0.19835690373631465, 0.4120386922431365, 0.35908437707395535, 0.008288686447901483, 0.1907282900268754, -0.019769226618983282, 0.0488876292027669, 0.08227861161092775, -0.4019790567990782, -0.2997854884655027, -0.2146600639917331, 0.29287237689083767, -0.1596973714315837, 0.4060575610720214, 0.258661210979799, 0.185835345332638, 0.37074082635203354, -0.1459133170689384, -0.004975097634783765, -0.4839970882809759, -0.4165459335296404, 0.4894086579308805, 0.012196213778462806, 0.22934045114803325, -0.1442416045013175, 0.32767994031297576], "pauli_seed_q2": [-50982158722643, 119343881614275], "unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924], "pauli_seed_q5": [57280048187710, 37250364052496], "twirled_unitaries_q2": [0.4140690144830721, 0.14970634357845114, 0.21420182853494651, -0.18760028191363887, -0.21514255278739114, -0.44268147867660446, 0.22201092389900978, 0.47367514134620947, -0.3624484324247135, -0.04875864716369449, -0.029349912099974063, -0.1734552494365822, 0.3177235489138397, -0.331149994774826, 0.07938718192367133, 0.3911759845303031, -0.20691047149288266, -0.17600903158385606, 0.49089954872644626, 0.016669856223522572, 0.36823843839154335, 0.03572518135114322, -0.4296253413034954, 0.3395366446713197, 0.28977728519420864, -0.08722634311680011, 0.2715537852772023, -0.3062633617185391, 0.11338753441490113, -0.2184874815159965, -0.3822599408908971, 0.4264193156073617, 0.35911783302185896, -0.001961632156344706, -0.4230402259051722, -0.15377505192719454, -0.3624304203777804, -0.3886559574053656, 0.4641161820327113, 0.2877355696129733, 0.4151805693951154, 0.2457015010787451, -0.20076546001369877, -0.04042363460278864, 0.11804108316546547, 0.03859037256674469, -0.08978167650477431, 0.42191404860625425, -0.45834207293470186, 0.12756873876982056, 0.06256391649851878, 0.18822005996944213, -0.05615858277264607, -0.2722341089927305, -0.1144049988797704, -0.47395468114399364, -0.11199589029635248, -0.11709447484012614, 0.41894082221451256, -0.4452687082975473, 0.2680115214576162, -0.06429797336391019, -0.40176015336168547, 0.02791825279908622, 0.1352842273606072, 0.1662718950803388, 0.03836408176927364, 0.3662952235666772, 0.32533129436627917, -0.1765877048535387, -0.4361980782679602, 0.4878383579652166, 0.2611003790152928, 0.26096195281205326, 0.17505008531592026, -0.44882528698095925, 0.21751509762007615, 0.3802680530959428, 0.25, 0.0, -0.25], "pauli_seed_q3": [-12771350299406, 505245418846], "readout_randomization_q0": [0.25, 0.25, 0.0], "rc_base_cycle_loop_index": [11], "current_seeds_q0": [15144035577502, 3], "current_seeds_q3": [126311354711, 3], "readout_randomization_q4": [0.25, -0.5, -0.25], "unitaries_q2": [-0.0859309855169279, 0.35029365642154886, -0.21420182853494651, -0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.331149994774826, 0.42061281807632867, 0.10882401546969689, -0.20691047149288266, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028, 0.28977728519420864, -0.4127736568831999, 0.2284462147227977, 0.3062633617185391, 0.11338753441490113, 0.2184874815159965, 0.3822599408908971, 0.07358068439263832, -0.14088216697814104, 0.4980383678436553, -0.0769597740948278, -0.34622494807280546, -0.1375695796222196, -0.3886559574053656, -0.4641161820327113, -0.2877355696129733, 0.4151805693951154, -0.2457015010787451, -0.29923453998630123, -0.45957636539721136, -0.38195891683453453, 0.03859037256674469, -0.08978167650477431, -0.07808595139374575, 0.04165792706529814, 0.37243126123017944, -0.06256391649851878, 0.31177994003055787, -0.44384141722735393, 0.22776589100726952, -0.1144049988797704, -0.02604531885600636, -0.3880041097036475, -0.38290552515987386, 0.41894082221451256, 0.4452687082975473, 0.2319884785423838, -0.06429797336391019, -0.09823984663831453, -0.02791825279908622, 0.3647157726393928, -0.3337281049196612, -0.46163591823072636, 0.1337047764333228, -0.32533129436627917, 0.1765877048535387, -0.0638019217320398, 0.4878383579652166, -0.23889962098470718, 0.26096195281205326, -0.32494991468407974, -0.44882528698095925, 0.21751509762007615, 0.3802680530959428, 0.2730510105090431, 0.1723272746916713, -0.13920345844470106], "twirled_unitaries_q5": [-0.3319088786549962, 0.36306701332482305, -0.29085071664499296, -0.13952487632665367, 0.14851850318919446, 0.44237399269967526, 0.2921126705006287, -0.42125761916947013, 0.23151096046864694, 0.44346653122211066, 0.1360182062364892, 0.2380340409652426, -0.10288930032783838, 0.3580204827871398, -0.3404604798712434, 0.15289293302358686, 0.12489626579553814, -0.1506412529301997, -0.3624805003573677, 0.008306765686334927, 0.49151633052607124, 0.19366711301472606, 0.3064881637397292, -0.32961147597468354, -0.4190199539448187, 0.19399838117309542, -0.46421182113421366, 0.49744699376657664, 0.3195963535447355, -0.15802194225340926, 0.42257028044813794, 0.2133535953466037, -0.4519319428775823, -0.12794233735865745, -0.028811953574859217, -0.44868171025627746, 0.15650842079780958, -0.16903330759792823, -0.09463038726272543, -0.31216367909048515, 0.13905289215915317, -0.3402185204002137, -0.4438225748289497, -0.06458650101018293, 0.21016554839495427, 0.30954878428748955, -0.0754613449255217, -0.46306895003329274, -0.48442160523621425, -0.36523204230856265, -0.4436889471407035, -0.3715304328143034, -0.30860653936796467, 0.4794655985094849, 0.3608606100066396, 0.15008591523601922, 0.26350517884386804, 0.1472656749712904, 0.23230153972988887, -0.39187949288754353, 0.20380895823433676, 0.18340129072693045, -0.1960361804853754, 0.032620336454343146, -0.32323111834664076, 0.44602483355212996, 0.3078347140316957, 0.4328683952324681, -0.27818622794244163, 0.04949538092258976, 0.21852285157608975, -0.4283825898106137, 0.16208734362142252, 0.18432922293216691, -0.40276701807278315, 0.09105006943372729, 0.4544011513222337, 0.3713159707842202, 0.25, 0.25, 0.0], "current_seeds_q5": [9312591013124, 0], "twirled_unitaries_q4": [-0.09765967699654254, 0.17028115813604217, -0.3448177027767301, -0.04151701288553511, 0.4149028637475425, 0.4395043820559579, 0.0560382422328658, -0.2877488688444849, -0.054088724382374664, -0.26107100081415524, -0.125309330460194, -0.060092742372248154, -0.4896137555816509, -0.4003084970981625, -0.40239532697192004, 0.27427209221451676, 0.11139547525634441, -0.06799602130666571, -0.3638867534321797, 0.28223449889285135, 0.12276746487499324, 0.4167878545740997, 0.049327067215809706, 0.49557296959474684, -0.3734479866783218, -0.23743022668724834, -0.46941842305692205, -0.09379952390239765, 0.3026868194586001, -0.38195938546995833, -0.05462618005151043, 0.07135232308423767, 0.2489185291095879, -0.13974379002293702, 0.08337947084908137, -0.43181913228789526, -0.16721244956765702, -0.38720928037740876, 0.3882080460162669, 0.2860409549541778, -0.07146406679243711, -0.3426108370944938, 0.17441844222633307, -0.41876241161401495, 0.20547837357075238, -0.473611069732506, -0.3783608350757284, -0.4215773447368427, -0.3925317756770923, 0.2595075211066167, -0.2576621611626244, -0.1429872906517069, 0.30679885635126425, -0.31083483837065273, 0.3602407422904079, 0.14025912357401893, -0.0910327241743758, -0.32314465208837007, 0.03174013943286624, 0.47190455232954776, -0.2887878538088948, 0.025306114815080605, 0.23576781990978546, 0.08316050282518717, 0.31848275278510485, 0.400213131759525, -0.3517301944760227, -0.4484182951348821, 0.12568734236262458, -0.013415985191134183, 0.33147630175334797, -0.021009841695313725, 0.47988603256257534, 0.06447247771077258, 0.41194756325326765, 0.1870609049750307, 0.12239531945394688, 0.3109844258745511, -0.25, -0.5, -0.25], "readout_randomization_q2": [-0.25, 0.0, -0.25], "readout_seed_q4": [-62630319121345], "twirled_unitaries_q1": [0.48411904010183093, -0.1942237015504702, -0.08314917988841941, 0.31428850254358665, -0.2877962331373993, 0.339972912082672, -0.1479067598570225, -0.4300465035584615, 0.41228591038566975, -0.15018029358238394, -0.3725604991977569, -0.4927178803761194, 0.4925164648993672, -0.27899373485921686, -0.4663373044190351, -0.2652796701499689, -0.1940641530915279, -0.49574002698605213, 0.07934844926123219, 0.20003673498231578, 0.4724426590122235, -0.4796988074039099, -0.2288914205712942, -0.3572385478026021, -0.2606958900527516, 0.06832291882974673, 0.4324770402338274, 0.49374088600902866, 0.4882741764914904, 0.3095166071138138, 0.11847425931299327, 0.2237896470331293, 0.14045948982839107, -0.17773461296227566, -0.21233047984366493, -0.18236373147040297, -0.11692046937945832, -0.356367840362811, -0.44639406555807426, -0.2705349101205172, -0.2835965124238129, -0.0952356692211751, -0.22063635836623874, 0.25125128247756123, 0.031028229061952572, -0.3382588909775066, 0.28028169533084935, 0.4398136018251897, 0.09686311738577658, -0.4328245778372555, 0.35829684548359, 0.49565929289516575, 0.38558393453215345, 0.11945848943226167, -0.12939651458237122, -0.03568378013919471, 0.047720446486142265, 0.10900193868114982, -0.46477539180972016, 0.2218792895229953, -0.008494055987057436, 0.018503482111370317, 0.05312386930746982, 0.4177095451891617, 0.3382932840446351, 0.3571480415801709, 0.4115821917662892, 0.12189580615840612, -0.44607081183047725, -0.08867370901765526, -0.37178913337915986, 0.44493207735456863, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538, -0.15396173955647896, 0.3048825069023309, -0.0854317187436564, 0.0, 0.25, 0.25], "pauli_seed_q4": [-123070490066287, 33932501327821]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration14].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration14].json new file mode 100644 index 000000000..7eeb4f548 --- /dev/null +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration14].json @@ -0,0 +1 @@ +{"current_seeds_q0": [11567936422990, 0], "current_seeds_q1": [34869513621375, 0], "readout_randomization_q0": [-0.5, 0.25, -0.25], "unitaries_q2": [-0.0859309855169279, 0.35029365642154886, -0.21420182853494651, -0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.331149994774826, 0.42061281807632867, 0.10882401546969689, -0.20691047149288266, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028, 0.28977728519420864, -0.4127736568831999, 0.2284462147227977, 0.3062633617185391, 0.11338753441490113, 0.2184874815159965, 0.3822599408908971, 0.07358068439263832, -0.14088216697814104, 0.4980383678436553, -0.0769597740948278, -0.34622494807280546, -0.1375695796222196, -0.3886559574053656, -0.4641161820327113, -0.2877355696129733, 0.4151805693951154, -0.2457015010787451, -0.29923453998630123, -0.45957636539721136, -0.38195891683453453, 0.03859037256674469, -0.08978167650477431, -0.07808595139374575, 0.04165792706529814, 0.37243126123017944, -0.06256391649851878, 0.31177994003055787, -0.44384141722735393, 0.22776589100726952, -0.1144049988797704, -0.02604531885600636, -0.3880041097036475, -0.38290552515987386, 0.41894082221451256, 0.4452687082975473, 0.2319884785423838, -0.06429797336391019, -0.09823984663831453, -0.02791825279908622, 0.3647157726393928, -0.3337281049196612, -0.46163591823072636, 0.1337047764333228, -0.32533129436627917, 0.1765877048535387, -0.0638019217320398, 0.4878383579652166, -0.23889962098470718, 0.26096195281205326, -0.32494991468407974, -0.44882528698095925, 0.21751509762007615, 0.3802680530959428, 0.2730510105090431, 0.1723272746916713, -0.13920345844470106], "current_seeds_q5": [32963532974897, 2], "readout_source_unitaries_q0": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "pauli_seed_q5": [-133041699791850, 131854131899589], "twirled_unitaries_q5": [-0.3319088786549962, 0.36306701332482305, -0.29085071664499296, 0.36047512367334633, 0.35148149681080554, 0.057626007300324744, -0.2921126705006287, -0.42125761916947013, -0.23151096046864694, -0.44346653122211066, 0.3639817937635108, -0.2619659590347574, 0.3971106996721616, 0.14197951721286017, 0.3404604798712434, 0.34710706697641314, 0.12489626579553814, -0.3493587470698003, -0.13751949964263233, 0.008306765686334927, 0.008483669473928757, 0.30633288698527394, 0.3064881637397292, 0.32961147597468354, 0.4190199539448187, 0.19399838117309542, 0.46421182113421366, -0.49744699376657664, 0.18040364645526452, 0.34197805774659074, -0.07742971955186206, 0.2866464046533963, 0.4519319428775823, 0.12794233735865745, -0.028811953574859217, -0.051318289743722545, -0.15650842079780958, -0.33096669240207177, 0.40536961273727457, 0.18783632090951485, 0.13905289215915317, 0.15978147959978628, -0.4438225748289497, -0.43541349898981707, -0.21016554839495427, -0.30954878428748955, -0.0754613449255217, -0.03693104996670726, 0.48442160523621425, -0.13476795769143735, -0.4436889471407035, 0.12846956718569658, -0.19139346063203533, -0.4794655985094849, 0.1391393899933604, 0.15008591523601922, -0.26350517884386804, -0.1472656749712904, 0.2676984602701111, -0.39187949288754353, 0.20380895823433676, 0.31659870927306955, -0.3039638195146246, 0.46737966354565685, -0.17676888165335924, -0.05397516644787004, 0.3078347140316957, 0.4328683952324681, 0.22181377205755837, -0.45050461907741024, 0.28147714842391025, -0.07161741018938628, -0.16208734362142252, 0.18432922293216691, -0.09723298192721685, 0.4089499305662727, 0.4544011513222337, 0.12868402921577982, 0.0, 0.25, 0.25], "readout_source_unitaries_q5": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "modulo_counter": [49], "break": [1], "readout_randomization_q2": [0.0, -0.5, -0.5], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "pauli_seed_q2": [-133056412874444, 54594642012057], "rc_base_cycle_loop_index": [11], "readout_randomization_q3": [0.0, 0.0, -0.5], "readout_seed_q0": [75062137625173], "readout_randomization_q4": [-0.25, 0.0, -0.25], "pauli_seed_q3": [59797934191791, 124623277556914], "readout_source_unitaries_q3": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "readout_seed_q2": [-16410226418592], "readout_source_unitaries_q2": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "unitary_angle_offset": [78], "current_seeds_q2": [13648660503014, 2], "unitaries_q1": [0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353], "twirled_unitaries_q0": [-0.15784346339633615, 0.26111010223272757, 0.2985251306765164, 0.4731909991248422, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, 0.29579165949983377, -0.18029413960657692, 0.2520273229900738, -0.18624585452333164, 0.49105233325456865, 0.08201948178145457, -0.2163845393922088, -0.18180393326804634, 0.05523301804827341, -0.2926416855894409, -0.24329964768393708, -0.03291592648032449, 0.1566001925728422, 0.03297551316599012, -0.012842477370785588, -0.32926391538136457, -0.44990811567888755, 0.15970901771559554, -0.10658408246160533, 0.2551812027350344, 0.2828877981082272, 0.3225331758216612, 0.1072273616724928, -0.44759812516522146, -0.09988083390955893, -0.21533379611071268, 0.192623419867207, 0.0048050564673012275, -0.00910933552858495, 0.4655014605768244, -0.3279888356070302, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.16019031714084164, 0.3303966837243273, 0.3385085508172061, -0.11825097296870268, -0.3610912954963368, -0.24209820089131995, -0.49320924723211945, -0.04304425197575412, -0.17261399654285725, 0.24772931986974456, 0.30339346036759807, -0.114802418824965, -0.327295566650033, 0.1306577643126623, -0.05031939073900915, -0.07361918673830203, -0.26228990149481035, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, 0.026563378638172708, -0.3427234359697735, 0.27092919654169023, 0.2597276322282447, -0.3177048344177287, -0.439668073429921, 0.052779087819804005, 0.1170996965485891, 0.10514996532437237, -0.3814168811142018, 0.0, 0.25, 0.25], "unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924], "readout_source_unitaries_q4": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "unitaries_q3": [0.05584616229532102, -0.23214969542699038, -0.29959971333545354, 0.2797248113332209, -0.28722577580825615, -0.051803177141760415, -0.31241562029034853, 0.025135451800657904, -0.08074149417010545, -0.4186349836360712, -0.054728813629211004, 0.11199236531999546, -0.3310447281338149, 0.1961489222558832, -0.24364278945751394, -0.41373787501252934, -0.49075580494069726, -0.49500617846724637, 0.04517698380747248, 0.3736056255881408, -0.23042832066938956, 0.48660858755684444, 0.4355398681503253, -0.13488961790957887, 0.2813933307165257, -0.41366667379787003, -0.3576968962671607, 0.031850165179228895, 0.1215744180596694, -0.09788826968987507, -0.048175590932000745, 0.4487621872882883, 0.48170724460221237, -0.23451311792852536, 0.42923384599364667, -0.10022812594482033, -0.1703562718193048, 0.03370986586156732, -0.4221340290585829, -0.24309403223028525, -0.2626546274601331, -0.19190429382765473, -0.09016921524732169, -0.34710985644882797, 0.17828008632045567, -0.3344122924782482, 0.3960680926516851, -0.23762373139040704, 0.4386795731621973, -0.470821983982578, 0.024064861372878, 0.22827181533629215, 0.39866618977662327, 0.22346762715176283, -0.2957659620141371, 0.19835690373631465, 0.4120386922431365, 0.35908437707395535, 0.008288686447901483, 0.1907282900268754, -0.019769226618983282, 0.0488876292027669, 0.08227861161092775, -0.4019790567990782, -0.2997854884655027, -0.2146600639917331, 0.29287237689083767, -0.1596973714315837, 0.4060575610720214, 0.258661210979799, 0.185835345332638, 0.37074082635203354, -0.1459133170689384, -0.004975097634783765, -0.4839970882809759, -0.4165459335296404, 0.4894086579308805, 0.012196213778462806, 0.22934045114803325, -0.1442416045013175, 0.32767994031297576], "twirled_unitaries_q1": [0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, 0.160027087917328, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, 0.34981970641761606, -0.3725604991977569, -0.4927178803761194, 0.4925164648993672, -0.22100626514078314, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.20003673498231578, -0.027557340987776513, -0.4796988074039099, -0.2711085794287058, -0.1427614521973979, -0.23930410994724838, 0.06832291882974673, -0.4324770402338274, 0.006259113990971343, 0.4882741764914904, -0.3095166071138138, -0.11847425931299327, 0.2237896470331293, -0.14045948982839107, 0.17773461296227566, -0.28766952015633507, 0.31763626852959703, 0.3830795306205417, -0.356367840362811, 0.05360593444192574, 0.22946508987948278, -0.2164034875761871, -0.4047643307788249, 0.22063635836623874, 0.24874871752243877, -0.4689717709380474, 0.1617411090224934, 0.21971830466915065, -0.4398136018251897, 0.4031368826142234, -0.06717542216274452, -0.14170315451641002, 0.49565929289516575, 0.38558393453215345, -0.38054151056773833, 0.3706034854176288, -0.03568378013919471, 0.047720446486142265, 0.10900193868114982, -0.46477539180972016, -0.2781207104770047, 0.49150594401294256, 0.4814965178886297, -0.05312386930746982, 0.0822904548108383, 0.3382932840446351, -0.3571480415801709, 0.08841780823371082, 0.12189580615840612, 0.44607081183047725, -0.41132629098234474, -0.12821086662084014, -0.055067922645431366, -0.05866166313476029, 0.33425268937282837, 0.2636358117380446, 0.34603826044352104, 0.19511749309766913, 0.0854317187436564, -0.25, 0.0, -0.25], "pauli_seed_q4": [-132213089617295, -136889955735746], "unitaries_q4": [0.40234032300345746, 0.32971884186395783, 0.3448177027767301, -0.4584829871144649, 0.08509713625245752, -0.060495617944042124, -0.4439617577671342, -0.21225113115551508, 0.054088724382374664, -0.23892899918584476, -0.125309330460194, 0.060092742372248154, 0.4896137555816509, -0.4003084970981625, 0.40239532697192004, -0.27427209221451676, 0.3886045247436556, 0.4320039786933343, -0.3638867534321797, 0.28223449889285135, 0.12276746487499324, -0.08321214542590027, 0.4506729327841903, -0.49557296959474684, -0.1265520133216782, -0.26256977331275166, 0.03058157694307795, 0.40620047609760235, 0.1973131805413999, -0.11804061453004167, 0.05462618005151043, 0.07135232308423767, -0.2489185291095879, 0.13974379002293702, 0.41662052915091863, 0.06818086771210474, -0.16721244956765702, -0.38720928037740876, -0.1117919539837331, 0.2860409549541778, -0.4285359332075629, -0.1573891629055062, -0.17441844222633307, -0.41876241161401495, -0.20547837357075238, 0.473611069732506, -0.3783608350757284, -0.07842265526315728, 0.3925317756770923, 0.2595075211066167, -0.24233783883737559, 0.1429872906517069, 0.19320114364873575, 0.18916516162934727, -0.13975925770959208, 0.35974087642598107, 0.0910327241743758, -0.17685534791162993, 0.46825986056713376, -0.028095447670452245, 0.21121214619110518, 0.025306114815080605, 0.23576781990978546, 0.08316050282518717, 0.31848275278510485, 0.400213131759525, -0.3517301944760227, -0.05158170486511793, -0.12568734236262458, -0.4865840148088658, 0.33147630175334797, 0.021009841695313725, -0.47988603256257534, 0.06447247771077258, 0.08805243674673235, -0.1870609049750307, 0.3776046805460531, 0.3109844258745511, 0.36390183284432354, 0.4611227243477174, -0.22440520452503776], "readout_source_unitaries_q1": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "twirled_unitaries_q2": [-0.0859309855169279, 0.35029365642154886, -0.21420182853494651, 0.18760028191363887, -0.21514255278739114, 0.44268147867660446, 0.2779890761009902, 0.47367514134620947, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.16885000522517402, -0.42061281807632867, 0.3911759845303031, -0.20691047149288266, -0.17600903158385606, -0.009100451273553745, 0.48333014377647743, -0.36823843839154335, 0.4642748186488568, -0.4296253413034954, -0.3395366446713197, -0.28977728519420864, -0.4127736568831999, -0.2284462147227977, -0.3062633617185391, 0.11338753441490113, 0.2815125184840035, -0.3822599408908971, 0.4264193156073617, 0.35911783302185896, -0.001961632156344706, -0.0769597740948278, 0.15377505192719454, -0.1375695796222196, -0.3886559574053656, 0.03588381796728868, -0.2877355696129733, 0.4151805693951154, -0.2457015010787451, -0.29923453998630123, -0.04042363460278864, -0.11804108316546547, -0.03859037256674469, -0.08978167650477431, -0.42191404860625425, -0.04165792706529814, 0.12756873876982056, 0.4374360835014812, -0.18822005996944213, -0.44384141722735393, -0.2722341089927305, -0.1144049988797704, -0.02604531885600636, 0.11199589029635248, -0.38290552515987386, 0.41894082221451256, -0.05473129170245272, -0.2680115214576162, -0.4357020266360898, -0.40176015336168547, -0.4720817472009138, 0.3647157726393928, -0.1662718950803388, -0.03836408176927364, 0.3662952235666772, 0.17466870563372083, -0.3234122951464613, -0.4361980782679602, 0.012161642034783426, 0.23889962098470718, 0.26096195281205326, -0.17505008531592026, 0.44882528698095925, 0.21751509762007615, -0.3802680530959428, -0.5, 0.0, 0.0], "readout_seed_q5": [-2944130350512], "readout_randomization_q5": [0.0, 0.25, -0.25], "unitaries_q5": [0.1680911213450038, 0.13693298667517695, -0.20914928335500704, 0.13952487632665367, 0.35148149681080554, 0.44237399269967526, -0.20788732949937128, -0.42125761916947013, -0.26848903953135306, 0.44346653122211066, 0.1360182062364892, 0.2380340409652426, 0.3971106996721616, 0.14197951721286017, 0.3404604798712434, -0.15289293302358686, 0.12489626579553814, 0.1506412529301997, -0.13751949964263233, 0.4916932343136651, -0.008483669473928757, 0.19366711301472606, 0.3064881637397292, 0.17038852402531646, 0.08098004605518128, 0.19399838117309542, -0.46421182113421366, 0.49744699376657664, 0.3195963535447355, 0.34197805774659074, 0.42257028044813794, 0.2866464046533963, -0.048068057122417684, 0.12794233735865745, -0.4711880464251408, -0.44868171025627746, -0.3434915792021904, -0.16903330759792823, -0.09463038726272543, -0.31216367909048515, 0.13905289215915317, 0.15978147959978628, 0.05617742517105029, -0.06458650101018293, 0.21016554839495427, 0.30954878428748955, -0.4245386550744783, -0.03693104996670726, -0.015578394763785752, -0.13476795769143735, 0.056311052859296495, -0.3715304328143034, -0.19139346063203533, 0.02053440149051511, -0.3608606100066396, 0.15008591523601922, 0.23649482115613196, 0.3527343250287096, 0.2676984602701111, 0.10812050711245647, 0.20380895823433676, 0.18340129072693045, -0.1960361804853754, -0.46737966354565685, -0.17676888165335924, -0.44602483355212996, -0.3078347140316957, 0.06713160476753188, -0.27818622794244163, 0.04949538092258976, 0.21852285157608975, -0.4283825898106137, 0.16208734362142252, 0.18432922293216691, -0.40276701807278315, -0.4089499305662727, 0.4544011513222337, 0.3713159707842202, 0.21220693776629673, -0.38382575941465547, -0.11316011308353424], "readout_seed_q4": [-1703976699851], "current_seeds_q4": [36146255243727, 2], "readout_seed_q1": [10652871225501], "readout_seed_q3": [-25732983856346], "is_mod_zero": [0], "pauli_seed_q0": [56235133306163, 46271745691961], "rc_seed_index": [2], "current_seeds_q3": [31155819389228, 0], "pauli_seed_q1": [60017443263372, 139478054485503], "readout_randomization_q1": [-0.25, 0.0, -0.25], "twirled_unitaries_q4": [-0.09765967699654254, 0.17028115813604217, -0.3448177027767301, -0.04151701288553511, 0.4149028637475425, 0.4395043820559579, -0.4439617577671342, -0.21225113115551508, -0.44591127561762534, 0.26107100081415524, -0.374690669539806, -0.060092742372248154, -0.4896137555816509, -0.4003084970981625, -0.40239532697192004, 0.27427209221451676, 0.3886045247436556, -0.4320039786933343, 0.3638867534321797, 0.21776550110714865, 0.12276746487499324, -0.08321214542590027, 0.4506729327841903, -0.49557296959474684, 0.3734479866783218, -0.23743022668724834, 0.46941842305692205, -0.40620047609760235, 0.3026868194586001, 0.38195938546995833, 0.05462618005151043, 0.07135232308423767, -0.2489185291095879, 0.13974379002293702, 0.41662052915091863, -0.43181913228789526, 0.332787550432343, -0.11279071962259124, 0.1117919539837331, -0.2860409549541778, -0.07146406679243711, -0.1573891629055062, -0.17441844222633307, -0.41876241161401495, 0.2945216264292476, -0.026388930267494004, -0.12163916492427163, -0.4215773447368427, 0.1074682243229077, 0.24049247889338332, 0.2576621611626244, 0.1429872906517069, 0.19320114364873575, 0.18916516162934727, -0.13975925770959208, 0.35974087642598107, 0.0910327241743758, -0.17685534791162993, 0.46825986056713376, 0.47190455232954776, 0.21121214619110518, 0.025306114815080605, -0.26423218009021454, -0.41683949717481283, 0.18151724721489515, -0.400213131759525, -0.14826980552397728, -0.4484182951348821, 0.3743126576373754, 0.013415985191134183, 0.16852369824665203, 0.4789901583046863, 0.47988603256257534, 0.06447247771077258, -0.08805243674673235, 0.1870609049750307, 0.12239531945394688, 0.3109844258745511, 0.25, 0.0, -0.25], "twirled_unitaries_q3": [0.05584616229532102, -0.23214969542699038, 0.20040028666454646, -0.2202751886667791, -0.28722577580825615, 0.4481968228582396, -0.31241562029034853, 0.4748645481993421, -0.41925850582989455, 0.4186349836360712, -0.054728813629211004, -0.11199236531999546, 0.3310447281338149, 0.3038510777441168, 0.25635721054248606, -0.41373787501252934, -0.00924419505930274, 0.49500617846724637, 0.4548230161925275, 0.1263943744118592, -0.23042832066938956, -0.01339141244315556, 0.4355398681503253, -0.13488961790957887, 0.2813933307165257, -0.41366667379787003, -0.3576968962671607, -0.4681498348207711, 0.1215744180596694, -0.09788826968987507, 0.45182440906799926, 0.05123781271171168, 0.01829275539778763, 0.23451311792852536, 0.42923384599364667, 0.10022812594482033, 0.1703562718193048, 0.03370986586156732, 0.4221340290585829, 0.24309403223028525, -0.2626546274601331, 0.19190429382765473, -0.4098307847526783, -0.15289014355117203, -0.32171991367954433, 0.16558770752175178, 0.3960680926516851, 0.26237626860959296, -0.0613204268378027, -0.02917801601742198, 0.475935138627122, 0.27172818466370785, 0.10133381022337673, -0.2765323728482372, 0.20423403798586293, 0.30164309626368535, 0.0879613077568635, -0.35908437707395535, 0.008288686447901483, 0.3092717099731246, -0.4802307733810167, 0.0488876292027669, -0.08227861161092775, -0.0980209432009218, -0.2997854884655027, -0.2853399360082669, 0.20712762310916233, -0.3403026285684163, 0.4060575610720214, -0.241338789020201, 0.185835345332638, 0.37074082635203354, -0.1459133170689384, -0.49502490236521624, -0.016002911719024127, 0.4165459335296404, 0.010591342069119491, -0.4878037862215372, 0.0, 0.0, -0.5]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration1].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration1].json new file mode 100644 index 000000000..8cc9c1f0d --- /dev/null +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration1].json @@ -0,0 +1 @@ +{"unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107], "twirled_unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, -0.07881890527233892, 0.2696516461463965, -0.010108661519272033, 0.24583722651903273, -0.43317668647636864, -0.21094549794112893], "twirled_unitaries_q1": [-0.33704238573828604, 0.4712154313820385, -0.42572259206511376, -0.42111592564365097, 0.2668778554191107, 0.36668869827461137, -0.3757404073357655, -0.34215653660366385, -0.23888989776727243], "unitary_angle_offset": [6], "pauli_seed_q1": [60576142310008], "pauli_seed_q0": [-13838434709596], "rc_base_cycle_loop_index": [1], "current_seeds_q1": [15144035577502], "current_seeds_q0": [66909135500265], "break": [1], "unitaries_q1": [-0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration2].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration2].json new file mode 100644 index 000000000..8e6bb1b45 --- /dev/null +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration2].json @@ -0,0 +1 @@ +{"unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967], "unitary_angle_offset": [72], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "rc_base_cycle_loop_index": [23], "current_seeds_q0": [3], "pauli_seed_q0": [-13838434709596], "pauli_seed_q1": [60576142310008], "break": [1], "current_seeds_q1": [0], "unitaries_q1": [-0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345], "twirled_unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, -0.07881890527233892, 0.2696516461463965, -0.010108661519272033, -0.2541627734809673, -0.06682331352363136, -0.28905450205887107, 0.33704238573828604, 0.4712154313820385, 0.42572259206511376, -0.07888407435634903, 0.2668778554191107, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, -0.23888989776727243, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, -0.028899062065068648, -0.20420834050016623, 0.3197058603934231, -0.2479726770099262, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.03297551316599012, 0.012842477370785588, 0.32926391538136457, 0.44990811567888755, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, -0.21711220189177283, -0.3225331758216612, 0.3927726383275072, 0.05240187483477854, 0.09988083390955893, 0.2846662038892873, -0.307376580132793, -0.0048050564673012275, -0.00910933552858495, -0.4655014605768244, 0.3279888356070302, -0.31032298247400547, -0.42551493610063673, 0.29334057774597255, -0.41127481942283595, 0.07798778071790835, -0.03047247914082618, 0.1293619641527073, -0.33980968285915836, 0.1696033162756727, 0.1614914491827939, -0.11825097296870268, 0.3610912954963368, 0.24209820089131995, 0.006790752767880548, 0.04304425197575412, -0.32738600345714275, -0.25227068013025544, 0.19660653963240193, 0.114802418824965, -0.172704433349967], "twirled_unitaries_q1": [-0.3693422356873377, -0.05031939073900915, -0.07361918673830203, -0.26228990149481035, -0.1496960222960304, -0.21221815451668746, -0.06876404255354984, 0.23108886334528123, -0.019645791898181386, 0.026563378638172708, 0.3427234359697735, -0.27092919654169023, -0.2597276322282447, 0.18229516558227132, 0.06033192657007902, 0.052779087819804005, 0.3829003034514109, -0.10514996532437237, 0.1185831188857982, -0.23219873717626527, 0.2943348490020554, 0.30565501841008924, 0.015880959898169067, -0.3057762984495298, -0.4168508201115806, 0.31428850254358665, -0.2877962331373993, 0.339972912082672, 0.3520932401429775, 0.4300465035584615, -0.08771408961433025, -0.15018029358238394, 0.3725604991977569, -0.00728211962388059, 0.4925164648993672, 0.27899373485921686, -0.4663373044190351, -0.2652796701499689, -0.3059358469084721, 0.004259973013947871, -0.07934844926123219, 0.20003673498231578, 0.4724426590122235, 0.02030119259609009, -0.2288914205712942, 0.3572385478026021, 0.2606958900527516, -0.06832291882974673, 0.4324770402338274, -0.006259113990971343, -0.4882741764914904, -0.3095166071138138, -0.38152574068700673, -0.2762103529668707, 0.35954051017160893, 0.32226538703772434, -0.21233047984366493, 0.31763626852959703, 0.3830795306205417, 0.143632159637189, 0.44639406555807426, -0.22946508987948278, 0.2835965124238129, -0.0952356692211751, 0.22063635836623874, -0.24874871752243877, -0.4689717709380474, 0.1617411090224934, 0.28028169533084935, 0.06018639817481031, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration3].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration3].json new file mode 100644 index 000000000..5cb4ec5c2 --- /dev/null +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration3].json @@ -0,0 +1 @@ +{"current_seeds_q1": [27946020799016, 0], "break": [1], "current_seeds_q0": [60576142310008, 3], "unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696], "pauli_seed_q0": [-13838434709596, 60576142310008], "rc_base_cycle_loop_index": [23], "pauli_seed_q1": [34470019755655, 27946020799016], "unitaries_q1": [-0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256], "unitary_angle_offset": [75], "twirled_unitaries_q1": [-0.28778184548331254, 0.06876404255354984, -0.23108886334528123, -0.019645791898181386, -0.026563378638172708, -0.1572765640302265, 0.22907080345830977, 0.2402723677717553, -0.3177048344177287, -0.06033192657007902, -0.447220912180196, 0.1170996965485891, 0.3948500346756276, 0.3814168811142018, 0.26780126282373473, 0.20566515099794458, 0.19434498158991076, 0.48411904010183093, -0.1942237015504702, 0.08314917988841941, 0.18571149745641335, 0.21220376686260067, -0.339972912082672, 0.3520932401429775, 0.06995349644153848, -0.41228591038566975, 0.34981970641761606, 0.3725604991977569, -0.4927178803761194, 0.4925164648993672, -0.22100626514078314, 0.03366269558096491, 0.2652796701499689, 0.1940641530915279, -0.004259973013947871, 0.4206515507387678, 0.20003673498231578, 0.027557340987776513, 0.02030119259609009, -0.2711085794287058, -0.3572385478026021, 0.2606958900527516, 0.4316770811702533, -0.4324770402338274, -0.49374088600902866, -0.011725823508509592, 0.1904833928861862, 0.11847425931299327, -0.2762103529668707, -0.35954051017160893, 0.17773461296227566, 0.28766952015633507, 0.18236373147040297, -0.11692046937945832, -0.143632159637189, -0.05360593444192574, -0.2705349101205172, 0.2164034875761871, -0.0952356692211751, 0.22063635836623874, 0.25125128247756123, 0.031028229061952572, 0.3382588909775066, -0.21971830466915065, -0.4398136018251897, 0.4031368826142234, -0.4328245778372555, 0.35829684548359, 0.49565929289516575, -0.38558393453215345, -0.38054151056773833, -0.3706034854176288, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "rc_seed_index": [2], "twirled_unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, -0.48989133848072797, 0.24583722651903273, 0.06682331352363136, -0.28905450205887107, -0.33704238573828604, -0.4712154313820385, 0.42572259206511376, 0.07888407435634903, -0.2331221445808893, -0.13331130172538863, 0.12425959266423448, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, 0.4731909991248422, 0.15171013965482416, -0.4607650836825492, -0.37684417282135385, -0.028899062065068648, -0.20420834050016623, -0.18029413960657692, 0.2520273229900738, -0.18624585452333164, 0.49105233325456865, -0.08201948178145457, 0.2163845393922088, -0.31819606673195366, -0.4447669819517266, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.17073608461863543, -0.050091884321112445, 0.15970901771559554, 0.39341591753839467, -0.2551812027350344, -0.21711220189177283, 0.1774668241783388, -0.1072273616724928, -0.44759812516522146, 0.09988083390955893, -0.2846662038892873, -0.192623419867207, -0.0048050564673012275, 0.00910933552858495, -0.4655014605768244, 0.17201116439296982, 0.31032298247400547, 0.07448506389936327, 0.20665942225402745, 0.41127481942283595, 0.07798778071790835, 0.03047247914082618, 0.1293619641527073, -0.16019031714084164, -0.1696033162756727, 0.1614914491827939, 0.3817490270312973, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, 0.17261399654285725, 0.24772931986974456, -0.30339346036759807, -0.385197581175035, 0.327295566650033, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration4].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration4].json new file mode 100644 index 000000000..a74063c7b --- /dev/null +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration4].json @@ -0,0 +1 @@ +{"current_seeds_q1": [0], "pauli_seed_q1": [60576142310008], "unitary_angle_offset": [72], "twirled_unitaries_q1": [-0.3693422356873377, -0.05031939073900915, -0.07361918673830203, -0.26228990149481035, -0.1496960222960304, -0.21221815451668746, -0.06876404255354984, 0.23108886334528123, -0.019645791898181386, 0.026563378638172708, 0.3427234359697735, -0.27092919654169023, -0.2597276322282447, 0.18229516558227132, 0.06033192657007902, 0.052779087819804005, 0.3829003034514109, -0.10514996532437237, 0.1185831188857982, -0.23219873717626527, 0.2943348490020554, 0.30565501841008924, 0.015880959898169067, -0.3057762984495298, -0.4168508201115806, 0.31428850254358665, -0.2877962331373993, 0.339972912082672, 0.3520932401429775, 0.4300465035584615, -0.08771408961433025, -0.15018029358238394, 0.3725604991977569, -0.00728211962388059, 0.4925164648993672, 0.27899373485921686, -0.4663373044190351, -0.2652796701499689, -0.3059358469084721, 0.004259973013947871, -0.07934844926123219, 0.20003673498231578, 0.4724426590122235, 0.02030119259609009, -0.2288914205712942, 0.3572385478026021, 0.2606958900527516, -0.06832291882974673, 0.4324770402338274, -0.006259113990971343, -0.4882741764914904, -0.3095166071138138, -0.38152574068700673, -0.2762103529668707, 0.35954051017160893, 0.32226538703772434, -0.21233047984366493, 0.31763626852959703, 0.3830795306205417, 0.143632159637189, 0.44639406555807426, -0.22946508987948278, 0.2835965124238129, -0.0952356692211751, 0.22063635836623874, -0.24874871752243877, -0.4689717709380474, 0.1617411090224934, 0.28028169533084935, 0.06018639817481031, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345], "twirled_unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, -0.07881890527233892, 0.2696516461463965, -0.010108661519272033, -0.2541627734809673, -0.06682331352363136, -0.28905450205887107, 0.33704238573828604, 0.4712154313820385, 0.42572259206511376, -0.07888407435634903, 0.2668778554191107, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, -0.23888989776727243, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, -0.028899062065068648, -0.20420834050016623, 0.3197058603934231, -0.2479726770099262, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.03297551316599012, 0.012842477370785588, 0.32926391538136457, 0.44990811567888755, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, -0.21711220189177283, -0.3225331758216612, 0.3927726383275072, 0.05240187483477854, 0.09988083390955893, 0.2846662038892873, -0.307376580132793, -0.0048050564673012275, -0.00910933552858495, -0.4655014605768244, 0.3279888356070302, -0.31032298247400547, -0.42551493610063673, 0.29334057774597255, -0.41127481942283595, 0.07798778071790835, -0.03047247914082618, 0.1293619641527073, -0.33980968285915836, 0.1696033162756727, 0.1614914491827939, -0.11825097296870268, 0.3610912954963368, 0.24209820089131995, 0.006790752767880548, 0.04304425197575412, -0.32738600345714275, -0.25227068013025544, 0.19660653963240193, 0.114802418824965, -0.172704433349967], "break": [1], "rc_base_cycle_loop_index": [11], "unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967], "pauli_seed_q0": [-13838434709596], "current_seeds_q0": [3], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "unitaries_q1": [-0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration5].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration5].json new file mode 100644 index 000000000..cc91103db --- /dev/null +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration5].json @@ -0,0 +1 @@ +{"unitary_angle_offset": [84], "unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132], "rc_base_cycle_loop_index": [1], "twirled_unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, -0.48989133848072797, 0.24583722651903273, 0.06682331352363136, -0.28905450205887107, -0.33704238573828604, -0.4712154313820385, 0.42572259206511376, 0.07888407435634903, -0.2331221445808893, -0.13331130172538863, 0.12425959266423448, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, 0.4731909991248422, 0.15171013965482416, -0.4607650836825492, -0.37684417282135385, -0.028899062065068648, -0.20420834050016623, -0.18029413960657692, 0.2520273229900738, -0.18624585452333164, 0.49105233325456865, -0.08201948178145457, 0.2163845393922088, -0.31819606673195366, -0.4447669819517266, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.17073608461863543, -0.050091884321112445, 0.15970901771559554, 0.39341591753839467, -0.2551812027350344, -0.21711220189177283, 0.1774668241783388, -0.1072273616724928, -0.44759812516522146, 0.09988083390955893, -0.2846662038892873, -0.192623419867207, -0.0048050564673012275, 0.00910933552858495, -0.4655014605768244, 0.17201116439296982, 0.31032298247400547, 0.07448506389936327, 0.20665942225402745, 0.41127481942283595, 0.07798778071790835, 0.03047247914082618, 0.1293619641527073, -0.16019031714084164, -0.1696033162756727, 0.1614914491827939, 0.3817490270312973, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, 0.17261399654285725, 0.24772931986974456, -0.30339346036759807, -0.385197581175035, 0.327295566650033, -0.3693422356873377, -0.05031939073900915, 0.42638081326169797, 0.26228990149481035, -0.1496960222960304, 0.28778184548331254, 0.43123595744645016, 0.2689111366547188, 0.4803542081018186, -0.026563378638172708, -0.1572765640302265, -0.27092919654169023, 0.2402723677717553, -0.3177048344177287], "current_seeds_q1": [436656574984, 0], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "rc_seed_index": [2], "pauli_seed_q0": [-13838434709596, 60576142310008], "twirled_unitaries_q1": [-0.06033192657007902, -0.052779087819804005, -0.1170996965485891, 0.10514996532437237, 0.1185831188857982, 0.26780126282373473, 0.20566515099794458, 0.19434498158991076, -0.015880959898169067, -0.1942237015504702, 0.08314917988841941, 0.18571149745641335, -0.2877962331373993, -0.339972912082672, -0.1479067598570225, -0.4300465035584615, -0.41228591038566975, -0.15018029358238394, -0.1274395008022431, -0.4927178803761194, 0.4925164648993672, 0.27899373485921686, 0.4663373044190351, -0.2652796701499689, 0.3059358469084721, -0.004259973013947871, 0.07934844926123219, -0.20003673498231578, 0.4724426590122235, 0.02030119259609009, -0.2711085794287058, -0.3572385478026021, -0.23930410994724838, -0.06832291882974673, -0.4324770402338274, 0.006259113990971343, 0.4882741764914904, 0.1904833928861862, -0.38152574068700673, 0.2237896470331293, -0.14045948982839107, 0.32226538703772434, -0.28766952015633507, 0.31763626852959703, 0.3830795306205417, 0.356367840362811, -0.05360593444192574, 0.22946508987948278, 0.2164034875761871, -0.0952356692211751, 0.22063635836623874, -0.24874871752243877, 0.4689717709380474, -0.3382588909775066, 0.21971830466915065, -0.4398136018251897, -0.4031368826142234, 0.4328245778372555, 0.14170315451641002, -0.004340707104834252, 0.11441606546784655, -0.38054151056773833, 0.12939651458237122, 0.4643162198608053, 0.45227955351385773, 0.3909980613188502, -0.46477539180972016, 0.2218792895229953, 0.49150594401294256, -0.4814965178886297, 0.4468761306925302, 0.4177095451891617, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, -0.12189580615840612, 0.053929188169522746, 0.41132629098234474, -0.37178913337915986, -0.055067922645431366, -0.4413383368652397, 0.16574731062717163, -0.2636358117380446, -0.15396173955647896, -0.3048825069023309, -0.4145682812563436, 0.4630714074908795], "current_seeds_q0": [946502223593, 3], "break": [1], "unitaries_q1": [-0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795], "pauli_seed_q1": [34470019755655, 27946020799016]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration6].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration6].json new file mode 100644 index 000000000..47d49e11d --- /dev/null +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration6].json @@ -0,0 +1 @@ +{"current_seeds_q1": [220], "unitaries_q1": [-0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592], "current_seeds_q0": [973], "unitary_angle_offset": [60], "pauli_seed_q0": [-13838434709596], "break": [1], "twirled_unitaries_q1": [-0.3303966837243273, 0.1614914491827939, -0.11825097296870268, 0.3610912954963368, 0.25790179910868005, -0.006790752767880548, 0.4569557480242459, -0.17261399654285725, 0.24772931986974456, 0.19660653963240193, 0.385197581175035, 0.172704433349967, 0.3693422356873377, -0.05031939073900915, 0.07361918673830203, -0.23771009850518965, -0.3503039777039696, 0.28778184548331254, 0.43123595744645016, 0.23108886334528123, -0.019645791898181386, -0.4734366213618273, 0.3427234359697735, 0.22907080345830977, -0.2597276322282447, 0.18229516558227132, -0.439668073429921, 0.052779087819804005, 0.1170996965485891, -0.3948500346756276, 0.3814168811142018, -0.26780126282373473, -0.20566515099794458, 0.30565501841008924, 0.015880959898169067, 0.1942237015504702, -0.4168508201115806, 0.18571149745641335, -0.21220376686260067, 0.160027087917328, 0.3520932401429775, -0.4300465035584615, -0.41228591038566975, -0.34981970641761606, -0.1274395008022431, 0.4927178803761194, 0.007483535100632821, 0.22100626514078314, -0.03366269558096491, -0.2347203298500311, 0.1940641530915279, 0.004259973013947871, -0.07934844926123219, -0.2999632650176842, -0.027557340987776513, 0.4796988074039099, -0.2711085794287058, -0.3572385478026021, 0.23930410994724838, -0.06832291882974673, 0.4324770402338274, -0.006259113990971343, 0.011725823508509592], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "twirled_unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, -0.07881890527233892, 0.2696516461463965, -0.010108661519272033, -0.2541627734809673, -0.06682331352363136, -0.28905450205887107, 0.33704238573828604, 0.4712154313820385, 0.42572259206511376, -0.07888407435634903, 0.2668778554191107, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, -0.23888989776727243, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, -0.028899062065068648, -0.20420834050016623, 0.3197058603934231, -0.2479726770099262, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.03297551316599012, 0.012842477370785588, 0.32926391538136457, 0.44990811567888755, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, -0.21711220189177283, -0.3225331758216612, 0.3927726383275072, 0.05240187483477854, 0.09988083390955893, 0.2846662038892873, -0.307376580132793, -0.0048050564673012275, -0.00910933552858495, -0.4655014605768244, 0.3279888356070302, -0.31032298247400547, -0.42551493610063673, 0.29334057774597255, -0.41127481942283595, 0.07798778071790835, -0.03047247914082618, 0.1293619641527073, 0.16019031714084164], "pauli_seed_q1": [60576142310008], "rc_base_cycle_loop_index": [4], "unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration7].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration7].json new file mode 100644 index 000000000..b939460f7 --- /dev/null +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration7].json @@ -0,0 +1 @@ +{"twirled_unitaries_q1": [-0.06033192657007902, -0.052779087819804005, -0.1170996965485891, 0.10514996532437237, 0.1185831188857982, 0.26780126282373473, 0.20566515099794458, 0.19434498158991076, -0.015880959898169067, -0.1942237015504702, 0.08314917988841941, 0.18571149745641335, -0.2877962331373993, -0.339972912082672, -0.1479067598570225, -0.4300465035584615, -0.41228591038566975, -0.15018029358238394, -0.1274395008022431, -0.4927178803761194, 0.4925164648993672, 0.27899373485921686, 0.4663373044190351, -0.2652796701499689, 0.3059358469084721, -0.004259973013947871, 0.07934844926123219, -0.20003673498231578, 0.4724426590122235, 0.02030119259609009, -0.2711085794287058, -0.3572385478026021, -0.23930410994724838, -0.06832291882974673, -0.4324770402338274, 0.006259113990971343, 0.4882741764914904, 0.1904833928861862, -0.38152574068700673, 0.2237896470331293, -0.14045948982839107, 0.32226538703772434, -0.28766952015633507, 0.31763626852959703, 0.3830795306205417, 0.356367840362811, -0.05360593444192574, 0.22946508987948278, 0.2164034875761871, -0.0952356692211751, 0.22063635836623874, -0.24874871752243877, 0.4689717709380474, -0.3382588909775066, 0.21971830466915065, -0.4398136018251897, -0.4031368826142234, 0.4328245778372555, 0.14170315451641002, -0.004340707104834252, 0.11441606546784655, -0.38054151056773833, 0.12939651458237122, 0.4643162198608053, 0.45227955351385773, 0.3909980613188502, -0.46477539180972016, 0.2218792895229953, 0.49150594401294256, -0.4814965178886297, 0.4468761306925302, 0.4177095451891617, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, -0.12189580615840612, 0.053929188169522746, 0.41132629098234474, -0.37178913337915986, -0.055067922645431366, -0.4413383368652397, 0.16574731062717163, -0.2636358117380446, -0.15396173955647896, -0.3048825069023309, -0.4145682812563436, 0.4630714074908795], "rc_seed_index": [2], "current_seeds_q1": [436656574984, 0], "twirled_unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, -0.48989133848072797, 0.24583722651903273, 0.06682331352363136, -0.28905450205887107, -0.33704238573828604, -0.4712154313820385, 0.42572259206511376, 0.07888407435634903, -0.2331221445808893, -0.13331130172538863, 0.12425959266423448, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, 0.4731909991248422, 0.15171013965482416, -0.4607650836825492, -0.37684417282135385, -0.028899062065068648, -0.20420834050016623, -0.18029413960657692, 0.2520273229900738, -0.18624585452333164, 0.49105233325456865, -0.08201948178145457, 0.2163845393922088, -0.31819606673195366, -0.4447669819517266, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.17073608461863543, -0.050091884321112445, 0.15970901771559554, 0.39341591753839467, -0.2551812027350344, -0.21711220189177283, 0.1774668241783388, -0.1072273616724928, -0.44759812516522146, 0.09988083390955893, -0.2846662038892873, -0.192623419867207, -0.0048050564673012275, 0.00910933552858495, -0.4655014605768244, 0.17201116439296982, 0.31032298247400547, 0.07448506389936327, 0.20665942225402745, 0.41127481942283595, 0.07798778071790835, 0.03047247914082618, 0.1293619641527073, -0.16019031714084164, -0.1696033162756727, 0.1614914491827939, 0.3817490270312973, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, 0.17261399654285725, 0.24772931986974456, -0.30339346036759807, -0.385197581175035, 0.327295566650033, -0.3693422356873377, -0.05031939073900915, 0.42638081326169797, 0.26228990149481035, -0.1496960222960304, 0.28778184548331254, 0.43123595744645016, 0.2689111366547188, 0.4803542081018186, -0.026563378638172708, -0.1572765640302265, -0.27092919654169023, 0.2402723677717553, -0.3177048344177287], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "unitaries_q1": [-0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795], "pauli_seed_q0": [-13838434709596, 60576142310008], "pauli_seed_q1": [34470019755655, 27946020799016], "current_seeds_q0": [946502223593, 3], "break": [1], "unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132], "rc_base_cycle_loop_index": [5], "unitary_angle_offset": [84]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration8].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration8].json new file mode 100644 index 000000000..a73b32c10 --- /dev/null +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration8].json @@ -0,0 +1 @@ +{"current_seeds_q0": [0, 0], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "rc_base_cycle_loop_index": [1], "unitaries_q1": [0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353, -0.0859309855169279, 0.35029365642154886, -0.21420182853494651, -0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.331149994774826, 0.42061281807632867, 0.10882401546969689, -0.20691047149288266, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028, 0.28977728519420864, -0.4127736568831999, 0.2284462147227977, 0.3062633617185391, 0.11338753441490113, 0.2184874815159965, 0.3822599408908971, 0.07358068439263832, -0.14088216697814104, 0.4980383678436553, -0.0769597740948278, -0.34622494807280546, -0.1375695796222196, -0.3886559574053656, -0.4641161820327113, -0.2877355696129733, 0.4151805693951154, -0.2457015010787451, -0.29923453998630123, -0.45957636539721136, -0.38195891683453453, 0.03859037256674469, -0.08978167650477431, -0.07808595139374575, 0.04165792706529814, 0.37243126123017944, -0.06256391649851878, 0.31177994003055787, -0.44384141722735393, 0.22776589100726952, -0.1144049988797704, -0.02604531885600636, -0.3880041097036475, -0.38290552515987386, 0.41894082221451256, 0.4452687082975473, 0.2319884785423838, -0.06429797336391019, -0.09823984663831453, -0.02791825279908622, 0.3647157726393928, -0.3337281049196612, -0.46163591823072636, 0.1337047764333228, -0.32533129436627917, 0.1765877048535387, -0.0638019217320398, 0.4878383579652166, -0.23889962098470718, 0.26096195281205326, -0.32494991468407974, -0.44882528698095925, 0.21751509762007615, 0.3802680530959428, 0.2730510105090431, 0.1723272746916713, -0.13920345844470106, 0.05584616229532102, -0.23214969542699038, -0.29959971333545354, 0.2797248113332209, -0.28722577580825615, -0.051803177141760415, -0.31241562029034853, 0.025135451800657904, -0.08074149417010545, -0.4186349836360712, -0.054728813629211004, 0.11199236531999546, -0.3310447281338149, 0.1961489222558832, -0.24364278945751394, -0.41373787501252934, -0.49075580494069726, -0.49500617846724637, 0.04517698380747248, 0.3736056255881408, -0.23042832066938956, 0.48660858755684444, 0.4355398681503253, -0.13488961790957887, 0.2813933307165257, -0.41366667379787003, -0.3576968962671607, 0.031850165179228895, 0.1215744180596694, -0.09788826968987507, -0.048175590932000745, 0.4487621872882883, 0.48170724460221237, -0.23451311792852536, 0.42923384599364667, -0.10022812594482033, -0.1703562718193048], "pauli_seed_q1": [34470019755655, 27946020799016], "unitary_angle_offset": [144], "current_seeds_q1": [0, 0], "break": [1], "twirled_unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, -0.48989133848072797, 0.24583722651903273, 0.06682331352363136, -0.28905450205887107, -0.33704238573828604, -0.4712154313820385, 0.42572259206511376, 0.07888407435634903, -0.2331221445808893, -0.13331130172538863, 0.12425959266423448, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, 0.4731909991248422, 0.15171013965482416, -0.4607650836825492, -0.37684417282135385, -0.028899062065068648, -0.20420834050016623, -0.18029413960657692, 0.2520273229900738, -0.18624585452333164, 0.49105233325456865, -0.08201948178145457, 0.2163845393922088, -0.31819606673195366, -0.4447669819517266, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.17073608461863543, -0.050091884321112445, 0.15970901771559554, 0.39341591753839467, -0.2551812027350344, -0.21711220189177283, 0.1774668241783388, -0.1072273616724928, -0.44759812516522146, 0.09988083390955893, -0.2846662038892873, -0.192623419867207, -0.0048050564673012275, 0.00910933552858495, -0.4655014605768244, 0.17201116439296982, 0.31032298247400547, 0.07448506389936327, 0.20665942225402745, 0.41127481942283595, 0.07798778071790835, 0.03047247914082618, 0.1293619641527073, -0.16019031714084164, -0.1696033162756727, 0.1614914491827939, 0.3817490270312973, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, 0.17261399654285725, 0.24772931986974456, -0.30339346036759807, -0.385197581175035, 0.327295566650033, -0.3693422356873377, -0.05031939073900915, 0.42638081326169797, 0.26228990149481035, -0.1496960222960304, 0.28778184548331254, 0.43123595744645016, 0.2689111366547188, 0.4803542081018186, -0.026563378638172708, -0.1572765640302265, 0.22907080345830977, 0.2597276322282447, -0.18229516558227132, -0.439668073429921, -0.052779087819804005, -0.3829003034514109, 0.3948500346756276, 0.1185831188857982, -0.26780126282373473, 0.2943348490020554, 0.19434498158991076, 0.015880959898169067, -0.3057762984495298, 0.4168508201115806, 0.18571149745641335, 0.21220376686260067, -0.160027087917328, -0.3520932401429775, 0.4300465035584615, -0.08771408961433025, 0.34981970641761606, 0.3725604991977569, -0.4927178803761194, -0.007483535100632821, -0.22100626514078314, 0.03366269558096491, -0.2347203298500311, -0.3059358469084721, -0.004259973013947871, -0.07934844926123219, 0.20003673498231578, 0.4724426590122235, 0.4796988074039099, 0.2711085794287058, -0.1427614521973979, -0.23930410994724838, 0.4316770811702533, -0.06752295976617262, 0.49374088600902866, -0.4882741764914904, 0.3095166071138138, 0.11847425931299327, -0.2762103529668707, -0.35954051017160893, 0.17773461296227566, -0.21233047984366493, 0.31763626852959703, -0.3830795306205417, 0.143632159637189, -0.05360593444192574, 0.2705349101205172, 0.2835965124238129, -0.4047643307788249, -0.27936364163376126, 0.25125128247756123, 0.031028229061952572, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575], "rc_seed_index": [2], "twirled_unitaries_q1": [0.38558393453215345, -0.11945848943226167, -0.3706034854176288, -0.03568378013919471, 0.047720446486142265, 0.10900193868114982, -0.03522460819027984, 0.2218792895229953, 0.008494055987057436, 0.4814965178886297, 0.4468761306925302, -0.4177095451891617, 0.1617067159553649, -0.14285195841982912, -0.4115821917662892, 0.12189580615840612, 0.053929188169522746, 0.08867370901765526, -0.12821086662084014, -0.44493207735456863, 0.05866166313476029, -0.33425268937282837, -0.23636418826195538, 0.15396173955647896, -0.19511749309766913, -0.0854317187436564, -0.036928592509120506, -0.44066757058091, 0.20553371694326472, -0.4140690144830721, 0.14970634357845114, -0.2857981714650535, 0.18760028191363887, 0.21514255278739114, -0.057318521323395544, 0.2779890761009902, 0.47367514134620947, -0.13755156757528653, 0.4512413528363055, -0.47065008790002594, 0.3265447505634178, 0.1822764510861603, -0.331149994774826, 0.07938718192367133, 0.3911759845303031, 0.20691047149288266, 0.17600903158385606, 0.49089954872644626, -0.016669856223522572, 0.13176156160845665, -0.4642748186488568, 0.07037465869650461, -0.16046335532868028, -0.28977728519420864, -0.08722634311680011, 0.2284462147227977, 0.19373663828146093, -0.11338753441490113, 0.2184874815159965, 0.1177400591091029, 0.4264193156073617, -0.35911783302185896, 0.4980383678436553, 0.4230402259051722, -0.34622494807280546, 0.3624304203777804, -0.3886559574053656, -0.03588381796728868, 0.2877355696129733, -0.4151805693951154, -0.2542984989212549, 0.20076546001369877, -0.45957636539721136, -0.38195891683453453, 0.03859037256674469, 0.4102183234952257, -0.42191404860625425, 0.45834207293470186, 0.12756873876982056, -0.06256391649851878, -0.31177994003055787, -0.05615858277264607, 0.2722341089927305, 0.3855950011202296, -0.02604531885600636, -0.11199589029635248, -0.11709447484012614, -0.41894082221451256, 0.05473129170245272, -0.2680115214576162, 0.4357020266360898, -0.09823984663831453, -0.02791825279908622, -0.1352842273606072, -0.1662718950803388, -0.03836408176927364, -0.1337047764333228, -0.17466870563372083, -0.3234122951464613, -0.0638019217320398, 0.012161642034783426, 0.23889962098470718, 0.23903804718794674, -0.32494991468407974, 0.44882528698095925, -0.21751509762007615, 0.3802680530959428, -0.2730510105090431, -0.1723272746916713, -0.36079654155529894, -0.444153837704679, -0.23214969542699038, -0.29959971333545354, 0.2797248113332209, 0.21277422419174385, -0.051803177141760415, 0.18758437970965147, 0.025135451800657904, -0.41925850582989455, -0.08136501636392879, 0.054728813629211004, 0.11199236531999546, 0.3310447281338149, -0.1961489222558832, -0.24364278945751394, 0.41373787501252934, -0.00924419505930274, -0.49500617846724637, -0.04517698380747248, 0.1263943744118592, -0.23042832066938956, 0.01339141244315556, 0.0644601318496747, -0.13488961790957887, 0.21860666928347428, -0.08633332620212997, -0.3576968962671607, -0.031850165179228895, 0.3784255819403306, -0.09788826968987507, -0.45182440906799926, -0.4487621872882883, 0.01829275539778763, 0.26548688207147464, 0.42923384599364667, -0.10022812594482033, -0.1703562718193048], "unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575], "pauli_seed_q0": [-13838434709596, 60576142310008]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration9].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration9].json new file mode 100644 index 000000000..da67cd314 --- /dev/null +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration9].json @@ -0,0 +1 @@ +{"pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "twirled_unitaries_q3": [0.1479067598570225, -0.06995349644153848, -0.08771408961433025, 0.34981970641761606, -0.3725604991977569, -0.4927178803761194, -0.007483535100632821, -0.27899373485921686, -0.4663373044190351, -0.2652796701499689, -0.1940641530915279, 0.004259973013947871, -0.4206515507387678, 0.20003673498231578, 0.4724426590122235, -0.4796988074039099, -0.2711085794287058, 0.3572385478026021, -0.23930410994724838, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.4882741764914904, 0.3095166071138138, -0.38152574068700673, 0.2237896470331293, 0.14045948982839107, -0.17773461296227566, -0.21233047984366493, -0.18236373147040297, 0.3830795306205417, -0.143632159637189, 0.44639406555807426], "pauli_seed_q2": [34470019755655], "pauli_seed_q0": [-13838434709596], "unitaries_q5": [0.4413383368652397, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353, -0.0859309855169279, 0.35029365642154886, -0.21420182853494651, -0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.331149994774826, 0.42061281807632867, 0.10882401546969689, -0.20691047149288266, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028], "unitaries_q3": [0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574], "twirled_unitaries_q5": [0.4413383368652397, 0.33425268937282837, 0.2636358117380446, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353, 0.4140690144830721, 0.35029365642154886, 0.2857981714650535, 0.18760028191363887, -0.28485744721260886, 0.057318521323395544, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, -0.3265447505634178, -0.3177235489138397, -0.16885000522517402, -0.42061281807632867, -0.10882401546969689, -0.29308952850711734, 0.17600903158385606, 0.009100451273553745, 0.48333014377647743, 0.36823843839154335, -0.4642748186488568, -0.4296253413034954, 0.3395366446713197], "rc_base_cycle_loop_index": [4], "unitary_angle_offset": [30], "twirled_unitaries_q0": [0.23034835385360353, 0.010108661519272033, 0.2541627734809673, 0.43317668647636864, 0.21094549794112893, 0.33704238573828604, 0.028784568617961526, -0.42572259206511376, -0.07888407435634903, -0.2331221445808893, 0.13331130172538863, -0.3757404073357655, -0.34215653660366385, 0.23888989776727243, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, 0.039234916317450796, 0.12315582717864615, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, 0.31375414547666836, 0.49105233325456865, 0.4179805182185454, -0.2836154606077912, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578], "twirled_unitaries_q4": [0.2705349101205172, -0.2835965124238129, 0.0952356692211751, -0.27936364163376126, 0.25125128247756123, 0.4689717709380474, -0.1617411090224934, 0.21971830466915065, -0.06018639817481031, 0.09686311738577658, -0.4328245778372555, -0.14170315451641002, 0.49565929289516575, 0.38558393453215345, -0.38054151056773833, 0.3706034854176288, -0.03568378013919471, -0.45227955351385773, 0.10900193868114982, -0.46477539180972016, 0.2218792895229953, 0.49150594401294256, 0.018503482111370317, -0.4468761306925302, -0.0822904548108383, 0.1617067159553649, -0.3571480415801709, -0.4115821917662892, 0.3781041938415939, -0.44607081183047725, -0.08867370901765526, -0.37178913337915986, 0.44493207735456863], "pauli_seed_q3": [27946020799016], "pauli_seed_q5": [119343881614275], "pauli_seed_q1": [60576142310008], "current_seeds_q4": [879260322], "current_seeds_q3": [106605609], "break": [1], "current_seeds_q5": [455260778], "unitaries_q2": [-0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672], "unitaries_q4": [-0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366], "current_seeds_q0": [1020952384], "unitaries_q0": [0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578], "pauli_seed_q4": [-50982158722643], "twirled_unitaries_q1": [-0.4670244868340099, -0.012842477370785588, -0.32926391538136457, -0.44990811567888755, 0.15970901771559554, 0.39341591753839467, 0.2551812027350344, 0.21711220189177283, 0.1774668241783388, -0.1072273616724928, -0.05240187483477854, -0.09988083390955893, -0.21533379611071268, 0.307376580132793, 0.4951949435326988, 0.00910933552858495, 0.4655014605768244, -0.17201116439296982, -0.18967701752599453, 0.07448506389936327, 0.20665942225402745, -0.41127481942283595, 0.07798778071790835, 0.4695275208591738, 0.1293619641527073, -0.33980968285915836, -0.1696033162756727, -0.1614914491827939, -0.3817490270312973, 0.3610912954963368, -0.25790179910868005, -0.49320924723211945, -0.4569557480242459], "unitaries_q1": [-0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459], "current_seeds_q1": [231079644], "current_seeds_q2": [131492690], "twirled_unitaries_q2": [-0.32738600345714275, 0.24772931986974456, 0.19660653963240193, 0.114802418824965, -0.327295566650033, 0.3693422356873377, -0.44968060926099085, -0.42638081326169797, -0.26228990149481035, -0.3503039777039696, -0.21221815451668746, 0.43123595744645016, 0.23108886334528123, -0.019645791898181386, 0.4734366213618273, -0.1572765640302265, 0.22907080345830977, 0.2597276322282447, -0.3177048344177287, -0.439668073429921, -0.447220912180196, -0.3829003034514109, 0.10514996532437237, 0.1185831188857982, -0.23219873717626527, 0.20566515099794458, -0.19434498158991076, -0.015880959898169067, -0.3057762984495298, 0.08314917988841941, 0.18571149745641335, -0.2877962331373993, 0.160027087917328]} \ No newline at end of file diff --git a/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr index f9795bc76..d137d7890 100644 --- a/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr +++ b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr @@ -1,5 +1,5 @@ # serializer version: 1 -# name: test_looping_structures[test_case0][quil] +# name: test_looping_structures[configuration0][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -36,7 +36,7 @@ ''' # --- -# name: test_looping_structures[test_case1][quil] +# name: test_looping_structures[configuration1][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -84,7 +84,7 @@ ''' # --- -# name: test_looping_structures[test_case2][quil] +# name: test_looping_structures[configuration2][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -132,7 +132,7 @@ ''' # --- -# name: test_looping_structures[test_case3][quil] +# name: test_looping_structures[configuration3][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -152,7 +152,7 @@ DECLARE twirled_unitaries_q1 REAL[78] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] - DECLARE rc_seed_index INTEGER[2] + DECLARE rc_seed_index INTEGER[1] DECLARE rc_base_cycle_loop_index INTEGER[1] DECLARE current_seeds_q0 INTEGER[2] DECLARE current_seeds_q1 INTEGER[2] @@ -181,10 +181,1775 @@ MOVE current_seeds_q1[1] current_seeds_q1[0] LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 0 pauli_conjugates_map + ADD rc_seed_index[0] 1 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + GE break[0] rc_seed_index[0] 2 + JUMP-UNLESS @rc_seed_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- +# name: test_looping_structures[configuration4][quil] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[1] + DECLARE pauli_seed_q1 INTEGER[1] + DECLARE twirled_unitaries_q0 REAL[75] + DECLARE twirled_unitaries_q1 REAL[75] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[1] + DECLARE current_seeds_q1 INTEGER[1] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_base_cycle_loop + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 11 + JUMP-UNLESS @rc_base_cycle_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- +# name: test_looping_structures[configuration5][quil] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[2] + DECLARE pauli_seed_q1 INTEGER[2] + DECLARE twirled_unitaries_q0 REAL[87] + DECLARE twirled_unitaries_q1 REAL[87] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_seed_index INTEGER[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[2] + DECLARE current_seeds_q1 INTEGER[2] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_seed_index[0] 1 + LABEL @rc_seed_loop + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_seed_loop_inner + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 11 + JUMP-UNLESS @rc_seed_loop_inner break[0] + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + MOVE current_seeds_q0[1] current_seeds_q0[0] + MOVE current_seeds_q1[1] current_seeds_q1[0] + LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] + LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] + ADD rc_seed_index[0] 1 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + GE break[0] rc_seed_index[0] 2 + JUMP-UNLESS @rc_seed_loop break[0] + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_base_cycle_loop + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 1 + JUMP-UNLESS @rc_base_cycle_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- +# name: test_looping_structures[configuration6][quil] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[1] + DECLARE pauli_seed_q1 INTEGER[1] + DECLARE twirled_unitaries_q0 REAL[63] + DECLARE twirled_unitaries_q1 REAL[63] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[1] + DECLARE current_seeds_q1 INTEGER[1] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_base_cycle_loop + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 4 + JUMP-UNLESS @rc_base_cycle_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- +# name: test_looping_structures[configuration7][quil] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[2] + DECLARE pauli_seed_q1 INTEGER[2] + DECLARE twirled_unitaries_q0 REAL[87] + DECLARE twirled_unitaries_q1 REAL[87] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_seed_index INTEGER[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[2] + DECLARE current_seeds_q1 INTEGER[2] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_seed_index[0] 1 + LABEL @rc_seed_loop + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_seed_loop_inner + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 5 + JUMP-UNLESS @rc_seed_loop_inner break[0] + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + MOVE current_seeds_q0[1] current_seeds_q0[0] + MOVE current_seeds_q1[1] current_seeds_q1[0] + LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] + LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] + ADD rc_seed_index[0] 1 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + GE break[0] rc_seed_index[0] 2 + JUMP-UNLESS @rc_seed_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- +# name: test_looping_structures[configuration8][quil] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[2] + DECLARE pauli_seed_q1 INTEGER[2] + DECLARE twirled_unitaries_q0 REAL[147] + DECLARE twirled_unitaries_q1 REAL[147] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_seed_index INTEGER[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[2] + DECLARE current_seeds_q1 INTEGER[2] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_seed_index[0] 1 + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_base_cycle_loop + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + MOVE current_seeds_q0[1] current_seeds_q0[0] + MOVE current_seeds_q1[1] current_seeds_q1[0] + LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] + LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] + ADD rc_seed_index[0] 1 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 1 + JUMP-UNLESS @rc_base_cycle_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + MOVE current_seeds_q0[1] current_seeds_q0[0] + MOVE current_seeds_q1[1] current_seeds_q1[0] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- +# name: test_randomized_compiling_configuration[configuration0][quil] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[1] + DECLARE pauli_seed_q1 INTEGER[1] + DECLARE twirled_unitaries_q0 REAL[6] + DECLARE twirled_unitaries_q1 REAL[6] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE current_seeds_q0 INTEGER[1] + DECLARE current_seeds_q1 INTEGER[1] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- +# name: test_randomized_compiling_configuration[configuration10][quil] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[3] + DECLARE pauli_seed_q1 INTEGER[3] + DECLARE pauli_seed_q2 INTEGER[3] + DECLARE pauli_seed_q3 INTEGER[3] + DECLARE pauli_seed_q4 INTEGER[3] + DECLARE pauli_seed_q5 INTEGER[3] + DECLARE twirled_unitaries_q0 REAL[153] + DECLARE twirled_unitaries_q1 REAL[153] + DECLARE twirled_unitaries_q2 REAL[153] + DECLARE twirled_unitaries_q3 REAL[153] + DECLARE twirled_unitaries_q4 REAL[153] + DECLARE twirled_unitaries_q5 REAL[153] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_seed_index INTEGER[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[2] + DECLARE current_seeds_q1 INTEGER[2] + DECLARE current_seeds_q2 INTEGER[2] + DECLARE current_seeds_q3 INTEGER[2] + DECLARE current_seeds_q4 INTEGER[2] + DECLARE current_seeds_q5 INTEGER[2] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] + CALL prng_set_seed_and_step pauli_seed_q0[2] pauli_seed_q0[2] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] + CALL prng_set_seed_and_step pauli_seed_q1[2] pauli_seed_q1[2] + CALL prng_set_seed_and_step pauli_seed_q2[0] pauli_seed_q2[0] + CALL prng_set_seed_and_step pauli_seed_q2[1] pauli_seed_q2[1] + CALL prng_set_seed_and_step pauli_seed_q2[2] pauli_seed_q2[2] + CALL prng_set_seed_and_step pauli_seed_q3[0] pauli_seed_q3[0] + CALL prng_set_seed_and_step pauli_seed_q3[1] pauli_seed_q3[1] + CALL prng_set_seed_and_step pauli_seed_q3[2] pauli_seed_q3[2] + CALL prng_set_seed_and_step pauli_seed_q4[0] pauli_seed_q4[0] + CALL prng_set_seed_and_step pauli_seed_q4[1] pauli_seed_q4[1] + CALL prng_set_seed_and_step pauli_seed_q4[2] pauli_seed_q4[2] + CALL prng_set_seed_and_step pauli_seed_q5[0] pauli_seed_q5[0] + CALL prng_set_seed_and_step pauli_seed_q5[1] pauli_seed_q5[1] + CALL prng_set_seed_and_step pauli_seed_q5[2] pauli_seed_q5[2] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE current_seeds_q2[0] pauli_seed_q2[0] + MOVE current_seeds_q3[0] pauli_seed_q3[0] + MOVE current_seeds_q4[0] pauli_seed_q4[0] + MOVE current_seeds_q5[0] pauli_seed_q5[0] + MOVE rc_seed_index[0] 1 + LABEL @rc_seed_loop + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_seed_loop_inner + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 11 + JUMP-UNLESS @rc_seed_loop_inner break[0] + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + MOVE current_seeds_q0[1] current_seeds_q0[0] + MOVE current_seeds_q1[1] current_seeds_q1[0] + MOVE current_seeds_q2[1] current_seeds_q2[0] + MOVE current_seeds_q3[1] current_seeds_q3[0] + MOVE current_seeds_q4[1] current_seeds_q4[0] + MOVE current_seeds_q5[1] current_seeds_q5[0] + LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] + LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] + LOAD current_seeds_q2[0] pauli_seed_q2 rc_seed_index[0] + LOAD current_seeds_q3[0] pauli_seed_q3 rc_seed_index[0] + LOAD current_seeds_q4[0] pauli_seed_q4 rc_seed_index[0] + LOAD current_seeds_q5[0] pauli_seed_q5 rc_seed_index[0] + ADD rc_seed_index[0] 1 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 0 current_seeds_q5[1] 0 + ADD unitary_angle_offset[0] 3 + GE break[0] rc_seed_index[0] 3 + JUMP-UNLESS @rc_seed_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + DELAY 2 0.0002 + DELAY 3 0.0002 + DELAY 4 0.0002 + DELAY 5 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 + FENCE 0 1 2 3 4 5 + + ''' +# --- +# name: test_randomized_compiling_configuration[configuration11][quil] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[3] + DECLARE pauli_seed_q1 INTEGER[3] + DECLARE pauli_seed_q2 INTEGER[3] + DECLARE pauli_seed_q3 INTEGER[3] + DECLARE pauli_seed_q4 INTEGER[3] + DECLARE pauli_seed_q5 INTEGER[3] + DECLARE twirled_unitaries_q0 REAL[165] + DECLARE twirled_unitaries_q1 REAL[165] + DECLARE twirled_unitaries_q2 REAL[165] + DECLARE twirled_unitaries_q3 REAL[165] + DECLARE twirled_unitaries_q4 REAL[165] + DECLARE twirled_unitaries_q5 REAL[165] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_seed_index INTEGER[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[2] + DECLARE current_seeds_q1 INTEGER[2] + DECLARE current_seeds_q2 INTEGER[2] + DECLARE current_seeds_q3 INTEGER[2] + DECLARE current_seeds_q4 INTEGER[2] + DECLARE current_seeds_q5 INTEGER[2] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] + CALL prng_set_seed_and_step pauli_seed_q0[2] pauli_seed_q0[2] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] + CALL prng_set_seed_and_step pauli_seed_q1[2] pauli_seed_q1[2] + CALL prng_set_seed_and_step pauli_seed_q2[0] pauli_seed_q2[0] + CALL prng_set_seed_and_step pauli_seed_q2[1] pauli_seed_q2[1] + CALL prng_set_seed_and_step pauli_seed_q2[2] pauli_seed_q2[2] + CALL prng_set_seed_and_step pauli_seed_q3[0] pauli_seed_q3[0] + CALL prng_set_seed_and_step pauli_seed_q3[1] pauli_seed_q3[1] + CALL prng_set_seed_and_step pauli_seed_q3[2] pauli_seed_q3[2] + CALL prng_set_seed_and_step pauli_seed_q4[0] pauli_seed_q4[0] + CALL prng_set_seed_and_step pauli_seed_q4[1] pauli_seed_q4[1] + CALL prng_set_seed_and_step pauli_seed_q4[2] pauli_seed_q4[2] + CALL prng_set_seed_and_step pauli_seed_q5[0] pauli_seed_q5[0] + CALL prng_set_seed_and_step pauli_seed_q5[1] pauli_seed_q5[1] + CALL prng_set_seed_and_step pauli_seed_q5[2] pauli_seed_q5[2] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE current_seeds_q2[0] pauli_seed_q2[0] + MOVE current_seeds_q3[0] pauli_seed_q3[0] + MOVE current_seeds_q4[0] pauli_seed_q4[0] + MOVE current_seeds_q5[0] pauli_seed_q5[0] + MOVE rc_seed_index[0] 1 + LABEL @rc_seed_loop + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_seed_loop_inner + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 11 + JUMP-UNLESS @rc_seed_loop_inner break[0] + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + MOVE current_seeds_q0[1] current_seeds_q0[0] + MOVE current_seeds_q1[1] current_seeds_q1[0] + MOVE current_seeds_q2[1] current_seeds_q2[0] + MOVE current_seeds_q3[1] current_seeds_q3[0] + MOVE current_seeds_q4[1] current_seeds_q4[0] + MOVE current_seeds_q5[1] current_seeds_q5[0] + LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] + LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] + LOAD current_seeds_q2[0] pauli_seed_q2 rc_seed_index[0] + LOAD current_seeds_q3[0] pauli_seed_q3 rc_seed_index[0] + LOAD current_seeds_q4[0] pauli_seed_q4 rc_seed_index[0] + LOAD current_seeds_q5[0] pauli_seed_q5 rc_seed_index[0] + ADD rc_seed_index[0] 1 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 0 current_seeds_q5[1] 0 + ADD unitary_angle_offset[0] 3 + GE break[0] rc_seed_index[0] 3 + JUMP-UNLESS @rc_seed_loop break[0] + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_base_cycle_loop + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 2 + JUMP-UNLESS @rc_base_cycle_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + DELAY 2 0.0002 + DELAY 3 0.0002 + DELAY 4 0.0002 + DELAY 5 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 + FENCE 0 1 2 3 4 5 + + ''' +# --- +# name: test_randomized_compiling_configuration[configuration12][quil] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[2] + DECLARE pauli_seed_q1 INTEGER[2] + DECLARE pauli_seed_q2 INTEGER[2] + DECLARE pauli_seed_q3 INTEGER[2] + DECLARE pauli_seed_q4 INTEGER[2] + DECLARE pauli_seed_q5 INTEGER[2] + DECLARE twirled_unitaries_q0 REAL[81] + DECLARE twirled_unitaries_q1 REAL[81] + DECLARE twirled_unitaries_q2 REAL[81] + DECLARE twirled_unitaries_q3 REAL[81] + DECLARE twirled_unitaries_q4 REAL[81] + DECLARE twirled_unitaries_q5 REAL[81] + DECLARE modulo_counter INTEGER[1] + DECLARE is_mod_zero BIT[1] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_seed_index INTEGER[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[2] + DECLARE current_seeds_q1 INTEGER[2] + DECLARE current_seeds_q2 INTEGER[2] + DECLARE current_seeds_q3 INTEGER[2] + DECLARE current_seeds_q4 INTEGER[2] + DECLARE current_seeds_q5 INTEGER[2] + ADD modulo_counter[0] 1 + GE is_mod_zero[0] modulo_counter[0] 50 + CALL if_then_else_integer modulo_counter[0] is_mod_zero[0] 0 modulo_counter[0] + JUMP-WHEN @rc_main is_mod_zero[0] + JUMP @pulse_program + LABEL @rc_main + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] + CALL prng_set_seed_and_step pauli_seed_q2[0] pauli_seed_q2[0] + CALL prng_set_seed_and_step pauli_seed_q2[1] pauli_seed_q2[1] + CALL prng_set_seed_and_step pauli_seed_q3[0] pauli_seed_q3[0] + CALL prng_set_seed_and_step pauli_seed_q3[1] pauli_seed_q3[1] + CALL prng_set_seed_and_step pauli_seed_q4[0] pauli_seed_q4[0] + CALL prng_set_seed_and_step pauli_seed_q4[1] pauli_seed_q4[1] + CALL prng_set_seed_and_step pauli_seed_q5[0] pauli_seed_q5[0] + CALL prng_set_seed_and_step pauli_seed_q5[1] pauli_seed_q5[1] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE current_seeds_q2[0] pauli_seed_q2[0] + MOVE current_seeds_q3[0] pauli_seed_q3[0] + MOVE current_seeds_q4[0] pauli_seed_q4[0] + MOVE current_seeds_q5[0] pauli_seed_q5[0] + MOVE rc_seed_index[0] 1 + LABEL @rc_seed_loop + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_seed_loop_inner + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 11 + JUMP-UNLESS @rc_seed_loop_inner break[0] + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + MOVE current_seeds_q0[1] current_seeds_q0[0] + MOVE current_seeds_q1[1] current_seeds_q1[0] + MOVE current_seeds_q2[1] current_seeds_q2[0] + MOVE current_seeds_q3[1] current_seeds_q3[0] + MOVE current_seeds_q4[1] current_seeds_q4[0] + MOVE current_seeds_q5[1] current_seeds_q5[0] + LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] + LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] + LOAD current_seeds_q2[0] pauli_seed_q2 rc_seed_index[0] + LOAD current_seeds_q3[0] pauli_seed_q3 rc_seed_index[0] + LOAD current_seeds_q4[0] pauli_seed_q4 rc_seed_index[0] + LOAD current_seeds_q5[0] pauli_seed_q5 rc_seed_index[0] + ADD rc_seed_index[0] 1 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 0 current_seeds_q5[1] 0 + ADD unitary_angle_offset[0] 3 + GE break[0] rc_seed_index[0] 2 + JUMP-UNLESS @rc_seed_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + DELAY 2 0.0002 + DELAY 3 0.0002 + DELAY 4 0.0002 + DELAY 5 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 + LABEL @pulse_program + DELAY 0 0.0002 + DELAY 1 0.0002 + DELAY 2 0.0002 + DELAY 3 0.0002 + DELAY 4 0.0002 + DELAY 5 0.0002 + + ''' +# --- +# name: test_randomized_compiling_configuration[configuration13][quil] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[2] + DECLARE pauli_seed_q1 INTEGER[2] + DECLARE pauli_seed_q2 INTEGER[2] + DECLARE pauli_seed_q3 INTEGER[2] + DECLARE pauli_seed_q4 INTEGER[2] + DECLARE pauli_seed_q5 INTEGER[2] + DECLARE twirled_unitaries_q0 REAL[81] + DECLARE twirled_unitaries_q1 REAL[81] + DECLARE twirled_unitaries_q2 REAL[81] + DECLARE twirled_unitaries_q3 REAL[81] + DECLARE twirled_unitaries_q4 REAL[81] + DECLARE twirled_unitaries_q5 REAL[81] + DECLARE readout_seed_q0 INTEGER[1] + DECLARE readout_source_unitaries_q0 REAL[36] + DECLARE readout_randomization_q0 REAL[3] + DECLARE readout_seed_q1 INTEGER[1] + DECLARE readout_source_unitaries_q1 REAL[36] + DECLARE readout_randomization_q1 REAL[3] + DECLARE readout_seed_q2 INTEGER[1] + DECLARE readout_source_unitaries_q2 REAL[36] + DECLARE readout_randomization_q2 REAL[3] + DECLARE readout_seed_q3 INTEGER[1] + DECLARE readout_source_unitaries_q3 REAL[36] + DECLARE readout_randomization_q3 REAL[3] + DECLARE readout_seed_q4 INTEGER[1] + DECLARE readout_source_unitaries_q4 REAL[36] + DECLARE readout_randomization_q4 REAL[3] + DECLARE readout_seed_q5 INTEGER[1] + DECLARE readout_source_unitaries_q5 REAL[36] + DECLARE readout_randomization_q5 REAL[3] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_seed_index INTEGER[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[2] + DECLARE current_seeds_q1 INTEGER[2] + DECLARE current_seeds_q2 INTEGER[2] + DECLARE current_seeds_q3 INTEGER[2] + DECLARE current_seeds_q4 INTEGER[2] + DECLARE current_seeds_q5 INTEGER[2] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] + CALL prng_set_seed_and_step pauli_seed_q2[0] pauli_seed_q2[0] + CALL prng_set_seed_and_step pauli_seed_q2[1] pauli_seed_q2[1] + CALL prng_set_seed_and_step pauli_seed_q3[0] pauli_seed_q3[0] + CALL prng_set_seed_and_step pauli_seed_q3[1] pauli_seed_q3[1] + CALL prng_set_seed_and_step pauli_seed_q4[0] pauli_seed_q4[0] + CALL prng_set_seed_and_step pauli_seed_q4[1] pauli_seed_q4[1] + CALL prng_set_seed_and_step pauli_seed_q5[0] pauli_seed_q5[0] + CALL prng_set_seed_and_step pauli_seed_q5[1] pauli_seed_q5[1] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE current_seeds_q2[0] pauli_seed_q2[0] + MOVE current_seeds_q3[0] pauli_seed_q3[0] + MOVE current_seeds_q4[0] pauli_seed_q4[0] + MOVE current_seeds_q5[0] pauli_seed_q5[0] + MOVE rc_seed_index[0] 1 + LABEL @rc_seed_loop + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_seed_loop_inner + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 11 + JUMP-UNLESS @rc_seed_loop_inner break[0] + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + MOVE current_seeds_q0[1] current_seeds_q0[0] + MOVE current_seeds_q1[1] current_seeds_q1[0] + MOVE current_seeds_q2[1] current_seeds_q2[0] + MOVE current_seeds_q3[1] current_seeds_q3[0] + MOVE current_seeds_q4[1] current_seeds_q4[0] + MOVE current_seeds_q5[1] current_seeds_q5[0] + LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] + LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] + LOAD current_seeds_q2[0] pauli_seed_q2 rc_seed_index[0] + LOAD current_seeds_q3[0] pauli_seed_q3 rc_seed_index[0] + LOAD current_seeds_q4[0] pauli_seed_q4 rc_seed_index[0] + LOAD current_seeds_q5[0] pauli_seed_q5 rc_seed_index[0] + ADD rc_seed_index[0] 1 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 0 current_seeds_q5[1] 0 + ADD unitary_angle_offset[0] 3 + GE break[0] rc_seed_index[0] 2 + JUMP-UNLESS @rc_seed_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + DELAY 2 0.0002 + DELAY 3 0.0002 + DELAY 4 0.0002 + DELAY 5 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + CALL choose_random_real_sub_regions readout_randomization_q0 readout_source_unitaries_q0 3 readout_seed_q0[0] + MOVE twirled_unitaries_q0[78] readout_randomization_q0[0] + MOVE twirled_unitaries_q0[79] readout_randomization_q0[1] + MOVE twirled_unitaries_q0[80] readout_randomization_q0[2] + CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q0 twirled_unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 + CALL choose_random_real_sub_regions readout_randomization_q1 readout_source_unitaries_q1 3 readout_seed_q1[0] + MOVE twirled_unitaries_q1[78] readout_randomization_q1[0] + MOVE twirled_unitaries_q1[79] readout_randomization_q1[1] + MOVE twirled_unitaries_q1[80] readout_randomization_q1[2] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 twirled_unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL choose_random_real_sub_regions readout_randomization_q2 readout_source_unitaries_q2 3 readout_seed_q2[0] + MOVE twirled_unitaries_q2[78] readout_randomization_q2[0] + MOVE twirled_unitaries_q2[79] readout_randomization_q2[1] + MOVE twirled_unitaries_q2[80] readout_randomization_q2[2] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q2 twirled_unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL choose_random_real_sub_regions readout_randomization_q3 readout_source_unitaries_q3 3 readout_seed_q3[0] + MOVE twirled_unitaries_q3[78] readout_randomization_q3[0] + MOVE twirled_unitaries_q3[79] readout_randomization_q3[1] + MOVE twirled_unitaries_q3[80] readout_randomization_q3[2] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q3 twirled_unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL choose_random_real_sub_regions readout_randomization_q4 readout_source_unitaries_q4 3 readout_seed_q4[0] + MOVE twirled_unitaries_q4[78] readout_randomization_q4[0] + MOVE twirled_unitaries_q4[79] readout_randomization_q4[1] + MOVE twirled_unitaries_q4[80] readout_randomization_q4[2] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q4 twirled_unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL choose_random_real_sub_regions readout_randomization_q5 readout_source_unitaries_q5 3 readout_seed_q5[0] + MOVE twirled_unitaries_q5[78] readout_randomization_q5[0] + MOVE twirled_unitaries_q5[79] readout_randomization_q5[1] + MOVE twirled_unitaries_q5[80] readout_randomization_q5[2] + CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q5 twirled_unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 + FENCE 0 1 2 3 4 5 + + ''' +# --- +# name: test_randomized_compiling_configuration[configuration14][quil] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[2] + DECLARE pauli_seed_q1 INTEGER[2] + DECLARE pauli_seed_q2 INTEGER[2] + DECLARE pauli_seed_q3 INTEGER[2] + DECLARE pauli_seed_q4 INTEGER[2] + DECLARE pauli_seed_q5 INTEGER[2] + DECLARE twirled_unitaries_q0 REAL[81] + DECLARE twirled_unitaries_q1 REAL[81] + DECLARE twirled_unitaries_q2 REAL[81] + DECLARE twirled_unitaries_q3 REAL[81] + DECLARE twirled_unitaries_q4 REAL[81] + DECLARE twirled_unitaries_q5 REAL[81] + DECLARE modulo_counter INTEGER[1] + DECLARE is_mod_zero BIT[1] + DECLARE readout_seed_q0 INTEGER[1] + DECLARE readout_source_unitaries_q0 REAL[36] + DECLARE readout_randomization_q0 REAL[3] + DECLARE readout_seed_q1 INTEGER[1] + DECLARE readout_source_unitaries_q1 REAL[36] + DECLARE readout_randomization_q1 REAL[3] + DECLARE readout_seed_q2 INTEGER[1] + DECLARE readout_source_unitaries_q2 REAL[36] + DECLARE readout_randomization_q2 REAL[3] + DECLARE readout_seed_q3 INTEGER[1] + DECLARE readout_source_unitaries_q3 REAL[36] + DECLARE readout_randomization_q3 REAL[3] + DECLARE readout_seed_q4 INTEGER[1] + DECLARE readout_source_unitaries_q4 REAL[36] + DECLARE readout_randomization_q4 REAL[3] + DECLARE readout_seed_q5 INTEGER[1] + DECLARE readout_source_unitaries_q5 REAL[36] + DECLARE readout_randomization_q5 REAL[3] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_seed_index INTEGER[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[2] + DECLARE current_seeds_q1 INTEGER[2] + DECLARE current_seeds_q2 INTEGER[2] + DECLARE current_seeds_q3 INTEGER[2] + DECLARE current_seeds_q4 INTEGER[2] + DECLARE current_seeds_q5 INTEGER[2] + ADD modulo_counter[0] 1 + GE is_mod_zero[0] modulo_counter[0] 50 + CALL if_then_else_integer modulo_counter[0] is_mod_zero[0] 0 modulo_counter[0] + JUMP-WHEN @rc_main is_mod_zero[0] + JUMP @pulse_program + LABEL @rc_main + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] + CALL prng_set_seed_and_step pauli_seed_q2[0] pauli_seed_q2[0] + CALL prng_set_seed_and_step pauli_seed_q2[1] pauli_seed_q2[1] + CALL prng_set_seed_and_step pauli_seed_q3[0] pauli_seed_q3[0] + CALL prng_set_seed_and_step pauli_seed_q3[1] pauli_seed_q3[1] + CALL prng_set_seed_and_step pauli_seed_q4[0] pauli_seed_q4[0] + CALL prng_set_seed_and_step pauli_seed_q4[1] pauli_seed_q4[1] + CALL prng_set_seed_and_step pauli_seed_q5[0] pauli_seed_q5[0] + CALL prng_set_seed_and_step pauli_seed_q5[1] pauli_seed_q5[1] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE current_seeds_q2[0] pauli_seed_q2[0] + MOVE current_seeds_q3[0] pauli_seed_q3[0] + MOVE current_seeds_q4[0] pauli_seed_q4[0] + MOVE current_seeds_q5[0] pauli_seed_q5[0] + MOVE rc_seed_index[0] 1 + LABEL @rc_seed_loop + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_seed_loop_inner + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 11 + JUMP-UNLESS @rc_seed_loop_inner break[0] + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + MOVE current_seeds_q0[1] current_seeds_q0[0] + MOVE current_seeds_q1[1] current_seeds_q1[0] + MOVE current_seeds_q2[1] current_seeds_q2[0] + MOVE current_seeds_q3[1] current_seeds_q3[0] + MOVE current_seeds_q4[1] current_seeds_q4[0] + MOVE current_seeds_q5[1] current_seeds_q5[0] + LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] + LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] + LOAD current_seeds_q2[0] pauli_seed_q2 rc_seed_index[0] + LOAD current_seeds_q3[0] pauli_seed_q3 rc_seed_index[0] + LOAD current_seeds_q4[0] pauli_seed_q4 rc_seed_index[0] + LOAD current_seeds_q5[0] pauli_seed_q5 rc_seed_index[0] + ADD rc_seed_index[0] 1 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 0 current_seeds_q5[1] 0 + ADD unitary_angle_offset[0] 3 + GE break[0] rc_seed_index[0] 2 + JUMP-UNLESS @rc_seed_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + DELAY 2 0.0002 + DELAY 3 0.0002 + DELAY 4 0.0002 + DELAY 5 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + CALL choose_random_real_sub_regions readout_randomization_q0 readout_source_unitaries_q0 3 readout_seed_q0[0] + MOVE twirled_unitaries_q0[78] readout_randomization_q0[0] + MOVE twirled_unitaries_q0[79] readout_randomization_q0[1] + MOVE twirled_unitaries_q0[80] readout_randomization_q0[2] + CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q0 twirled_unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 + CALL choose_random_real_sub_regions readout_randomization_q1 readout_source_unitaries_q1 3 readout_seed_q1[0] + MOVE twirled_unitaries_q1[78] readout_randomization_q1[0] + MOVE twirled_unitaries_q1[79] readout_randomization_q1[1] + MOVE twirled_unitaries_q1[80] readout_randomization_q1[2] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 twirled_unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL choose_random_real_sub_regions readout_randomization_q2 readout_source_unitaries_q2 3 readout_seed_q2[0] + MOVE twirled_unitaries_q2[78] readout_randomization_q2[0] + MOVE twirled_unitaries_q2[79] readout_randomization_q2[1] + MOVE twirled_unitaries_q2[80] readout_randomization_q2[2] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q2 twirled_unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL choose_random_real_sub_regions readout_randomization_q3 readout_source_unitaries_q3 3 readout_seed_q3[0] + MOVE twirled_unitaries_q3[78] readout_randomization_q3[0] + MOVE twirled_unitaries_q3[79] readout_randomization_q3[1] + MOVE twirled_unitaries_q3[80] readout_randomization_q3[2] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q3 twirled_unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL choose_random_real_sub_regions readout_randomization_q4 readout_source_unitaries_q4 3 readout_seed_q4[0] + MOVE twirled_unitaries_q4[78] readout_randomization_q4[0] + MOVE twirled_unitaries_q4[79] readout_randomization_q4[1] + MOVE twirled_unitaries_q4[80] readout_randomization_q4[2] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q4 twirled_unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL choose_random_real_sub_regions readout_randomization_q5 readout_source_unitaries_q5 3 readout_seed_q5[0] + MOVE twirled_unitaries_q5[78] readout_randomization_q5[0] + MOVE twirled_unitaries_q5[79] readout_randomization_q5[1] + MOVE twirled_unitaries_q5[80] readout_randomization_q5[2] + CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q5 twirled_unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 + LABEL @pulse_program + DELAY 0 0.0002 + DELAY 1 0.0002 + DELAY 2 0.0002 + DELAY 3 0.0002 + DELAY 4 0.0002 + DELAY 5 0.0002 + + ''' +# --- +# name: test_randomized_compiling_configuration[configuration1][quil] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[1] + DECLARE pauli_seed_q1 INTEGER[1] + DECLARE twirled_unitaries_q0 REAL[9] + DECLARE twirled_unitaries_q1 REAL[9] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[1] + DECLARE current_seeds_q1 INTEGER[1] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_base_cycle_loop + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 1 + JUMP-UNLESS @rc_base_cycle_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- +# name: test_randomized_compiling_configuration[configuration2][quil] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[1] + DECLARE pauli_seed_q1 INTEGER[1] + DECLARE twirled_unitaries_q0 REAL[75] + DECLARE twirled_unitaries_q1 REAL[75] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[1] + DECLARE current_seeds_q1 INTEGER[1] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_base_cycle_loop + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 23 + JUMP-UNLESS @rc_base_cycle_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + FENCE 0 1 + + ''' +# --- +# name: test_randomized_compiling_configuration[configuration3][quil] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[2] + DECLARE pauli_seed_q1 INTEGER[2] + DECLARE twirled_unitaries_q0 REAL[78] + DECLARE twirled_unitaries_q1 REAL[78] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_seed_index INTEGER[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[2] + DECLARE current_seeds_q1 INTEGER[2] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_seed_index[0] 1 + LABEL @rc_seed_loop + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_seed_loop_inner + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 23 + JUMP-UNLESS @rc_seed_loop_inner break[0] + MOVE current_seeds_q0[1] current_seeds_q0[0] + MOVE current_seeds_q1[1] current_seeds_q1[0] + LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] + LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] ADD rc_seed_index[0] 1 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 GE break[0] rc_seed_index[0] 2 JUMP-UNLESS @rc_seed_loop break[0] DELAY 0 0.0002 @@ -195,7 +1960,7 @@ ''' # --- -# name: test_looping_structures[test_case4][quil] +# name: test_randomized_compiling_configuration[configuration4][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -253,7 +2018,7 @@ ''' # --- -# name: test_looping_structures[test_case5][quil] +# name: test_randomized_compiling_configuration[configuration5][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -273,7 +2038,7 @@ DECLARE twirled_unitaries_q1 REAL[87] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] - DECLARE rc_seed_index INTEGER[2] + DECLARE rc_seed_index INTEGER[1] DECLARE rc_base_cycle_loop_index INTEGER[1] DECLARE current_seeds_q0 INTEGER[2] DECLARE current_seeds_q1 INTEGER[2] @@ -306,14 +2071,16 @@ CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 MOVE current_seeds_q0[1] current_seeds_q0[0] MOVE current_seeds_q1[1] current_seeds_q1[0] LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 ADD rc_seed_index[0] 1 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 GE break[0] rc_seed_index[0] 2 JUMP-UNLESS @rc_seed_loop break[0] MOVE rc_base_cycle_loop_index[0] 0 @@ -344,7 +2111,7 @@ ''' # --- -# name: test_looping_structures[test_case6][quil] +# name: test_randomized_compiling_configuration[configuration6][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -422,7 +2189,7 @@ ''' # --- -# name: test_looping_structures[test_case7][quil] +# name: test_randomized_compiling_configuration[configuration7][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -442,7 +2209,7 @@ DECLARE twirled_unitaries_q1 REAL[87] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] - DECLARE rc_seed_index INTEGER[2] + DECLARE rc_seed_index INTEGER[1] DECLARE rc_base_cycle_loop_index INTEGER[1] DECLARE current_seeds_q0 INTEGER[2] DECLARE current_seeds_q1 INTEGER[2] @@ -495,14 +2262,16 @@ CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 MOVE current_seeds_q0[1] current_seeds_q0[0] MOVE current_seeds_q1[1] current_seeds_q1[0] LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 ADD rc_seed_index[0] 1 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 GE break[0] rc_seed_index[0] 2 JUMP-UNLESS @rc_seed_loop break[0] DELAY 0 0.0002 @@ -528,7 +2297,7 @@ ''' # --- -# name: test_looping_structures[test_case8][quil] +# name: test_randomized_compiling_configuration[configuration8][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -542,34 +2311,26 @@ PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" DECLARE pauli_conjugates_map INTEGER[16] - DECLARE pauli_seed_q0 INTEGER[7] - DECLARE pauli_seed_q1 INTEGER[7] - DECLARE twirled_unitaries_q0 REAL[507] - DECLARE twirled_unitaries_q1 REAL[507] + DECLARE pauli_seed_q0 INTEGER[2] + DECLARE pauli_seed_q1 INTEGER[2] + DECLARE twirled_unitaries_q0 REAL[147] + DECLARE twirled_unitaries_q1 REAL[147] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] + DECLARE rc_seed_index INTEGER[1] DECLARE rc_base_cycle_loop_index INTEGER[1] - DECLARE current_seeds_q0 INTEGER[1] - DECLARE current_seeds_q1 INTEGER[1] + DECLARE current_seeds_q0 INTEGER[2] + DECLARE current_seeds_q1 INTEGER[2] CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] - CALL prng_set_seed_and_step pauli_seed_q0[2] pauli_seed_q0[2] - CALL prng_set_seed_and_step pauli_seed_q0[3] pauli_seed_q0[3] - CALL prng_set_seed_and_step pauli_seed_q0[4] pauli_seed_q0[4] - CALL prng_set_seed_and_step pauli_seed_q0[5] pauli_seed_q0[5] - CALL prng_set_seed_and_step pauli_seed_q0[6] pauli_seed_q0[6] CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] - CALL prng_set_seed_and_step pauli_seed_q1[2] pauli_seed_q1[2] - CALL prng_set_seed_and_step pauli_seed_q1[3] pauli_seed_q1[3] - CALL prng_set_seed_and_step pauli_seed_q1[4] pauli_seed_q1[4] - CALL prng_set_seed_and_step pauli_seed_q1[5] pauli_seed_q1[5] - CALL prng_set_seed_and_step pauli_seed_q1[6] pauli_seed_q1[6] CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 MOVE unitary_angle_offset[0] 3 MOVE current_seeds_q0[0] pauli_seed_q0[0] MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_seed_index[0] 1 MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_base_cycle_loop CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map @@ -685,15 +2446,18 @@ CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 MOVE current_seeds_q0[1] current_seeds_q0[0] MOVE current_seeds_q1[1] current_seeds_q1[0] LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 0 pauli_conjugates_map + ADD rc_seed_index[0] 1 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 ADD rc_base_cycle_loop_index[0] 1 - GE break[0] rc_base_cycle_loop_index[0] 6 + GE break[0] rc_base_cycle_loop_index[0] 1 JUMP-UNLESS @rc_base_cycle_loop break[0] DELAY 0 0.0002 DELAY 1 0.0002 @@ -810,13 +2574,127 @@ CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 MOVE current_seeds_q0[1] current_seeds_q0[0] MOVE current_seeds_q1[1] current_seeds_q1[0] - LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] - LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[1] 1 current_seeds_q1[1] 1 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map FENCE 0 1 ''' # --- +# name: test_randomized_compiling_configuration[configuration9][quil] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[1] + DECLARE pauli_seed_q1 INTEGER[1] + DECLARE pauli_seed_q2 INTEGER[1] + DECLARE pauli_seed_q3 INTEGER[1] + DECLARE pauli_seed_q4 INTEGER[1] + DECLARE pauli_seed_q5 INTEGER[1] + DECLARE twirled_unitaries_q0 REAL[33] + DECLARE twirled_unitaries_q1 REAL[33] + DECLARE twirled_unitaries_q2 REAL[33] + DECLARE twirled_unitaries_q3 REAL[33] + DECLARE twirled_unitaries_q4 REAL[33] + DECLARE twirled_unitaries_q5 REAL[33] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[1] + DECLARE current_seeds_q1 INTEGER[1] + DECLARE current_seeds_q2 INTEGER[1] + DECLARE current_seeds_q3 INTEGER[1] + DECLARE current_seeds_q4 INTEGER[1] + DECLARE current_seeds_q5 INTEGER[1] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL prng_set_seed_and_step pauli_seed_q2[0] pauli_seed_q2[0] + CALL prng_set_seed_and_step pauli_seed_q3[0] pauli_seed_q3[0] + CALL prng_set_seed_and_step pauli_seed_q4[0] pauli_seed_q4[0] + CALL prng_set_seed_and_step pauli_seed_q5[0] pauli_seed_q5[0] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE current_seeds_q2[0] pauli_seed_q2[0] + MOVE current_seeds_q3[0] pauli_seed_q3[0] + MOVE current_seeds_q4[0] pauli_seed_q4[0] + MOVE current_seeds_q5[0] pauli_seed_q5[0] + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_base_cycle_loop + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 4 + JUMP-UNLESS @rc_base_cycle_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + DELAY 2 0.0002 + DELAY 3 0.0002 + DELAY 4 0.0002 + DELAY 5 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 + FENCE 0 1 2 3 4 5 + + ''' +# --- diff --git a/test/unit/test_qpu_randomized_compiling.py b/test/unit/test_qpu_randomized_compiling.py index 385909338..25d26d71f 100644 --- a/test/unit/test_qpu_randomized_compiling.py +++ b/test/unit/test_qpu_randomized_compiling.py @@ -5,15 +5,20 @@ randomized compiling implementation. """ +import json +from collections.abc import Sequence from dataclasses import dataclass from itertools import product +from pathlib import Path from typing import Optional import numpy as np import pytest from syrupy.assertion import SnapshotAssertion +from pyquil import Program, gates from pyquil._qpu import randomized_compiling as rc +from pyquil.quilbase import Declare from pyquil.simulation import matrices @@ -91,7 +96,7 @@ def _get_expected_pauli_pair( return seed, rc.PauliLiteral(pauli_value) -_CONFIGURATION_TEST_CASES = [ +_PAULI_FRAME_TRACKING_TEST_CASES = [ # Most basic test case. rc.RandomizedCompilingConfiguration( base_cycles=(((0, 1),),), @@ -115,7 +120,7 @@ def _get_expected_pauli_pair( ] -@pytest.mark.parametrize("configuration", _CONFIGURATION_TEST_CASES) +@pytest.mark.parametrize("configuration", _PAULI_FRAME_TRACKING_TEST_CASES) def test_pauli_frame_tracking(configuration: rc.RandomizedCompilingConfiguration): """Test that `rc.RandomizedCompilingConfiguration.track_pauli_frames` produces the expected tracked Paulis for a given configuration and random seed. @@ -192,7 +197,7 @@ def test_pauli_frame_tracking(configuration: rc.RandomizedCompilingConfiguration ), f"Expected identity for previous Pauli but found {pauli_pair[0]} for qubit {qubit} at layer {layer_index}" -@pytest.mark.parametrize("configuration", _CONFIGURATION_TEST_CASES) +@pytest.mark.parametrize("configuration", _PAULI_FRAME_TRACKING_TEST_CASES) def test_pauli_cache_accumulation(configuration: rc.RandomizedCompilingConfiguration): """Test `rc._PauliSeedAndPairCache.accumulate` against manual accumulation of the tracked Paulis from `configuration.track_pauli_frames`. @@ -250,8 +255,11 @@ def test_pauli_cache_accumulation(configuration: rc.RandomizedCompilingConfigura ), f"Pauli pair mismatch for qubit {qubit} at layer {layer_index}: expected {expected_pauli_pair}, got {pauli_pair}" +_FIXTURE_DIRECTORY = Path(__file__).parent / "__fixtures__" +_FIXTURE_DIRECTORY.mkdir(exist_ok=True) + @dataclass(frozen=True) -class LoopingStructureTestCase: +class ConfigurationTestCase: configuration: rc.RandomizedCompilingConfiguration seed_loop_length: int = 0 seed_loop_inner_length: int = 0 @@ -259,89 +267,251 @@ class LoopingStructureTestCase: _SIMPLE_TEST_CYCLE = ((0, 1),) +_SIMPLE_TEST_QUBITS = (0, 1) -@pytest.mark.parametrize( - "test_case", - [ - LoopingStructureTestCase( - configuration=rc.RandomizedCompilingConfiguration( - base_cycles=(_SIMPLE_TEST_CYCLE,), - qubits_sorted=(0, 1), - base_cycle_repetitions=1, - ), +_ALTERNATING_BASE_CYCLES = (((0, 1), (2, 3), (4, 5)), ((1, 2), (3, 4))) +_ALTERNATING_TEST_QUBITS = tuple(range(6)) + +CONFIGURATION_TEST_SEED = 156_548_857 + +_TETRAHEDRAL_ANGLES = np.array([[ 0.0, 0.5, 0.5], + [-1./4, 0.0, -1./4], + [ 0.0, 0.0, 0.5], + [ 1./4, 0.5, -1./4], + [ 0.0, 1./4, -1./4], + [ 0.5, 1./4, -1./4], + [ 0.5, 1./4, 1./4], + [ 0.0, 1./4, 1./4], + [ -1./4, 1./4, 0.0], + [ 1./4, 1./4, 0.5], + [-1./4, 1./4, 0.5], + [ 1./4, 1./4, 0.0]], dtype=np.float64).flatten().tolist() + +TEST_SHOT_COUNT = 2_500 + +def randomized_readout_angles(qubits: Sequence[int]) -> dict[int, list[float]]: + return {qubit: _TETRAHEDRAL_ANGLES for qubit in qubits} + + +def _sx(qubit: int) -> gates.Gate: + return gates.RX(np.pi / 2, qubit) + + +def _zxzxz(configuration: rc.RandomizedCompilingConfiguration, layer_index: int) -> Program: + program = Program() + for qubit in configuration.qubits_sorted: + program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 0), qubit) + program += _sx(qubit) + program += gates.FENCE(qubit) + + program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 1), qubit) + program += _sx(qubit) + program += gates.FENCE(qubit) + + program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 2), qubit) + return program + + +def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> Program: + program = Program() + cycle_count = configuration.base_cycle_repetitions * len(configuration.base_cycles) + 1 + for qubit in configuration.qubits_sorted: + program += Declare(configuration.variables.source_unitaries(qubit), "REAL", cycle_count * rc._ANGLES_PER_UNITARY) + for rep_index in range(configuration.base_cycle_repetitions): + for base_index, cycle in enumerate(configuration.base_cycles): + layer_index = rep_index * len(configuration.base_cycles) + base_index + program += _zxzxz(configuration, layer_index) + for edge in cycle: + program += gates.CZ(edge[0], edge[1]) + program += gates.FENCE(edge[0], edge[1]) + + program += _zxzxz(configuration, configuration.base_cycle_repetitions * len(configuration.base_cycles)) + + return program + + +CONFIGURATION_TEST_CASES: list[ConfigurationTestCase] = [ + # 0) simple base case; no loops required (single base cycle) + ConfigurationTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,), + qubits_sorted=(0, 1), + base_cycle_repetitions=1, ), - LoopingStructureTestCase( - configuration=rc.RandomizedCompilingConfiguration( - base_cycles=(_SIMPLE_TEST_CYCLE,), - qubits_sorted=(0, 1), - base_cycle_repetitions=2, - ), - base_cycle_loop_length=1 + ), + # 1) base cycle loop only (single base cycle) + ConfigurationTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,), + qubits_sorted=(0, 1), + base_cycle_repetitions=2, ), - LoopingStructureTestCase( - configuration=rc.RandomizedCompilingConfiguration( - base_cycles=(_SIMPLE_TEST_CYCLE,), - qubits_sorted=(0, 1), - base_cycle_repetitions=24, - ), - base_cycle_loop_length=23 + base_cycle_loop_length=1 + ), + # 2) base cycle loop with maximum iterations (single base cycle) + ConfigurationTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,), + qubits_sorted=(0, 1), + base_cycle_repetitions=24, ), - LoopingStructureTestCase( - configuration=rc.RandomizedCompilingConfiguration( - base_cycles=(_SIMPLE_TEST_CYCLE,), - qubits_sorted=(0, 1), - base_cycle_repetitions=25, - ), - seed_loop_length=1, - seed_loop_inner_length=23, + base_cycle_loop_length=23 + ), + # 3) seed loop required (single base cycle) + ConfigurationTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,), + qubits_sorted=(0, 1), + base_cycle_repetitions=25, ), - LoopingStructureTestCase( - configuration=rc.RandomizedCompilingConfiguration( - base_cycles=(_SIMPLE_TEST_CYCLE,) * 2, - qubits_sorted=(0, 1), - base_cycle_repetitions=12, - ), - base_cycle_loop_length=11 + seed_loop_length=1, + seed_loop_inner_length=23, + ), + # 4) base cycle loop only (two base cycles) + ConfigurationTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,) * 2, + qubits_sorted=(0, 1), + base_cycle_repetitions=12, ), - LoopingStructureTestCase( - configuration=rc.RandomizedCompilingConfiguration( - base_cycles=(_SIMPLE_TEST_CYCLE,) * 2, - qubits_sorted=(0, 1), - base_cycle_repetitions=14, - ), - seed_loop_length=1, - seed_loop_inner_length=11, - base_cycle_loop_length=1 + base_cycle_loop_length=11 + ), + # 5) seed loop required + base cycle loop (two base cycles) + ConfigurationTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,) * 2, + qubits_sorted=(0, 1), + base_cycle_repetitions=14, ), - LoopingStructureTestCase( - configuration=rc.RandomizedCompilingConfiguration( - base_cycles=(_SIMPLE_TEST_CYCLE,) * 4, - qubits_sorted=(0, 1), - base_cycle_repetitions=5, - ), - base_cycle_loop_length=4 + seed_loop_length=1, + seed_loop_inner_length=11, + base_cycle_loop_length=1 + ), + # 6) base cycle loop only (four base cycles) + ConfigurationTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,) * 4, + qubits_sorted=(0, 1), + base_cycle_repetitions=5, ), - LoopingStructureTestCase( - configuration=rc.RandomizedCompilingConfiguration( - base_cycles=(_SIMPLE_TEST_CYCLE,) * 4, - qubits_sorted=(0, 1), - base_cycle_repetitions=7, - ), - seed_loop_length=1, - seed_loop_inner_length=5, + base_cycle_loop_length=4 + ), + # 7) seed loop required + base cycle loop (four base cycles) + ConfigurationTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,) * 4, + qubits_sorted=(0, 1), + base_cycle_repetitions=7, + ), + seed_loop_length=1, + seed_loop_inner_length=5, + ), + # 8) base cycle length >= max Paulis per value (i.e. seed transition within base cycle) + ConfigurationTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=(_SIMPLE_TEST_CYCLE,) * rc._MAX_PAULIS_PER_VALUE, + qubits_sorted=(0, 1), + base_cycle_repetitions=2, + ), + base_cycle_loop_length=1, + ), + # 9) 4 looped base cycles + final base cycle. + ConfigurationTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=_ALTERNATING_BASE_CYCLES, + qubits_sorted=_ALTERNATING_TEST_QUBITS, + base_cycle_repetitions=5, + ), + base_cycle_loop_length=4 + ), + # 10) 2 seed loop iterations + final base cycle. + ConfigurationTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=_ALTERNATING_BASE_CYCLES, + qubits_sorted=_ALTERNATING_TEST_QUBITS, + base_cycle_repetitions=25, + ), + seed_loop_length=2, + seed_loop_inner_length=11, + ), + # 11) 2 seed loop iterations + 2 base cycle iterations + final base cycle. + ConfigurationTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=_ALTERNATING_BASE_CYCLES, + qubits_sorted=_ALTERNATING_TEST_QUBITS, + base_cycle_repetitions=27, + ), + seed_loop_length=2, + seed_loop_inner_length=11, + base_cycle_loop_length=2, + ), + # 12)seed loop with shots per randomization. + ConfigurationTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=_ALTERNATING_BASE_CYCLES, + qubits_sorted=_ALTERNATING_TEST_QUBITS, + base_cycle_repetitions=13, + shots_per_randomization=rc.ShotsPerRandomization( + shots_per_randomization=50, + ) + ), + seed_loop_length=1, + seed_loop_inner_length=11, + ), + # 13) seed loop with readout randomization + ConfigurationTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=_ALTERNATING_BASE_CYCLES, + qubits_sorted=_ALTERNATING_TEST_QUBITS, + base_cycle_repetitions=13, + readout_randomization=rc.ReadoutRandomization( + source_unitary_angles=randomized_readout_angles(_ALTERNATING_TEST_QUBITS), + ) ), - LoopingStructureTestCase( - configuration=rc.RandomizedCompilingConfiguration( - base_cycles=(_SIMPLE_TEST_CYCLE,) * rc._MAX_PAULIS_PER_VALUE, - qubits_sorted=(0, 1), - base_cycle_repetitions=7, + seed_loop_length=1, + seed_loop_inner_length=11, + ), + # 14) seed loop with shots per randomization and readout randomization + ConfigurationTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=_ALTERNATING_BASE_CYCLES, + qubits_sorted=_ALTERNATING_TEST_QUBITS, + base_cycle_repetitions=13, + shots_per_randomization=rc.ShotsPerRandomization( + shots_per_randomization=50, ), - base_cycle_loop_length=6, + readout_randomization=rc.ReadoutRandomization( + source_unitary_angles=randomized_readout_angles(_ALTERNATING_TEST_QUBITS), + ) ), - ], + seed_loop_length=1, + seed_loop_inner_length=11, + ), +] + + +def generate_source_unitaries(configuration: rc.RandomizedCompilingConfiguration, rng: np.random.Generator) -> dict[str, list[float]]: + source_unitaries = {} + cycle_count = configuration.base_cycle_repetitions * len(configuration.base_cycles) + 1 + for qubit in configuration.qubits_sorted: + source_unitaries[configuration.variables.source_unitaries(qubit)] = rng.uniform(-0.5, 0.5, size=rc._ANGLES_PER_UNITARY * cycle_count).tolist() + return source_unitaries + +@pytest.mark.parametrize( + "test_case", + CONFIGURATION_TEST_CASES, + ids=[f"configuration{i}" for i in range(len(CONFIGURATION_TEST_CASES))] ) -def test_looping_structures(test_case: LoopingStructureTestCase, snapshot: SnapshotAssertion): - """Test that the provided configuration matches expectations for the loop structure.""" +def test_randomized_compiling_configuration( + test_case: ConfigurationTestCase, + snapshot: SnapshotAssertion, + request: pytest.FixtureRequest +): + """Test that the provided configuration for loop parameters, program structure, and final memory validation. + + The final memory fixtures are produced from real programs on the QPU. Should these require update, you can + run `test/e2e/test_qpu_randomized_compiling.py` to read the final memory and then manually update the files. + """ assert test_case.configuration._seed_loop_length == test_case.seed_loop_length assert test_case.configuration._seed_loop_inner_length == test_case.seed_loop_inner_length assert test_case.configuration._base_cycle_loop_length == test_case.base_cycle_loop_length @@ -353,5 +523,24 @@ def test_looping_structures(test_case: LoopingStructureTestCase, snapshot: Snaps completed_u2_cycles = completed_base_cycles * len(test_case.configuration.base_cycles) + 1 assert expected_total_u2_cycles == completed_u2_cycles - assert test_case.configuration.build_quil_program().out() == snapshot(name="quil") + program = test_case.configuration.build_quil_program() + + assert program.out() == snapshot(name="quil") + program += build_cycle_program(test_case.configuration) + + rng = np.random.default_rng(seed=CONFIGURATION_TEST_SEED) + random_seeds = test_case.configuration.generate_seed_values(rng) + memory_map = test_case.configuration.build_memory_map( + random_seeds, + rc.build_memory_values_for_paulis_conjugates_map(rc.PAULI_CONJUGATES_MAPS["CZ"]) + ) + memory_map.update(generate_source_unitaries(test_case.configuration, rng)) + with open(_FIXTURE_DIRECTORY / f"{request.node.name}.json") as f: + final_memory = json.load(f) + test_case.configuration.verify_final_memory( + final_memory, + memory_map, + TEST_SHOT_COUNT, + rc.PAULI_CONJUGATES_MAPS["CZ"], + ) From 11e00a3541b4e107f11a18dc8fd1f50e54bffcff Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 16 Jun 2026 10:37:58 -0700 Subject: [PATCH 41/59] chore: ignore ruff cache --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 52e3f472e..cc79d1c01 100644 --- a/.gitignore +++ b/.gitignore @@ -184,6 +184,8 @@ fabric.properties ### MyPi ### .mypy_cache +.ruff_cache + ### VSCode ### **/.vscode/ From 372b189bd9be60c3b6200b7491c9982ff4d155a5 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 16 Jun 2026 10:38:15 -0700 Subject: [PATCH 42/59] test: support live qpu access via command line --- test/e2e/conftest.py | 40 +++++++++++++++++++++++++++++++++------- test/unit/conftest.py | 2 +- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/test/e2e/conftest.py b/test/e2e/conftest.py index 15b2f0be2..f33c9c6a9 100644 --- a/test/e2e/conftest.py +++ b/test/e2e/conftest.py @@ -9,13 +9,30 @@ from .. import override_qcs_config -@pytest.fixture() -def qc(client_configuration: QCSClient) -> QuantumComputer: - quantum_processor_id = os.environ.get("TEST_QUANTUM_PROCESSOR") +def pytest_addoption(parser: pytest.Parser): + """Add command line option to skip tests marked integration""" + parser.addoption( + "--live-qpu-access", + action="store_true", + default=False, + help="run tests that require access to a live QPU", + ) + + +def pytest_configure(config: pytest.Config): + """Register custom marker 'live_qpu_access'""" + config.addinivalue_line( + "markers", + "live_qpu_access: mark test as requiring live access to a QPU for execution", + ) - if quantum_processor_id is None: - raise Exception("'TEST_QUANTUM_PROCESSOR' env var required for e2e tests.") +@pytest.fixture(scope="session") +def quantum_processor_id() -> str: + return os.environ.get("TEST_QUANTUM_PROCESSOR", "Cepheus-1-108Q") + +@pytest.fixture() +def qc(client_configuration: QCSClient, quantum_processor_id: str) -> QuantumComputer: return get_qc( quantum_processor_id, client_configuration=client_configuration, @@ -23,6 +40,15 @@ def qc(client_configuration: QCSClient) -> QuantumComputer: @pytest.fixture() -def client_configuration() -> QCSClient: - override_qcs_config() +def client_configuration(live_qpu_access: bool) -> QCSClient: + if not live_qpu_access: + override_qcs_config() return QCSClient.load() + + +@pytest.fixture(scope="session") +def live_qpu_access(request: pytest.FixtureRequest) -> bool: + return ( + request.config.getoption("--live-qpu-access") is not None + and request.config.getoption("--live-qpu-access") is not False + ) diff --git a/test/unit/conftest.py b/test/unit/conftest.py index fcb8d236a..42fabc78a 100644 --- a/test/unit/conftest.py +++ b/test/unit/conftest.py @@ -27,7 +27,7 @@ from .. import override_qcs_config TEST_DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "data") -override_qcs_config() +# FIXME: override_qcs_config() @pytest.fixture From f45d1163dc72bb20136bf854ebcd29d621476e32 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 16 Jun 2026 10:39:30 -0700 Subject: [PATCH 43/59] docs: add live qpu tests to pr checklist --- .github/PULL_REQUEST_TEMPLATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2c20dbe64..75dc8f5e8 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -10,6 +10,7 @@ Insert your PR description here. Thanks for [contributing][contributing] to pyQu - [ ] All changes to code are covered via unit tests. - [ ] Parameters and return values have type hints with [PEP 484 syntax][pep-484]. - [ ] Functions and classes have useful [Sphinx-style][sphinx] docstrings. +- [ ] Live QPU tests have run via `pytest test --live-qpu-access` by myself or a reviewer. - [ ] (New Feature) The [docs][docs] have been updated accordingly. - [ ] (Bugfix) The associated issue is referenced above using [auto-close keywords][auto-close]. From 9556795727c9081cfbdcabf55d562ab011f76af7 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 16 Jun 2026 10:40:53 -0700 Subject: [PATCH 44/59] chore: bump release candidate --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ed650ee26..7f0a1ea74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pyquil" -version = "4.18.0-rc.1" +version = "4.18.0-rc.2" description = "A Python library for creating Quantum Instruction Language (Quil) programs." authors = ["Rigetti Computing "] readme = "README.md" From a8b0c0a08429fda795b40779d7dd463f414ae816 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 16 Jun 2026 10:47:33 -0700 Subject: [PATCH 45/59] chore: add bleach to osv scanner ignore --- .osv-scanner.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.osv-scanner.toml b/.osv-scanner.toml index bb2601863..d93ccc821 100644 --- a/.osv-scanner.toml +++ b/.osv-scanner.toml @@ -58,3 +58,11 @@ reason = "urllib3 2.6.3 only resolved for python <3.11 (docs extra); fix require [[IgnoredVulns]] id = "GHSA-qccp-gfcp-xxvc" reason = "urllib3 2.6.3 only resolved for python <3.11 (docs extra); fix requires dropping python 3.9 support" + +[[IgnoredVulns]] +id = "GHSA-8rfp-98v4-mmr6" +reason = "bleach update requires python >= 3.10" + +[[IgnoredVulns]] +id = "GHSA-gj48-438w-jh9v" +reason = "bleach update requires python >= 3.10" From 695e52e127aded53e606f7c68cc24ffdf03245bf Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 16 Jun 2026 10:52:20 -0700 Subject: [PATCH 46/59] chore: delete obsolete syrupy snapshots --- .../test_qpu_randomized_compiling.ambr | 820 ------------------ 1 file changed, 820 deletions(-) diff --git a/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr index d137d7890..66757ca0a 100644 --- a/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr +++ b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr @@ -1,824 +1,4 @@ # serializer version: 1 -# name: test_looping_structures[configuration0][quil] - ''' - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" - PRAGMA EXTERN prng_step "INTEGER" - PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" - PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" - PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" - DECLARE pauli_conjugates_map INTEGER[16] - DECLARE pauli_seed_q0 INTEGER[1] - DECLARE pauli_seed_q1 INTEGER[1] - DECLARE twirled_unitaries_q0 REAL[6] - DECLARE twirled_unitaries_q1 REAL[6] - DECLARE unitary_angle_offset INTEGER[1] - DECLARE break BIT[1] - DECLARE current_seeds_q0 INTEGER[1] - DECLARE current_seeds_q1 INTEGER[1] - DELAY 0 0.0002 - DELAY 1 0.0002 - CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] - CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 - MOVE unitary_angle_offset[0] 3 - MOVE current_seeds_q0[0] pauli_seed_q0[0] - MOVE current_seeds_q1[0] pauli_seed_q1[0] - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - FENCE 0 1 - - ''' -# --- -# name: test_looping_structures[configuration1][quil] - ''' - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" - PRAGMA EXTERN prng_step "INTEGER" - PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" - PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" - PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" - DECLARE pauli_conjugates_map INTEGER[16] - DECLARE pauli_seed_q0 INTEGER[1] - DECLARE pauli_seed_q1 INTEGER[1] - DECLARE twirled_unitaries_q0 REAL[9] - DECLARE twirled_unitaries_q1 REAL[9] - DECLARE unitary_angle_offset INTEGER[1] - DECLARE break BIT[1] - DECLARE rc_base_cycle_loop_index INTEGER[1] - DECLARE current_seeds_q0 INTEGER[1] - DECLARE current_seeds_q1 INTEGER[1] - CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] - CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 - MOVE unitary_angle_offset[0] 3 - MOVE current_seeds_q0[0] pauli_seed_q0[0] - MOVE current_seeds_q1[0] pauli_seed_q1[0] - MOVE rc_base_cycle_loop_index[0] 0 - LABEL @rc_base_cycle_loop - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - ADD rc_base_cycle_loop_index[0] 1 - GE break[0] rc_base_cycle_loop_index[0] 1 - JUMP-UNLESS @rc_base_cycle_loop break[0] - DELAY 0 0.0002 - DELAY 1 0.0002 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - FENCE 0 1 - - ''' -# --- -# name: test_looping_structures[configuration2][quil] - ''' - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" - PRAGMA EXTERN prng_step "INTEGER" - PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" - PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" - PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" - DECLARE pauli_conjugates_map INTEGER[16] - DECLARE pauli_seed_q0 INTEGER[1] - DECLARE pauli_seed_q1 INTEGER[1] - DECLARE twirled_unitaries_q0 REAL[75] - DECLARE twirled_unitaries_q1 REAL[75] - DECLARE unitary_angle_offset INTEGER[1] - DECLARE break BIT[1] - DECLARE rc_base_cycle_loop_index INTEGER[1] - DECLARE current_seeds_q0 INTEGER[1] - DECLARE current_seeds_q1 INTEGER[1] - CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] - CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 - MOVE unitary_angle_offset[0] 3 - MOVE current_seeds_q0[0] pauli_seed_q0[0] - MOVE current_seeds_q1[0] pauli_seed_q1[0] - MOVE rc_base_cycle_loop_index[0] 0 - LABEL @rc_base_cycle_loop - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - ADD rc_base_cycle_loop_index[0] 1 - GE break[0] rc_base_cycle_loop_index[0] 23 - JUMP-UNLESS @rc_base_cycle_loop break[0] - DELAY 0 0.0002 - DELAY 1 0.0002 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - FENCE 0 1 - - ''' -# --- -# name: test_looping_structures[configuration3][quil] - ''' - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" - PRAGMA EXTERN prng_step "INTEGER" - PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" - PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" - PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" - DECLARE pauli_conjugates_map INTEGER[16] - DECLARE pauli_seed_q0 INTEGER[2] - DECLARE pauli_seed_q1 INTEGER[2] - DECLARE twirled_unitaries_q0 REAL[78] - DECLARE twirled_unitaries_q1 REAL[78] - DECLARE unitary_angle_offset INTEGER[1] - DECLARE break BIT[1] - DECLARE rc_seed_index INTEGER[1] - DECLARE rc_base_cycle_loop_index INTEGER[1] - DECLARE current_seeds_q0 INTEGER[2] - DECLARE current_seeds_q1 INTEGER[2] - CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] - CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] - CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] - CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 - MOVE unitary_angle_offset[0] 3 - MOVE current_seeds_q0[0] pauli_seed_q0[0] - MOVE current_seeds_q1[0] pauli_seed_q1[0] - MOVE rc_seed_index[0] 1 - LABEL @rc_seed_loop - MOVE rc_base_cycle_loop_index[0] 0 - LABEL @rc_seed_loop_inner - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - ADD rc_base_cycle_loop_index[0] 1 - GE break[0] rc_base_cycle_loop_index[0] 23 - JUMP-UNLESS @rc_seed_loop_inner break[0] - MOVE current_seeds_q0[1] current_seeds_q0[0] - MOVE current_seeds_q1[1] current_seeds_q1[0] - LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] - LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] - ADD rc_seed_index[0] 1 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - GE break[0] rc_seed_index[0] 2 - JUMP-UNLESS @rc_seed_loop break[0] - DELAY 0 0.0002 - DELAY 1 0.0002 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - FENCE 0 1 - - ''' -# --- -# name: test_looping_structures[configuration4][quil] - ''' - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" - PRAGMA EXTERN prng_step "INTEGER" - PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" - PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" - PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" - DECLARE pauli_conjugates_map INTEGER[16] - DECLARE pauli_seed_q0 INTEGER[1] - DECLARE pauli_seed_q1 INTEGER[1] - DECLARE twirled_unitaries_q0 REAL[75] - DECLARE twirled_unitaries_q1 REAL[75] - DECLARE unitary_angle_offset INTEGER[1] - DECLARE break BIT[1] - DECLARE rc_base_cycle_loop_index INTEGER[1] - DECLARE current_seeds_q0 INTEGER[1] - DECLARE current_seeds_q1 INTEGER[1] - CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] - CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 - MOVE unitary_angle_offset[0] 3 - MOVE current_seeds_q0[0] pauli_seed_q0[0] - MOVE current_seeds_q1[0] pauli_seed_q1[0] - MOVE rc_base_cycle_loop_index[0] 0 - LABEL @rc_base_cycle_loop - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - ADD rc_base_cycle_loop_index[0] 1 - GE break[0] rc_base_cycle_loop_index[0] 11 - JUMP-UNLESS @rc_base_cycle_loop break[0] - DELAY 0 0.0002 - DELAY 1 0.0002 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - FENCE 0 1 - - ''' -# --- -# name: test_looping_structures[configuration5][quil] - ''' - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" - PRAGMA EXTERN prng_step "INTEGER" - PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" - PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" - PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" - DECLARE pauli_conjugates_map INTEGER[16] - DECLARE pauli_seed_q0 INTEGER[2] - DECLARE pauli_seed_q1 INTEGER[2] - DECLARE twirled_unitaries_q0 REAL[87] - DECLARE twirled_unitaries_q1 REAL[87] - DECLARE unitary_angle_offset INTEGER[1] - DECLARE break BIT[1] - DECLARE rc_seed_index INTEGER[1] - DECLARE rc_base_cycle_loop_index INTEGER[1] - DECLARE current_seeds_q0 INTEGER[2] - DECLARE current_seeds_q1 INTEGER[2] - CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] - CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] - CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] - CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 - MOVE unitary_angle_offset[0] 3 - MOVE current_seeds_q0[0] pauli_seed_q0[0] - MOVE current_seeds_q1[0] pauli_seed_q1[0] - MOVE rc_seed_index[0] 1 - LABEL @rc_seed_loop - MOVE rc_base_cycle_loop_index[0] 0 - LABEL @rc_seed_loop_inner - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - ADD rc_base_cycle_loop_index[0] 1 - GE break[0] rc_base_cycle_loop_index[0] 11 - JUMP-UNLESS @rc_seed_loop_inner break[0] - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - MOVE current_seeds_q0[1] current_seeds_q0[0] - MOVE current_seeds_q1[1] current_seeds_q1[0] - LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] - LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] - ADD rc_seed_index[0] 1 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - GE break[0] rc_seed_index[0] 2 - JUMP-UNLESS @rc_seed_loop break[0] - MOVE rc_base_cycle_loop_index[0] 0 - LABEL @rc_base_cycle_loop - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - ADD rc_base_cycle_loop_index[0] 1 - GE break[0] rc_base_cycle_loop_index[0] 1 - JUMP-UNLESS @rc_base_cycle_loop break[0] - DELAY 0 0.0002 - DELAY 1 0.0002 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - FENCE 0 1 - - ''' -# --- -# name: test_looping_structures[configuration6][quil] - ''' - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" - PRAGMA EXTERN prng_step "INTEGER" - PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" - PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" - PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" - DECLARE pauli_conjugates_map INTEGER[16] - DECLARE pauli_seed_q0 INTEGER[1] - DECLARE pauli_seed_q1 INTEGER[1] - DECLARE twirled_unitaries_q0 REAL[63] - DECLARE twirled_unitaries_q1 REAL[63] - DECLARE unitary_angle_offset INTEGER[1] - DECLARE break BIT[1] - DECLARE rc_base_cycle_loop_index INTEGER[1] - DECLARE current_seeds_q0 INTEGER[1] - DECLARE current_seeds_q1 INTEGER[1] - CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] - CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 - MOVE unitary_angle_offset[0] 3 - MOVE current_seeds_q0[0] pauli_seed_q0[0] - MOVE current_seeds_q1[0] pauli_seed_q1[0] - MOVE rc_base_cycle_loop_index[0] 0 - LABEL @rc_base_cycle_loop - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - ADD rc_base_cycle_loop_index[0] 1 - GE break[0] rc_base_cycle_loop_index[0] 4 - JUMP-UNLESS @rc_base_cycle_loop break[0] - DELAY 0 0.0002 - DELAY 1 0.0002 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - FENCE 0 1 - - ''' -# --- -# name: test_looping_structures[configuration7][quil] - ''' - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" - PRAGMA EXTERN prng_step "INTEGER" - PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" - PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" - PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" - DECLARE pauli_conjugates_map INTEGER[16] - DECLARE pauli_seed_q0 INTEGER[2] - DECLARE pauli_seed_q1 INTEGER[2] - DECLARE twirled_unitaries_q0 REAL[87] - DECLARE twirled_unitaries_q1 REAL[87] - DECLARE unitary_angle_offset INTEGER[1] - DECLARE break BIT[1] - DECLARE rc_seed_index INTEGER[1] - DECLARE rc_base_cycle_loop_index INTEGER[1] - DECLARE current_seeds_q0 INTEGER[2] - DECLARE current_seeds_q1 INTEGER[2] - CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] - CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] - CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] - CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 - MOVE unitary_angle_offset[0] 3 - MOVE current_seeds_q0[0] pauli_seed_q0[0] - MOVE current_seeds_q1[0] pauli_seed_q1[0] - MOVE rc_seed_index[0] 1 - LABEL @rc_seed_loop - MOVE rc_base_cycle_loop_index[0] 0 - LABEL @rc_seed_loop_inner - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - ADD rc_base_cycle_loop_index[0] 1 - GE break[0] rc_base_cycle_loop_index[0] 5 - JUMP-UNLESS @rc_seed_loop_inner break[0] - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - MOVE current_seeds_q0[1] current_seeds_q0[0] - MOVE current_seeds_q1[1] current_seeds_q1[0] - LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] - LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] - ADD rc_seed_index[0] 1 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - GE break[0] rc_seed_index[0] 2 - JUMP-UNLESS @rc_seed_loop break[0] - DELAY 0 0.0002 - DELAY 1 0.0002 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - FENCE 0 1 - - ''' -# --- -# name: test_looping_structures[configuration8][quil] - ''' - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" - PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" - PRAGMA EXTERN prng_step "INTEGER" - PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" - PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" - PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" - DECLARE pauli_conjugates_map INTEGER[16] - DECLARE pauli_seed_q0 INTEGER[2] - DECLARE pauli_seed_q1 INTEGER[2] - DECLARE twirled_unitaries_q0 REAL[147] - DECLARE twirled_unitaries_q1 REAL[147] - DECLARE unitary_angle_offset INTEGER[1] - DECLARE break BIT[1] - DECLARE rc_seed_index INTEGER[1] - DECLARE rc_base_cycle_loop_index INTEGER[1] - DECLARE current_seeds_q0 INTEGER[2] - DECLARE current_seeds_q1 INTEGER[2] - CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] - CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] - CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] - CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 - MOVE unitary_angle_offset[0] 3 - MOVE current_seeds_q0[0] pauli_seed_q0[0] - MOVE current_seeds_q1[0] pauli_seed_q1[0] - MOVE rc_seed_index[0] 1 - MOVE rc_base_cycle_loop_index[0] 0 - LABEL @rc_base_cycle_loop - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - MOVE current_seeds_q0[1] current_seeds_q0[0] - MOVE current_seeds_q1[1] current_seeds_q1[0] - LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] - LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] - ADD rc_seed_index[0] 1 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - ADD rc_base_cycle_loop_index[0] 1 - GE break[0] rc_base_cycle_loop_index[0] 1 - JUMP-UNLESS @rc_base_cycle_loop break[0] - DELAY 0 0.0002 - DELAY 1 0.0002 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - ADD unitary_angle_offset[0] 3 - SHR current_seeds_q0[0] 2 - SHR current_seeds_q1[0] 2 - MOVE current_seeds_q0[1] current_seeds_q0[0] - MOVE current_seeds_q1[1] current_seeds_q1[0] - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map - FENCE 0 1 - - ''' -# --- # name: test_randomized_compiling_configuration[configuration0][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" From 513e5eb0bc894a4dec628b35e4a184e8b2ec4b9b Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 16 Jun 2026 11:04:10 -0700 Subject: [PATCH 47/59] ci: force github rerun failed jobs From dfec527283c3057aa6fdc2f82019934e308ae087 Mon Sep 17 00:00:00 2001 From: Eric Hulburd <3526083+erichulburd@users.noreply.github.com> Date: Tue, 16 Jun 2026 13:24:37 -0700 Subject: [PATCH 48/59] test: revert override qcs config comment --- test/unit/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/conftest.py b/test/unit/conftest.py index 42fabc78a..fcb8d236a 100644 --- a/test/unit/conftest.py +++ b/test/unit/conftest.py @@ -27,7 +27,7 @@ from .. import override_qcs_config TEST_DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "data") -# FIXME: override_qcs_config() +override_qcs_config() @pytest.fixture From 01f376eeac83a7913f5c7724fb4937250325f8bb Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 16 Jun 2026 11:14:06 -0700 Subject: [PATCH 49/59] chore: bump release candidate version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7f0a1ea74..868466e9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pyquil" -version = "4.18.0-rc.2" +version = "4.18.0-rc.3" description = "A Python library for creating Quantum Instruction Language (Quil) programs." authors = ["Rigetti Computing "] readme = "README.md" From bca91094e6f3f91a6bbd17c15bfa5fb964f03280 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Wed, 17 Jun 2026 12:14:22 -0700 Subject: [PATCH 50/59] refactor: support non-twirled qubits --- pyquil/_qpu/randomized_compiling.py | 133 ++++++++++------ .../test_qpu_randomized_compiling.ambr | 145 ++++++++++++++++++ test/unit/conftest.py | 2 - test/unit/test_qpu_randomized_compiling.py | 109 +++++++------ 4 files changed, 287 insertions(+), 102 deletions(-) diff --git a/pyquil/_qpu/randomized_compiling.py b/pyquil/_qpu/randomized_compiling.py index 65e0a876d..8da9855d4 100644 --- a/pyquil/_qpu/randomized_compiling.py +++ b/pyquil/_qpu/randomized_compiling.py @@ -68,30 +68,60 @@ @dataclass(frozen=True) -class _TwoQubitCycle: - data: dict[int, _TEdge] = field(default_factory=dict) +class _TwirledCycle: + """A representation of all two and single qubit gates that require twirling within a given cycle. - def add_edge(self, edge: _TEdge) -> None: - if edge[0] in self.data or edge[1] in self.data: - raise ValueError(f"edge {edge} overlaps with existing edges in cycle") - self.data[edge[0]] = edge - self.data[edge[1]] = edge + Single qubit gates are presumed to be the identity and, therefore, will be sandwiched by the same + Pauli. Any qubit not in neither `two_qubit_gates` nor `idle_qubits` may otherwise be assumed + untwirled. - def __getitem__(self, node: int) -> _TEdge: - return self.data[node] + Any given qubit may be present only either in `two_qubit_gates` or `idle_qubits`. + """ + + two_qubit_gates: Mapping[int, _TEdge] + """Two qubit gate which must be twirled in the cycle.""" + + idle_qubits: frozenset[int] + """Qubits on which the single qubit identity gate is played during the cycle.""" + + def __post_init__(self) -> None: + self._validate() + + def _validate(self): + for qubit in self.all_qubits: + if qubit in self.two_qubit_gates and qubit in self.idle_qubits: + raise ValueError(f"qubit {qubit} is configured as both an edge and idle qubit") + + def __getitem__(self, node: int) -> Union[_TEdge, int]: + if node in self.idle_qubits: + return node + elif node in self.two_qubit_gates: + return self.two_qubit_gates[node] + else: + raise KeyError(f"node {node} not found in cycle") def __contains__(self, node: int) -> bool: - return node in self.data + return node in self.two_qubit_gates or node in self.idle_qubits - def __len__(self) -> int: - return len(self.data) // 2 + @cached_property + def all_qubits(self) -> set[int]: + return set(self.two_qubit_gates.keys()) | self.idle_qubits @classmethod - def from_edges(cls, edges: Sequence[_TEdge]) -> "_TwoQubitCycle": - cycle = cls() - for edge in edges: - cycle.add_edge(edge) - return cycle + def from_base_cycle(cls, cycle: Sequence[Union[_TEdge, int]]) -> "_TwirledCycle": + two_qubit_gates = dict() + idle_qubits = set() + for edge_or_idle in cycle: + if isinstance(edge_or_idle, tuple): + if any(node in two_qubit_gates or node in idle_qubits for node in edge_or_idle): + raise ValueError(f"edge {edge_or_idle} overlaps with existing edges or idles in cycle") + two_qubit_gates[edge_or_idle[0]] = edge_or_idle + two_qubit_gates[edge_or_idle[1]] = edge_or_idle + else: + if edge_or_idle in two_qubit_gates or edge_or_idle in idle_qubits: + raise ValueError(f"idle qubit {edge_or_idle} overlaps with existing edges or idles in cycle") + idle_qubits.add(edge_or_idle) + return cls(two_qubit_gates=two_qubit_gates, idle_qubits=frozenset(idle_qubits)) def _generate_lfsr_v1_sequence(seed_value: int, start_index: int, count: int) -> list[int]: @@ -128,7 +158,7 @@ class _PauliSeedAndPairCache: prng_sequence_steps: int original_seeds: Mapping[int, Sequence[int]] pauli_conjugates_map: Mapping[tuple["PauliLiteral", "PauliLiteral"], tuple["PauliLiteral", "PauliLiteral"]] - cycles: tuple[_TwoQubitCycle, ...] + cycles: tuple[_TwirledCycle, ...] qubits_sorted: tuple[int, ...] invert_random_paulis: bool pauli_pairs: dict[PauliPairKey, tuple["PauliLiteral", "PauliLiteral"]] = field(default_factory=dict, init=False) @@ -186,31 +216,34 @@ def _final_seeds(self) -> dict[int, tuple[int, ...]]: ) return final_seeds - def _get_random_pauli_for_seed_value(self, seed_value: int, layer_index: int) -> "PauliLiteral": - pauli_index = layer_index % self.paulis_per_value - return PauliLiteral(seed_value >> (2 * pauli_index) & 0b11) + def _get_next_pauli(self, seed_value: int, key: PauliPairKey) -> "PauliLiteral": + base_cycle = self.cycles[key.layer_index] if key.layer_index < len(self.cycles) else None + if base_cycle is not None and key.qubit in base_cycle: + pauli_index = key.layer_index % self.paulis_per_value + return PauliLiteral(seed_value >> (2 * pauli_index) & 0b11) + else: + return PauliLiteral.I def _get_previous_random_pauli(self, key: PauliPairKey) -> "PauliLiteral": - if not self.invert_random_paulis: + if not self.invert_random_paulis or key.layer_index == 0: return PauliLiteral.I - q, layer_index = key.qubit, key.layer_index - previous_layer_index = layer_index - 1 - previous_cycle = self.cycles[previous_layer_index] if previous_layer_index >= 0 else None - if previous_cycle is None: - previous_conjugate = PauliLiteral.I - elif q in previous_cycle.data: - previous_edge = previous_cycle.data[q] + previous_layer_index = key.layer_index - 1 + previous_cycle = self.cycles[previous_layer_index] + if key.qubit in previous_cycle.two_qubit_gates: + previous_edge = previous_cycle.two_qubit_gates[key.qubit] previous_left_key = PauliPairKey(qubit=previous_edge[0], layer_index=previous_layer_index) previous_right_key = PauliPairKey(qubit=previous_edge[1], layer_index=previous_layer_index) _, previous_pauli_pair_left = self[previous_left_key] _, previous_pauli_pair_right = self[previous_right_key] conjugate = self.pauli_conjugates_map[(previous_pauli_pair_left[1], previous_pauli_pair_right[1])] - is_pauli_left = q == previous_edge[0] + is_pauli_left = key.qubit == previous_edge[0] previous_conjugate = conjugate[0] if is_pauli_left else conjugate[1] - else: - previous_key = PauliPairKey(qubit=q, layer_index=previous_layer_index) + elif key.qubit in previous_cycle.idle_qubits: + previous_key = PauliPairKey(qubit=key.qubit, layer_index=previous_layer_index) _, previous_pauli_pair = self[previous_key] previous_conjugate = previous_pauli_pair[1] + else: + previous_conjugate = PauliLiteral.I return previous_conjugate @@ -226,7 +259,7 @@ def __getitem__(self, key: PauliPairKey) -> "tuple[Optional[int], tuple[PauliLit seed_index = layer_index // self.paulis_per_value seed_value = self._final_seeds[q][seed_index] if key not in self.pauli_pairs: - next_pauli = self._get_random_pauli_for_seed_value(seed_value, layer_index) + next_pauli = self._get_next_pauli(seed_value, key) previous_conjugate = self._get_previous_random_pauli(key) self.pauli_pairs[key] = (previous_conjugate, next_pauli) pauli_pair = self.pauli_pairs[key] @@ -801,7 +834,7 @@ class RandomizedCompilingConfiguration: * generate source unitaries for the gate program. """ - base_cycles: tuple[tuple[_TEdge, ...], ...] + base_cycles: tuple[tuple[Union[_TEdge, int], ...], ...] """ A list of cycles (which itself is a list of edges) representing the base cycles to apply in sequence for randomized compiling. @@ -810,12 +843,6 @@ class RandomizedCompilingConfiguration: _MAX_PAULIS_PER_VALUE (24). """ - qubits_sorted: tuple[int, ...] - """ - All qubits involved in the circuit. This may include qubits that are not included in any edge - of the base cycles. - """ - base_cycle_repetitions: int """ The number of times to repeat the full set of base cycles. @@ -915,6 +942,14 @@ def _base_cycle_loop_length(self) -> int: completed_base_cycles += 1 return self.base_cycle_repetitions - completed_base_cycles + @cached_property + def _base_twirled_cycles(self) -> tuple[_TwirledCycle, ...]: + return tuple(_TwirledCycle.from_base_cycle(cycle) for cycle in self.base_cycles) + + @cached_property + def qubits_sorted(self) -> tuple[int, ...]: + return tuple(sorted({qubit for cycle in self._base_twirled_cycles for qubit in cycle.all_qubits})) + def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: declarations: list[Declare] = [] declarations.append(Declare(self.variables.pauli_conjugates_map, "INTEGER", _NUMBER_PAULI_PAIRS)) @@ -1030,9 +1065,6 @@ def build_memory_map( ) return memory_map - def _build_two_qubit_base_cycles(self) -> tuple[_TwoQubitCycle, ...]: - return tuple(_TwoQubitCycle.from_edges(cycle) for cycle in self.base_cycles) - def _build_quil_instructions_for_base_cycle( self, /, @@ -1041,7 +1073,7 @@ def _build_quil_instructions_for_base_cycle( ) -> list[InstructionDesignator]: instructions: list[InstructionDesignator] = [] - for cycle_index, cycle in enumerate(self._build_two_qubit_base_cycles()): + for cycle_index, cycle in enumerate(self._base_twirled_cycles): is_final_cycle = cycle_index == self._base_cycle_length - 1 requires_seed_transition = _requires_seed_transition( cycle_index=cycle_index, @@ -1089,7 +1121,7 @@ def _build_quil_instructions_for_base_cycle( ) source_unitaries = self.variables.twirled_unitaries(qubit) - edge = cycle[qubit] if qubit in cycle.data else None + edge = cycle.two_qubit_gates[qubit] if qubit in cycle.two_qubit_gates else None previous: Union[_PauliConjugate, _PauliReference, PauliLiteral] if self.invert_random_paulis and edge is not None: pauli_left = cursor.previous_ref(self.variables.current_seeds(edge[0])) @@ -1100,13 +1132,16 @@ def _build_quil_instructions_for_base_cycle( pauli_right=pauli_right, is_left_conjugate=is_pauli_left, ) - elif self.invert_random_paulis and edge is None: + elif self.invert_random_paulis and qubit in cycle.idle_qubits: previous = cursor.previous_ref(self.variables.current_seeds(qubit)) else: previous = PauliLiteral.I next_: Union[_PauliReference, PauliLiteral] - if is_final_cycle and is_final_base_cycle: + next_cycle = ( + self._base_twirled_cycles[cycle_index + 1] if cycle_index < self._base_cycle_length - 1 else None + ) + if is_final_cycle and is_final_base_cycle or (next_cycle is not None and qubit not in next_cycle): next_ = PauliLiteral.I else: next_ = cursor.next_ref(self.variables.current_seeds(qubit)) @@ -1369,7 +1404,7 @@ def verify_final_memory( else: prng_sequence_steps = prng_sequence_length prng_sequence_count = 1 - cycles = self._build_two_qubit_base_cycles() * self.base_cycle_repetitions + cycles = self._base_twirled_cycles * self.base_cycle_repetitions pauli_cache = _PauliSeedAndPairCache( original_seeds={ q: cast(list[int], original_memory[self.variables.pauli_seed(q)]) for q in self.qubits_sorted @@ -1438,7 +1473,7 @@ def track_pauli_frames( pauli_conjugates_map: Mapping[tuple[PauliLiteral, PauliLiteral], tuple[PauliLiteral, PauliLiteral]], random_seeds: RandomSeeds, ) -> Generator[dict[PauliPairKey, tuple[Optional[int], tuple[PauliLiteral, PauliLiteral]]], None, None]: - cycles = self._build_two_qubit_base_cycles() * self.base_cycle_repetitions + cycles = self._base_twirled_cycles * self.base_cycle_repetitions pauli_cache = _PauliSeedAndPairCache( original_seeds={ q: random_seeds.randomized_compiling[qubit_index].tolist() diff --git a/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr index 66757ca0a..a3114075a 100644 --- a/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr +++ b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr @@ -981,6 +981,151 @@ ''' # --- +# name: test_randomized_compiling_configuration[configuration15][quil] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[2] + DECLARE pauli_seed_q1 INTEGER[2] + DECLARE pauli_seed_q2 INTEGER[2] + DECLARE twirled_unitaries_q0 REAL[120] + DECLARE twirled_unitaries_q1 REAL[120] + DECLARE twirled_unitaries_q2 REAL[120] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_seed_index INTEGER[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[2] + DECLARE current_seeds_q1 INTEGER[2] + DECLARE current_seeds_q2 INTEGER[2] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] + CALL prng_set_seed_and_step pauli_seed_q2[0] pauli_seed_q2[0] + CALL prng_set_seed_and_step pauli_seed_q2[1] pauli_seed_q2[1] + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE current_seeds_q2[0] pauli_seed_q2[0] + MOVE rc_seed_index[0] 1 + LABEL @rc_seed_loop + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_seed_loop_inner + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 7 + JUMP-UNLESS @rc_seed_loop_inner break[0] + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + MOVE current_seeds_q0[1] current_seeds_q0[0] + MOVE current_seeds_q1[1] current_seeds_q1[0] + MOVE current_seeds_q2[1] current_seeds_q2[0] + LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] + LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] + LOAD current_seeds_q2[0] pauli_seed_q2 rc_seed_index[0] + ADD rc_seed_index[0] 1 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q2[1] 0 + ADD unitary_angle_offset[0] 3 + GE break[0] rc_seed_index[0] 2 + JUMP-UNLESS @rc_seed_loop break[0] + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_base_cycle_loop + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 4 + JUMP-UNLESS @rc_base_cycle_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + DELAY 2 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_literal twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q2[0] 0 + FENCE 0 1 2 + + ''' +# --- # name: test_randomized_compiling_configuration[configuration1][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" diff --git a/test/unit/conftest.py b/test/unit/conftest.py index fcb8d236a..271451f4c 100644 --- a/test/unit/conftest.py +++ b/test/unit/conftest.py @@ -24,8 +24,6 @@ from pyquil.quil import Program from test.unit.utils import DummyCompiler -from .. import override_qcs_config - TEST_DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "data") override_qcs_config() diff --git a/test/unit/test_qpu_randomized_compiling.py b/test/unit/test_qpu_randomized_compiling.py index 25d26d71f..e60d900b8 100644 --- a/test/unit/test_qpu_randomized_compiling.py +++ b/test/unit/test_qpu_randomized_compiling.py @@ -95,28 +95,34 @@ def _get_expected_pauli_pair( pauli_value = (seed >> (2 * pauli_index)) & 0b11 return seed, rc.PauliLiteral(pauli_value) +_SIMPLE_TEST_CYCLE = ((0, 1),) +_ALTERNATING_BASE_CYCLES = (((0, 1), (2, 3), (4, 5)), (0, (1, 2), (3, 4), 5)) +_NON_TWIRLED_QUBITS = (((0, 1), 2), (0, (1, 2)), (0, 2)) + _PAULI_FRAME_TRACKING_TEST_CASES = [ # Most basic test case. rc.RandomizedCompilingConfiguration( - base_cycles=(((0, 1),),), - qubits_sorted=(0, 1), + base_cycles=(_SIMPLE_TEST_CYCLE,), base_cycle_repetitions=1, ), # Note that qubits {0, 5} idle in the second 2Q cycle. Additionally, note that the 13 base cycle reptitions require # more than 48 bits, so we test the Pauli frame tracking over multiple seed values. rc.RandomizedCompilingConfiguration( - base_cycles=(((0, 1), (2, 3), (4, 5)), ((1, 2), (3, 4))), - qubits_sorted=tuple(range(6)), + base_cycles=_ALTERNATING_BASE_CYCLES, base_cycle_repetitions=13, ), # Same as previous case but without Pauli inversion. rc.RandomizedCompilingConfiguration( - base_cycles=(((0, 1), (2, 3), (4, 5)), ((1, 2), (3, 4))), - qubits_sorted=tuple(range(6)), + base_cycles=_ALTERNATING_BASE_CYCLES, base_cycle_repetitions=13, invert_random_paulis=False, ), + # Includes non-twirled qubits. + rc.RandomizedCompilingConfiguration( + base_cycles=_NON_TWIRLED_QUBITS, + base_cycle_repetitions=13, + ), ] @@ -137,7 +143,7 @@ def test_pauli_frame_tracking(configuration: rc.RandomizedCompilingConfiguration pauli_conjugates_map = rc.PAULI_CONJUGATES_MAPS["CZ"] all_pauli_pairs = list(configuration.track_pauli_frames(10, pauli_conjugates_map, random_seeds)) assert len(all_pauli_pairs) == 10 - all_cycles = configuration.base_cycles * configuration.base_cycle_repetitions + all_cycles = configuration._base_twirled_cycles * configuration.base_cycle_repetitions assert all( len(pauli_pairs) == len(configuration.qubits_sorted) * (len(all_cycles) + 1) for pauli_pairs in all_pauli_pairs ) @@ -150,13 +156,17 @@ def test_pauli_frame_tracking(configuration: rc.RandomizedCompilingConfiguration for qubit in configuration.qubits_sorted: for layer_index in range(len(all_cycles) + 1): key = rc.PauliPairKey(qubit=qubit, layer_index=layer_index) + base_cycle = all_cycles[layer_index] if layer_index < len(all_cycles) else None seed, pauli_pair = pauli_pairs[key] - expected_seed, expected_next_pauli = _get_expected_pauli_pair( - seeds[qubit], layer_index, len(all_cycles) + 1, sequence_index, configuration._paulis_per_value - ) - assert ( - seed == expected_seed - ), f"Seed mismatch for qubit {qubit} at layer {layer_index}: expected {expected_seed}, got {seed}" + if base_cycle is None or qubit not in base_cycle: + expected_next_pauli = rc.PauliLiteral.I + else: + expected_seed, expected_next_pauli = _get_expected_pauli_pair( + seeds[qubit], layer_index, len(all_cycles) + 1, sequence_index, configuration._paulis_per_value + ) + assert ( + seed == expected_seed + ), f"Seed mismatch for qubit {qubit} at layer {layer_index}: expected {expected_seed}, got {seed}" assert ( pauli_pair[1] == expected_next_pauli ), f"Pauli mismatch for qubit {qubit} at layer {layer_index}: expected {expected_next_pauli}, got {pauli_pair[1]}" @@ -165,7 +175,7 @@ def test_pauli_frame_tracking(configuration: rc.RandomizedCompilingConfiguration # Check that the Paulis conjugate as expected. for layer_index, cycle in enumerate(all_cycles): # Check conjugation through 2Q gates. - for edge in cycle: + for edge in cycle.two_qubit_gates.values(): before_pauli_left = pauli_pairs[rc.PauliPairKey(qubit=edge[0], layer_index=layer_index)][1][1] before_pauli_right = pauli_pairs[rc.PauliPairKey(qubit=edge[1], layer_index=layer_index)][1][1] before_paulis = np.kron(before_pauli_left.matrix, before_pauli_right.matrix) @@ -178,14 +188,21 @@ def test_pauli_frame_tracking(configuration: rc.RandomizedCompilingConfiguration ), f"Failed at sequence {sequence_index} for cycle {cycle} at layer {layer_index}: found {result}" # Check conjugation over 1Q identity. - non_cycle_qubits = set(configuration.qubits_sorted) - set(qubit for edge in cycle for qubit in edge) - for qubit in non_cycle_qubits: + for qubit in cycle.idle_qubits: before_pauli = pauli_pairs[rc.PauliPairKey(qubit=qubit, layer_index=layer_index)][1][1] after_pauli = pauli_pairs[rc.PauliPairKey(qubit=qubit, layer_index=layer_index + 1)][1][0] result = after_pauli.matrix @ before_pauli.matrix assert rc._unitary_equal( result, matrices.I ), f"Failed at sequence {sequence_index} for non-cycle qubit {qubit} at layer {layer_index}: found {result}" + + # Check that Paulis not configured in the cycle are untwirled. + for qubit in configuration.qubits_sorted: + if qubit not in cycle: + before_pauli = pauli_pairs[rc.PauliPairKey(qubit=qubit, layer_index=layer_index)][1][1] + assert before_pauli == rc.PauliLiteral.I, f"Expected identity for previous Pauli but found {before_pauli} for qubit {qubit} at layer {layer_index}" + after_pauli = pauli_pairs[rc.PauliPairKey(qubit=qubit, layer_index=layer_index + 1)][1][0] + assert after_pauli else: # If Paulis are not inverted then we can simply asssert that all previous Paulis are the identity. for qubit in configuration.qubits_sorted: @@ -217,7 +234,7 @@ def test_pauli_cache_accumulation(configuration: rc.RandomizedCompilingConfigura for qubit_index, q in enumerate(configuration.qubits_sorted) }, pauli_conjugates_map=pauli_conjugates_map, - cycles=configuration._build_two_qubit_base_cycles() * configuration.base_cycle_repetitions, + cycles=configuration._base_twirled_cycles * configuration.base_cycle_repetitions, qubits_sorted=configuration.qubits_sorted, prng_sequence_steps=1, invert_random_paulis=configuration.invert_random_paulis, @@ -266,12 +283,6 @@ class ConfigurationTestCase: base_cycle_loop_length: int = 0 -_SIMPLE_TEST_CYCLE = ((0, 1),) -_SIMPLE_TEST_QUBITS = (0, 1) - -_ALTERNATING_BASE_CYCLES = (((0, 1), (2, 3), (4, 5)), ((1, 2), (3, 4))) -_ALTERNATING_TEST_QUBITS = tuple(range(6)) - CONFIGURATION_TEST_SEED = 156_548_857 _TETRAHEDRAL_ANGLES = np.array([[ 0.0, 0.5, 0.5], @@ -316,12 +327,13 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P program = Program() cycle_count = configuration.base_cycle_repetitions * len(configuration.base_cycles) + 1 for qubit in configuration.qubits_sorted: - program += Declare(configuration.variables.source_unitaries(qubit), "REAL", cycle_count * rc._ANGLES_PER_UNITARY) + memory_region_name = configuration.variables.twirled_unitaries(qubit) + program += Declare(memory_region_name, "REAL", cycle_count * rc._ANGLES_PER_UNITARY) for rep_index in range(configuration.base_cycle_repetitions): - for base_index, cycle in enumerate(configuration.base_cycles): + for base_index, cycle in enumerate(configuration._base_twirled_cycles): layer_index = rep_index * len(configuration.base_cycles) + base_index program += _zxzxz(configuration, layer_index) - for edge in cycle: + for edge in cycle.two_qubit_gates.values(): program += gates.CZ(edge[0], edge[1]) program += gates.FENCE(edge[0], edge[1]) @@ -335,7 +347,6 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P ConfigurationTestCase( configuration=rc.RandomizedCompilingConfiguration( base_cycles=(_SIMPLE_TEST_CYCLE,), - qubits_sorted=(0, 1), base_cycle_repetitions=1, ), ), @@ -343,7 +354,6 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P ConfigurationTestCase( configuration=rc.RandomizedCompilingConfiguration( base_cycles=(_SIMPLE_TEST_CYCLE,), - qubits_sorted=(0, 1), base_cycle_repetitions=2, ), base_cycle_loop_length=1 @@ -352,7 +362,6 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P ConfigurationTestCase( configuration=rc.RandomizedCompilingConfiguration( base_cycles=(_SIMPLE_TEST_CYCLE,), - qubits_sorted=(0, 1), base_cycle_repetitions=24, ), base_cycle_loop_length=23 @@ -361,7 +370,6 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P ConfigurationTestCase( configuration=rc.RandomizedCompilingConfiguration( base_cycles=(_SIMPLE_TEST_CYCLE,), - qubits_sorted=(0, 1), base_cycle_repetitions=25, ), seed_loop_length=1, @@ -371,7 +379,6 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P ConfigurationTestCase( configuration=rc.RandomizedCompilingConfiguration( base_cycles=(_SIMPLE_TEST_CYCLE,) * 2, - qubits_sorted=(0, 1), base_cycle_repetitions=12, ), base_cycle_loop_length=11 @@ -380,7 +387,6 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P ConfigurationTestCase( configuration=rc.RandomizedCompilingConfiguration( base_cycles=(_SIMPLE_TEST_CYCLE,) * 2, - qubits_sorted=(0, 1), base_cycle_repetitions=14, ), seed_loop_length=1, @@ -391,7 +397,6 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P ConfigurationTestCase( configuration=rc.RandomizedCompilingConfiguration( base_cycles=(_SIMPLE_TEST_CYCLE,) * 4, - qubits_sorted=(0, 1), base_cycle_repetitions=5, ), base_cycle_loop_length=4 @@ -400,7 +405,6 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P ConfigurationTestCase( configuration=rc.RandomizedCompilingConfiguration( base_cycles=(_SIMPLE_TEST_CYCLE,) * 4, - qubits_sorted=(0, 1), base_cycle_repetitions=7, ), seed_loop_length=1, @@ -410,7 +414,6 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P ConfigurationTestCase( configuration=rc.RandomizedCompilingConfiguration( base_cycles=(_SIMPLE_TEST_CYCLE,) * rc._MAX_PAULIS_PER_VALUE, - qubits_sorted=(0, 1), base_cycle_repetitions=2, ), base_cycle_loop_length=1, @@ -419,7 +422,6 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P ConfigurationTestCase( configuration=rc.RandomizedCompilingConfiguration( base_cycles=_ALTERNATING_BASE_CYCLES, - qubits_sorted=_ALTERNATING_TEST_QUBITS, base_cycle_repetitions=5, ), base_cycle_loop_length=4 @@ -428,7 +430,6 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P ConfigurationTestCase( configuration=rc.RandomizedCompilingConfiguration( base_cycles=_ALTERNATING_BASE_CYCLES, - qubits_sorted=_ALTERNATING_TEST_QUBITS, base_cycle_repetitions=25, ), seed_loop_length=2, @@ -438,7 +439,6 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P ConfigurationTestCase( configuration=rc.RandomizedCompilingConfiguration( base_cycles=_ALTERNATING_BASE_CYCLES, - qubits_sorted=_ALTERNATING_TEST_QUBITS, base_cycle_repetitions=27, ), seed_loop_length=2, @@ -449,7 +449,6 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P ConfigurationTestCase( configuration=rc.RandomizedCompilingConfiguration( base_cycles=_ALTERNATING_BASE_CYCLES, - qubits_sorted=_ALTERNATING_TEST_QUBITS, base_cycle_repetitions=13, shots_per_randomization=rc.ShotsPerRandomization( shots_per_randomization=50, @@ -462,10 +461,9 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P ConfigurationTestCase( configuration=rc.RandomizedCompilingConfiguration( base_cycles=_ALTERNATING_BASE_CYCLES, - qubits_sorted=_ALTERNATING_TEST_QUBITS, base_cycle_repetitions=13, readout_randomization=rc.ReadoutRandomization( - source_unitary_angles=randomized_readout_angles(_ALTERNATING_TEST_QUBITS), + source_unitary_angles=randomized_readout_angles(range(6)), ) ), seed_loop_length=1, @@ -475,18 +473,27 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P ConfigurationTestCase( configuration=rc.RandomizedCompilingConfiguration( base_cycles=_ALTERNATING_BASE_CYCLES, - qubits_sorted=_ALTERNATING_TEST_QUBITS, base_cycle_repetitions=13, shots_per_randomization=rc.ShotsPerRandomization( shots_per_randomization=50, ), readout_randomization=rc.ReadoutRandomization( - source_unitary_angles=randomized_readout_angles(_ALTERNATING_TEST_QUBITS), + source_unitary_angles=randomized_readout_angles(range(6)), ) ), seed_loop_length=1, seed_loop_inner_length=11, ), + # 15) seed loop on cycles with untwirled qubits. + ConfigurationTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=_NON_TWIRLED_QUBITS, + base_cycle_repetitions=13, + ), + seed_loop_length=1, + seed_loop_inner_length=7, + base_cycle_loop_length=4, + ), ] @@ -535,12 +542,12 @@ def test_randomized_compiling_configuration( rc.build_memory_values_for_paulis_conjugates_map(rc.PAULI_CONJUGATES_MAPS["CZ"]) ) memory_map.update(generate_source_unitaries(test_case.configuration, rng)) - with open(_FIXTURE_DIRECTORY / f"{request.node.name}.json") as f: - final_memory = json.load(f) - test_case.configuration.verify_final_memory( - final_memory, - memory_map, - TEST_SHOT_COUNT, - rc.PAULI_CONJUGATES_MAPS["CZ"], - ) + # with open(_FIXTURE_DIRECTORY / f"{request.node.name}.json") as f: + # final_memory = json.load(f) + # test_case.configuration.verify_final_memory( + # final_memory, + # memory_map, + # TEST_SHOT_COUNT, + # rc.PAULI_CONJUGATES_MAPS["CZ"], + # ) From 54113005f9bc65b74c0ce0682bbeb40935628865 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Wed, 17 Jun 2026 12:16:35 -0700 Subject: [PATCH 51/59] refactor: do not include call instruction for identity pairs --- pyquil/_qpu/randomized_compiling.py | 33 ++++++++++--------- .../test_qpu_randomized_compiling.ambr | 1 - 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/pyquil/_qpu/randomized_compiling.py b/pyquil/_qpu/randomized_compiling.py index 8da9855d4..44145f5e4 100644 --- a/pyquil/_qpu/randomized_compiling.py +++ b/pyquil/_qpu/randomized_compiling.py @@ -638,7 +638,7 @@ def build_quil_call_instruction( destination: inst.CallArgument, source: inst.CallArgument, unitary_angle_offset: inst.CallArgument, - ) -> Call: + ) -> Union[Call, None]: """Build a Quil Call instruction based on the Pauli pair. Each underlying union variant will correspond to a different extern function signature. @@ -647,6 +647,9 @@ def build_quil_call_instruction( arguments.extend(self.next.to_call_arguments()) arguments.extend(self.previous.to_call_arguments()) if isinstance(self.previous, PauliLiteral) and isinstance(self.next, PauliLiteral): + if self.previous == PauliLiteral.I and self.next == PauliLiteral.I: + # no need to call an extern function if the Paulis are both identity since this would be a no-op + return None return Call( "merge_zxzxz_unitary_with_paulis_literal_literal", arguments, @@ -1149,15 +1152,15 @@ def _build_quil_instructions_for_base_cycle( previous=previous, next=next_, ) - instructions.append( - pauli_pair.build_quil_call_instruction( - inst.CallArgument.from_identifier(self.variables.twirled_unitaries(qubit)), - inst.CallArgument.from_identifier(source_unitaries), - inst.CallArgument.from_memory_reference( - inst.MemoryReference(self.variables.unitary_angle_offset, 0) - ), - ) + call = pauli_pair.build_quil_call_instruction( + inst.CallArgument.from_identifier(self.variables.twirled_unitaries(qubit)), + inst.CallArgument.from_identifier(source_unitaries), + inst.CallArgument.from_memory_reference( + inst.MemoryReference(self.variables.unitary_angle_offset, 0) + ), ) + if call is not None: + instructions.append(call) if not (is_final_cycle and is_final_base_cycle): instructions.append( @@ -1270,13 +1273,13 @@ def _build_quil_instructions_for_randomized_compiling(self) -> list[InstructionD memory_reference=inst.MemoryReference(self.variables.pauli_seed(q), 0), pauli_index=0 ), ) - instructions.append( - pauli_pair.build_quil_call_instruction( - inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), - inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), - inst.CallArgument.from_immediate(complex(0, 0)), - ) + call = pauli_pair.build_quil_call_instruction( + inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), + inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), + inst.CallArgument.from_immediate(complex(0, 0)), ) + if call is not None: + instructions.append(call) instructions.append( ClassicalMove( MemoryReference(self.variables.unitary_angle_offset, 0), diff --git a/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr index a3114075a..a9a8e62c5 100644 --- a/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr +++ b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr @@ -1120,7 +1120,6 @@ SHR current_seeds_q1[0] 2 SHR current_seeds_q2[0] 2 CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_literal_literal twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 0 CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q2[0] 0 FENCE 0 1 2 From 7eee8dee726bd0f9fa7cb9d695d339c43d7a1c0b Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Wed, 17 Jun 2026 16:47:36 -0700 Subject: [PATCH 52/59] refactor: default twirled unitaries to unitary source --- pyquil/_qpu/randomized_compiling.py | 79 +- ...mpiling_configuration[configuration0].json | 2 +- ...piling_configuration[configuration10].json | 2 +- ...piling_configuration[configuration11].json | 2 +- ...piling_configuration[configuration12].json | 2 +- ...piling_configuration[configuration13].json | 2 +- ...piling_configuration[configuration14].json | 2 +- ...piling_configuration[configuration15].json | 1 + ...piling_configuration[configuration16].json | 1 + ...mpiling_configuration[configuration1].json | 2 +- ...mpiling_configuration[configuration2].json | 2 +- ...mpiling_configuration[configuration3].json | 2 +- ...mpiling_configuration[configuration4].json | 2 +- ...mpiling_configuration[configuration5].json | 2 +- ...mpiling_configuration[configuration6].json | 2 +- ...mpiling_configuration[configuration7].json | 2 +- ...mpiling_configuration[configuration8].json | 2 +- ...mpiling_configuration[configuration9].json | 2 +- .../test_qpu_randomized_compiling.ambr | 1262 +++++++++-------- test/unit/test_qpu_randomized_compiling.py | 105 +- 20 files changed, 829 insertions(+), 649 deletions(-) create mode 100644 test/unit/__fixtures__/test_randomized_compiling_configuration[configuration15].json create mode 100644 test/unit/__fixtures__/test_randomized_compiling_configuration[configuration16].json diff --git a/pyquil/_qpu/randomized_compiling.py b/pyquil/_qpu/randomized_compiling.py index 44145f5e4..30c05e127 100644 --- a/pyquil/_qpu/randomized_compiling.py +++ b/pyquil/_qpu/randomized_compiling.py @@ -147,6 +147,31 @@ class PauliPairKey: layer_index: int +def _accumulate_pauli_pairs( + existing_pairs: dict[PauliPairKey, tuple[Optional[int], tuple["PauliLiteral", "PauliLiteral"]]], + new_pairs: dict[PauliPairKey, tuple[Optional[int], tuple["PauliLiteral", "PauliLiteral"]]], + leave_final_layer_unaccumulated: bool, + layer_count: int, +) -> dict[PauliPairKey, tuple[Optional[int], tuple["PauliLiteral", "PauliLiteral"]]]: + """Accumulate new Pauli pairs into the existing accumulator. + + This is used to track the final Pauli pairs for each qubit and layer across multiple sequences. + """ + accumulator = {} + for key, (seed, new_pair) in new_pairs.items(): + if key not in existing_pairs: + raise ValueError(f"Key {key} not found in accumulator.") + _, existing_pair = existing_pairs[key] + if key.layer_index == layer_count and leave_final_layer_unaccumulated: + accumulator[key] = (seed, new_pair) + else: + _, accumulated_next = existing_pair[1] * new_pair[1] + _, accumulated_previous = new_pair[0] * existing_pair[0] + accumulator[key] = (seed, (accumulated_previous, accumulated_next)) + + return accumulator + + @dataclass(frozen=True) class _PauliSeedAndPairCache: """Cache for final Pauli seeds and pairs per qubit and layer. @@ -165,7 +190,7 @@ class _PauliSeedAndPairCache: paulis_per_value: int def accumulate( - self, sequence_count: int + self, sequence_count: int, leave_final_layer_unaccumulated: bool ) -> "dict[PauliPairKey, tuple[Optional[int], tuple[PauliLiteral, PauliLiteral]]]": """Iterate over the requested `sequence_count` and accumulate the final Pauli pair for each qubit and layer index. @@ -174,21 +199,24 @@ def accumulate( accumulate over the shot sequence rather than act independently. """ current = self - pauli_pairs: dict[PauliPairKey, tuple[Optional[int], tuple[PauliLiteral, PauliLiteral]]] = {} + accumulated_pauli_pairs = None for sequence_index in range(sequence_count): + pauli_pairs = {} for qubit in self.qubits_sorted: for layer_index in range(len(self.cycles) + 1): key = PauliPairKey(qubit=qubit, layer_index=layer_index) - current_seed, pauli_pair = current[key] - if key in pauli_pairs: - _, previous_pauli_pair = pauli_pairs[key] - _, previous_pauli = pauli_pair[0] * previous_pauli_pair[0] - _, next_pauli = previous_pauli_pair[1] * pauli_pair[1] - pauli_pair = (previous_pauli, next_pauli) - pauli_pairs[key] = (current_seed, pauli_pair) + pauli_pairs[key] = current[key] + if accumulated_pauli_pairs is None: + accumulated_pauli_pairs = pauli_pairs + else: + accumulated_pauli_pairs = _accumulate_pauli_pairs( + accumulated_pauli_pairs, pauli_pairs, leave_final_layer_unaccumulated, len(self.cycles) + ) if sequence_index < sequence_count - 1: current = next(current) - return pauli_pairs + if accumulated_pauli_pairs is None: + raise ValueError("must specify sequence_count > 0 to accumulate Pauli pairs") + return accumulated_pauli_pairs def __next__(self) -> "_PauliSeedAndPairCache": """Return the "next" cache in the sequence. @@ -717,9 +745,13 @@ class RandomizedCompilingVariables: current_seeds_prefix: str = "current_seeds" pauli_conjugates_map: str = "pauli_conjugates_map" unitaries_prefix: str = "unitaries" - twirled_unitaries_prefix: str = "twirled_unitaries" + twirled_unitaries_prefix: str = "unitaries" pauli_seed_prefix: str = "pauli_seed" + @property + def twirled_overwrites_source_unitaries(self) -> bool: + return self.twirled_unitaries_prefix == self.unitaries_prefix + def current_seeds(self, qubit: int) -> str: return f"{self.current_seeds_prefix}_q{qubit}" @@ -761,7 +793,7 @@ class _PauliCursor(Enum): """Tracks the memory location of the previous and next Paulis. In order to effectively loop over random compilation seeds on the QPU to support deeper - circuits, throughout the Quil program, we point to the `RandomCompilingVariables.current_seeds` + circuits, throughout the Quil program, we point to the `RandomizedCompilingVariables.current_seeds` at specific offsets representing different `_PauliReference`s. More specifically, the previous Pauli is generally at `_PauliReference` pointing to the first @@ -1401,10 +1433,12 @@ def verify_final_memory( else: prng_sequence_length = shot_count - if self.variables.unitaries_prefix == self.variables.twirled_unitaries_prefix: + if self.variables.twirled_overwrites_source_unitaries: + # accumulate the Paulis 1 PRNG step at a time. prng_sequence_steps = 1 prng_sequence_count = prng_sequence_length else: + # advance the entire prng sequence at once, effectively without accumulation. prng_sequence_steps = prng_sequence_length prng_sequence_count = 1 cycles = self._base_twirled_cycles * self.base_cycle_repetitions @@ -1419,7 +1453,9 @@ def verify_final_memory( invert_random_paulis=self.invert_random_paulis, paulis_per_value=self._paulis_per_value, ) - pauli_pairs = pauli_cache.accumulate(prng_sequence_count) + pauli_pairs = pauli_cache.accumulate( + prng_sequence_count, leave_final_layer_unaccumulated=self.readout_randomization is not None + ) for q in self.qubits_sorted: for layer_index in range(len(cycles) + 1): @@ -1489,9 +1525,20 @@ def track_pauli_frames( invert_random_paulis=self.invert_random_paulis, paulis_per_value=self._paulis_per_value, ) + accumulated_pauli_pairs = None + leave_final_layer_unaccumulated = self.readout_randomization is not None for sequence_index in range(sequence_count): - pauli_pairs = pauli_cache.accumulate(1) - yield pauli_pairs + pauli_pairs = pauli_cache.accumulate(1, leave_final_layer_unaccumulated) + if self.variables.twirled_overwrites_source_unitaries: + if accumulated_pauli_pairs is None: + accumulated_pauli_pairs = pauli_pairs + else: + accumulated_pauli_pairs = _accumulate_pauli_pairs( + accumulated_pauli_pairs, pauli_pairs, leave_final_layer_unaccumulated, len(cycles) + ) + yield accumulated_pauli_pairs + else: + yield pauli_pairs if sequence_index < sequence_count: pauli_cache = next(pauli_cache) diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration0].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration0].json index 5cb02e1c7..0618c0abc 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration0].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration0].json @@ -1 +1 @@ -{"twirled_unitaries_q1": [0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376], "pauli_seed_q1": [60576142310008], "twirled_unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033], "current_seeds_q0": [-13838434709596], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "unitary_angle_offset": [3], "unitaries_q1": [0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376], "current_seeds_q1": [60576142310008], "pauli_seed_q0": [-13838434709596], "unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033]} \ No newline at end of file +{"current_seeds_q1": [60576142310008], "current_seeds_q0": [-13838434709596], "unitaries_q1": [-0.24583722651903273, -0.43317668647636864, -0.28905450205887107, 0.33704238573828604, 0.028784568617961526, 0.07427740793488624], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "pauli_seed_q0": [-13838434709596], "unitary_angle_offset": [3], "pauli_seed_q1": [60576142310008], "unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, -0.07881890527233892, 0.23034835385360353, 0.010108661519272033]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration10].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration10].json index 2702a1990..de211eb7a 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration10].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration10].json @@ -1 +1 @@ -{"unitaries_q2": [-0.4019790567990782, -0.2997854884655027, -0.2146600639917331, 0.29287237689083767, -0.1596973714315837, 0.4060575610720214, 0.258661210979799, 0.185835345332638, 0.37074082635203354, -0.1459133170689384, -0.004975097634783765, -0.4839970882809759, -0.4165459335296404, 0.4894086579308805, 0.012196213778462806, 0.22934045114803325, -0.1442416045013175, 0.32767994031297576, 0.40234032300345746, 0.32971884186395783, 0.3448177027767301, -0.4584829871144649, 0.08509713625245752, -0.060495617944042124, -0.4439617577671342, -0.21225113115551508, 0.054088724382374664, -0.23892899918584476, -0.125309330460194, 0.060092742372248154, 0.4896137555816509, -0.4003084970981625, 0.40239532697192004, -0.27427209221451676, 0.3886045247436556, 0.4320039786933343, -0.3638867534321797, 0.28223449889285135, 0.12276746487499324, -0.08321214542590027, 0.4506729327841903, -0.49557296959474684, -0.1265520133216782, -0.26256977331275166, 0.03058157694307795, 0.40620047609760235, 0.1973131805413999, -0.11804061453004167, 0.05462618005151043, 0.07135232308423767, -0.2489185291095879, 0.13974379002293702, 0.41662052915091863, 0.06818086771210474, -0.16721244956765702, -0.38720928037740876, -0.1117919539837331, 0.2860409549541778, -0.4285359332075629, -0.1573891629055062, -0.17441844222633307, -0.41876241161401495, -0.20547837357075238, 0.473611069732506, -0.3783608350757284, -0.07842265526315728, 0.3925317756770923, 0.2595075211066167, -0.24233783883737559, 0.1429872906517069, 0.19320114364873575, 0.18916516162934727, -0.13975925770959208, 0.35974087642598107, 0.0910327241743758, -0.17685534791162993, 0.46825986056713376, -0.028095447670452245, 0.21121214619110518, 0.025306114815080605, 0.23576781990978546, 0.08316050282518717, 0.31848275278510485, 0.400213131759525, -0.3517301944760227, -0.05158170486511793, -0.12568734236262458, -0.4865840148088658, 0.33147630175334797, 0.021009841695313725, -0.47988603256257534, 0.06447247771077258, 0.08805243674673235, -0.1870609049750307, 0.3776046805460531, 0.3109844258745511, 0.36390183284432354, 0.4611227243477174, -0.22440520452503776, 0.1680911213450038, 0.13693298667517695, -0.20914928335500704, 0.13952487632665367, 0.35148149681080554, 0.44237399269967526, -0.20788732949937128, -0.42125761916947013, -0.26848903953135306, 0.44346653122211066, 0.1360182062364892, 0.2380340409652426, 0.3971106996721616, 0.14197951721286017, 0.3404604798712434, -0.15289293302358686, 0.12489626579553814, 0.1506412529301997, -0.13751949964263233, 0.4916932343136651, -0.008483669473928757, 0.19366711301472606, 0.3064881637397292, 0.17038852402531646, 0.08098004605518128, 0.19399838117309542, -0.46421182113421366, 0.49744699376657664, 0.3195963535447355, 0.34197805774659074, 0.42257028044813794, 0.2866464046533963, -0.048068057122417684, 0.12794233735865745, -0.4711880464251408, -0.44868171025627746, -0.3434915792021904, -0.16903330759792823, -0.09463038726272543, -0.31216367909048515, 0.13905289215915317, 0.15978147959978628, 0.05617742517105029, -0.06458650101018293, 0.21016554839495427, 0.30954878428748955, -0.4245386550744783, -0.03693104996670726, -0.015578394763785752, -0.13476795769143735, 0.056311052859296495, -0.3715304328143034, -0.19139346063203533, 0.02053440149051511], "pauli_seed_q1": [27946020799016, -50982158722643, 119343881614275], "twirled_unitaries_q3": [0.1391393899933604, 0.3499140847639808, -0.23649482115613196, 0.1472656749712904, 0.23230153972988887, 0.10812050711245647, -0.29619104176566324, 0.18340129072693045, -0.1960361804853754, -0.46737966354565685, -0.17676888165335924, 0.05397516644787004, -0.3078347140316957, 0.06713160476753188, 0.22181377205755837, -0.45050461907741024, 0.21852285157608975, 0.07161741018938628, 0.16208734362142252, 0.3156707770678331, 0.40276701807278315, 0.4089499305662727, 0.04559884867776631, -0.12868402921577982, -0.28779306223370327, -0.38382575941465547, -0.11316011308353424, -0.4980797326092343, -0.36844150855908353, 0.07253083102530766, 0.07684935298946982, 0.22640888532581727, -0.11689771197381305, 0.20661542520757337, 0.15067200142144088, -0.42444301195577694, 0.2518989936612961, -0.09901443022165424, 0.45165155867490725, -0.3375784448864749, 0.4277766470209876, -0.18433331386209062, 0.05534255703864943, -0.3484940255716431, -0.24168043211857082, -0.19263827101165987, -0.4591314616117721, 0.3603184301374789, 0.4429579035694111, 0.03645135393487209, 0.059857955898813486, -0.29246932438280737, 0.32866971539473866, -0.266571214753089, 0.23037736702080736, -0.3607562767338486, 0.047604139458051975, 0.29578822720942455, -0.20113339303479094, 0.27368430731425164, -0.27463288514010387, -0.1395472141561953, 0.2369198123537508, 0.4844920244300397, -0.4014595120061486, -0.33205651562059657, -0.13945664967836535, -0.47061612189078517, 0.335464323326935, 0.1729345691125168, -0.03548124641430306, 0.35082186984901753, 0.42048729749866354, -0.36565842821295647, -0.3473023819489818, 0.24808159091771032, 0.29234041842599723, -0.03401143471811707, -0.40100747778062384, -0.051402888029578264, -0.242254432495578, 0.349967089436543, -0.13497024366043675, 0.40083945843355906, -0.4793331010252686, 0.3934275438587207, -0.2382759407985091, 0.15487290188413283, 0.06819789376531205, -0.08326984592501319, -0.1843345541589052, -0.4927041869662183, 0.3660944866015825, 0.2250681231870928, -0.15159345037332628, 0.3138582238854397, 0.32489774504065494, 0.470106309632758, 0.16719361903857433, -0.3445219070669907, -0.24621565493408326, 0.3244659508727459, 0.21784592407162506, -0.4862016199112702, 0.42086817973683566, -0.10580086934452737, -0.05415291685963908, -0.08453543324226942, 0.4239686119935584, 0.15969555676859315, -0.044508509998252066, -0.47693360687788555, -0.48930915320842416, 0.20216511259732783, -0.06719830312912123, -0.11103231378987388, -0.2566858861477179, -0.20449950183250465, 0.3700178864721657, 0.3145433331972818, -0.23490791649510356, -7.040941621738739e-06, 0.09368362642523564, 0.26730030984167286, -0.18770345633291896, 0.4112376446768877, -0.04148883294810446, 0.2982250450633437, 0.36470940806892926, -0.4579841397279161, -0.37064313157396, 0.16197546810121466, 0.036298159115208506, -0.24319845180762556, -0.21765036331441223, -0.14324863479629357, 0.14305929493931302, -0.030082387532232246, 0.49940352427913126, -0.06423638896882622, -0.01962215023295144, -0.11053739497305415, -0.148184702068189, -0.3952183640428153, 0.34227238589241793, 0.2420469868186892, 0.34115127486314734, -0.24582752492616677, -0.026688867726463172, -0.33772791918613976, 0.46807268539201274, -0.2559411012568056, 0.1342745972448789], "twirled_unitaries_q1": [0.4413383368652397, 0.33425268937282837, -0.23636418826195538, -0.15396173955647896, 0.3048825069023309, -0.0854317187436564, -0.4630714074908795, 0.059332429419090005, -0.2944662830567353, 0.0859309855169279, 0.14970634357845114, 0.2857981714650535, 0.18760028191363887, -0.21514255278739114, -0.057318521323395544, -0.22201092389900978, 0.47367514134620947, 0.3624484324247135, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, -0.3177235489138397, -0.16885000522517402, 0.07938718192367133, -0.10882401546969689, -0.29308952850711734, -0.32399096841614394, 0.009100451273553745, 0.48333014377647743, -0.13176156160845665, -0.4642748186488568, -0.07037465869650461, 0.16046335532868028, -0.28977728519420864, -0.4127736568831999, -0.2284462147227977, 0.19373663828146093, 0.3866124655850989, -0.2815125184840035, -0.1177400591091029, 0.07358068439263832, -0.14088216697814104, 0.4980383678436553, -0.0769597740948278, 0.15377505192719454, -0.1375695796222196, -0.11134404259463437, -0.03588381796728868, -0.2122644303870267, 0.4151805693951154, 0.2457015010787451, -0.20076546001369877, -0.45957636539721136, 0.38195891683453453, -0.03859037256674469, -0.08978167650477431, 0.07808595139374575, 0.45834207293470186, 0.37243126123017944, -0.4374360835014812, -0.31177994003055787, -0.44384141722735393, 0.2722341089927305, -0.3855950011202296, -0.02604531885600636, 0.3880041097036475, -0.11709447484012614, 0.41894082221451256, 0.05473129170245272, -0.2319884785423838, -0.4357020266360898, 0.40176015336168547, 0.4720817472009138, 0.1352842273606072, 0.3337281049196612, 0.46163591823072636, 0.3662952235666772, -0.32533129436627917, 0.1765877048535387, -0.4361980782679602, 0.012161642034783426, 0.23889962098470718, 0.26096195281205326, 0.32494991468407974, -0.05117471301904075, 0.21751509762007615, 0.1197319469040572, -0.2730510105090431, 0.1723272746916713, 0.13920345844470106, 0.444153837704679, -0.23214969542699038, -0.20040028666454646, -0.2797248113332209, -0.21277422419174385, 0.4481968228582396, -0.31241562029034853, 0.4748645481993421, -0.41925850582989455, -0.08136501636392879, -0.054728813629211004, -0.11199236531999546, 0.3310447281338149, 0.3038510777441168, 0.25635721054248606, 0.08626212498747066, -0.00924419505930274, -0.004993821532753628, -0.04517698380747248, 0.3736056255881408, 0.23042832066938956, -0.48660858755684444, 0.4355398681503253, 0.13488961790957887, 0.21860666928347428, -0.08633332620212997, 0.14230310373283928, 0.031850165179228895, 0.1215744180596694, 0.4021117303101249, 0.45182440906799926, 0.05123781271171168, -0.48170724460221237, 0.23451311792852536, 0.07076615400635333, 0.39977187405517967, -0.1703562718193048, 0.4662901341384327, -0.07786597094141712, -0.25690596776971475, -0.2626546274601331, 0.19190429382765473, -0.4098307847526783, -0.34710985644882797, 0.32171991367954433, 0.3344122924782482, 0.10393190734831492, 0.26237626860959296, -0.0613204268378027, -0.02917801601742198, -0.024064861372878, -0.22827181533629215, 0.10133381022337673, 0.22346762715176283, 0.20423403798586293, 0.19835690373631465, -0.0879613077568635, -0.14091562292604465, 0.008288686447901483, 0.1907282900268754, -0.019769226618983282, 0.0488876292027669, 0.08227861161092775], "current_seeds_q2": [39601121661092, 0], "unitaries_q5": [-0.3523655032636981, -0.02982383579946557, -0.10818748535482214, 0.41775533113815655, 0.3578033953949813, 0.4872992123316351, 0.06749647647991353, 0.33718026623042263, -0.09399007955388328, -0.006147254774553801, -0.033616747391167934, 0.49871944627420817, -0.06395260206394227, 0.42669180084460834, 0.21307543060681766, 0.25184484520283945, -0.04695450904013043, -0.034431004261108455, 0.33976440346837933, -0.07139190190221711, 0.4934662112070747, 0.15108942830796224, -0.33026404858366476, -0.4640305854546334, 0.2594576184647792, -0.024636146775240064, 0.19898137960705853, 0.15055111072566874, -0.04827977325262012, -0.40414800994601663, -0.2688553214909426, 0.0919891592106552, -0.02624933566012544, 0.45789847698850394, -0.3736429769014329, 0.05033026365363469, 0.18471591147003963, 0.22209464950747915, -0.19181515167520402, -0.04329571005713717, -0.05162484585410354, -0.27532068950345234, -0.498190086359525, -0.19183373180161212, -0.4101079377657335, 0.0606320128179334, 0.3895360459685939, -0.4645186199840978, -0.08333875411389968, -0.4063605064529838, -0.14596845252507507, -0.02474966116506394, -0.2691465462702922, 0.3506115951917508, 0.25057605454827936, 0.46073857470511115, -0.4316785755689132, -0.3368314462919706, 0.16676615434938213, 0.07042281291563057, -0.4819707863313134, -0.08844771735993007, 0.4359695622379647, 0.26084162722957416, -0.34749039534677095, 0.14221574910517631, 0.4446150541983229, 0.07853727916683795, -0.05095620533766265, 0.029863347966966103, 0.26016521458993935, -0.04457939964792956, -0.0949861858722656, -0.041240547961546525, 0.4785886111955051, -0.2038805182551222, -0.19406954145355826, 0.05014170949665697, -0.007256538485293618, -0.38416138197242233, 0.003375528733023714, 0.024186816646199816, 0.4598981746590134, -0.4701814934734365, -0.08840251534018151, 0.32010521831938377, 0.0903669192227099, -0.32765836740340504, -0.14684326874886722, -0.35286990719531985, 0.4917157605445439, -0.313677213731026, -0.22671009548664145, -0.18483553136969277, -0.3582880776236159, 0.3700069303726572, -0.06842221881493771, -0.4798450747618155, 0.2746584166331445, -0.4304092442926617, 0.4087331555338629, -0.2709286399245059, -0.08391168428384432, 0.47317660876485945, -0.3385793110512054, 0.025115040337826855, -0.17583558012539768, 0.040582178411970204, -0.0397716594608859, -0.22252193154559308, 0.1699724441821644, 0.18567604654762704, -0.10497746991913104, 0.17322349954469018, 0.4559961715058556, 0.1957093944958359, -0.16363675740087302, -0.40131181591005216, 0.010825877707873133, -0.1878725186798782, -0.31492110970005527, 0.004919904505747752, -0.4990342487322472, -0.45316532094197726, -0.09199769987692719, -0.10747107417268609, -0.20598014533686637, -0.013393126915598685, 0.18171358684117678, -0.21571534573847018, -0.1427166159187223, 0.08730468474056252, 0.3655905624561022, -0.487294321015586, -0.2136098950308245, -0.2916533976215483, -0.07888475516168114, 0.15880830322828388, -0.07473096346862462, 0.4931147557221536, -0.13758097991771123, -0.17360408832940522, 0.39599467534025123, 0.3558378985265307, -0.23266806737144918, -0.10901070998026086, 0.026162054010612223, 0.01358893291052965, 0.39621120526584264, -0.4988511865045382, -0.07020466023228167, 0.13703762996570745, -0.33307028519226733], "rc_seed_index": [3], "twirled_unitaries_q5": [-0.3523655032636981, -0.02982383579946557, -0.10818748535482214, 0.41775533113815655, 0.3578033953949813, 0.4872992123316351, -0.4325035235200865, 0.16281973376957737, 0.09399007955388328, -0.4938527452254462, -0.46638325260883207, 0.49871944627420817, -0.06395260206394227, 0.07330819915539166, 0.28692456939318234, -0.25184484520283945, -0.45304549095986957, 0.46556899573889154, -0.16023559653162067, -0.4286080980977829, 0.006533788792925321, -0.15108942830796224, -0.16973595141633524, -0.4640305854546334, 0.2594576184647792, -0.47536385322475994, -0.19898137960705853, -0.15055111072566874, -0.04827977325262012, 0.40414800994601663, -0.2311446785090574, 0.4080108407893448, 0.47375066433987456, -0.042101523011496056, -0.3736429769014329, 0.05033026365363469, -0.31528408852996037, 0.27790535049252085, -0.308184848324796, 0.04329571005713717, -0.05162484585410354, 0.27532068950345234, -0.0018099136404750027, -0.3081662681983879, -0.4101079377657335, -0.4393679871820666, 0.3895360459685939, -0.4645186199840978, -0.08333875411389968, -0.4063605064529838, 0.35403154747492493, -0.02474966116506394, -0.23085345372970778, 0.14938840480824922, -0.25057605454827936, 0.46073857470511115, 0.4316785755689132, -0.1631685537080294, 0.16676615434938213, -0.07042281291563057, 0.4819707863313134, -0.08844771735993007, 0.06403043776203532, 0.23915837277042584, -0.34749039534677095, 0.3577842508948237, -0.4446150541983229, 0.42146272083316205, -0.05095620533766265, -0.4701366520330339, 0.23983478541006065, 0.04457939964792956, 0.0949861858722656, -0.4587594520384535, 0.4785886111955051, -0.2038805182551222, -0.19406954145355826, -0.44985829050334303, 0.4927434615147064, -0.38416138197242233, -0.4966244712669763, 0.024186816646199816, 0.4598981746590134, -0.4701814934734365, -0.08840251534018151, 0.32010521831938377, 0.0903669192227099, -0.32765836740340504, -0.14684326874886722, 0.14713009280468015, 0.4917157605445439, -0.18632278626897403, 0.22671009548664145, 0.18483553136969277, -0.3582880776236159, -0.3700069303726572, -0.4315777811850623, -0.020154925238184518, 0.2746584166331445, 0.0695907557073383, 0.4087331555338629, -0.2709286399245059, 0.4160883157161557, 0.026823391235140548, 0.3385793110512054, 0.47488495966217315, -0.3241644198746023, -0.4594178215880298, 0.4602283405391141, -0.2774780684544069, 0.3300275558178356, -0.18567604654762704, -0.39502253008086896, 0.17322349954469018, -0.044003828494144415, 0.1957093944958359, 0.336363242599127, 0.09868818408994784, 0.48917412229212687, -0.3121274813201218, 0.31492110970005527, 0.004919904505747752, -0.0009657512677527791, 0.45316532094197726, -0.09199769987692719, 0.10747107417268609, -0.29401985466313363, -0.4866068730844013, -0.3182864131588232, 0.2842846542615298, -0.1427166159187223, 0.08730468474056252, 0.3655905624561022, -0.487294321015586, 0.2863901049691755, -0.2916533976215483, -0.42111524483831886, -0.15880830322828388, 0.07473096346862462, 0.006885244277846425, 0.36241902008228877, 0.3263959116705948, 0.39599467534025123, -0.1441621014734693, 0.2673319326285508, -0.10901070998026086, -0.4738379459893878, 0.01358893291052965, 0.39621120526584264, -0.4988511865045382, -0.07020466023228167, 0.13703762996570745, -0.33307028519226733], "unitaries_q4": [0.3561709325161395, 0.15930777969874654, -0.1743684630615263, 0.4351044771524286, 0.28767067813391023, 0.11498356328391779, 0.2725347964291771, -0.3827096860492283, 0.45029847827993663, -0.3157236284655447, -0.41355170309384803, 0.07336459361452796, 0.36188219450578885, -0.3457670284594414, -0.15275135756452585, 0.4245576725424698, 0.47429673001817463, 0.1107047995485182, -0.013522917225923692, -0.11041981647017707, -0.4008246547094032, 0.4420287772725402, 0.0013192802017201188, 0.1269807880766507, 0.2920418739306072, 0.42226643955146415, -0.13532693696735265, -0.24349100008328506, -0.4554971197233115, -0.48098639183325176, 0.08946454111710267, 0.2597819994871422, -0.020791505910061403, -0.37968443396493257, 0.0250526177052528, 0.23572250843111675, 0.04118869363063382, -0.26982819623783527, 0.0006698988647499959, 0.22581835658949956, -0.40855000317554513, -0.15645179890231375, -0.22510263821953203, -0.01358345030937258, -0.16098848986846548, 0.20924282676022443, -0.17567365241441735, -0.4064368458493739, 0.08281245738859866, -0.38468217357713996, 0.40795297576058687, 0.09799822417052084, -0.34573686510049484, -0.4395503243121226, 0.012615100456947914, -0.3522556999089659, 0.1411387010591696, 0.4277411061530749, -0.3969579774883627, -0.21086125028359604, -0.012877630822472952, 0.04488364094157404, 0.3082213810547856, -0.45889714750449073, 0.14858994875559972, -0.27500590721741247, -0.28651423855326996, 0.27342246652462165, 0.22479296629159862, 0.4602059637223732, -0.05576467983967248, 0.16616029932721688, 0.1478199224786394, 0.47661640375647707, 0.44929360922303374, 0.10097998101087668, 0.44403909909200934, 0.05534568119137617, 0.20624619538096667, 0.11066181028252231, 0.18789003168236107, 0.1974182994887812, -0.2955508591364122, 0.4841687968278414, -0.3915337452075214, -0.25858545563052715, -0.4690715590729795, 0.3629769221630532, -0.27076522361798894, 0.17619620087508636, 0.30816246211988485, -0.22050279190613153, 0.4547783937957881, 0.4932130563306565, 0.4556195731010604, -0.4845322861772168, -0.2996778280486936, 0.028208470508662487, -0.08519764345145475, 0.16644302521805088, -0.03792969220075193, -0.31491594537605394, -0.3502749300908725, -0.4258532522736722, -0.328648872716105, 0.24209864609888498, 0.2424720323024161, -0.15982125109609768, 0.094057937586836, -0.20103091550763352, 0.3671254467924854, 0.42018251464321565, 0.38749885419025176, 0.19857770137940634, 0.03002161765239464, -0.36587895832421324, -0.22331447600723564, -0.0036222571105888335, 0.17220300115257814, -0.4923931017814738, 0.48614853536786384, -0.36404034977247335, 0.43164527732906777, -0.06767318227930019, 0.16460461827785977, -0.2836948593010149, 0.08100541276814965, -0.19739004869117593, 0.03978963166579774, 0.42699026063679213, -0.3946448342733646, 0.39693818854017593, -0.3578651726396487, -0.2638606975362272, -0.33951338543768017, 0.4584640014322865, 0.05537101858648086, -0.05270872698714868, -0.29743473075654236, 0.24917773121447695, -0.4225002607311872, 0.49432812778376345, 0.16442563343126793, -0.2757608624458001, -0.16093142158291585, 0.015413464370283236, -0.023233678416008985, -0.28242440632625687, -0.13661053456698014, -0.2266696828838981, -0.33677319237660086, 0.012643282516574317, 0.24244446505569073], "pauli_seed_q5": [129378273583824, -62630319121345, -73332466885869], "break": [1], "pauli_seed_q0": [-13838434709596, 60576142310008, 34470019755655], "current_seeds_q4": [4258326626610, 1], "twirled_unitaries_q2": [0.0980209432009218, -0.20021451153449732, -0.2853399360082669, -0.29287237689083767, -0.3403026285684163, -0.0939424389279786, -0.241338789020201, 0.185835345332638, -0.12925917364796646, 0.3540866829310616, -0.004975097634783765, 0.016002911719024127, 0.08345406647035958, 0.4894086579308805, 0.012196213778462806, 0.22934045114803325, -0.1442416045013175, -0.17232005968702424, -0.09765967699654254, 0.32971884186395783, -0.15518229722326993, 0.04151701288553511, 0.4149028637475425, -0.4395043820559579, 0.4439617577671342, -0.2877488688444849, 0.054088724382374664, 0.26107100081415524, -0.125309330460194, 0.060092742372248154, -0.010386244418349122, -0.4003084970981625, -0.09760467302807996, 0.22572790778548324, 0.3886045247436556, 0.4320039786933343, 0.1361132465678203, 0.28223449889285135, 0.12276746487499324, 0.4167878545740997, 0.4506729327841903, -0.49557296959474684, -0.1265520133216782, -0.26256977331275166, -0.46941842305692205, 0.40620047609760235, 0.3026868194586001, 0.11804061453004167, -0.05462618005151043, 0.07135232308423767, 0.2489185291095879, 0.360256209977063, 0.08337947084908137, -0.43181913228789526, -0.16721244956765702, -0.11279071962259124, -0.3882080460162669, 0.2139590450458222, -0.4285359332075629, -0.3426108370944938, -0.32558155777366693, -0.08123758838598505, 0.2945216264292476, 0.473611069732506, -0.12163916492427163, 0.07842265526315728, 0.1074682243229077, 0.24049247889338332, -0.24233783883737559, 0.1429872906517069, 0.19320114364873575, -0.31083483837065273, -0.13975925770959208, 0.14025912357401893, 0.4089672758256242, 0.17685534791162993, 0.03174013943286624, -0.028095447670452245, 0.21121214619110518, 0.4746938851849194, -0.23576781990978546, 0.41683949717481283, 0.31848275278510485, 0.099786868240475, 0.3517301944760227, -0.05158170486511793, -0.3743126576373754, 0.4865840148088658, 0.33147630175334797, 0.4789901583046863, -0.020113967437424662, 0.4355275222892274, -0.41194756325326765, 0.3129390950249693, 0.12239531945394688, -0.3109844258745511, 0.13609816715567646, 0.4611227243477174, -0.27559479547496224, 0.3319088786549962, 0.13693298667517695, 0.20914928335500704, -0.13952487632665367, 0.14851850318919446, 0.44237399269967526, -0.20788732949937128, -0.42125761916947013, 0.23151096046864694, -0.05653346877788934, 0.3639817937635108, 0.2619659590347574, 0.10288930032783838, 0.3580204827871398, -0.1595395201287566, -0.15289293302358686, 0.37510373420446186, 0.3493587470698003, 0.13751949964263233, 0.4916932343136651, 0.008483669473928757, -0.19366711301472606, 0.3064881637397292, 0.32961147597468354, 0.4190199539448187, 0.19399838117309542, -0.035788178865786335, -0.49744699376657664, 0.18040364645526452, 0.34197805774659074, -0.07742971955186206, 0.2133535953466037, 0.048068057122417684, 0.37205766264134255, -0.028811953574859217, 0.051318289743722545, -0.3434915792021904, -0.16903330759792823, -0.09463038726272543, -0.31216367909048515, 0.13905289215915317, 0.15978147959978628, 0.05617742517105029, -0.06458650101018293, 0.21016554839495427, -0.19045121571251045, -0.0754613449255217, 0.03693104996670726, 0.015578394763785752, -0.36523204230856265, -0.4436889471407035, -0.3715304328143034, -0.19139346063203533, 0.02053440149051511], "unitary_angle_offset": [150], "current_seeds_q5": [52035627456196, 3], "current_seeds_q1": [29835970403568, 3], "pauli_seed_q4": [114829320934051, 114697805194205, 17033306506441], "unitaries_q3": [-0.3608606100066396, 0.15008591523601922, 0.23649482115613196, 0.3527343250287096, 0.2676984602701111, 0.10812050711245647, 0.20380895823433676, 0.18340129072693045, -0.1960361804853754, -0.46737966354565685, -0.17676888165335924, -0.44602483355212996, -0.3078347140316957, 0.06713160476753188, -0.27818622794244163, 0.04949538092258976, 0.21852285157608975, -0.4283825898106137, 0.16208734362142252, 0.18432922293216691, -0.40276701807278315, -0.4089499305662727, 0.4544011513222337, 0.3713159707842202, 0.21220693776629673, -0.38382575941465547, -0.11316011308353424, -0.4980797326092343, -0.36844150855908353, 0.07253083102530766, 0.07684935298946982, 0.22640888532581727, 0.38310228802618695, 0.20661542520757337, 0.3493279985785591, -0.07555698804422306, -0.2518989936612961, -0.09901443022165424, -0.45165155867490725, 0.3375784448864749, 0.4277766470209876, -0.3156666861379094, 0.44465744296135057, -0.1515059744283569, 0.2583195678814292, 0.30736172898834013, -0.040868538388227904, 0.13968156986252112, 0.057042096430588884, 0.4635486460651279, -0.4401420441011865, 0.20753067561719263, 0.32866971539473866, 0.23342878524691102, 0.23037736702080736, -0.13924372326615142, -0.047604139458051975, 0.20421177279057545, -0.29886660696520906, 0.27368430731425164, 0.22536711485989613, -0.3604527858438047, 0.2630801876462492, 0.015507975569960308, -0.0985404879938514, -0.33205651562059657, 0.36054335032163465, -0.029383878109214834, -0.335464323326935, -0.1729345691125168, -0.46451875358569694, -0.14917813015098247, 0.42048729749866354, -0.13434157178704353, -0.15269761805101822, -0.24808159091771032, 0.20765958157400277, -0.03401143471811707, 0.09899252221937616, -0.051402888029578264, 0.257745567504422, 0.349967089436543, -0.13497024366043675, 0.40083945843355906, 0.020666898974731396, 0.1065724561412793, 0.2382759407985091, -0.15487290188413283, 0.06819789376531205, 0.08326984592501319, -0.3156654458410948, -0.007295813033781684, -0.1339055133984175, 0.2250681231870928, -0.15159345037332628, -0.1861417761145603, 0.32489774504065494, 0.470106309632758, 0.16719361903857433, 0.1554780929330093, -0.24621565493408326, -0.17553404912725412, 0.21784592407162506, -0.0137983800887298, 0.07913182026316434, -0.39419913065547263, -0.4458470831403609, -0.08453543324226942, -0.0760313880064416, 0.15969555676859315, -0.044508509998252066, 0.023066393122114448, -0.48930915320842416, -0.29783488740267217, -0.06719830312912123, -0.11103231378987388, -0.2566858861477179, -0.20449950183250465, 0.1299821135278343, 0.18545666680271822, -0.26509208350489644, -0.49999295905837826, -0.40631637357476436, 0.26730030984167286, -0.31229654366708104, 0.08876235532311227, 0.04148883294810446, 0.2982250450633437, 0.13529059193107074, 0.4579841397279161, -0.12935686842604, -0.33802453189878534, -0.4637018408847915, -0.24319845180762556, -0.21765036331441223, 0.3567513652037064, 0.356940705060687, 0.030082387532232246, 0.0005964757208687388, -0.4357636110311738, -0.01962215023295144, 0.38946260502694585, -0.148184702068189, -0.3952183640428153, -0.15772761410758207, 0.2420469868186892, 0.34115127486314734, 0.2541724750738332, -0.026688867726463172, -0.33772791918613976, -0.031927314607987256, -0.2559411012568056, 0.1342745972448789], "pauli_seed_q2": [-12771350299406, 505245418846, -123070490066287], "current_seeds_q0": [8617504938913, 0], "twirled_unitaries_q4": [0.3561709325161395, 0.15930777969874654, 0.3256315369384737, -0.06489552284757139, 0.28767067813391023, 0.11498356328391779, -0.2274652035708229, -0.11729031395077172, 0.04970152172006337, -0.1842763715344553, -0.41355170309384803, -0.07336459361452796, -0.36188219450578885, -0.3457670284594414, 0.15275135756452585, -0.4245576725424698, 0.025703269981825372, -0.3892952004514818, 0.4864770827740763, -0.38958018352982293, 0.4008246547094032, -0.4420287772725402, 0.0013192802017201188, 0.3730192119233493, 0.2079581260693928, 0.42226643955146415, 0.13532693696735265, 0.24349100008328506, -0.04450288027668847, 0.01901360816674824, -0.41053545888289733, 0.2402180005128578, -0.4792084940899386, -0.12031556603506743, 0.4749473822947472, 0.23572250843111675, 0.04118869363063382, -0.26982819623783527, 0.0006698988647499959, 0.22581835658949956, -0.09144999682445487, -0.34354820109768625, 0.22510263821953203, -0.4864165496906274, 0.3390115101315345, 0.20924282676022443, -0.17567365241441735, 0.0935631541506261, 0.08281245738859866, -0.38468217357713996, -0.09204702423941313, -0.40200177582947916, -0.34573686510049484, 0.0604496756878774, 0.012615100456947914, -0.14774430009103412, 0.3588612989408304, 0.07225889384692508, -0.3969579774883627, -0.28913874971640396, 0.012877630822472952, 0.45511635905842596, -0.19177861894521442, -0.45889714750449073, 0.3514100512444003, -0.22499409278258753, 0.28651423855326996, 0.27342246652462165, -0.22479296629159862, -0.4602059637223732, -0.05576467983967248, 0.3338397006727831, 0.3521800775213606, 0.47661640375647707, 0.05070639077696626, -0.10097998101087668, 0.05596090090799066, 0.05534568119137617, 0.20624619538096667, 0.3893381897174777, -0.18789003168236107, -0.1974182994887812, -0.20444914086358779, 0.4841687968278414, 0.10846625479247862, -0.25858545563052715, 0.030928440927020517, -0.13702307783694678, -0.27076522361798894, 0.17619620087508636, 0.30816246211988485, -0.27949720809386847, 0.045221606204211895, 0.006786943669343515, 0.4556195731010604, -0.015467713822783224, 0.2996778280486936, 0.4717915294913375, -0.08519764345145475, -0.3335569747819491, -0.03792969220075193, 0.18508405462394606, -0.3502749300908725, -0.07414674772632779, -0.171351127283895, -0.24209864609888498, 0.2575279676975839, -0.15982125109609768, 0.094057937586836, -0.2989690844923665, -0.3671254467924854, -0.42018251464321565, 0.38749885419025176, -0.19857770137940634, -0.03002161765239464, -0.36587895832421324, 0.22331447600723564, -0.49637774288941117, 0.32779699884742186, 0.007606898218526226, 0.48614853536786384, -0.13595965022752665, -0.43164527732906777, -0.4323268177206998, 0.33539538172214023, 0.2163051406989851, 0.08100541276814965, -0.30260995130882407, -0.03978963166579774, 0.07300973936320787, -0.3946448342733646, 0.10306181145982407, 0.3578651726396487, -0.2361393024637728, 0.16048661456231983, -0.041535998567713506, 0.44462898141351914, -0.4472912730128513, -0.20256526924345764, 0.24917773121447695, 0.4225002607311872, -0.49432812778376345, 0.16442563343126793, -0.22423913755419989, -0.33906857841708415, 0.015413464370283236, -0.476766321583991, -0.21757559367374313, -0.13661053456698014, 0.2266696828838981, -0.16322680762339914, 0.4873567174834257, -0.2575555349443093], "twirled_unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, 0.4731909991248422, -0.15171013965482416, 0.4607650836825492, -0.12315582717864615, 0.47110093793493135, 0.20420834050016623, 0.18029413960657692, 0.2520273229900738, 0.18624585452333164, -0.49105233325456865, 0.08201948178145457, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, 0.2926416855894409, -0.2567003523160629, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, 0.17073608461863543, -0.44990811567888755, 0.34029098228440446, -0.39341591753839467, 0.24481879726496558, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, -0.2846662038892873, 0.307376580132793, -0.4951949435326988, 0.49089066447141505, 0.0344985394231756, -0.17201116439296982, 0.31032298247400547, 0.07448506389936327, 0.20665942225402745, 0.08872518057716405, 0.42201221928209165, -0.4695275208591738, -0.1293619641527073, -0.33980968285915836, 0.1696033162756727, 0.1614914491827939, -0.3817490270312973, 0.13890870450366322, -0.24209820089131995, -0.49320924723211945, 0.4569557480242459, 0.32738600345714275, 0.24772931986974456, 0.30339346036759807, 0.385197581175035, -0.172704433349967, -0.1306577643126623, 0.05031939073900915, -0.42638081326169797, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, 0.026563378638172708, 0.1572765640302265, 0.27092919654169023, -0.2402723677717553, -0.3177048344177287, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.3948500346756276, 0.1185831188857982, -0.23219873717626527, 0.20566515099794458, 0.30565501841008924, -0.015880959898169067, -0.3057762984495298, -0.4168508201115806, 0.18571149745641335, -0.21220376686260067, 0.339972912082672, 0.3520932401429775, -0.06995349644153848, 0.08771408961433025, -0.34981970641761606, -0.3725604991977569, -0.00728211962388059, -0.4925164648993672, -0.22100626514078314, 0.03366269558096491, 0.2347203298500311, -0.3059358469084721, -0.004259973013947871, -0.07934844926123219, 0.20003673498231578, -0.4724426590122235, 0.4796988074039099, -0.2288914205712942, 0.3572385478026021, 0.2606958900527516, 0.06832291882974673, 0.06752295976617262, 0.006259113990971343, 0.4882741764914904, 0.1904833928861862, 0.38152574068700673, 0.2237896470331293, -0.14045948982839107, 0.17773461296227566, -0.21233047984366493, 0.18236373147040297, -0.3830795306205417, -0.356367840362811, 0.44639406555807426, 0.2705349101205172, -0.2164034875761871, 0.4047643307788249, -0.22063635836623874, 0.25125128247756123, -0.4689717709380474, 0.1617411090224934, 0.28028169533084935, -0.06018639817481031, -0.4031368826142234, -0.06717542216274452, -0.35829684548359, -0.49565929289516575, 0.38558393453215345, 0.38054151056773833, -0.3706034854176288, -0.4643162198608053, -0.45227955351385773, 0.10900193868114982, -0.03522460819027984, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, 0.3571480415801709, 0.4115821917662892, 0.12189580615840612, -0.44607081183047725, -0.08867370901765526, -0.37178913337915986, 0.44493207735456863], "unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366], "rc_base_cycle_loop_index": [11], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "current_seeds_q3": [9312591013124, 0], "pauli_seed_q3": [33932501327821, 57280048187710, 37250364052496], "unitaries_q1": [0.4413383368652397, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353, -0.0859309855169279, 0.35029365642154886, -0.21420182853494651, -0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.331149994774826, 0.42061281807632867, 0.10882401546969689, -0.20691047149288266, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028, 0.28977728519420864, -0.4127736568831999, 0.2284462147227977, 0.3062633617185391, 0.11338753441490113, 0.2184874815159965, 0.3822599408908971, 0.07358068439263832, -0.14088216697814104, 0.4980383678436553, -0.0769597740948278, -0.34622494807280546, -0.1375695796222196, -0.3886559574053656, -0.4641161820327113, -0.2877355696129733, 0.4151805693951154, -0.2457015010787451, -0.29923453998630123, -0.45957636539721136, -0.38195891683453453, 0.03859037256674469, -0.08978167650477431, -0.07808595139374575, 0.04165792706529814, 0.37243126123017944, -0.06256391649851878, 0.31177994003055787, -0.44384141722735393, 0.22776589100726952, -0.1144049988797704, -0.02604531885600636, -0.3880041097036475, -0.38290552515987386, 0.41894082221451256, 0.4452687082975473, 0.2319884785423838, -0.06429797336391019, -0.09823984663831453, -0.02791825279908622, 0.3647157726393928, -0.3337281049196612, -0.46163591823072636, 0.1337047764333228, -0.32533129436627917, 0.1765877048535387, -0.0638019217320398, 0.4878383579652166, -0.23889962098470718, 0.26096195281205326, -0.32494991468407974, -0.44882528698095925, 0.21751509762007615, 0.3802680530959428, 0.2730510105090431, 0.1723272746916713, -0.13920345844470106, 0.05584616229532102, -0.23214969542699038, -0.29959971333545354, 0.2797248113332209, -0.28722577580825615, -0.051803177141760415, -0.31241562029034853, 0.025135451800657904, -0.08074149417010545, -0.4186349836360712, -0.054728813629211004, 0.11199236531999546, -0.3310447281338149, 0.1961489222558832, -0.24364278945751394, -0.41373787501252934, -0.49075580494069726, -0.49500617846724637, 0.04517698380747248, 0.3736056255881408, -0.23042832066938956, 0.48660858755684444, 0.4355398681503253, -0.13488961790957887, 0.2813933307165257, -0.41366667379787003, -0.3576968962671607, 0.031850165179228895, 0.1215744180596694, -0.09788826968987507, -0.048175590932000745, 0.4487621872882883, 0.48170724460221237, -0.23451311792852536, 0.42923384599364667, -0.10022812594482033, -0.1703562718193048, 0.03370986586156732, -0.4221340290585829, -0.24309403223028525, -0.2626546274601331, -0.19190429382765473, -0.09016921524732169, -0.34710985644882797, 0.17828008632045567, -0.3344122924782482, 0.3960680926516851, -0.23762373139040704, 0.4386795731621973, -0.470821983982578, 0.024064861372878, 0.22827181533629215, 0.39866618977662327, 0.22346762715176283, -0.2957659620141371, 0.19835690373631465, 0.4120386922431365, 0.35908437707395535, 0.008288686447901483, 0.1907282900268754, -0.019769226618983282, 0.0488876292027669, 0.08227861161092775]} \ No newline at end of file +{"pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "break": [1], "current_seeds_q3": [9312591013124, 0], "unitaries_q3": [0.1391393899933604, 0.3499140847639808, 0.26350517884386804, 0.1472656749712904, 0.23230153972988887, -0.39187949288754353, -0.29619104176566324, 0.31659870927306955, -0.3039638195146246, 0.46737966354565685, -0.17676888165335924, 0.44602483355212996, 0.3078347140316957, 0.06713160476753188, 0.27818622794244163, -0.04949538092258976, 0.28147714842391025, -0.4283825898106137, 0.16208734362142252, 0.3156707770678331, 0.40276701807278315, -0.09105006943372729, 0.4544011513222337, -0.3713159707842202, 0.28779306223370327, -0.38382575941465547, 0.11316011308353424, -0.001920267390765673, -0.36844150855908353, 0.42746916897469234, -0.07684935298946982, 0.27359111467418273, -0.11689771197381305, -0.29338457479242663, 0.15067200142144088, 0.07555698804422306, -0.2481010063387039, -0.40098556977834576, 0.04834844132509275, -0.16242155511352507, 0.07222335297901239, -0.18433331386209062, 0.05534255703864943, -0.3484940255716431, -0.24168043211857082, 0.30736172898834013, -0.040868538388227904, -0.3603184301374789, 0.057042096430588884, 0.4635486460651279, 0.059857955898813486, -0.29246932438280737, 0.32866971539473866, -0.266571214753089, -0.26962263297919264, -0.3607562767338486, -0.452395860541948, -0.20421177279057545, -0.20113339303479094, -0.22631569268574836, -0.27463288514010387, -0.3604527858438047, 0.2630801876462492, 0.015507975569960308, -0.0985404879938514, -0.33205651562059657, -0.13945664967836535, -0.47061612189078517, -0.164535676673065, 0.1729345691125168, -0.46451875358569694, 0.14917813015098247, -0.42048729749866354, -0.13434157178704353, 0.15269761805101822, 0.24808159091771032, 0.20765958157400277, -0.4659885652818829, 0.40100747778062384, -0.44859711197042174, -0.242254432495578, 0.349967089436543, -0.13497024366043675, 0.40083945843355906, -0.4793331010252686, 0.3934275438587207, -0.2382759407985091, 0.15487290188413283, 0.43180210623468795, 0.08326984592501319, -0.3156654458410948, -0.4927041869662183, 0.1339055133984175, 0.2749318768129072, -0.15159345037332628, 0.1861417761145603, -0.32489774504065494, 0.470106309632758, -0.16719361903857433, 0.3445219070669907, -0.24621565493408326, -0.3244659508727459, 0.28215407592837494, -0.0137983800887298, 0.42086817973683566, 0.39419913065547263, -0.05415291685963908, -0.08453543324226942, 0.4239686119935584, 0.34030444323140685, 0.044508509998252066, -0.023066393122114448, -0.48930915320842416, 0.29783488740267217, 0.06719830312912123, -0.11103231378987388, -0.24331411385228208, 0.20449950183250465, 0.1299821135278343, 0.3145433331972818, 0.26509208350489644, -0.49999295905837826, -0.09368362642523564, -0.26730030984167286, -0.31229654366708104, 0.4112376446768877, -0.04148883294810446, 0.20177495493665631, -0.36470940806892926, -0.04201586027208393, -0.37064313157396, 0.33802453189878534, 0.4637018408847915, -0.24319845180762556, -0.28234963668558777, 0.14324863479629357, 0.356940705060687, -0.030082387532232246, -0.0005964757208687388, -0.4357636110311738, 0.01962215023295144, -0.38946260502694585, -0.148184702068189, 0.3952183640428153, 0.15772761410758207, 0.2579530131813108, -0.15884872513685266, -0.24582752492616677, -0.4733111322735368, -0.16227208081386024, 0.031927314607987256, -0.24405889874319442, -0.3657254027551211], "pauli_seed_q0": [-13838434709596, 60576142310008, 34470019755655], "rc_seed_index": [3], "unitary_angle_offset": [150], "pauli_seed_q3": [33932501327821, 57280048187710, 37250364052496], "unitaries_q1": [-0.05866166313476029, 0.16574731062717163, -0.2636358117380446, -0.34603826044352104, 0.19511749309766913, -0.0854317187436564, -0.4630714074908795, 0.44066757058091, 0.2944662830567353, 0.4140690144830721, 0.35029365642154886, 0.2857981714650535, -0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.47367514134620947, -0.3624484324247135, -0.04875864716369449, -0.029349912099974063, -0.1734552494365822, -0.1822764510861603, -0.16885000522517402, 0.42061281807632867, 0.10882401546969689, -0.20691047149288266, -0.32399096841614394, -0.49089954872644626, 0.48333014377647743, 0.36823843839154335, 0.03572518135114322, -0.4296253413034954, 0.3395366446713197, -0.21022271480579136, -0.4127736568831999, 0.2284462147227977, 0.3062633617185391, 0.11338753441490113, 0.2184874815159965, -0.1177400591091029, 0.4264193156073617, 0.14088216697814104, 0.001961632156344706, -0.4230402259051722, 0.15377505192719454, 0.3624304203777804, -0.11134404259463437, -0.03588381796728868, -0.2122644303870267, 0.4151805693951154, -0.2542984989212549, 0.29923453998630123, -0.04042363460278864, -0.38195891683453453, 0.03859037256674469, -0.4102183234952257, -0.42191404860625425, -0.04165792706529814, 0.12756873876982056, 0.4374360835014812, 0.31177994003055787, -0.44384141722735393, -0.2722341089927305, 0.3855950011202296, -0.02604531885600636, 0.11199589029635248, 0.11709447484012614, 0.08105917778548744, 0.05473129170245272, -0.2319884785423838, -0.06429797336391019, -0.40176015336168547, 0.02791825279908622, 0.3647157726393928, 0.3337281049196612, 0.46163591823072636, 0.3662952235666772, 0.17466870563372083, -0.3234122951464613, -0.0638019217320398, -0.012161642034783426, 0.2611003790152928, 0.26096195281205326, -0.32494991468407974, -0.44882528698095925, 0.28248490237992385, -0.3802680530959428, 0.22694898949095688, 0.3276727253083287, -0.13920345844470106, 0.05584616229532102, -0.23214969542699038, -0.29959971333545354, -0.2202751886667791, -0.28722577580825615, 0.4481968228582396, 0.18758437970965147, 0.4748645481993421, 0.08074149417010545, -0.08136501636392879, -0.054728813629211004, 0.38800763468000454, 0.3310447281338149, 0.3038510777441168, -0.24364278945751394, 0.08626212498747066, -0.00924419505930274, 0.49500617846724637, -0.04517698380747248, 0.3736056255881408, -0.26957167933061044, -0.48660858755684444, 0.0644601318496747, -0.13488961790957887, 0.2813933307165257, -0.08633332620212997, 0.3576968962671607, -0.031850165179228895, 0.3784255819403306, 0.4021117303101249, 0.45182440906799926, 0.4487621872882883, 0.48170724460221237, -0.23451311792852536, 0.07076615400635333, -0.39977187405517967, -0.3296437281806952, 0.4662901341384327, -0.4221340290585829, 0.25690596776971475, -0.23734537253986687, -0.3080957061723453, 0.09016921524732169, -0.15289014355117203, -0.32171991367954433, -0.3344122924782482, 0.10393190734831492, 0.23762373139040704, -0.4386795731621973, -0.02917801601742198, -0.475935138627122, -0.27172818466370785, 0.10133381022337673, 0.2765323728482372, 0.2957659620141371, 0.19835690373631465, -0.4120386922431365, -0.35908437707395535, 0.008288686447901483, -0.1907282900268754, 0.019769226618983282, 0.4511123707972331, -0.41772138838907225], "current_seeds_q2": [39601121661092, 0], "unitaries_q4": [0.3561709325161395, 0.15930777969874654, -0.1743684630615263, 0.4351044771524286, 0.28767067813391023, -0.3850164367160822, -0.2274652035708229, -0.3827096860492283, 0.45029847827993663, 0.1842763715344553, -0.41355170309384803, -0.42663540638547204, 0.36188219450578885, -0.3457670284594414, -0.15275135756452585, 0.4245576725424698, 0.47429673001817463, -0.3892952004514818, -0.013522917225923692, -0.38958018352982293, -0.0991753452905968, 0.057971222727459804, 0.0013192802017201188, -0.1269807880766507, 0.2079581260693928, 0.42226643955146415, -0.36467306303264735, -0.25650899991671494, -0.04450288027668847, 0.01901360816674824, 0.08946454111710267, 0.2402180005128578, -0.4792084940899386, -0.12031556603506743, 0.0250526177052528, -0.23572250843111675, 0.4588113063693662, -0.26982819623783527, -0.0006698988647499959, 0.27418164341050044, -0.09144999682445487, 0.34354820109768625, -0.22510263821953203, -0.4864165496906274, 0.16098848986846548, -0.20924282676022443, -0.17567365241441735, 0.4064368458493739, 0.41718754261140134, -0.11531782642286004, 0.40795297576058687, 0.09799822417052084, -0.15426313489950516, -0.0604496756878774, 0.4873848995430521, -0.14774430009103412, -0.3588612989408304, -0.07225889384692508, -0.1030420225116373, -0.28913874971640396, -0.48712236917752705, 0.45511635905842596, -0.19177861894521442, -0.45889714750449073, 0.14858994875559972, -0.27500590721741247, 0.21348576144673004, 0.22657753347537835, 0.2752070337084014, 0.03979403627762679, -0.4442353201603275, 0.16616029932721688, -0.3521800775213606, 0.02338359624352293, -0.44929360922303374, 0.3990200189891233, 0.44403909909200934, -0.05534568119137617, -0.20624619538096667, 0.3893381897174777, 0.18789003168236107, 0.1974182994887812, -0.2955508591364122, 0.4841687968278414, -0.3915337452075214, -0.25858545563052715, 0.030928440927020517, 0.3629769221630532, -0.27076522361798894, 0.17619620087508636, 0.30816246211988485, -0.22050279190613153, -0.045221606204211895, -0.006786943669343515, 0.4556195731010604, 0.015467713822783224, -0.2996778280486936, 0.028208470508662487, -0.08519764345145475, 0.16644302521805088, -0.03792969220075193, 0.18508405462394606, 0.14972506990912748, -0.07414674772632779, 0.328648872716105, -0.24209864609888498, 0.2424720323024161, -0.3401787489039023, 0.405942062413164, -0.20103091550763352, 0.13287455320751462, -0.42018251464321565, 0.11250114580974824, -0.30142229862059366, 0.03002161765239464, -0.13412104167578676, -0.27668552399276436, 0.0036222571105888335, 0.17220300115257814, 0.4923931017814738, -0.48614853536786384, -0.13595965022752665, -0.06835472267093223, 0.4323268177206998, 0.16460461827785977, 0.2163051406989851, -0.41899458723185035, -0.30260995130882407, -0.03978963166579774, 0.07300973936320787, -0.3946448342733646, -0.39693818854017593, -0.14213482736035132, -0.2638606975362272, -0.16048661456231983, 0.041535998567713506, 0.44462898141351914, -0.05270872698714868, 0.20256526924345764, 0.25082226878552305, -0.07749973926881282, -0.49432812778376345, 0.16442563343126793, 0.2757608624458001, -0.33906857841708415, 0.015413464370283236, -0.476766321583991, -0.21757559367374313, -0.13661053456698014, -0.2733303171161019, -0.16322680762339914, 0.4873567174834257, -0.2575555349443093], "unitaries_q5": [-0.3523655032636981, -0.02982383579946557, -0.10818748535482214, -0.08224466886184345, 0.1421966046050187, 0.01270078766836491, -0.06749647647991353, 0.33718026623042263, -0.4060099204461167, 0.006147254774553801, -0.46638325260883207, -0.0012805537257918331, -0.06395260206394227, 0.42669180084460834, 0.21307543060681766, 0.25184484520283945, -0.04695450904013043, -0.034431004261108455, -0.16023559653162067, -0.4286080980977829, 0.006533788792925321, -0.15108942830796224, -0.16973595141633524, -0.4640305854546334, 0.2594576184647792, -0.47536385322475994, -0.19898137960705853, 0.34944888927433126, -0.4517202267473799, -0.40414800994601663, -0.2688553214909426, 0.4080108407893448, -0.47375066433987456, -0.45789847698850394, -0.1263570230985671, 0.05033026365363469, -0.31528408852996037, 0.22209464950747915, -0.19181515167520402, -0.04329571005713717, -0.44837515414589646, 0.27532068950345234, -0.0018099136404750027, -0.19183373180161212, -0.08989206223426649, -0.0606320128179334, 0.3895360459685939, 0.4645186199840978, -0.4166612458861003, -0.09363949354701617, 0.35403154747492493, 0.47525033883493606, -0.23085345372970778, -0.3506115951917508, -0.25057605454827936, 0.03926142529488885, 0.0683214244310868, -0.3368314462919706, 0.16676615434938213, 0.07042281291563057, -0.4819707863313134, -0.08844771735993007, 0.4359695622379647, -0.23915837277042584, -0.15250960465322905, -0.14221574910517631, -0.4446150541983229, 0.42146272083316205, -0.05095620533766265, -0.4701366520330339, 0.23983478541006065, 0.04457939964792956, 0.0949861858722656, -0.4587594520384535, 0.4785886111955051, -0.2038805182551222, -0.19406954145355826, 0.05014170949665697, 0.4927434615147064, -0.11583861802757767, -0.003375528733023714, -0.024186816646199816, 0.04010182534098661, -0.4701814934734365, -0.08840251534018151, 0.17989478168061623, -0.0903669192227099, -0.17234163259659496, -0.14684326874886722, 0.35286990719531985, 0.008284239455456088, -0.18632278626897403, -0.22671009548664145, 0.3151644686303072, -0.3582880776236159, -0.1299930696273428, 0.4315777811850623, -0.4798450747618155, 0.2746584166331445, -0.4304092442926617, 0.4087331555338629, 0.2290713600754941, -0.08391168428384432, 0.026823391235140548, 0.3385793110512054, 0.47488495966217315, -0.3241644198746023, -0.4594178215880298, -0.0397716594608859, -0.22252193154559308, -0.3300275558178356, -0.31432395345237296, -0.39502253008086896, 0.3267765004553098, 0.044003828494144415, 0.3042906055041641, 0.336363242599127, 0.09868818408994784, 0.010825877707873133, -0.1878725186798782, 0.18507889029994473, 0.49508009549425225, -0.0009657512677527791, -0.04683467905802274, -0.4080023001230728, -0.10747107417268609, 0.29401985466313363, -0.013393126915598685, 0.18171358684117678, 0.2842846542615298, -0.1427166159187223, -0.4126953152594375, 0.3655905624561022, -0.012705678984413993, 0.2136098950308245, 0.2916533976215483, -0.07888475516168114, -0.15880830322828388, -0.4252690365313754, 0.006885244277846425, -0.13758097991771123, 0.3263959116705948, 0.10400532465974877, 0.1441621014734693, -0.2673319326285508, -0.39098929001973914, -0.4738379459893878, 0.01358893291052965, 0.10378879473415736, -0.001148813495461809, -0.42979533976771833, 0.36296237003429255, 0.16692971480773267], "current_seeds_q4": [4258326626610, 1], "current_seeds_q5": [52035627456196, 3], "pauli_seed_q5": [129378273583824, -62630319121345, -73332466885869], "pauli_seed_q2": [-12771350299406, 505245418846, -123070490066287], "pauli_seed_q1": [27946020799016, -50982158722643, 119343881614275], "current_seeds_q1": [29835970403568, 3], "pauli_seed_q4": [114829320934051, 114697805194205, 17033306506441], "rc_base_cycle_loop_index": [11], "current_seeds_q0": [8617504938913, 0], "unitaries_q2": [-0.4019790567990782, -0.2997854884655027, -0.2146600639917331, -0.20712762310916233, -0.1596973714315837, -0.0939424389279786, 0.258661210979799, 0.185835345332638, 0.37074082635203354, -0.1459133170689384, -0.49502490236521624, 0.4839970882809759, -0.08345406647035958, 0.4894086579308805, 0.4878037862215372, 0.27065954885196675, -0.3557583954986825, -0.17232005968702424, -0.09765967699654254, 0.32971884186395783, 0.3448177027767301, -0.4584829871144649, 0.4149028637475425, -0.4395043820559579, 0.4439617577671342, -0.21225113115551508, -0.054088724382374664, -0.26107100081415524, -0.125309330460194, 0.43990725762775185, 0.010386244418349122, -0.09969150290183748, -0.09760467302807996, -0.27427209221451676, 0.3886045247436556, -0.06799602130666571, 0.1361132465678203, 0.28223449889285135, -0.37723253512500676, -0.08321214542590027, 0.049327067215809706, 0.49557296959474684, -0.3734479866783218, -0.23743022668724834, 0.03058157694307795, 0.40620047609760235, 0.3026868194586001, -0.38195938546995833, -0.05462618005151043, 0.42864767691576233, -0.2489185291095879, -0.360256209977063, 0.41662052915091863, 0.06818086771210474, 0.332787550432343, -0.11279071962259124, 0.1117919539837331, 0.2139590450458222, -0.07146406679243711, 0.3426108370944938, -0.17441844222633307, -0.41876241161401495, 0.2945216264292476, 0.473611069732506, -0.12163916492427163, -0.4215773447368427, 0.1074682243229077, 0.24049247889338332, 0.2576621611626244, 0.1429872906517069, 0.30679885635126425, 0.31083483837065273, 0.13975925770959208, 0.14025912357401893, 0.0910327241743758, 0.32314465208837007, 0.03174013943286624, -0.47190455232954776, 0.2887878538088948, 0.4746938851849194, -0.26423218009021454, -0.41683949717481283, 0.18151724721489515, -0.400213131759525, 0.3517301944760227, -0.4484182951348821, -0.12568734236262458, 0.013415985191134183, 0.16852369824665203, -0.021009841695313725, 0.47988603256257534, 0.4355275222892274, -0.41194756325326765, -0.1870609049750307, 0.12239531945394688, -0.3109844258745511, 0.13609816715567646, 0.4611227243477174, -0.27559479547496224, 0.3319088786549962, 0.36306701332482305, -0.20914928335500704, 0.13952487632665367, 0.35148149681080554, 0.44237399269967526, -0.20788732949937128, -0.07874238083052987, -0.23151096046864694, 0.05653346877788934, 0.1360182062364892, -0.2380340409652426, -0.3971106996721616, 0.3580204827871398, 0.3404604798712434, -0.15289293302358686, 0.37510373420446186, 0.3493587470698003, -0.3624805003573677, 0.4916932343136651, -0.49151633052607124, 0.30633288698527394, 0.3064881637397292, 0.32961147597468354, 0.4190199539448187, 0.3060016188269046, -0.46421182113421366, 0.49744699376657664, 0.3195963535447355, -0.15802194225340926, 0.42257028044813794, 0.2133535953466037, -0.4519319428775823, -0.12794233735865745, -0.028811953574859217, 0.051318289743722545, 0.15650842079780958, -0.16903330759792823, 0.40536961273727457, -0.31216367909048515, 0.13905289215915317, -0.3402185204002137, 0.05617742517105029, -0.06458650101018293, -0.28983445160504573, 0.30954878428748955, -0.4245386550744783, 0.46306895003329274, -0.015578394763785752, -0.36523204230856265, 0.4436889471407035, 0.3715304328143034, -0.30860653936796467, -0.4794655985094849], "unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, 0.4731909991248422, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, 0.31375414547666836, -0.008947666745431349, 0.08201948178145457, -0.2163845393922088, 0.31819606673195366, 0.4447669819517266, -0.20735831441055907, 0.24329964768393708, -0.03291592648032449, -0.1566001925728422, -0.03297551316599012, -0.012842477370785588, -0.17073608461863543, -0.050091884321112445, 0.15970901771559554, 0.10658408246160533, -0.2551812027350344, 0.21711220189177283, 0.3225331758216612, -0.3927726383275072, -0.44759812516522146, -0.09988083390955893, 0.2846662038892873, 0.192623419867207, 0.0048050564673012275, -0.00910933552858495, 0.4655014605768244, -0.3279888356070302, 0.18967701752599453, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, -0.1293619641527073, -0.16019031714084164, -0.1696033162756727, 0.3385085508172061, -0.3817490270312973, -0.13890870450366322, -0.25790179910868005, -0.006790752767880548, 0.4569557480242459, -0.17261399654285725, 0.24772931986974456, -0.19660653963240193, 0.385197581175035, -0.327295566650033, -0.3693422356873377, 0.44968060926099085, -0.07361918673830203, 0.23771009850518965, 0.1496960222960304, -0.21221815451668746, 0.43123595744645016, 0.23108886334528123, -0.4803542081018186, 0.026563378638172708, 0.1572765640302265, 0.22907080345830977, -0.2597276322282447, 0.3177048344177287, -0.06033192657007902, -0.447220912180196, -0.3829003034514109, 0.10514996532437237, 0.1185831188857982, 0.26780126282373473, 0.20566515099794458, -0.19434498158991076, -0.015880959898169067, -0.3057762984495298, -0.4168508201115806, 0.18571149745641335, -0.21220376686260067, -0.160027087917328, -0.1479067598570225, -0.06995349644153848, -0.41228591038566975, -0.34981970641761606, -0.1274395008022431, 0.00728211962388059, 0.4925164648993672, -0.22100626514078314, 0.4663373044190351, 0.2652796701499689, -0.3059358469084721, -0.49574002698605213, 0.07934844926123219, 0.2999632650176842, 0.027557340987776513, -0.02030119259609009, -0.2711085794287058, -0.3572385478026021, -0.2606958900527516, 0.4316770811702533, 0.06752295976617262, -0.49374088600902866, 0.4882741764914904, -0.3095166071138138, -0.11847425931299327, 0.2237896470331293, -0.14045948982839107, 0.17773461296227566, -0.21233047984366493, -0.31763626852959703, 0.11692046937945832, -0.143632159637189, 0.05360593444192574, -0.2705349101205172, -0.2164034875761871, 0.0952356692211751, -0.27936364163376126, 0.24874871752243877, 0.031028229061952572, 0.1617411090224934, 0.28028169533084935, -0.06018639817481031, -0.4031368826142234, -0.4328245778372555, 0.35829684548359, -0.004340707104834252, 0.38558393453215345, 0.11945848943226167, -0.12939651458237122, -0.03568378013919471, 0.047720446486142265, 0.10900193868114982, -0.03522460819027984, 0.2781207104770047, -0.49150594401294256, 0.018503482111370317, -0.05312386930746982, 0.0822904548108383, 0.1617067159553649, -0.14285195841982912, -0.08841780823371082, 0.12189580615840612, -0.44607081183047725, -0.08867370901765526, -0.37178913337915986, 0.44493207735456863]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration11].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration11].json index 2dc7b860d..70c17fa26 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration11].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration11].json @@ -1 +1 @@ -{"break": [1], "pauli_seed_q5": [129378273583824, -62630319121345, -73332466885869], "twirled_unitaries_q3": [0.2481010063387039, -0.40098556977834576, 0.45165155867490725, 0.16242155511352507, 0.07222335297901239, -0.3156666861379094, -0.05534255703864943, -0.1515059744283569, 0.2583195678814292, 0.30736172898834013, -0.040868538388227904, -0.3603184301374789, 0.057042096430588884, 0.4635486460651279, 0.059857955898813486, -0.29246932438280737, 0.32866971539473866, -0.266571214753089, 0.23037736702080736, -0.3607562767338486, 0.047604139458051975, -0.20421177279057545, -0.20113339303479094, -0.22631569268574836, -0.27463288514010387, -0.3604527858438047, 0.2630801876462492, 0.015507975569960308, -0.0985404879938514, -0.33205651562059657, 0.36054335032163465, -0.029383878109214834, 0.164535676673065, -0.1729345691125168, -0.03548124641430306, -0.35082186984901753, -0.42048729749866354, -0.13434157178704353, 0.15269761805101822, 0.24808159091771032, 0.20765958157400277, -0.4659885652818829, 0.40100747778062384, -0.44859711197042174, -0.242254432495578, -0.15003291056345702, -0.36502975633956325, 0.09916054156644094, 0.4793331010252686, 0.3934275438587207, -0.2617240592014909, 0.34512709811586717, 0.06819789376531205, -0.4167301540749868, -0.3156654458410948, -0.4927041869662183, 0.1339055133984175, 0.2749318768129072, -0.3484065496266737, -0.1861417761145603, -0.17510225495934506, 0.029893690367241987, 0.3328063809614257, 0.3445219070669907, -0.25378434506591674, -0.17553404912725412, -0.28215407592837494, -0.4862016199112702, -0.07913182026316434, 0.39419913065547263, -0.05415291685963908, 0.4154645667577306, -0.0760313880064416, 0.34030444323140685, -0.45549149000174793, -0.023066393122114448, -0.010690846791575837, -0.29783488740267217, 0.43280169687087877, -0.11103231378987388, 0.24331411385228208, -0.20449950183250465, 0.1299821135278343, 0.18545666680271822, 0.23490791649510356, -7.040941621738739e-06, 0.40631637357476436, -0.26730030984167286, -0.31229654366708104, -0.08876235532311227, 0.45851116705189554, 0.20177495493665631, -0.36470940806892926, 0.4579841397279161, -0.12935686842604, 0.16197546810121466, -0.4637018408847915, -0.24319845180762556, -0.21765036331441223, -0.14324863479629357, 0.356940705060687, -0.46991761246776775, 0.0005964757208687388, -0.06423638896882622, -0.48037784976704856, 0.11053739497305415, -0.351815297931811, -0.3952183640428153, 0.34227238589241793, 0.2420469868186892, 0.34115127486314734, -0.24582752492616677, -0.026688867726463172, 0.16227208081386024, -0.031927314607987256, -0.2559411012568056, 0.1342745972448789, 0.3561709325161395, 0.34069222030125346, -0.3256315369384737, 0.06489552284757139, 0.21232932186608977, -0.3850164367160822, 0.2725347964291771, -0.11729031395077172, 0.04970152172006337, 0.3157236284655447, -0.41355170309384803, 0.42663540638547204, -0.36188219450578885, -0.1542329715405586, 0.34724864243547415, -0.07544232745753021, 0.47429673001817463, 0.1107047995485182, 0.4864770827740763, -0.38958018352982293, 0.4008246547094032, 0.057971222727459804, 0.4986807197982799, 0.1269807880766507, -0.2079581260693928, 0.42226643955146415, -0.13532693696735265, 0.25650899991671494, -0.4554971197233115, -0.48098639183325176, -0.41053545888289733, 0.2597819994871422, -0.020791505910061403, -0.37968443396493257, 0.4749473822947472, -0.23572250843111675, 0.4588113063693662, -0.23017180376216473, -0.49933010113525, 0.22581835658949956, -0.40855000317554513, -0.15645179890231375, -0.22510263821953203, -0.4864165496906274, 0.16098848986846548, 0.29075717323977557, -0.32432634758558265, 0.0935631541506261], "pauli_seed_q3": [33932501327821, 57280048187710, 37250364052496], "unitary_angle_offset": [162], "rc_seed_index": [3], "unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353, -0.0859309855169279, 0.35029365642154886, -0.21420182853494651], "current_seeds_q3": [36377308645, 0], "current_seeds_q0": [33662128667, 0], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "unitaries_q4": [0.08281245738859866, -0.38468217357713996, 0.40795297576058687, 0.09799822417052084, -0.34573686510049484, -0.4395503243121226, 0.012615100456947914, -0.3522556999089659, 0.1411387010591696, 0.4277411061530749, -0.3969579774883627, -0.21086125028359604, -0.012877630822472952, 0.04488364094157404, 0.3082213810547856, -0.45889714750449073, 0.14858994875559972, -0.27500590721741247, -0.28651423855326996, 0.27342246652462165, 0.22479296629159862, 0.4602059637223732, -0.05576467983967248, 0.16616029932721688, 0.1478199224786394, 0.47661640375647707, 0.44929360922303374, 0.10097998101087668, 0.44403909909200934, 0.05534568119137617, 0.20624619538096667, 0.11066181028252231, 0.18789003168236107, 0.1974182994887812, -0.2955508591364122, 0.4841687968278414, -0.3915337452075214, -0.25858545563052715, -0.4690715590729795, 0.3629769221630532, -0.27076522361798894, 0.17619620087508636, 0.30816246211988485, -0.22050279190613153, 0.4547783937957881, 0.4932130563306565, 0.4556195731010604, -0.4845322861772168, -0.2996778280486936, 0.028208470508662487, -0.08519764345145475, 0.16644302521805088, -0.03792969220075193, -0.31491594537605394, -0.3502749300908725, -0.4258532522736722, -0.328648872716105, 0.24209864609888498, 0.2424720323024161, -0.15982125109609768, 0.094057937586836, -0.20103091550763352, 0.3671254467924854, 0.42018251464321565, 0.38749885419025176, 0.19857770137940634, 0.03002161765239464, -0.36587895832421324, -0.22331447600723564, -0.0036222571105888335, 0.17220300115257814, -0.4923931017814738, 0.48614853536786384, -0.36404034977247335, 0.43164527732906777, -0.06767318227930019, 0.16460461827785977, -0.2836948593010149, 0.08100541276814965, -0.19739004869117593, 0.03978963166579774, 0.42699026063679213, -0.3946448342733646, 0.39693818854017593, -0.3578651726396487, -0.2638606975362272, -0.33951338543768017, 0.4584640014322865, 0.05537101858648086, -0.05270872698714868, -0.29743473075654236, 0.24917773121447695, -0.4225002607311872, 0.49432812778376345, 0.16442563343126793, -0.2757608624458001, -0.16093142158291585, 0.015413464370283236, -0.023233678416008985, -0.28242440632625687, -0.13661053456698014, -0.2266696828838981, -0.33677319237660086, 0.012643282516574317, 0.24244446505569073, -0.3523655032636981, -0.02982383579946557, -0.10818748535482214, 0.41775533113815655, 0.3578033953949813, 0.4872992123316351, 0.06749647647991353, 0.33718026623042263, -0.09399007955388328, -0.006147254774553801, -0.033616747391167934, 0.49871944627420817, -0.06395260206394227, 0.42669180084460834, 0.21307543060681766, 0.25184484520283945, -0.04695450904013043, -0.034431004261108455, 0.33976440346837933, -0.07139190190221711, 0.4934662112070747, 0.15108942830796224, -0.33026404858366476, -0.4640305854546334, 0.2594576184647792, -0.024636146775240064, 0.19898137960705853, 0.15055111072566874, -0.04827977325262012, -0.40414800994601663, -0.2688553214909426, 0.0919891592106552, -0.02624933566012544, 0.45789847698850394, -0.3736429769014329, 0.05033026365363469, 0.18471591147003963, 0.22209464950747915, -0.19181515167520402, -0.04329571005713717, -0.05162484585410354, -0.27532068950345234, -0.498190086359525, -0.19183373180161212, -0.4101079377657335, 0.0606320128179334, 0.3895360459685939, -0.4645186199840978, -0.08333875411389968, -0.4063605064529838, -0.14596845252507507, -0.02474966116506394, -0.2691465462702922, 0.3506115951917508, 0.25057605454827936, 0.46073857470511115, -0.4316785755689132, -0.3368314462919706, 0.16676615434938213, 0.07042281291563057], "twirled_unitaries_q2": [0.0560382422328658, -0.2877488688444849, 0.44591127561762534, 0.23892899918584476, -0.374690669539806, -0.43990725762775185, -0.010386244418349122, -0.4003084970981625, -0.09760467302807996, 0.22572790778548324, 0.3886045247436556, -0.06799602130666571, 0.1361132465678203, 0.28223449889285135, 0.12276746487499324, -0.08321214542590027, 0.4506729327841903, 0.004427030405253163, 0.3734479866783218, -0.26256977331275166, -0.46941842305692205, -0.09379952390239765, 0.3026868194586001, -0.38195938546995833, -0.05462618005151043, 0.42864767691576233, -0.2489185291095879, -0.360256209977063, 0.41662052915091863, 0.06818086771210474, 0.332787550432343, -0.38720928037740876, 0.3882080460162669, -0.2139590450458222, -0.4285359332075629, -0.1573891629055062, 0.32558155777366693, -0.41876241161401495, -0.20547837357075238, -0.026388930267494004, -0.3783608350757284, -0.07842265526315728, 0.3925317756770923, 0.2595075211066167, 0.2576621611626244, 0.1429872906517069, 0.30679885635126425, -0.18916516162934727, 0.13975925770959208, 0.35974087642598107, -0.0910327241743758, -0.32314465208837007, 0.03174013943286624, 0.47190455232954776, 0.21121214619110518, 0.4746938851849194, 0.26423218009021454, 0.41683949717481283, 0.31848275278510485, 0.099786868240475, -0.14826980552397728, -0.4484182951348821, 0.3743126576373754, -0.4865840148088658, 0.16852369824665203, -0.021009841695313725, -0.020113967437424662, 0.4355275222892274, 0.08805243674673235, -0.1870609049750307, 0.3776046805460531, -0.1890155741254489, 0.36390183284432354, 0.038877275652282606, -0.27559479547496224, -0.1680911213450038, 0.36306701332482305, -0.20914928335500704, 0.13952487632665367, 0.14851850318919446, -0.44237399269967526, -0.2921126705006287, -0.42125761916947013, -0.23151096046864694, -0.44346653122211066, 0.1360182062364892, 0.2619659590347574, -0.3971106996721616, 0.14197951721286017, 0.1595395201287566, -0.34710706697641314, 0.37510373420446186, -0.3493587470698003, 0.3624805003573677, 0.008306765686334927, 0.008483669473928757, 0.30633288698527394, 0.3064881637397292, 0.32961147597468354, 0.4190199539448187, 0.19399838117309542, 0.46421182113421366, -0.49744699376657664, 0.18040364645526452, 0.34197805774659074, 0.42257028044813794, 0.2866464046533963, 0.4519319428775823, -0.37205766264134255, -0.028811953574859217, -0.051318289743722545, -0.15650842079780958, -0.33096669240207177, 0.40536961273727457, -0.31216367909048515, 0.3609471078408468, 0.3402185204002137, -0.05617742517105029, -0.06458650101018293, -0.21016554839495427, -0.30954878428748955, -0.4245386550744783, -0.46306895003329274, -0.48442160523621425, -0.13476795769143735, 0.4436889471407035, 0.3715304328143034, -0.30860653936796467, 0.02053440149051511, 0.1391393899933604, 0.3499140847639808, -0.23649482115613196, 0.1472656749712904, 0.23230153972988887, -0.39187949288754353, 0.20380895823433676, 0.18340129072693045, -0.1960361804853754, -0.46737966354565685, -0.17676888165335924, -0.44602483355212996, -0.3078347140316957, 0.06713160476753188, -0.27818622794244163, -0.45050461907741024, 0.28147714842391025, 0.4283825898106137, -0.16208734362142252, 0.3156707770678331, 0.09723298192721685, 0.09105006943372729, 0.04559884867776631, -0.3713159707842202, -0.21220693776629673, -0.38382575941465547, 0.11316011308353424, 0.4980797326092343, -0.36844150855908353, -0.07253083102530766, 0.4231506470105302, 0.27359111467418273, -0.11689771197381305, 0.20661542520757337, 0.3493279985785591, -0.07555698804422306], "pauli_seed_q2": [-12771350299406, 505245418846, -123070490066287], "current_seeds_q4": [16634088385, 1], "unitaries_q1": [-0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.331149994774826, 0.42061281807632867, 0.10882401546969689, -0.20691047149288266, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028, 0.28977728519420864, -0.4127736568831999, 0.2284462147227977, 0.3062633617185391, 0.11338753441490113, 0.2184874815159965, 0.3822599408908971, 0.07358068439263832, -0.14088216697814104, 0.4980383678436553, -0.0769597740948278, -0.34622494807280546, -0.1375695796222196, -0.3886559574053656, -0.4641161820327113, -0.2877355696129733, 0.4151805693951154, -0.2457015010787451, -0.29923453998630123, -0.45957636539721136, -0.38195891683453453, 0.03859037256674469, -0.08978167650477431, -0.07808595139374575, 0.04165792706529814, 0.37243126123017944, -0.06256391649851878, 0.31177994003055787, -0.44384141722735393, 0.22776589100726952, -0.1144049988797704, -0.02604531885600636, -0.3880041097036475, -0.38290552515987386, 0.41894082221451256, 0.4452687082975473, 0.2319884785423838, -0.06429797336391019, -0.09823984663831453, -0.02791825279908622, 0.3647157726393928, -0.3337281049196612, -0.46163591823072636, 0.1337047764333228, -0.32533129436627917, 0.1765877048535387, -0.0638019217320398, 0.4878383579652166, -0.23889962098470718, 0.26096195281205326, -0.32494991468407974, -0.44882528698095925, 0.21751509762007615, 0.3802680530959428, 0.2730510105090431, 0.1723272746916713, -0.13920345844470106, 0.05584616229532102, -0.23214969542699038, -0.29959971333545354, 0.2797248113332209, -0.28722577580825615, -0.051803177141760415, -0.31241562029034853, 0.025135451800657904, -0.08074149417010545, -0.4186349836360712, -0.054728813629211004, 0.11199236531999546, -0.3310447281338149, 0.1961489222558832, -0.24364278945751394, -0.41373787501252934, -0.49075580494069726, -0.49500617846724637, 0.04517698380747248, 0.3736056255881408, -0.23042832066938956, 0.48660858755684444, 0.4355398681503253, -0.13488961790957887, 0.2813933307165257, -0.41366667379787003, -0.3576968962671607, 0.031850165179228895, 0.1215744180596694, -0.09788826968987507, -0.048175590932000745, 0.4487621872882883, 0.48170724460221237, -0.23451311792852536, 0.42923384599364667, -0.10022812594482033, -0.1703562718193048, 0.03370986586156732, -0.4221340290585829, -0.24309403223028525, -0.2626546274601331, -0.19190429382765473, -0.09016921524732169, -0.34710985644882797, 0.17828008632045567, -0.3344122924782482, 0.3960680926516851, -0.23762373139040704, 0.4386795731621973, -0.470821983982578, 0.024064861372878, 0.22827181533629215, 0.39866618977662327, 0.22346762715176283, -0.2957659620141371, 0.19835690373631465, 0.4120386922431365, 0.35908437707395535, 0.008288686447901483, 0.1907282900268754, -0.019769226618983282, 0.0488876292027669, 0.08227861161092775, -0.4019790567990782, -0.2997854884655027, -0.2146600639917331, 0.29287237689083767, -0.1596973714315837, 0.4060575610720214, 0.258661210979799, 0.185835345332638, 0.37074082635203354, -0.1459133170689384, -0.004975097634783765, -0.4839970882809759, -0.4165459335296404, 0.4894086579308805, 0.012196213778462806, 0.22934045114803325, -0.1442416045013175, 0.32767994031297576, 0.40234032300345746, 0.32971884186395783, 0.3448177027767301, -0.4584829871144649, 0.08509713625245752, -0.060495617944042124], "pauli_seed_q0": [-13838434709596, 60576142310008, 34470019755655], "unitaries_q3": [-0.2518989936612961, -0.09901443022165424, -0.45165155867490725, 0.3375784448864749, 0.4277766470209876, -0.3156666861379094, 0.44465744296135057, -0.1515059744283569, 0.2583195678814292, 0.30736172898834013, -0.040868538388227904, 0.13968156986252112, 0.057042096430588884, 0.4635486460651279, -0.4401420441011865, 0.20753067561719263, 0.32866971539473866, 0.23342878524691102, 0.23037736702080736, -0.13924372326615142, -0.047604139458051975, 0.20421177279057545, -0.29886660696520906, 0.27368430731425164, 0.22536711485989613, -0.3604527858438047, 0.2630801876462492, 0.015507975569960308, -0.0985404879938514, -0.33205651562059657, 0.36054335032163465, -0.029383878109214834, -0.335464323326935, -0.1729345691125168, -0.46451875358569694, -0.14917813015098247, 0.42048729749866354, -0.13434157178704353, -0.15269761805101822, -0.24808159091771032, 0.20765958157400277, -0.03401143471811707, 0.09899252221937616, -0.051402888029578264, 0.257745567504422, 0.349967089436543, -0.13497024366043675, 0.40083945843355906, 0.020666898974731396, 0.1065724561412793, 0.2382759407985091, -0.15487290188413283, 0.06819789376531205, 0.08326984592501319, -0.3156654458410948, -0.007295813033781684, -0.1339055133984175, 0.2250681231870928, -0.15159345037332628, -0.1861417761145603, 0.32489774504065494, 0.470106309632758, 0.16719361903857433, 0.1554780929330093, -0.24621565493408326, -0.17553404912725412, 0.21784592407162506, -0.0137983800887298, 0.07913182026316434, -0.39419913065547263, -0.4458470831403609, -0.08453543324226942, -0.0760313880064416, 0.15969555676859315, -0.044508509998252066, 0.023066393122114448, -0.48930915320842416, -0.29783488740267217, -0.06719830312912123, -0.11103231378987388, -0.2566858861477179, -0.20449950183250465, 0.1299821135278343, 0.18545666680271822, -0.26509208350489644, -0.49999295905837826, -0.40631637357476436, 0.26730030984167286, -0.31229654366708104, 0.08876235532311227, 0.04148883294810446, 0.2982250450633437, 0.13529059193107074, 0.4579841397279161, -0.12935686842604, -0.33802453189878534, -0.4637018408847915, -0.24319845180762556, -0.21765036331441223, 0.3567513652037064, 0.356940705060687, 0.030082387532232246, 0.0005964757208687388, -0.4357636110311738, -0.01962215023295144, 0.38946260502694585, -0.148184702068189, -0.3952183640428153, -0.15772761410758207, 0.2420469868186892, 0.34115127486314734, 0.2541724750738332, -0.026688867726463172, -0.33772791918613976, -0.031927314607987256, -0.2559411012568056, 0.1342745972448789, 0.3561709325161395, 0.15930777969874654, -0.1743684630615263, 0.4351044771524286, 0.28767067813391023, 0.11498356328391779, 0.2725347964291771, -0.3827096860492283, 0.45029847827993663, -0.3157236284655447, -0.41355170309384803, 0.07336459361452796, 0.36188219450578885, -0.3457670284594414, -0.15275135756452585, 0.4245576725424698, 0.47429673001817463, 0.1107047995485182, -0.013522917225923692, -0.11041981647017707, -0.4008246547094032, 0.4420287772725402, 0.0013192802017201188, 0.1269807880766507, 0.2920418739306072, 0.42226643955146415, -0.13532693696735265, -0.24349100008328506, -0.4554971197233115, -0.48098639183325176, 0.08946454111710267, 0.2597819994871422, -0.020791505910061403, -0.37968443396493257, 0.0250526177052528, 0.23572250843111675, 0.04118869363063382, -0.26982819623783527, 0.0006698988647499959, 0.22581835658949956, -0.40855000317554513, -0.15645179890231375, -0.22510263821953203, -0.01358345030937258, -0.16098848986846548, 0.20924282676022443, -0.17567365241441735, -0.4064368458493739], "twirled_unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, 0.4731909991248422, -0.15171013965482416, 0.4607650836825492, -0.12315582717864615, 0.47110093793493135, 0.20420834050016623, 0.18029413960657692, 0.2520273229900738, 0.18624585452333164, -0.49105233325456865, 0.08201948178145457, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, 0.2926416855894409, -0.2567003523160629, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, 0.17073608461863543, -0.44990811567888755, 0.34029098228440446, -0.39341591753839467, 0.24481879726496558, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, -0.2846662038892873, 0.307376580132793, -0.4951949435326988, 0.49089066447141505, 0.0344985394231756, -0.17201116439296982, 0.31032298247400547, 0.07448506389936327, 0.20665942225402745, 0.08872518057716405, 0.42201221928209165, -0.4695275208591738, -0.1293619641527073, -0.33980968285915836, 0.1696033162756727, 0.1614914491827939, -0.3817490270312973, 0.13890870450366322, -0.24209820089131995, -0.49320924723211945, 0.4569557480242459, 0.32738600345714275, 0.24772931986974456, 0.30339346036759807, 0.385197581175035, -0.172704433349967, -0.1306577643126623, 0.05031939073900915, -0.42638081326169797, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, 0.026563378638172708, 0.1572765640302265, 0.27092919654169023, -0.2402723677717553, -0.3177048344177287, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.3948500346756276, 0.1185831188857982, -0.23219873717626527, 0.20566515099794458, 0.30565501841008924, -0.015880959898169067, -0.3057762984495298, -0.4168508201115806, 0.18571149745641335, -0.21220376686260067, 0.339972912082672, 0.3520932401429775, -0.06995349644153848, 0.08771408961433025, -0.34981970641761606, -0.3725604991977569, -0.00728211962388059, -0.4925164648993672, -0.22100626514078314, 0.03366269558096491, 0.2347203298500311, -0.3059358469084721, -0.004259973013947871, -0.07934844926123219, 0.20003673498231578, -0.4724426590122235, 0.4796988074039099, -0.2288914205712942, 0.3572385478026021, 0.2606958900527516, 0.06832291882974673, 0.06752295976617262, 0.006259113990971343, 0.4882741764914904, 0.1904833928861862, 0.38152574068700673, 0.2237896470331293, -0.14045948982839107, 0.17773461296227566, -0.21233047984366493, 0.18236373147040297, -0.3830795306205417, -0.356367840362811, 0.44639406555807426, 0.2705349101205172, -0.2164034875761871, 0.4047643307788249, -0.22063635836623874, 0.25125128247756123, -0.4689717709380474, 0.1617411090224934, 0.28028169533084935, -0.06018639817481031, -0.4031368826142234, -0.06717542216274452, -0.35829684548359, -0.49565929289516575, 0.38558393453215345, 0.38054151056773833, -0.3706034854176288, -0.4643162198608053, -0.45227955351385773, 0.10900193868114982, -0.03522460819027984, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, 0.3571480415801709, 0.4115821917662892, 0.12189580615840612, -0.44607081183047725, -0.08867370901765526, -0.37178913337915986, 0.44493207735456863, -0.05866166313476029, 0.16574731062717163, -0.2636358117380446, -0.34603826044352104, 0.19511749309766913, 0.4145682812563436, 0.036928592509120506, 0.44066757058091, 0.2944662830567353, 0.4140690144830721, 0.35029365642154886, -0.21420182853494651], "twirled_unitaries_q1": [-0.31239971808636113, -0.28485744721260886, -0.44268147867660446, 0.22201092389900978, 0.47367514134620947, -0.3624484324247135, -0.04875864716369449, -0.029349912099974063, -0.1734552494365822, -0.1822764510861603, -0.16885000522517402, -0.07938718192367133, -0.3911759845303031, -0.29308952850711734, 0.32399096841614394, -0.009100451273553745, 0.48333014377647743, -0.36823843839154335, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028, -0.21022271480579136, -0.08722634311680011, 0.2715537852772023, -0.3062633617185391, 0.3866124655850989, -0.2815125184840035, -0.1177400591091029, 0.4264193156073617, 0.14088216697814104, 0.001961632156344706, -0.0769597740948278, 0.34622494807280546, 0.1375695796222196, -0.3886559574053656, 0.4641161820327113, -0.2122644303870267, 0.08481943060488462, 0.2542984989212549, 0.20076546001369877, -0.45957636539721136, -0.38195891683453453, 0.03859037256674469, -0.08978167650477431, 0.42191404860625425, 0.04165792706529814, 0.12756873876982056, -0.4374360835014812, 0.18822005996944213, -0.44384141722735393, -0.22776589100726952, -0.3855950011202296, -0.02604531885600636, 0.3880041097036475, 0.38290552515987386, 0.41894082221451256, -0.4452687082975473, 0.2680115214576162, -0.06429797336391019, -0.40176015336168547, 0.02791825279908622, 0.3647157726393928, -0.1662718950803388, -0.03836408176927364, 0.1337047764333228, 0.32533129436627917, 0.3234122951464613, -0.0638019217320398, 0.012161642034783426, 0.23889962098470718, 0.23903804718794674, 0.17505008531592026, 0.05117471301904075, 0.28248490237992385, -0.3802680530959428, -0.2730510105090431, 0.3276727253083287, -0.13920345844470106, 0.05584616229532102, -0.2678503045730096, -0.20040028666454646, -0.2797248113332209, -0.28722577580825615, 0.051803177141760415, -0.18758437970965147, 0.025135451800657904, -0.41925850582989455, 0.4186349836360712, -0.054728813629211004, -0.11199236531999546, -0.16895527186618509, 0.1961489222558832, -0.25635721054248606, 0.41373787501252934, -0.00924419505930274, 0.004993821532753628, 0.04517698380747248, 0.1263943744118592, -0.26957167933061044, 0.01339141244315556, 0.4355398681503253, 0.13488961790957887, -0.2813933307165257, -0.08633332620212997, 0.14230310373283928, -0.4681498348207711, 0.3784255819403306, -0.4021117303101249, 0.048175590932000745, 0.4487621872882883, -0.48170724460221237, 0.23451311792852536, 0.42923384599364667, 0.10022812594482033, -0.3296437281806952, 0.4662901341384327, 0.07786597094141712, -0.24309403223028525, -0.2626546274601331, 0.3080957061723453, 0.4098307847526783, -0.15289014355117203, -0.17828008632045567, 0.3344122924782482, 0.10393190734831492, 0.26237626860959296, 0.4386795731621973, -0.02917801601742198, 0.475935138627122, 0.27172818466370785, 0.39866618977662327, -0.22346762715176283, -0.20423403798586293, 0.19835690373631465, 0.0879613077568635, -0.35908437707395535, 0.4917113135520985, -0.3092717099731246, 0.4802307733810167, 0.4511123707972331, -0.08227861161092775, 0.4019790567990782, -0.20021451153449732, -0.2146600639917331, -0.20712762310916233, -0.1596973714315837, -0.0939424389279786, -0.241338789020201, 0.185835345332638, 0.37074082635203354, -0.1459133170689384, -0.004975097634783765, -0.4839970882809759, -0.4165459335296404, 0.4894086579308805, -0.4878037862215372, 0.22934045114803325, -0.1442416045013175, -0.17232005968702424, 0.40234032300345746, 0.32971884186395783, 0.3448177027767301, -0.4584829871144649, 0.08509713625245752, -0.060495617944042124], "current_seeds_q2": [154691881488, 0], "current_seeds_q5": [203264169750, 3], "unitaries_q2": [-0.4439617577671342, -0.21225113115551508, 0.054088724382374664, -0.23892899918584476, -0.125309330460194, 0.060092742372248154, 0.4896137555816509, -0.4003084970981625, 0.40239532697192004, -0.27427209221451676, 0.3886045247436556, 0.4320039786933343, -0.3638867534321797, 0.28223449889285135, 0.12276746487499324, -0.08321214542590027, 0.4506729327841903, -0.49557296959474684, -0.1265520133216782, -0.26256977331275166, 0.03058157694307795, 0.40620047609760235, 0.1973131805413999, -0.11804061453004167, 0.05462618005151043, 0.07135232308423767, -0.2489185291095879, 0.13974379002293702, 0.41662052915091863, 0.06818086771210474, -0.16721244956765702, -0.38720928037740876, -0.1117919539837331, 0.2860409549541778, -0.4285359332075629, -0.1573891629055062, -0.17441844222633307, -0.41876241161401495, -0.20547837357075238, 0.473611069732506, -0.3783608350757284, -0.07842265526315728, 0.3925317756770923, 0.2595075211066167, -0.24233783883737559, 0.1429872906517069, 0.19320114364873575, 0.18916516162934727, -0.13975925770959208, 0.35974087642598107, 0.0910327241743758, -0.17685534791162993, 0.46825986056713376, -0.028095447670452245, 0.21121214619110518, 0.025306114815080605, 0.23576781990978546, 0.08316050282518717, 0.31848275278510485, 0.400213131759525, -0.3517301944760227, -0.05158170486511793, -0.12568734236262458, -0.4865840148088658, 0.33147630175334797, 0.021009841695313725, -0.47988603256257534, 0.06447247771077258, 0.08805243674673235, -0.1870609049750307, 0.3776046805460531, 0.3109844258745511, 0.36390183284432354, 0.4611227243477174, -0.22440520452503776, 0.1680911213450038, 0.13693298667517695, -0.20914928335500704, 0.13952487632665367, 0.35148149681080554, 0.44237399269967526, -0.20788732949937128, -0.42125761916947013, -0.26848903953135306, 0.44346653122211066, 0.1360182062364892, 0.2380340409652426, 0.3971106996721616, 0.14197951721286017, 0.3404604798712434, -0.15289293302358686, 0.12489626579553814, 0.1506412529301997, -0.13751949964263233, 0.4916932343136651, -0.008483669473928757, 0.19366711301472606, 0.3064881637397292, 0.17038852402531646, 0.08098004605518128, 0.19399838117309542, -0.46421182113421366, 0.49744699376657664, 0.3195963535447355, 0.34197805774659074, 0.42257028044813794, 0.2866464046533963, -0.048068057122417684, 0.12794233735865745, -0.4711880464251408, -0.44868171025627746, -0.3434915792021904, -0.16903330759792823, -0.09463038726272543, -0.31216367909048515, 0.13905289215915317, 0.15978147959978628, 0.05617742517105029, -0.06458650101018293, 0.21016554839495427, 0.30954878428748955, -0.4245386550744783, -0.03693104996670726, -0.015578394763785752, -0.13476795769143735, 0.056311052859296495, -0.3715304328143034, -0.19139346063203533, 0.02053440149051511, -0.3608606100066396, 0.15008591523601922, 0.23649482115613196, 0.3527343250287096, 0.2676984602701111, 0.10812050711245647, 0.20380895823433676, 0.18340129072693045, -0.1960361804853754, -0.46737966354565685, -0.17676888165335924, -0.44602483355212996, -0.3078347140316957, 0.06713160476753188, -0.27818622794244163, 0.04949538092258976, 0.21852285157608975, -0.4283825898106137, 0.16208734362142252, 0.18432922293216691, -0.40276701807278315, -0.4089499305662727, 0.4544011513222337, 0.3713159707842202, 0.21220693776629673, -0.38382575941465547, -0.11316011308353424, -0.4980797326092343, -0.36844150855908353, 0.07253083102530766, 0.07684935298946982, 0.22640888532581727, 0.38310228802618695, 0.20661542520757337, 0.3493279985785591, -0.07555698804422306], "rc_base_cycle_loop_index": [2], "pauli_seed_q4": [114829320934051, 114697805194205, 17033306506441], "twirled_unitaries_q5": [-0.4819707863313134, -0.08844771735993007, 0.4359695622379647, 0.26084162722957416, -0.34749039534677095, 0.14221574910517631, -0.05538494580167708, 0.42146272083316205, 0.05095620533766265, 0.4701366520330339, 0.23983478541006065, -0.04457939964792956, -0.0949861858722656, -0.4587594520384535, 0.02141138880449489, 0.2038805182551222, -0.30593045854644174, -0.44985829050334303, 0.4927434615147064, -0.11583861802757767, 0.4966244712669763, -0.024186816646199816, 0.04010182534098661, -0.4701814934734365, -0.08840251534018151, 0.17989478168061623, -0.0903669192227099, 0.32765836740340504, -0.14684326874886722, 0.35286990719531985, 0.008284239455456088, -0.18632278626897403, 0.27328990451335855, 0.3151644686303072, -0.3582880776236159, 0.3700069303726572, 0.4315777811850623, -0.020154925238184518, 0.2253415833668555, 0.4304092442926617, 0.4087331555338629, 0.2709286399245059, -0.4160883157161557, 0.026823391235140548, -0.3385793110512054, -0.47488495966217315, -0.17583558012539768, 0.040582178411970204, -0.0397716594608859, -0.22252193154559308, -0.3300275558178356, 0.18567604654762704, -0.39502253008086896, 0.3267765004553098, -0.4559961715058556, 0.1957093944958359, 0.16363675740087302, -0.09868818408994784, 0.010825877707873133, 0.1878725186798782, 0.31492110970005527, 0.004919904505747752, -0.0009657512677527791, -0.04683467905802274, -0.09199769987692719, -0.3925289258273139, 0.20598014533686637, -0.4866068730844013, 0.18171358684117678, 0.2842846542615298, -0.3572833840812777, -0.08730468474056252, -0.3655905624561022, -0.012705678984413993, -0.2136098950308245, -0.2916533976215483, -0.07888475516168114, -0.3411916967717161, 0.4252690365313754, 0.4931147557221536, 0.36241902008228877, -0.17360408832940522, 0.39599467534025123, 0.3558378985265307, -0.23266806737144918, -0.10901070998026086, 0.026162054010612223, 0.01358893291052965, 0.39621120526584264, 0.001148813495461809, -0.07020466023228167, 0.36296237003429255, 0.33307028519226733, -0.13781543341138658, -0.08752926336434186, -0.4288589240512799, 0.10015600170912009, 0.08749852554168314, -0.14745679538857814, -0.1278255398527186, -0.372413267420054, -0.433801126674652, 0.11312827426420924, 0.36477734808608986, -0.16993554987825377, -0.19002807155204593, -0.4067920719748841, -0.2968611173446263, -0.050028633514550336, 0.1868254558737661, 0.15349650556155225, 0.23982720184961437, -0.2818115453175878, -0.005815345945226369, 0.35418675084773454, 0.4779674854323126, -0.48267804939080605, -0.4184438949105136, -0.30281239718277675, 0.10028509788905637, 0.10548466834978498, 0.44225825433250776, -0.49984871484965154, 0.08779585941206847, 0.3405804008862461, 0.06456474201942086, 0.10391858459446368, 0.24091035021342577, 0.16602193359196704, -0.1524605866070381, -0.229048668926783, 0.18413008997232438, -0.1674318933114769, 0.4433477497281082, -0.2088354387557949, -0.41457613530977255, -0.3127009618372192, 0.4016672567940027, -0.39491924511555254, 0.15703065912508407, -0.11424473325971007, -0.3664919322605087, -0.3016757205012972, 0.08876390219019825, 0.06828018719360074, 0.08303334841532717, -0.3336361363205249, 0.15030577131813416, 0.026977407163474965, 0.19359576537733858, 0.4326496221286149, -0.32275559448434876, 0.39565114363741927, 0.2593502457256136, 0.10498561338349788, -0.3212321935238869, -0.3467416200484763, 0.041244518528138485, -0.2721769570694086, -0.3576817372840182, 0.4736905767279538, -0.14172314128512653, -0.49978191206374944, 0.4644469200357335, -0.2449520965727494], "current_seeds_q1": [116546759388, 3], "twirled_unitaries_q4": [0.08281245738859866, -0.38468217357713996, -0.09204702423941313, -0.40200177582947916, -0.34573686510049484, -0.4395503243121226, -0.4873848995430521, -0.14774430009103412, 0.3588612989408304, 0.07225889384692508, -0.3969579774883627, 0.21086125028359604, 0.012877630822472952, 0.04488364094157404, -0.3082213810547856, 0.45889714750449073, 0.3514100512444003, 0.22499409278258753, 0.21348576144673004, 0.22657753347537835, -0.22479296629159862, -0.4602059637223732, -0.05576467983967248, 0.3338397006727831, 0.3521800775213606, 0.47661640375647707, -0.44929360922303374, -0.10097998101087668, 0.05596090090799066, -0.4446543188086238, -0.29375380461903333, 0.3893381897174777, 0.31210996831763893, 0.3025817005112188, -0.20444914086358779, 0.4841687968278414, -0.3915337452075214, -0.25858545563052715, -0.4690715590729795, 0.3629769221630532, -0.22923477638201106, 0.32380379912491364, -0.30816246211988485, -0.27949720809386847, -0.045221606204211895, 0.4932130563306565, 0.4556195731010604, 0.015467713822783224, -0.2996778280486936, 0.028208470508662487, 0.41480235654854525, -0.3335569747819491, -0.03792969220075193, 0.18508405462394606, -0.3502749300908725, -0.07414674772632779, -0.171351127283895, 0.257901353901115, 0.2424720323024161, -0.3401787489039023, -0.094057937586836, -0.2989690844923665, -0.13287455320751462, 0.42018251464321565, 0.11250114580974824, 0.30142229862059366, -0.03002161765239464, -0.36587895832421324, 0.22331447600723564, 0.0036222571105888335, 0.17220300115257814, -0.007606898218526226, 0.013851464632136157, -0.36404034977247335, 0.06835472267093223, 0.06767318227930019, 0.33539538172214023, -0.2836948593010149, 0.08100541276814965, -0.30260995130882407, -0.03978963166579774, -0.42699026063679213, -0.10535516572663539, 0.39693818854017593, 0.14213482736035132, -0.2638606975362272, 0.16048661456231983, -0.041535998567713506, 0.05537101858648086, -0.05270872698714868, -0.29743473075654236, 0.25082226878552305, -0.07749973926881282, 0.005671872216236551, 0.16442563343126793, -0.22423913755419989, 0.16093142158291585, 0.48458653562971676, -0.023233678416008985, 0.21757559367374313, -0.13661053456698014, 0.2733303171161019, -0.33677319237660086, 0.4873567174834257, 0.2575555349443093, 0.3523655032636981, -0.47017616420053443, -0.10818748535482214, 0.41775533113815655, 0.1421966046050187, -0.4872992123316351, -0.06749647647991353, 0.33718026623042263, 0.09399007955388328, 0.006147254774553801, -0.033616747391167934, -0.49871944627420817, -0.43604739793605773, 0.07330819915539166, -0.28692456939318234, 0.25184484520283945, -0.45304549095986957, 0.034431004261108455, 0.16023559653162067, -0.4286080980977829, -0.006533788792925321, 0.15108942830796224, -0.16973595141633524, 0.4640305854546334, 0.24054238153522078, -0.024636146775240064, 0.30101862039294147, -0.15055111072566874, -0.4517202267473799, 0.09585199005398337, 0.2311446785090574, 0.4080108407893448, -0.47375066433987456, 0.042101523011496056, -0.3736429769014329, -0.05033026365363469, -0.18471591147003963, 0.22209464950747915, -0.308184848324796, -0.45670428994286283, -0.05162484585410354, -0.22467931049654766, -0.0018099136404750027, -0.19183373180161212, 0.4101079377657335, 0.4393679871820666, 0.11046395403140608, 0.035481380015902175, 0.4166612458861003, -0.4063605064529838, 0.35403154747492493, 0.47525033883493606, -0.2691465462702922, 0.3506115951917508, -0.24942394545172064, 0.03926142529488885, 0.4316785755689132, -0.1631685537080294, 0.33323384565061787, -0.4295771870843694], "pauli_seed_q1": [27946020799016, -50982158722643, 119343881614275], "unitaries_q5": [-0.4819707863313134, -0.08844771735993007, 0.4359695622379647, 0.26084162722957416, -0.34749039534677095, 0.14221574910517631, 0.4446150541983229, 0.07853727916683795, -0.05095620533766265, 0.029863347966966103, 0.26016521458993935, -0.04457939964792956, -0.0949861858722656, -0.041240547961546525, 0.4785886111955051, -0.2038805182551222, -0.19406954145355826, 0.05014170949665697, -0.007256538485293618, -0.38416138197242233, 0.003375528733023714, 0.024186816646199816, 0.4598981746590134, -0.4701814934734365, -0.08840251534018151, 0.32010521831938377, 0.0903669192227099, -0.32765836740340504, -0.14684326874886722, -0.35286990719531985, 0.4917157605445439, -0.313677213731026, -0.22671009548664145, -0.18483553136969277, -0.3582880776236159, 0.3700069303726572, -0.06842221881493771, -0.4798450747618155, 0.2746584166331445, -0.4304092442926617, 0.4087331555338629, -0.2709286399245059, -0.08391168428384432, 0.47317660876485945, -0.3385793110512054, 0.025115040337826855, -0.17583558012539768, 0.040582178411970204, -0.0397716594608859, -0.22252193154559308, 0.1699724441821644, 0.18567604654762704, -0.10497746991913104, 0.17322349954469018, 0.4559961715058556, 0.1957093944958359, -0.16363675740087302, -0.40131181591005216, 0.010825877707873133, -0.1878725186798782, -0.31492110970005527, 0.004919904505747752, -0.4990342487322472, -0.45316532094197726, -0.09199769987692719, -0.10747107417268609, -0.20598014533686637, -0.013393126915598685, 0.18171358684117678, -0.21571534573847018, -0.1427166159187223, 0.08730468474056252, 0.3655905624561022, -0.487294321015586, -0.2136098950308245, -0.2916533976215483, -0.07888475516168114, 0.15880830322828388, -0.07473096346862462, 0.4931147557221536, -0.13758097991771123, -0.17360408832940522, 0.39599467534025123, 0.3558378985265307, -0.23266806737144918, -0.10901070998026086, 0.026162054010612223, 0.01358893291052965, 0.39621120526584264, -0.4988511865045382, -0.07020466023228167, 0.13703762996570745, -0.33307028519226733, 0.13781543341138658, -0.08752926336434186, 0.4288589240512799, 0.3998439982908799, 0.41250147445831686, -0.14745679538857814, 0.3721744601472814, -0.372413267420054, -0.433801126674652, -0.38687172573579076, 0.13522265191391014, 0.16993554987825377, -0.30997192844795407, -0.0932079280251159, 0.20313888265537372, 0.44997136648544966, 0.3131745441262339, 0.34650349443844775, -0.23982720184961437, -0.21818845468241221, -0.005815345945226369, -0.14581324915226546, 0.4779674854323126, 0.017321950609193948, 0.08155610508948641, -0.19718760281722325, 0.3997149021109436, -0.10548466834978498, 0.44225825433250776, -0.0001512851503484569, -0.08779585941206847, 0.3405804008862461, -0.06456474201942086, 0.3960814154055363, 0.2590896497865742, -0.33397806640803296, 0.3475394133929619, -0.229048668926783, 0.18413008997232438, -0.1674318933114769, 0.4433477497281082, 0.2911645612442051, -0.41457613530977255, -0.18729903816278082, -0.4016672567940027, 0.39491924511555254, 0.34296934087491593, 0.3857552667402899, 0.1335080677394913, -0.3016757205012972, -0.41123609780980175, -0.43171981280639926, 0.08303334841532717, 0.1663638636794751, 0.15030577131813416, 0.026977407163474965, 0.19359576537733858, -0.06735037787138509, -0.17724440551565124, -0.39565114363741927, -0.2593502457256136, 0.3950143866165021, 0.17876780647611312, -0.3467416200484763, 0.041244518528138485, 0.2278230429305914, -0.3576817372840182, 0.026309423272046217, -0.35827685871487347, -0.000218087936250555, 0.03555307996426649, 0.2550479034272506]} \ No newline at end of file +{"current_seeds_q3": [36377308645, 0], "current_seeds_q4": [16634088385, 1], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "unitaries_q1": [0.18760028191363887, -0.21514255278739114, -0.057318521323395544, 0.2779890761009902, 0.026324858653790528, -0.3624484324247135, -0.04875864716369449, -0.47065008790002594, 0.1734552494365822, -0.3177235489138397, -0.331149994774826, -0.07938718192367133, 0.10882401546969689, -0.20691047149288266, 0.17600903158385606, -0.49089954872644626, 0.48333014377647743, 0.36823843839154335, 0.03572518135114322, -0.07037465869650461, 0.16046335532868028, -0.28977728519420864, -0.08722634311680011, 0.2284462147227977, 0.3062633617185391, 0.11338753441490113, -0.2815125184840035, 0.3822599408908971, 0.4264193156073617, -0.35911783302185896, -0.4980383678436553, -0.4230402259051722, 0.15377505192719454, 0.3624304203777804, -0.3886559574053656, -0.4641161820327113, -0.2877355696129733, 0.4151805693951154, -0.2457015010787451, 0.20076546001369877, -0.04042363460278864, 0.38195891683453453, 0.4614096274332553, -0.4102183234952257, 0.42191404860625425, -0.45834207293470186, 0.12756873876982056, -0.4374360835014812, 0.18822005996944213, -0.44384141722735393, 0.2722341089927305, 0.1144049988797704, -0.47395468114399364, -0.3880041097036475, -0.38290552515987386, 0.08105917778548744, 0.05473129170245272, -0.2319884785423838, -0.4357020266360898, 0.40176015336168547, -0.02791825279908622, 0.3647157726393928, 0.1662718950803388, 0.03836408176927364, 0.1337047764333228, 0.17466870563372083, -0.3234122951464613, -0.4361980782679602, 0.012161642034783426, 0.23889962098470718, 0.26096195281205326, -0.17505008531592026, 0.44882528698095925, 0.21751509762007615, -0.3802680530959428, -0.2730510105090431, 0.3276727253083287, 0.36079654155529894, -0.444153837704679, -0.23214969542699038, 0.20040028666454646, -0.2202751886667791, -0.28722577580825615, -0.051803177141760415, -0.31241562029034853, 0.4748645481993421, 0.08074149417010545, -0.08136501636392879, -0.445271186370789, 0.11199236531999546, -0.3310447281338149, 0.1961489222558832, -0.24364278945751394, 0.08626212498747066, -0.49075580494069726, 0.004993821532753628, -0.4548230161925275, 0.1263943744118592, 0.23042832066938956, 0.01339141244315556, 0.4355398681503253, -0.3651103820904211, -0.2813933307165257, -0.08633332620212997, -0.3576968962671607, -0.4681498348207711, 0.3784255819403306, 0.09788826968987507, 0.048175590932000745, 0.4487621872882883, 0.01829275539778763, 0.23451311792852536, 0.07076615400635333, -0.10022812594482033, -0.1703562718193048, 0.4662901341384327, 0.4221340290585829, 0.24309403223028525, -0.23734537253986687, 0.3080957061723453, 0.4098307847526783, -0.34710985644882797, 0.17828008632045567, -0.3344122924782482, 0.10393190734831492, -0.26237626860959296, 0.0613204268378027, -0.02917801601742198, 0.024064861372878, -0.27172818466370785, 0.10133381022337673, 0.2765323728482372, 0.2957659620141371, 0.30164309626368535, -0.0879613077568635, 0.35908437707395535, 0.4917113135520985, -0.1907282900268754, 0.019769226618983282, 0.4511123707972331, -0.41772138838907225, 0.0980209432009218, -0.20021451153449732, -0.2853399360082669, -0.29287237689083767, -0.1596973714315837, -0.4060575610720214, -0.258661210979799, 0.185835345332638, -0.37074082635203354, -0.3540866829310616, -0.004975097634783765, 0.4839970882809759, 0.4165459335296404, 0.010591342069119491, -0.4878037862215372, -0.27065954885196675, -0.3557583954986825, -0.32767994031297576, 0.09765967699654254, 0.32971884186395783, 0.15518229722326993, -0.04151701288553511, 0.4149028637475425, 0.4395043820559579], "pauli_seed_q3": [33932501327821, 57280048187710, 37250364052496], "pauli_seed_q1": [27946020799016, -50982158722643, 119343881614275], "unitaries_q5": [-0.4819707863313134, -0.08844771735993007, 0.4359695622379647, -0.23915837277042584, -0.15250960465322905, 0.3577842508948237, -0.4446150541983229, 0.07853727916683795, -0.44904379466233735, -0.029863347966966103, 0.23983478541006065, 0.45542060035207044, -0.0949861858722656, -0.041240547961546525, 0.4785886111955051, -0.2038805182551222, -0.19406954145355826, 0.05014170949665697, 0.4927434615147064, -0.11583861802757767, 0.4966244712669763, -0.024186816646199816, 0.04010182534098661, -0.4701814934734365, -0.08840251534018151, 0.17989478168061623, -0.0903669192227099, -0.17234163259659496, -0.3531567312511328, -0.35286990719531985, 0.4917157605445439, -0.18632278626897403, -0.27328990451335855, 0.18483553136969277, -0.14171192237638408, 0.3700069303726572, 0.4315777811850623, -0.4798450747618155, 0.2746584166331445, -0.4304092442926617, 0.09126684446613709, 0.2709286399245059, -0.4160883157161557, 0.47317660876485945, -0.16142068894879458, -0.025115040337826855, -0.17583558012539768, -0.040582178411970204, -0.4602283405391141, -0.2774780684544069, -0.3300275558178356, -0.31432395345237296, -0.39502253008086896, -0.17322349954469018, -0.4559961715058556, 0.3042906055041641, 0.336363242599127, -0.40131181591005216, 0.010825877707873133, -0.1878725186798782, -0.31492110970005527, 0.004919904505747752, -0.4990342487322472, 0.04683467905802274, -0.4080023001230728, 0.10747107417268609, 0.20598014533686637, -0.4866068730844013, 0.18171358684117678, 0.2842846542615298, -0.3572833840812777, -0.08730468474056252, -0.3655905624561022, -0.012705678984413993, -0.2136098950308245, -0.2916533976215483, -0.07888475516168114, 0.15880830322828388, 0.4252690365313754, 0.006885244277846425, 0.13758097991771123, 0.17360408832940522, 0.10400532465974877, 0.3558378985265307, -0.23266806737144918, -0.39098929001973914, -0.026162054010612223, 0.48641106708947035, 0.39621120526584264, 0.4988511865045382, -0.42979533976771833, 0.36296237003429255, -0.33307028519226733, -0.3621845665886134, -0.08752926336434186, -0.0711410759487201, -0.10015600170912009, 0.41250147445831686, -0.14745679538857814, 0.3721744601472814, -0.372413267420054, 0.06619887332534802, -0.38687172573579076, 0.36477734808608986, -0.16993554987825377, -0.19002807155204593, -0.4067920719748841, -0.2968611173446263, 0.44997136648544966, 0.3131745441262339, -0.15349650556155225, 0.26017279815038563, -0.2818115453175878, -0.49418465405477363, -0.35418675084773454, 0.0220325145676874, -0.48267804939080605, -0.4184438949105136, -0.19718760281722325, 0.3997149021109436, 0.394515331650215, 0.05774174566749224, -0.49984871484965154, -0.41220414058793153, 0.15941959911375392, -0.06456474201942086, -0.10391858459446368, 0.2590896497865742, -0.33397806640803296, -0.1524605866070381, -0.229048668926783, -0.3158699100276756, -0.1674318933114769, 0.0566522502718918, -0.2911645612442051, 0.41457613530977255, -0.18729903816278082, 0.4016672567940027, 0.10508075488444746, 0.15703065912508407, 0.3857552667402899, -0.3664919322605087, -0.1983242794987028, -0.08876390219019825, -0.06828018719360074, 0.41696665158467283, -0.3336361363205249, 0.15030577131813416, 0.47302259283652504, 0.3064042346226614, -0.4326496221286149, -0.32275559448434876, -0.39565114363741927, -0.2593502457256136, 0.10498561338349788, 0.3212321935238869, 0.3467416200484763, 0.041244518528138485, -0.2278230429305914, 0.3576817372840182, 0.4736905767279538, -0.35827685871487347, 0.49978191206374944, 0.03555307996426649, 0.2550479034272506], "unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, 0.4731909991248422, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, 0.31375414547666836, -0.008947666745431349, 0.08201948178145457, -0.2163845393922088, 0.31819606673195366, 0.4447669819517266, -0.20735831441055907, 0.24329964768393708, -0.03291592648032449, -0.1566001925728422, -0.03297551316599012, -0.012842477370785588, -0.17073608461863543, -0.050091884321112445, 0.15970901771559554, 0.10658408246160533, -0.2551812027350344, 0.21711220189177283, 0.3225331758216612, -0.3927726383275072, -0.44759812516522146, -0.09988083390955893, 0.2846662038892873, 0.192623419867207, 0.0048050564673012275, -0.00910933552858495, 0.4655014605768244, -0.3279888356070302, 0.18967701752599453, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, -0.1293619641527073, -0.16019031714084164, -0.1696033162756727, 0.3385085508172061, -0.3817490270312973, -0.13890870450366322, -0.25790179910868005, -0.006790752767880548, 0.4569557480242459, -0.17261399654285725, 0.24772931986974456, -0.19660653963240193, 0.385197581175035, -0.327295566650033, -0.3693422356873377, 0.44968060926099085, -0.07361918673830203, 0.23771009850518965, 0.1496960222960304, -0.21221815451668746, 0.43123595744645016, 0.23108886334528123, -0.4803542081018186, 0.026563378638172708, 0.1572765640302265, 0.22907080345830977, -0.2597276322282447, 0.3177048344177287, -0.06033192657007902, -0.447220912180196, -0.3829003034514109, 0.10514996532437237, 0.1185831188857982, 0.26780126282373473, 0.20566515099794458, -0.19434498158991076, -0.015880959898169067, -0.3057762984495298, -0.4168508201115806, 0.18571149745641335, -0.21220376686260067, -0.160027087917328, -0.1479067598570225, -0.06995349644153848, -0.41228591038566975, -0.34981970641761606, -0.1274395008022431, 0.00728211962388059, 0.4925164648993672, -0.22100626514078314, 0.4663373044190351, 0.2652796701499689, -0.3059358469084721, -0.49574002698605213, 0.07934844926123219, 0.2999632650176842, 0.027557340987776513, -0.02030119259609009, -0.2711085794287058, -0.3572385478026021, -0.2606958900527516, 0.4316770811702533, 0.06752295976617262, -0.49374088600902866, 0.4882741764914904, -0.3095166071138138, -0.11847425931299327, 0.2237896470331293, -0.14045948982839107, 0.17773461296227566, -0.21233047984366493, -0.31763626852959703, 0.11692046937945832, -0.143632159637189, 0.05360593444192574, -0.2705349101205172, -0.2164034875761871, 0.0952356692211751, -0.27936364163376126, 0.24874871752243877, 0.031028229061952572, 0.1617411090224934, 0.28028169533084935, -0.06018639817481031, -0.4031368826142234, -0.4328245778372555, 0.35829684548359, -0.004340707104834252, 0.38558393453215345, 0.11945848943226167, -0.12939651458237122, -0.03568378013919471, 0.047720446486142265, 0.10900193868114982, -0.03522460819027984, 0.2781207104770047, -0.49150594401294256, 0.018503482111370317, -0.05312386930746982, 0.0822904548108383, 0.1617067159553649, -0.14285195841982912, -0.08841780823371082, 0.12189580615840612, -0.44607081183047725, 0.41132629098234474, -0.12821086662084014, -0.44493207735456863, -0.4413383368652397, 0.33425268937282837, 0.23636418826195538, 0.15396173955647896, 0.3048825069023309, -0.4145682812563436, -0.036928592509120506, 0.44066757058091, 0.20553371694326472, -0.4140690144830721, 0.14970634357845114, 0.2857981714650535], "break": [1], "current_seeds_q2": [154691881488, 0], "current_seeds_q1": [116546759388, 3], "pauli_seed_q5": [129378273583824, -62630319121345, -73332466885869], "unitary_angle_offset": [162], "pauli_seed_q0": [-13838434709596, 60576142310008, 34470019755655], "rc_base_cycle_loop_index": [2], "unitaries_q4": [0.08281245738859866, -0.38468217357713996, 0.40795297576058687, 0.09799822417052084, -0.34573686510049484, 0.0604496756878774, -0.4873848995430521, -0.3522556999089659, 0.1411387010591696, -0.07225889384692508, -0.3969579774883627, 0.28913874971640396, -0.012877630822472952, 0.04488364094157404, 0.3082213810547856, -0.45889714750449073, 0.14858994875559972, 0.22499409278258753, -0.28651423855326996, 0.22657753347537835, 0.2752070337084014, 0.03979403627762679, -0.05576467983967248, -0.16616029932721688, 0.3521800775213606, 0.47661640375647707, 0.05070639077696626, 0.3990200189891233, 0.05596090090799066, -0.4446543188086238, 0.20624619538096667, 0.3893381897174777, 0.31210996831763893, 0.3025817005112188, -0.2955508591364122, -0.4841687968278414, -0.10846625479247862, -0.25858545563052715, 0.4690715590729795, 0.13702307783694678, -0.22923477638201106, -0.32380379912491364, 0.30816246211988485, -0.27949720809386847, -0.4547783937957881, -0.4932130563306565, 0.4556195731010604, 0.4845322861772168, -0.20032217195130642, 0.4717915294913375, -0.08519764345145475, 0.16644302521805088, -0.46207030779924807, -0.18508405462394606, -0.14972506990912748, -0.07414674772632779, 0.171351127283895, -0.257901353901115, 0.2575279676975839, -0.3401787489039023, 0.405942062413164, -0.2989690844923665, -0.13287455320751462, 0.42018251464321565, 0.38749885419025176, 0.19857770137940634, -0.46997838234760536, -0.13412104167578676, -0.27668552399276436, -0.49637774288941117, 0.32779699884742186, -0.4923931017814738, -0.013851464632136157, -0.13595965022752665, -0.43164527732906777, -0.4323268177206998, 0.16460461827785977, 0.2836948593010149, -0.08100541276814965, -0.30260995130882407, 0.03978963166579774, 0.42699026063679213, -0.3946448342733646, 0.39693818854017593, -0.3578651726396487, -0.2638606975362272, 0.16048661456231983, 0.4584640014322865, 0.05537101858648086, -0.05270872698714868, -0.29743473075654236, 0.24917773121447695, 0.07749973926881282, -0.005671872216236551, 0.16442563343126793, 0.22423913755419989, -0.16093142158291585, 0.015413464370283236, -0.023233678416008985, -0.28242440632625687, -0.13661053456698014, 0.2733303171161019, 0.16322680762339914, 0.4873567174834257, -0.24244446505569073, 0.3523655032636981, -0.02982383579946557, -0.39181251464517786, 0.08224466886184345, 0.3578033953949813, 0.01270078766836491, -0.06749647647991353, 0.16281973376957737, 0.4060099204461167, -0.006147254774553801, -0.46638325260883207, 0.0012805537257918331, 0.06395260206394227, 0.42669180084460834, -0.21307543060681766, -0.25184484520283945, -0.45304549095986957, 0.46556899573889154, -0.16023559653162067, -0.07139190190221711, -0.006533788792925321, -0.34891057169203776, -0.16973595141633524, 0.4640305854546334, 0.24054238153522078, -0.024636146775240064, -0.19898137960705853, 0.34944888927433126, -0.04827977325262012, -0.09585199005398337, -0.2311446785090574, 0.4080108407893448, -0.02624933566012544, -0.042101523011496056, -0.1263570230985671, 0.4496697363463653, -0.18471591147003963, 0.22209464950747915, 0.19181515167520402, -0.45670428994286283, -0.05162484585410354, -0.22467931049654766, -0.0018099136404750027, -0.19183373180161212, -0.08989206223426649, 0.4393679871820666, 0.11046395403140608, -0.4645186199840978, -0.08333875411389968, -0.09363949354701617, -0.35403154747492493, -0.47525033883493606, -0.2691465462702922, -0.3506115951917508, 0.24942394545172064, 0.46073857470511115, -0.0683214244310868, -0.1631685537080294, 0.33323384565061787, -0.4295771870843694], "current_seeds_q0": [33662128667, 0], "pauli_seed_q4": [114829320934051, 114697805194205, 17033306506441], "rc_seed_index": [3], "unitaries_q3": [0.2481010063387039, -0.40098556977834576, -0.04834844132509275, 0.16242155511352507, 0.07222335297901239, 0.18433331386209062, -0.05534255703864943, -0.3484940255716431, 0.24168043211857082, -0.30736172898834013, -0.040868538388227904, -0.13968156986252112, -0.057042096430588884, 0.4635486460651279, 0.4401420441011865, -0.20753067561719263, 0.17133028460526134, 0.23342878524691102, 0.23037736702080736, -0.3607562767338486, 0.047604139458051975, 0.29578822720942455, -0.29886660696520906, -0.27368430731425164, 0.27463288514010387, -0.3604527858438047, -0.2630801876462492, 0.4844920244300397, -0.0985404879938514, -0.16794348437940343, -0.36054335032163465, -0.47061612189078517, 0.164535676673065, 0.3270654308874832, -0.03548124641430306, 0.14917813015098247, 0.07951270250133646, -0.36565842821295647, 0.3473023819489818, 0.2519184090822897, 0.29234041842599723, -0.4659885652818829, 0.40100747778062384, -0.44859711197042174, -0.242254432495578, 0.349967089436543, -0.13497024366043675, -0.09916054156644094, 0.020666898974731396, 0.1065724561412793, -0.2617240592014909, 0.34512709811586717, 0.06819789376531205, -0.4167301540749868, 0.1843345541589052, -0.4927041869662183, -0.3660944866015825, -0.2250681231870928, -0.3484065496266737, 0.3138582238854397, -0.17510225495934506, 0.470106309632758, 0.16719361903857433, 0.1554780929330093, -0.24621565493408326, -0.17553404912725412, -0.28215407592837494, -0.4862016199112702, 0.42086817973683566, 0.39419913065547263, -0.4458470831403609, 0.08453543324226942, 0.0760313880064416, 0.15969555676859315, 0.044508509998252066, -0.023066393122114448, -0.48930915320842416, -0.20216511259732783, -0.43280169687087877, -0.3889676862101261, 0.24331411385228208, -0.20449950183250465, 0.1299821135278343, 0.18545666680271822, 0.23490791649510356, -7.040941621738739e-06, 0.40631637357476436, -0.26730030984167286, -0.18770345633291896, 0.08876235532311227, 0.04148883294810446, 0.20177495493665631, -0.13529059193107074, 0.04201586027208393, -0.12935686842604, 0.33802453189878534, 0.4637018408847915, -0.24319845180762556, 0.21765036331441223, 0.14324863479629357, 0.356940705060687, 0.46991761246776775, 0.49940352427913126, -0.4357636110311738, -0.48037784976704856, -0.38946260502694585, -0.351815297931811, -0.3952183640428153, 0.34227238589241793, 0.2579530131813108, -0.34115127486314734, -0.2541724750738332, -0.026688867726463172, 0.33772791918613976, 0.031927314607987256, -0.2559411012568056, 0.3657254027551211, -0.3561709325161395, 0.15930777969874654, -0.3256315369384737, -0.4351044771524286, 0.28767067813391023, 0.3850164367160822, -0.2725347964291771, -0.3827096860492283, 0.04970152172006337, 0.3157236284655447, -0.08644829690615197, -0.42663540638547204, -0.13811780549421115, -0.1542329715405586, 0.15275135756452585, -0.4245576725424698, 0.47429673001817463, 0.3892952004514818, -0.4864770827740763, -0.11041981647017707, 0.4008246547094032, -0.4420287772725402, 0.0013192802017201188, -0.1269807880766507, -0.2920418739306072, 0.42226643955146415, 0.13532693696735265, 0.24349100008328506, -0.04450288027668847, 0.01901360816674824, -0.41053545888289733, 0.2402180005128578, -0.4792084940899386, -0.12031556603506743, 0.0250526177052528, 0.26427749156888325, 0.4588113063693662, -0.26982819623783527, 0.49933010113525, -0.22581835658949956, -0.40855000317554513, 0.15645179890231375, 0.22510263821953203, -0.01358345030937258, 0.16098848986846548, -0.20924282676022443, -0.32432634758558265, 0.0935631541506261], "unitaries_q2": [-0.4439617577671342, -0.21225113115551508, 0.054088724382374664, 0.26107100081415524, -0.125309330460194, -0.43990725762775185, 0.4896137555816509, -0.4003084970981625, 0.40239532697192004, -0.27427209221451676, 0.11139547525634441, -0.4320039786933343, -0.1361132465678203, 0.28223449889285135, 0.37723253512500676, -0.4167878545740997, 0.049327067215809706, 0.004427030405253163, 0.3734479866783218, -0.26256977331275166, 0.03058157694307795, 0.40620047609760235, 0.3026868194586001, -0.38195938546995833, -0.05462618005151043, 0.07135232308423767, 0.2489185291095879, 0.360256209977063, 0.41662052915091863, 0.43181913228789526, -0.332787550432343, -0.11279071962259124, 0.3882080460162669, 0.2860409549541778, -0.4285359332075629, 0.3426108370944938, 0.32558155777366693, -0.41876241161401495, 0.2945216264292476, 0.473611069732506, -0.12163916492427163, 0.07842265526315728, 0.1074682243229077, 0.24049247889338332, -0.24233783883737559, 0.1429872906517069, 0.30679885635126425, 0.31083483837065273, 0.13975925770959208, 0.14025912357401893, 0.0910327241743758, 0.32314465208837007, 0.46825986056713376, -0.028095447670452245, -0.2887878538088948, 0.4746938851849194, -0.23576781990978546, 0.41683949717481283, 0.18151724721489515, -0.099786868240475, -0.3517301944760227, -0.05158170486511793, 0.3743126576373754, -0.4865840148088658, 0.16852369824665203, 0.4789901583046863, -0.020113967437424662, 0.4355275222892274, -0.41194756325326765, -0.1870609049750307, 0.12239531945394688, 0.1890155741254489, -0.36390183284432354, 0.038877275652282606, -0.22440520452503776, -0.3319088786549962, 0.36306701332482305, -0.29085071664499296, 0.36047512367334633, 0.14851850318919446, -0.057626007300324744, 0.2921126705006287, -0.07874238083052987, 0.26848903953135306, -0.44346653122211066, 0.3639817937635108, 0.2380340409652426, -0.10288930032783838, 0.3580204827871398, -0.3404604798712434, 0.15289293302358686, 0.37510373420446186, -0.3493587470698003, -0.13751949964263233, 0.008306765686334927, 0.008483669473928757, 0.30633288698527394, 0.3064881637397292, 0.32961147597468354, 0.4190199539448187, 0.3060016188269046, -0.46421182113421366, 0.49744699376657664, 0.3195963535447355, 0.34197805774659074, 0.42257028044813794, 0.2133535953466037, -0.4519319428775823, 0.37205766264134255, -0.4711880464251408, 0.44868171025627746, 0.3434915792021904, -0.33096669240207177, -0.09463038726272543, -0.31216367909048515, 0.3609471078408468, 0.3402185204002137, 0.4438225748289497, -0.06458650101018293, 0.28983445160504573, 0.19045121571251045, -0.4245386550744783, -0.46306895003329274, -0.48442160523621425, -0.36523204230856265, 0.056311052859296495, -0.3715304328143034, -0.19139346063203533, -0.4794655985094849, -0.3608606100066396, 0.3499140847639808, 0.26350517884386804, -0.3527343250287096, 0.23230153972988887, -0.39187949288754353, -0.29619104176566324, 0.18340129072693045, 0.3039638195146246, -0.46737966354565685, -0.17676888165335924, 0.05397516644787004, -0.3078347140316957, 0.06713160476753188, 0.22181377205755837, 0.04949538092258976, 0.21852285157608975, 0.07161741018938628, 0.16208734362142252, 0.3156707770678331, -0.09723298192721685, 0.4089499305662727, 0.04559884867776631, -0.12868402921577982, -0.28779306223370327, -0.38382575941465547, -0.11316011308353424, -0.4980797326092343, -0.36844150855908353, -0.42746916897469234, -0.4231506470105302, 0.27359111467418273, -0.38310228802618695, 0.29338457479242663, 0.15067200142144088, 0.42444301195577694], "pauli_seed_q2": [-12771350299406, 505245418846, -123070490066287], "current_seeds_q5": [203264169750, 3]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration12].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration12].json index 73505a445..212cc5174 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration12].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration12].json @@ -1 +1 @@ -{"unitaries_q3": [-0.44882528698095925, 0.21751509762007615, 0.3802680530959428, 0.2730510105090431, 0.1723272746916713, -0.13920345844470106, 0.05584616229532102, -0.23214969542699038, -0.29959971333545354, 0.2797248113332209, -0.28722577580825615, -0.051803177141760415, -0.31241562029034853, 0.025135451800657904, -0.08074149417010545, -0.4186349836360712, -0.054728813629211004, 0.11199236531999546, -0.3310447281338149, 0.1961489222558832, -0.24364278945751394, -0.41373787501252934, -0.49075580494069726, -0.49500617846724637, 0.04517698380747248, 0.3736056255881408, -0.23042832066938956, 0.48660858755684444, 0.4355398681503253, -0.13488961790957887, 0.2813933307165257, -0.41366667379787003, -0.3576968962671607, 0.031850165179228895, 0.1215744180596694, -0.09788826968987507, -0.048175590932000745, 0.4487621872882883, 0.48170724460221237, -0.23451311792852536, 0.42923384599364667, -0.10022812594482033, -0.1703562718193048, 0.03370986586156732, -0.4221340290585829, -0.24309403223028525, -0.2626546274601331, -0.19190429382765473, -0.09016921524732169, -0.34710985644882797, 0.17828008632045567, -0.3344122924782482, 0.3960680926516851, -0.23762373139040704, 0.4386795731621973, -0.470821983982578, 0.024064861372878, 0.22827181533629215, 0.39866618977662327, 0.22346762715176283, -0.2957659620141371, 0.19835690373631465, 0.4120386922431365, 0.35908437707395535, 0.008288686447901483, 0.1907282900268754, -0.019769226618983282, 0.0488876292027669, 0.08227861161092775, -0.4019790567990782, -0.2997854884655027, -0.2146600639917331, 0.29287237689083767, -0.1596973714315837, 0.4060575610720214, 0.258661210979799, 0.185835345332638, 0.37074082635203354, -0.1459133170689384, -0.004975097634783765, -0.4839970882809759], "rc_base_cycle_loop_index": [11], "twirled_unitaries_q3": [-0.44882528698095925, 0.21751509762007615, -0.1197319469040572, -0.22694898949095688, 0.1723272746916713, 0.36079654155529894, 0.05584616229532102, -0.2678503045730096, -0.20040028666454646, -0.2797248113332209, -0.28722577580825615, 0.051803177141760415, 0.31241562029034853, 0.4748645481993421, 0.41925850582989455, -0.4186349836360712, -0.445271186370789, -0.11199236531999546, -0.16895527186618509, 0.3038510777441168, -0.24364278945751394, 0.08626212498747066, -0.49075580494069726, -0.49500617846724637, 0.04517698380747248, 0.3736056255881408, -0.23042832066938956, -0.01339141244315556, 0.4355398681503253, -0.13488961790957887, -0.21860666928347428, -0.08633332620212997, -0.14230310373283928, -0.031850165179228895, 0.1215744180596694, 0.09788826968987507, 0.048175590932000745, 0.4487621872882883, -0.48170724460221237, 0.23451311792852536, 0.42923384599364667, 0.10022812594482033, -0.3296437281806952, 0.4662901341384327, 0.07786597094141712, 0.25690596776971475, -0.2626546274601331, 0.3080957061723453, 0.4098307847526783, -0.15289014355117203, 0.32171991367954433, -0.16558770752175178, 0.10393190734831492, 0.26237626860959296, -0.0613204268378027, -0.02917801601742198, 0.475935138627122, -0.22827181533629215, 0.39866618977662327, 0.2765323728482372, -0.20423403798586293, 0.19835690373631465, -0.4120386922431365, 0.14091562292604465, 0.008288686447901483, 0.3092717099731246, -0.4802307733810167, 0.4511123707972331, 0.08227861161092775, 0.0980209432009218, -0.2997854884655027, -0.2146600639917331, 0.29287237689083767, -0.3403026285684163, 0.0939424389279786, -0.258661210979799, 0.314164654667362, -0.12925917364796646, -0.1459133170689384, -0.004975097634783765, -0.4839970882809759], "twirled_unitaries_q4": [0.08345406647035958, 0.010591342069119491, -0.012196213778462806, 0.27065954885196675, -0.3557583954986825, -0.17232005968702424, 0.40234032300345746, 0.32971884186395783, -0.15518229722326993, 0.04151701288553511, 0.4149028637475425, 0.060495617944042124, 0.4439617577671342, -0.21225113115551508, -0.054088724382374664, 0.23892899918584476, -0.125309330460194, -0.060092742372248154, -0.4896137555816509, -0.09969150290183748, 0.40239532697192004, -0.27427209221451676, 0.3886045247436556, 0.4320039786933343, 0.1361132465678203, 0.21776550110714865, 0.37723253512500676, 0.08321214542590027, 0.049327067215809706, 0.004427030405253163, -0.1265520133216782, -0.26256977331275166, 0.03058157694307795, 0.40620047609760235, 0.1973131805413999, 0.38195938546995833, -0.44537381994848957, 0.42864767691576233, 0.2489185291095879, -0.13974379002293702, 0.08337947084908137, 0.06818086771210474, -0.16721244956765702, -0.38720928037740876, 0.3882080460162669, -0.2139590450458222, -0.07146406679243711, -0.3426108370944938, -0.32558155777366693, -0.08123758838598505, 0.2945216264292476, 0.473611069732506, -0.3783608350757284, -0.07842265526315728, 0.3925317756770923, 0.2595075211066167, -0.24233783883737559, 0.1429872906517069, 0.19320114364873575, -0.31083483837065273, -0.13975925770959208, 0.35974087642598107, -0.4089672758256242, 0.32314465208837007, 0.03174013943286624, 0.028095447670452245, 0.2887878538088948, 0.4746938851849194, -0.26423218009021454, -0.41683949717481283, 0.18151724721489515, 0.099786868240475, 0.3517301944760227, -0.05158170486511793, 0.12568734236262458, 0.4865840148088658, 0.16852369824665203, 0.021009841695313725, 0.020113967437424662, 0.06447247771077258, 0.08805243674673235], "pauli_seed_q4": [-132213089617295, -136889955735746], "twirled_unitaries_q0": [0.4712154313820385, -0.42572259206511376, -0.42111592564365097, -0.2668778554191107, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, 0.2985251306765164, 0.4731909991248422, -0.34828986034517584, -0.4607650836825492, 0.12315582717864615, 0.028899062065068648, 0.20420834050016623, 0.18029413960657692, 0.2520273229900738, -0.31375414547666836, 0.008947666745431349, 0.08201948178145457, -0.2836154606077912, 0.18180393326804634, 0.05523301804827341, -0.20735831441055907, -0.2567003523160629, -0.03291592648032449, 0.3433998074271578, 0.4670244868340099, -0.012842477370785588, -0.17073608461863543, 0.44990811567888755, 0.34029098228440446, -0.10658408246160533, 0.2551812027350344, 0.21711220189177283, -0.3225331758216612, 0.3927726383275072, -0.44759812516522146, -0.40011916609044107, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.07448506389936327, -0.20665942225402745, -0.08872518057716405, 0.42201221928209165, 0.4695275208591738, -0.3706380358472927, -0.33980968285915836, -0.1696033162756727, 0.3385085508172061, -0.11825097296870268, 0.13890870450366322, -0.24209820089131995, -0.006790752767880548, 0.04304425197575412, -0.32738600345714275, 0.24772931986974456, 0.19660653963240193, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, -0.26228990149481035, 0.1496960222960304, -0.28778184548331254, 0.06876404255354984, -0.23108886334528123, -0.4803542081018186, 0.4734366213618273, 0.3427234359697735, 0.27092919654169023, -0.2597276322282447, 0.3177048344177287, -0.439668073429921, 0.447220912180196], "twirled_unitaries_q2": [0.34603826044352104, 0.19511749309766913, -0.4145682812563436, -0.036928592509120506, 0.44066757058091, -0.2944662830567353, 0.0859309855169279, 0.14970634357845114, -0.21420182853494651, -0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.47367514134620947, 0.13755156757528653, 0.4512413528363055, -0.029349912099974063, -0.1734552494365822, 0.3177235489138397, -0.16885000522517402, -0.07938718192367133, -0.3911759845303031, -0.29308952850711734, 0.32399096841614394, 0.49089954872644626, 0.016669856223522572, -0.13176156160845665, 0.03572518135114322, -0.07037465869650461, -0.3395366446713197, -0.28977728519420864, -0.08722634311680011, -0.2715537852772023, -0.19373663828146093, 0.11338753441490113, -0.2815125184840035, 0.3822599408908971, 0.07358068439263832, 0.35911783302185896, 0.4980383678436553, -0.0769597740948278, -0.34622494807280546, -0.1375695796222196, -0.11134404259463437, -0.03588381796728868, 0.2877355696129733, 0.4151805693951154, -0.2542984989212549, 0.29923453998630123, -0.04042363460278864, 0.11804108316546547, -0.4614096274332553, -0.08978167650477431, 0.42191404860625425, 0.04165792706529814, 0.37243126123017944, 0.4374360835014812, 0.31177994003055787, -0.44384141722735393, -0.2722341089927305, 0.3855950011202296, -0.47395468114399364, -0.11199589029635248, -0.11709447484012614, 0.41894082221451256, 0.05473129170245272, 0.2680115214576162, -0.4357020266360898, 0.40176015336168547, 0.4720817472009138, 0.1352842273606072, -0.1662718950803388, 0.46163591823072636, 0.1337047764333228, -0.17466870563372083, -0.1765877048535387, -0.0638019217320398, -0.4878383579652166, -0.2611003790152928, 0.23903804718794674, 0.17505008531592026], "current_seeds_q3": [31155819389228, 0], "unitaries_q0": [0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005], "pauli_seed_q1": [60017443263372, 139478054485503], "pauli_seed_q0": [56235133306163, 46271745691961], "rc_seed_index": [2], "current_seeds_q0": [11567936422990, 0], "modulo_counter": [49], "current_seeds_q2": [13648660503014, 2], "unitaries_q2": [0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353, -0.0859309855169279, 0.35029365642154886, -0.21420182853494651, -0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.331149994774826, 0.42061281807632867, 0.10882401546969689, -0.20691047149288266, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028, 0.28977728519420864, -0.4127736568831999, 0.2284462147227977, 0.3062633617185391, 0.11338753441490113, 0.2184874815159965, 0.3822599408908971, 0.07358068439263832, -0.14088216697814104, 0.4980383678436553, -0.0769597740948278, -0.34622494807280546, -0.1375695796222196, -0.3886559574053656, -0.4641161820327113, -0.2877355696129733, 0.4151805693951154, -0.2457015010787451, -0.29923453998630123, -0.45957636539721136, -0.38195891683453453, 0.03859037256674469, -0.08978167650477431, -0.07808595139374575, 0.04165792706529814, 0.37243126123017944, -0.06256391649851878, 0.31177994003055787, -0.44384141722735393, 0.22776589100726952, -0.1144049988797704, -0.02604531885600636, -0.3880041097036475, -0.38290552515987386, 0.41894082221451256, 0.4452687082975473, 0.2319884785423838, -0.06429797336391019, -0.09823984663831453, -0.02791825279908622, 0.3647157726393928, -0.3337281049196612, -0.46163591823072636, 0.1337047764333228, -0.32533129436627917, 0.1765877048535387, -0.0638019217320398, 0.4878383579652166, -0.23889962098470718, 0.26096195281205326, -0.32494991468407974], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "current_seeds_q5": [32963532974897, 2], "is_mod_zero": [0], "pauli_seed_q5": [-133041699791850, 131854131899589], "current_seeds_q1": [34869513621375, 0], "unitary_angle_offset": [78], "twirled_unitaries_q5": [0.3129390950249693, 0.12239531945394688, 0.1890155741254489, 0.13609816715567646, 0.4611227243477174, -0.27559479547496224, 0.3319088786549962, 0.13693298667517695, -0.29085071664499296, -0.13952487632665367, 0.14851850318919446, -0.057626007300324744, -0.20788732949937128, -0.42125761916947013, -0.26848903953135306, -0.05653346877788934, 0.1360182062364892, -0.2619659590347574, 0.3971106996721616, 0.3580204827871398, -0.3404604798712434, -0.34710706697641314, 0.12489626579553814, 0.3493587470698003, -0.3624805003573677, 0.4916932343136651, 0.008483669473928757, -0.19366711301472606, 0.1935118362602708, 0.17038852402531646, -0.4190199539448187, 0.19399838117309542, 0.035788178865786335, 0.49744699376657664, 0.18040364645526452, 0.15802194225340926, 0.07742971955186206, 0.2133535953466037, 0.4519319428775823, -0.37205766264134255, -0.4711880464251408, -0.44868171025627746, 0.15650842079780958, -0.33096669240207177, 0.09463038726272543, 0.31216367909048515, 0.3609471078408468, 0.15978147959978628, -0.4438225748289497, -0.06458650101018293, -0.28983445160504573, -0.19045121571251045, -0.4245386550744783, 0.46306895003329274, 0.48442160523621425, -0.13476795769143735, -0.4436889471407035, 0.12846956718569658, -0.19139346063203533, -0.4794655985094849, -0.3608606100066396, 0.3499140847639808, 0.26350517884386804, -0.3527343250287096, 0.2676984602701111, 0.39187949288754353, -0.20380895823433676, 0.31659870927306955, 0.3039638195146246, 0.032620336454343146, -0.32323111834664076, -0.05397516644787004, 0.3078347140316957, 0.06713160476753188, -0.22181377205755837, -0.04949538092258976, 0.21852285157608975, -0.07161741018938628, -0.16208734362142252, 0.3156707770678331, 0.09723298192721685], "unitaries_q5": [-0.1870609049750307, 0.3776046805460531, 0.3109844258745511, 0.36390183284432354, 0.4611227243477174, -0.22440520452503776, 0.1680911213450038, 0.13693298667517695, -0.20914928335500704, 0.13952487632665367, 0.35148149681080554, 0.44237399269967526, -0.20788732949937128, -0.42125761916947013, -0.26848903953135306, 0.44346653122211066, 0.1360182062364892, 0.2380340409652426, 0.3971106996721616, 0.14197951721286017, 0.3404604798712434, -0.15289293302358686, 0.12489626579553814, 0.1506412529301997, -0.13751949964263233, 0.4916932343136651, -0.008483669473928757, 0.19366711301472606, 0.3064881637397292, 0.17038852402531646, 0.08098004605518128, 0.19399838117309542, -0.46421182113421366, 0.49744699376657664, 0.3195963535447355, 0.34197805774659074, 0.42257028044813794, 0.2866464046533963, -0.048068057122417684, 0.12794233735865745, -0.4711880464251408, -0.44868171025627746, -0.3434915792021904, -0.16903330759792823, -0.09463038726272543, -0.31216367909048515, 0.13905289215915317, 0.15978147959978628, 0.05617742517105029, -0.06458650101018293, 0.21016554839495427, 0.30954878428748955, -0.4245386550744783, -0.03693104996670726, -0.015578394763785752, -0.13476795769143735, 0.056311052859296495, -0.3715304328143034, -0.19139346063203533, 0.02053440149051511, -0.3608606100066396, 0.15008591523601922, 0.23649482115613196, 0.3527343250287096, 0.2676984602701111, 0.10812050711245647, 0.20380895823433676, 0.18340129072693045, -0.1960361804853754, -0.46737966354565685, -0.17676888165335924, -0.44602483355212996, -0.3078347140316957, 0.06713160476753188, -0.27818622794244163, 0.04949538092258976, 0.21852285157608975, -0.4283825898106137, 0.16208734362142252, 0.18432922293216691, -0.40276701807278315], "pauli_seed_q2": [-133056412874444, 54594642012057], "current_seeds_q4": [36146255243727, 2], "break": [1], "pauli_seed_q3": [59797934191791, 124623277556914], "unitaries_q1": [0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538], "twirled_unitaries_q1": [0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, -0.19434498158991076, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, -0.18571149745641335, -0.2877962331373993, -0.160027087917328, 0.3520932401429775, -0.4300465035584615, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.22100626514078314, -0.4663373044190351, 0.2347203298500311, -0.1940641530915279, -0.49574002698605213, 0.07934844926123219, 0.20003673498231578, 0.4724426590122235, -0.4796988074039099, -0.2711085794287058, 0.3572385478026021, 0.2606958900527516, 0.06832291882974673, -0.4324770402338274, -0.49374088600902866, 0.011725823508509592, 0.3095166071138138, -0.38152574068700673, 0.2762103529668707, 0.35954051017160893, -0.32226538703772434, -0.28766952015633507, 0.31763626852959703, 0.3830795306205417, -0.356367840362811, 0.05360593444192574, -0.2705349101205172, -0.2835965124238129, -0.0952356692211751, -0.22063635836623874, 0.25125128247756123, -0.4689717709380474, -0.3382588909775066, 0.28028169533084935, -0.06018639817481031, -0.4031368826142234, -0.4328245778372555, 0.35829684548359, 0.49565929289516575, 0.38558393453215345, 0.11945848943226167, -0.12939651458237122, -0.03568378013919471, -0.45227955351385773, 0.10900193868114982, -0.46477539180972016, 0.2218792895229953, -0.008494055987057436, 0.018503482111370317, 0.05312386930746982, 0.4177095451891617, 0.3382932840446351, -0.14285195841982912, -0.08841780823371082, 0.3781041938415939, -0.053929188169522746, 0.08867370901765526, -0.12821086662084014, 0.44493207735456863, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538], "unitaries_q4": [-0.4165459335296404, 0.4894086579308805, 0.012196213778462806, 0.22934045114803325, -0.1442416045013175, 0.32767994031297576, 0.40234032300345746, 0.32971884186395783, 0.3448177027767301, -0.4584829871144649, 0.08509713625245752, -0.060495617944042124, -0.4439617577671342, -0.21225113115551508, 0.054088724382374664, -0.23892899918584476, -0.125309330460194, 0.060092742372248154, 0.4896137555816509, -0.4003084970981625, 0.40239532697192004, -0.27427209221451676, 0.3886045247436556, 0.4320039786933343, -0.3638867534321797, 0.28223449889285135, 0.12276746487499324, -0.08321214542590027, 0.4506729327841903, -0.49557296959474684, -0.1265520133216782, -0.26256977331275166, 0.03058157694307795, 0.40620047609760235, 0.1973131805413999, -0.11804061453004167, 0.05462618005151043, 0.07135232308423767, -0.2489185291095879, 0.13974379002293702, 0.41662052915091863, 0.06818086771210474, -0.16721244956765702, -0.38720928037740876, -0.1117919539837331, 0.2860409549541778, -0.4285359332075629, -0.1573891629055062, -0.17441844222633307, -0.41876241161401495, -0.20547837357075238, 0.473611069732506, -0.3783608350757284, -0.07842265526315728, 0.3925317756770923, 0.2595075211066167, -0.24233783883737559, 0.1429872906517069, 0.19320114364873575, 0.18916516162934727, -0.13975925770959208, 0.35974087642598107, 0.0910327241743758, -0.17685534791162993, 0.46825986056713376, -0.028095447670452245, 0.21121214619110518, 0.025306114815080605, 0.23576781990978546, 0.08316050282518717, 0.31848275278510485, 0.400213131759525, -0.3517301944760227, -0.05158170486511793, -0.12568734236262458, -0.4865840148088658, 0.33147630175334797, 0.021009841695313725, -0.47988603256257534, 0.06447247771077258, 0.08805243674673235]} \ No newline at end of file +{"current_seeds_q1": [34869513621375, 0], "is_mod_zero": [0], "pauli_seed_q0": [56235133306163, 46271745691961], "unitaries_q5": [0.3129390950249693, 0.12239531945394688, 0.1890155741254489, -0.36390183284432354, 0.4611227243477174, -0.27559479547496224, -0.1680911213450038, 0.36306701332482305, -0.20914928335500704, -0.36047512367334633, 0.35148149681080554, 0.44237399269967526, -0.20788732949937128, -0.42125761916947013, 0.23151096046864694, 0.44346653122211066, 0.3639817937635108, 0.2619659590347574, 0.10288930032783838, 0.3580204827871398, 0.3404604798712434, -0.15289293302358686, 0.37510373420446186, -0.1506412529301997, -0.3624805003573677, 0.4916932343136651, 0.008483669473928757, 0.30633288698527394, 0.3064881637397292, -0.17038852402531646, 0.4190199539448187, 0.3060016188269046, 0.035788178865786335, 0.49744699376657664, 0.18040364645526452, -0.34197805774659074, 0.07742971955186206, 0.2866464046533963, 0.048068057122417684, 0.37205766264134255, -0.028811953574859217, -0.44868171025627746, 0.15650842079780958, -0.16903330759792823, -0.09463038726272543, 0.18783632090951485, 0.13905289215915317, -0.3402185204002137, -0.4438225748289497, -0.06458650101018293, 0.21016554839495427, 0.30954878428748955, -0.4245386550744783, -0.03693104996670726, -0.015578394763785752, -0.13476795769143735, 0.056311052859296495, 0.12846956718569658, -0.19139346063203533, 0.02053440149051511, 0.1391393899933604, 0.3499140847639808, 0.26350517884386804, -0.3527343250287096, 0.2676984602701111, -0.10812050711245647, 0.29619104176566324, 0.31659870927306955, 0.3039638195146246, 0.032620336454343146, -0.32323111834664076, -0.05397516644787004, 0.3078347140316957, 0.06713160476753188, 0.27818622794244163, 0.45050461907741024, 0.28147714842391025, -0.4283825898106137, -0.3379126563785775, 0.18432922293216691, -0.40276701807278315], "pauli_seed_q4": [-132213089617295, -136889955735746], "rc_base_cycle_loop_index": [11], "current_seeds_q0": [11567936422990, 0], "pauli_seed_q2": [-133056412874444, 54594642012057], "unitaries_q0": [-0.028784568617961526, -0.07427740793488624, -0.07888407435634903, -0.2331221445808893, 0.13331130172538863, 0.12425959266423448, -0.34215653660366385, 0.26111010223272757, 0.20147486932348357, 0.026809000875157807, -0.15171013965482416, 0.039234916317450796, 0.12315582717864615, 0.028899062065068648, 0.20420834050016623, 0.18029413960657692, 0.2479726770099262, 0.31375414547666836, 0.49105233325456865, 0.08201948178145457, 0.2836154606077912, -0.18180393326804634, 0.4447669819517266, -0.20735831441055907, -0.2567003523160629, -0.4670840735196755, 0.1566001925728422, -0.4670244868340099, -0.012842477370785588, 0.17073608461863543, 0.050091884321112445, 0.15970901771559554, 0.39341591753839467, 0.2551812027350344, 0.21711220189177283, 0.1774668241783388, -0.1072273616724928, -0.44759812516522146, 0.09988083390955893, -0.2846662038892873, 0.192623419867207, -0.0048050564673012275, 0.00910933552858495, 0.4655014605768244, -0.17201116439296982, -0.18967701752599453, 0.42551493610063673, -0.20665942225402745, -0.08872518057716405, 0.07798778071790835, -0.4695275208591738, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, -0.3385085508172061, -0.3817490270312973, -0.3610912954963368, -0.24209820089131995, -0.49320924723211945, 0.4569557480242459, -0.17261399654285725, 0.25227068013025544, 0.19660653963240193, -0.385197581175035, -0.327295566650033, -0.1306577643126623, -0.44968060926099085, -0.42638081326169797, -0.26228990149481035, 0.1496960222960304, -0.28778184548331254, -0.43123595744645016, -0.23108886334528123, -0.019645791898181386, 0.026563378638172708, 0.1572765640302265, 0.22907080345830977, 0.2402723677717553, 0.3177048344177287, -0.439668073429921, 0.447220912180196], "current_seeds_q3": [31155819389228, 0], "unitaries_q2": [0.34603826044352104, 0.19511749309766913, -0.4145682812563436, -0.036928592509120506, 0.059332429419090005, -0.20553371694326472, 0.4140690144830721, 0.14970634357845114, 0.21420182853494651, -0.18760028191363887, -0.21514255278739114, -0.44268147867660446, 0.22201092389900978, 0.47367514134620947, 0.13755156757528653, 0.4512413528363055, -0.47065008790002594, 0.1734552494365822, 0.1822764510861603, -0.16885000522517402, 0.07938718192367133, 0.3911759845303031, -0.29308952850711734, -0.32399096841614394, 0.009100451273553745, 0.48333014377647743, -0.13176156160845665, 0.03572518135114322, -0.4296253413034954, -0.16046335532868028, 0.28977728519420864, -0.4127736568831999, -0.2715537852772023, 0.3062633617185391, 0.11338753441490113, -0.2815125184840035, 0.3822599408908971, 0.07358068439263832, -0.14088216697814104, 0.4980383678436553, -0.0769597740948278, 0.15377505192719454, 0.3624304203777804, -0.11134404259463437, -0.03588381796728868, 0.2877355696129733, 0.08481943060488462, 0.2542984989212549, 0.20076546001369877, -0.04042363460278864, 0.38195891683453453, -0.03859037256674469, -0.4102183234952257, 0.42191404860625425, -0.45834207293470186, 0.12756873876982056, 0.06256391649851878, 0.18822005996944213, -0.05615858277264607, 0.22776589100726952, -0.1144049988797704, -0.47395468114399364, -0.11199589029635248, -0.11709447484012614, 0.08105917778548744, 0.4452687082975473, -0.2680115214576162, -0.4357020266360898, 0.09823984663831453, 0.02791825279908622, 0.1352842273606072, 0.1662718950803388, 0.03836408176927364, 0.3662952235666772, 0.32533129436627917, 0.3234122951464613, -0.0638019217320398, -0.4878383579652166, -0.2611003790152928, 0.23903804718794674, 0.17505008531592026], "break": [1], "pauli_seed_q5": [-133041699791850, 131854131899589], "pauli_seed_q3": [59797934191791, 124623277556914], "rc_seed_index": [2], "pauli_seed_q1": [60017443263372, 139478054485503], "unitaries_q3": [0.05117471301904075, 0.28248490237992385, 0.1197319469040572, -0.2730510105090431, 0.1723272746916713, 0.13920345844470106, 0.444153837704679, -0.23214969542699038, -0.20040028666454646, 0.2202751886667791, -0.21277422419174385, -0.051803177141760415, 0.18758437970965147, 0.4748645481993421, -0.41925850582989455, 0.4186349836360712, -0.445271186370789, 0.11199236531999546, -0.3310447281338149, 0.1961489222558832, -0.24364278945751394, -0.41373787501252934, -0.00924419505930274, -0.004993821532753628, -0.04517698380747248, 0.1263943744118592, -0.23042832066938956, -0.01339141244315556, 0.0644601318496747, -0.3651103820904211, 0.21860666928347428, -0.41366667379787003, -0.14230310373283928, -0.031850165179228895, 0.3784255819403306, -0.09788826968987507, -0.048175590932000745, 0.4487621872882883, 0.48170724460221237, 0.26548688207147464, 0.07076615400635333, 0.10022812594482033, -0.3296437281806952, 0.03370986586156732, 0.4221340290585829, -0.25690596776971475, -0.2626546274601331, -0.3080957061723453, -0.4098307847526783, -0.15289014355117203, 0.17828008632045567, -0.3344122924782482, 0.3960680926516851, -0.23762373139040704, -0.0613204268378027, -0.02917801601742198, -0.024064861372878, 0.27172818466370785, 0.10133381022337673, -0.2765323728482372, 0.20423403798586293, 0.19835690373631465, -0.0879613077568635, -0.14091562292604465, 0.4917113135520985, -0.1907282900268754, -0.4802307733810167, 0.4511123707972331, 0.08227861161092775, -0.4019790567990782, -0.2997854884655027, 0.2853399360082669, 0.29287237689083767, -0.1596973714315837, -0.0939424389279786, 0.258661210979799, 0.185835345332638, 0.37074082635203354, -0.1459133170689384, -0.004975097634783765, -0.4839970882809759], "modulo_counter": [49], "unitaries_q4": [-0.4165459335296404, 0.4894086579308805, -0.4878037862215372, -0.27065954885196675, -0.3557583954986825, 0.17232005968702424, -0.40234032300345746, 0.17028115813604217, -0.15518229722326993, 0.04151701288553511, 0.4149028637475425, 0.060495617944042124, 0.4439617577671342, -0.2877488688444849, -0.44591127561762534, 0.26107100081415524, -0.374690669539806, 0.43990725762775185, 0.010386244418349122, -0.09969150290183748, -0.09760467302807996, 0.22572790778548324, 0.11139547525634441, 0.06799602130666571, -0.1361132465678203, 0.28223449889285135, -0.12276746487499324, -0.4167878545740997, 0.4506729327841903, -0.004427030405253163, 0.1265520133216782, -0.26256977331275166, 0.46941842305692205, 0.09379952390239765, 0.1973131805413999, -0.38195938546995833, -0.05462618005151043, 0.42864767691576233, 0.2510814708904121, -0.360256209977063, 0.41662052915091863, -0.43181913228789526, 0.332787550432343, -0.11279071962259124, 0.1117919539837331, 0.2139590450458222, -0.4285359332075629, -0.3426108370944938, -0.32558155777366693, -0.08123758838598505, 0.2945216264292476, 0.473611069732506, -0.3783608350757284, -0.07842265526315728, -0.1074682243229077, 0.24049247889338332, -0.2576621611626244, -0.1429872906517069, 0.19320114364873575, 0.31083483837065273, 0.13975925770959208, 0.14025912357401893, 0.0910327241743758, 0.32314465208837007, 0.03174013943286624, -0.47190455232954776, -0.21121214619110518, 0.4746938851849194, 0.23576781990978546, 0.08316050282518717, 0.18151724721489515, -0.400213131759525, 0.3517301944760227, -0.4484182951348821, -0.12568734236262458, -0.4865840148088658, 0.33147630175334797, -0.4789901583046863, 0.020113967437424662, 0.06447247771077258, 0.08805243674673235], "unitary_angle_offset": [78], "current_seeds_q4": [36146255243727, 2], "unitaries_q1": [-0.1170996965485891, 0.3948500346756276, -0.3814168811142018, 0.26780126282373473, 0.2943348490020554, 0.19434498158991076, 0.015880959898169067, -0.1942237015504702, -0.4168508201115806, 0.18571149745641335, -0.21220376686260067, -0.160027087917328, 0.3520932401429775, -0.06995349644153848, 0.08771408961433025, 0.15018029358238394, -0.3725604991977569, 0.4927178803761194, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, 0.2652796701499689, -0.3059358469084721, 0.004259973013947871, -0.4206515507387678, 0.20003673498231578, 0.4724426590122235, -0.4796988074039099, -0.2288914205712942, 0.1427614521973979, -0.2606958900527516, 0.4316770811702533, -0.4324770402338274, 0.006259113990971343, 0.011725823508509592, -0.1904833928861862, -0.38152574068700673, 0.2237896470331293, -0.35954051017160893, 0.32226538703772434, -0.21233047984366493, -0.18236373147040297, 0.3830795306205417, -0.356367840362811, 0.05360593444192574, 0.22946508987948278, -0.2835965124238129, -0.0952356692211751, -0.22063635836623874, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, 0.06018639817481031, 0.4031368826142234, -0.4328245778372555, 0.14170315451641002, 0.004340707104834252, 0.38558393453215345, 0.38054151056773833, -0.3706034854176288, -0.03568378013919471, -0.047720446486142265, -0.10900193868114982, -0.03522460819027984, -0.2781207104770047, -0.008494055987057436, 0.4814965178886297, -0.05312386930746982, -0.4177095451891617, 0.1617067159553649, -0.14285195841982912, -0.08841780823371082, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, 0.44493207735456863, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "current_seeds_q2": [13648660503014, 2], "current_seeds_q5": [32963532974897, 2]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration13].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration13].json index 65bab3ce0..fbd415902 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration13].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration13].json @@ -1 +1 @@ -{"readout_randomization_q3": [-0.25, 0.25, 0.0], "pauli_seed_q0": [-13838434709596, 60576142310008], "rc_seed_index": [2], "readout_seed_q1": [114697805194205], "readout_source_unitaries_q5": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "readout_source_unitaries_q0": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "current_seeds_q4": [8483125331955, 2], "readout_source_unitaries_q1": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "twirled_unitaries_q3": [-0.444153837704679, -0.2678503045730096, -0.20040028666454646, -0.2797248113332209, -0.21277422419174385, 0.4481968228582396, -0.31241562029034853, 0.025135451800657904, 0.41925850582989455, -0.4186349836360712, -0.054728813629211004, -0.38800763468000454, -0.3310447281338149, 0.1961489222558832, -0.24364278945751394, 0.08626212498747066, -0.49075580494069726, 0.004993821532753628, -0.4548230161925275, 0.3736056255881408, 0.26957167933061044, -0.01339141244315556, 0.0644601318496747, -0.3651103820904211, -0.2813933307165257, -0.08633332620212997, -0.3576968962671607, 0.031850165179228895, 0.1215744180596694, -0.09788826968987507, 0.45182440906799926, 0.4487621872882883, -0.01829275539778763, 0.26548688207147464, 0.42923384599364667, -0.10022812594482033, -0.1703562718193048, 0.03370986586156732, -0.4221340290585829, 0.25690596776971475, -0.2626546274601331, -0.19190429382765473, 0.4098307847526783, -0.34710985644882797, -0.32171991367954433, -0.3344122924782482, 0.10393190734831492, 0.23762373139040704, -0.4386795731621973, -0.470821983982578, -0.024064861372878, -0.22827181533629215, 0.10133381022337673, -0.2765323728482372, 0.20423403798586293, 0.30164309626368535, 0.0879613077568635, 0.14091562292604465, 0.008288686447901483, 0.3092717099731246, 0.019769226618983282, 0.4511123707972331, -0.41772138838907225, -0.4019790567990782, -0.20021451153449732, 0.2146600639917331, -0.29287237689083767, -0.3403026285684163, 0.4060575610720214, 0.258661210979799, 0.185835345332638, -0.12925917364796646, 0.3540866829310616, -0.49502490236521624, -0.016002911719024127, -0.08345406647035958, 0.010591342069119491, 0.012196213778462806, 0.25, 0.25, 0.0], "readout_randomization_q5": [0.25, 0.25, 0.0], "readout_source_unitaries_q2": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "unitaries_q4": [0.40234032300345746, 0.32971884186395783, 0.3448177027767301, -0.4584829871144649, 0.08509713625245752, -0.060495617944042124, -0.4439617577671342, -0.21225113115551508, 0.054088724382374664, -0.23892899918584476, -0.125309330460194, 0.060092742372248154, 0.4896137555816509, -0.4003084970981625, 0.40239532697192004, -0.27427209221451676, 0.3886045247436556, 0.4320039786933343, -0.3638867534321797, 0.28223449889285135, 0.12276746487499324, -0.08321214542590027, 0.4506729327841903, -0.49557296959474684, -0.1265520133216782, -0.26256977331275166, 0.03058157694307795, 0.40620047609760235, 0.1973131805413999, -0.11804061453004167, 0.05462618005151043, 0.07135232308423767, -0.2489185291095879, 0.13974379002293702, 0.41662052915091863, 0.06818086771210474, -0.16721244956765702, -0.38720928037740876, -0.1117919539837331, 0.2860409549541778, -0.4285359332075629, -0.1573891629055062, -0.17441844222633307, -0.41876241161401495, -0.20547837357075238, 0.473611069732506, -0.3783608350757284, -0.07842265526315728, 0.3925317756770923, 0.2595075211066167, -0.24233783883737559, 0.1429872906517069, 0.19320114364873575, 0.18916516162934727, -0.13975925770959208, 0.35974087642598107, 0.0910327241743758, -0.17685534791162993, 0.46825986056713376, -0.028095447670452245, 0.21121214619110518, 0.025306114815080605, 0.23576781990978546, 0.08316050282518717, 0.31848275278510485, 0.400213131759525, -0.3517301944760227, -0.05158170486511793, -0.12568734236262458, -0.4865840148088658, 0.33147630175334797, 0.021009841695313725, -0.47988603256257534, 0.06447247771077258, 0.08805243674673235, -0.1870609049750307, 0.3776046805460531, 0.3109844258745511, 0.36390183284432354, 0.4611227243477174, -0.22440520452503776], "unitaries_q5": [0.1680911213450038, 0.13693298667517695, -0.20914928335500704, 0.13952487632665367, 0.35148149681080554, 0.44237399269967526, -0.20788732949937128, -0.42125761916947013, -0.26848903953135306, 0.44346653122211066, 0.1360182062364892, 0.2380340409652426, 0.3971106996721616, 0.14197951721286017, 0.3404604798712434, -0.15289293302358686, 0.12489626579553814, 0.1506412529301997, -0.13751949964263233, 0.4916932343136651, -0.008483669473928757, 0.19366711301472606, 0.3064881637397292, 0.17038852402531646, 0.08098004605518128, 0.19399838117309542, -0.46421182113421366, 0.49744699376657664, 0.3195963535447355, 0.34197805774659074, 0.42257028044813794, 0.2866464046533963, -0.048068057122417684, 0.12794233735865745, -0.4711880464251408, -0.44868171025627746, -0.3434915792021904, -0.16903330759792823, -0.09463038726272543, -0.31216367909048515, 0.13905289215915317, 0.15978147959978628, 0.05617742517105029, -0.06458650101018293, 0.21016554839495427, 0.30954878428748955, -0.4245386550744783, -0.03693104996670726, -0.015578394763785752, -0.13476795769143735, 0.056311052859296495, -0.3715304328143034, -0.19139346063203533, 0.02053440149051511, -0.3608606100066396, 0.15008591523601922, 0.23649482115613196, 0.3527343250287096, 0.2676984602701111, 0.10812050711245647, 0.20380895823433676, 0.18340129072693045, -0.1960361804853754, -0.46737966354565685, -0.17676888165335924, -0.44602483355212996, -0.3078347140316957, 0.06713160476753188, -0.27818622794244163, 0.04949538092258976, 0.21852285157608975, -0.4283825898106137, 0.16208734362142252, 0.18432922293216691, -0.40276701807278315, -0.4089499305662727, 0.4544011513222337, 0.3713159707842202, 0.21220693776629673, -0.38382575941465547, -0.11316011308353424], "readout_randomization_q1": [-0.5, 0.25, -0.25], "current_seeds_q2": [29835970403568, 3], "current_seeds_q1": [6986505199754, 0], "readout_source_unitaries_q3": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "unitaries_q1": [0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353], "twirled_unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, 0.4731909991248422, -0.15171013965482416, 0.4607650836825492, -0.12315582717864615, 0.47110093793493135, 0.20420834050016623, -0.3197058603934231, 0.2520273229900738, 0.18624585452333164, -0.49105233325456865, 0.08201948178145457, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, 0.2926416855894409, -0.2567003523160629, -0.4670840735196755, -0.3433998074271578, 0.03297551316599012, -0.012842477370785588, 0.17073608461863543, -0.44990811567888755, 0.34029098228440446, -0.39341591753839467, 0.24481879726496558, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, 0.49089066447141505, 0.0344985394231756, -0.17201116439296982, -0.18967701752599453, 0.07448506389936327, 0.20665942225402745, 0.08872518057716405, 0.42201221928209165, -0.4695275208591738, 0.3706380358472927, -0.33980968285915836, 0.1696033162756727, 0.1614914491827939, -0.3817490270312973, 0.13890870450366322, -0.24209820089131995, -0.49320924723211945, 0.4569557480242459, 0.32738600345714275, 0.24772931986974456, 0.30339346036759807, 0.385197581175035, -0.172704433349967, -0.1306577643126623, 0.05031939073900915, -0.42638081326169797, 0.23771009850518965, 0.1496960222960304, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, 0.026563378638172708, 0.1572765640302265, 0.27092919654169023, -0.2402723677717553, -0.3177048344177287, -0.06033192657007902, -0.052779087819804005, -0.1170996965485891, 0.3948500346756276, 0.1185831188857982, 0.25, 0.25, -0.5], "readout_seed_q0": [114829320934051], "pauli_seed_q1": [34470019755655, 27946020799016], "unitary_angle_offset": [78], "readout_seed_q3": [129378273583824], "readout_seed_q2": [17033306506441], "break": [1], "readout_seed_q5": [-73332466885869], "readout_source_unitaries_q4": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "unitaries_q3": [0.05584616229532102, -0.23214969542699038, -0.29959971333545354, 0.2797248113332209, -0.28722577580825615, -0.051803177141760415, -0.31241562029034853, 0.025135451800657904, -0.08074149417010545, -0.4186349836360712, -0.054728813629211004, 0.11199236531999546, -0.3310447281338149, 0.1961489222558832, -0.24364278945751394, -0.41373787501252934, -0.49075580494069726, -0.49500617846724637, 0.04517698380747248, 0.3736056255881408, -0.23042832066938956, 0.48660858755684444, 0.4355398681503253, -0.13488961790957887, 0.2813933307165257, -0.41366667379787003, -0.3576968962671607, 0.031850165179228895, 0.1215744180596694, -0.09788826968987507, -0.048175590932000745, 0.4487621872882883, 0.48170724460221237, -0.23451311792852536, 0.42923384599364667, -0.10022812594482033, -0.1703562718193048, 0.03370986586156732, -0.4221340290585829, -0.24309403223028525, -0.2626546274601331, -0.19190429382765473, -0.09016921524732169, -0.34710985644882797, 0.17828008632045567, -0.3344122924782482, 0.3960680926516851, -0.23762373139040704, 0.4386795731621973, -0.470821983982578, 0.024064861372878, 0.22827181533629215, 0.39866618977662327, 0.22346762715176283, -0.2957659620141371, 0.19835690373631465, 0.4120386922431365, 0.35908437707395535, 0.008288686447901483, 0.1907282900268754, -0.019769226618983282, 0.0488876292027669, 0.08227861161092775, -0.4019790567990782, -0.2997854884655027, -0.2146600639917331, 0.29287237689083767, -0.1596973714315837, 0.4060575610720214, 0.258661210979799, 0.185835345332638, 0.37074082635203354, -0.1459133170689384, -0.004975097634783765, -0.4839970882809759, -0.4165459335296404, 0.4894086579308805, 0.012196213778462806, 0.22934045114803325, -0.1442416045013175, 0.32767994031297576], "pauli_seed_q2": [-50982158722643, 119343881614275], "unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924], "pauli_seed_q5": [57280048187710, 37250364052496], "twirled_unitaries_q2": [0.4140690144830721, 0.14970634357845114, 0.21420182853494651, -0.18760028191363887, -0.21514255278739114, -0.44268147867660446, 0.22201092389900978, 0.47367514134620947, -0.3624484324247135, -0.04875864716369449, -0.029349912099974063, -0.1734552494365822, 0.3177235489138397, -0.331149994774826, 0.07938718192367133, 0.3911759845303031, -0.20691047149288266, -0.17600903158385606, 0.49089954872644626, 0.016669856223522572, 0.36823843839154335, 0.03572518135114322, -0.4296253413034954, 0.3395366446713197, 0.28977728519420864, -0.08722634311680011, 0.2715537852772023, -0.3062633617185391, 0.11338753441490113, -0.2184874815159965, -0.3822599408908971, 0.4264193156073617, 0.35911783302185896, -0.001961632156344706, -0.4230402259051722, -0.15377505192719454, -0.3624304203777804, -0.3886559574053656, 0.4641161820327113, 0.2877355696129733, 0.4151805693951154, 0.2457015010787451, -0.20076546001369877, -0.04042363460278864, 0.11804108316546547, 0.03859037256674469, -0.08978167650477431, 0.42191404860625425, -0.45834207293470186, 0.12756873876982056, 0.06256391649851878, 0.18822005996944213, -0.05615858277264607, -0.2722341089927305, -0.1144049988797704, -0.47395468114399364, -0.11199589029635248, -0.11709447484012614, 0.41894082221451256, -0.4452687082975473, 0.2680115214576162, -0.06429797336391019, -0.40176015336168547, 0.02791825279908622, 0.1352842273606072, 0.1662718950803388, 0.03836408176927364, 0.3662952235666772, 0.32533129436627917, -0.1765877048535387, -0.4361980782679602, 0.4878383579652166, 0.2611003790152928, 0.26096195281205326, 0.17505008531592026, -0.44882528698095925, 0.21751509762007615, 0.3802680530959428, 0.25, 0.0, -0.25], "pauli_seed_q3": [-12771350299406, 505245418846], "readout_randomization_q0": [0.25, 0.25, 0.0], "rc_base_cycle_loop_index": [11], "current_seeds_q0": [15144035577502, 3], "current_seeds_q3": [126311354711, 3], "readout_randomization_q4": [0.25, -0.5, -0.25], "unitaries_q2": [-0.0859309855169279, 0.35029365642154886, -0.21420182853494651, -0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.331149994774826, 0.42061281807632867, 0.10882401546969689, -0.20691047149288266, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028, 0.28977728519420864, -0.4127736568831999, 0.2284462147227977, 0.3062633617185391, 0.11338753441490113, 0.2184874815159965, 0.3822599408908971, 0.07358068439263832, -0.14088216697814104, 0.4980383678436553, -0.0769597740948278, -0.34622494807280546, -0.1375695796222196, -0.3886559574053656, -0.4641161820327113, -0.2877355696129733, 0.4151805693951154, -0.2457015010787451, -0.29923453998630123, -0.45957636539721136, -0.38195891683453453, 0.03859037256674469, -0.08978167650477431, -0.07808595139374575, 0.04165792706529814, 0.37243126123017944, -0.06256391649851878, 0.31177994003055787, -0.44384141722735393, 0.22776589100726952, -0.1144049988797704, -0.02604531885600636, -0.3880041097036475, -0.38290552515987386, 0.41894082221451256, 0.4452687082975473, 0.2319884785423838, -0.06429797336391019, -0.09823984663831453, -0.02791825279908622, 0.3647157726393928, -0.3337281049196612, -0.46163591823072636, 0.1337047764333228, -0.32533129436627917, 0.1765877048535387, -0.0638019217320398, 0.4878383579652166, -0.23889962098470718, 0.26096195281205326, -0.32494991468407974, -0.44882528698095925, 0.21751509762007615, 0.3802680530959428, 0.2730510105090431, 0.1723272746916713, -0.13920345844470106], "twirled_unitaries_q5": [-0.3319088786549962, 0.36306701332482305, -0.29085071664499296, -0.13952487632665367, 0.14851850318919446, 0.44237399269967526, 0.2921126705006287, -0.42125761916947013, 0.23151096046864694, 0.44346653122211066, 0.1360182062364892, 0.2380340409652426, -0.10288930032783838, 0.3580204827871398, -0.3404604798712434, 0.15289293302358686, 0.12489626579553814, -0.1506412529301997, -0.3624805003573677, 0.008306765686334927, 0.49151633052607124, 0.19366711301472606, 0.3064881637397292, -0.32961147597468354, -0.4190199539448187, 0.19399838117309542, -0.46421182113421366, 0.49744699376657664, 0.3195963535447355, -0.15802194225340926, 0.42257028044813794, 0.2133535953466037, -0.4519319428775823, -0.12794233735865745, -0.028811953574859217, -0.44868171025627746, 0.15650842079780958, -0.16903330759792823, -0.09463038726272543, -0.31216367909048515, 0.13905289215915317, -0.3402185204002137, -0.4438225748289497, -0.06458650101018293, 0.21016554839495427, 0.30954878428748955, -0.0754613449255217, -0.46306895003329274, -0.48442160523621425, -0.36523204230856265, -0.4436889471407035, -0.3715304328143034, -0.30860653936796467, 0.4794655985094849, 0.3608606100066396, 0.15008591523601922, 0.26350517884386804, 0.1472656749712904, 0.23230153972988887, -0.39187949288754353, 0.20380895823433676, 0.18340129072693045, -0.1960361804853754, 0.032620336454343146, -0.32323111834664076, 0.44602483355212996, 0.3078347140316957, 0.4328683952324681, -0.27818622794244163, 0.04949538092258976, 0.21852285157608975, -0.4283825898106137, 0.16208734362142252, 0.18432922293216691, -0.40276701807278315, 0.09105006943372729, 0.4544011513222337, 0.3713159707842202, 0.25, 0.25, 0.0], "current_seeds_q5": [9312591013124, 0], "twirled_unitaries_q4": [-0.09765967699654254, 0.17028115813604217, -0.3448177027767301, -0.04151701288553511, 0.4149028637475425, 0.4395043820559579, 0.0560382422328658, -0.2877488688444849, -0.054088724382374664, -0.26107100081415524, -0.125309330460194, -0.060092742372248154, -0.4896137555816509, -0.4003084970981625, -0.40239532697192004, 0.27427209221451676, 0.11139547525634441, -0.06799602130666571, -0.3638867534321797, 0.28223449889285135, 0.12276746487499324, 0.4167878545740997, 0.049327067215809706, 0.49557296959474684, -0.3734479866783218, -0.23743022668724834, -0.46941842305692205, -0.09379952390239765, 0.3026868194586001, -0.38195938546995833, -0.05462618005151043, 0.07135232308423767, 0.2489185291095879, -0.13974379002293702, 0.08337947084908137, -0.43181913228789526, -0.16721244956765702, -0.38720928037740876, 0.3882080460162669, 0.2860409549541778, -0.07146406679243711, -0.3426108370944938, 0.17441844222633307, -0.41876241161401495, 0.20547837357075238, -0.473611069732506, -0.3783608350757284, -0.4215773447368427, -0.3925317756770923, 0.2595075211066167, -0.2576621611626244, -0.1429872906517069, 0.30679885635126425, -0.31083483837065273, 0.3602407422904079, 0.14025912357401893, -0.0910327241743758, -0.32314465208837007, 0.03174013943286624, 0.47190455232954776, -0.2887878538088948, 0.025306114815080605, 0.23576781990978546, 0.08316050282518717, 0.31848275278510485, 0.400213131759525, -0.3517301944760227, -0.4484182951348821, 0.12568734236262458, -0.013415985191134183, 0.33147630175334797, -0.021009841695313725, 0.47988603256257534, 0.06447247771077258, 0.41194756325326765, 0.1870609049750307, 0.12239531945394688, 0.3109844258745511, -0.25, -0.5, -0.25], "readout_randomization_q2": [-0.25, 0.0, -0.25], "readout_seed_q4": [-62630319121345], "twirled_unitaries_q1": [0.48411904010183093, -0.1942237015504702, -0.08314917988841941, 0.31428850254358665, -0.2877962331373993, 0.339972912082672, -0.1479067598570225, -0.4300465035584615, 0.41228591038566975, -0.15018029358238394, -0.3725604991977569, -0.4927178803761194, 0.4925164648993672, -0.27899373485921686, -0.4663373044190351, -0.2652796701499689, -0.1940641530915279, -0.49574002698605213, 0.07934844926123219, 0.20003673498231578, 0.4724426590122235, -0.4796988074039099, -0.2288914205712942, -0.3572385478026021, -0.2606958900527516, 0.06832291882974673, 0.4324770402338274, 0.49374088600902866, 0.4882741764914904, 0.3095166071138138, 0.11847425931299327, 0.2237896470331293, 0.14045948982839107, -0.17773461296227566, -0.21233047984366493, -0.18236373147040297, -0.11692046937945832, -0.356367840362811, -0.44639406555807426, -0.2705349101205172, -0.2835965124238129, -0.0952356692211751, -0.22063635836623874, 0.25125128247756123, 0.031028229061952572, -0.3382588909775066, 0.28028169533084935, 0.4398136018251897, 0.09686311738577658, -0.4328245778372555, 0.35829684548359, 0.49565929289516575, 0.38558393453215345, 0.11945848943226167, -0.12939651458237122, -0.03568378013919471, 0.047720446486142265, 0.10900193868114982, -0.46477539180972016, 0.2218792895229953, -0.008494055987057436, 0.018503482111370317, 0.05312386930746982, 0.4177095451891617, 0.3382932840446351, 0.3571480415801709, 0.4115821917662892, 0.12189580615840612, -0.44607081183047725, -0.08867370901765526, -0.37178913337915986, 0.44493207735456863, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538, -0.15396173955647896, 0.3048825069023309, -0.0854317187436564, 0.0, 0.25, 0.25], "pauli_seed_q4": [-123070490066287, 33932501327821]} \ No newline at end of file +{"readout_randomization_q3": [-0.25, 0.25, 0.0], "readout_randomization_q1": [-0.5, 0.25, -0.25], "current_seeds_q0": [15144035577502, 3], "readout_source_unitaries_q3": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "unitaries_q3": [0.05584616229532102, -0.23214969542699038, -0.29959971333545354, -0.2202751886667791, -0.28722577580825615, 0.4481968228582396, -0.31241562029034853, 0.025135451800657904, -0.08074149417010545, 0.08136501636392879, -0.445271186370789, -0.11199236531999546, -0.16895527186618509, 0.1961489222558832, -0.25635721054248606, -0.08626212498747066, -0.00924419505930274, 0.004993821532753628, -0.4548230161925275, 0.3736056255881408, -0.23042832066938956, -0.01339141244315556, 0.0644601318496747, -0.3651103820904211, -0.2813933307165257, -0.41366667379787003, 0.3576968962671607, 0.4681498348207711, 0.1215744180596694, -0.4021117303101249, -0.45182440906799926, 0.05123781271171168, -0.01829275539778763, -0.23451311792852536, 0.42923384599364667, 0.39977187405517967, 0.3296437281806952, 0.03370986586156732, 0.07786597094141712, 0.25690596776971475, -0.23734537253986687, 0.19190429382765473, -0.4098307847526783, -0.15289014355117203, 0.17828008632045567, 0.16558770752175178, 0.10393190734831492, -0.26237626860959296, 0.0613204268378027, -0.02917801601742198, 0.024064861372878, -0.27172818466370785, 0.39866618977662327, 0.22346762715176283, 0.20423403798586293, 0.30164309626368535, -0.4120386922431365, -0.35908437707395535, 0.4917113135520985, -0.3092717099731246, -0.019769226618983282, 0.0488876292027669, -0.41772138838907225, -0.4019790567990782, -0.20021451153449732, -0.2853399360082669, 0.20712762310916233, -0.3403026285684163, -0.0939424389279786, -0.241338789020201, 0.314164654667362, 0.12925917364796646, 0.1459133170689384, -0.49502490236521624, -0.4839970882809759, 0.08345406647035958, 0.010591342069119491, 0.4878037862215372, 0.25, 0.25, 0.0], "readout_source_unitaries_q1": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "readout_source_unitaries_q0": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "readout_randomization_q4": [0.25, -0.5, -0.25], "readout_randomization_q0": [0.25, 0.25, 0.0], "readout_seed_q4": [-62630319121345], "unitaries_q2": [0.4140690144830721, 0.14970634357845114, -0.2857981714650535, -0.18760028191363887, -0.21514255278739114, 0.057318521323395544, 0.22201092389900978, 0.026324858653790528, 0.3624484324247135, -0.4512413528363055, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.16885000522517402, -0.42061281807632867, 0.3911759845303031, -0.29308952850711734, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, 0.3395366446713197, 0.28977728519420864, -0.08722634311680011, -0.2284462147227977, -0.3062633617185391, 0.11338753441490113, 0.2815125184840035, 0.1177400591091029, 0.4264193156073617, -0.14088216697814104, 0.4980383678436553, -0.4230402259051722, 0.34622494807280546, 0.1375695796222196, -0.3886559574053656, -0.03588381796728868, 0.2877355696129733, 0.08481943060488462, -0.2457015010787451, 0.20076546001369877, -0.04042363460278864, 0.38195891683453453, -0.03859037256674469, -0.4102183234952257, 0.42191404860625425, -0.45834207293470186, 0.37243126123017944, -0.06256391649851878, -0.18822005996944213, -0.05615858277264607, 0.2722341089927305, 0.1144049988797704, -0.47395468114399364, -0.3880041097036475, 0.11709447484012614, 0.08105917778548744, 0.05473129170245272, -0.2319884785423838, -0.4357020266360898, 0.40176015336168547, 0.4720817472009138, 0.1352842273606072, 0.3337281049196612, -0.03836408176927364, 0.3662952235666772, 0.17466870563372083, -0.3234122951464613, -0.4361980782679602, 0.012161642034783426, 0.23889962098470718, 0.26096195281205326, 0.32494991468407974, 0.44882528698095925, 0.21751509762007615, -0.3802680530959428, 0.25, 0.0, -0.25], "break": [1], "pauli_seed_q4": [-123070490066287, 33932501327821], "pauli_seed_q2": [-50982158722643, 119343881614275], "readout_seed_q5": [-73332466885869], "readout_source_unitaries_q5": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "current_seeds_q3": [126311354711, 3], "readout_source_unitaries_q4": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "readout_seed_q3": [129378273583824], "rc_seed_index": [2], "readout_randomization_q5": [0.25, 0.25, 0.0], "pauli_seed_q0": [-13838434709596, 60576142310008], "rc_base_cycle_loop_index": [11], "readout_seed_q0": [114829320934051], "unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, -0.18029413960657692, 0.2520273229900738, 0.31375414547666836, -0.008947666745431349, 0.08201948178145457, -0.2163845393922088, 0.31819606673195366, 0.4447669819517266, -0.20735831441055907, 0.24329964768393708, -0.03291592648032449, -0.1566001925728422, -0.03297551316599012, -0.012842477370785588, -0.17073608461863543, -0.050091884321112445, 0.15970901771559554, 0.10658408246160533, 0.24481879726496558, 0.21711220189177283, 0.3225331758216612, -0.3927726383275072, -0.44759812516522146, -0.09988083390955893, -0.21533379611071268, 0.192623419867207, 0.0048050564673012275, -0.00910933552858495, 0.4655014605768244, -0.3279888356070302, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.16019031714084164, -0.1696033162756727, 0.3385085508172061, -0.3817490270312973, -0.13890870450366322, 0.24209820089131995, -0.006790752767880548, 0.4569557480242459, -0.17261399654285725, 0.24772931986974456, -0.19660653963240193, -0.114802418824965, -0.327295566650033, -0.3693422356873377, 0.44968060926099085, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.21221815451668746, 0.43123595744645016, 0.23108886334528123, -0.4803542081018186, 0.026563378638172708, 0.1572765640302265, 0.22907080345830977, -0.2597276322282447, 0.3177048344177287, -0.06033192657007902, -0.447220912180196, -0.3829003034514109, 0.10514996532437237, 0.1185831188857982, 0.25, 0.25, -0.5], "pauli_seed_q1": [34470019755655, 27946020799016], "pauli_seed_q3": [-12771350299406, 505245418846], "readout_source_unitaries_q2": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "pauli_seed_q5": [57280048187710, 37250364052496], "unitary_angle_offset": [78], "readout_seed_q2": [17033306506441], "current_seeds_q4": [8483125331955, 2], "current_seeds_q1": [6986505199754, 0], "readout_seed_q1": [114697805194205], "unitaries_q4": [0.40234032300345746, 0.32971884186395783, -0.15518229722326993, 0.04151701288553511, 0.4149028637475425, -0.4395043820559579, -0.0560382422328658, -0.2877488688444849, -0.44591127561762534, -0.23892899918584476, -0.125309330460194, 0.060092742372248154, -0.010386244418349122, -0.4003084970981625, -0.09760467302807996, 0.22572790778548324, 0.11139547525634441, -0.4320039786933343, -0.1361132465678203, 0.28223449889285135, -0.12276746487499324, 0.08321214542590027, 0.049327067215809706, 0.004427030405253163, -0.1265520133216782, -0.23743022668724834, -0.03058157694307795, -0.40620047609760235, 0.1973131805413999, -0.38195938546995833, -0.05462618005151043, 0.07135232308423767, 0.2489185291095879, -0.13974379002293702, 0.08337947084908137, 0.06818086771210474, 0.332787550432343, -0.38720928037740876, -0.1117919539837331, 0.2860409549541778, -0.07146406679243711, -0.3426108370944938, 0.17441844222633307, -0.08123758838598505, -0.20547837357075238, 0.473611069732506, -0.3783608350757284, -0.07842265526315728, 0.3925317756770923, 0.24049247889338332, 0.24233783883737559, 0.3570127093482931, 0.30679885635126425, -0.31083483837065273, -0.13975925770959208, 0.35974087642598107, 0.0910327241743758, -0.17685534791162993, 0.46825986056713376, -0.028095447670452245, -0.2887878538088948, 0.4746938851849194, 0.26423218009021454, -0.08316050282518717, 0.18151724721489515, 0.400213131759525, 0.14826980552397728, -0.4484182951348821, 0.12568734236262458, 0.4865840148088658, 0.33147630175334797, -0.021009841695313725, -0.020113967437424662, 0.06447247771077258, -0.08805243674673235, -0.3129390950249693, 0.12239531945394688, -0.1890155741254489, -0.25, -0.5, -0.25], "readout_randomization_q2": [-0.25, 0.0, -0.25], "current_seeds_q5": [9312591013124, 0], "unitaries_q5": [-0.3319088786549962, 0.36306701332482305, -0.29085071664499296, -0.13952487632665367, 0.35148149681080554, 0.057626007300324744, 0.20788732949937128, -0.07874238083052987, 0.23151096046864694, 0.44346653122211066, 0.1360182062364892, 0.2380340409652426, -0.10288930032783838, 0.3580204827871398, -0.3404604798712434, 0.15289293302358686, 0.37510373420446186, 0.1506412529301997, -0.13751949964263233, 0.008306765686334927, 0.008483669473928757, -0.19366711301472606, 0.3064881637397292, -0.17038852402531646, -0.08098004605518128, 0.19399838117309542, 0.46421182113421366, 0.0025530062334233605, 0.3195963535447355, 0.15802194225340926, 0.07742971955186206, 0.2866464046533963, -0.4519319428775823, 0.37205766264134255, -0.028811953574859217, -0.44868171025627746, -0.3434915792021904, -0.33096669240207177, 0.09463038726272543, -0.18783632090951485, 0.13905289215915317, -0.15978147959978628, -0.05617742517105029, -0.06458650101018293, 0.28983445160504573, 0.19045121571251045, -0.4245386550744783, -0.46306895003329274, -0.48442160523621425, -0.13476795769143735, 0.4436889471407035, 0.3715304328143034, -0.19139346063203533, 0.4794655985094849, 0.3608606100066396, 0.3499140847639808, -0.26350517884386804, -0.1472656749712904, 0.23230153972988887, -0.10812050711245647, 0.29619104176566324, 0.18340129072693045, -0.3039638195146246, 0.46737966354565685, -0.17676888165335924, 0.44602483355212996, 0.3078347140316957, 0.06713160476753188, 0.27818622794244163, 0.45050461907741024, 0.21852285157608975, 0.4283825898106137, 0.3379126563785775, 0.3156707770678331, 0.09723298192721685, -0.4089499305662727, 0.04559884867776631, 0.12868402921577982, 0.25, 0.25, 0.0], "current_seeds_q2": [29835970403568, 3], "unitaries_q1": [0.48411904010183093, -0.1942237015504702, -0.08314917988841941, 0.31428850254358665, -0.2877962331373993, 0.339972912082672, 0.3520932401429775, -0.06995349644153848, -0.41228591038566975, -0.34981970641761606, -0.1274395008022431, 0.00728211962388059, 0.4925164648993672, -0.22100626514078314, 0.4663373044190351, 0.2652796701499689, -0.1940641530915279, -0.004259973013947871, 0.4206515507387678, 0.2999632650176842, -0.027557340987776513, -0.4796988074039099, -0.2711085794287058, -0.1427614521973979, 0.2606958900527516, 0.06832291882974673, 0.06752295976617262, -0.49374088600902866, 0.011725823508509592, -0.1904833928861862, -0.38152574068700673, 0.2762103529668707, 0.35954051017160893, 0.17773461296227566, -0.28766952015633507, -0.18236373147040297, 0.3830795306205417, -0.356367840362811, -0.44639406555807426, -0.2705349101205172, -0.2164034875761871, -0.4047643307788249, 0.22063635836623874, 0.24874871752243877, 0.031028229061952572, 0.1617411090224934, 0.28028169533084935, 0.4398136018251897, -0.4031368826142234, -0.06717542216274452, -0.35829684548359, 0.004340707104834252, 0.11441606546784655, 0.11945848943226167, 0.3706034854176288, -0.4643162198608053, -0.047720446486142265, -0.10900193868114982, -0.03522460819027984, -0.2781207104770047, 0.49150594401294256, 0.4814965178886297, 0.4468761306925302, -0.4177095451891617, 0.3382932840446351, 0.14285195841982912, 0.08841780823371082, 0.3781041938415939, -0.44607081183047725, 0.41132629098234474, -0.37178913337915986, 0.44493207735456863, 0.4413383368652397, 0.16574731062717163, -0.2636358117380446, 0.15396173955647896, 0.19511749309766913, -0.0854317187436564, 0.0, 0.25, 0.25], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration14].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration14].json index 7eeb4f548..2c3c0da16 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration14].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration14].json @@ -1 +1 @@ -{"current_seeds_q0": [11567936422990, 0], "current_seeds_q1": [34869513621375, 0], "readout_randomization_q0": [-0.5, 0.25, -0.25], "unitaries_q2": [-0.0859309855169279, 0.35029365642154886, -0.21420182853494651, -0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.331149994774826, 0.42061281807632867, 0.10882401546969689, -0.20691047149288266, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028, 0.28977728519420864, -0.4127736568831999, 0.2284462147227977, 0.3062633617185391, 0.11338753441490113, 0.2184874815159965, 0.3822599408908971, 0.07358068439263832, -0.14088216697814104, 0.4980383678436553, -0.0769597740948278, -0.34622494807280546, -0.1375695796222196, -0.3886559574053656, -0.4641161820327113, -0.2877355696129733, 0.4151805693951154, -0.2457015010787451, -0.29923453998630123, -0.45957636539721136, -0.38195891683453453, 0.03859037256674469, -0.08978167650477431, -0.07808595139374575, 0.04165792706529814, 0.37243126123017944, -0.06256391649851878, 0.31177994003055787, -0.44384141722735393, 0.22776589100726952, -0.1144049988797704, -0.02604531885600636, -0.3880041097036475, -0.38290552515987386, 0.41894082221451256, 0.4452687082975473, 0.2319884785423838, -0.06429797336391019, -0.09823984663831453, -0.02791825279908622, 0.3647157726393928, -0.3337281049196612, -0.46163591823072636, 0.1337047764333228, -0.32533129436627917, 0.1765877048535387, -0.0638019217320398, 0.4878383579652166, -0.23889962098470718, 0.26096195281205326, -0.32494991468407974, -0.44882528698095925, 0.21751509762007615, 0.3802680530959428, 0.2730510105090431, 0.1723272746916713, -0.13920345844470106], "current_seeds_q5": [32963532974897, 2], "readout_source_unitaries_q0": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "pauli_seed_q5": [-133041699791850, 131854131899589], "twirled_unitaries_q5": [-0.3319088786549962, 0.36306701332482305, -0.29085071664499296, 0.36047512367334633, 0.35148149681080554, 0.057626007300324744, -0.2921126705006287, -0.42125761916947013, -0.23151096046864694, -0.44346653122211066, 0.3639817937635108, -0.2619659590347574, 0.3971106996721616, 0.14197951721286017, 0.3404604798712434, 0.34710706697641314, 0.12489626579553814, -0.3493587470698003, -0.13751949964263233, 0.008306765686334927, 0.008483669473928757, 0.30633288698527394, 0.3064881637397292, 0.32961147597468354, 0.4190199539448187, 0.19399838117309542, 0.46421182113421366, -0.49744699376657664, 0.18040364645526452, 0.34197805774659074, -0.07742971955186206, 0.2866464046533963, 0.4519319428775823, 0.12794233735865745, -0.028811953574859217, -0.051318289743722545, -0.15650842079780958, -0.33096669240207177, 0.40536961273727457, 0.18783632090951485, 0.13905289215915317, 0.15978147959978628, -0.4438225748289497, -0.43541349898981707, -0.21016554839495427, -0.30954878428748955, -0.0754613449255217, -0.03693104996670726, 0.48442160523621425, -0.13476795769143735, -0.4436889471407035, 0.12846956718569658, -0.19139346063203533, -0.4794655985094849, 0.1391393899933604, 0.15008591523601922, -0.26350517884386804, -0.1472656749712904, 0.2676984602701111, -0.39187949288754353, 0.20380895823433676, 0.31659870927306955, -0.3039638195146246, 0.46737966354565685, -0.17676888165335924, -0.05397516644787004, 0.3078347140316957, 0.4328683952324681, 0.22181377205755837, -0.45050461907741024, 0.28147714842391025, -0.07161741018938628, -0.16208734362142252, 0.18432922293216691, -0.09723298192721685, 0.4089499305662727, 0.4544011513222337, 0.12868402921577982, 0.0, 0.25, 0.25], "readout_source_unitaries_q5": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "modulo_counter": [49], "break": [1], "readout_randomization_q2": [0.0, -0.5, -0.5], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "pauli_seed_q2": [-133056412874444, 54594642012057], "rc_base_cycle_loop_index": [11], "readout_randomization_q3": [0.0, 0.0, -0.5], "readout_seed_q0": [75062137625173], "readout_randomization_q4": [-0.25, 0.0, -0.25], "pauli_seed_q3": [59797934191791, 124623277556914], "readout_source_unitaries_q3": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "readout_seed_q2": [-16410226418592], "readout_source_unitaries_q2": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "unitary_angle_offset": [78], "current_seeds_q2": [13648660503014, 2], "unitaries_q1": [0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353], "twirled_unitaries_q0": [-0.15784346339633615, 0.26111010223272757, 0.2985251306765164, 0.4731909991248422, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, 0.29579165949983377, -0.18029413960657692, 0.2520273229900738, -0.18624585452333164, 0.49105233325456865, 0.08201948178145457, -0.2163845393922088, -0.18180393326804634, 0.05523301804827341, -0.2926416855894409, -0.24329964768393708, -0.03291592648032449, 0.1566001925728422, 0.03297551316599012, -0.012842477370785588, -0.32926391538136457, -0.44990811567888755, 0.15970901771559554, -0.10658408246160533, 0.2551812027350344, 0.2828877981082272, 0.3225331758216612, 0.1072273616724928, -0.44759812516522146, -0.09988083390955893, -0.21533379611071268, 0.192623419867207, 0.0048050564673012275, -0.00910933552858495, 0.4655014605768244, -0.3279888356070302, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.16019031714084164, 0.3303966837243273, 0.3385085508172061, -0.11825097296870268, -0.3610912954963368, -0.24209820089131995, -0.49320924723211945, -0.04304425197575412, -0.17261399654285725, 0.24772931986974456, 0.30339346036759807, -0.114802418824965, -0.327295566650033, 0.1306577643126623, -0.05031939073900915, -0.07361918673830203, -0.26228990149481035, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, 0.026563378638172708, -0.3427234359697735, 0.27092919654169023, 0.2597276322282447, -0.3177048344177287, -0.439668073429921, 0.052779087819804005, 0.1170996965485891, 0.10514996532437237, -0.3814168811142018, 0.0, 0.25, 0.25], "unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924], "readout_source_unitaries_q4": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "unitaries_q3": [0.05584616229532102, -0.23214969542699038, -0.29959971333545354, 0.2797248113332209, -0.28722577580825615, -0.051803177141760415, -0.31241562029034853, 0.025135451800657904, -0.08074149417010545, -0.4186349836360712, -0.054728813629211004, 0.11199236531999546, -0.3310447281338149, 0.1961489222558832, -0.24364278945751394, -0.41373787501252934, -0.49075580494069726, -0.49500617846724637, 0.04517698380747248, 0.3736056255881408, -0.23042832066938956, 0.48660858755684444, 0.4355398681503253, -0.13488961790957887, 0.2813933307165257, -0.41366667379787003, -0.3576968962671607, 0.031850165179228895, 0.1215744180596694, -0.09788826968987507, -0.048175590932000745, 0.4487621872882883, 0.48170724460221237, -0.23451311792852536, 0.42923384599364667, -0.10022812594482033, -0.1703562718193048, 0.03370986586156732, -0.4221340290585829, -0.24309403223028525, -0.2626546274601331, -0.19190429382765473, -0.09016921524732169, -0.34710985644882797, 0.17828008632045567, -0.3344122924782482, 0.3960680926516851, -0.23762373139040704, 0.4386795731621973, -0.470821983982578, 0.024064861372878, 0.22827181533629215, 0.39866618977662327, 0.22346762715176283, -0.2957659620141371, 0.19835690373631465, 0.4120386922431365, 0.35908437707395535, 0.008288686447901483, 0.1907282900268754, -0.019769226618983282, 0.0488876292027669, 0.08227861161092775, -0.4019790567990782, -0.2997854884655027, -0.2146600639917331, 0.29287237689083767, -0.1596973714315837, 0.4060575610720214, 0.258661210979799, 0.185835345332638, 0.37074082635203354, -0.1459133170689384, -0.004975097634783765, -0.4839970882809759, -0.4165459335296404, 0.4894086579308805, 0.012196213778462806, 0.22934045114803325, -0.1442416045013175, 0.32767994031297576], "twirled_unitaries_q1": [0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, 0.160027087917328, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, 0.34981970641761606, -0.3725604991977569, -0.4927178803761194, 0.4925164648993672, -0.22100626514078314, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.20003673498231578, -0.027557340987776513, -0.4796988074039099, -0.2711085794287058, -0.1427614521973979, -0.23930410994724838, 0.06832291882974673, -0.4324770402338274, 0.006259113990971343, 0.4882741764914904, -0.3095166071138138, -0.11847425931299327, 0.2237896470331293, -0.14045948982839107, 0.17773461296227566, -0.28766952015633507, 0.31763626852959703, 0.3830795306205417, -0.356367840362811, 0.05360593444192574, 0.22946508987948278, -0.2164034875761871, -0.4047643307788249, 0.22063635836623874, 0.24874871752243877, -0.4689717709380474, 0.1617411090224934, 0.21971830466915065, -0.4398136018251897, 0.4031368826142234, -0.06717542216274452, -0.14170315451641002, 0.49565929289516575, 0.38558393453215345, -0.38054151056773833, 0.3706034854176288, -0.03568378013919471, 0.047720446486142265, 0.10900193868114982, -0.46477539180972016, -0.2781207104770047, 0.49150594401294256, 0.4814965178886297, -0.05312386930746982, 0.0822904548108383, 0.3382932840446351, -0.3571480415801709, 0.08841780823371082, 0.12189580615840612, 0.44607081183047725, -0.41132629098234474, -0.12821086662084014, -0.055067922645431366, -0.05866166313476029, 0.33425268937282837, 0.2636358117380446, 0.34603826044352104, 0.19511749309766913, 0.0854317187436564, -0.25, 0.0, -0.25], "pauli_seed_q4": [-132213089617295, -136889955735746], "unitaries_q4": [0.40234032300345746, 0.32971884186395783, 0.3448177027767301, -0.4584829871144649, 0.08509713625245752, -0.060495617944042124, -0.4439617577671342, -0.21225113115551508, 0.054088724382374664, -0.23892899918584476, -0.125309330460194, 0.060092742372248154, 0.4896137555816509, -0.4003084970981625, 0.40239532697192004, -0.27427209221451676, 0.3886045247436556, 0.4320039786933343, -0.3638867534321797, 0.28223449889285135, 0.12276746487499324, -0.08321214542590027, 0.4506729327841903, -0.49557296959474684, -0.1265520133216782, -0.26256977331275166, 0.03058157694307795, 0.40620047609760235, 0.1973131805413999, -0.11804061453004167, 0.05462618005151043, 0.07135232308423767, -0.2489185291095879, 0.13974379002293702, 0.41662052915091863, 0.06818086771210474, -0.16721244956765702, -0.38720928037740876, -0.1117919539837331, 0.2860409549541778, -0.4285359332075629, -0.1573891629055062, -0.17441844222633307, -0.41876241161401495, -0.20547837357075238, 0.473611069732506, -0.3783608350757284, -0.07842265526315728, 0.3925317756770923, 0.2595075211066167, -0.24233783883737559, 0.1429872906517069, 0.19320114364873575, 0.18916516162934727, -0.13975925770959208, 0.35974087642598107, 0.0910327241743758, -0.17685534791162993, 0.46825986056713376, -0.028095447670452245, 0.21121214619110518, 0.025306114815080605, 0.23576781990978546, 0.08316050282518717, 0.31848275278510485, 0.400213131759525, -0.3517301944760227, -0.05158170486511793, -0.12568734236262458, -0.4865840148088658, 0.33147630175334797, 0.021009841695313725, -0.47988603256257534, 0.06447247771077258, 0.08805243674673235, -0.1870609049750307, 0.3776046805460531, 0.3109844258745511, 0.36390183284432354, 0.4611227243477174, -0.22440520452503776], "readout_source_unitaries_q1": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "twirled_unitaries_q2": [-0.0859309855169279, 0.35029365642154886, -0.21420182853494651, 0.18760028191363887, -0.21514255278739114, 0.44268147867660446, 0.2779890761009902, 0.47367514134620947, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.16885000522517402, -0.42061281807632867, 0.3911759845303031, -0.20691047149288266, -0.17600903158385606, -0.009100451273553745, 0.48333014377647743, -0.36823843839154335, 0.4642748186488568, -0.4296253413034954, -0.3395366446713197, -0.28977728519420864, -0.4127736568831999, -0.2284462147227977, -0.3062633617185391, 0.11338753441490113, 0.2815125184840035, -0.3822599408908971, 0.4264193156073617, 0.35911783302185896, -0.001961632156344706, -0.0769597740948278, 0.15377505192719454, -0.1375695796222196, -0.3886559574053656, 0.03588381796728868, -0.2877355696129733, 0.4151805693951154, -0.2457015010787451, -0.29923453998630123, -0.04042363460278864, -0.11804108316546547, -0.03859037256674469, -0.08978167650477431, -0.42191404860625425, -0.04165792706529814, 0.12756873876982056, 0.4374360835014812, -0.18822005996944213, -0.44384141722735393, -0.2722341089927305, -0.1144049988797704, -0.02604531885600636, 0.11199589029635248, -0.38290552515987386, 0.41894082221451256, -0.05473129170245272, -0.2680115214576162, -0.4357020266360898, -0.40176015336168547, -0.4720817472009138, 0.3647157726393928, -0.1662718950803388, -0.03836408176927364, 0.3662952235666772, 0.17466870563372083, -0.3234122951464613, -0.4361980782679602, 0.012161642034783426, 0.23889962098470718, 0.26096195281205326, -0.17505008531592026, 0.44882528698095925, 0.21751509762007615, -0.3802680530959428, -0.5, 0.0, 0.0], "readout_seed_q5": [-2944130350512], "readout_randomization_q5": [0.0, 0.25, -0.25], "unitaries_q5": [0.1680911213450038, 0.13693298667517695, -0.20914928335500704, 0.13952487632665367, 0.35148149681080554, 0.44237399269967526, -0.20788732949937128, -0.42125761916947013, -0.26848903953135306, 0.44346653122211066, 0.1360182062364892, 0.2380340409652426, 0.3971106996721616, 0.14197951721286017, 0.3404604798712434, -0.15289293302358686, 0.12489626579553814, 0.1506412529301997, -0.13751949964263233, 0.4916932343136651, -0.008483669473928757, 0.19366711301472606, 0.3064881637397292, 0.17038852402531646, 0.08098004605518128, 0.19399838117309542, -0.46421182113421366, 0.49744699376657664, 0.3195963535447355, 0.34197805774659074, 0.42257028044813794, 0.2866464046533963, -0.048068057122417684, 0.12794233735865745, -0.4711880464251408, -0.44868171025627746, -0.3434915792021904, -0.16903330759792823, -0.09463038726272543, -0.31216367909048515, 0.13905289215915317, 0.15978147959978628, 0.05617742517105029, -0.06458650101018293, 0.21016554839495427, 0.30954878428748955, -0.4245386550744783, -0.03693104996670726, -0.015578394763785752, -0.13476795769143735, 0.056311052859296495, -0.3715304328143034, -0.19139346063203533, 0.02053440149051511, -0.3608606100066396, 0.15008591523601922, 0.23649482115613196, 0.3527343250287096, 0.2676984602701111, 0.10812050711245647, 0.20380895823433676, 0.18340129072693045, -0.1960361804853754, -0.46737966354565685, -0.17676888165335924, -0.44602483355212996, -0.3078347140316957, 0.06713160476753188, -0.27818622794244163, 0.04949538092258976, 0.21852285157608975, -0.4283825898106137, 0.16208734362142252, 0.18432922293216691, -0.40276701807278315, -0.4089499305662727, 0.4544011513222337, 0.3713159707842202, 0.21220693776629673, -0.38382575941465547, -0.11316011308353424], "readout_seed_q4": [-1703976699851], "current_seeds_q4": [36146255243727, 2], "readout_seed_q1": [10652871225501], "readout_seed_q3": [-25732983856346], "is_mod_zero": [0], "pauli_seed_q0": [56235133306163, 46271745691961], "rc_seed_index": [2], "current_seeds_q3": [31155819389228, 0], "pauli_seed_q1": [60017443263372, 139478054485503], "readout_randomization_q1": [-0.25, 0.0, -0.25], "twirled_unitaries_q4": [-0.09765967699654254, 0.17028115813604217, -0.3448177027767301, -0.04151701288553511, 0.4149028637475425, 0.4395043820559579, -0.4439617577671342, -0.21225113115551508, -0.44591127561762534, 0.26107100081415524, -0.374690669539806, -0.060092742372248154, -0.4896137555816509, -0.4003084970981625, -0.40239532697192004, 0.27427209221451676, 0.3886045247436556, -0.4320039786933343, 0.3638867534321797, 0.21776550110714865, 0.12276746487499324, -0.08321214542590027, 0.4506729327841903, -0.49557296959474684, 0.3734479866783218, -0.23743022668724834, 0.46941842305692205, -0.40620047609760235, 0.3026868194586001, 0.38195938546995833, 0.05462618005151043, 0.07135232308423767, -0.2489185291095879, 0.13974379002293702, 0.41662052915091863, -0.43181913228789526, 0.332787550432343, -0.11279071962259124, 0.1117919539837331, -0.2860409549541778, -0.07146406679243711, -0.1573891629055062, -0.17441844222633307, -0.41876241161401495, 0.2945216264292476, -0.026388930267494004, -0.12163916492427163, -0.4215773447368427, 0.1074682243229077, 0.24049247889338332, 0.2576621611626244, 0.1429872906517069, 0.19320114364873575, 0.18916516162934727, -0.13975925770959208, 0.35974087642598107, 0.0910327241743758, -0.17685534791162993, 0.46825986056713376, 0.47190455232954776, 0.21121214619110518, 0.025306114815080605, -0.26423218009021454, -0.41683949717481283, 0.18151724721489515, -0.400213131759525, -0.14826980552397728, -0.4484182951348821, 0.3743126576373754, 0.013415985191134183, 0.16852369824665203, 0.4789901583046863, 0.47988603256257534, 0.06447247771077258, -0.08805243674673235, 0.1870609049750307, 0.12239531945394688, 0.3109844258745511, 0.25, 0.0, -0.25], "twirled_unitaries_q3": [0.05584616229532102, -0.23214969542699038, 0.20040028666454646, -0.2202751886667791, -0.28722577580825615, 0.4481968228582396, -0.31241562029034853, 0.4748645481993421, -0.41925850582989455, 0.4186349836360712, -0.054728813629211004, -0.11199236531999546, 0.3310447281338149, 0.3038510777441168, 0.25635721054248606, -0.41373787501252934, -0.00924419505930274, 0.49500617846724637, 0.4548230161925275, 0.1263943744118592, -0.23042832066938956, -0.01339141244315556, 0.4355398681503253, -0.13488961790957887, 0.2813933307165257, -0.41366667379787003, -0.3576968962671607, -0.4681498348207711, 0.1215744180596694, -0.09788826968987507, 0.45182440906799926, 0.05123781271171168, 0.01829275539778763, 0.23451311792852536, 0.42923384599364667, 0.10022812594482033, 0.1703562718193048, 0.03370986586156732, 0.4221340290585829, 0.24309403223028525, -0.2626546274601331, 0.19190429382765473, -0.4098307847526783, -0.15289014355117203, -0.32171991367954433, 0.16558770752175178, 0.3960680926516851, 0.26237626860959296, -0.0613204268378027, -0.02917801601742198, 0.475935138627122, 0.27172818466370785, 0.10133381022337673, -0.2765323728482372, 0.20423403798586293, 0.30164309626368535, 0.0879613077568635, -0.35908437707395535, 0.008288686447901483, 0.3092717099731246, -0.4802307733810167, 0.0488876292027669, -0.08227861161092775, -0.0980209432009218, -0.2997854884655027, -0.2853399360082669, 0.20712762310916233, -0.3403026285684163, 0.4060575610720214, -0.241338789020201, 0.185835345332638, 0.37074082635203354, -0.1459133170689384, -0.49502490236521624, -0.016002911719024127, 0.4165459335296404, 0.010591342069119491, -0.4878037862215372, 0.0, 0.0, -0.5]} \ No newline at end of file +{"readout_seed_q4": [-1703976699851], "unitary_angle_offset": [78], "readout_source_unitaries_q4": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "current_seeds_q0": [11567936422990, 0], "pauli_seed_q4": [-132213089617295, -136889955735746], "unitaries_q4": [0.40234032300345746, 0.32971884186395783, -0.15518229722326993, 0.04151701288553511, 0.4149028637475425, -0.4395043820559579, 0.4439617577671342, -0.2877488688444849, -0.44591127561762534, 0.26107100081415524, -0.374690669539806, -0.060092742372248154, -0.4896137555816509, -0.09969150290183748, -0.09760467302807996, 0.22572790778548324, 0.11139547525634441, 0.06799602130666571, -0.1361132465678203, 0.21776550110714865, -0.37723253512500676, 0.4167878545740997, 0.049327067215809706, -0.004427030405253163, -0.3734479866783218, -0.26256977331275166, -0.03058157694307795, 0.09379952390239765, 0.1973131805413999, -0.38195938546995833, -0.05462618005151043, 0.07135232308423767, -0.2510814708904121, 0.360256209977063, 0.41662052915091863, 0.43181913228789526, 0.16721244956765702, -0.11279071962259124, 0.3882080460162669, -0.2139590450458222, -0.4285359332075629, 0.3426108370944938, 0.32558155777366693, -0.08123758838598505, 0.20547837357075238, 0.026388930267494004, -0.3783608350757284, -0.4215773447368427, 0.1074682243229077, 0.24049247889338332, 0.2576621611626244, 0.1429872906517069, 0.19320114364873575, 0.18916516162934727, 0.3602407422904079, 0.14025912357401893, 0.4089672758256242, 0.17685534791162993, 0.46825986056713376, -0.47190455232954776, -0.21121214619110518, 0.4746938851849194, 0.23576781990978546, -0.41683949717481283, 0.18151724721489515, 0.099786868240475, 0.3517301944760227, -0.4484182951348821, -0.12568734236262458, -0.4865840148088658, 0.16852369824665203, -0.021009841695313725, 0.47988603256257534, 0.4355275222892274, 0.08805243674673235, -0.1870609049750307, 0.3776046805460531, -0.1890155741254489, 0.25, 0.0, -0.25], "readout_source_unitaries_q1": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "readout_source_unitaries_q0": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "unitaries_q3": [-0.444153837704679, -0.2678503045730096, -0.20040028666454646, -0.2797248113332209, -0.28722577580825615, 0.051803177141760415, -0.18758437970965147, 0.025135451800657904, -0.41925850582989455, -0.08136501636392879, -0.445271186370789, 0.11199236531999546, 0.16895527186618509, 0.3038510777441168, -0.25635721054248606, 0.41373787501252934, -0.00924419505930274, -0.49500617846724637, 0.04517698380747248, 0.3736056255881408, -0.23042832066938956, 0.48660858755684444, 0.0644601318496747, -0.3651103820904211, -0.2813933307165257, -0.08633332620212997, -0.3576968962671607, -0.4681498348207711, 0.3784255819403306, -0.4021117303101249, -0.45182440906799926, 0.4487621872882883, 0.01829275539778763, 0.23451311792852536, 0.07076615400635333, -0.10022812594482033, -0.1703562718193048, 0.03370986586156732, -0.4221340290585829, 0.25690596776971475, -0.23734537253986687, 0.19190429382765473, -0.4098307847526783, -0.34710985644882797, -0.17828008632045567, -0.16558770752175178, 0.3960680926516851, -0.26237626860959296, 0.0613204268378027, -0.02917801601742198, 0.024064861372878, 0.22827181533629215, 0.39866618977662327, 0.22346762715176283, 0.20423403798586293, 0.30164309626368535, -0.4120386922431365, 0.14091562292604465, 0.4917113135520985, -0.3092717099731246, 0.4802307733810167, 0.0488876292027669, -0.41772138838907225, 0.0980209432009218, -0.20021451153449732, 0.2146600639917331, 0.20712762310916233, -0.3403026285684163, 0.4060575610720214, 0.258661210979799, 0.185835345332638, -0.12925917364796646, -0.1459133170689384, -0.004975097634783765, 0.016002911719024127, -0.4165459335296404, 0.4894086579308805, 0.012196213778462806, 0.0, 0.0, -0.5], "current_seeds_q1": [34869513621375, 0], "readout_seed_q0": [75062137625173], "break": [1], "readout_source_unitaries_q2": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "pauli_seed_q2": [-133056412874444, 54594642012057], "readout_source_unitaries_q5": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "current_seeds_q2": [13648660503014, 2], "pauli_seed_q1": [60017443263372, 139478054485503], "rc_seed_index": [2], "readout_seed_q1": [10652871225501], "current_seeds_q3": [31155819389228, 0], "readout_randomization_q1": [-0.25, 0.0, -0.25], "readout_randomization_q2": [0.0, -0.5, -0.5], "is_mod_zero": [0], "readout_seed_q5": [-2944130350512], "unitaries_q2": [-0.0859309855169279, 0.35029365642154886, -0.21420182853494651, 0.18760028191363887, -0.28485744721260886, 0.057318521323395544, 0.22201092389900978, 0.47367514134620947, 0.13755156757528653, 0.4512413528363055, -0.47065008790002594, 0.1734552494365822, -0.3177235489138397, -0.16885000522517402, -0.42061281807632867, 0.3911759845303031, -0.29308952850711734, 0.17600903158385606, -0.49089954872644626, 0.48333014377647743, 0.36823843839154335, -0.4642748186488568, -0.4296253413034954, 0.3395366446713197, -0.21022271480579136, -0.08722634311680011, -0.2284462147227977, -0.3062633617185391, 0.3866124655850989, 0.2184874815159965, 0.3822599408908971, 0.07358068439263832, 0.35911783302185896, 0.4980383678436553, -0.0769597740948278, 0.15377505192719454, -0.1375695796222196, -0.3886559574053656, -0.4641161820327113, -0.2877355696129733, 0.4151805693951154, 0.2542984989212549, 0.20076546001369877, -0.04042363460278864, -0.11804108316546547, -0.03859037256674469, -0.4102183234952257, 0.42191404860625425, -0.45834207293470186, 0.12756873876982056, 0.06256391649851878, -0.31177994003055787, -0.05615858277264607, -0.2722341089927305, 0.3855950011202296, -0.47395468114399364, 0.3880041097036475, -0.11709447484012614, 0.08105917778548744, 0.4452687082975473, 0.2319884785423838, -0.4357020266360898, -0.40176015336168547, -0.4720817472009138, 0.1352842273606072, -0.3337281049196612, 0.03836408176927364, 0.3662952235666772, 0.32533129436627917, -0.1765877048535387, -0.4361980782679602, -0.012161642034783426, 0.2611003790152928, 0.23903804718794674, 0.32494991468407974, -0.05117471301904075, 0.21751509762007615, -0.3802680530959428, -0.5, 0.0, 0.0], "pauli_seed_q3": [59797934191791, 124623277556914], "readout_source_unitaries_q3": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "readout_randomization_q3": [0.0, 0.0, -0.5], "pauli_seed_q5": [-133041699791850, 131854131899589], "modulo_counter": [49], "current_seeds_q5": [32963532974897, 2], "pauli_seed_q0": [56235133306163, 46271745691961], "rc_base_cycle_loop_index": [11], "unitaries_q1": [-0.015880959898169067, -0.3057762984495298, -0.4168508201115806, -0.31428850254358665, -0.21220376686260067, -0.160027087917328, 0.3520932401429775, -0.06995349644153848, 0.08771408961433025, -0.34981970641761606, -0.1274395008022431, -0.4927178803761194, 0.4925164648993672, -0.27899373485921686, -0.4663373044190351, 0.2347203298500311, -0.1940641530915279, 0.004259973013947871, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, -0.02030119259609009, -0.2288914205712942, 0.3572385478026021, 0.2606958900527516, 0.06832291882974673, -0.4324770402338274, 0.006259113990971343, 0.011725823508509592, -0.1904833928861862, 0.11847425931299327, 0.2762103529668707, -0.14045948982839107, -0.32226538703772434, -0.28766952015633507, -0.18236373147040297, 0.3830795306205417, -0.143632159637189, -0.05360593444192574, -0.22946508987948278, -0.2835965124238129, 0.0952356692211751, 0.22063635836623874, 0.24874871752243877, -0.4689717709380474, -0.3382588909775066, 0.21971830466915065, -0.4398136018251897, 0.4031368826142234, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, 0.38054151056773833, -0.3706034854176288, -0.03568378013919471, 0.45227955351385773, 0.3909980613188502, -0.46477539180972016, -0.2218792895229953, 0.008494055987057436, 0.4814965178886297, -0.4468761306925302, -0.0822904548108383, 0.1617067159553649, 0.14285195841982912, 0.08841780823371082, 0.3781041938415939, -0.44607081183047725, 0.41132629098234474, -0.37178913337915986, -0.055067922645431366, -0.05866166313476029, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, 0.0854317187436564, -0.25, 0.0, -0.25], "readout_randomization_q4": [-0.25, 0.0, -0.25], "current_seeds_q4": [36146255243727, 2], "readout_seed_q2": [-16410226418592], "readout_randomization_q5": [0.0, 0.25, -0.25], "unitaries_q5": [-0.3319088786549962, 0.36306701332482305, -0.29085071664499296, -0.13952487632665367, 0.35148149681080554, 0.057626007300324744, 0.20788732949937128, -0.07874238083052987, -0.26848903953135306, -0.05653346877788934, 0.1360182062364892, 0.2380340409652426, 0.3971106996721616, 0.14197951721286017, -0.1595395201287566, -0.15289293302358686, 0.37510373420446186, 0.3493587470698003, -0.3624805003573677, 0.008306765686334927, -0.008483669473928757, 0.19366711301472606, 0.1935118362602708, -0.17038852402531646, 0.4190199539448187, 0.19399838117309542, 0.46421182113421366, 0.0025530062334233605, 0.3195963535447355, -0.34197805774659074, 0.07742971955186206, 0.2133535953466037, 0.4519319428775823, 0.12794233735865745, -0.028811953574859217, 0.44868171025627746, -0.15650842079780958, -0.16903330759792823, 0.09463038726272543, -0.18783632090951485, 0.3609471078408468, 0.15978147959978628, -0.4438225748289497, -0.06458650101018293, 0.21016554839495427, -0.19045121571251045, -0.4245386550744783, 0.46306895003329274, 0.48442160523621425, -0.13476795769143735, 0.056311052859296495, -0.3715304328143034, -0.19139346063203533, 0.02053440149051511, -0.3608606100066396, 0.15008591523601922, 0.23649482115613196, -0.1472656749712904, 0.2676984602701111, 0.10812050711245647, -0.29619104176566324, 0.31659870927306955, -0.3039638195146246, 0.46737966354565685, -0.17676888165335924, 0.44602483355212996, -0.1921652859683043, 0.4328683952324681, 0.22181377205755837, -0.45050461907741024, 0.28147714842391025, -0.07161741018938628, -0.16208734362142252, 0.18432922293216691, 0.40276701807278315, -0.09105006943372729, 0.04559884867776631, 0.3713159707842202, 0.0, 0.25, 0.25], "unitaries_q0": [0.34215653660366385, 0.23888989776727243, 0.20147486932348357, 0.026809000875157807, -0.34828986034517584, -0.039234916317450796, -0.12315582717864615, 0.47110093793493135, 0.20420834050016623, -0.3197058603934231, 0.2479726770099262, 0.31375414547666836, 0.49105233325456865, 0.08201948178145457, -0.2163845393922088, -0.18180393326804634, 0.4447669819517266, 0.2926416855894409, -0.2567003523160629, -0.03291592648032449, -0.1566001925728422, -0.03297551316599012, -0.4871575226292144, -0.32926391538136457, -0.44990811567888755, 0.34029098228440446, -0.39341591753839467, -0.2551812027350344, 0.2828877981082272, -0.3225331758216612, 0.3927726383275072, -0.05240187483477854, 0.40011916609044107, -0.21533379611071268, 0.192623419867207, -0.4951949435326988, 0.49089066447141505, 0.4655014605768244, 0.17201116439296982, 0.18967701752599453, 0.07448506389936327, 0.29334057774597255, 0.41127481942283595, 0.42201221928209165, -0.03047247914082618, 0.1293619641527073, -0.33980968285915836, 0.3303966837243273, 0.3385085508172061, -0.3817490270312973, 0.3610912954963368, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, 0.17261399654285725, 0.25227068013025544, -0.19660653963240193, -0.114802418824965, -0.172704433349967, 0.3693422356873377, -0.44968060926099085, -0.42638081326169797, -0.26228990149481035, 0.1496960222960304, -0.21221815451668746, 0.43123595744645016, 0.23108886334528123, -0.4803542081018186, 0.026563378638172708, -0.3427234359697735, 0.27092919654169023, -0.2402723677717553, -0.3177048344177287, -0.06033192657007902, 0.447220912180196, 0.3829003034514109, 0.3948500346756276, 0.1185831188857982, 0.0, 0.25, 0.25], "readout_randomization_q0": [-0.5, 0.25, -0.25], "readout_seed_q3": [-25732983856346], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration15].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration15].json new file mode 100644 index 000000000..1bae5444c --- /dev/null +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration15].json @@ -0,0 +1 @@ +{"pauli_seed_q2": [-50982158722643, 119343881614275], "unitaries_q2": [0.03836408176927364, 0.3662952235666772, -0.17466870563372083, 0.3234122951464613, -0.4361980782679602, -0.012161642034783426, 0.2611003790152928, 0.26096195281205326, 0.17505008531592026, 0.05117471301904075, 0.21751509762007615, 0.3802680530959428, -0.22694898949095688, 0.3276727253083287, 0.13920345844470106, -0.05584616229532102, -0.2678503045730096, -0.29959971333545354, -0.2202751886667791, -0.28722577580825615, -0.051803177141760415, -0.31241562029034853, 0.025135451800657904, 0.41925850582989455, -0.4186349836360712, -0.445271186370789, -0.11199236531999546, -0.16895527186618509, 0.1961489222558832, -0.25635721054248606, 0.41373787501252934, -0.00924419505930274, -0.49500617846724637, -0.4548230161925275, 0.1263943744118592, 0.23042832066938956, 0.01339141244315556, 0.4355398681503253, -0.3651103820904211, -0.2813933307165257, -0.08633332620212997, -0.3576968962671607, -0.4681498348207711, 0.3784255819403306, 0.09788826968987507, 0.048175590932000745, 0.05123781271171168, -0.01829275539778763, -0.23451311792852536, 0.42923384599364667, -0.10022812594482033, 0.3296437281806952, 0.4662901341384327, -0.07786597094141712, -0.25690596776971475, -0.23734537253986687, -0.19190429382765473, -0.09016921524732169, -0.15289014355117203, 0.32171991367954433, 0.3344122924782482, 0.10393190734831492, 0.26237626860959296, -0.0613204268378027, -0.02917801601742198, -0.024064861372878, -0.22827181533629215, 0.10133381022337673, -0.2765323728482372, -0.2957659620141371, 0.30164309626368535, 0.0879613077568635, -0.35908437707395535, 0.008288686447901483, -0.1907282900268754, 0.019769226618983282, 0.0488876292027669, -0.08227861161092775, -0.0980209432009218, -0.2997854884655027, 0.2146600639917331, 0.20712762310916233, -0.3403026285684163, -0.0939424389279786, -0.241338789020201, 0.314164654667362, -0.37074082635203354, -0.3540866829310616, -0.004975097634783765, -0.016002911719024127, -0.08345406647035958, 0.4894086579308805, 0.4878037862215372, 0.27065954885196675, -0.1442416045013175, 0.17232005968702424, -0.40234032300345746, 0.17028115813604217, 0.3448177027767301, 0.04151701288553511, 0.08509713625245752, 0.4395043820559579, -0.4439617577671342, -0.2877488688444849, 0.44591127561762534, -0.26107100081415524, -0.374690669539806, 0.060092742372248154, 0.4896137555816509, -0.09969150290183748, 0.09760467302807996, 0.27427209221451676, 0.3886045247436556, -0.4320039786933343, 0.3638867534321797, 0.21776550110714865, -0.37723253512500676, -0.08321214542590027, 0.4506729327841903, -0.49557296959474684], "rc_seed_index": [2], "pauli_seed_q1": [34470019755655, 27946020799016], "current_seeds_q2": [444590, 3], "unitaries_q1": [-0.006259113990971343, 0.011725823508509592, -0.3095166071138138, -0.11847425931299327, 0.2237896470331293, 0.35954051017160893, -0.32226538703772434, -0.21233047984366493, -0.31763626852959703, -0.3830795306205417, -0.143632159637189, -0.44639406555807426, -0.2705349101205172, -0.2835965124238129, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, -0.1617411090224934, 0.21971830466915065, -0.06018639817481031, 0.09686311738577658, -0.06717542216274452, 0.14170315451641002, 0.004340707104834252, 0.38558393453215345, -0.11945848943226167, -0.3706034854176288, -0.4643162198608053, 0.047720446486142265, -0.3909980613188502, -0.46477539180972016, -0.2781207104770047, -0.008494055987057436, 0.018503482111370317, -0.4468761306925302, 0.4177095451891617, 0.1617067159553649, 0.14285195841982912, 0.08841780823371082, 0.3781041938415939, 0.053929188169522746, -0.08867370901765526, -0.37178913337915986, 0.44493207735456863, -0.05866166313476029, 0.16574731062717163, -0.2636358117380446, -0.34603826044352104, 0.3048825069023309, 0.0854317187436564, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353, -0.0859309855169279, 0.35029365642154886, -0.21420182853494651, -0.31239971808636113, -0.21514255278739114, 0.44268147867660446, -0.22201092389900978, 0.47367514134620947, 0.3624484324247135, -0.4512413528363055, -0.47065008790002594, 0.3265447505634178, 0.3177235489138397, -0.331149994774826, -0.42061281807632867, 0.3911759845303031, -0.29308952850711734, -0.32399096841614394, 0.009100451273553745, 0.48333014377647743, 0.36823843839154335, -0.4642748186488568, -0.07037465869650461, -0.3395366446713197, 0.21022271480579136, -0.08722634311680011, -0.2715537852772023, 0.3062633617185391, 0.11338753441490113, -0.2815125184840035, 0.3822599408908971, 0.07358068439263832, -0.14088216697814104, -0.001961632156344706, -0.0769597740948278, -0.34622494807280546, 0.3624304203777804, -0.11134404259463437, -0.03588381796728868, 0.2877355696129733, 0.08481943060488462, -0.2457015010787451, -0.29923453998630123, -0.45957636539721136, -0.38195891683453453, -0.4614096274332553, -0.4102183234952257, -0.42191404860625425, 0.45834207293470186, 0.12756873876982056, 0.4374360835014812, -0.18822005996944213, -0.44384141722735393, 0.22776589100726952, -0.1144049988797704, -0.02604531885600636, -0.3880041097036475, 0.11709447484012614, 0.08105917778548744, -0.4452687082975473, 0.2680115214576162, -0.4357020266360898, 0.40176015336168547, -0.02791825279908622, 0.3647157726393928, -0.3337281049196612], "unitaries_q0": [0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, -0.12425959266423448, 0.34215653660366385, 0.23888989776727243, 0.20147486932348357, 0.026809000875157807, -0.15171013965482416, -0.4607650836825492, -0.37684417282135385, 0.028899062065068648, -0.29579165949983377, 0.18029413960657692, 0.2520273229900738, -0.31375414547666836, 0.008947666745431349, 0.08201948178145457, 0.2163845393922088, -0.31819606673195366, 0.4447669819517266, -0.2926416855894409, 0.2567003523160629, -0.4670840735196755, 0.3433998074271578, -0.03297551316599012, -0.4871575226292144, 0.17073608461863543, 0.050091884321112445, 0.34029098228440446, -0.39341591753839467, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, -0.2846662038892873, 0.192623419867207, -0.0048050564673012275, 0.00910933552858495, 0.0344985394231756, 0.17201116439296982, -0.31032298247400547, 0.07448506389936327, -0.20665942225402745, -0.08872518057716405, 0.42201221928209165, 0.4695275208591738, -0.3706380358472927, -0.16019031714084164, -0.3303966837243273, -0.3385085508172061, -0.11825097296870268, -0.13890870450366322, -0.25790179910868005, -0.006790752767880548, -0.04304425197575412, 0.32738600345714275, 0.25227068013025544, 0.19660653963240193, -0.385197581175035, -0.327295566650033, 0.3693422356873377, -0.44968060926099085, -0.07361918673830203, 0.26228990149481035, 0.3503039777039696, -0.28778184548331254, 0.43123595744645016, -0.2689111366547188, -0.4803542081018186, 0.026563378638172708, -0.3427234359697735, 0.22907080345830977, -0.2597276322282447, 0.3177048344177287, -0.06033192657007902, -0.447220912180196, 0.1170996965485891, 0.10514996532437237, 0.1185831188857982, -0.23219873717626527, 0.2943348490020554, -0.30565501841008924, -0.48411904010183093, -0.3057762984495298, 0.4168508201115806, -0.18571149745641335, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.3725604991977569, -0.4927178803761194, -0.007483535100632821, -0.27899373485921686, -0.4663373044190351, -0.2652796701499689, -0.1940641530915279, 0.004259973013947871, 0.07934844926123219, 0.20003673498231578, 0.4724426590122235, 0.02030119259609009, -0.2711085794287058, 0.3572385478026021, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262], "break": [1], "current_seeds_q1": [104107, 0], "rc_base_cycle_loop_index": [4], "pauli_seed_q0": [-13838434709596, 60576142310008], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "unitary_angle_offset": [117], "current_seeds_q0": [225663, 3]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration16].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration16].json new file mode 100644 index 000000000..f9d619b05 --- /dev/null +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration16].json @@ -0,0 +1 @@ +{"rc_base_cycle_loop_index": [4], "pauli_seed_q2": [34470019755655], "unitaries_q3": [0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574], "current_seeds_q3": [106605609], "unitaries_q1": [-0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459], "break": [1], "current_seeds_q1": [231079644], "unitary_angle_offset": [30], "twirled_unitaries_q1": [-0.4670244868340099, -0.012842477370785588, -0.32926391538136457, -0.44990811567888755, 0.15970901771559554, 0.39341591753839467, 0.2551812027350344, 0.21711220189177283, 0.1774668241783388, -0.1072273616724928, -0.05240187483477854, -0.09988083390955893, -0.21533379611071268, 0.307376580132793, 0.4951949435326988, 0.00910933552858495, 0.4655014605768244, -0.17201116439296982, -0.18967701752599453, 0.07448506389936327, 0.20665942225402745, -0.41127481942283595, 0.07798778071790835, 0.4695275208591738, 0.1293619641527073, -0.33980968285915836, -0.1696033162756727, -0.1614914491827939, -0.3817490270312973, 0.3610912954963368, -0.25790179910868005, -0.49320924723211945, -0.4569557480242459], "current_seeds_q4": [879260322], "pauli_seed_q5": [119343881614275], "current_seeds_q5": [455260778], "unitaries_q0": [0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578], "twirled_unitaries_q4": [0.2705349101205172, -0.2835965124238129, 0.0952356692211751, -0.27936364163376126, 0.25125128247756123, 0.4689717709380474, -0.1617411090224934, 0.21971830466915065, -0.06018639817481031, 0.09686311738577658, -0.4328245778372555, -0.14170315451641002, 0.49565929289516575, 0.38558393453215345, -0.38054151056773833, 0.3706034854176288, -0.03568378013919471, -0.45227955351385773, 0.10900193868114982, -0.46477539180972016, 0.2218792895229953, 0.49150594401294256, 0.018503482111370317, -0.4468761306925302, -0.0822904548108383, 0.1617067159553649, -0.3571480415801709, -0.4115821917662892, 0.3781041938415939, -0.44607081183047725, -0.08867370901765526, -0.37178913337915986, 0.44493207735456863], "twirled_unitaries_q0": [0.23034835385360353, 0.010108661519272033, 0.2541627734809673, 0.43317668647636864, 0.21094549794112893, 0.33704238573828604, 0.028784568617961526, -0.42572259206511376, -0.07888407435634903, -0.2331221445808893, 0.13331130172538863, -0.3757404073357655, -0.34215653660366385, 0.23888989776727243, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, 0.039234916317450796, 0.12315582717864615, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, 0.31375414547666836, 0.49105233325456865, 0.4179805182185454, -0.2836154606077912, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578], "twirled_unitaries_q2": [-0.32738600345714275, 0.24772931986974456, 0.19660653963240193, 0.114802418824965, -0.327295566650033, 0.3693422356873377, -0.44968060926099085, -0.42638081326169797, -0.26228990149481035, -0.3503039777039696, -0.21221815451668746, 0.43123595744645016, 0.23108886334528123, -0.019645791898181386, 0.4734366213618273, -0.1572765640302265, 0.22907080345830977, 0.2597276322282447, -0.3177048344177287, -0.439668073429921, -0.447220912180196, -0.3829003034514109, 0.10514996532437237, 0.1185831188857982, -0.23219873717626527, 0.20566515099794458, -0.19434498158991076, -0.015880959898169067, -0.3057762984495298, 0.08314917988841941, 0.18571149745641335, -0.2877962331373993, 0.160027087917328], "pauli_seed_q3": [27946020799016], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "pauli_seed_q1": [60576142310008], "current_seeds_q2": [131492690], "unitaries_q5": [0.4413383368652397, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353, -0.0859309855169279, 0.35029365642154886, -0.21420182853494651, -0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.331149994774826, 0.42061281807632867, 0.10882401546969689, -0.20691047149288266, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028], "twirled_unitaries_q5": [0.4413383368652397, 0.33425268937282837, 0.2636358117380446, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353, 0.4140690144830721, 0.35029365642154886, 0.2857981714650535, 0.18760028191363887, -0.28485744721260886, 0.057318521323395544, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, -0.3265447505634178, -0.3177235489138397, -0.16885000522517402, -0.42061281807632867, -0.10882401546969689, -0.29308952850711734, 0.17600903158385606, 0.009100451273553745, 0.48333014377647743, 0.36823843839154335, -0.4642748186488568, -0.4296253413034954, 0.3395366446713197], "pauli_seed_q0": [-13838434709596], "twirled_unitaries_q3": [0.1479067598570225, -0.06995349644153848, -0.08771408961433025, 0.34981970641761606, -0.3725604991977569, -0.4927178803761194, -0.007483535100632821, -0.27899373485921686, -0.4663373044190351, -0.2652796701499689, -0.1940641530915279, 0.004259973013947871, -0.4206515507387678, 0.20003673498231578, 0.4724426590122235, -0.4796988074039099, -0.2711085794287058, 0.3572385478026021, -0.23930410994724838, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.4882741764914904, 0.3095166071138138, -0.38152574068700673, 0.2237896470331293, 0.14045948982839107, -0.17773461296227566, -0.21233047984366493, -0.18236373147040297, 0.3830795306205417, -0.143632159637189, 0.44639406555807426], "current_seeds_q0": [1020952384], "unitaries_q2": [-0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672], "unitaries_q4": [-0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366], "pauli_seed_q4": [-50982158722643]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration1].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration1].json index 8cc9c1f0d..bc516bce1 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration1].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration1].json @@ -1 +1 @@ -{"unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107], "twirled_unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, -0.07881890527233892, 0.2696516461463965, -0.010108661519272033, 0.24583722651903273, -0.43317668647636864, -0.21094549794112893], "twirled_unitaries_q1": [-0.33704238573828604, 0.4712154313820385, -0.42572259206511376, -0.42111592564365097, 0.2668778554191107, 0.36668869827461137, -0.3757404073357655, -0.34215653660366385, -0.23888989776727243], "unitary_angle_offset": [6], "pauli_seed_q1": [60576142310008], "pauli_seed_q0": [-13838434709596], "rc_base_cycle_loop_index": [1], "current_seeds_q1": [15144035577502], "current_seeds_q0": [66909135500265], "break": [1], "unitaries_q1": [-0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15]} \ No newline at end of file +{"rc_base_cycle_loop_index": [1], "break": [1], "current_seeds_q0": [66909135500265], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, -0.07881890527233892, 0.23034835385360353, 0.010108661519272033, -0.24583722651903273, -0.06682331352363136, 0.28905450205887107], "pauli_seed_q1": [60576142310008], "current_seeds_q1": [15144035577502], "pauli_seed_q0": [-13838434709596], "unitaries_q1": [0.16295761426171396, 0.028784568617961526, 0.42572259206511376, 0.42111592564365097, 0.2331221445808893, 0.36668869827461137, -0.3757404073357655, -0.34215653660366385, -0.23888989776727243], "unitary_angle_offset": [6]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration2].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration2].json index 8e6bb1b45..abdfbbfc8 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration2].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration2].json @@ -1 +1 @@ -{"unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967], "unitary_angle_offset": [72], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "rc_base_cycle_loop_index": [23], "current_seeds_q0": [3], "pauli_seed_q0": [-13838434709596], "pauli_seed_q1": [60576142310008], "break": [1], "current_seeds_q1": [0], "unitaries_q1": [-0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345], "twirled_unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, -0.07881890527233892, 0.2696516461463965, -0.010108661519272033, -0.2541627734809673, -0.06682331352363136, -0.28905450205887107, 0.33704238573828604, 0.4712154313820385, 0.42572259206511376, -0.07888407435634903, 0.2668778554191107, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, -0.23888989776727243, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, -0.028899062065068648, -0.20420834050016623, 0.3197058603934231, -0.2479726770099262, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.03297551316599012, 0.012842477370785588, 0.32926391538136457, 0.44990811567888755, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, -0.21711220189177283, -0.3225331758216612, 0.3927726383275072, 0.05240187483477854, 0.09988083390955893, 0.2846662038892873, -0.307376580132793, -0.0048050564673012275, -0.00910933552858495, -0.4655014605768244, 0.3279888356070302, -0.31032298247400547, -0.42551493610063673, 0.29334057774597255, -0.41127481942283595, 0.07798778071790835, -0.03047247914082618, 0.1293619641527073, -0.33980968285915836, 0.1696033162756727, 0.1614914491827939, -0.11825097296870268, 0.3610912954963368, 0.24209820089131995, 0.006790752767880548, 0.04304425197575412, -0.32738600345714275, -0.25227068013025544, 0.19660653963240193, 0.114802418824965, -0.172704433349967], "twirled_unitaries_q1": [-0.3693422356873377, -0.05031939073900915, -0.07361918673830203, -0.26228990149481035, -0.1496960222960304, -0.21221815451668746, -0.06876404255354984, 0.23108886334528123, -0.019645791898181386, 0.026563378638172708, 0.3427234359697735, -0.27092919654169023, -0.2597276322282447, 0.18229516558227132, 0.06033192657007902, 0.052779087819804005, 0.3829003034514109, -0.10514996532437237, 0.1185831188857982, -0.23219873717626527, 0.2943348490020554, 0.30565501841008924, 0.015880959898169067, -0.3057762984495298, -0.4168508201115806, 0.31428850254358665, -0.2877962331373993, 0.339972912082672, 0.3520932401429775, 0.4300465035584615, -0.08771408961433025, -0.15018029358238394, 0.3725604991977569, -0.00728211962388059, 0.4925164648993672, 0.27899373485921686, -0.4663373044190351, -0.2652796701499689, -0.3059358469084721, 0.004259973013947871, -0.07934844926123219, 0.20003673498231578, 0.4724426590122235, 0.02030119259609009, -0.2288914205712942, 0.3572385478026021, 0.2606958900527516, -0.06832291882974673, 0.4324770402338274, -0.006259113990971343, -0.4882741764914904, -0.3095166071138138, -0.38152574068700673, -0.2762103529668707, 0.35954051017160893, 0.32226538703772434, -0.21233047984366493, 0.31763626852959703, 0.3830795306205417, 0.143632159637189, 0.44639406555807426, -0.22946508987948278, 0.2835965124238129, -0.0952356692211751, 0.22063635836623874, -0.24874871752243877, -0.4689717709380474, 0.1617411090224934, 0.28028169533084935, 0.06018639817481031, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345]} \ No newline at end of file +{"unitary_angle_offset": [72], "pauli_seed_q1": [60576142310008], "pauli_seed_q0": [-13838434709596], "unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, -0.07881890527233892, 0.23034835385360353, 0.010108661519272033, -0.24583722651903273, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, 0.07427740793488624, -0.42111592564365097, 0.2668778554191107, -0.13331130172538863, 0.12425959266423448, -0.34215653660366385, 0.26111010223272757, 0.2985251306765164, -0.4731909991248422, -0.15171013965482416, -0.039234916317450796, -0.37684417282135385, 0.028899062065068648, 0.20420834050016623, 0.18029413960657692, 0.2520273229900738, -0.18624585452333164, -0.49105233325456865, 0.08201948178145457, -0.2163845393922088, -0.31819606673195366, -0.05523301804827341, 0.20735831441055907, 0.2567003523160629, 0.03291592648032449, 0.1566001925728422, -0.4670244868340099, 0.4871575226292144, 0.17073608461863543, 0.050091884321112445, 0.34029098228440446, -0.39341591753839467, -0.2551812027350344, 0.2828877981082272, -0.3225331758216612, 0.1072273616724928, -0.05240187483477854, -0.09988083390955893, 0.2846662038892873, 0.307376580132793, 0.0048050564673012275, -0.49089066447141505, -0.4655014605768244, -0.17201116439296982, -0.31032298247400547, 0.07448506389936327, 0.29334057774597255, -0.08872518057716405, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.3385085508172061, -0.3817490270312973, 0.13890870450366322, 0.25790179910868005, 0.006790752767880548, 0.04304425197575412, -0.17261399654285725, -0.24772931986974456, -0.19660653963240193, 0.385197581175035, 0.327295566650033], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "unitaries_q1": [0.1306577643126623, -0.44968060926099085, 0.07361918673830203, 0.26228990149481035, -0.3503039777039696, -0.21221815451668746, -0.06876404255354984, 0.23108886334528123, 0.4803542081018186, 0.026563378638172708, 0.3427234359697735, -0.27092919654169023, 0.2402723677717553, 0.18229516558227132, -0.439668073429921, 0.052779087819804005, 0.3829003034514109, 0.3948500346756276, 0.1185831188857982, -0.26780126282373473, -0.2943348490020554, -0.30565501841008924, 0.015880959898169067, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.34981970641761606, -0.3725604991977569, -0.4927178803761194, 0.007483535100632821, 0.27899373485921686, 0.03366269558096491, -0.2652796701499689, 0.1940641530915279, 0.004259973013947871, -0.07934844926123219, 0.20003673498231578, 0.4724426590122235, 0.02030119259609009, 0.2711085794287058, 0.3572385478026021, 0.23930410994724838, -0.4316770811702533, 0.06752295976617262, -0.006259113990971343, -0.011725823508509592, -0.1904833928861862, -0.11847425931299327, 0.2237896470331293, 0.35954051017160893, 0.32226538703772434, -0.21233047984366493, -0.18236373147040297, 0.11692046937945832, -0.143632159637189, -0.44639406555807426, -0.22946508987948278, 0.2164034875761871, 0.0952356692211751, 0.27936364163376126, 0.25125128247756123, 0.031028229061952572, 0.1617411090224934, 0.28028169533084935, -0.4398136018251897, -0.4031368826142234, 0.4328245778372555, 0.35829684548359, -0.004340707104834252, -0.11441606546784655], "rc_base_cycle_loop_index": [23], "current_seeds_q1": [0], "current_seeds_q0": [3], "break": [1]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration3].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration3].json index 5cb4ec5c2..c103961ad 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration3].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration3].json @@ -1 +1 @@ -{"current_seeds_q1": [27946020799016, 0], "break": [1], "current_seeds_q0": [60576142310008, 3], "unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696], "pauli_seed_q0": [-13838434709596, 60576142310008], "rc_base_cycle_loop_index": [23], "pauli_seed_q1": [34470019755655, 27946020799016], "unitaries_q1": [-0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256], "unitary_angle_offset": [75], "twirled_unitaries_q1": [-0.28778184548331254, 0.06876404255354984, -0.23108886334528123, -0.019645791898181386, -0.026563378638172708, -0.1572765640302265, 0.22907080345830977, 0.2402723677717553, -0.3177048344177287, -0.06033192657007902, -0.447220912180196, 0.1170996965485891, 0.3948500346756276, 0.3814168811142018, 0.26780126282373473, 0.20566515099794458, 0.19434498158991076, 0.48411904010183093, -0.1942237015504702, 0.08314917988841941, 0.18571149745641335, 0.21220376686260067, -0.339972912082672, 0.3520932401429775, 0.06995349644153848, -0.41228591038566975, 0.34981970641761606, 0.3725604991977569, -0.4927178803761194, 0.4925164648993672, -0.22100626514078314, 0.03366269558096491, 0.2652796701499689, 0.1940641530915279, -0.004259973013947871, 0.4206515507387678, 0.20003673498231578, 0.027557340987776513, 0.02030119259609009, -0.2711085794287058, -0.3572385478026021, 0.2606958900527516, 0.4316770811702533, -0.4324770402338274, -0.49374088600902866, -0.011725823508509592, 0.1904833928861862, 0.11847425931299327, -0.2762103529668707, -0.35954051017160893, 0.17773461296227566, 0.28766952015633507, 0.18236373147040297, -0.11692046937945832, -0.143632159637189, -0.05360593444192574, -0.2705349101205172, 0.2164034875761871, -0.0952356692211751, 0.22063635836623874, 0.25125128247756123, 0.031028229061952572, 0.3382588909775066, -0.21971830466915065, -0.4398136018251897, 0.4031368826142234, -0.4328245778372555, 0.35829684548359, 0.49565929289516575, -0.38558393453215345, -0.38054151056773833, -0.3706034854176288, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "rc_seed_index": [2], "twirled_unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, -0.48989133848072797, 0.24583722651903273, 0.06682331352363136, -0.28905450205887107, -0.33704238573828604, -0.4712154313820385, 0.42572259206511376, 0.07888407435634903, -0.2331221445808893, -0.13331130172538863, 0.12425959266423448, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, 0.4731909991248422, 0.15171013965482416, -0.4607650836825492, -0.37684417282135385, -0.028899062065068648, -0.20420834050016623, -0.18029413960657692, 0.2520273229900738, -0.18624585452333164, 0.49105233325456865, -0.08201948178145457, 0.2163845393922088, -0.31819606673195366, -0.4447669819517266, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.17073608461863543, -0.050091884321112445, 0.15970901771559554, 0.39341591753839467, -0.2551812027350344, -0.21711220189177283, 0.1774668241783388, -0.1072273616724928, -0.44759812516522146, 0.09988083390955893, -0.2846662038892873, -0.192623419867207, -0.0048050564673012275, 0.00910933552858495, -0.4655014605768244, 0.17201116439296982, 0.31032298247400547, 0.07448506389936327, 0.20665942225402745, 0.41127481942283595, 0.07798778071790835, 0.03047247914082618, 0.1293619641527073, -0.16019031714084164, -0.1696033162756727, 0.1614914491827939, 0.3817490270312973, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, 0.17261399654285725, 0.24772931986974456, -0.30339346036759807, -0.385197581175035, 0.327295566650033, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696]} \ No newline at end of file +{"unitary_angle_offset": [75], "current_seeds_q1": [27946020799016, 0], "unitaries_q1": [-0.28778184548331254, 0.06876404255354984, -0.23108886334528123, -0.019645791898181386, -0.026563378638172708, -0.1572765640302265, 0.22907080345830977, 0.2597276322282447, 0.3177048344177287, -0.439668073429921, -0.052779087819804005, -0.3829003034514109, 0.3948500346756276, 0.1185831188857982, -0.26780126282373473, -0.20566515099794458, 0.19434498158991076, 0.015880959898169067, 0.1942237015504702, 0.4168508201115806, -0.31428850254358665, 0.21220376686260067, -0.160027087917328, 0.1479067598570225, 0.4300465035584615, -0.41228591038566975, 0.15018029358238394, -0.3725604991977569, -0.00728211962388059, -0.007483535100632821, -0.22100626514078314, 0.4663373044190351, 0.2347203298500311, -0.1940641530915279, -0.49574002698605213, 0.4206515507387678, -0.2999632650176842, 0.027557340987776513, 0.02030119259609009, -0.2711085794287058, -0.1427614521973979, 0.23930410994724838, 0.06832291882974673, -0.06752295976617262, -0.49374088600902866, 0.4882741764914904, 0.1904833928861862, 0.11847425931299327, -0.2762103529668707, -0.14045948982839107, -0.17773461296227566, 0.21233047984366493, 0.31763626852959703, -0.11692046937945832, -0.143632159637189, -0.44639406555807426, 0.2705349101205172, -0.2164034875761871, -0.4047643307788249, -0.27936364163376126, 0.25125128247756123, 0.4689717709380474, 0.1617411090224934, 0.21971830466915065, -0.4398136018251897, 0.09686311738577658, -0.06717542216274452, 0.14170315451641002, 0.49565929289516575, 0.11441606546784655, -0.38054151056773833, -0.3706034854176288, -0.03568378013919471, 0.047720446486142265, -0.3909980613188502, 0.46477539180972016, 0.2218792895229953, 0.008494055987057436], "rc_seed_index": [2], "unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, -0.21094549794112893, -0.33704238573828604, 0.4712154313820385, 0.07427740793488624, 0.07888407435634903, -0.2668778554191107, -0.36668869827461137, 0.12425959266423448, 0.15784346339633615, -0.26111010223272757, -0.2985251306765164, -0.026809000875157807, 0.15171013965482416, -0.039234916317450796, -0.12315582717864615, 0.028899062065068648, -0.20420834050016623, 0.18029413960657692, -0.2520273229900738, -0.31375414547666836, -0.008947666745431349, -0.08201948178145457, 0.2836154606077912, -0.18180393326804634, 0.4447669819517266, -0.20735831441055907, -0.24329964768393708, 0.4670840735196755, -0.1566001925728422, 0.03297551316599012, 0.4871575226292144, -0.32926391538136457, -0.44990811567888755, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, -0.21711220189177283, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.40011916609044107, 0.2846662038892873, -0.307376580132793, -0.0048050564673012275, -0.00910933552858495, 0.4655014605768244, 0.3279888356070302, 0.31032298247400547, -0.42551493610063673, 0.20665942225402745, -0.08872518057716405, -0.42201221928209165, 0.4695275208591738, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.3610912954963368, 0.25790179910868005, 0.49320924723211945, -0.04304425197575412, 0.17261399654285725, 0.24772931986974456, -0.19660653963240193, -0.114802418824965, -0.327295566650033, -0.3693422356873377, -0.44968060926099085, -0.42638081326169797, 0.26228990149481035, 0.1496960222960304], "break": [1], "pauli_seed_q0": [-13838434709596, 60576142310008], "pauli_seed_q1": [34470019755655, 27946020799016], "current_seeds_q0": [60576142310008, 3], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "rc_base_cycle_loop_index": [23]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration4].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration4].json index a74063c7b..4a972b567 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration4].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration4].json @@ -1 +1 @@ -{"current_seeds_q1": [0], "pauli_seed_q1": [60576142310008], "unitary_angle_offset": [72], "twirled_unitaries_q1": [-0.3693422356873377, -0.05031939073900915, -0.07361918673830203, -0.26228990149481035, -0.1496960222960304, -0.21221815451668746, -0.06876404255354984, 0.23108886334528123, -0.019645791898181386, 0.026563378638172708, 0.3427234359697735, -0.27092919654169023, -0.2597276322282447, 0.18229516558227132, 0.06033192657007902, 0.052779087819804005, 0.3829003034514109, -0.10514996532437237, 0.1185831188857982, -0.23219873717626527, 0.2943348490020554, 0.30565501841008924, 0.015880959898169067, -0.3057762984495298, -0.4168508201115806, 0.31428850254358665, -0.2877962331373993, 0.339972912082672, 0.3520932401429775, 0.4300465035584615, -0.08771408961433025, -0.15018029358238394, 0.3725604991977569, -0.00728211962388059, 0.4925164648993672, 0.27899373485921686, -0.4663373044190351, -0.2652796701499689, -0.3059358469084721, 0.004259973013947871, -0.07934844926123219, 0.20003673498231578, 0.4724426590122235, 0.02030119259609009, -0.2288914205712942, 0.3572385478026021, 0.2606958900527516, -0.06832291882974673, 0.4324770402338274, -0.006259113990971343, -0.4882741764914904, -0.3095166071138138, -0.38152574068700673, -0.2762103529668707, 0.35954051017160893, 0.32226538703772434, -0.21233047984366493, 0.31763626852959703, 0.3830795306205417, 0.143632159637189, 0.44639406555807426, -0.22946508987948278, 0.2835965124238129, -0.0952356692211751, 0.22063635836623874, -0.24874871752243877, -0.4689717709380474, 0.1617411090224934, 0.28028169533084935, 0.06018639817481031, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345], "twirled_unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, -0.07881890527233892, 0.2696516461463965, -0.010108661519272033, -0.2541627734809673, -0.06682331352363136, -0.28905450205887107, 0.33704238573828604, 0.4712154313820385, 0.42572259206511376, -0.07888407435634903, 0.2668778554191107, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, -0.23888989776727243, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, -0.028899062065068648, -0.20420834050016623, 0.3197058603934231, -0.2479726770099262, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.03297551316599012, 0.012842477370785588, 0.32926391538136457, 0.44990811567888755, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, -0.21711220189177283, -0.3225331758216612, 0.3927726383275072, 0.05240187483477854, 0.09988083390955893, 0.2846662038892873, -0.307376580132793, -0.0048050564673012275, -0.00910933552858495, -0.4655014605768244, 0.3279888356070302, -0.31032298247400547, -0.42551493610063673, 0.29334057774597255, -0.41127481942283595, 0.07798778071790835, -0.03047247914082618, 0.1293619641527073, -0.33980968285915836, 0.1696033162756727, 0.1614914491827939, -0.11825097296870268, 0.3610912954963368, 0.24209820089131995, 0.006790752767880548, 0.04304425197575412, -0.32738600345714275, -0.25227068013025544, 0.19660653963240193, 0.114802418824965, -0.172704433349967], "break": [1], "rc_base_cycle_loop_index": [11], "unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967], "pauli_seed_q0": [-13838434709596], "current_seeds_q0": [3], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "unitaries_q1": [-0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345]} \ No newline at end of file +{"pauli_seed_q0": [-13838434709596], "rc_base_cycle_loop_index": [11], "current_seeds_q0": [3], "unitary_angle_offset": [72], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "current_seeds_q1": [0], "unitaries_q1": [0.1306577643126623, -0.44968060926099085, 0.07361918673830203, 0.26228990149481035, -0.3503039777039696, -0.21221815451668746, -0.06876404255354984, 0.23108886334528123, 0.4803542081018186, 0.026563378638172708, 0.3427234359697735, -0.27092919654169023, 0.2402723677717553, 0.18229516558227132, -0.439668073429921, 0.052779087819804005, 0.3829003034514109, 0.3948500346756276, 0.1185831188857982, -0.26780126282373473, -0.2943348490020554, -0.30565501841008924, 0.015880959898169067, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.34981970641761606, -0.3725604991977569, -0.4927178803761194, 0.007483535100632821, 0.27899373485921686, 0.03366269558096491, -0.2652796701499689, 0.1940641530915279, 0.004259973013947871, -0.07934844926123219, 0.20003673498231578, 0.4724426590122235, 0.02030119259609009, 0.2711085794287058, 0.3572385478026021, 0.23930410994724838, -0.4316770811702533, 0.06752295976617262, -0.006259113990971343, -0.011725823508509592, -0.1904833928861862, -0.11847425931299327, 0.2237896470331293, 0.35954051017160893, 0.32226538703772434, -0.21233047984366493, -0.18236373147040297, 0.11692046937945832, -0.143632159637189, -0.44639406555807426, -0.22946508987948278, 0.2164034875761871, 0.0952356692211751, 0.27936364163376126, 0.25125128247756123, 0.031028229061952572, 0.1617411090224934, 0.28028169533084935, -0.4398136018251897, -0.4031368826142234, 0.4328245778372555, 0.35829684548359, -0.004340707104834252, -0.11441606546784655], "break": [1], "pauli_seed_q1": [60576142310008], "unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, -0.07881890527233892, 0.23034835385360353, 0.010108661519272033, -0.24583722651903273, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, 0.07427740793488624, -0.42111592564365097, 0.2668778554191107, -0.13331130172538863, 0.12425959266423448, -0.34215653660366385, 0.26111010223272757, 0.2985251306765164, -0.4731909991248422, -0.15171013965482416, -0.039234916317450796, -0.37684417282135385, 0.028899062065068648, 0.20420834050016623, 0.18029413960657692, 0.2520273229900738, -0.18624585452333164, -0.49105233325456865, 0.08201948178145457, -0.2163845393922088, -0.31819606673195366, -0.05523301804827341, 0.20735831441055907, 0.2567003523160629, 0.03291592648032449, 0.1566001925728422, -0.4670244868340099, 0.4871575226292144, 0.17073608461863543, 0.050091884321112445, 0.34029098228440446, -0.39341591753839467, -0.2551812027350344, 0.2828877981082272, -0.3225331758216612, 0.1072273616724928, -0.05240187483477854, -0.09988083390955893, 0.2846662038892873, 0.307376580132793, 0.0048050564673012275, -0.49089066447141505, -0.4655014605768244, -0.17201116439296982, -0.31032298247400547, 0.07448506389936327, 0.29334057774597255, -0.08872518057716405, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.3385085508172061, -0.3817490270312973, 0.13890870450366322, 0.25790179910868005, 0.006790752767880548, 0.04304425197575412, -0.17261399654285725, -0.24772931986974456, -0.19660653963240193, 0.385197581175035, 0.327295566650033]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration5].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration5].json index cc91103db..066ef23f8 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration5].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration5].json @@ -1 +1 @@ -{"unitary_angle_offset": [84], "unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132], "rc_base_cycle_loop_index": [1], "twirled_unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, -0.48989133848072797, 0.24583722651903273, 0.06682331352363136, -0.28905450205887107, -0.33704238573828604, -0.4712154313820385, 0.42572259206511376, 0.07888407435634903, -0.2331221445808893, -0.13331130172538863, 0.12425959266423448, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, 0.4731909991248422, 0.15171013965482416, -0.4607650836825492, -0.37684417282135385, -0.028899062065068648, -0.20420834050016623, -0.18029413960657692, 0.2520273229900738, -0.18624585452333164, 0.49105233325456865, -0.08201948178145457, 0.2163845393922088, -0.31819606673195366, -0.4447669819517266, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.17073608461863543, -0.050091884321112445, 0.15970901771559554, 0.39341591753839467, -0.2551812027350344, -0.21711220189177283, 0.1774668241783388, -0.1072273616724928, -0.44759812516522146, 0.09988083390955893, -0.2846662038892873, -0.192623419867207, -0.0048050564673012275, 0.00910933552858495, -0.4655014605768244, 0.17201116439296982, 0.31032298247400547, 0.07448506389936327, 0.20665942225402745, 0.41127481942283595, 0.07798778071790835, 0.03047247914082618, 0.1293619641527073, -0.16019031714084164, -0.1696033162756727, 0.1614914491827939, 0.3817490270312973, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, 0.17261399654285725, 0.24772931986974456, -0.30339346036759807, -0.385197581175035, 0.327295566650033, -0.3693422356873377, -0.05031939073900915, 0.42638081326169797, 0.26228990149481035, -0.1496960222960304, 0.28778184548331254, 0.43123595744645016, 0.2689111366547188, 0.4803542081018186, -0.026563378638172708, -0.1572765640302265, -0.27092919654169023, 0.2402723677717553, -0.3177048344177287], "current_seeds_q1": [436656574984, 0], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "rc_seed_index": [2], "pauli_seed_q0": [-13838434709596, 60576142310008], "twirled_unitaries_q1": [-0.06033192657007902, -0.052779087819804005, -0.1170996965485891, 0.10514996532437237, 0.1185831188857982, 0.26780126282373473, 0.20566515099794458, 0.19434498158991076, -0.015880959898169067, -0.1942237015504702, 0.08314917988841941, 0.18571149745641335, -0.2877962331373993, -0.339972912082672, -0.1479067598570225, -0.4300465035584615, -0.41228591038566975, -0.15018029358238394, -0.1274395008022431, -0.4927178803761194, 0.4925164648993672, 0.27899373485921686, 0.4663373044190351, -0.2652796701499689, 0.3059358469084721, -0.004259973013947871, 0.07934844926123219, -0.20003673498231578, 0.4724426590122235, 0.02030119259609009, -0.2711085794287058, -0.3572385478026021, -0.23930410994724838, -0.06832291882974673, -0.4324770402338274, 0.006259113990971343, 0.4882741764914904, 0.1904833928861862, -0.38152574068700673, 0.2237896470331293, -0.14045948982839107, 0.32226538703772434, -0.28766952015633507, 0.31763626852959703, 0.3830795306205417, 0.356367840362811, -0.05360593444192574, 0.22946508987948278, 0.2164034875761871, -0.0952356692211751, 0.22063635836623874, -0.24874871752243877, 0.4689717709380474, -0.3382588909775066, 0.21971830466915065, -0.4398136018251897, -0.4031368826142234, 0.4328245778372555, 0.14170315451641002, -0.004340707104834252, 0.11441606546784655, -0.38054151056773833, 0.12939651458237122, 0.4643162198608053, 0.45227955351385773, 0.3909980613188502, -0.46477539180972016, 0.2218792895229953, 0.49150594401294256, -0.4814965178886297, 0.4468761306925302, 0.4177095451891617, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, -0.12189580615840612, 0.053929188169522746, 0.41132629098234474, -0.37178913337915986, -0.055067922645431366, -0.4413383368652397, 0.16574731062717163, -0.2636358117380446, -0.15396173955647896, -0.3048825069023309, -0.4145682812563436, 0.4630714074908795], "current_seeds_q0": [946502223593, 3], "break": [1], "unitaries_q1": [-0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795], "pauli_seed_q1": [34470019755655, 27946020799016]} \ No newline at end of file +{"break": [1], "pauli_seed_q0": [-13838434709596, 60576142310008], "rc_base_cycle_loop_index": [1], "rc_seed_index": [2], "unitaries_q1": [-0.06033192657007902, -0.052779087819804005, -0.1170996965485891, 0.10514996532437237, 0.1185831188857982, 0.26780126282373473, 0.20566515099794458, 0.30565501841008924, 0.015880959898169067, -0.3057762984495298, 0.4168508201115806, -0.31428850254358665, -0.2877962331373993, -0.160027087917328, 0.1479067598570225, 0.4300465035584615, -0.41228591038566975, -0.34981970641761606, 0.1274395008022431, -0.00728211962388059, -0.007483535100632821, 0.27899373485921686, 0.03366269558096491, -0.2347203298500311, 0.1940641530915279, -0.004259973013947871, 0.4206515507387678, 0.20003673498231578, 0.027557340987776513, -0.4796988074039099, -0.2711085794287058, -0.1427614521973979, -0.2606958900527516, 0.06832291882974673, -0.06752295976617262, 0.006259113990971343, -0.011725823508509592, 0.1904833928861862, -0.38152574068700673, 0.2237896470331293, -0.35954051017160893, 0.17773461296227566, -0.21233047984366493, 0.18236373147040297, 0.3830795306205417, -0.143632159637189, -0.05360593444192574, 0.22946508987948278, 0.2164034875761871, -0.4047643307788249, -0.22063635836623874, -0.25125128247756123, 0.031028229061952572, -0.3382588909775066, 0.21971830466915065, -0.06018639817481031, 0.4031368826142234, -0.4328245778372555, 0.35829684548359, 0.49565929289516575, 0.11441606546784655, -0.11945848943226167, 0.3706034854176288, -0.4643162198608053, 0.45227955351385773, 0.10900193868114982, -0.03522460819027984, 0.2781207104770047, 0.49150594401294256, 0.018503482111370317, 0.4468761306925302, 0.4177095451891617, 0.3382932840446351, -0.3571480415801709, 0.08841780823371082, 0.12189580615840612, 0.44607081183047725, 0.41132629098234474, -0.37178913337915986, -0.44493207735456863, 0.4413383368652397, -0.16574731062717163, -0.23636418826195538, -0.15396173955647896, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795], "pauli_seed_q1": [34470019755655, 27946020799016], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "current_seeds_q0": [946502223593, 3], "unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, -0.21094549794112893, -0.33704238573828604, 0.4712154313820385, 0.07427740793488624, 0.07888407435634903, -0.2668778554191107, -0.36668869827461137, 0.12425959266423448, 0.15784346339633615, -0.26111010223272757, -0.2985251306765164, -0.026809000875157807, 0.15171013965482416, -0.039234916317450796, -0.12315582717864615, 0.028899062065068648, -0.20420834050016623, 0.18029413960657692, -0.2520273229900738, -0.31375414547666836, -0.008947666745431349, -0.08201948178145457, 0.2836154606077912, -0.18180393326804634, 0.4447669819517266, -0.20735831441055907, -0.24329964768393708, 0.4670840735196755, -0.1566001925728422, 0.03297551316599012, 0.4871575226292144, -0.32926391538136457, -0.44990811567888755, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, -0.21711220189177283, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.40011916609044107, 0.2846662038892873, -0.307376580132793, -0.0048050564673012275, -0.00910933552858495, 0.4655014605768244, 0.3279888356070302, 0.31032298247400547, -0.42551493610063673, 0.20665942225402745, -0.08872518057716405, -0.42201221928209165, 0.4695275208591738, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.3610912954963368, 0.25790179910868005, 0.49320924723211945, -0.04304425197575412, 0.17261399654285725, 0.24772931986974456, -0.19660653963240193, -0.114802418824965, -0.327295566650033, -0.3693422356873377, -0.44968060926099085, 0.07361918673830203, 0.23771009850518965, -0.1496960222960304, -0.21221815451668746, 0.43123595744645016, -0.23108886334528123, 0.4803542081018186, -0.026563378638172708, -0.1572765640302265, -0.27092919654169023, 0.2402723677717553, -0.3177048344177287], "current_seeds_q1": [436656574984, 0], "unitary_angle_offset": [84]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration6].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration6].json index 47d49e11d..55cfbaf2e 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration6].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration6].json @@ -1 +1 @@ -{"current_seeds_q1": [220], "unitaries_q1": [-0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592], "current_seeds_q0": [973], "unitary_angle_offset": [60], "pauli_seed_q0": [-13838434709596], "break": [1], "twirled_unitaries_q1": [-0.3303966837243273, 0.1614914491827939, -0.11825097296870268, 0.3610912954963368, 0.25790179910868005, -0.006790752767880548, 0.4569557480242459, -0.17261399654285725, 0.24772931986974456, 0.19660653963240193, 0.385197581175035, 0.172704433349967, 0.3693422356873377, -0.05031939073900915, 0.07361918673830203, -0.23771009850518965, -0.3503039777039696, 0.28778184548331254, 0.43123595744645016, 0.23108886334528123, -0.019645791898181386, -0.4734366213618273, 0.3427234359697735, 0.22907080345830977, -0.2597276322282447, 0.18229516558227132, -0.439668073429921, 0.052779087819804005, 0.1170996965485891, -0.3948500346756276, 0.3814168811142018, -0.26780126282373473, -0.20566515099794458, 0.30565501841008924, 0.015880959898169067, 0.1942237015504702, -0.4168508201115806, 0.18571149745641335, -0.21220376686260067, 0.160027087917328, 0.3520932401429775, -0.4300465035584615, -0.41228591038566975, -0.34981970641761606, -0.1274395008022431, 0.4927178803761194, 0.007483535100632821, 0.22100626514078314, -0.03366269558096491, -0.2347203298500311, 0.1940641530915279, 0.004259973013947871, -0.07934844926123219, -0.2999632650176842, -0.027557340987776513, 0.4796988074039099, -0.2711085794287058, -0.3572385478026021, 0.23930410994724838, -0.06832291882974673, 0.4324770402338274, -0.006259113990971343, 0.011725823508509592], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "twirled_unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, -0.07881890527233892, 0.2696516461463965, -0.010108661519272033, -0.2541627734809673, -0.06682331352363136, -0.28905450205887107, 0.33704238573828604, 0.4712154313820385, 0.42572259206511376, -0.07888407435634903, 0.2668778554191107, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, -0.23888989776727243, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, -0.028899062065068648, -0.20420834050016623, 0.3197058603934231, -0.2479726770099262, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.03297551316599012, 0.012842477370785588, 0.32926391538136457, 0.44990811567888755, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, -0.21711220189177283, -0.3225331758216612, 0.3927726383275072, 0.05240187483477854, 0.09988083390955893, 0.2846662038892873, -0.307376580132793, -0.0048050564673012275, -0.00910933552858495, -0.4655014605768244, 0.3279888356070302, -0.31032298247400547, -0.42551493610063673, 0.29334057774597255, -0.41127481942283595, 0.07798778071790835, -0.03047247914082618, 0.1293619641527073, 0.16019031714084164], "pauli_seed_q1": [60576142310008], "rc_base_cycle_loop_index": [4], "unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836]} \ No newline at end of file +{"current_seeds_q0": [973], "unitaries_q0": [-0.36426626391689254, -0.24288996061782697, 0.09090955676404278, -0.07881890527233892, 0.23034835385360353, 0.010108661519272033, -0.24583722651903273, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, 0.07427740793488624, -0.42111592564365097, 0.2668778554191107, -0.13331130172538863, 0.12425959266423448, -0.34215653660366385, 0.26111010223272757, 0.2985251306765164, -0.4731909991248422, -0.15171013965482416, -0.039234916317450796, -0.37684417282135385, 0.028899062065068648, 0.20420834050016623, 0.18029413960657692, 0.2520273229900738, -0.18624585452333164, -0.49105233325456865, 0.08201948178145457, -0.2163845393922088, -0.31819606673195366, -0.05523301804827341, 0.20735831441055907, 0.2567003523160629, 0.03291592648032449, 0.1566001925728422, -0.4670244868340099, 0.4871575226292144, 0.17073608461863543, 0.050091884321112445, 0.34029098228440446, -0.39341591753839467, -0.2551812027350344, 0.2828877981082272, -0.3225331758216612, 0.1072273616724928, -0.05240187483477854, -0.09988083390955893, 0.2846662038892873, 0.307376580132793, 0.0048050564673012275, -0.49089066447141505, -0.4655014605768244, -0.17201116439296982, -0.31032298247400547, 0.07448506389936327, 0.29334057774597255, -0.08872518057716405, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836], "current_seeds_q1": [220], "pauli_seed_q1": [60576142310008], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "rc_base_cycle_loop_index": [4], "unitary_angle_offset": [60], "break": [1], "unitaries_q1": [0.1696033162756727, 0.3385085508172061, 0.11825097296870268, -0.3610912954963368, 0.24209820089131995, -0.006790752767880548, 0.4569557480242459, -0.17261399654285725, -0.25227068013025544, 0.19660653963240193, 0.385197581175035, 0.172704433349967, -0.1306577643126623, -0.05031939073900915, -0.42638081326169797, -0.23771009850518965, -0.3503039777039696, -0.21221815451668746, 0.43123595744645016, 0.2689111366547188, 0.019645791898181386, 0.4734366213618273, 0.3427234359697735, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.23219873717626527, 0.20566515099794458, 0.19434498158991076, 0.48411904010183093, 0.1942237015504702, 0.08314917988841941, 0.18571149745641335, 0.2877962331373993, 0.160027087917328, 0.3520932401429775, -0.4300465035584615, -0.41228591038566975, -0.34981970641761606, 0.3725604991977569, 0.4927178803761194, 0.4925164648993672, 0.27899373485921686, -0.4663373044190351, -0.2347203298500311, 0.3059358469084721, 0.49574002698605213, -0.4206515507387678, 0.20003673498231578, -0.027557340987776513, 0.4796988074039099, -0.2711085794287058, 0.1427614521973979, 0.2606958900527516, 0.06832291882974673, 0.06752295976617262, -0.49374088600902866, -0.4882741764914904], "pauli_seed_q0": [-13838434709596]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration7].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration7].json index b939460f7..fe5e71e5d 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration7].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration7].json @@ -1 +1 @@ -{"twirled_unitaries_q1": [-0.06033192657007902, -0.052779087819804005, -0.1170996965485891, 0.10514996532437237, 0.1185831188857982, 0.26780126282373473, 0.20566515099794458, 0.19434498158991076, -0.015880959898169067, -0.1942237015504702, 0.08314917988841941, 0.18571149745641335, -0.2877962331373993, -0.339972912082672, -0.1479067598570225, -0.4300465035584615, -0.41228591038566975, -0.15018029358238394, -0.1274395008022431, -0.4927178803761194, 0.4925164648993672, 0.27899373485921686, 0.4663373044190351, -0.2652796701499689, 0.3059358469084721, -0.004259973013947871, 0.07934844926123219, -0.20003673498231578, 0.4724426590122235, 0.02030119259609009, -0.2711085794287058, -0.3572385478026021, -0.23930410994724838, -0.06832291882974673, -0.4324770402338274, 0.006259113990971343, 0.4882741764914904, 0.1904833928861862, -0.38152574068700673, 0.2237896470331293, -0.14045948982839107, 0.32226538703772434, -0.28766952015633507, 0.31763626852959703, 0.3830795306205417, 0.356367840362811, -0.05360593444192574, 0.22946508987948278, 0.2164034875761871, -0.0952356692211751, 0.22063635836623874, -0.24874871752243877, 0.4689717709380474, -0.3382588909775066, 0.21971830466915065, -0.4398136018251897, -0.4031368826142234, 0.4328245778372555, 0.14170315451641002, -0.004340707104834252, 0.11441606546784655, -0.38054151056773833, 0.12939651458237122, 0.4643162198608053, 0.45227955351385773, 0.3909980613188502, -0.46477539180972016, 0.2218792895229953, 0.49150594401294256, -0.4814965178886297, 0.4468761306925302, 0.4177095451891617, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, -0.12189580615840612, 0.053929188169522746, 0.41132629098234474, -0.37178913337915986, -0.055067922645431366, -0.4413383368652397, 0.16574731062717163, -0.2636358117380446, -0.15396173955647896, -0.3048825069023309, -0.4145682812563436, 0.4630714074908795], "rc_seed_index": [2], "current_seeds_q1": [436656574984, 0], "twirled_unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, -0.48989133848072797, 0.24583722651903273, 0.06682331352363136, -0.28905450205887107, -0.33704238573828604, -0.4712154313820385, 0.42572259206511376, 0.07888407435634903, -0.2331221445808893, -0.13331130172538863, 0.12425959266423448, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, 0.4731909991248422, 0.15171013965482416, -0.4607650836825492, -0.37684417282135385, -0.028899062065068648, -0.20420834050016623, -0.18029413960657692, 0.2520273229900738, -0.18624585452333164, 0.49105233325456865, -0.08201948178145457, 0.2163845393922088, -0.31819606673195366, -0.4447669819517266, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.17073608461863543, -0.050091884321112445, 0.15970901771559554, 0.39341591753839467, -0.2551812027350344, -0.21711220189177283, 0.1774668241783388, -0.1072273616724928, -0.44759812516522146, 0.09988083390955893, -0.2846662038892873, -0.192623419867207, -0.0048050564673012275, 0.00910933552858495, -0.4655014605768244, 0.17201116439296982, 0.31032298247400547, 0.07448506389936327, 0.20665942225402745, 0.41127481942283595, 0.07798778071790835, 0.03047247914082618, 0.1293619641527073, -0.16019031714084164, -0.1696033162756727, 0.1614914491827939, 0.3817490270312973, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, 0.17261399654285725, 0.24772931986974456, -0.30339346036759807, -0.385197581175035, 0.327295566650033, -0.3693422356873377, -0.05031939073900915, 0.42638081326169797, 0.26228990149481035, -0.1496960222960304, 0.28778184548331254, 0.43123595744645016, 0.2689111366547188, 0.4803542081018186, -0.026563378638172708, -0.1572765640302265, -0.27092919654169023, 0.2402723677717553, -0.3177048344177287], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "unitaries_q1": [-0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795], "pauli_seed_q0": [-13838434709596, 60576142310008], "pauli_seed_q1": [34470019755655, 27946020799016], "current_seeds_q0": [946502223593, 3], "break": [1], "unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132], "rc_base_cycle_loop_index": [5], "unitary_angle_offset": [84]} \ No newline at end of file +{"unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, -0.21094549794112893, -0.33704238573828604, 0.4712154313820385, 0.07427740793488624, 0.07888407435634903, -0.2668778554191107, -0.36668869827461137, 0.12425959266423448, 0.15784346339633615, -0.26111010223272757, -0.2985251306765164, -0.026809000875157807, 0.15171013965482416, -0.039234916317450796, -0.12315582717864615, 0.028899062065068648, -0.20420834050016623, 0.18029413960657692, -0.2520273229900738, -0.31375414547666836, -0.008947666745431349, -0.08201948178145457, 0.2836154606077912, -0.18180393326804634, 0.4447669819517266, -0.20735831441055907, -0.24329964768393708, 0.4670840735196755, -0.1566001925728422, 0.03297551316599012, 0.4871575226292144, -0.32926391538136457, -0.44990811567888755, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, -0.21711220189177283, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.40011916609044107, 0.2846662038892873, -0.307376580132793, -0.0048050564673012275, -0.00910933552858495, 0.4655014605768244, 0.3279888356070302, 0.31032298247400547, -0.42551493610063673, 0.20665942225402745, -0.08872518057716405, -0.42201221928209165, 0.4695275208591738, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.3610912954963368, 0.25790179910868005, 0.49320924723211945, -0.04304425197575412, 0.17261399654285725, 0.24772931986974456, -0.19660653963240193, -0.114802418824965, -0.327295566650033, -0.3693422356873377, -0.44968060926099085, 0.07361918673830203, 0.23771009850518965, -0.1496960222960304, -0.21221815451668746, 0.43123595744645016, -0.23108886334528123, 0.4803542081018186, -0.026563378638172708, -0.1572765640302265, -0.27092919654169023, 0.2402723677717553, -0.3177048344177287], "break": [1], "unitary_angle_offset": [84], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "pauli_seed_q1": [34470019755655, 27946020799016], "unitaries_q1": [-0.06033192657007902, -0.052779087819804005, -0.1170996965485891, 0.10514996532437237, 0.1185831188857982, 0.26780126282373473, 0.20566515099794458, 0.30565501841008924, 0.015880959898169067, -0.3057762984495298, 0.4168508201115806, -0.31428850254358665, -0.2877962331373993, -0.160027087917328, 0.1479067598570225, 0.4300465035584615, -0.41228591038566975, -0.34981970641761606, 0.1274395008022431, -0.00728211962388059, -0.007483535100632821, 0.27899373485921686, 0.03366269558096491, -0.2347203298500311, 0.1940641530915279, -0.004259973013947871, 0.4206515507387678, 0.20003673498231578, 0.027557340987776513, -0.4796988074039099, -0.2711085794287058, -0.1427614521973979, -0.2606958900527516, 0.06832291882974673, -0.06752295976617262, 0.006259113990971343, -0.011725823508509592, 0.1904833928861862, -0.38152574068700673, 0.2237896470331293, -0.35954051017160893, 0.17773461296227566, -0.21233047984366493, 0.18236373147040297, 0.3830795306205417, -0.143632159637189, -0.05360593444192574, 0.22946508987948278, 0.2164034875761871, -0.4047643307788249, -0.22063635836623874, -0.25125128247756123, 0.031028229061952572, -0.3382588909775066, 0.21971830466915065, -0.06018639817481031, 0.4031368826142234, -0.4328245778372555, 0.35829684548359, 0.49565929289516575, 0.11441606546784655, -0.11945848943226167, 0.3706034854176288, -0.4643162198608053, 0.45227955351385773, 0.10900193868114982, -0.03522460819027984, 0.2781207104770047, 0.49150594401294256, 0.018503482111370317, 0.4468761306925302, 0.4177095451891617, 0.3382932840446351, -0.3571480415801709, 0.08841780823371082, 0.12189580615840612, 0.44607081183047725, 0.41132629098234474, -0.37178913337915986, -0.44493207735456863, 0.4413383368652397, -0.16574731062717163, -0.23636418826195538, -0.15396173955647896, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795], "rc_base_cycle_loop_index": [5], "rc_seed_index": [2], "pauli_seed_q0": [-13838434709596, 60576142310008], "current_seeds_q1": [436656574984, 0], "current_seeds_q0": [946502223593, 3]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration8].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration8].json index a73b32c10..9eebbacd3 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration8].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration8].json @@ -1 +1 @@ -{"current_seeds_q0": [0, 0], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "rc_base_cycle_loop_index": [1], "unitaries_q1": [0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353, -0.0859309855169279, 0.35029365642154886, -0.21420182853494651, -0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.331149994774826, 0.42061281807632867, 0.10882401546969689, -0.20691047149288266, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028, 0.28977728519420864, -0.4127736568831999, 0.2284462147227977, 0.3062633617185391, 0.11338753441490113, 0.2184874815159965, 0.3822599408908971, 0.07358068439263832, -0.14088216697814104, 0.4980383678436553, -0.0769597740948278, -0.34622494807280546, -0.1375695796222196, -0.3886559574053656, -0.4641161820327113, -0.2877355696129733, 0.4151805693951154, -0.2457015010787451, -0.29923453998630123, -0.45957636539721136, -0.38195891683453453, 0.03859037256674469, -0.08978167650477431, -0.07808595139374575, 0.04165792706529814, 0.37243126123017944, -0.06256391649851878, 0.31177994003055787, -0.44384141722735393, 0.22776589100726952, -0.1144049988797704, -0.02604531885600636, -0.3880041097036475, -0.38290552515987386, 0.41894082221451256, 0.4452687082975473, 0.2319884785423838, -0.06429797336391019, -0.09823984663831453, -0.02791825279908622, 0.3647157726393928, -0.3337281049196612, -0.46163591823072636, 0.1337047764333228, -0.32533129436627917, 0.1765877048535387, -0.0638019217320398, 0.4878383579652166, -0.23889962098470718, 0.26096195281205326, -0.32494991468407974, -0.44882528698095925, 0.21751509762007615, 0.3802680530959428, 0.2730510105090431, 0.1723272746916713, -0.13920345844470106, 0.05584616229532102, -0.23214969542699038, -0.29959971333545354, 0.2797248113332209, -0.28722577580825615, -0.051803177141760415, -0.31241562029034853, 0.025135451800657904, -0.08074149417010545, -0.4186349836360712, -0.054728813629211004, 0.11199236531999546, -0.3310447281338149, 0.1961489222558832, -0.24364278945751394, -0.41373787501252934, -0.49075580494069726, -0.49500617846724637, 0.04517698380747248, 0.3736056255881408, -0.23042832066938956, 0.48660858755684444, 0.4355398681503253, -0.13488961790957887, 0.2813933307165257, -0.41366667379787003, -0.3576968962671607, 0.031850165179228895, 0.1215744180596694, -0.09788826968987507, -0.048175590932000745, 0.4487621872882883, 0.48170724460221237, -0.23451311792852536, 0.42923384599364667, -0.10022812594482033, -0.1703562718193048], "pauli_seed_q1": [34470019755655, 27946020799016], "unitary_angle_offset": [144], "current_seeds_q1": [0, 0], "break": [1], "twirled_unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, -0.48989133848072797, 0.24583722651903273, 0.06682331352363136, -0.28905450205887107, -0.33704238573828604, -0.4712154313820385, 0.42572259206511376, 0.07888407435634903, -0.2331221445808893, -0.13331130172538863, 0.12425959266423448, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, 0.4731909991248422, 0.15171013965482416, -0.4607650836825492, -0.37684417282135385, -0.028899062065068648, -0.20420834050016623, -0.18029413960657692, 0.2520273229900738, -0.18624585452333164, 0.49105233325456865, -0.08201948178145457, 0.2163845393922088, -0.31819606673195366, -0.4447669819517266, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.17073608461863543, -0.050091884321112445, 0.15970901771559554, 0.39341591753839467, -0.2551812027350344, -0.21711220189177283, 0.1774668241783388, -0.1072273616724928, -0.44759812516522146, 0.09988083390955893, -0.2846662038892873, -0.192623419867207, -0.0048050564673012275, 0.00910933552858495, -0.4655014605768244, 0.17201116439296982, 0.31032298247400547, 0.07448506389936327, 0.20665942225402745, 0.41127481942283595, 0.07798778071790835, 0.03047247914082618, 0.1293619641527073, -0.16019031714084164, -0.1696033162756727, 0.1614914491827939, 0.3817490270312973, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, 0.17261399654285725, 0.24772931986974456, -0.30339346036759807, -0.385197581175035, 0.327295566650033, -0.3693422356873377, -0.05031939073900915, 0.42638081326169797, 0.26228990149481035, -0.1496960222960304, 0.28778184548331254, 0.43123595744645016, 0.2689111366547188, 0.4803542081018186, -0.026563378638172708, -0.1572765640302265, 0.22907080345830977, 0.2597276322282447, -0.18229516558227132, -0.439668073429921, -0.052779087819804005, -0.3829003034514109, 0.3948500346756276, 0.1185831188857982, -0.26780126282373473, 0.2943348490020554, 0.19434498158991076, 0.015880959898169067, -0.3057762984495298, 0.4168508201115806, 0.18571149745641335, 0.21220376686260067, -0.160027087917328, -0.3520932401429775, 0.4300465035584615, -0.08771408961433025, 0.34981970641761606, 0.3725604991977569, -0.4927178803761194, -0.007483535100632821, -0.22100626514078314, 0.03366269558096491, -0.2347203298500311, -0.3059358469084721, -0.004259973013947871, -0.07934844926123219, 0.20003673498231578, 0.4724426590122235, 0.4796988074039099, 0.2711085794287058, -0.1427614521973979, -0.23930410994724838, 0.4316770811702533, -0.06752295976617262, 0.49374088600902866, -0.4882741764914904, 0.3095166071138138, 0.11847425931299327, -0.2762103529668707, -0.35954051017160893, 0.17773461296227566, -0.21233047984366493, 0.31763626852959703, -0.3830795306205417, 0.143632159637189, -0.05360593444192574, 0.2705349101205172, 0.2835965124238129, -0.4047643307788249, -0.27936364163376126, 0.25125128247756123, 0.031028229061952572, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575], "rc_seed_index": [2], "twirled_unitaries_q1": [0.38558393453215345, -0.11945848943226167, -0.3706034854176288, -0.03568378013919471, 0.047720446486142265, 0.10900193868114982, -0.03522460819027984, 0.2218792895229953, 0.008494055987057436, 0.4814965178886297, 0.4468761306925302, -0.4177095451891617, 0.1617067159553649, -0.14285195841982912, -0.4115821917662892, 0.12189580615840612, 0.053929188169522746, 0.08867370901765526, -0.12821086662084014, -0.44493207735456863, 0.05866166313476029, -0.33425268937282837, -0.23636418826195538, 0.15396173955647896, -0.19511749309766913, -0.0854317187436564, -0.036928592509120506, -0.44066757058091, 0.20553371694326472, -0.4140690144830721, 0.14970634357845114, -0.2857981714650535, 0.18760028191363887, 0.21514255278739114, -0.057318521323395544, 0.2779890761009902, 0.47367514134620947, -0.13755156757528653, 0.4512413528363055, -0.47065008790002594, 0.3265447505634178, 0.1822764510861603, -0.331149994774826, 0.07938718192367133, 0.3911759845303031, 0.20691047149288266, 0.17600903158385606, 0.49089954872644626, -0.016669856223522572, 0.13176156160845665, -0.4642748186488568, 0.07037465869650461, -0.16046335532868028, -0.28977728519420864, -0.08722634311680011, 0.2284462147227977, 0.19373663828146093, -0.11338753441490113, 0.2184874815159965, 0.1177400591091029, 0.4264193156073617, -0.35911783302185896, 0.4980383678436553, 0.4230402259051722, -0.34622494807280546, 0.3624304203777804, -0.3886559574053656, -0.03588381796728868, 0.2877355696129733, -0.4151805693951154, -0.2542984989212549, 0.20076546001369877, -0.45957636539721136, -0.38195891683453453, 0.03859037256674469, 0.4102183234952257, -0.42191404860625425, 0.45834207293470186, 0.12756873876982056, -0.06256391649851878, -0.31177994003055787, -0.05615858277264607, 0.2722341089927305, 0.3855950011202296, -0.02604531885600636, -0.11199589029635248, -0.11709447484012614, -0.41894082221451256, 0.05473129170245272, -0.2680115214576162, 0.4357020266360898, -0.09823984663831453, -0.02791825279908622, -0.1352842273606072, -0.1662718950803388, -0.03836408176927364, -0.1337047764333228, -0.17466870563372083, -0.3234122951464613, -0.0638019217320398, 0.012161642034783426, 0.23889962098470718, 0.23903804718794674, -0.32494991468407974, 0.44882528698095925, -0.21751509762007615, 0.3802680530959428, -0.2730510105090431, -0.1723272746916713, -0.36079654155529894, -0.444153837704679, -0.23214969542699038, -0.29959971333545354, 0.2797248113332209, 0.21277422419174385, -0.051803177141760415, 0.18758437970965147, 0.025135451800657904, -0.41925850582989455, -0.08136501636392879, 0.054728813629211004, 0.11199236531999546, 0.3310447281338149, -0.1961489222558832, -0.24364278945751394, 0.41373787501252934, -0.00924419505930274, -0.49500617846724637, -0.04517698380747248, 0.1263943744118592, -0.23042832066938956, 0.01339141244315556, 0.0644601318496747, -0.13488961790957887, 0.21860666928347428, -0.08633332620212997, -0.3576968962671607, -0.031850165179228895, 0.3784255819403306, -0.09788826968987507, -0.45182440906799926, -0.4487621872882883, 0.01829275539778763, 0.26548688207147464, 0.42923384599364667, -0.10022812594482033, -0.1703562718193048], "unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578, -0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, -0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574, -0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575], "pauli_seed_q0": [-13838434709596, 60576142310008]} \ No newline at end of file +{"rc_seed_index": [2], "unitaries_q1": [0.38558393453215345, -0.11945848943226167, -0.3706034854176288, -0.03568378013919471, 0.047720446486142265, 0.10900193868114982, -0.03522460819027984, 0.2781207104770047, -0.008494055987057436, 0.018503482111370317, 0.05312386930746982, 0.0822904548108383, 0.1617067159553649, -0.3571480415801709, 0.4115821917662892, -0.12189580615840612, 0.053929188169522746, 0.41132629098234474, 0.12821086662084014, -0.055067922645431366, -0.4413383368652397, -0.33425268937282837, -0.2636358117380446, 0.34603826044352104, -0.3048825069023309, -0.0854317187436564, -0.4630714074908795, 0.44066757058091, 0.2944662830567353, 0.0859309855169279, 0.14970634357845114, -0.21420182853494651, 0.31239971808636113, -0.21514255278739114, -0.44268147867660446, 0.2779890761009902, -0.026324858653790528, -0.13755156757528653, 0.4512413528363055, -0.47065008790002594, 0.1734552494365822, 0.3177235489138397, -0.16885000522517402, 0.42061281807632867, 0.3911759845303031, -0.29308952850711734, 0.17600903158385606, 0.49089954872644626, -0.016669856223522572, 0.36823843839154335, 0.4642748186488568, 0.4296253413034954, -0.3395366446713197, -0.28977728519420864, -0.08722634311680011, 0.2715537852772023, -0.19373663828146093, 0.11338753441490113, 0.2815125184840035, -0.3822599408908971, 0.4264193156073617, -0.14088216697814104, 0.001961632156344706, -0.4230402259051722, -0.34622494807280546, 0.1375695796222196, -0.11134404259463437, -0.4641161820327113, 0.2877355696129733, 0.08481943060488462, -0.2542984989212549, 0.20076546001369877, -0.45957636539721136, -0.11804108316546547, 0.4614096274332553, -0.4102183234952257, -0.07808595139374575, 0.45834207293470186, 0.12756873876982056, -0.4374360835014812, 0.31177994003055787, 0.05615858277264607, 0.22776589100726952, 0.3855950011202296, -0.02604531885600636, -0.3880041097036475, -0.38290552515987386, 0.41894082221451256, 0.05473129170245272, 0.2680115214576162, -0.4357020266360898, -0.09823984663831453, 0.02791825279908622, -0.3647157726393928, -0.1662718950803388, -0.46163591823072636, -0.3662952235666772, -0.32533129436627917, -0.3234122951464613, -0.0638019217320398, 0.012161642034783426, -0.2611003790152928, 0.23903804718794674, -0.17505008531592026, 0.05117471301904075, -0.28248490237992385, 0.3802680530959428, 0.2730510105090431, -0.3276727253083287, -0.13920345844470106, 0.05584616229532102, 0.2678503045730096, -0.20040028666454646, -0.2797248113332209, -0.21277422419174385, -0.4481968228582396, 0.18758437970965147, -0.4748645481993421, -0.41925850582989455, -0.08136501636392879, -0.445271186370789, 0.11199236531999546, -0.16895527186618509, 0.3038510777441168, -0.25635721054248606, -0.41373787501252934, 0.00924419505930274, -0.004993821532753628, 0.4548230161925275, -0.3736056255881408, -0.26957167933061044, -0.01339141244315556, -0.0644601318496747, -0.13488961790957887, -0.21860666928347428, -0.41366667379787003, -0.3576968962671607, -0.4681498348207711, -0.3784255819403306, -0.4021117303101249, -0.45182440906799926, -0.4487621872882883, 0.48170724460221237, -0.26548688207147464, 0.07076615400635333, -0.39977187405517967, 0.3296437281806952], "pauli_seed_q0": [-13838434709596, 60576142310008], "pauli_seed_q1": [34470019755655, 27946020799016], "rc_base_cycle_loop_index": [1], "current_seeds_q0": [0, 0], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "unitary_angle_offset": [144], "unitaries_q0": [0.09090955676404278, 0.4211810947276611, 0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, -0.21094549794112893, -0.33704238573828604, 0.4712154313820385, 0.07427740793488624, 0.07888407435634903, -0.2668778554191107, -0.36668869827461137, 0.12425959266423448, 0.15784346339633615, -0.26111010223272757, -0.2985251306765164, -0.026809000875157807, 0.15171013965482416, -0.039234916317450796, -0.12315582717864615, 0.028899062065068648, -0.20420834050016623, 0.18029413960657692, -0.2520273229900738, -0.31375414547666836, -0.008947666745431349, -0.08201948178145457, 0.2836154606077912, -0.18180393326804634, 0.4447669819517266, -0.20735831441055907, -0.24329964768393708, 0.4670840735196755, -0.1566001925728422, 0.03297551316599012, 0.4871575226292144, -0.32926391538136457, -0.44990811567888755, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, -0.21711220189177283, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.40011916609044107, 0.2846662038892873, -0.307376580132793, -0.0048050564673012275, -0.00910933552858495, 0.4655014605768244, 0.3279888356070302, 0.31032298247400547, -0.42551493610063673, 0.20665942225402745, -0.08872518057716405, -0.42201221928209165, 0.4695275208591738, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.3610912954963368, 0.25790179910868005, 0.49320924723211945, -0.04304425197575412, 0.17261399654285725, 0.24772931986974456, -0.19660653963240193, -0.114802418824965, -0.327295566650033, -0.3693422356873377, -0.44968060926099085, 0.07361918673830203, 0.23771009850518965, -0.1496960222960304, -0.21221815451668746, 0.43123595744645016, -0.23108886334528123, 0.4803542081018186, -0.026563378638172708, -0.1572765640302265, 0.22907080345830977, 0.2597276322282447, 0.3177048344177287, -0.439668073429921, -0.052779087819804005, 0.1170996965485891, -0.10514996532437237, 0.3814168811142018, 0.26780126282373473, -0.2943348490020554, 0.19434498158991076, 0.48411904010183093, 0.3057762984495298, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.41228591038566975, -0.34981970641761606, 0.1274395008022431, -0.00728211962388059, -0.007483535100632821, -0.22100626514078314, 0.03366269558096491, 0.2652796701499689, 0.1940641530915279, -0.004259973013947871, -0.07934844926123219, -0.2999632650176842, 0.4724426590122235, -0.02030119259609009, 0.2711085794287058, -0.3572385478026021, -0.2606958900527516, -0.4316770811702533, -0.06752295976617262, 0.006259113990971343, 0.4882741764914904, 0.1904833928861862, -0.38152574068700673, 0.2237896470331293, -0.35954051017160893, 0.17773461296227566, 0.28766952015633507, 0.18236373147040297, 0.3830795306205417, -0.143632159637189, -0.05360593444192574, 0.22946508987948278, 0.2164034875761871, -0.0952356692211751, 0.22063635836623874, -0.24874871752243877, 0.031028229061952572, 0.3382588909775066, -0.21971830466915065, -0.06018639817481031, 0.09686311738577658, -0.06717542216274452, 0.35829684548359, 0.004340707104834252], "break": [1], "current_seeds_q1": [0, 0]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration9].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration9].json index da67cd314..04b79c6fe 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration9].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration9].json @@ -1 +1 @@ -{"pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "twirled_unitaries_q3": [0.1479067598570225, -0.06995349644153848, -0.08771408961433025, 0.34981970641761606, -0.3725604991977569, -0.4927178803761194, -0.007483535100632821, -0.27899373485921686, -0.4663373044190351, -0.2652796701499689, -0.1940641530915279, 0.004259973013947871, -0.4206515507387678, 0.20003673498231578, 0.4724426590122235, -0.4796988074039099, -0.2711085794287058, 0.3572385478026021, -0.23930410994724838, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.4882741764914904, 0.3095166071138138, -0.38152574068700673, 0.2237896470331293, 0.14045948982839107, -0.17773461296227566, -0.21233047984366493, -0.18236373147040297, 0.3830795306205417, -0.143632159637189, 0.44639406555807426], "pauli_seed_q2": [34470019755655], "pauli_seed_q0": [-13838434709596], "unitaries_q5": [0.4413383368652397, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353, -0.0859309855169279, 0.35029365642154886, -0.21420182853494651, -0.31239971808636113, -0.28485744721260886, -0.44268147867660446, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.331149994774826, 0.42061281807632867, 0.10882401546969689, -0.20691047149288266, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028], "unitaries_q3": [0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.1274395008022431, -0.00728211962388059, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, -0.49574002698605213, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, -0.1427614521973979, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, 0.1904833928861862, -0.11847425931299327, 0.2762103529668707, -0.35954051017160893, 0.32226538703772434, -0.28766952015633507, 0.18236373147040297, 0.11692046937945832, -0.356367840362811, -0.05360593444192574], "twirled_unitaries_q5": [0.4413383368652397, 0.33425268937282837, 0.2636358117380446, 0.34603826044352104, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353, 0.4140690144830721, 0.35029365642154886, 0.2857981714650535, 0.18760028191363887, -0.28485744721260886, 0.057318521323395544, -0.2779890761009902, 0.026324858653790528, -0.13755156757528653, 0.04875864716369449, -0.029349912099974063, -0.3265447505634178, -0.3177235489138397, -0.16885000522517402, -0.42061281807632867, -0.10882401546969689, -0.29308952850711734, 0.17600903158385606, 0.009100451273553745, 0.48333014377647743, 0.36823843839154335, -0.4642748186488568, -0.4296253413034954, 0.3395366446713197], "rc_base_cycle_loop_index": [4], "unitary_angle_offset": [30], "twirled_unitaries_q0": [0.23034835385360353, 0.010108661519272033, 0.2541627734809673, 0.43317668647636864, 0.21094549794112893, 0.33704238573828604, 0.028784568617961526, -0.42572259206511376, -0.07888407435634903, -0.2331221445808893, 0.13331130172538863, -0.3757404073357655, -0.34215653660366385, 0.23888989776727243, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, 0.039234916317450796, 0.12315582717864615, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, 0.31375414547666836, 0.49105233325456865, 0.4179805182185454, -0.2836154606077912, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578], "twirled_unitaries_q4": [0.2705349101205172, -0.2835965124238129, 0.0952356692211751, -0.27936364163376126, 0.25125128247756123, 0.4689717709380474, -0.1617411090224934, 0.21971830466915065, -0.06018639817481031, 0.09686311738577658, -0.4328245778372555, -0.14170315451641002, 0.49565929289516575, 0.38558393453215345, -0.38054151056773833, 0.3706034854176288, -0.03568378013919471, -0.45227955351385773, 0.10900193868114982, -0.46477539180972016, 0.2218792895229953, 0.49150594401294256, 0.018503482111370317, -0.4468761306925302, -0.0822904548108383, 0.1617067159553649, -0.3571480415801709, -0.4115821917662892, 0.3781041938415939, -0.44607081183047725, -0.08867370901765526, -0.37178913337915986, 0.44493207735456863], "pauli_seed_q3": [27946020799016], "pauli_seed_q5": [119343881614275], "pauli_seed_q1": [60576142310008], "current_seeds_q4": [879260322], "current_seeds_q3": [106605609], "break": [1], "current_seeds_q5": [455260778], "unitaries_q2": [-0.32738600345714275, 0.24772931986974456, -0.30339346036759807, 0.114802418824965, -0.172704433349967, -0.3693422356873377, -0.05031939073900915, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.28778184548331254, 0.06876404255354984, 0.2689111366547188, -0.019645791898181386, -0.4734366213618273, 0.1572765640302265, 0.27092919654169023, 0.2597276322282447, 0.18229516558227132, -0.06033192657007902, -0.052779087819804005, 0.3829003034514109, 0.10514996532437237, 0.3814168811142018, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, 0.4168508201115806, 0.31428850254358665, -0.21220376686260067, -0.339972912082672], "unitaries_q4": [-0.22946508987948278, -0.2164034875761871, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, -0.4398136018251897, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, -0.11945848943226167, 0.12939651458237122, -0.03568378013919471, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, -0.49150594401294256, 0.4814965178886297, 0.05312386930746982, -0.0822904548108383, 0.3382932840446351, -0.14285195841982912, 0.4115821917662892, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, -0.055067922645431366], "current_seeds_q0": [1020952384], "unitaries_q0": [0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, 0.3197058603934231, 0.2520273229900738, -0.18624585452333164, -0.008947666745431349, 0.4179805182185454, 0.2163845393922088, -0.31819606673195366, 0.05523301804827341, -0.20735831441055907, 0.24329964768393708, -0.4670840735196755, -0.3433998074271578], "pauli_seed_q4": [-50982158722643], "twirled_unitaries_q1": [-0.4670244868340099, -0.012842477370785588, -0.32926391538136457, -0.44990811567888755, 0.15970901771559554, 0.39341591753839467, 0.2551812027350344, 0.21711220189177283, 0.1774668241783388, -0.1072273616724928, -0.05240187483477854, -0.09988083390955893, -0.21533379611071268, 0.307376580132793, 0.4951949435326988, 0.00910933552858495, 0.4655014605768244, -0.17201116439296982, -0.18967701752599453, 0.07448506389936327, 0.20665942225402745, -0.41127481942283595, 0.07798778071790835, 0.4695275208591738, 0.1293619641527073, -0.33980968285915836, -0.1696033162756727, -0.1614914491827939, -0.3817490270312973, 0.3610912954963368, -0.25790179910868005, -0.49320924723211945, -0.4569557480242459], "unitaries_q1": [-0.4670244868340099, -0.012842477370785588, -0.32926391538136457, 0.050091884321112445, 0.34029098228440446, 0.10658408246160533, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, 0.21533379611071268, 0.307376580132793, -0.4951949435326988, -0.00910933552858495, 0.4655014605768244, 0.17201116439296982, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459], "current_seeds_q1": [231079644], "current_seeds_q2": [131492690], "twirled_unitaries_q2": [-0.32738600345714275, 0.24772931986974456, 0.19660653963240193, 0.114802418824965, -0.327295566650033, 0.3693422356873377, -0.44968060926099085, -0.42638081326169797, -0.26228990149481035, -0.3503039777039696, -0.21221815451668746, 0.43123595744645016, 0.23108886334528123, -0.019645791898181386, 0.4734366213618273, -0.1572765640302265, 0.22907080345830977, 0.2597276322282447, -0.3177048344177287, -0.439668073429921, -0.447220912180196, -0.3829003034514109, 0.10514996532437237, 0.1185831188857982, -0.23219873717626527, 0.20566515099794458, -0.19434498158991076, -0.015880959898169067, -0.3057762984495298, 0.08314917988841941, 0.18571149745641335, -0.2877962331373993, 0.160027087917328]} \ No newline at end of file +{"unitary_angle_offset": [30], "unitaries_q4": [0.2705349101205172, -0.2835965124238129, -0.4047643307788249, -0.27936364163376126, 0.25125128247756123, -0.031028229061952572, -0.1617411090224934, 0.28028169533084935, 0.06018639817481031, -0.09686311738577658, -0.4328245778372555, 0.14170315451641002, 0.004340707104834252, 0.11441606546784655, 0.11945848943226167, 0.3706034854176288, -0.4643162198608053, 0.45227955351385773, -0.10900193868114982, -0.46477539180972016, 0.2781207104770047, 0.008494055987057436, 0.4814965178886297, -0.4468761306925302, -0.0822904548108383, 0.1617067159553649, 0.14285195841982912, 0.08841780823371082, 0.3781041938415939, 0.053929188169522746, 0.41132629098234474, -0.37178913337915986, 0.44493207735456863], "current_seeds_q5": [455260778], "current_seeds_q3": [106605609], "unitaries_q3": [-0.3520932401429775, -0.4300465035584615, -0.41228591038566975, 0.15018029358238394, -0.1274395008022431, -0.4927178803761194, -0.007483535100632821, -0.22100626514078314, 0.4663373044190351, -0.2347203298500311, -0.3059358469084721, 0.004259973013947871, 0.07934844926123219, 0.2999632650176842, 0.027557340987776513, -0.02030119259609009, -0.2711085794287058, -0.3572385478026021, -0.2606958900527516, 0.4316770811702533, 0.06752295976617262, 0.006259113990971343, 0.4882741764914904, 0.1904833928861862, 0.38152574068700673, 0.2762103529668707, 0.14045948982839107, -0.17773461296227566, -0.21233047984366493, 0.31763626852959703, -0.11692046937945832, -0.143632159637189, 0.44639406555807426], "current_seeds_q0": [1020952384], "current_seeds_q1": [231079644], "pauli_seed_q0": [-13838434709596], "current_seeds_q2": [131492690], "rc_base_cycle_loop_index": [4], "unitaries_q1": [0.03297551316599012, -0.4871575226292144, 0.32926391538136457, 0.44990811567888755, 0.34029098228440446, 0.39341591753839467, -0.24481879726496558, 0.21711220189177283, -0.3225331758216612, -0.1072273616724928, -0.05240187483477854, -0.09988083390955893, -0.21533379611071268, 0.307376580132793, -0.0048050564673012275, 0.00910933552858495, 0.4655014605768244, 0.3279888356070302, 0.31032298247400547, 0.42551493610063673, -0.20665942225402745, 0.41127481942283595, 0.07798778071790835, 0.03047247914082618, -0.1293619641527073, -0.33980968285915836, -0.3303966837243273, 0.1614914491827939, -0.11825097296870268, -0.13890870450366322, -0.25790179910868005, -0.49320924723211945, -0.4569557480242459], "pauli_seed_q4": [-50982158722643], "current_seeds_q4": [879260322], "unitaries_q2": [-0.32738600345714275, 0.24772931986974456, 0.19660653963240193, -0.385197581175035, -0.327295566650033, 0.3693422356873377, 0.05031939073900915, -0.07361918673830203, 0.26228990149481035, -0.1496960222960304, -0.28778184548331254, -0.06876404255354984, -0.2689111366547188, -0.4803542081018186, -0.4734366213618273, 0.1572765640302265, 0.22907080345830977, 0.2402723677717553, 0.3177048344177287, -0.06033192657007902, 0.052779087819804005, -0.3829003034514109, 0.3948500346756276, 0.3814168811142018, -0.26780126282373473, 0.20566515099794458, -0.30565501841008924, 0.015880959898169067, -0.1942237015504702, -0.4168508201115806, 0.18571149745641335, -0.2877962331373993, 0.160027087917328], "unitaries_q0": [0.23034835385360353, 0.010108661519272033, 0.2541627734809673, 0.43317668647636864, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, -0.12425959266423448, -0.15784346339633615, 0.23888989776727243, 0.20147486932348357, -0.4731909991248422, -0.15171013965482416, -0.4607650836825492, -0.37684417282135385, 0.028899062065068648, -0.29579165949983377, 0.18029413960657692, 0.2520273229900738, -0.31375414547666836, 0.008947666745431349, 0.08201948178145457, 0.2163845393922088, -0.31819606673195366, 0.4447669819517266, -0.2926416855894409, 0.2567003523160629, -0.03291592648032449, 0.1566001925728422], "pauli_seed_q1": [60576142310008], "unitaries_q5": [-0.05866166313476029, 0.16574731062717163, -0.2636358117380446, 0.15396173955647896, 0.19511749309766913, 0.4145682812563436, -0.4630714074908795, 0.059332429419090005, -0.2944662830567353, -0.4140690144830721, 0.14970634357845114, 0.2857981714650535, 0.18760028191363887, -0.21514255278739114, 0.44268147867660446, 0.2779890761009902, 0.026324858653790528, -0.3624484324247135, 0.4512413528363055, -0.029349912099974063, 0.3265447505634178, 0.3177235489138397, -0.331149994774826, 0.07938718192367133, -0.10882401546969689, -0.29308952850711734, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, -0.36823843839154335, 0.4642748186488568, -0.07037465869650461, -0.16046335532868028], "break": [1], "pauli_seed_q2": [34470019755655], "pauli_seed_q3": [27946020799016], "pauli_seed_q5": [119343881614275], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15]} \ No newline at end of file diff --git a/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr index a9a8e62c5..425949940 100644 --- a/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr +++ b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr @@ -15,8 +15,8 @@ DECLARE pauli_conjugates_map INTEGER[16] DECLARE pauli_seed_q0 INTEGER[1] DECLARE pauli_seed_q1 INTEGER[1] - DECLARE twirled_unitaries_q0 REAL[6] - DECLARE twirled_unitaries_q1 REAL[6] + DECLARE unitaries_q0 REAL[6] + DECLARE unitaries_q1 REAL[6] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] DECLARE current_seeds_q0 INTEGER[1] @@ -25,13 +25,13 @@ DELAY 1 0.0002 CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 MOVE unitary_angle_offset[0] 3 MOVE current_seeds_q0[0] pauli_seed_q0[0] MOVE current_seeds_q1[0] pauli_seed_q1[0] - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map FENCE 0 1 ''' @@ -56,12 +56,12 @@ DECLARE pauli_seed_q3 INTEGER[3] DECLARE pauli_seed_q4 INTEGER[3] DECLARE pauli_seed_q5 INTEGER[3] - DECLARE twirled_unitaries_q0 REAL[153] - DECLARE twirled_unitaries_q1 REAL[153] - DECLARE twirled_unitaries_q2 REAL[153] - DECLARE twirled_unitaries_q3 REAL[153] - DECLARE twirled_unitaries_q4 REAL[153] - DECLARE twirled_unitaries_q5 REAL[153] + DECLARE unitaries_q0 REAL[153] + DECLARE unitaries_q1 REAL[153] + DECLARE unitaries_q2 REAL[153] + DECLARE unitaries_q3 REAL[153] + DECLARE unitaries_q4 REAL[153] + DECLARE unitaries_q5 REAL[153] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] DECLARE rc_seed_index INTEGER[1] @@ -90,12 +90,12 @@ CALL prng_set_seed_and_step pauli_seed_q5[0] pauli_seed_q5[0] CALL prng_set_seed_and_step pauli_seed_q5[1] pauli_seed_q5[1] CALL prng_set_seed_and_step pauli_seed_q5[2] pauli_seed_q5[2] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 MOVE unitary_angle_offset[0] 3 MOVE current_seeds_q0[0] pauli_seed_q0[0] MOVE current_seeds_q1[0] pauli_seed_q1[0] @@ -107,12 +107,12 @@ LABEL @rc_seed_loop MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_seed_loop_inner - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -120,12 +120,12 @@ SHR current_seeds_q3[0] 2 SHR current_seeds_q4[0] 2 SHR current_seeds_q5[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -136,12 +136,12 @@ ADD rc_base_cycle_loop_index[0] 1 GE break[0] rc_base_cycle_loop_index[0] 11 JUMP-UNLESS @rc_seed_loop_inner break[0] - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -162,12 +162,12 @@ LOAD current_seeds_q4[0] pauli_seed_q4 rc_seed_index[0] LOAD current_seeds_q5[0] pauli_seed_q5 rc_seed_index[0] ADD rc_seed_index[0] 1 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 0 current_seeds_q5[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 0 current_seeds_q5[1] 0 ADD unitary_angle_offset[0] 3 GE break[0] rc_seed_index[0] 3 JUMP-UNLESS @rc_seed_loop break[0] @@ -177,12 +177,12 @@ DELAY 3 0.0002 DELAY 4 0.0002 DELAY 5 0.0002 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -190,12 +190,12 @@ SHR current_seeds_q3[0] 2 SHR current_seeds_q4[0] 2 SHR current_seeds_q5[0] 2 - CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 FENCE 0 1 2 3 4 5 ''' @@ -220,12 +220,12 @@ DECLARE pauli_seed_q3 INTEGER[3] DECLARE pauli_seed_q4 INTEGER[3] DECLARE pauli_seed_q5 INTEGER[3] - DECLARE twirled_unitaries_q0 REAL[165] - DECLARE twirled_unitaries_q1 REAL[165] - DECLARE twirled_unitaries_q2 REAL[165] - DECLARE twirled_unitaries_q3 REAL[165] - DECLARE twirled_unitaries_q4 REAL[165] - DECLARE twirled_unitaries_q5 REAL[165] + DECLARE unitaries_q0 REAL[165] + DECLARE unitaries_q1 REAL[165] + DECLARE unitaries_q2 REAL[165] + DECLARE unitaries_q3 REAL[165] + DECLARE unitaries_q4 REAL[165] + DECLARE unitaries_q5 REAL[165] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] DECLARE rc_seed_index INTEGER[1] @@ -254,12 +254,12 @@ CALL prng_set_seed_and_step pauli_seed_q5[0] pauli_seed_q5[0] CALL prng_set_seed_and_step pauli_seed_q5[1] pauli_seed_q5[1] CALL prng_set_seed_and_step pauli_seed_q5[2] pauli_seed_q5[2] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 MOVE unitary_angle_offset[0] 3 MOVE current_seeds_q0[0] pauli_seed_q0[0] MOVE current_seeds_q1[0] pauli_seed_q1[0] @@ -271,12 +271,12 @@ LABEL @rc_seed_loop MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_seed_loop_inner - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -284,12 +284,12 @@ SHR current_seeds_q3[0] 2 SHR current_seeds_q4[0] 2 SHR current_seeds_q5[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -300,12 +300,12 @@ ADD rc_base_cycle_loop_index[0] 1 GE break[0] rc_base_cycle_loop_index[0] 11 JUMP-UNLESS @rc_seed_loop_inner break[0] - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -326,23 +326,23 @@ LOAD current_seeds_q4[0] pauli_seed_q4 rc_seed_index[0] LOAD current_seeds_q5[0] pauli_seed_q5 rc_seed_index[0] ADD rc_seed_index[0] 1 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 0 current_seeds_q5[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 0 current_seeds_q5[1] 0 ADD unitary_angle_offset[0] 3 GE break[0] rc_seed_index[0] 3 JUMP-UNLESS @rc_seed_loop break[0] MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_base_cycle_loop - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -350,12 +350,12 @@ SHR current_seeds_q3[0] 2 SHR current_seeds_q4[0] 2 SHR current_seeds_q5[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -372,12 +372,12 @@ DELAY 3 0.0002 DELAY 4 0.0002 DELAY 5 0.0002 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -385,12 +385,12 @@ SHR current_seeds_q3[0] 2 SHR current_seeds_q4[0] 2 SHR current_seeds_q5[0] 2 - CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 FENCE 0 1 2 3 4 5 ''' @@ -415,12 +415,12 @@ DECLARE pauli_seed_q3 INTEGER[2] DECLARE pauli_seed_q4 INTEGER[2] DECLARE pauli_seed_q5 INTEGER[2] - DECLARE twirled_unitaries_q0 REAL[81] - DECLARE twirled_unitaries_q1 REAL[81] - DECLARE twirled_unitaries_q2 REAL[81] - DECLARE twirled_unitaries_q3 REAL[81] - DECLARE twirled_unitaries_q4 REAL[81] - DECLARE twirled_unitaries_q5 REAL[81] + DECLARE unitaries_q0 REAL[81] + DECLARE unitaries_q1 REAL[81] + DECLARE unitaries_q2 REAL[81] + DECLARE unitaries_q3 REAL[81] + DECLARE unitaries_q4 REAL[81] + DECLARE unitaries_q5 REAL[81] DECLARE modulo_counter INTEGER[1] DECLARE is_mod_zero BIT[1] DECLARE unitary_angle_offset INTEGER[1] @@ -451,12 +451,12 @@ CALL prng_set_seed_and_step pauli_seed_q4[1] pauli_seed_q4[1] CALL prng_set_seed_and_step pauli_seed_q5[0] pauli_seed_q5[0] CALL prng_set_seed_and_step pauli_seed_q5[1] pauli_seed_q5[1] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 MOVE unitary_angle_offset[0] 3 MOVE current_seeds_q0[0] pauli_seed_q0[0] MOVE current_seeds_q1[0] pauli_seed_q1[0] @@ -468,12 +468,12 @@ LABEL @rc_seed_loop MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_seed_loop_inner - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -481,12 +481,12 @@ SHR current_seeds_q3[0] 2 SHR current_seeds_q4[0] 2 SHR current_seeds_q5[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -497,12 +497,12 @@ ADD rc_base_cycle_loop_index[0] 1 GE break[0] rc_base_cycle_loop_index[0] 11 JUMP-UNLESS @rc_seed_loop_inner break[0] - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -523,12 +523,12 @@ LOAD current_seeds_q4[0] pauli_seed_q4 rc_seed_index[0] LOAD current_seeds_q5[0] pauli_seed_q5 rc_seed_index[0] ADD rc_seed_index[0] 1 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 0 current_seeds_q5[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 0 current_seeds_q5[1] 0 ADD unitary_angle_offset[0] 3 GE break[0] rc_seed_index[0] 2 JUMP-UNLESS @rc_seed_loop break[0] @@ -538,12 +538,12 @@ DELAY 3 0.0002 DELAY 4 0.0002 DELAY 5 0.0002 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -551,12 +551,12 @@ SHR current_seeds_q3[0] 2 SHR current_seeds_q4[0] 2 SHR current_seeds_q5[0] 2 - CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 LABEL @pulse_program DELAY 0 0.0002 DELAY 1 0.0002 @@ -587,12 +587,12 @@ DECLARE pauli_seed_q3 INTEGER[2] DECLARE pauli_seed_q4 INTEGER[2] DECLARE pauli_seed_q5 INTEGER[2] - DECLARE twirled_unitaries_q0 REAL[81] - DECLARE twirled_unitaries_q1 REAL[81] - DECLARE twirled_unitaries_q2 REAL[81] - DECLARE twirled_unitaries_q3 REAL[81] - DECLARE twirled_unitaries_q4 REAL[81] - DECLARE twirled_unitaries_q5 REAL[81] + DECLARE unitaries_q0 REAL[81] + DECLARE unitaries_q1 REAL[81] + DECLARE unitaries_q2 REAL[81] + DECLARE unitaries_q3 REAL[81] + DECLARE unitaries_q4 REAL[81] + DECLARE unitaries_q5 REAL[81] DECLARE readout_seed_q0 INTEGER[1] DECLARE readout_source_unitaries_q0 REAL[36] DECLARE readout_randomization_q0 REAL[3] @@ -633,12 +633,12 @@ CALL prng_set_seed_and_step pauli_seed_q4[1] pauli_seed_q4[1] CALL prng_set_seed_and_step pauli_seed_q5[0] pauli_seed_q5[0] CALL prng_set_seed_and_step pauli_seed_q5[1] pauli_seed_q5[1] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 MOVE unitary_angle_offset[0] 3 MOVE current_seeds_q0[0] pauli_seed_q0[0] MOVE current_seeds_q1[0] pauli_seed_q1[0] @@ -650,12 +650,12 @@ LABEL @rc_seed_loop MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_seed_loop_inner - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -663,12 +663,12 @@ SHR current_seeds_q3[0] 2 SHR current_seeds_q4[0] 2 SHR current_seeds_q5[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -679,12 +679,12 @@ ADD rc_base_cycle_loop_index[0] 1 GE break[0] rc_base_cycle_loop_index[0] 11 JUMP-UNLESS @rc_seed_loop_inner break[0] - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -705,12 +705,12 @@ LOAD current_seeds_q4[0] pauli_seed_q4 rc_seed_index[0] LOAD current_seeds_q5[0] pauli_seed_q5 rc_seed_index[0] ADD rc_seed_index[0] 1 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 0 current_seeds_q5[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 0 current_seeds_q5[1] 0 ADD unitary_angle_offset[0] 3 GE break[0] rc_seed_index[0] 2 JUMP-UNLESS @rc_seed_loop break[0] @@ -720,12 +720,12 @@ DELAY 3 0.0002 DELAY 4 0.0002 DELAY 5 0.0002 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -734,35 +734,35 @@ SHR current_seeds_q4[0] 2 SHR current_seeds_q5[0] 2 CALL choose_random_real_sub_regions readout_randomization_q0 readout_source_unitaries_q0 3 readout_seed_q0[0] - MOVE twirled_unitaries_q0[78] readout_randomization_q0[0] - MOVE twirled_unitaries_q0[79] readout_randomization_q0[1] - MOVE twirled_unitaries_q0[80] readout_randomization_q0[2] - CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q0 twirled_unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 + MOVE unitaries_q0[78] readout_randomization_q0[0] + MOVE unitaries_q0[79] readout_randomization_q0[1] + MOVE unitaries_q0[80] readout_randomization_q0[2] + CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 CALL choose_random_real_sub_regions readout_randomization_q1 readout_source_unitaries_q1 3 readout_seed_q1[0] - MOVE twirled_unitaries_q1[78] readout_randomization_q1[0] - MOVE twirled_unitaries_q1[79] readout_randomization_q1[1] - MOVE twirled_unitaries_q1[80] readout_randomization_q1[2] - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 twirled_unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + MOVE unitaries_q1[78] readout_randomization_q1[0] + MOVE unitaries_q1[79] readout_randomization_q1[1] + MOVE unitaries_q1[80] readout_randomization_q1[2] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map CALL choose_random_real_sub_regions readout_randomization_q2 readout_source_unitaries_q2 3 readout_seed_q2[0] - MOVE twirled_unitaries_q2[78] readout_randomization_q2[0] - MOVE twirled_unitaries_q2[79] readout_randomization_q2[1] - MOVE twirled_unitaries_q2[80] readout_randomization_q2[2] - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q2 twirled_unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + MOVE unitaries_q2[78] readout_randomization_q2[0] + MOVE unitaries_q2[79] readout_randomization_q2[1] + MOVE unitaries_q2[80] readout_randomization_q2[2] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map CALL choose_random_real_sub_regions readout_randomization_q3 readout_source_unitaries_q3 3 readout_seed_q3[0] - MOVE twirled_unitaries_q3[78] readout_randomization_q3[0] - MOVE twirled_unitaries_q3[79] readout_randomization_q3[1] - MOVE twirled_unitaries_q3[80] readout_randomization_q3[2] - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q3 twirled_unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + MOVE unitaries_q3[78] readout_randomization_q3[0] + MOVE unitaries_q3[79] readout_randomization_q3[1] + MOVE unitaries_q3[80] readout_randomization_q3[2] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map CALL choose_random_real_sub_regions readout_randomization_q4 readout_source_unitaries_q4 3 readout_seed_q4[0] - MOVE twirled_unitaries_q4[78] readout_randomization_q4[0] - MOVE twirled_unitaries_q4[79] readout_randomization_q4[1] - MOVE twirled_unitaries_q4[80] readout_randomization_q4[2] - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q4 twirled_unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + MOVE unitaries_q4[78] readout_randomization_q4[0] + MOVE unitaries_q4[79] readout_randomization_q4[1] + MOVE unitaries_q4[80] readout_randomization_q4[2] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map CALL choose_random_real_sub_regions readout_randomization_q5 readout_source_unitaries_q5 3 readout_seed_q5[0] - MOVE twirled_unitaries_q5[78] readout_randomization_q5[0] - MOVE twirled_unitaries_q5[79] readout_randomization_q5[1] - MOVE twirled_unitaries_q5[80] readout_randomization_q5[2] - CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q5 twirled_unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 + MOVE unitaries_q5[78] readout_randomization_q5[0] + MOVE unitaries_q5[79] readout_randomization_q5[1] + MOVE unitaries_q5[80] readout_randomization_q5[2] + CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 FENCE 0 1 2 3 4 5 ''' @@ -787,12 +787,12 @@ DECLARE pauli_seed_q3 INTEGER[2] DECLARE pauli_seed_q4 INTEGER[2] DECLARE pauli_seed_q5 INTEGER[2] - DECLARE twirled_unitaries_q0 REAL[81] - DECLARE twirled_unitaries_q1 REAL[81] - DECLARE twirled_unitaries_q2 REAL[81] - DECLARE twirled_unitaries_q3 REAL[81] - DECLARE twirled_unitaries_q4 REAL[81] - DECLARE twirled_unitaries_q5 REAL[81] + DECLARE unitaries_q0 REAL[81] + DECLARE unitaries_q1 REAL[81] + DECLARE unitaries_q2 REAL[81] + DECLARE unitaries_q3 REAL[81] + DECLARE unitaries_q4 REAL[81] + DECLARE unitaries_q5 REAL[81] DECLARE modulo_counter INTEGER[1] DECLARE is_mod_zero BIT[1] DECLARE readout_seed_q0 INTEGER[1] @@ -841,12 +841,12 @@ CALL prng_set_seed_and_step pauli_seed_q4[1] pauli_seed_q4[1] CALL prng_set_seed_and_step pauli_seed_q5[0] pauli_seed_q5[0] CALL prng_set_seed_and_step pauli_seed_q5[1] pauli_seed_q5[1] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 MOVE unitary_angle_offset[0] 3 MOVE current_seeds_q0[0] pauli_seed_q0[0] MOVE current_seeds_q1[0] pauli_seed_q1[0] @@ -858,12 +858,12 @@ LABEL @rc_seed_loop MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_seed_loop_inner - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -871,12 +871,12 @@ SHR current_seeds_q3[0] 2 SHR current_seeds_q4[0] 2 SHR current_seeds_q5[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -887,12 +887,12 @@ ADD rc_base_cycle_loop_index[0] 1 GE break[0] rc_base_cycle_loop_index[0] 11 JUMP-UNLESS @rc_seed_loop_inner break[0] - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -913,12 +913,12 @@ LOAD current_seeds_q4[0] pauli_seed_q4 rc_seed_index[0] LOAD current_seeds_q5[0] pauli_seed_q5 rc_seed_index[0] ADD rc_seed_index[0] 1 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 0 current_seeds_q5[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q1[1] 0 current_seeds_q2[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 0 current_seeds_q3[1] 0 current_seeds_q4[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 0 current_seeds_q5[1] 0 ADD unitary_angle_offset[0] 3 GE break[0] rc_seed_index[0] 2 JUMP-UNLESS @rc_seed_loop break[0] @@ -928,12 +928,12 @@ DELAY 3 0.0002 DELAY 4 0.0002 DELAY 5 0.0002 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -942,35 +942,35 @@ SHR current_seeds_q4[0] 2 SHR current_seeds_q5[0] 2 CALL choose_random_real_sub_regions readout_randomization_q0 readout_source_unitaries_q0 3 readout_seed_q0[0] - MOVE twirled_unitaries_q0[78] readout_randomization_q0[0] - MOVE twirled_unitaries_q0[79] readout_randomization_q0[1] - MOVE twirled_unitaries_q0[80] readout_randomization_q0[2] - CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q0 twirled_unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 + MOVE unitaries_q0[78] readout_randomization_q0[0] + MOVE unitaries_q0[79] readout_randomization_q0[1] + MOVE unitaries_q0[80] readout_randomization_q0[2] + CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 CALL choose_random_real_sub_regions readout_randomization_q1 readout_source_unitaries_q1 3 readout_seed_q1[0] - MOVE twirled_unitaries_q1[78] readout_randomization_q1[0] - MOVE twirled_unitaries_q1[79] readout_randomization_q1[1] - MOVE twirled_unitaries_q1[80] readout_randomization_q1[2] - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 twirled_unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + MOVE unitaries_q1[78] readout_randomization_q1[0] + MOVE unitaries_q1[79] readout_randomization_q1[1] + MOVE unitaries_q1[80] readout_randomization_q1[2] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map CALL choose_random_real_sub_regions readout_randomization_q2 readout_source_unitaries_q2 3 readout_seed_q2[0] - MOVE twirled_unitaries_q2[78] readout_randomization_q2[0] - MOVE twirled_unitaries_q2[79] readout_randomization_q2[1] - MOVE twirled_unitaries_q2[80] readout_randomization_q2[2] - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q2 twirled_unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + MOVE unitaries_q2[78] readout_randomization_q2[0] + MOVE unitaries_q2[79] readout_randomization_q2[1] + MOVE unitaries_q2[80] readout_randomization_q2[2] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map CALL choose_random_real_sub_regions readout_randomization_q3 readout_source_unitaries_q3 3 readout_seed_q3[0] - MOVE twirled_unitaries_q3[78] readout_randomization_q3[0] - MOVE twirled_unitaries_q3[79] readout_randomization_q3[1] - MOVE twirled_unitaries_q3[80] readout_randomization_q3[2] - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q3 twirled_unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + MOVE unitaries_q3[78] readout_randomization_q3[0] + MOVE unitaries_q3[79] readout_randomization_q3[1] + MOVE unitaries_q3[80] readout_randomization_q3[2] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map CALL choose_random_real_sub_regions readout_randomization_q4 readout_source_unitaries_q4 3 readout_seed_q4[0] - MOVE twirled_unitaries_q4[78] readout_randomization_q4[0] - MOVE twirled_unitaries_q4[79] readout_randomization_q4[1] - MOVE twirled_unitaries_q4[80] readout_randomization_q4[2] - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q4 twirled_unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + MOVE unitaries_q4[78] readout_randomization_q4[0] + MOVE unitaries_q4[79] readout_randomization_q4[1] + MOVE unitaries_q4[80] readout_randomization_q4[2] + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map CALL choose_random_real_sub_regions readout_randomization_q5 readout_source_unitaries_q5 3 readout_seed_q5[0] - MOVE twirled_unitaries_q5[78] readout_randomization_q5[0] - MOVE twirled_unitaries_q5[79] readout_randomization_q5[1] - MOVE twirled_unitaries_q5[80] readout_randomization_q5[2] - CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q5 twirled_unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 + MOVE unitaries_q5[78] readout_randomization_q5[0] + MOVE unitaries_q5[79] readout_randomization_q5[1] + MOVE unitaries_q5[80] readout_randomization_q5[2] + CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 LABEL @pulse_program DELAY 0 0.0002 DELAY 1 0.0002 @@ -998,9 +998,9 @@ DECLARE pauli_seed_q0 INTEGER[2] DECLARE pauli_seed_q1 INTEGER[2] DECLARE pauli_seed_q2 INTEGER[2] - DECLARE twirled_unitaries_q0 REAL[120] - DECLARE twirled_unitaries_q1 REAL[120] - DECLARE twirled_unitaries_q2 REAL[120] + DECLARE unitaries_q0 REAL[120] + DECLARE unitaries_q1 REAL[120] + DECLARE unitaries_q2 REAL[120] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] DECLARE rc_seed_index INTEGER[1] @@ -1014,9 +1014,9 @@ CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] CALL prng_set_seed_and_step pauli_seed_q2[0] pauli_seed_q2[0] CALL prng_set_seed_and_step pauli_seed_q2[1] pauli_seed_q2[1] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 MOVE unitary_angle_offset[0] 3 MOVE current_seeds_q0[0] pauli_seed_q0[0] MOVE current_seeds_q1[0] pauli_seed_q1[0] @@ -1025,23 +1025,23 @@ LABEL @rc_seed_loop MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_seed_loop_inner - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 SHR current_seeds_q2[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 SHR current_seeds_q2[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 0 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -1049,16 +1049,16 @@ ADD rc_base_cycle_loop_index[0] 1 GE break[0] rc_base_cycle_loop_index[0] 7 JUMP-UNLESS @rc_seed_loop_inner break[0] - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 SHR current_seeds_q2[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -1070,31 +1070,31 @@ LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] LOAD current_seeds_q2[0] pauli_seed_q2 rc_seed_index[0] ADD rc_seed_index[0] 1 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q2[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 0 current_seeds_q2[1] 0 ADD unitary_angle_offset[0] 3 GE break[0] rc_seed_index[0] 2 JUMP-UNLESS @rc_seed_loop break[0] MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_base_cycle_loop - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 SHR current_seeds_q2[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 SHR current_seeds_q2[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 0 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -1105,27 +1105,27 @@ DELAY 0 0.0002 DELAY 1 0.0002 DELAY 2 0.0002 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 SHR current_seeds_q2[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 SHR current_seeds_q2[0] 2 - CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q2[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q2[0] 0 FENCE 0 1 2 ''' # --- -# name: test_randomized_compiling_configuration[configuration1][quil] +# name: test_randomized_compiling_configuration[configuration16][quil] ''' PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" @@ -1141,24 +1141,138 @@ DECLARE pauli_conjugates_map INTEGER[16] DECLARE pauli_seed_q0 INTEGER[1] DECLARE pauli_seed_q1 INTEGER[1] - DECLARE twirled_unitaries_q0 REAL[9] - DECLARE twirled_unitaries_q1 REAL[9] + DECLARE pauli_seed_q2 INTEGER[1] + DECLARE pauli_seed_q3 INTEGER[1] + DECLARE pauli_seed_q4 INTEGER[1] + DECLARE pauli_seed_q5 INTEGER[1] + DECLARE twirled_unitaries_q0 REAL[33] + DECLARE twirled_unitaries_q1 REAL[33] + DECLARE twirled_unitaries_q2 REAL[33] + DECLARE twirled_unitaries_q3 REAL[33] + DECLARE twirled_unitaries_q4 REAL[33] + DECLARE twirled_unitaries_q5 REAL[33] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] DECLARE rc_base_cycle_loop_index INTEGER[1] DECLARE current_seeds_q0 INTEGER[1] DECLARE current_seeds_q1 INTEGER[1] + DECLARE current_seeds_q2 INTEGER[1] + DECLARE current_seeds_q3 INTEGER[1] + DECLARE current_seeds_q4 INTEGER[1] + DECLARE current_seeds_q5 INTEGER[1] CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL prng_set_seed_and_step pauli_seed_q2[0] pauli_seed_q2[0] + CALL prng_set_seed_and_step pauli_seed_q3[0] pauli_seed_q3[0] + CALL prng_set_seed_and_step pauli_seed_q4[0] pauli_seed_q4[0] + CALL prng_set_seed_and_step pauli_seed_q5[0] pauli_seed_q5[0] CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 MOVE unitary_angle_offset[0] 3 MOVE current_seeds_q0[0] pauli_seed_q0[0] MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE current_seeds_q2[0] pauli_seed_q2[0] + MOVE current_seeds_q3[0] pauli_seed_q3[0] + MOVE current_seeds_q4[0] pauli_seed_q4[0] + MOVE current_seeds_q5[0] pauli_seed_q5[0] MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_base_cycle_loop CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + ADD rc_base_cycle_loop_index[0] 1 + GE break[0] rc_base_cycle_loop_index[0] 4 + JUMP-UNLESS @rc_base_cycle_loop break[0] + DELAY 0 0.0002 + DELAY 1 0.0002 + DELAY 2 0.0002 + DELAY 3 0.0002 + DELAY 4 0.0002 + DELAY 5 0.0002 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + ADD unitary_angle_offset[0] 3 + SHR current_seeds_q0[0] 2 + SHR current_seeds_q1[0] 2 + SHR current_seeds_q2[0] 2 + SHR current_seeds_q3[0] 2 + SHR current_seeds_q4[0] 2 + SHR current_seeds_q5[0] 2 + CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 + FENCE 0 1 2 3 4 5 + + ''' +# --- +# name: test_randomized_compiling_configuration[configuration1][quil] + ''' + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_conjugate "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis_left : INTEGER, previous_pauli_left_index : INTEGER, previous_paulis_right : INTEGER, previous_pauli_right_index : INTEGER, is_pauli_left : BIT, pauli_conjugates_map : INTEGER[16])" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_literal "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, conjugate_pauli : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_literal_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_pauli : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN merge_zxzxz_unitary_with_paulis_reference_reference "(destination : mut REAL[], unitary_angles : REAL[], angle_offset : INTEGER, next_paulis : INTEGER, next_pauli_index : INTEGER, previous_paulis : INTEGER, previous_pauli_index : INTEGER)" + PRAGMA EXTERN prng_set_seed_and_step "INTEGER (seed : INTEGER)" + PRAGMA EXTERN prng_step "INTEGER" + PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" + PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" + PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE pauli_conjugates_map INTEGER[16] + DECLARE pauli_seed_q0 INTEGER[1] + DECLARE pauli_seed_q1 INTEGER[1] + DECLARE unitaries_q0 REAL[9] + DECLARE unitaries_q1 REAL[9] + DECLARE unitary_angle_offset INTEGER[1] + DECLARE break BIT[1] + DECLARE rc_base_cycle_loop_index INTEGER[1] + DECLARE current_seeds_q0 INTEGER[1] + DECLARE current_seeds_q1 INTEGER[1] + CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] + CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + MOVE unitary_angle_offset[0] 3 + MOVE current_seeds_q0[0] pauli_seed_q0[0] + MOVE current_seeds_q1[0] pauli_seed_q1[0] + MOVE rc_base_cycle_loop_index[0] 0 + LABEL @rc_base_cycle_loop + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -1167,8 +1281,8 @@ JUMP-UNLESS @rc_base_cycle_loop break[0] DELAY 0 0.0002 DELAY 1 0.0002 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map FENCE 0 1 ''' @@ -1189,8 +1303,8 @@ DECLARE pauli_conjugates_map INTEGER[16] DECLARE pauli_seed_q0 INTEGER[1] DECLARE pauli_seed_q1 INTEGER[1] - DECLARE twirled_unitaries_q0 REAL[75] - DECLARE twirled_unitaries_q1 REAL[75] + DECLARE unitaries_q0 REAL[75] + DECLARE unitaries_q1 REAL[75] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] DECLARE rc_base_cycle_loop_index INTEGER[1] @@ -1198,15 +1312,15 @@ DECLARE current_seeds_q1 INTEGER[1] CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 MOVE unitary_angle_offset[0] 3 MOVE current_seeds_q0[0] pauli_seed_q0[0] MOVE current_seeds_q1[0] pauli_seed_q1[0] MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_base_cycle_loop - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -1215,8 +1329,8 @@ JUMP-UNLESS @rc_base_cycle_loop break[0] DELAY 0 0.0002 DELAY 1 0.0002 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map FENCE 0 1 ''' @@ -1237,8 +1351,8 @@ DECLARE pauli_conjugates_map INTEGER[16] DECLARE pauli_seed_q0 INTEGER[2] DECLARE pauli_seed_q1 INTEGER[2] - DECLARE twirled_unitaries_q0 REAL[78] - DECLARE twirled_unitaries_q1 REAL[78] + DECLARE unitaries_q0 REAL[78] + DECLARE unitaries_q1 REAL[78] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] DECLARE rc_seed_index INTEGER[1] @@ -1249,8 +1363,8 @@ CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 MOVE unitary_angle_offset[0] 3 MOVE current_seeds_q0[0] pauli_seed_q0[0] MOVE current_seeds_q1[0] pauli_seed_q1[0] @@ -1258,8 +1372,8 @@ LABEL @rc_seed_loop MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_seed_loop_inner - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -1271,15 +1385,15 @@ LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] ADD rc_seed_index[0] 1 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 GE break[0] rc_seed_index[0] 2 JUMP-UNLESS @rc_seed_loop break[0] DELAY 0 0.0002 DELAY 1 0.0002 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map FENCE 0 1 ''' @@ -1300,8 +1414,8 @@ DECLARE pauli_conjugates_map INTEGER[16] DECLARE pauli_seed_q0 INTEGER[1] DECLARE pauli_seed_q1 INTEGER[1] - DECLARE twirled_unitaries_q0 REAL[75] - DECLARE twirled_unitaries_q1 REAL[75] + DECLARE unitaries_q0 REAL[75] + DECLARE unitaries_q1 REAL[75] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] DECLARE rc_base_cycle_loop_index INTEGER[1] @@ -1309,20 +1423,20 @@ DECLARE current_seeds_q1 INTEGER[1] CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 MOVE unitary_angle_offset[0] 3 MOVE current_seeds_q0[0] pauli_seed_q0[0] MOVE current_seeds_q1[0] pauli_seed_q1[0] MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_base_cycle_loop - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -1331,13 +1445,13 @@ JUMP-UNLESS @rc_base_cycle_loop break[0] DELAY 0 0.0002 DELAY 1 0.0002 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map FENCE 0 1 ''' @@ -1358,8 +1472,8 @@ DECLARE pauli_conjugates_map INTEGER[16] DECLARE pauli_seed_q0 INTEGER[2] DECLARE pauli_seed_q1 INTEGER[2] - DECLARE twirled_unitaries_q0 REAL[87] - DECLARE twirled_unitaries_q1 REAL[87] + DECLARE unitaries_q0 REAL[87] + DECLARE unitaries_q1 REAL[87] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] DECLARE rc_seed_index INTEGER[1] @@ -1370,8 +1484,8 @@ CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 MOVE unitary_angle_offset[0] 3 MOVE current_seeds_q0[0] pauli_seed_q0[0] MOVE current_seeds_q1[0] pauli_seed_q1[0] @@ -1379,21 +1493,21 @@ LABEL @rc_seed_loop MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_seed_loop_inner - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 ADD rc_base_cycle_loop_index[0] 1 GE break[0] rc_base_cycle_loop_index[0] 11 JUMP-UNLESS @rc_seed_loop_inner break[0] - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -1402,20 +1516,20 @@ LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] ADD rc_seed_index[0] 1 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 GE break[0] rc_seed_index[0] 2 JUMP-UNLESS @rc_seed_loop break[0] MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_base_cycle_loop - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -1424,13 +1538,13 @@ JUMP-UNLESS @rc_base_cycle_loop break[0] DELAY 0 0.0002 DELAY 1 0.0002 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map FENCE 0 1 ''' @@ -1451,8 +1565,8 @@ DECLARE pauli_conjugates_map INTEGER[16] DECLARE pauli_seed_q0 INTEGER[1] DECLARE pauli_seed_q1 INTEGER[1] - DECLARE twirled_unitaries_q0 REAL[63] - DECLARE twirled_unitaries_q1 REAL[63] + DECLARE unitaries_q0 REAL[63] + DECLARE unitaries_q1 REAL[63] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] DECLARE rc_base_cycle_loop_index INTEGER[1] @@ -1460,30 +1574,30 @@ DECLARE current_seeds_q1 INTEGER[1] CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 MOVE unitary_angle_offset[0] 3 MOVE current_seeds_q0[0] pauli_seed_q0[0] MOVE current_seeds_q1[0] pauli_seed_q1[0] MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_base_cycle_loop - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -1492,23 +1606,23 @@ JUMP-UNLESS @rc_base_cycle_loop break[0] DELAY 0 0.0002 DELAY 1 0.0002 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map FENCE 0 1 ''' @@ -1529,8 +1643,8 @@ DECLARE pauli_conjugates_map INTEGER[16] DECLARE pauli_seed_q0 INTEGER[2] DECLARE pauli_seed_q1 INTEGER[2] - DECLARE twirled_unitaries_q0 REAL[87] - DECLARE twirled_unitaries_q1 REAL[87] + DECLARE unitaries_q0 REAL[87] + DECLARE unitaries_q1 REAL[87] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] DECLARE rc_seed_index INTEGER[1] @@ -1541,8 +1655,8 @@ CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 MOVE unitary_angle_offset[0] 3 MOVE current_seeds_q0[0] pauli_seed_q0[0] MOVE current_seeds_q1[0] pauli_seed_q1[0] @@ -1550,41 +1664,41 @@ LABEL @rc_seed_loop MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_seed_loop_inner - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 ADD rc_base_cycle_loop_index[0] 1 GE break[0] rc_base_cycle_loop_index[0] 5 JUMP-UNLESS @rc_seed_loop_inner break[0] - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -1593,30 +1707,30 @@ LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] ADD rc_seed_index[0] 1 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 GE break[0] rc_seed_index[0] 2 JUMP-UNLESS @rc_seed_loop break[0] DELAY 0 0.0002 DELAY 1 0.0002 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map FENCE 0 1 ''' @@ -1637,8 +1751,8 @@ DECLARE pauli_conjugates_map INTEGER[16] DECLARE pauli_seed_q0 INTEGER[2] DECLARE pauli_seed_q1 INTEGER[2] - DECLARE twirled_unitaries_q0 REAL[147] - DECLARE twirled_unitaries_q1 REAL[147] + DECLARE unitaries_q0 REAL[147] + DECLARE unitaries_q1 REAL[147] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] DECLARE rc_seed_index INTEGER[1] @@ -1649,126 +1763,126 @@ CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] CALL prng_set_seed_and_step pauli_seed_q1[1] pauli_seed_q1[1] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 MOVE unitary_angle_offset[0] 3 MOVE current_seeds_q0[0] pauli_seed_q0[0] MOVE current_seeds_q1[0] pauli_seed_q1[0] MOVE rc_seed_index[0] 1 MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_base_cycle_loop - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -1777,133 +1891,133 @@ LOAD current_seeds_q0[0] pauli_seed_q0 rc_seed_index[0] LOAD current_seeds_q1[0] pauli_seed_q1 rc_seed_index[0] ADD rc_seed_index[0] 1 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 ADD rc_base_cycle_loop_index[0] 1 GE break[0] rc_base_cycle_loop_index[0] 1 JUMP-UNLESS @rc_base_cycle_loop break[0] DELAY 0 0.0002 DELAY 1 0.0002 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 MOVE current_seeds_q0[1] current_seeds_q0[0] MOVE current_seeds_q1[1] current_seeds_q1[0] - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q0[1] 0 current_seeds_q1[1] 0 0 pauli_conjugates_map FENCE 0 1 ''' @@ -1928,12 +2042,12 @@ DECLARE pauli_seed_q3 INTEGER[1] DECLARE pauli_seed_q4 INTEGER[1] DECLARE pauli_seed_q5 INTEGER[1] - DECLARE twirled_unitaries_q0 REAL[33] - DECLARE twirled_unitaries_q1 REAL[33] - DECLARE twirled_unitaries_q2 REAL[33] - DECLARE twirled_unitaries_q3 REAL[33] - DECLARE twirled_unitaries_q4 REAL[33] - DECLARE twirled_unitaries_q5 REAL[33] + DECLARE unitaries_q0 REAL[33] + DECLARE unitaries_q1 REAL[33] + DECLARE unitaries_q2 REAL[33] + DECLARE unitaries_q3 REAL[33] + DECLARE unitaries_q4 REAL[33] + DECLARE unitaries_q5 REAL[33] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] DECLARE rc_base_cycle_loop_index INTEGER[1] @@ -1949,12 +2063,12 @@ CALL prng_set_seed_and_step pauli_seed_q3[0] pauli_seed_q3[0] CALL prng_set_seed_and_step pauli_seed_q4[0] pauli_seed_q4[0] CALL prng_set_seed_and_step pauli_seed_q5[0] pauli_seed_q5[0] - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 - CALL merge_zxzxz_unitary_with_paulis_reference_literal twirled_unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q0 unitaries_q0 0 pauli_seed_q0[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q1 unitaries_q1 0 pauli_seed_q1[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q2 unitaries_q2 0 pauli_seed_q2[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q3 unitaries_q3 0 pauli_seed_q3[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q4 unitaries_q4 0 pauli_seed_q4[0] 0 0 + CALL merge_zxzxz_unitary_with_paulis_reference_literal unitaries_q5 unitaries_q5 0 pauli_seed_q5[0] 0 0 MOVE unitary_angle_offset[0] 3 MOVE current_seeds_q0[0] pauli_seed_q0[0] MOVE current_seeds_q1[0] pauli_seed_q1[0] @@ -1964,12 +2078,12 @@ MOVE current_seeds_q5[0] pauli_seed_q5[0] MOVE rc_base_cycle_loop_index[0] 0 LABEL @rc_base_cycle_loop - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -1977,12 +2091,12 @@ SHR current_seeds_q3[0] 2 SHR current_seeds_q4[0] 2 SHR current_seeds_q5[0] 2 - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q5[0] 0 ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -1999,12 +2113,12 @@ DELAY 3 0.0002 DELAY 4 0.0002 DELAY 5 0.0002 - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_reference_conjugate twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q0 unitaries_q0 unitary_angle_offset[0] current_seeds_q0[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] current_seeds_q1[0] 1 current_seeds_q0[0] 0 current_seeds_q1[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] current_seeds_q2[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] current_seeds_q3[0] 1 current_seeds_q2[0] 0 current_seeds_q3[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] current_seeds_q4[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_reference_conjugate unitaries_q5 unitaries_q5 unitary_angle_offset[0] current_seeds_q5[0] 1 current_seeds_q4[0] 0 current_seeds_q5[0] 0 0 pauli_conjugates_map ADD unitary_angle_offset[0] 3 SHR current_seeds_q0[0] 2 SHR current_seeds_q1[0] 2 @@ -2012,12 +2126,12 @@ SHR current_seeds_q3[0] 2 SHR current_seeds_q4[0] 2 SHR current_seeds_q5[0] 2 - CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate twirled_unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_reference twirled_unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 FENCE 0 1 2 3 4 5 ''' diff --git a/test/unit/test_qpu_randomized_compiling.py b/test/unit/test_qpu_randomized_compiling.py index e60d900b8..8e3d03e58 100644 --- a/test/unit/test_qpu_randomized_compiling.py +++ b/test/unit/test_qpu_randomized_compiling.py @@ -10,7 +10,7 @@ from dataclasses import dataclass from itertools import product from pathlib import Path -from typing import Optional +from typing import cast, Optional import numpy as np import pytest @@ -80,20 +80,27 @@ def test_pauli_literal_multiplication(): ), f"Failed for {pauli_left} * {pauli_right}" -def _get_expected_pauli_pair( - seeds: list[int], layer_index: int, layer_count: int, sequence_index: int, paulis_per_value: int +def _get_expected_random_pauli( + seeds: list[int], layer_index: int, layer_count: int, sequence_index: int, paulis_per_value: int, accumulate: bool ) -> tuple[Optional[int], rc.PauliLiteral]: if layer_index == layer_count - 1: return None, rc.PauliLiteral.I seed_index = layer_index // paulis_per_value pauli_index = layer_index % paulis_per_value seed = seeds[seed_index] - values = [] - for _ in range(sequence_index + 1): - seed = rc._lfsr_v1_next(seed) - values.append(seed) - pauli_value = (seed >> (2 * pauli_index)) & 0b11 - return seed, rc.PauliLiteral(pauli_value) + if accumulate: + accumulated_pauli_value = None + for value in rc._generate_lfsr_v1_sequence(seed, 1, sequence_index + 1): + pauli_value = rc.PauliLiteral((value >> (2 * pauli_index)) & 0b11) + if accumulated_pauli_value is None: + accumulated_pauli_value = pauli_value + else: + _, accumulated_pauli_value = accumulated_pauli_value * pauli_value + seed = value + return seed, cast(rc.PauliLiteral, accumulated_pauli_value) + else: + seed = rc._generate_lfsr_v1_sequence(seed, sequence_index + 1, 1)[0] + return seed, rc.PauliLiteral((seed >> (2 * pauli_index)) & 0b11) _SIMPLE_TEST_CYCLE = ((0, 1),) _ALTERNATING_BASE_CYCLES = (((0, 1), (2, 3), (4, 5)), (0, (1, 2), (3, 4), 5)) @@ -123,9 +130,16 @@ def _get_expected_pauli_pair( base_cycles=_NON_TWIRLED_QUBITS, base_cycle_repetitions=13, ), + # Custom twirled unitaries variable. + rc.RandomizedCompilingConfiguration( + base_cycles=_ALTERNATING_BASE_CYCLES, + base_cycle_repetitions=13, + variables=rc.RandomizedCompilingVariables( + twirled_unitaries_prefix="twirled_unitaries" + ) + ), ] - @pytest.mark.parametrize("configuration", _PAULI_FRAME_TRACKING_TEST_CASES) def test_pauli_frame_tracking(configuration: rc.RandomizedCompilingConfiguration): """Test that `rc.RandomizedCompilingConfiguration.track_pauli_frames` produces the expected tracked Paulis for a given configuration and random seed. @@ -161,8 +175,8 @@ def test_pauli_frame_tracking(configuration: rc.RandomizedCompilingConfiguration if base_cycle is None or qubit not in base_cycle: expected_next_pauli = rc.PauliLiteral.I else: - expected_seed, expected_next_pauli = _get_expected_pauli_pair( - seeds[qubit], layer_index, len(all_cycles) + 1, sequence_index, configuration._paulis_per_value + expected_seed, expected_next_pauli = _get_expected_random_pauli( + seeds[qubit], layer_index, len(all_cycles) + 1, sequence_index, configuration._paulis_per_value, configuration.variables.twirled_overwrites_source_unitaries ) assert ( seed == expected_seed @@ -202,7 +216,7 @@ def test_pauli_frame_tracking(configuration: rc.RandomizedCompilingConfiguration before_pauli = pauli_pairs[rc.PauliPairKey(qubit=qubit, layer_index=layer_index)][1][1] assert before_pauli == rc.PauliLiteral.I, f"Expected identity for previous Pauli but found {before_pauli} for qubit {qubit} at layer {layer_index}" after_pauli = pauli_pairs[rc.PauliPairKey(qubit=qubit, layer_index=layer_index + 1)][1][0] - assert after_pauli + assert after_pauli == rc.PauliLiteral.I, f"Expected identity for next Pauli but found {after_pauli} for qubit {qubit} at layer {layer_index + 1}" else: # If Paulis are not inverted then we can simply asssert that all previous Paulis are the identity. for qubit in configuration.qubits_sorted: @@ -214,16 +228,19 @@ def test_pauli_frame_tracking(configuration: rc.RandomizedCompilingConfiguration ), f"Expected identity for previous Pauli but found {pauli_pair[0]} for qubit {qubit} at layer {layer_index}" -@pytest.mark.parametrize("configuration", _PAULI_FRAME_TRACKING_TEST_CASES) +@pytest.mark.parametrize("configuration", [configuration for configuration in _PAULI_FRAME_TRACKING_TEST_CASES if configuration.variables.twirled_overwrites_source_unitaries]) def test_pauli_cache_accumulation(configuration: rc.RandomizedCompilingConfiguration): - """Test `rc._PauliSeedAndPairCache.accumulate` against manual accumulation of the tracked Paulis from `configuration.track_pauli_frames`. + """Test `rc._PauliSeedAndPairCache.accumulate`. - This test assumes the following features are correctly implemented: + The result should match the last element produced by `configuration.track_pauli_frames` after the same number of steps, + assuming that the configuration overwrites source unitaries with twirled unitaries. This test assumes the following + features are correctly implemented: * Pauli multiplication (see `test_pauli_literal_multiplication` above). * Pauli frame tracking (see `test_pauli_frame_tracking` above). * `rc.PAULI_CONJUGATES_MAPS` (see `test_pauli_conjugates_map` above). """ + assert configuration.variables.twirled_overwrites_source_unitaries rng = np.random.default_rng(seed=685_522_415) random_seeds = configuration.generate_seed_values(rng) pauli_conjugates_map = rc.PAULI_CONJUGATES_MAPS["CZ"] @@ -242,28 +259,15 @@ def test_pauli_cache_accumulation(configuration: rc.RandomizedCompilingConfigura ) accumulation_steps = 10 - tracked_paulis = configuration.track_pauli_frames(accumulation_steps, pauli_conjugates_map, random_seeds) - manually_accumulated_paulis = {} - for pauli_pairs in tracked_paulis: - assert len(pauli_pairs) == len(configuration.qubits_sorted) * (len(pauli_cache.cycles) + 1) - for key, value in pauli_pairs.items(): - if key not in manually_accumulated_paulis: - manually_accumulated_paulis[key] = value - else: - _, accumulated_pauli_pair = manually_accumulated_paulis[key] - current_seed, current_pauli_pair = value - _, previous_pauli = current_pauli_pair[0] * accumulated_pauli_pair[0] - _, next_pauli = accumulated_pauli_pair[1] * current_pauli_pair[1] - manually_accumulated_paulis[key] = (current_seed, (previous_pauli, next_pauli)) - - accumulated_paulis = pauli_cache.accumulate(accumulation_steps) + tracked_paulis = list(configuration.track_pauli_frames(accumulation_steps, pauli_conjugates_map, random_seeds))[-1] + accumulated_paulis = pauli_cache.accumulate(accumulation_steps, leave_final_layer_unaccumulated=configuration.readout_randomization is not None) all_cycles = configuration.base_cycles * configuration.base_cycle_repetitions assert len(accumulated_paulis) == len(configuration.qubits_sorted) * (len(all_cycles) + 1) for qubit in configuration.qubits_sorted: for layer_index in range(len(all_cycles) + 1): key = rc.PauliPairKey(qubit=qubit, layer_index=layer_index) seed, pauli_pair = accumulated_paulis[key] - expected_seed, expected_pauli_pair = manually_accumulated_paulis[key] + expected_seed, expected_pauli_pair = tracked_paulis[key] assert ( seed == expected_seed ), f"Seed mismatch for qubit {qubit} at layer {layer_index}: expected {expected_seed}, got {seed}" @@ -326,9 +330,10 @@ def _zxzxz(configuration: rc.RandomizedCompilingConfiguration, layer_index: int) def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> Program: program = Program() cycle_count = configuration.base_cycle_repetitions * len(configuration.base_cycles) + 1 - for qubit in configuration.qubits_sorted: - memory_region_name = configuration.variables.twirled_unitaries(qubit) - program += Declare(memory_region_name, "REAL", cycle_count * rc._ANGLES_PER_UNITARY) + if not configuration.variables.twirled_overwrites_source_unitaries: + for qubit in configuration.qubits_sorted: + memory_region_name = configuration.variables.source_unitaries(qubit) + program += Declare(memory_region_name, "REAL", cycle_count * rc._ANGLES_PER_UNITARY) for rep_index in range(configuration.base_cycle_repetitions): for base_index, cycle in enumerate(configuration._base_twirled_cycles): layer_index = rep_index * len(configuration.base_cycles) + base_index @@ -494,6 +499,17 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P seed_loop_inner_length=7, base_cycle_loop_length=4, ), + # 16) 4 looped base cycles; + ConfigurationTestCase( + configuration=rc.RandomizedCompilingConfiguration( + base_cycles=_ALTERNATING_BASE_CYCLES, + base_cycle_repetitions=5, + variables=rc.RandomizedCompilingVariables( + twirled_unitaries_prefix="twirled_unitaries" + ) + ), + base_cycle_loop_length=4 + ), ] @@ -504,6 +520,7 @@ def generate_source_unitaries(configuration: rc.RandomizedCompilingConfiguration source_unitaries[configuration.variables.source_unitaries(qubit)] = rng.uniform(-0.5, 0.5, size=rc._ANGLES_PER_UNITARY * cycle_count).tolist() return source_unitaries + @pytest.mark.parametrize( "test_case", CONFIGURATION_TEST_CASES, @@ -512,7 +529,7 @@ def generate_source_unitaries(configuration: rc.RandomizedCompilingConfiguration def test_randomized_compiling_configuration( test_case: ConfigurationTestCase, snapshot: SnapshotAssertion, - request: pytest.FixtureRequest + request: pytest.FixtureRequest, ): """Test that the provided configuration for loop parameters, program structure, and final memory validation. @@ -542,12 +559,12 @@ def test_randomized_compiling_configuration( rc.build_memory_values_for_paulis_conjugates_map(rc.PAULI_CONJUGATES_MAPS["CZ"]) ) memory_map.update(generate_source_unitaries(test_case.configuration, rng)) - # with open(_FIXTURE_DIRECTORY / f"{request.node.name}.json") as f: - # final_memory = json.load(f) - # test_case.configuration.verify_final_memory( - # final_memory, - # memory_map, - # TEST_SHOT_COUNT, - # rc.PAULI_CONJUGATES_MAPS["CZ"], - # ) + with open(_FIXTURE_DIRECTORY / f"{request.node.name}.json") as f: + final_memory = json.load(f) + test_case.configuration.verify_final_memory( + final_memory, + memory_map, + TEST_SHOT_COUNT, + rc.PAULI_CONJUGATES_MAPS["CZ"], + ) From d6ded7ef336545af668de95b03a895f399ccd9d2 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Thu, 18 Jun 2026 09:30:16 -0700 Subject: [PATCH 53/59] chore: ruff import ordering --- test/unit/test_qpu_randomized_compiling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/test_qpu_randomized_compiling.py b/test/unit/test_qpu_randomized_compiling.py index 8e3d03e58..779e4f159 100644 --- a/test/unit/test_qpu_randomized_compiling.py +++ b/test/unit/test_qpu_randomized_compiling.py @@ -10,7 +10,7 @@ from dataclasses import dataclass from itertools import product from pathlib import Path -from typing import cast, Optional +from typing import Optional, cast import numpy as np import pytest From a22d5e8a2b261f13364ec1b7cfc81576d31c0817 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Thu, 18 Jun 2026 09:34:56 -0700 Subject: [PATCH 54/59] test: fix override qcs config import --- pyquil/_qpu/randomized_compiling.py | 2 +- test/unit/conftest.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pyquil/_qpu/randomized_compiling.py b/pyquil/_qpu/randomized_compiling.py index 30c05e127..a69b84ff7 100644 --- a/pyquil/_qpu/randomized_compiling.py +++ b/pyquil/_qpu/randomized_compiling.py @@ -87,7 +87,7 @@ class _TwirledCycle: def __post_init__(self) -> None: self._validate() - def _validate(self): + def _validate(self) -> None: for qubit in self.all_qubits: if qubit in self.two_qubit_gates and qubit in self.idle_qubits: raise ValueError(f"qubit {qubit} is configured as both an edge and idle qubit") diff --git a/test/unit/conftest.py b/test/unit/conftest.py index 271451f4c..fcb8d236a 100644 --- a/test/unit/conftest.py +++ b/test/unit/conftest.py @@ -24,6 +24,8 @@ from pyquil.quil import Program from test.unit.utils import DummyCompiler +from .. import override_qcs_config + TEST_DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "data") override_qcs_config() From d24f9e5c5f55184af8c588d915b6de211fb05161 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 23 Jun 2026 07:01:36 -0700 Subject: [PATCH 55/59] refactor: remove readout randomization as core feature --- pyquil/_qpu/randomized_compiling.py | 230 +++------------------ test/e2e/test_qpu_randomized_compiling.py | 19 +- test/unit/test_qpu_randomized_compiling.py | 179 +++++++++++++--- 3 files changed, 197 insertions(+), 231 deletions(-) diff --git a/pyquil/_qpu/randomized_compiling.py b/pyquil/_qpu/randomized_compiling.py index a69b84ff7..814da3051 100644 --- a/pyquil/_qpu/randomized_compiling.py +++ b/pyquil/_qpu/randomized_compiling.py @@ -22,15 +22,14 @@ import math from abc import ABC, abstractmethod -from collections.abc import Generator, Mapping, Sequence +from collections.abc import Container, Generator, Iterable, Mapping, Sequence from dataclasses import dataclass, field from enum import Enum from functools import cached_property -from typing import Optional, Union, cast +from typing import Optional, Protocol, Union, cast import numpy as np from numpy.typing import NDArray -from qcs_sdk.qpu.experimental.random import PrngSeedValue, choose_random_real_sub_region_indices from quil import instructions as inst from pyquil.quil import InstructionDesignator, Program @@ -150,8 +149,7 @@ class PauliPairKey: def _accumulate_pauli_pairs( existing_pairs: dict[PauliPairKey, tuple[Optional[int], tuple["PauliLiteral", "PauliLiteral"]]], new_pairs: dict[PauliPairKey, tuple[Optional[int], tuple["PauliLiteral", "PauliLiteral"]]], - leave_final_layer_unaccumulated: bool, - layer_count: int, + non_accumulative_pauli_pairs: set[PauliPairKey], ) -> dict[PauliPairKey, tuple[Optional[int], tuple["PauliLiteral", "PauliLiteral"]]]: """Accumulate new Pauli pairs into the existing accumulator. @@ -162,7 +160,7 @@ def _accumulate_pauli_pairs( if key not in existing_pairs: raise ValueError(f"Key {key} not found in accumulator.") _, existing_pair = existing_pairs[key] - if key.layer_index == layer_count and leave_final_layer_unaccumulated: + if key in non_accumulative_pauli_pairs: accumulator[key] = (seed, new_pair) else: _, accumulated_next = existing_pair[1] * new_pair[1] @@ -190,7 +188,7 @@ class _PauliSeedAndPairCache: paulis_per_value: int def accumulate( - self, sequence_count: int, leave_final_layer_unaccumulated: bool + self, sequence_count: int, non_accumulative_pauli_pairs: Optional[Container[PauliPairKey]] = None ) -> "dict[PauliPairKey, tuple[Optional[int], tuple[PauliLiteral, PauliLiteral]]]": """Iterate over the requested `sequence_count` and accumulate the final Pauli pair for each qubit and layer index. @@ -200,6 +198,7 @@ def accumulate( """ current = self accumulated_pauli_pairs = None + non_accumulative_pauli_pairs = non_accumulative_pauli_pairs or set() for sequence_index in range(sequence_count): pauli_pairs = {} for qubit in self.qubits_sorted: @@ -210,7 +209,7 @@ def accumulate( accumulated_pauli_pairs = pauli_pairs else: accumulated_pauli_pairs = _accumulate_pauli_pairs( - accumulated_pauli_pairs, pauli_pairs, leave_final_layer_unaccumulated, len(self.cycles) + accumulated_pauli_pairs, pauli_pairs, non_accumulative_pauli_pairs ) if sequence_index < sequence_count - 1: current = next(current) @@ -400,78 +399,6 @@ def generate_mod_shot_count_block(self) -> tuple[InstructionDesignator, ...]: return tuple(instructions) -@dataclass(frozen=True) -class ReadoutRandomizationVariables: - """Memory variable names for readout randomization.""" - - readout_seed_prefix: str = "readout_seed" - source_unitaries_prefix: str = "readout_source_unitaries" - readout_randomization_prefix: str = "readout_randomization" - - def source_unitaries(self, qubit: int) -> str: - return f"{self.source_unitaries_prefix}_q{qubit}" - - def readout_seed(self, qubit: int) -> str: - return f"{self.readout_seed_prefix}_q{qubit}" - - def readout_randomization(self, qubit: int) -> str: - return f"{self.readout_randomization_prefix}_q{qubit}" - - -@dataclass(frozen=True) -class ReadoutRandomization: - """Configuration for readout randomization on the final layer.""" - - source_unitary_angles: Union[Mapping[int, Sequence[float]], Sequence[float]] - """ - A map from qubit to the memory values representing the source unitaries for readout randomization. - - Angles must be provided as cycles (not radians). The length of each sequence must be a multiple of 3. - """ - - variables: ReadoutRandomizationVariables = field(default_factory=ReadoutRandomizationVariables) - - def __post_init__(self) -> None: - self._validate() - - def _validate(self) -> None: - if isinstance(self.source_unitary_angles, Sequence): - if len(self.source_unitary_angles) % _ANGLES_PER_UNITARY != 0: - raise ValueError( - f"source unitary angles must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(self.source_unitary_angles)}" - ) - elif isinstance(self.source_unitary_angles, Mapping): - for qubit, angles in self.source_unitary_angles.items(): - if len(angles) % _ANGLES_PER_UNITARY != 0: - raise ValueError( - f"source unitary angles for qubit {qubit} must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(angles)}" - ) - else: - raise ValueError( - f"source unitary angles must be a sequence or a mapping, but got {type(self.source_unitary_angles)}" - ) - - def source_unitary_count(self, qubit: int) -> int: - if isinstance(self.source_unitary_angles, Sequence): - return len(self.source_unitary_angles) // _ANGLES_PER_UNITARY - elif isinstance(self.source_unitary_angles, Mapping): - return len(self.source_unitary_angles[qubit]) // _ANGLES_PER_UNITARY - else: - raise ValueError( - f"source unitary angles must be a sequence or a mapping, but got {type(self.source_unitary_angles)}" - ) - - def source_unitary_angles_for_qubit(self, qubit: int) -> Sequence[float]: - if isinstance(self.source_unitary_angles, Sequence): - return self.source_unitary_angles - elif isinstance(self.source_unitary_angles, Mapping): - return self.source_unitary_angles[qubit] - else: - raise ValueError( - f"source unitary angles must be a sequence or a mapping, but got {type(self.source_unitary_angles)}" - ) - - class _ToQuilCallArguments(ABC): @abstractmethod def to_call_arguments(self) -> tuple[inst.CallArgument, ...]: ... @@ -724,13 +651,6 @@ def _compute_unitary_from_zxzxz_angles(unitary: Sequence[float]) -> NDArray[np.c ) -def _compute_expected_merged_unitary( - unitary: tuple[float, ...], pauli_pair: tuple[PauliLiteral, PauliLiteral] -) -> NDArray[np.complex128]: - """Compute the expected merged unitary from ZXZXZ angles and a Pauli pair.""" - return pauli_pair[1].matrix @ _compute_unitary_from_zxzxz_angles(unitary) @ pauli_pair[0].matrix - - @dataclass(frozen=True) class RandomizedCompilingVariables: """Memory variable names for randomized compiling.""" @@ -771,24 +691,6 @@ def pauli_seed(self, qubit: int) -> str: return f"{self.pauli_seed_prefix}_q{qubit}" -@dataclass(frozen=True) -class RandomSeeds: - """The random seeds for each qubit used to generate the random Paulis on the QPU.""" - - randomized_compiling: NDArray[np.int64] - """ - Random seeds for generating random Paulis for randomized compiling. Shape is - (qubit_count, seed_length) where seed_length is determined by the number of layers and - the number of Paulis per seed value. - """ - - readout: Optional[NDArray[np.int64]] = None - """ - Random seeds for selecting random unitaries for readout randomization. - Shape is (qubit_count,). - """ - - class _PauliCursor(Enum): """Tracks the memory location of the previous and next Paulis. @@ -845,6 +747,12 @@ def _requires_seed_transition( return requires_seed_transition +class _FinalSourceUnitaryProvider(Protocol): + def __getitem__(self, key: PauliPairKey) -> NDArray[np.complex128]: ... + def __contains__(self, key: PauliPairKey) -> bool: ... + def keys(self) -> Iterable[PauliPairKey]: ... + + @dataclass(frozen=True) class RandomizedCompilingConfiguration: """A utility for configuring randomized compiling on a Rigetti QPU. @@ -894,9 +802,6 @@ class RandomizedCompilingConfiguration: leading_delay_seconds: float = 2e-4 """The delay to insert before starting the gate program.""" - readout_randomization: Optional[ReadoutRandomization] = None - """Configuration for using readout randomization in conjunction with randomized compiling.""" - shots_per_randomization: Optional[ShotsPerRandomization] = None """Configuration for randomizing only a subset of shots.""" @@ -1007,17 +912,6 @@ def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: Declare(self.shots_per_randomization.variables.is_mod_zero, "BIT", 1), ) ) - if self.readout_randomization is not None: - for q in self.qubits_sorted: - declarations.append(Declare(self.readout_randomization.variables.readout_seed(q), "INTEGER", 1)) - declarations.append( - Declare( - self.readout_randomization.variables.source_unitaries(q), - "REAL", - len(self.readout_randomization.source_unitary_angles_for_qubit(q)), - ) - ) - declarations.append(Declare(self.readout_randomization.variables.readout_randomization(q), "REAL", 3)) declarations.extend( ( @@ -1040,21 +934,14 @@ def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: declarations.append(Declare(self.variables.current_seeds(q), "INTEGER", current_seed_length)) return tuple(declarations) - def generate_seed_values(self, rng: np.random.Generator) -> RandomSeeds: - """Generate random seed values for the random Paulis on the QPU. - - This will also include readout randomization seeds if `self.readout_randomization` is not None. - """ + def generate_seed_values(self, rng: np.random.Generator) -> NDArray[np.int64]: + """Generate random seed values for the random Paulis on the QPU.""" size = (len(self.qubits_sorted), self._seed_length) - randomized_compiling_seeds = rng.integers(0, _MAX_SEQUENCER_VALUE + 1, size=size, dtype=np.int64) - readout_seeds = None - if self.readout_randomization is not None: - readout_seeds = rng.integers(0, _MAX_SEQUENCER_VALUE + 1, size=(len(self.qubits_sorted), 1), dtype=np.int64) - return RandomSeeds(randomized_compiling=randomized_compiling_seeds, readout=readout_seeds) + return rng.integers(-(2 ** (_BITS_PER_VALUE - 1)), 2 ** (_BITS_PER_VALUE - 1) - 1, size=size, dtype=np.int64) def build_memory_map( self, - random_seeds: RandomSeeds, + random_seeds: NDArray[np.int64], pauli_conjugates_map: Union[list[int], list[float]], ) -> dict[str, Union[list[int], list[float]]]: """Build the memory map for executing the randomized compiling program on the QPU. @@ -1072,7 +959,7 @@ def build_memory_map( memory_map[self.variables.pauli_conjugates_map] = pauli_conjugates_map for qubit_index, q in enumerate(self.qubits_sorted): - memory_map[self.variables.pauli_seed(q)] = random_seeds.randomized_compiling[qubit_index].tolist() + memory_map[self.variables.pauli_seed(q)] = random_seeds[qubit_index].tolist() memory_map[self.variables.twirled_unitaries(q)] = np.zeros( ((self._cycle_count + 1) * _ANGLES_PER_UNITARY,), dtype=float ).tolist() @@ -1087,17 +974,6 @@ def build_memory_map( memory_map[self.shots_per_randomization.variables.modulo_counter] = [-1] memory_map[self.shots_per_randomization.variables.is_mod_zero] = [1] - if self.readout_randomization is not None: - if random_seeds.readout is None: - raise ValueError("readout seeds must be provided if readout randomization variables are specified") - for qubit_index, q in enumerate(self.qubits_sorted): - memory_map[self.readout_randomization.variables.readout_seed(q)] = [ - int(random_seeds.readout[qubit_index]) - ] - memory_map[self.readout_randomization.variables.readout_randomization(q)] = [0] * _ANGLES_PER_UNITARY - memory_map[self.readout_randomization.variables.source_unitaries(q)] = list( - self.readout_randomization.source_unitary_angles_for_qubit(q) - ) return memory_map def _build_quil_instructions_for_base_cycle( @@ -1128,34 +1004,6 @@ def _build_quil_instructions_for_base_cycle( for qubit in self.qubits_sorted: source_unitaries = self.variables.source_unitaries(qubit) - if is_final_cycle and is_final_base_cycle and self.readout_randomization is not None: - instructions.append( - Call( - "choose_random_real_sub_regions", - [ - inst.CallArgument.from_identifier( - self.readout_randomization.variables.readout_randomization(qubit) - ), - inst.CallArgument.from_identifier( - self.readout_randomization.variables.source_unitaries(qubit) - ), - inst.CallArgument.from_immediate(complex(_ANGLES_PER_UNITARY, 0)), - inst.CallArgument.from_memory_reference( - inst.MemoryReference(self.readout_randomization.variables.readout_seed(qubit), 0) - ), - ], - ) - ) - global_cycle_index = self._base_cycle_length * self.base_cycle_repetitions - for i in range(_ANGLES_PER_UNITARY): - instructions.append( - ClassicalMove( - self.variables.twirled_unitaries_ref(qubit, global_cycle_index, i), - MemoryReference(self.readout_randomization.variables.readout_randomization(qubit), i), - ) - ) - source_unitaries = self.variables.twirled_unitaries(qubit) - edge = cycle.two_qubit_gates[qubit] if qubit in cycle.two_qubit_gates else None previous: Union[_PauliConjugate, _PauliReference, PauliLiteral] if self.invert_random_paulis and edge is not None: @@ -1412,6 +1260,7 @@ def verify_final_memory( original_memory: dict[str, Union[list[int], list[float]]], shot_count: int, pauli_conjugates_map: Mapping[tuple[PauliLiteral, PauliLiteral], tuple[PauliLiteral, PauliLiteral]], + final_source_unitary_provider: Optional[_FinalSourceUnitaryProvider] = None, ) -> None: """Verify that the final memory state matches expectations. @@ -1454,7 +1303,8 @@ def verify_final_memory( paulis_per_value=self._paulis_per_value, ) pauli_pairs = pauli_cache.accumulate( - prng_sequence_count, leave_final_layer_unaccumulated=self.readout_randomization is not None + prng_sequence_count, + set(final_source_unitary_provider.keys()) if final_source_unitary_provider is not None else None, ) for q in self.qubits_sorted: @@ -1480,44 +1330,31 @@ def verify_final_memory( ) found_final_unitary = _compute_unitary_from_zxzxz_angles(found_final_unitary_angles) - if self.readout_randomization is not None and layer_index == len(cycles): - all_source_unitary_angles = tuple( - original_memory[self.readout_randomization.variables.source_unitaries(q)] - ) - if len(all_source_unitary_angles) % _ANGLES_PER_UNITARY != 0: - raise ValueError( - f"source unitary angle count must be a multiple of {_ANGLES_PER_UNITARY}, but got {len(all_source_unitary_angles)}" - ) - sub_region_count = len(all_source_unitary_angles) // _ANGLES_PER_UNITARY - seed_value = int(original_memory[self.readout_randomization.variables.readout_seed(q)][0]) - final_region_index = choose_random_real_sub_region_indices( - PrngSeedValue(seed_value), prng_sequence_length - 1, 1, sub_region_count - )[0] - start_index = final_region_index * _ANGLES_PER_UNITARY - source_unitary_angles = all_source_unitary_angles[start_index : start_index + _ANGLES_PER_UNITARY] + if final_source_unitary_provider is not None and key in final_source_unitary_provider: + source_unitary = final_source_unitary_provider[key] else: - source_unitary_angles = tuple( + source_unitary = _compute_unitary_from_zxzxz_angles( original_memory[self.variables.source_unitaries(q)][start_angle:end_angle] ) - expected_unitary = _compute_expected_merged_unitary(source_unitary_angles, expected_final_pauli_pair) + expected_unitary = ( + expected_final_pauli_pair[1].matrix @ source_unitary @ expected_final_pauli_pair[0].matrix + ) if not _unitary_equal(found_final_unitary, expected_unitary): raise ValueError( f"unitary mismatch for q{q} layer {layer_index}: got {found_final_unitary_angles} " - f"for source {source_unitary_angles} and final pauli pair: {expected_final_pauli_pair}" + f"for source {source_unitary} and final pauli pair: {expected_final_pauli_pair}" ) def track_pauli_frames( self, sequence_count: int, pauli_conjugates_map: Mapping[tuple[PauliLiteral, PauliLiteral], tuple[PauliLiteral, PauliLiteral]], - random_seeds: RandomSeeds, + random_seeds: NDArray[np.int64], + non_accumulative_pauli_pairs: Optional[Container[PauliPairKey]] = None, ) -> Generator[dict[PauliPairKey, tuple[Optional[int], tuple[PauliLiteral, PauliLiteral]]], None, None]: cycles = self._base_twirled_cycles * self.base_cycle_repetitions pauli_cache = _PauliSeedAndPairCache( - original_seeds={ - q: random_seeds.randomized_compiling[qubit_index].tolist() - for qubit_index, q in enumerate(self.qubits_sorted) - }, + original_seeds={q: random_seeds[qubit_index].tolist() for qubit_index, q in enumerate(self.qubits_sorted)}, pauli_conjugates_map=pauli_conjugates_map, cycles=cycles, qubits_sorted=self.qubits_sorted, @@ -1526,15 +1363,14 @@ def track_pauli_frames( paulis_per_value=self._paulis_per_value, ) accumulated_pauli_pairs = None - leave_final_layer_unaccumulated = self.readout_randomization is not None for sequence_index in range(sequence_count): - pauli_pairs = pauli_cache.accumulate(1, leave_final_layer_unaccumulated) + pauli_pairs = pauli_cache.accumulate(1, non_accumulative_pauli_pairs) if self.variables.twirled_overwrites_source_unitaries: if accumulated_pauli_pairs is None: accumulated_pauli_pairs = pauli_pairs else: accumulated_pauli_pairs = _accumulate_pauli_pairs( - accumulated_pauli_pairs, pauli_pairs, leave_final_layer_unaccumulated, len(cycles) + accumulated_pauli_pairs, pauli_pairs, non_accumulative_pauli_pairs or set() ) yield accumulated_pauli_pairs else: diff --git a/test/e2e/test_qpu_randomized_compiling.py b/test/e2e/test_qpu_randomized_compiling.py index 120664b9e..8df79a8bc 100644 --- a/test/e2e/test_qpu_randomized_compiling.py +++ b/test/e2e/test_qpu_randomized_compiling.py @@ -49,13 +49,14 @@ def test_qpu_randomized_compiling( pytest.skip(reason="skipping this test since it requires live access to a QPU (use --live-qpu-access to run)") configuration = test_case.configuration rng = np.random.default_rng(trc.CONFIGURATION_TEST_SEED) - random_seeds = configuration.generate_seed_values(rng) - program = configuration.build_quil_program() + + program = test_case.build_quil_program() + with open('.scratch/program.quil', 'w') as f: + f.write(program.out()) program += trc.build_cycle_program(configuration) pauli_conjugates_map = rc.PAULI_CONJUGATES_MAPS["CZ"] - memory_map = configuration.build_memory_map(random_seeds, rc.build_memory_values_for_paulis_conjugates_map(pauli_conjugates_map)) - memory_map.update(trc.generate_source_unitaries(configuration, rng)) + memory_map, readout_seeds = test_case.generate_seeds_and_memory_map(rng) translation_result = translate(program.out(), trc.TEST_SHOT_COUNT, quantum_processor_id, client_configuration) bitstrings, final_memory = _get_bitstrings_and_final_memory( @@ -66,10 +67,20 @@ def test_qpu_randomized_compiling( qcs_client=client_configuration, ) + with open('.scratch/final_memory.json', 'w') as f: + import json + json.dump(final_memory, f) + + final_source_unitary_provider: rc._FinalSourceUnitaryProvider | None = None + if test_case.readout_randomization is not None: + if readout_seeds is None: + raise ValueError("Readout seeds should not be None if readout randomization is provided.") + final_source_unitary_provider = test_case.readout_randomization.build_final_source_unitaries(readout_seeds, trc.TEST_SHOT_COUNT, test_case.configuration._cycle_count) configuration.verify_final_memory( final_memory, memory_map, trc.TEST_SHOT_COUNT, pauli_conjugates_map, + final_source_unitary_provider=final_source_unitary_provider ) diff --git a/test/unit/test_qpu_randomized_compiling.py b/test/unit/test_qpu_randomized_compiling.py index 779e4f159..8a249f151 100644 --- a/test/unit/test_qpu_randomized_compiling.py +++ b/test/unit/test_qpu_randomized_compiling.py @@ -6,19 +6,23 @@ """ import json -from collections.abc import Sequence +from collections.abc import Mapping, Sequence from dataclasses import dataclass from itertools import product from pathlib import Path -from typing import Optional, cast +from typing import Optional, Union, cast import numpy as np import pytest +from numpy.typing import NDArray +from qcs_sdk.qpu.experimental.random import PrngSeedValue, choose_random_real_sub_region_indices +from quil import instructions as inst from syrupy.assertion import SnapshotAssertion from pyquil import Program, gates from pyquil._qpu import randomized_compiling as rc -from pyquil.quilbase import Declare +from pyquil.quilatom import MemoryReference +from pyquil.quilbase import Call, ClassicalMove, Declare from pyquil.simulation import matrices @@ -162,7 +166,7 @@ def test_pauli_frame_tracking(configuration: rc.RandomizedCompilingConfiguration len(pauli_pairs) == len(configuration.qubits_sorted) * (len(all_cycles) + 1) for pauli_pairs in all_pauli_pairs ) seeds = { - q: random_seeds.randomized_compiling[qubit_index].tolist() + q: random_seeds[qubit_index].tolist() for qubit_index, q in enumerate(configuration.qubits_sorted) } for sequence_index, pauli_pairs in enumerate(all_pauli_pairs): @@ -247,7 +251,7 @@ def test_pauli_cache_accumulation(configuration: rc.RandomizedCompilingConfigura pauli_cache = rc._PauliSeedAndPairCache( original_seeds={ - q: random_seeds.randomized_compiling[qubit_index].tolist() + q: random_seeds[qubit_index].tolist() for qubit_index, q in enumerate(configuration.qubits_sorted) }, pauli_conjugates_map=pauli_conjugates_map, @@ -260,7 +264,7 @@ def test_pauli_cache_accumulation(configuration: rc.RandomizedCompilingConfigura accumulation_steps = 10 tracked_paulis = list(configuration.track_pauli_frames(accumulation_steps, pauli_conjugates_map, random_seeds))[-1] - accumulated_paulis = pauli_cache.accumulate(accumulation_steps, leave_final_layer_unaccumulated=configuration.readout_randomization is not None) + accumulated_paulis = pauli_cache.accumulate(accumulation_steps) all_cycles = configuration.base_cycles * configuration.base_cycle_repetitions assert len(accumulated_paulis) == len(configuration.qubits_sorted) * (len(all_cycles) + 1) for qubit in configuration.qubits_sorted: @@ -280,14 +284,49 @@ def test_pauli_cache_accumulation(configuration: rc.RandomizedCompilingConfigura _FIXTURE_DIRECTORY.mkdir(exist_ok=True) @dataclass(frozen=True) -class ConfigurationTestCase: - configuration: rc.RandomizedCompilingConfiguration - seed_loop_length: int = 0 - seed_loop_inner_length: int = 0 - base_cycle_loop_length: int = 0 - +class _U2Randomization: + random_indices: NDArray[np.int8] + source_unitaries: NDArray[np.complex128] + qubit_index_map: dict[int, int] + final_layer_index: int + + def __getitem__(self, key: rc.PauliPairKey) -> NDArray[np.complex128]: + if key.layer_index != self.final_layer_index: + raise KeyError(f"Only the final layer index {self.final_layer_index} is valid for this provider, got {key.layer_index}") + qubit_index = self.qubit_index_map[key.qubit] + unitary_index = self.random_indices[qubit_index] + return self.source_unitaries[unitary_index] + + def __contains__(self, key: rc.PauliPairKey) -> bool: + return key.layer_index == self.final_layer_index and key.qubit in self.qubit_index_map + + def keys(self) -> tuple[rc.PauliPairKey, ...]: + return tuple( + rc.PauliPairKey(qubit=qubit, layer_index=self.final_layer_index) + for qubit in self.qubit_index_map + ) -CONFIGURATION_TEST_SEED = 156_548_857 + @classmethod + def for_qubits( + cls, + qubits_sorted: Sequence[int], + /, + source_unitaries: NDArray[np.complex128], + shot_count: int, + final_layer_index: int, + seeds: Mapping[int, int] + ) -> "_U2Randomization": + qubit_index_map = {qubit: index for index, qubit in enumerate(qubits_sorted)} + random_indices = np.asarray([ + choose_random_real_sub_region_indices(PrngSeedValue(seeds[qubit]), shot_count, 1, len(source_unitaries))[0] + for qubit_index, qubit in enumerate(qubits_sorted) + ], dtype=np.int8) + return cls( + random_indices=random_indices, + source_unitaries=source_unitaries, + qubit_index_map=qubit_index_map, + final_layer_index=final_layer_index, + ) _TETRAHEDRAL_ANGLES = np.array([[ 0.0, 0.5, 0.5], [-1./4, 0.0, -1./4], @@ -302,10 +341,90 @@ class ConfigurationTestCase: [-1./4, 1./4, 0.5], [ 1./4, 1./4, 0.0]], dtype=np.float64).flatten().tolist() -TEST_SHOT_COUNT = 2_500 -def randomized_readout_angles(qubits: Sequence[int]) -> dict[int, list[float]]: - return {qubit: _TETRAHEDRAL_ANGLES for qubit in qubits} +@dataclass(frozen=True) +class ReadoutRandomization: + qubits_sorted: tuple[int, ...] + readout_source_angles: tuple[float, ...] = tuple(_TETRAHEDRAL_ANGLES) + + def build_quil_program(self) -> Program: + program = Program() + program += Declare("readout_source_angles", "REAL", len(self.readout_source_angles)) + for qubit in self.qubits_sorted: + program += Declare(f"readout_seed_q{qubit}", "INTEGER", 1) + program += Declare(f"readout_randomization_q{qubit}", "REAL", rc._ANGLES_PER_UNITARY) + + for qubit in self.qubits_sorted: + program += Call( + "choose_random_real_sub_regions", + [ + inst.CallArgument.from_identifier(f"readout_randomization_q{qubit}"), + inst.CallArgument.from_identifier("readout_source_angles"), + inst.CallArgument.from_immediate(complex(rc._ANGLES_PER_UNITARY)), + inst.CallArgument.from_memory_reference(inst.MemoryReference(f"readout_seed_q{qubit}", 0)), + ] + ) + return program + + def generate_seeds(self, rng: np.random.Generator) -> dict[int, int]: + return {qubit: rng.integers(-2**47, 2**47 - 1, dtype=np.int64).item() for qubit in self.qubits_sorted} + + def build_memory_map(self, seeds: Mapping[int, int]) -> dict[str, list[float]]: + memory_map = {} + memory_map["readout_source_angles"] = list(self.readout_source_angles) + for qubit in self.qubits_sorted: + memory_map[f"readout_seed_q{qubit}"] = [seeds[qubit]] + memory_map[f"readout_randomization_q{qubit}"] = [0.0] * rc._ANGLES_PER_UNITARY + return memory_map + + def build_final_source_unitaries(self, seeds: Mapping[int, int], shot_count: int, final_layer_index: int) -> _U2Randomization: + return _U2Randomization.for_qubits( + self.qubits_sorted, + source_unitaries=np.asarray(self.readout_source_angles, dtype=np.complex128), + shot_count=shot_count, + final_layer_index=final_layer_index, + seeds=seeds + ) + + +@dataclass(frozen=True) +class ConfigurationTestCase: + configuration: rc.RandomizedCompilingConfiguration + seed_loop_length: int = 0 + seed_loop_inner_length: int = 0 + base_cycle_loop_length: int = 0 + readout_randomization: Union[ReadoutRandomization, None] = None + + def build_quil_program(self) -> Program: + program = Program() + if self.readout_randomization is not None: + program += self.readout_randomization.build_quil_program() + for qubit in self.readout_randomization.qubits_sorted: + for angle_index in range(rc._ANGLES_PER_UNITARY): + program += ClassicalMove( + self.configuration.variables.source_unitaries_ref(qubit, self.configuration._cycle_count, angle_index), + MemoryReference(f"readout_randomization_q{qubit}", angle_index) + ) + program += self.configuration.build_quil_program() + return program + + def generate_seeds_and_memory_map(self, rng: np.random.Generator) -> tuple[dict[str, Union[list[int], list[float]]], Optional[dict[int, int]]]: + memory_map: dict[str, Union[list[int], list[float]]] = {} + rc_seeds = self.configuration.generate_seed_values(rng) + + if self.readout_randomization is not None: + readout_seeds = self.readout_randomization.generate_seeds(rng) + memory_map.update(self.readout_randomization.build_memory_map(readout_seeds)) + else: + readout_seeds = None + + memory_map.update(self.configuration.build_memory_map(rc_seeds, rc.build_memory_values_for_paulis_conjugates_map(rc.PAULI_CONJUGATES_MAPS["CZ"]))) + memory_map.update(generate_source_unitaries(self.configuration, rng)) + return memory_map, readout_seeds + + +CONFIGURATION_TEST_SEED = 156_548_857 +TEST_SHOT_COUNT = 2_500 def _sx(qubit: int) -> gates.Gate: @@ -467,12 +586,12 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P configuration=rc.RandomizedCompilingConfiguration( base_cycles=_ALTERNATING_BASE_CYCLES, base_cycle_repetitions=13, - readout_randomization=rc.ReadoutRandomization( - source_unitary_angles=randomized_readout_angles(range(6)), - ) ), seed_loop_length=1, seed_loop_inner_length=11, + readout_randomization=ReadoutRandomization( + qubits_sorted=tuple(range(6)), + ) ), # 14) seed loop with shots per randomization and readout randomization ConfigurationTestCase( @@ -482,12 +601,12 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P shots_per_randomization=rc.ShotsPerRandomization( shots_per_randomization=50, ), - readout_randomization=rc.ReadoutRandomization( - source_unitary_angles=randomized_readout_angles(range(6)), - ) ), seed_loop_length=1, seed_loop_inner_length=11, + readout_randomization=ReadoutRandomization( + qubits_sorted=tuple(range(6)), + ) ), # 15) seed loop on cycles with untwirled qubits. ConfigurationTestCase( @@ -547,24 +666,24 @@ def test_randomized_compiling_configuration( completed_u2_cycles = completed_base_cycles * len(test_case.configuration.base_cycles) + 1 assert expected_total_u2_cycles == completed_u2_cycles - program = test_case.configuration.build_quil_program() - + program = test_case.build_quil_program() assert program.out() == snapshot(name="quil") program += build_cycle_program(test_case.configuration) rng = np.random.default_rng(seed=CONFIGURATION_TEST_SEED) - random_seeds = test_case.configuration.generate_seed_values(rng) - memory_map = test_case.configuration.build_memory_map( - random_seeds, - rc.build_memory_values_for_paulis_conjugates_map(rc.PAULI_CONJUGATES_MAPS["CZ"]) - ) - memory_map.update(generate_source_unitaries(test_case.configuration, rng)) + memory_map, readout_seeds = test_case.generate_seeds_and_memory_map(rng) with open(_FIXTURE_DIRECTORY / f"{request.node.name}.json") as f: final_memory = json.load(f) + final_source_unitary_provider: rc._FinalSourceUnitaryProvider | None = None + if test_case.readout_randomization is not None: + if readout_seeds is None: + raise ValueError("Readout seeds should not be None if readout randomization is provided.") + final_source_unitary_provider = test_case.readout_randomization.build_final_source_unitaries(readout_seeds, TEST_SHOT_COUNT, test_case.configuration._cycle_count) test_case.configuration.verify_final_memory( final_memory, memory_map, TEST_SHOT_COUNT, rc.PAULI_CONJUGATES_MAPS["CZ"], + final_source_unitary_provider ) From c2f932b48c0ca373309c18ae6edf76bfdf42730a Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Tue, 23 Jun 2026 07:26:00 -0700 Subject: [PATCH 56/59] test: update fixtures for readout randomization --- pyquil/_qpu/randomized_compiling.py | 3 +- .../test_qpu_randomized_compiling.ambr | 158 ++++++++---------- test/unit/test_qpu_randomized_compiling.py | 53 ++---- 3 files changed, 93 insertions(+), 121 deletions(-) diff --git a/pyquil/_qpu/randomized_compiling.py b/pyquil/_qpu/randomized_compiling.py index 814da3051..50373dc20 100644 --- a/pyquil/_qpu/randomized_compiling.py +++ b/pyquil/_qpu/randomized_compiling.py @@ -937,7 +937,7 @@ def _generate_declarations(self) -> tuple[InstructionDesignator, ...]: def generate_seed_values(self, rng: np.random.Generator) -> NDArray[np.int64]: """Generate random seed values for the random Paulis on the QPU.""" size = (len(self.qubits_sorted), self._seed_length) - return rng.integers(-(2 ** (_BITS_PER_VALUE - 1)), 2 ** (_BITS_PER_VALUE - 1) - 1, size=size, dtype=np.int64) + return rng.integers(0, _MAX_SEQUENCER_VALUE + 1, size=size, dtype=np.int64) def build_memory_map( self, @@ -1332,6 +1332,7 @@ def verify_final_memory( if final_source_unitary_provider is not None and key in final_source_unitary_provider: source_unitary = final_source_unitary_provider[key] + print(f"Using final source unitary for q{q} layer {layer_index}: {source_unitary}") else: source_unitary = _compute_unitary_from_zxzxz_angles( original_memory[self.variables.source_unitaries(q)][start_angle:end_angle] diff --git a/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr index 425949940..79cfc5a9b 100644 --- a/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr +++ b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr @@ -580,6 +580,19 @@ PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE readout_source_angles REAL[12] + DECLARE readout_seed_q0 INTEGER[1] + DECLARE readout_randomization_q0 REAL[3] + DECLARE readout_seed_q1 INTEGER[1] + DECLARE readout_randomization_q1 REAL[3] + DECLARE readout_seed_q2 INTEGER[1] + DECLARE readout_randomization_q2 REAL[3] + DECLARE readout_seed_q3 INTEGER[1] + DECLARE readout_randomization_q3 REAL[3] + DECLARE readout_seed_q4 INTEGER[1] + DECLARE readout_randomization_q4 REAL[3] + DECLARE readout_seed_q5 INTEGER[1] + DECLARE readout_randomization_q5 REAL[3] DECLARE pauli_conjugates_map INTEGER[16] DECLARE pauli_seed_q0 INTEGER[2] DECLARE pauli_seed_q1 INTEGER[2] @@ -593,24 +606,6 @@ DECLARE unitaries_q3 REAL[81] DECLARE unitaries_q4 REAL[81] DECLARE unitaries_q5 REAL[81] - DECLARE readout_seed_q0 INTEGER[1] - DECLARE readout_source_unitaries_q0 REAL[36] - DECLARE readout_randomization_q0 REAL[3] - DECLARE readout_seed_q1 INTEGER[1] - DECLARE readout_source_unitaries_q1 REAL[36] - DECLARE readout_randomization_q1 REAL[3] - DECLARE readout_seed_q2 INTEGER[1] - DECLARE readout_source_unitaries_q2 REAL[36] - DECLARE readout_randomization_q2 REAL[3] - DECLARE readout_seed_q3 INTEGER[1] - DECLARE readout_source_unitaries_q3 REAL[36] - DECLARE readout_randomization_q3 REAL[3] - DECLARE readout_seed_q4 INTEGER[1] - DECLARE readout_source_unitaries_q4 REAL[36] - DECLARE readout_randomization_q4 REAL[3] - DECLARE readout_seed_q5 INTEGER[1] - DECLARE readout_source_unitaries_q5 REAL[36] - DECLARE readout_randomization_q5 REAL[3] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] DECLARE rc_seed_index INTEGER[1] @@ -621,6 +616,30 @@ DECLARE current_seeds_q3 INTEGER[2] DECLARE current_seeds_q4 INTEGER[2] DECLARE current_seeds_q5 INTEGER[2] + CALL choose_random_real_sub_regions readout_randomization_q0 readout_source_angles 3 readout_seed_q0[0] + CALL choose_random_real_sub_regions readout_randomization_q1 readout_source_angles 3 readout_seed_q1[0] + CALL choose_random_real_sub_regions readout_randomization_q2 readout_source_angles 3 readout_seed_q2[0] + CALL choose_random_real_sub_regions readout_randomization_q3 readout_source_angles 3 readout_seed_q3[0] + CALL choose_random_real_sub_regions readout_randomization_q4 readout_source_angles 3 readout_seed_q4[0] + CALL choose_random_real_sub_regions readout_randomization_q5 readout_source_angles 3 readout_seed_q5[0] + MOVE unitaries_q0[78] readout_randomization_q0[0] + MOVE unitaries_q0[79] readout_randomization_q0[1] + MOVE unitaries_q0[80] readout_randomization_q0[2] + MOVE unitaries_q1[78] readout_randomization_q1[0] + MOVE unitaries_q1[79] readout_randomization_q1[1] + MOVE unitaries_q1[80] readout_randomization_q1[2] + MOVE unitaries_q2[78] readout_randomization_q2[0] + MOVE unitaries_q2[79] readout_randomization_q2[1] + MOVE unitaries_q2[80] readout_randomization_q2[2] + MOVE unitaries_q3[78] readout_randomization_q3[0] + MOVE unitaries_q3[79] readout_randomization_q3[1] + MOVE unitaries_q3[80] readout_randomization_q3[2] + MOVE unitaries_q4[78] readout_randomization_q4[0] + MOVE unitaries_q4[79] readout_randomization_q4[1] + MOVE unitaries_q4[80] readout_randomization_q4[2] + MOVE unitaries_q5[78] readout_randomization_q5[0] + MOVE unitaries_q5[79] readout_randomization_q5[1] + MOVE unitaries_q5[80] readout_randomization_q5[2] CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] @@ -733,35 +752,11 @@ SHR current_seeds_q3[0] 2 SHR current_seeds_q4[0] 2 SHR current_seeds_q5[0] 2 - CALL choose_random_real_sub_regions readout_randomization_q0 readout_source_unitaries_q0 3 readout_seed_q0[0] - MOVE unitaries_q0[78] readout_randomization_q0[0] - MOVE unitaries_q0[79] readout_randomization_q0[1] - MOVE unitaries_q0[80] readout_randomization_q0[2] CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 - CALL choose_random_real_sub_regions readout_randomization_q1 readout_source_unitaries_q1 3 readout_seed_q1[0] - MOVE unitaries_q1[78] readout_randomization_q1[0] - MOVE unitaries_q1[79] readout_randomization_q1[1] - MOVE unitaries_q1[80] readout_randomization_q1[2] CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL choose_random_real_sub_regions readout_randomization_q2 readout_source_unitaries_q2 3 readout_seed_q2[0] - MOVE unitaries_q2[78] readout_randomization_q2[0] - MOVE unitaries_q2[79] readout_randomization_q2[1] - MOVE unitaries_q2[80] readout_randomization_q2[2] CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map - CALL choose_random_real_sub_regions readout_randomization_q3 readout_source_unitaries_q3 3 readout_seed_q3[0] - MOVE unitaries_q3[78] readout_randomization_q3[0] - MOVE unitaries_q3[79] readout_randomization_q3[1] - MOVE unitaries_q3[80] readout_randomization_q3[2] CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map - CALL choose_random_real_sub_regions readout_randomization_q4 readout_source_unitaries_q4 3 readout_seed_q4[0] - MOVE unitaries_q4[78] readout_randomization_q4[0] - MOVE unitaries_q4[79] readout_randomization_q4[1] - MOVE unitaries_q4[80] readout_randomization_q4[2] CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map - CALL choose_random_real_sub_regions readout_randomization_q5 readout_source_unitaries_q5 3 readout_seed_q5[0] - MOVE unitaries_q5[78] readout_randomization_q5[0] - MOVE unitaries_q5[79] readout_randomization_q5[1] - MOVE unitaries_q5[80] readout_randomization_q5[2] CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 FENCE 0 1 2 3 4 5 @@ -780,6 +775,19 @@ PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" + DECLARE readout_source_angles REAL[12] + DECLARE readout_seed_q0 INTEGER[1] + DECLARE readout_randomization_q0 REAL[3] + DECLARE readout_seed_q1 INTEGER[1] + DECLARE readout_randomization_q1 REAL[3] + DECLARE readout_seed_q2 INTEGER[1] + DECLARE readout_randomization_q2 REAL[3] + DECLARE readout_seed_q3 INTEGER[1] + DECLARE readout_randomization_q3 REAL[3] + DECLARE readout_seed_q4 INTEGER[1] + DECLARE readout_randomization_q4 REAL[3] + DECLARE readout_seed_q5 INTEGER[1] + DECLARE readout_randomization_q5 REAL[3] DECLARE pauli_conjugates_map INTEGER[16] DECLARE pauli_seed_q0 INTEGER[2] DECLARE pauli_seed_q1 INTEGER[2] @@ -795,24 +803,6 @@ DECLARE unitaries_q5 REAL[81] DECLARE modulo_counter INTEGER[1] DECLARE is_mod_zero BIT[1] - DECLARE readout_seed_q0 INTEGER[1] - DECLARE readout_source_unitaries_q0 REAL[36] - DECLARE readout_randomization_q0 REAL[3] - DECLARE readout_seed_q1 INTEGER[1] - DECLARE readout_source_unitaries_q1 REAL[36] - DECLARE readout_randomization_q1 REAL[3] - DECLARE readout_seed_q2 INTEGER[1] - DECLARE readout_source_unitaries_q2 REAL[36] - DECLARE readout_randomization_q2 REAL[3] - DECLARE readout_seed_q3 INTEGER[1] - DECLARE readout_source_unitaries_q3 REAL[36] - DECLARE readout_randomization_q3 REAL[3] - DECLARE readout_seed_q4 INTEGER[1] - DECLARE readout_source_unitaries_q4 REAL[36] - DECLARE readout_randomization_q4 REAL[3] - DECLARE readout_seed_q5 INTEGER[1] - DECLARE readout_source_unitaries_q5 REAL[36] - DECLARE readout_randomization_q5 REAL[3] DECLARE unitary_angle_offset INTEGER[1] DECLARE break BIT[1] DECLARE rc_seed_index INTEGER[1] @@ -823,6 +813,30 @@ DECLARE current_seeds_q3 INTEGER[2] DECLARE current_seeds_q4 INTEGER[2] DECLARE current_seeds_q5 INTEGER[2] + CALL choose_random_real_sub_regions readout_randomization_q0 readout_source_angles 3 readout_seed_q0[0] + CALL choose_random_real_sub_regions readout_randomization_q1 readout_source_angles 3 readout_seed_q1[0] + CALL choose_random_real_sub_regions readout_randomization_q2 readout_source_angles 3 readout_seed_q2[0] + CALL choose_random_real_sub_regions readout_randomization_q3 readout_source_angles 3 readout_seed_q3[0] + CALL choose_random_real_sub_regions readout_randomization_q4 readout_source_angles 3 readout_seed_q4[0] + CALL choose_random_real_sub_regions readout_randomization_q5 readout_source_angles 3 readout_seed_q5[0] + MOVE unitaries_q0[78] readout_randomization_q0[0] + MOVE unitaries_q0[79] readout_randomization_q0[1] + MOVE unitaries_q0[80] readout_randomization_q0[2] + MOVE unitaries_q1[78] readout_randomization_q1[0] + MOVE unitaries_q1[79] readout_randomization_q1[1] + MOVE unitaries_q1[80] readout_randomization_q1[2] + MOVE unitaries_q2[78] readout_randomization_q2[0] + MOVE unitaries_q2[79] readout_randomization_q2[1] + MOVE unitaries_q2[80] readout_randomization_q2[2] + MOVE unitaries_q3[78] readout_randomization_q3[0] + MOVE unitaries_q3[79] readout_randomization_q3[1] + MOVE unitaries_q3[80] readout_randomization_q3[2] + MOVE unitaries_q4[78] readout_randomization_q4[0] + MOVE unitaries_q4[79] readout_randomization_q4[1] + MOVE unitaries_q4[80] readout_randomization_q4[2] + MOVE unitaries_q5[78] readout_randomization_q5[0] + MOVE unitaries_q5[79] readout_randomization_q5[1] + MOVE unitaries_q5[80] readout_randomization_q5[2] ADD modulo_counter[0] 1 GE is_mod_zero[0] modulo_counter[0] 50 CALL if_then_else_integer modulo_counter[0] is_mod_zero[0] 0 modulo_counter[0] @@ -941,35 +955,11 @@ SHR current_seeds_q3[0] 2 SHR current_seeds_q4[0] 2 SHR current_seeds_q5[0] 2 - CALL choose_random_real_sub_regions readout_randomization_q0 readout_source_unitaries_q0 3 readout_seed_q0[0] - MOVE unitaries_q0[78] readout_randomization_q0[0] - MOVE unitaries_q0[79] readout_randomization_q0[1] - MOVE unitaries_q0[80] readout_randomization_q0[2] CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 - CALL choose_random_real_sub_regions readout_randomization_q1 readout_source_unitaries_q1 3 readout_seed_q1[0] - MOVE unitaries_q1[78] readout_randomization_q1[0] - MOVE unitaries_q1[79] readout_randomization_q1[1] - MOVE unitaries_q1[80] readout_randomization_q1[2] CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL choose_random_real_sub_regions readout_randomization_q2 readout_source_unitaries_q2 3 readout_seed_q2[0] - MOVE unitaries_q2[78] readout_randomization_q2[0] - MOVE unitaries_q2[79] readout_randomization_q2[1] - MOVE unitaries_q2[80] readout_randomization_q2[2] CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map - CALL choose_random_real_sub_regions readout_randomization_q3 readout_source_unitaries_q3 3 readout_seed_q3[0] - MOVE unitaries_q3[78] readout_randomization_q3[0] - MOVE unitaries_q3[79] readout_randomization_q3[1] - MOVE unitaries_q3[80] readout_randomization_q3[2] CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map - CALL choose_random_real_sub_regions readout_randomization_q4 readout_source_unitaries_q4 3 readout_seed_q4[0] - MOVE unitaries_q4[78] readout_randomization_q4[0] - MOVE unitaries_q4[79] readout_randomization_q4[1] - MOVE unitaries_q4[80] readout_randomization_q4[2] CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map - CALL choose_random_real_sub_regions readout_randomization_q5 readout_source_unitaries_q5 3 readout_seed_q5[0] - MOVE unitaries_q5[78] readout_randomization_q5[0] - MOVE unitaries_q5[79] readout_randomization_q5[1] - MOVE unitaries_q5[80] readout_randomization_q5[2] CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 LABEL @pulse_program DELAY 0 0.0002 diff --git a/test/unit/test_qpu_randomized_compiling.py b/test/unit/test_qpu_randomized_compiling.py index 8a249f151..18594597c 100644 --- a/test/unit/test_qpu_randomized_compiling.py +++ b/test/unit/test_qpu_randomized_compiling.py @@ -6,7 +6,7 @@ """ import json -from collections.abc import Mapping, Sequence +from collections.abc import Mapping from dataclasses import dataclass from itertools import product from pathlib import Path @@ -286,7 +286,7 @@ def test_pauli_cache_accumulation(configuration: rc.RandomizedCompilingConfigura @dataclass(frozen=True) class _U2Randomization: random_indices: NDArray[np.int8] - source_unitaries: NDArray[np.complex128] + source_unitary_angles: NDArray[np.float64] qubit_index_map: dict[int, int] final_layer_index: int @@ -295,7 +295,7 @@ def __getitem__(self, key: rc.PauliPairKey) -> NDArray[np.complex128]: raise KeyError(f"Only the final layer index {self.final_layer_index} is valid for this provider, got {key.layer_index}") qubit_index = self.qubit_index_map[key.qubit] unitary_index = self.random_indices[qubit_index] - return self.source_unitaries[unitary_index] + return rc._compute_unitary_from_zxzxz_angles(self.source_unitary_angles[unitary_index]) def __contains__(self, key: rc.PauliPairKey) -> bool: return key.layer_index == self.final_layer_index and key.qubit in self.qubit_index_map @@ -306,27 +306,6 @@ def keys(self) -> tuple[rc.PauliPairKey, ...]: for qubit in self.qubit_index_map ) - @classmethod - def for_qubits( - cls, - qubits_sorted: Sequence[int], - /, - source_unitaries: NDArray[np.complex128], - shot_count: int, - final_layer_index: int, - seeds: Mapping[int, int] - ) -> "_U2Randomization": - qubit_index_map = {qubit: index for index, qubit in enumerate(qubits_sorted)} - random_indices = np.asarray([ - choose_random_real_sub_region_indices(PrngSeedValue(seeds[qubit]), shot_count, 1, len(source_unitaries))[0] - for qubit_index, qubit in enumerate(qubits_sorted) - ], dtype=np.int8) - return cls( - random_indices=random_indices, - source_unitaries=source_unitaries, - qubit_index_map=qubit_index_map, - final_layer_index=final_layer_index, - ) _TETRAHEDRAL_ANGLES = np.array([[ 0.0, 0.5, 0.5], [-1./4, 0.0, -1./4], @@ -339,13 +318,13 @@ def for_qubits( [ -1./4, 1./4, 0.0], [ 1./4, 1./4, 0.5], [-1./4, 1./4, 0.5], - [ 1./4, 1./4, 0.0]], dtype=np.float64).flatten().tolist() + [ 1./4, 1./4, 0.0]], dtype=np.float64) @dataclass(frozen=True) class ReadoutRandomization: qubits_sorted: tuple[int, ...] - readout_source_angles: tuple[float, ...] = tuple(_TETRAHEDRAL_ANGLES) + readout_source_angles: NDArray[np.float64] = _TETRAHEDRAL_ANGLES def build_quil_program(self) -> Program: program = Program() @@ -367,7 +346,7 @@ def build_quil_program(self) -> Program: return program def generate_seeds(self, rng: np.random.Generator) -> dict[int, int]: - return {qubit: rng.integers(-2**47, 2**47 - 1, dtype=np.int64).item() for qubit in self.qubits_sorted} + return {qubit: rng.integers(0, rc._MAX_SEQUENCER_VALUE + 1, dtype=np.int64).item() for qubit in self.qubits_sorted} def build_memory_map(self, seeds: Mapping[int, int]) -> dict[str, list[float]]: memory_map = {} @@ -378,12 +357,16 @@ def build_memory_map(self, seeds: Mapping[int, int]) -> dict[str, list[float]]: return memory_map def build_final_source_unitaries(self, seeds: Mapping[int, int], shot_count: int, final_layer_index: int) -> _U2Randomization: - return _U2Randomization.for_qubits( - self.qubits_sorted, - source_unitaries=np.asarray(self.readout_source_angles, dtype=np.complex128), - shot_count=shot_count, - final_layer_index=final_layer_index, - seeds=seeds + qubit_index_map = {qubit: index for index, qubit in enumerate(self.qubits_sorted)} + random_indices = np.asarray([ + choose_random_real_sub_region_indices(PrngSeedValue(seeds[qubit]), shot_count - 1, 1, len(self.readout_source_angles))[0] + for qubit in self.qubits_sorted + ], dtype=np.int8) + return _U2Randomization( + random_indices=random_indices, + source_unitary_angles=self.readout_source_angles, + qubit_index_map=qubit_index_map, + final_layer_index=final_layer_index ) @@ -411,14 +394,12 @@ def build_quil_program(self) -> Program: def generate_seeds_and_memory_map(self, rng: np.random.Generator) -> tuple[dict[str, Union[list[int], list[float]]], Optional[dict[int, int]]]: memory_map: dict[str, Union[list[int], list[float]]] = {} rc_seeds = self.configuration.generate_seed_values(rng) - + memory_map.update(self.configuration.build_memory_map(rc_seeds, rc.build_memory_values_for_paulis_conjugates_map(rc.PAULI_CONJUGATES_MAPS["CZ"]))) if self.readout_randomization is not None: readout_seeds = self.readout_randomization.generate_seeds(rng) memory_map.update(self.readout_randomization.build_memory_map(readout_seeds)) else: readout_seeds = None - - memory_map.update(self.configuration.build_memory_map(rc_seeds, rc.build_memory_values_for_paulis_conjugates_map(rc.PAULI_CONJUGATES_MAPS["CZ"]))) memory_map.update(generate_source_unitaries(self.configuration, rng)) return memory_map, readout_seeds From e8dea0f78c64fba2e0d38d19907625403e591ec9 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Wed, 24 Jun 2026 11:15:58 -0700 Subject: [PATCH 57/59] refactor: new interface for apply readout randomization --- pyquil/_qpu/randomized_compiling.py | 270 ++++++++++++------ test/e2e/test_qpu_randomized_compiling.py | 21 +- ...piling_configuration[configuration12].json | 2 +- ...piling_configuration[configuration13].json | 2 +- ...piling_configuration[configuration14].json | 2 +- ...piling_configuration[configuration15].json | 2 +- .../test_qpu_randomized_compiling.ambr | 136 ++++----- test/unit/test_qpu_randomized_compiling.py | 143 +++++----- uv.lock | 3 + 9 files changed, 328 insertions(+), 253 deletions(-) create mode 100644 uv.lock diff --git a/pyquil/_qpu/randomized_compiling.py b/pyquil/_qpu/randomized_compiling.py index 50373dc20..5f1e83929 100644 --- a/pyquil/_qpu/randomized_compiling.py +++ b/pyquil/_qpu/randomized_compiling.py @@ -22,11 +22,11 @@ import math from abc import ABC, abstractmethod -from collections.abc import Container, Generator, Iterable, Mapping, Sequence +from collections.abc import Generator, Mapping, Sequence from dataclasses import dataclass, field from enum import Enum from functools import cached_property -from typing import Optional, Protocol, Union, cast +from typing import Optional, Union, cast import numpy as np from numpy.typing import NDArray @@ -149,7 +149,6 @@ class PauliPairKey: def _accumulate_pauli_pairs( existing_pairs: dict[PauliPairKey, tuple[Optional[int], tuple["PauliLiteral", "PauliLiteral"]]], new_pairs: dict[PauliPairKey, tuple[Optional[int], tuple["PauliLiteral", "PauliLiteral"]]], - non_accumulative_pauli_pairs: set[PauliPairKey], ) -> dict[PauliPairKey, tuple[Optional[int], tuple["PauliLiteral", "PauliLiteral"]]]: """Accumulate new Pauli pairs into the existing accumulator. @@ -160,12 +159,9 @@ def _accumulate_pauli_pairs( if key not in existing_pairs: raise ValueError(f"Key {key} not found in accumulator.") _, existing_pair = existing_pairs[key] - if key in non_accumulative_pauli_pairs: - accumulator[key] = (seed, new_pair) - else: - _, accumulated_next = existing_pair[1] * new_pair[1] - _, accumulated_previous = new_pair[0] * existing_pair[0] - accumulator[key] = (seed, (accumulated_previous, accumulated_next)) + _, accumulated_next = existing_pair[1] * new_pair[1] + _, accumulated_previous = new_pair[0] * existing_pair[0] + accumulator[key] = (seed, (accumulated_previous, accumulated_next)) return accumulator @@ -188,7 +184,8 @@ class _PauliSeedAndPairCache: paulis_per_value: int def accumulate( - self, sequence_count: int, non_accumulative_pauli_pairs: Optional[Container[PauliPairKey]] = None + self, + sequence_count: int, ) -> "dict[PauliPairKey, tuple[Optional[int], tuple[PauliLiteral, PauliLiteral]]]": """Iterate over the requested `sequence_count` and accumulate the final Pauli pair for each qubit and layer index. @@ -198,7 +195,6 @@ def accumulate( """ current = self accumulated_pauli_pairs = None - non_accumulative_pauli_pairs = non_accumulative_pauli_pairs or set() for sequence_index in range(sequence_count): pauli_pairs = {} for qubit in self.qubits_sorted: @@ -208,9 +204,7 @@ def accumulate( if accumulated_pauli_pairs is None: accumulated_pauli_pairs = pauli_pairs else: - accumulated_pauli_pairs = _accumulate_pauli_pairs( - accumulated_pauli_pairs, pauli_pairs, non_accumulative_pauli_pairs - ) + accumulated_pauli_pairs = _accumulate_pauli_pairs(accumulated_pauli_pairs, pauli_pairs) if sequence_index < sequence_count - 1: current = next(current) if accumulated_pauli_pairs is None: @@ -747,12 +741,6 @@ def _requires_seed_transition( return requires_seed_transition -class _FinalSourceUnitaryProvider(Protocol): - def __getitem__(self, key: PauliPairKey) -> NDArray[np.complex128]: ... - def __contains__(self, key: PauliPairKey) -> bool: ... - def keys(self) -> Iterable[PauliPairKey]: ... - - @dataclass(frozen=True) class RandomizedCompilingConfiguration: """A utility for configuring randomized compiling on a Rigetti QPU. @@ -811,6 +799,10 @@ class RandomizedCompilingConfiguration: in conjuction with `track_pauli_frames`. """ + skip_first_layer: bool = False + + skip_final_layer: bool = False + def __post_init__(self) -> None: self._validate() @@ -971,8 +963,10 @@ def build_memory_map( memory_map[self.variables.current_seeds(q)] = [0] * current_seed_length if self.shots_per_randomization is not None: - memory_map[self.shots_per_randomization.variables.modulo_counter] = [-1] - memory_map[self.shots_per_randomization.variables.is_mod_zero] = [1] + memory_map[self.shots_per_randomization.variables.modulo_counter] = [ + self.shots_per_randomization.shots_per_randomization - 1 + ] + memory_map[self.shots_per_randomization.variables.is_mod_zero] = [0] return memory_map @@ -983,9 +977,10 @@ def _build_quil_instructions_for_base_cycle( is_final_base_cycle: bool = False, ) -> list[InstructionDesignator]: instructions: list[InstructionDesignator] = [] - for cycle_index, cycle in enumerate(self._base_twirled_cycles): is_final_cycle = cycle_index == self._base_cycle_length - 1 + if is_final_cycle and is_final_base_cycle and self.skip_final_layer: + break requires_seed_transition = _requires_seed_transition( cycle_index=cycle_index, is_final_cycle=is_final_cycle, @@ -1003,7 +998,6 @@ def _build_quil_instructions_for_base_cycle( cursor = _PauliCursor.DEFAULT_POSITION for qubit in self.qubits_sorted: - source_unitaries = self.variables.source_unitaries(qubit) edge = cycle.two_qubit_gates[qubit] if qubit in cycle.two_qubit_gates else None previous: Union[_PauliConjugate, _PauliReference, PauliLiteral] if self.invert_random_paulis and edge is not None: @@ -1034,7 +1028,7 @@ def _build_quil_instructions_for_base_cycle( ) call = pauli_pair.build_quil_call_instruction( inst.CallArgument.from_identifier(self.variables.twirled_unitaries(qubit)), - inst.CallArgument.from_identifier(source_unitaries), + inst.CallArgument.from_identifier(self.variables.source_unitaries(qubit)), inst.CallArgument.from_memory_reference( inst.MemoryReference(self.variables.unitary_angle_offset, 0) ), @@ -1146,20 +1140,22 @@ def _build_quil_instructions_for_randomized_compiling(self) -> list[InstructionD ) ) # first cycle. - for q in self.qubits_sorted: - pauli_pair = _PauliPair( - previous=PauliLiteral.I, - next=_PauliReference( - memory_reference=inst.MemoryReference(self.variables.pauli_seed(q), 0), pauli_index=0 - ), - ) - call = pauli_pair.build_quil_call_instruction( - inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), - inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), - inst.CallArgument.from_immediate(complex(0, 0)), - ) - if call is not None: - instructions.append(call) + if not self.skip_first_layer: + for q in self.qubits_sorted: + call = self.apply_pauli_pair(qubit=q, layer_index=0, unitary_offset=0) + pauli_pair = _PauliPair( + previous=PauliLiteral.I, + next=_PauliReference( + memory_reference=inst.MemoryReference(self.variables.pauli_seed(q), 0), pauli_index=0 + ), + ) + call = pauli_pair.build_quil_call_instruction( + inst.CallArgument.from_identifier(self.variables.twirled_unitaries(q)), + inst.CallArgument.from_identifier(self.variables.source_unitaries(q)), + inst.CallArgument.from_immediate(complex(0, 0)), + ) + if call is not None: + instructions.append(call) instructions.append( ClassicalMove( MemoryReference(self.variables.unitary_angle_offset, 0), @@ -1254,13 +1250,96 @@ def build_quil_program( return program + def apply_pauli_pair( + self, + qubit: int, + layer_index: int, + source_unitaries: Optional[str] = None, + target_unitaries: Optional[str] = None, + unitary_offset: Optional[Union[MemoryReference, int, float]] = None, + ) -> Union[Call, None]: + """Apply the twirl to the source unitary for a given qubit and layer index. + + This function is for applying an existing twirl to a source unitary for a specific qubit and layer index. Note, + this does not step the PRNG. This is useful when `ShotsPerRandomization` is configured and we want to apply the existing + twirl a freshly drawn unitary (typically by invoking `choose_random_real_sub_regions`). + """ + if layer_index == 0 or not self.invert_random_paulis: + previous_pauli = PauliLiteral.I + else: + previous_twirled_cycle_index = (layer_index - 1) % self._base_cycle_length + previous_twirled_cycle = self._base_twirled_cycles[previous_twirled_cycle_index] + if qubit in previous_twirled_cycle.two_qubit_gates: + edge = previous_twirled_cycle.two_qubit_gates[qubit] + is_pauli_left = qubit == edge[0] + previous_layer_index = layer_index - 1 + seed_index = previous_layer_index // self._paulis_per_value + pauli_index = previous_layer_index % self._paulis_per_value + previous_pauli = _PauliConjugate( + pauli_left=_PauliReference( + memory_reference=inst.MemoryReference(self.variables.pauli_seed(edge[0]), seed_index), + pauli_index=pauli_index, + ), + pauli_right=_PauliReference( + memory_reference=inst.MemoryReference(self.variables.pauli_seed(edge[1]), seed_index), + pauli_index=pauli_index, + ), + is_left_conjugate=is_pauli_left, + ) + elif qubit in previous_twirled_cycle.idle_qubits: + previous_layer_index = layer_index - 1 + seed_index = previous_layer_index // self._paulis_per_value + pauli_index = previous_layer_index % self._paulis_per_value + previous_pauli = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.pauli_seed(qubit), seed_index), + pauli_index=pauli_index, + ) + else: + previous_pauli = PauliLiteral.I + + if layer_index == self._cycle_count: + next_pauli = PauliLiteral.I + else: + next_twirled_cycle_index = layer_index % self._base_cycle_length + next_twirled_cycle = self._base_twirled_cycles[next_twirled_cycle_index] + if qubit in next_twirled_cycle: + next_seed_index = layer_index // self._paulis_per_value + next_pauli_index = layer_index % self._paulis_per_value + next_pauli = _PauliReference( + memory_reference=inst.MemoryReference(self.variables.pauli_seed(qubit), next_seed_index), + pauli_index=next_pauli_index, + ) + else: + next_pauli = PauliLiteral.I + pauli_pair = _PauliPair( + previous=previous_pauli, + next=next_pauli, + ) + if unitary_offset is None: + unitary_offset_argument = inst.CallArgument.from_memory_reference( + inst.MemoryReference(self.variables.unitary_angle_offset, 0) + ) + elif isinstance(unitary_offset, int): + unitary_offset_argument = inst.CallArgument.from_immediate(complex(unitary_offset)) + elif isinstance(unitary_offset, MemoryReference): + unitary_offset_argument = inst.CallArgument.from_memory_reference( + inst.MemoryReference(unitary_offset.name, unitary_offset.offset) + ) + else: + unitary_offset_argument = inst.CallArgument.from_immediate(complex(unitary_offset)) + + return pauli_pair.build_quil_call_instruction( + inst.CallArgument.from_identifier(source_unitaries or self.variables.source_unitaries(qubit)), + inst.CallArgument.from_identifier(target_unitaries or self.variables.twirled_unitaries(qubit)), + unitary_offset_argument, + ) + def verify_final_memory( self, final_memory: dict[str, Union[list[int], list[float]]], original_memory: dict[str, Union[list[int], list[float]]], shot_count: int, pauli_conjugates_map: Mapping[tuple[PauliLiteral, PauliLiteral], tuple[PauliLiteral, PauliLiteral]], - final_source_unitary_provider: Optional[_FinalSourceUnitaryProvider] = None, ) -> None: """Verify that the final memory state matches expectations. @@ -1271,42 +1350,18 @@ def verify_final_memory( unitaries specified for the (qubit, layer) and verify that the resulting unitary is equal to the twirled unitaries read from the final memory for the (qubit, layer). """ - if shot_count == 0: - raise ValueError("shot_count must be greater than 0 for final memory verification") - if self.shots_per_randomization is not None: - prng_sequence_length = math.ceil(shot_count / self.shots_per_randomization.shots_per_randomization) - 1 - if prng_sequence_length == 0: - raise ValueError( - f"shot_count {shot_count} is too low for the specified shots_per_randomization {self.shots_per_randomization.shots_per_randomization}" - ) - else: - prng_sequence_length = shot_count - - if self.variables.twirled_overwrites_source_unitaries: - # accumulate the Paulis 1 PRNG step at a time. - prng_sequence_steps = 1 - prng_sequence_count = prng_sequence_length - else: - # advance the entire prng sequence at once, effectively without accumulation. - prng_sequence_steps = prng_sequence_length - prng_sequence_count = 1 - cycles = self._base_twirled_cycles * self.base_cycle_repetitions - pauli_cache = _PauliSeedAndPairCache( - original_seeds={ - q: cast(list[int], original_memory[self.variables.pauli_seed(q)]) for q in self.qubits_sorted - }, + pauli_pairs = self.get_final_pauli_pairs( + shot_count=shot_count, pauli_conjugates_map=pauli_conjugates_map, - cycles=cycles, - qubits_sorted=self.qubits_sorted, - prng_sequence_steps=prng_sequence_steps, - invert_random_paulis=self.invert_random_paulis, - paulis_per_value=self._paulis_per_value, - ) - pauli_pairs = pauli_cache.accumulate( - prng_sequence_count, - set(final_source_unitary_provider.keys()) if final_source_unitary_provider is not None else None, + random_seeds=np.asarray( + [ + [original_memory[self.variables.pauli_seed(qubit)][i] for i in range(self._seed_length)] + for qubit in self.qubits_sorted + ], + dtype=np.int64, + ), ) - + cycles = self._base_twirled_cycles * self.base_cycle_repetitions for q in self.qubits_sorted: for layer_index in range(len(cycles) + 1): key = PauliPairKey( @@ -1322,7 +1377,10 @@ def verify_final_memory( f"final seed value mismatch for q{q}, l{layer_index}: got " f"{found_final_pauli_seed}, expected {expected_final_seed_value}" ) - + if layer_index == 0 and self.skip_first_layer: + continue + if layer_index == len(cycles) and self.skip_final_layer: + continue start_angle = layer_index * _ANGLES_PER_UNITARY end_angle = start_angle + _ANGLES_PER_UNITARY found_final_unitary_angles = tuple( @@ -1330,30 +1388,61 @@ def verify_final_memory( ) found_final_unitary = _compute_unitary_from_zxzxz_angles(found_final_unitary_angles) - if final_source_unitary_provider is not None and key in final_source_unitary_provider: - source_unitary = final_source_unitary_provider[key] - print(f"Using final source unitary for q{q} layer {layer_index}: {source_unitary}") - else: - source_unitary = _compute_unitary_from_zxzxz_angles( - original_memory[self.variables.source_unitaries(q)][start_angle:end_angle] - ) + source_unitary_angles = original_memory[self.variables.source_unitaries(q)][start_angle:end_angle] + source_unitary = _compute_unitary_from_zxzxz_angles(source_unitary_angles) expected_unitary = ( expected_final_pauli_pair[1].matrix @ source_unitary @ expected_final_pauli_pair[0].matrix ) if not _unitary_equal(found_final_unitary, expected_unitary): raise ValueError( f"unitary mismatch for q{q} layer {layer_index}: got {found_final_unitary_angles} " - f"for source {source_unitary} and final pauli pair: {expected_final_pauli_pair}" + f"for source {source_unitary_angles} and final pauli pair: {expected_final_pauli_pair}" ) + def get_final_pauli_pairs( + self, + shot_count: int, + pauli_conjugates_map: Mapping[tuple[PauliLiteral, PauliLiteral], tuple[PauliLiteral, PauliLiteral]], + random_seeds: NDArray[np.int64], + accumulate: Optional[bool] = None, + ) -> dict[PauliPairKey, tuple[Optional[int], tuple[PauliLiteral, PauliLiteral]]]: + """Get the final Pauli frames for each qubit and layer after a sequence of shots. + + This is useful for verifying that the final memory read off the QPU is consistent with the expected random Paulis calculated + on the client (see `verify_final_paulis`). + """ + cycles = self._base_twirled_cycles * self.base_cycle_repetitions + accumulate = accumulate if accumulate is not None else self.variables.twirled_overwrites_source_unitaries + sequence_count = shot_count + if self.shots_per_randomization is not None: + sequence_count = math.ceil(shot_count / self.shots_per_randomization.shots_per_randomization) + if accumulate: + prng_sequence_steps = 1 + prng_sequence_count = sequence_count + else: + prng_sequence_steps = sequence_count + prng_sequence_count = 1 + + pauli_cache = _PauliSeedAndPairCache( + original_seeds={q: random_seeds[qubit_index].tolist() for qubit_index, q in enumerate(self.qubits_sorted)}, + pauli_conjugates_map=pauli_conjugates_map, + cycles=cycles, + qubits_sorted=self.qubits_sorted, + prng_sequence_steps=prng_sequence_steps, + invert_random_paulis=self.invert_random_paulis, + paulis_per_value=self._paulis_per_value, + ) + return pauli_cache.accumulate(prng_sequence_count) + def track_pauli_frames( self, - sequence_count: int, + shot_count: int, pauli_conjugates_map: Mapping[tuple[PauliLiteral, PauliLiteral], tuple[PauliLiteral, PauliLiteral]], random_seeds: NDArray[np.int64], - non_accumulative_pauli_pairs: Optional[Container[PauliPairKey]] = None, + accumulate: Optional[bool] = None, ) -> Generator[dict[PauliPairKey, tuple[Optional[int], tuple[PauliLiteral, PauliLiteral]]], None, None]: cycles = self._base_twirled_cycles * self.base_cycle_repetitions + accumulate = accumulate if accumulate is not None else self.variables.twirled_overwrites_source_unitaries pauli_cache = _PauliSeedAndPairCache( original_seeds={q: random_seeds[qubit_index].tolist() for qubit_index, q in enumerate(self.qubits_sorted)}, pauli_conjugates_map=pauli_conjugates_map, @@ -1364,15 +1453,16 @@ def track_pauli_frames( paulis_per_value=self._paulis_per_value, ) accumulated_pauli_pairs = None + sequence_count = shot_count + if self.shots_per_randomization is not None: + sequence_count = math.ceil(shot_count / self.shots_per_randomization.shots_per_randomization) for sequence_index in range(sequence_count): - pauli_pairs = pauli_cache.accumulate(1, non_accumulative_pauli_pairs) - if self.variables.twirled_overwrites_source_unitaries: + pauli_pairs = pauli_cache.accumulate(1) + if accumulate: if accumulated_pauli_pairs is None: accumulated_pauli_pairs = pauli_pairs else: - accumulated_pauli_pairs = _accumulate_pauli_pairs( - accumulated_pauli_pairs, pauli_pairs, non_accumulative_pauli_pairs or set() - ) + accumulated_pauli_pairs = _accumulate_pauli_pairs(accumulated_pauli_pairs, pauli_pairs) yield accumulated_pauli_pairs else: yield pauli_pairs diff --git a/test/e2e/test_qpu_randomized_compiling.py b/test/e2e/test_qpu_randomized_compiling.py index 8df79a8bc..95c22d4c3 100644 --- a/test/e2e/test_qpu_randomized_compiling.py +++ b/test/e2e/test_qpu_randomized_compiling.py @@ -53,10 +53,10 @@ def test_qpu_randomized_compiling( program = test_case.build_quil_program() with open('.scratch/program.quil', 'w') as f: f.write(program.out()) - program += trc.build_cycle_program(configuration) + program += trc.build_cycle_program(configuration, test_case.readout_randomization) pauli_conjugates_map = rc.PAULI_CONJUGATES_MAPS["CZ"] - memory_map, readout_seeds = test_case.generate_seeds_and_memory_map(rng) + memory_map, rc_seeds, readout_seeds = test_case.generate_seeds_and_memory_map(rng) translation_result = translate(program.out(), trc.TEST_SHOT_COUNT, quantum_processor_id, client_configuration) bitstrings, final_memory = _get_bitstrings_and_final_memory( @@ -71,16 +71,21 @@ def test_qpu_randomized_compiling( import json json.dump(final_memory, f) - final_source_unitary_provider: rc._FinalSourceUnitaryProvider | None = None - if test_case.readout_randomization is not None: - if readout_seeds is None: - raise ValueError("Readout seeds should not be None if readout randomization is provided.") - final_source_unitary_provider = test_case.readout_randomization.build_final_source_unitaries(readout_seeds, trc.TEST_SHOT_COUNT, test_case.configuration._cycle_count) configuration.verify_final_memory( final_memory, memory_map, trc.TEST_SHOT_COUNT, pauli_conjugates_map, - final_source_unitary_provider=final_source_unitary_provider ) + if test_case.readout_randomization is not None: + if readout_seeds is None: + raise ValueError("Readout seeds should not be None when readout randomization is provided.") + pauli_pairs = test_case.configuration.get_final_pauli_pairs(trc.TEST_SHOT_COUNT, pauli_conjugates_map, rc_seeds, accumulate=False) + test_case.readout_randomization.verify_final_memory( + final_memory, + readout_seeds, + trc.TEST_SHOT_COUNT, + test_case.configuration._cycle_count, + pauli_pairs, + ) diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration12].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration12].json index 212cc5174..b2125efd5 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration12].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration12].json @@ -1 +1 @@ -{"current_seeds_q1": [34869513621375, 0], "is_mod_zero": [0], "pauli_seed_q0": [56235133306163, 46271745691961], "unitaries_q5": [0.3129390950249693, 0.12239531945394688, 0.1890155741254489, -0.36390183284432354, 0.4611227243477174, -0.27559479547496224, -0.1680911213450038, 0.36306701332482305, -0.20914928335500704, -0.36047512367334633, 0.35148149681080554, 0.44237399269967526, -0.20788732949937128, -0.42125761916947013, 0.23151096046864694, 0.44346653122211066, 0.3639817937635108, 0.2619659590347574, 0.10288930032783838, 0.3580204827871398, 0.3404604798712434, -0.15289293302358686, 0.37510373420446186, -0.1506412529301997, -0.3624805003573677, 0.4916932343136651, 0.008483669473928757, 0.30633288698527394, 0.3064881637397292, -0.17038852402531646, 0.4190199539448187, 0.3060016188269046, 0.035788178865786335, 0.49744699376657664, 0.18040364645526452, -0.34197805774659074, 0.07742971955186206, 0.2866464046533963, 0.048068057122417684, 0.37205766264134255, -0.028811953574859217, -0.44868171025627746, 0.15650842079780958, -0.16903330759792823, -0.09463038726272543, 0.18783632090951485, 0.13905289215915317, -0.3402185204002137, -0.4438225748289497, -0.06458650101018293, 0.21016554839495427, 0.30954878428748955, -0.4245386550744783, -0.03693104996670726, -0.015578394763785752, -0.13476795769143735, 0.056311052859296495, 0.12846956718569658, -0.19139346063203533, 0.02053440149051511, 0.1391393899933604, 0.3499140847639808, 0.26350517884386804, -0.3527343250287096, 0.2676984602701111, -0.10812050711245647, 0.29619104176566324, 0.31659870927306955, 0.3039638195146246, 0.032620336454343146, -0.32323111834664076, -0.05397516644787004, 0.3078347140316957, 0.06713160476753188, 0.27818622794244163, 0.45050461907741024, 0.28147714842391025, -0.4283825898106137, -0.3379126563785775, 0.18432922293216691, -0.40276701807278315], "pauli_seed_q4": [-132213089617295, -136889955735746], "rc_base_cycle_loop_index": [11], "current_seeds_q0": [11567936422990, 0], "pauli_seed_q2": [-133056412874444, 54594642012057], "unitaries_q0": [-0.028784568617961526, -0.07427740793488624, -0.07888407435634903, -0.2331221445808893, 0.13331130172538863, 0.12425959266423448, -0.34215653660366385, 0.26111010223272757, 0.20147486932348357, 0.026809000875157807, -0.15171013965482416, 0.039234916317450796, 0.12315582717864615, 0.028899062065068648, 0.20420834050016623, 0.18029413960657692, 0.2479726770099262, 0.31375414547666836, 0.49105233325456865, 0.08201948178145457, 0.2836154606077912, -0.18180393326804634, 0.4447669819517266, -0.20735831441055907, -0.2567003523160629, -0.4670840735196755, 0.1566001925728422, -0.4670244868340099, -0.012842477370785588, 0.17073608461863543, 0.050091884321112445, 0.15970901771559554, 0.39341591753839467, 0.2551812027350344, 0.21711220189177283, 0.1774668241783388, -0.1072273616724928, -0.44759812516522146, 0.09988083390955893, -0.2846662038892873, 0.192623419867207, -0.0048050564673012275, 0.00910933552858495, 0.4655014605768244, -0.17201116439296982, -0.18967701752599453, 0.42551493610063673, -0.20665942225402745, -0.08872518057716405, 0.07798778071790835, -0.4695275208591738, 0.3706380358472927, -0.33980968285915836, -0.3303966837243273, -0.3385085508172061, -0.3817490270312973, -0.3610912954963368, -0.24209820089131995, -0.49320924723211945, 0.4569557480242459, -0.17261399654285725, 0.25227068013025544, 0.19660653963240193, -0.385197581175035, -0.327295566650033, -0.1306577643126623, -0.44968060926099085, -0.42638081326169797, -0.26228990149481035, 0.1496960222960304, -0.28778184548331254, -0.43123595744645016, -0.23108886334528123, -0.019645791898181386, 0.026563378638172708, 0.1572765640302265, 0.22907080345830977, 0.2402723677717553, 0.3177048344177287, -0.439668073429921, 0.447220912180196], "current_seeds_q3": [31155819389228, 0], "unitaries_q2": [0.34603826044352104, 0.19511749309766913, -0.4145682812563436, -0.036928592509120506, 0.059332429419090005, -0.20553371694326472, 0.4140690144830721, 0.14970634357845114, 0.21420182853494651, -0.18760028191363887, -0.21514255278739114, -0.44268147867660446, 0.22201092389900978, 0.47367514134620947, 0.13755156757528653, 0.4512413528363055, -0.47065008790002594, 0.1734552494365822, 0.1822764510861603, -0.16885000522517402, 0.07938718192367133, 0.3911759845303031, -0.29308952850711734, -0.32399096841614394, 0.009100451273553745, 0.48333014377647743, -0.13176156160845665, 0.03572518135114322, -0.4296253413034954, -0.16046335532868028, 0.28977728519420864, -0.4127736568831999, -0.2715537852772023, 0.3062633617185391, 0.11338753441490113, -0.2815125184840035, 0.3822599408908971, 0.07358068439263832, -0.14088216697814104, 0.4980383678436553, -0.0769597740948278, 0.15377505192719454, 0.3624304203777804, -0.11134404259463437, -0.03588381796728868, 0.2877355696129733, 0.08481943060488462, 0.2542984989212549, 0.20076546001369877, -0.04042363460278864, 0.38195891683453453, -0.03859037256674469, -0.4102183234952257, 0.42191404860625425, -0.45834207293470186, 0.12756873876982056, 0.06256391649851878, 0.18822005996944213, -0.05615858277264607, 0.22776589100726952, -0.1144049988797704, -0.47395468114399364, -0.11199589029635248, -0.11709447484012614, 0.08105917778548744, 0.4452687082975473, -0.2680115214576162, -0.4357020266360898, 0.09823984663831453, 0.02791825279908622, 0.1352842273606072, 0.1662718950803388, 0.03836408176927364, 0.3662952235666772, 0.32533129436627917, 0.3234122951464613, -0.0638019217320398, -0.4878383579652166, -0.2611003790152928, 0.23903804718794674, 0.17505008531592026], "break": [1], "pauli_seed_q5": [-133041699791850, 131854131899589], "pauli_seed_q3": [59797934191791, 124623277556914], "rc_seed_index": [2], "pauli_seed_q1": [60017443263372, 139478054485503], "unitaries_q3": [0.05117471301904075, 0.28248490237992385, 0.1197319469040572, -0.2730510105090431, 0.1723272746916713, 0.13920345844470106, 0.444153837704679, -0.23214969542699038, -0.20040028666454646, 0.2202751886667791, -0.21277422419174385, -0.051803177141760415, 0.18758437970965147, 0.4748645481993421, -0.41925850582989455, 0.4186349836360712, -0.445271186370789, 0.11199236531999546, -0.3310447281338149, 0.1961489222558832, -0.24364278945751394, -0.41373787501252934, -0.00924419505930274, -0.004993821532753628, -0.04517698380747248, 0.1263943744118592, -0.23042832066938956, -0.01339141244315556, 0.0644601318496747, -0.3651103820904211, 0.21860666928347428, -0.41366667379787003, -0.14230310373283928, -0.031850165179228895, 0.3784255819403306, -0.09788826968987507, -0.048175590932000745, 0.4487621872882883, 0.48170724460221237, 0.26548688207147464, 0.07076615400635333, 0.10022812594482033, -0.3296437281806952, 0.03370986586156732, 0.4221340290585829, -0.25690596776971475, -0.2626546274601331, -0.3080957061723453, -0.4098307847526783, -0.15289014355117203, 0.17828008632045567, -0.3344122924782482, 0.3960680926516851, -0.23762373139040704, -0.0613204268378027, -0.02917801601742198, -0.024064861372878, 0.27172818466370785, 0.10133381022337673, -0.2765323728482372, 0.20423403798586293, 0.19835690373631465, -0.0879613077568635, -0.14091562292604465, 0.4917113135520985, -0.1907282900268754, -0.4802307733810167, 0.4511123707972331, 0.08227861161092775, -0.4019790567990782, -0.2997854884655027, 0.2853399360082669, 0.29287237689083767, -0.1596973714315837, -0.0939424389279786, 0.258661210979799, 0.185835345332638, 0.37074082635203354, -0.1459133170689384, -0.004975097634783765, -0.4839970882809759], "modulo_counter": [49], "unitaries_q4": [-0.4165459335296404, 0.4894086579308805, -0.4878037862215372, -0.27065954885196675, -0.3557583954986825, 0.17232005968702424, -0.40234032300345746, 0.17028115813604217, -0.15518229722326993, 0.04151701288553511, 0.4149028637475425, 0.060495617944042124, 0.4439617577671342, -0.2877488688444849, -0.44591127561762534, 0.26107100081415524, -0.374690669539806, 0.43990725762775185, 0.010386244418349122, -0.09969150290183748, -0.09760467302807996, 0.22572790778548324, 0.11139547525634441, 0.06799602130666571, -0.1361132465678203, 0.28223449889285135, -0.12276746487499324, -0.4167878545740997, 0.4506729327841903, -0.004427030405253163, 0.1265520133216782, -0.26256977331275166, 0.46941842305692205, 0.09379952390239765, 0.1973131805413999, -0.38195938546995833, -0.05462618005151043, 0.42864767691576233, 0.2510814708904121, -0.360256209977063, 0.41662052915091863, -0.43181913228789526, 0.332787550432343, -0.11279071962259124, 0.1117919539837331, 0.2139590450458222, -0.4285359332075629, -0.3426108370944938, -0.32558155777366693, -0.08123758838598505, 0.2945216264292476, 0.473611069732506, -0.3783608350757284, -0.07842265526315728, -0.1074682243229077, 0.24049247889338332, -0.2576621611626244, -0.1429872906517069, 0.19320114364873575, 0.31083483837065273, 0.13975925770959208, 0.14025912357401893, 0.0910327241743758, 0.32314465208837007, 0.03174013943286624, -0.47190455232954776, -0.21121214619110518, 0.4746938851849194, 0.23576781990978546, 0.08316050282518717, 0.18151724721489515, -0.400213131759525, 0.3517301944760227, -0.4484182951348821, -0.12568734236262458, -0.4865840148088658, 0.33147630175334797, -0.4789901583046863, 0.020113967437424662, 0.06447247771077258, 0.08805243674673235], "unitary_angle_offset": [78], "current_seeds_q4": [36146255243727, 2], "unitaries_q1": [-0.1170996965485891, 0.3948500346756276, -0.3814168811142018, 0.26780126282373473, 0.2943348490020554, 0.19434498158991076, 0.015880959898169067, -0.1942237015504702, -0.4168508201115806, 0.18571149745641335, -0.21220376686260067, -0.160027087917328, 0.3520932401429775, -0.06995349644153848, 0.08771408961433025, 0.15018029358238394, -0.3725604991977569, 0.4927178803761194, 0.007483535100632821, -0.27899373485921686, 0.4663373044190351, 0.2652796701499689, -0.3059358469084721, 0.004259973013947871, -0.4206515507387678, 0.20003673498231578, 0.4724426590122235, -0.4796988074039099, -0.2288914205712942, 0.1427614521973979, -0.2606958900527516, 0.4316770811702533, -0.4324770402338274, 0.006259113990971343, 0.011725823508509592, -0.1904833928861862, -0.38152574068700673, 0.2237896470331293, -0.35954051017160893, 0.32226538703772434, -0.21233047984366493, -0.18236373147040297, 0.3830795306205417, -0.356367840362811, 0.05360593444192574, 0.22946508987948278, -0.2835965124238129, -0.0952356692211751, -0.22063635836623874, 0.24874871752243877, 0.4689717709380474, 0.3382588909775066, 0.28028169533084935, 0.06018639817481031, 0.4031368826142234, -0.4328245778372555, 0.14170315451641002, 0.004340707104834252, 0.38558393453215345, 0.38054151056773833, -0.3706034854176288, -0.03568378013919471, -0.047720446486142265, -0.10900193868114982, -0.03522460819027984, -0.2781207104770047, -0.008494055987057436, 0.4814965178886297, -0.05312386930746982, -0.4177095451891617, 0.1617067159553649, -0.14285195841982912, -0.08841780823371082, 0.3781041938415939, 0.44607081183047725, 0.08867370901765526, -0.12821086662084014, 0.44493207735456863, 0.4413383368652397, 0.33425268937282837, -0.23636418826195538], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "current_seeds_q2": [13648660503014, 2], "current_seeds_q5": [32963532974897, 2]} \ No newline at end of file +{"current_seeds_q3": [62311638778457, 1], "pauli_seed_q4": [17048797476067, 7695065239164], "current_seeds_q2": [27297321006028, 0], "pauli_seed_q0": [112470266612326, 92543491383923], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "pauli_seed_q2": [15362150961769, 109189284024114], "pauli_seed_q1": [120034886526744, -2518867739649], "is_mod_zero": [0], "unitary_angle_offset": [78], "break": [1], "pauli_seed_q5": [15391577126957, -17766712911478], "unitaries_q0": [0.4712154313820385, -0.42572259206511376, -0.42111592564365097, 0.2331221445808893, 0.13331130172538863, 0.3757404073357655, -0.15784346339633615, 0.26111010223272757, -0.20147486932348357, 0.4731909991248422, -0.15171013965482416, 0.4607650836825492, 0.37684417282135385, 0.028899062065068648, -0.20420834050016623, -0.18029413960657692, 0.2479726770099262, -0.31375414547666836, 0.008947666745431349, 0.4179805182185454, -0.2163845393922088, 0.31819606673195366, 0.4447669819517266, -0.20735831441055907, 0.24329964768393708, -0.03291592648032449, 0.3433998074271578, -0.03297551316599012, -0.012842477370785588, -0.17073608461863543, 0.44990811567888755, 0.34029098228440446, -0.10658408246160533, -0.24481879726496558, 0.2828877981082272, -0.1774668241783388, -0.3927726383275072, -0.44759812516522146, -0.09988083390955893, 0.2846662038892873, 0.192623419867207, -0.4951949435326988, -0.00910933552858495, 0.0344985394231756, 0.3279888356070302, 0.31032298247400547, 0.07448506389936327, -0.29334057774597255, 0.08872518057716405, 0.07798778071790835, 0.4695275208591738, -0.3706380358472927, -0.33980968285915836, 0.3303966837243273, -0.1614914491827939, -0.11825097296870268, 0.13890870450366322, -0.24209820089131995, -0.006790752767880548, -0.4569557480242459, -0.32738600345714275, 0.25227068013025544, -0.19660653963240193, -0.114802418824965, -0.327295566650033, -0.3693422356873377, -0.05031939073900915, -0.42638081326169797, 0.26228990149481035, 0.3503039777039696, -0.28778184548331254, -0.06876404255354984, 0.23108886334528123, -0.4803542081018186, 0.026563378638172708, -0.3427234359697735, 0.22907080345830977, 0.2402723677717553, 0.3177048344177287, -0.439668073429921, 0.447220912180196], "rc_base_cycle_loop_index": [11], "current_seeds_q0": [23135872845980, 1], "unitaries_q3": [-0.44882528698095925, 0.21751509762007615, 0.3802680530959428, 0.2730510105090431, 0.3276727253083287, 0.13920345844470106, 0.444153837704679, -0.2678503045730096, 0.20040028666454646, -0.2202751886667791, -0.21277422419174385, -0.4481968228582396, 0.31241562029034853, 0.4748645481993421, -0.08074149417010545, -0.4186349836360712, -0.445271186370789, -0.11199236531999546, -0.16895527186618509, 0.1961489222558832, 0.24364278945751394, -0.08626212498747066, -0.00924419505930274, -0.49500617846724637, -0.4548230161925275, 0.3736056255881408, 0.26957167933061044, 0.48660858755684444, 0.0644601318496747, -0.3651103820904211, -0.2813933307165257, -0.41366667379787003, -0.14230310373283928, 0.4681498348207711, 0.1215744180596694, 0.09788826968987507, 0.048175590932000745, 0.4487621872882883, 0.01829275539778763, 0.23451311792852536, 0.07076615400635333, 0.39977187405517967, 0.3296437281806952, 0.03370986586156732, 0.07786597094141712, -0.24309403223028525, -0.2626546274601331, 0.3080957061723453, -0.09016921524732169, -0.15289014355117203, 0.32171991367954433, -0.16558770752175178, 0.3960680926516851, -0.26237626860959296, 0.0613204268378027, -0.470821983982578, 0.475935138627122, 0.27172818466370785, 0.10133381022337673, 0.22346762715176283, 0.20423403798586293, 0.19835690373631465, -0.0879613077568635, 0.35908437707395535, 0.4917113135520985, 0.3092717099731246, -0.4802307733810167, 0.0488876292027669, 0.41772138838907225, 0.4019790567990782, -0.2997854884655027, 0.2146600639917331, -0.29287237689083767, -0.3403026285684163, 0.4060575610720214, 0.258661210979799, 0.314164654667362, -0.37074082635203354, 0.1459133170689384, -0.49502490236521624, 0.016002911719024127], "rc_seed_index": [2], "unitaries_q1": [-0.1170996965485891, 0.3948500346756276, -0.3814168811142018, 0.26780126282373473, 0.20566515099794458, 0.30565501841008924, 0.48411904010183093, -0.1942237015504702, -0.08314917988841941, 0.31428850254358665, -0.2877962331373993, 0.339972912082672, -0.1479067598570225, -0.06995349644153848, -0.41228591038566975, -0.34981970641761606, -0.1274395008022431, -0.4927178803761194, 0.4925164648993672, -0.27899373485921686, -0.4663373044190351, -0.2652796701499689, -0.3059358469084721, -0.004259973013947871, 0.4206515507387678, 0.20003673498231578, 0.027557340987776513, 0.4796988074039099, -0.2288914205712942, 0.3572385478026021, 0.2606958900527516, 0.06832291882974673, 0.06752295976617262, 0.006259113990971343, 0.011725823508509592, 0.3095166071138138, -0.38152574068700673, 0.2237896470331293, -0.35954051017160893, -0.17773461296227566, -0.21233047984366493, 0.31763626852959703, 0.3830795306205417, -0.356367840362811, 0.05360593444192574, 0.22946508987948278, -0.2835965124238129, 0.4047643307788249, 0.27936364163376126, 0.24874871752243877, -0.031028229061952572, -0.1617411090224934, 0.21971830466915065, 0.4398136018251897, 0.09686311738577658, -0.4328245778372555, -0.14170315451641002, 0.49565929289516575, 0.11441606546784655, -0.11945848943226167, 0.12939651458237122, -0.4643162198608053, 0.047720446486142265, -0.3909980613188502, -0.46477539180972016, -0.2781207104770047, -0.008494055987057436, 0.018503482111370317, -0.4468761306925302, -0.0822904548108383, 0.1617067159553649, -0.3571480415801709, 0.08841780823371082, 0.12189580615840612, 0.44607081183047725, -0.41132629098234474, -0.12821086662084014, -0.055067922645431366, -0.05866166313476029, 0.33425268937282837, -0.23636418826195538], "pauli_seed_q3": [119595868383582, -32228421596828], "unitaries_q2": [-0.15396173955647896, 0.3048825069023309, 0.4145682812563436, 0.036928592509120506, 0.059332429419090005, 0.20553371694326472, 0.0859309855169279, 0.14970634357845114, -0.21420182853494651, -0.31239971808636113, -0.21514255278739114, -0.057318521323395544, 0.2779890761009902, 0.47367514134620947, -0.13755156757528653, -0.4512413528363055, -0.029349912099974063, -0.3265447505634178, 0.1822764510861603, -0.331149994774826, -0.07938718192367133, 0.10882401546969689, -0.20691047149288266, 0.17600903158385606, 0.009100451273553745, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028, 0.28977728519420864, -0.4127736568831999, -0.2715537852772023, -0.19373663828146093, 0.3866124655850989, -0.2184874815159965, 0.1177400591091029, 0.4264193156073617, -0.14088216697814104, -0.001961632156344706, -0.4230402259051722, -0.15377505192719454, -0.3624304203777804, -0.3886559574053656, 0.4641161820327113, -0.2122644303870267, 0.08481943060488462, -0.2457015010787451, -0.29923453998630123, -0.04042363460278864, 0.38195891683453453, -0.03859037256674469, -0.08978167650477431, 0.07808595139374575, 0.45834207293470186, 0.37243126123017944, 0.06256391649851878, -0.31177994003055787, -0.05615858277264607, -0.2722341089927305, -0.1144049988797704, -0.02604531885600636, 0.11199589029635248, 0.11709447484012614, 0.41894082221451256, 0.4452687082975473, 0.2319884785423838, -0.4357020266360898, 0.09823984663831453, -0.4720817472009138, 0.1352842273606072, 0.1662718950803388, 0.03836408176927364, 0.1337047764333228, 0.17466870563372083, 0.1765877048535387, -0.4361980782679602, 0.012161642034783426, -0.2611003790152928, 0.23903804718794674, 0.17505008531592026], "unitaries_q5": [-0.1870609049750307, 0.3776046805460531, -0.1890155741254489, 0.36390183284432354, 0.038877275652282606, -0.27559479547496224, -0.1680911213450038, 0.13693298667517695, -0.29085071664499296, 0.36047512367334633, 0.14851850318919446, -0.057626007300324744, -0.20788732949937128, -0.42125761916947013, 0.23151096046864694, -0.05653346877788934, 0.1360182062364892, 0.2380340409652426, 0.3971106996721616, 0.14197951721286017, 0.3404604798712434, -0.15289293302358686, 0.12489626579553814, -0.3493587470698003, -0.13751949964263233, 0.008306765686334927, -0.49151633052607124, 0.30633288698527394, 0.3064881637397292, 0.32961147597468354, -0.08098004605518128, 0.3060016188269046, -0.46421182113421366, 0.49744699376657664, 0.3195963535447355, 0.34197805774659074, 0.42257028044813794, 0.2866464046533963, 0.4519319428775823, -0.37205766264134255, -0.4711880464251408, 0.051318289743722545, -0.3434915792021904, -0.33096669240207177, -0.40536961273727457, -0.18783632090951485, 0.13905289215915317, 0.3402185204002137, -0.05617742517105029, -0.43541349898981707, 0.21016554839495427, 0.30954878428748955, -0.4245386550744783, 0.46306895003329274, 0.48442160523621425, -0.13476795769143735, -0.4436889471407035, -0.3715304328143034, -0.19139346063203533, -0.4794655985094849, 0.1391393899933604, 0.15008591523601922, -0.26350517884386804, 0.3527343250287096, 0.23230153972988887, -0.10812050711245647, -0.20380895823433676, 0.31659870927306955, 0.3039638195146246, 0.032620336454343146, -0.32323111834664076, -0.05397516644787004, -0.1921652859683043, 0.4328683952324681, 0.22181377205755837, -0.45050461907741024, 0.28147714842391025, 0.4283825898106137, -0.16208734362142252, 0.3156707770678331, 0.09723298192721685], "current_seeds_q4": [1923766309791, 0], "unitaries_q4": [-0.4165459335296404, 0.4894086579308805, 0.012196213778462806, -0.27065954885196675, -0.3557583954986825, 0.17232005968702424, 0.09765967699654254, 0.32971884186395783, -0.3448177027767301, -0.04151701288553511, 0.08509713625245752, 0.060495617944042124, 0.4439617577671342, -0.2877488688444849, -0.44591127561762534, -0.23892899918584476, -0.125309330460194, -0.43990725762775185, 0.4896137555816509, -0.4003084970981625, -0.09760467302807996, 0.22572790778548324, 0.3886045247436556, -0.06799602130666571, -0.3638867534321797, 0.21776550110714865, 0.37723253512500676, 0.08321214542590027, 0.049327067215809706, 0.004427030405253163, -0.1265520133216782, -0.23743022668724834, -0.03058157694307795, -0.40620047609760235, 0.3026868194586001, -0.11804061453004167, 0.05462618005151043, 0.07135232308423767, 0.2510814708904121, 0.13974379002293702, 0.08337947084908137, -0.06818086771210474, -0.332787550432343, -0.38720928037740876, 0.1117919539837331, -0.2860409549541778, -0.07146406679243711, 0.3426108370944938, 0.32558155777366693, -0.08123758838598505, 0.20547837357075238, -0.473611069732506, -0.12163916492427163, 0.4215773447368427, 0.3925317756770923, 0.24049247889338332, -0.2576621611626244, 0.3570127093482931, 0.30679885635126425, 0.18916516162934727, 0.3602407422904079, 0.35974087642598107, 0.0910327241743758, 0.32314465208837007, 0.03174013943286624, 0.028095447670452245, 0.2887878538088948, 0.4746938851849194, 0.23576781990978546, 0.08316050282518717, 0.18151724721489515, -0.400213131759525, -0.14826980552397728, -0.4484182951348821, -0.12568734236262458, 0.013415985191134183, 0.33147630175334797, 0.021009841695313725, 0.020113967437424662, 0.06447247771077258, 0.08805243674673235], "current_seeds_q5": [65927065949794, 0], "modulo_counter": [49], "current_seeds_q1": [69739027242751, 1]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration13].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration13].json index fbd415902..a195181e2 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration13].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration13].json @@ -1 +1 @@ -{"readout_randomization_q3": [-0.25, 0.25, 0.0], "readout_randomization_q1": [-0.5, 0.25, -0.25], "current_seeds_q0": [15144035577502, 3], "readout_source_unitaries_q3": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "unitaries_q3": [0.05584616229532102, -0.23214969542699038, -0.29959971333545354, -0.2202751886667791, -0.28722577580825615, 0.4481968228582396, -0.31241562029034853, 0.025135451800657904, -0.08074149417010545, 0.08136501636392879, -0.445271186370789, -0.11199236531999546, -0.16895527186618509, 0.1961489222558832, -0.25635721054248606, -0.08626212498747066, -0.00924419505930274, 0.004993821532753628, -0.4548230161925275, 0.3736056255881408, -0.23042832066938956, -0.01339141244315556, 0.0644601318496747, -0.3651103820904211, -0.2813933307165257, -0.41366667379787003, 0.3576968962671607, 0.4681498348207711, 0.1215744180596694, -0.4021117303101249, -0.45182440906799926, 0.05123781271171168, -0.01829275539778763, -0.23451311792852536, 0.42923384599364667, 0.39977187405517967, 0.3296437281806952, 0.03370986586156732, 0.07786597094141712, 0.25690596776971475, -0.23734537253986687, 0.19190429382765473, -0.4098307847526783, -0.15289014355117203, 0.17828008632045567, 0.16558770752175178, 0.10393190734831492, -0.26237626860959296, 0.0613204268378027, -0.02917801601742198, 0.024064861372878, -0.27172818466370785, 0.39866618977662327, 0.22346762715176283, 0.20423403798586293, 0.30164309626368535, -0.4120386922431365, -0.35908437707395535, 0.4917113135520985, -0.3092717099731246, -0.019769226618983282, 0.0488876292027669, -0.41772138838907225, -0.4019790567990782, -0.20021451153449732, -0.2853399360082669, 0.20712762310916233, -0.3403026285684163, -0.0939424389279786, -0.241338789020201, 0.314164654667362, 0.12925917364796646, 0.1459133170689384, -0.49502490236521624, -0.4839970882809759, 0.08345406647035958, 0.010591342069119491, 0.4878037862215372, 0.25, 0.25, 0.0], "readout_source_unitaries_q1": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "readout_source_unitaries_q0": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "readout_randomization_q4": [0.25, -0.5, -0.25], "readout_randomization_q0": [0.25, 0.25, 0.0], "readout_seed_q4": [-62630319121345], "unitaries_q2": [0.4140690144830721, 0.14970634357845114, -0.2857981714650535, -0.18760028191363887, -0.21514255278739114, 0.057318521323395544, 0.22201092389900978, 0.026324858653790528, 0.3624484324247135, -0.4512413528363055, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.16885000522517402, -0.42061281807632867, 0.3911759845303031, -0.29308952850711734, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, 0.3395366446713197, 0.28977728519420864, -0.08722634311680011, -0.2284462147227977, -0.3062633617185391, 0.11338753441490113, 0.2815125184840035, 0.1177400591091029, 0.4264193156073617, -0.14088216697814104, 0.4980383678436553, -0.4230402259051722, 0.34622494807280546, 0.1375695796222196, -0.3886559574053656, -0.03588381796728868, 0.2877355696129733, 0.08481943060488462, -0.2457015010787451, 0.20076546001369877, -0.04042363460278864, 0.38195891683453453, -0.03859037256674469, -0.4102183234952257, 0.42191404860625425, -0.45834207293470186, 0.37243126123017944, -0.06256391649851878, -0.18822005996944213, -0.05615858277264607, 0.2722341089927305, 0.1144049988797704, -0.47395468114399364, -0.3880041097036475, 0.11709447484012614, 0.08105917778548744, 0.05473129170245272, -0.2319884785423838, -0.4357020266360898, 0.40176015336168547, 0.4720817472009138, 0.1352842273606072, 0.3337281049196612, -0.03836408176927364, 0.3662952235666772, 0.17466870563372083, -0.3234122951464613, -0.4361980782679602, 0.012161642034783426, 0.23889962098470718, 0.26096195281205326, 0.32494991468407974, 0.44882528698095925, 0.21751509762007615, -0.3802680530959428, 0.25, 0.0, -0.25], "break": [1], "pauli_seed_q4": [-123070490066287, 33932501327821], "pauli_seed_q2": [-50982158722643, 119343881614275], "readout_seed_q5": [-73332466885869], "readout_source_unitaries_q5": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "current_seeds_q3": [126311354711, 3], "readout_source_unitaries_q4": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "readout_seed_q3": [129378273583824], "rc_seed_index": [2], "readout_randomization_q5": [0.25, 0.25, 0.0], "pauli_seed_q0": [-13838434709596, 60576142310008], "rc_base_cycle_loop_index": [11], "readout_seed_q0": [114829320934051], "unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, -0.18029413960657692, 0.2520273229900738, 0.31375414547666836, -0.008947666745431349, 0.08201948178145457, -0.2163845393922088, 0.31819606673195366, 0.4447669819517266, -0.20735831441055907, 0.24329964768393708, -0.03291592648032449, -0.1566001925728422, -0.03297551316599012, -0.012842477370785588, -0.17073608461863543, -0.050091884321112445, 0.15970901771559554, 0.10658408246160533, 0.24481879726496558, 0.21711220189177283, 0.3225331758216612, -0.3927726383275072, -0.44759812516522146, -0.09988083390955893, -0.21533379611071268, 0.192623419867207, 0.0048050564673012275, -0.00910933552858495, 0.4655014605768244, -0.3279888356070302, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.16019031714084164, -0.1696033162756727, 0.3385085508172061, -0.3817490270312973, -0.13890870450366322, 0.24209820089131995, -0.006790752767880548, 0.4569557480242459, -0.17261399654285725, 0.24772931986974456, -0.19660653963240193, -0.114802418824965, -0.327295566650033, -0.3693422356873377, 0.44968060926099085, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.21221815451668746, 0.43123595744645016, 0.23108886334528123, -0.4803542081018186, 0.026563378638172708, 0.1572765640302265, 0.22907080345830977, -0.2597276322282447, 0.3177048344177287, -0.06033192657007902, -0.447220912180196, -0.3829003034514109, 0.10514996532437237, 0.1185831188857982, 0.25, 0.25, -0.5], "pauli_seed_q1": [34470019755655, 27946020799016], "pauli_seed_q3": [-12771350299406, 505245418846], "readout_source_unitaries_q2": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "pauli_seed_q5": [57280048187710, 37250364052496], "unitary_angle_offset": [78], "readout_seed_q2": [17033306506441], "current_seeds_q4": [8483125331955, 2], "current_seeds_q1": [6986505199754, 0], "readout_seed_q1": [114697805194205], "unitaries_q4": [0.40234032300345746, 0.32971884186395783, -0.15518229722326993, 0.04151701288553511, 0.4149028637475425, -0.4395043820559579, -0.0560382422328658, -0.2877488688444849, -0.44591127561762534, -0.23892899918584476, -0.125309330460194, 0.060092742372248154, -0.010386244418349122, -0.4003084970981625, -0.09760467302807996, 0.22572790778548324, 0.11139547525634441, -0.4320039786933343, -0.1361132465678203, 0.28223449889285135, -0.12276746487499324, 0.08321214542590027, 0.049327067215809706, 0.004427030405253163, -0.1265520133216782, -0.23743022668724834, -0.03058157694307795, -0.40620047609760235, 0.1973131805413999, -0.38195938546995833, -0.05462618005151043, 0.07135232308423767, 0.2489185291095879, -0.13974379002293702, 0.08337947084908137, 0.06818086771210474, 0.332787550432343, -0.38720928037740876, -0.1117919539837331, 0.2860409549541778, -0.07146406679243711, -0.3426108370944938, 0.17441844222633307, -0.08123758838598505, -0.20547837357075238, 0.473611069732506, -0.3783608350757284, -0.07842265526315728, 0.3925317756770923, 0.24049247889338332, 0.24233783883737559, 0.3570127093482931, 0.30679885635126425, -0.31083483837065273, -0.13975925770959208, 0.35974087642598107, 0.0910327241743758, -0.17685534791162993, 0.46825986056713376, -0.028095447670452245, -0.2887878538088948, 0.4746938851849194, 0.26423218009021454, -0.08316050282518717, 0.18151724721489515, 0.400213131759525, 0.14826980552397728, -0.4484182951348821, 0.12568734236262458, 0.4865840148088658, 0.33147630175334797, -0.021009841695313725, -0.020113967437424662, 0.06447247771077258, -0.08805243674673235, -0.3129390950249693, 0.12239531945394688, -0.1890155741254489, -0.25, -0.5, -0.25], "readout_randomization_q2": [-0.25, 0.0, -0.25], "current_seeds_q5": [9312591013124, 0], "unitaries_q5": [-0.3319088786549962, 0.36306701332482305, -0.29085071664499296, -0.13952487632665367, 0.35148149681080554, 0.057626007300324744, 0.20788732949937128, -0.07874238083052987, 0.23151096046864694, 0.44346653122211066, 0.1360182062364892, 0.2380340409652426, -0.10288930032783838, 0.3580204827871398, -0.3404604798712434, 0.15289293302358686, 0.37510373420446186, 0.1506412529301997, -0.13751949964263233, 0.008306765686334927, 0.008483669473928757, -0.19366711301472606, 0.3064881637397292, -0.17038852402531646, -0.08098004605518128, 0.19399838117309542, 0.46421182113421366, 0.0025530062334233605, 0.3195963535447355, 0.15802194225340926, 0.07742971955186206, 0.2866464046533963, -0.4519319428775823, 0.37205766264134255, -0.028811953574859217, -0.44868171025627746, -0.3434915792021904, -0.33096669240207177, 0.09463038726272543, -0.18783632090951485, 0.13905289215915317, -0.15978147959978628, -0.05617742517105029, -0.06458650101018293, 0.28983445160504573, 0.19045121571251045, -0.4245386550744783, -0.46306895003329274, -0.48442160523621425, -0.13476795769143735, 0.4436889471407035, 0.3715304328143034, -0.19139346063203533, 0.4794655985094849, 0.3608606100066396, 0.3499140847639808, -0.26350517884386804, -0.1472656749712904, 0.23230153972988887, -0.10812050711245647, 0.29619104176566324, 0.18340129072693045, -0.3039638195146246, 0.46737966354565685, -0.17676888165335924, 0.44602483355212996, 0.3078347140316957, 0.06713160476753188, 0.27818622794244163, 0.45050461907741024, 0.21852285157608975, 0.4283825898106137, 0.3379126563785775, 0.3156707770678331, 0.09723298192721685, -0.4089499305662727, 0.04559884867776631, 0.12868402921577982, 0.25, 0.25, 0.0], "current_seeds_q2": [29835970403568, 3], "unitaries_q1": [0.48411904010183093, -0.1942237015504702, -0.08314917988841941, 0.31428850254358665, -0.2877962331373993, 0.339972912082672, 0.3520932401429775, -0.06995349644153848, -0.41228591038566975, -0.34981970641761606, -0.1274395008022431, 0.00728211962388059, 0.4925164648993672, -0.22100626514078314, 0.4663373044190351, 0.2652796701499689, -0.1940641530915279, -0.004259973013947871, 0.4206515507387678, 0.2999632650176842, -0.027557340987776513, -0.4796988074039099, -0.2711085794287058, -0.1427614521973979, 0.2606958900527516, 0.06832291882974673, 0.06752295976617262, -0.49374088600902866, 0.011725823508509592, -0.1904833928861862, -0.38152574068700673, 0.2762103529668707, 0.35954051017160893, 0.17773461296227566, -0.28766952015633507, -0.18236373147040297, 0.3830795306205417, -0.356367840362811, -0.44639406555807426, -0.2705349101205172, -0.2164034875761871, -0.4047643307788249, 0.22063635836623874, 0.24874871752243877, 0.031028229061952572, 0.1617411090224934, 0.28028169533084935, 0.4398136018251897, -0.4031368826142234, -0.06717542216274452, -0.35829684548359, 0.004340707104834252, 0.11441606546784655, 0.11945848943226167, 0.3706034854176288, -0.4643162198608053, -0.047720446486142265, -0.10900193868114982, -0.03522460819027984, -0.2781207104770047, 0.49150594401294256, 0.4814965178886297, 0.4468761306925302, -0.4177095451891617, 0.3382932840446351, 0.14285195841982912, 0.08841780823371082, 0.3781041938415939, -0.44607081183047725, 0.41132629098234474, -0.37178913337915986, 0.44493207735456863, 0.4413383368652397, 0.16574731062717163, -0.2636358117380446, 0.15396173955647896, 0.19511749309766913, -0.0854317187436564, 0.0, 0.25, 0.25], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15]} \ No newline at end of file +{"readout_seed_q4": [-62630319121345], "unitaries_q3": [0.05584616229532102, -0.23214969542699038, -0.29959971333545354, -0.2202751886667791, -0.28722577580825615, 0.4481968228582396, -0.31241562029034853, 0.025135451800657904, -0.08074149417010545, 0.08136501636392879, -0.445271186370789, -0.11199236531999546, -0.16895527186618509, 0.1961489222558832, -0.25635721054248606, -0.08626212498747066, -0.00924419505930274, 0.004993821532753628, -0.4548230161925275, 0.3736056255881408, -0.23042832066938956, -0.01339141244315556, 0.0644601318496747, -0.3651103820904211, -0.2813933307165257, -0.41366667379787003, 0.3576968962671607, 0.4681498348207711, 0.1215744180596694, -0.4021117303101249, -0.45182440906799926, 0.05123781271171168, -0.01829275539778763, -0.23451311792852536, 0.42923384599364667, 0.39977187405517967, 0.3296437281806952, 0.03370986586156732, 0.07786597094141712, 0.25690596776971475, -0.23734537253986687, 0.19190429382765473, -0.4098307847526783, -0.15289014355117203, 0.17828008632045567, 0.16558770752175178, 0.10393190734831492, -0.26237626860959296, 0.0613204268378027, -0.02917801601742198, 0.024064861372878, -0.27172818466370785, 0.39866618977662327, 0.22346762715176283, 0.20423403798586293, 0.30164309626368535, -0.4120386922431365, -0.35908437707395535, 0.4917113135520985, -0.3092717099731246, -0.019769226618983282, 0.0488876292027669, -0.41772138838907225, -0.4019790567990782, -0.20021451153449732, -0.2853399360082669, 0.20712762310916233, -0.3403026285684163, -0.0939424389279786, -0.241338789020201, 0.314164654667362, 0.12925917364796646, 0.1459133170689384, -0.49502490236521624, -0.4839970882809759, 0.08345406647035958, 0.010591342069119491, 0.4878037862215372, 0.22934045114803325, -0.1442416045013175, 0.32767994031297576], "unitaries_q5": [-0.3319088786549962, 0.36306701332482305, -0.29085071664499296, -0.13952487632665367, 0.35148149681080554, 0.057626007300324744, 0.20788732949937128, -0.07874238083052987, 0.23151096046864694, 0.44346653122211066, 0.1360182062364892, 0.2380340409652426, -0.10288930032783838, 0.3580204827871398, -0.3404604798712434, 0.15289293302358686, 0.37510373420446186, 0.1506412529301997, -0.13751949964263233, 0.008306765686334927, 0.008483669473928757, -0.19366711301472606, 0.3064881637397292, -0.17038852402531646, -0.08098004605518128, 0.19399838117309542, 0.46421182113421366, 0.0025530062334233605, 0.3195963535447355, 0.15802194225340926, 0.07742971955186206, 0.2866464046533963, -0.4519319428775823, 0.37205766264134255, -0.028811953574859217, -0.44868171025627746, -0.3434915792021904, -0.33096669240207177, 0.09463038726272543, -0.18783632090951485, 0.13905289215915317, -0.15978147959978628, -0.05617742517105029, -0.06458650101018293, 0.28983445160504573, 0.19045121571251045, -0.4245386550744783, -0.46306895003329274, -0.48442160523621425, -0.13476795769143735, 0.4436889471407035, 0.3715304328143034, -0.19139346063203533, 0.4794655985094849, 0.3608606100066396, 0.3499140847639808, -0.26350517884386804, -0.1472656749712904, 0.23230153972988887, -0.10812050711245647, 0.29619104176566324, 0.18340129072693045, -0.3039638195146246, 0.46737966354565685, -0.17676888165335924, 0.44602483355212996, 0.3078347140316957, 0.06713160476753188, 0.27818622794244163, 0.45050461907741024, 0.21852285157608975, 0.4283825898106137, 0.3379126563785775, 0.3156707770678331, 0.09723298192721685, -0.4089499305662727, 0.04559884867776631, 0.12868402921577982, 0.21220693776629673, -0.38382575941465547, -0.11316011308353424], "current_seeds_q2": [29835970403568, 3], "readout_source_angles": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "readout_seed_q3": [129378273583824], "pauli_seed_q4": [-123070490066287, 33932501327821], "pauli_seed_q0": [-13838434709596, 60576142310008], "rc_seed_index": [2], "unitaries_q4": [0.40234032300345746, 0.32971884186395783, -0.15518229722326993, 0.04151701288553511, 0.4149028637475425, -0.4395043820559579, -0.0560382422328658, -0.2877488688444849, -0.44591127561762534, -0.23892899918584476, -0.125309330460194, 0.060092742372248154, -0.010386244418349122, -0.4003084970981625, -0.09760467302807996, 0.22572790778548324, 0.11139547525634441, -0.4320039786933343, -0.1361132465678203, 0.28223449889285135, -0.12276746487499324, 0.08321214542590027, 0.049327067215809706, 0.004427030405253163, -0.1265520133216782, -0.23743022668724834, -0.03058157694307795, -0.40620047609760235, 0.1973131805413999, -0.38195938546995833, -0.05462618005151043, 0.07135232308423767, 0.2489185291095879, -0.13974379002293702, 0.08337947084908137, 0.06818086771210474, 0.332787550432343, -0.38720928037740876, -0.1117919539837331, 0.2860409549541778, -0.07146406679243711, -0.3426108370944938, 0.17441844222633307, -0.08123758838598505, -0.20547837357075238, 0.473611069732506, -0.3783608350757284, -0.07842265526315728, 0.3925317756770923, 0.24049247889338332, 0.24233783883737559, 0.3570127093482931, 0.30679885635126425, -0.31083483837065273, -0.13975925770959208, 0.35974087642598107, 0.0910327241743758, -0.17685534791162993, 0.46825986056713376, -0.028095447670452245, -0.2887878538088948, 0.4746938851849194, 0.26423218009021454, -0.08316050282518717, 0.18151724721489515, 0.400213131759525, 0.14826980552397728, -0.4484182951348821, 0.12568734236262458, 0.4865840148088658, 0.33147630175334797, -0.021009841695313725, -0.020113967437424662, 0.06447247771077258, -0.08805243674673235, -0.3129390950249693, 0.12239531945394688, -0.1890155741254489, 0.36390183284432354, 0.4611227243477174, -0.22440520452503776], "readout_randomization_q0": [0.25, 0.25, -0.5], "current_seeds_q3": [126311354711, 3], "readout_seed_q1": [114697805194205], "current_seeds_q5": [9312591013124, 0], "unitaries_q0": [-0.15784346339633615, 0.26111010223272757, -0.20147486932348357, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, -0.18029413960657692, 0.2520273229900738, 0.31375414547666836, -0.008947666745431349, 0.08201948178145457, -0.2163845393922088, 0.31819606673195366, 0.4447669819517266, -0.20735831441055907, 0.24329964768393708, -0.03291592648032449, -0.1566001925728422, -0.03297551316599012, -0.012842477370785588, -0.17073608461863543, -0.050091884321112445, 0.15970901771559554, 0.10658408246160533, 0.24481879726496558, 0.21711220189177283, 0.3225331758216612, -0.3927726383275072, -0.44759812516522146, -0.09988083390955893, -0.21533379611071268, 0.192623419867207, 0.0048050564673012275, -0.00910933552858495, 0.4655014605768244, -0.3279888356070302, -0.31032298247400547, 0.42551493610063673, 0.20665942225402745, -0.41127481942283595, 0.42201221928209165, 0.03047247914082618, 0.3706380358472927, -0.16019031714084164, -0.1696033162756727, 0.3385085508172061, -0.3817490270312973, -0.13890870450366322, 0.24209820089131995, -0.006790752767880548, 0.4569557480242459, -0.17261399654285725, 0.24772931986974456, -0.19660653963240193, -0.114802418824965, -0.327295566650033, -0.3693422356873377, 0.44968060926099085, -0.07361918673830203, 0.23771009850518965, -0.3503039777039696, -0.21221815451668746, 0.43123595744645016, 0.23108886334528123, -0.4803542081018186, 0.026563378638172708, 0.1572765640302265, 0.22907080345830977, -0.2597276322282447, 0.3177048344177287, -0.06033192657007902, -0.447220912180196, -0.3829003034514109, 0.10514996532437237, 0.1185831188857982, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924], "unitaries_q2": [0.4140690144830721, 0.14970634357845114, -0.2857981714650535, -0.18760028191363887, -0.21514255278739114, 0.057318521323395544, 0.22201092389900978, 0.026324858653790528, 0.3624484324247135, -0.4512413528363055, -0.029349912099974063, 0.1734552494365822, 0.1822764510861603, -0.16885000522517402, -0.42061281807632867, 0.3911759845303031, -0.29308952850711734, 0.17600903158385606, -0.49089954872644626, 0.016669856223522572, 0.13176156160845665, -0.03572518135114322, -0.07037465869650461, 0.3395366446713197, 0.28977728519420864, -0.08722634311680011, -0.2284462147227977, -0.3062633617185391, 0.11338753441490113, 0.2815125184840035, 0.1177400591091029, 0.4264193156073617, -0.14088216697814104, 0.4980383678436553, -0.4230402259051722, 0.34622494807280546, 0.1375695796222196, -0.3886559574053656, -0.03588381796728868, 0.2877355696129733, 0.08481943060488462, -0.2457015010787451, 0.20076546001369877, -0.04042363460278864, 0.38195891683453453, -0.03859037256674469, -0.4102183234952257, 0.42191404860625425, -0.45834207293470186, 0.37243126123017944, -0.06256391649851878, -0.18822005996944213, -0.05615858277264607, 0.2722341089927305, 0.1144049988797704, -0.47395468114399364, -0.3880041097036475, 0.11709447484012614, 0.08105917778548744, 0.05473129170245272, -0.2319884785423838, -0.4357020266360898, 0.40176015336168547, 0.4720817472009138, 0.1352842273606072, 0.3337281049196612, -0.03836408176927364, 0.3662952235666772, 0.17466870563372083, -0.3234122951464613, -0.4361980782679602, 0.012161642034783426, 0.23889962098470718, 0.26096195281205326, 0.32494991468407974, 0.44882528698095925, 0.21751509762007615, -0.3802680530959428, 0.2730510105090431, 0.1723272746916713, -0.13920345844470106], "readout_randomization_q4": [-0.25, -0.5, -0.25], "unitary_angle_offset": [78], "rc_base_cycle_loop_index": [11], "readout_seed_q2": [17033306506441], "break": [1], "current_seeds_q0": [15144035577502, 3], "readout_seed_q5": [-73332466885869], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "current_seeds_q4": [8483125331955, 2], "pauli_seed_q5": [57280048187710, 37250364052496], "current_seeds_q1": [6986505199754, 0], "readout_randomization_q3": [0.25, 0.25, 0.0], "readout_randomization_q5": [0.25, 0.25, 0.0], "readout_seed_q0": [114829320934051], "pauli_seed_q1": [34470019755655, 27946020799016], "readout_randomization_q1": [0.0, 0.25, 0.25], "pauli_seed_q3": [-12771350299406, 505245418846], "pauli_seed_q2": [-50982158722643, 119343881614275], "readout_randomization_q2": [0.25, 0.0, -0.25], "unitaries_q1": [0.48411904010183093, -0.1942237015504702, -0.08314917988841941, 0.31428850254358665, -0.2877962331373993, 0.339972912082672, 0.3520932401429775, -0.06995349644153848, -0.41228591038566975, -0.34981970641761606, -0.1274395008022431, 0.00728211962388059, 0.4925164648993672, -0.22100626514078314, 0.4663373044190351, 0.2652796701499689, -0.1940641530915279, -0.004259973013947871, 0.4206515507387678, 0.2999632650176842, -0.027557340987776513, -0.4796988074039099, -0.2711085794287058, -0.1427614521973979, 0.2606958900527516, 0.06832291882974673, 0.06752295976617262, -0.49374088600902866, 0.011725823508509592, -0.1904833928861862, -0.38152574068700673, 0.2762103529668707, 0.35954051017160893, 0.17773461296227566, -0.28766952015633507, -0.18236373147040297, 0.3830795306205417, -0.356367840362811, -0.44639406555807426, -0.2705349101205172, -0.2164034875761871, -0.4047643307788249, 0.22063635836623874, 0.24874871752243877, 0.031028229061952572, 0.1617411090224934, 0.28028169533084935, 0.4398136018251897, -0.4031368826142234, -0.06717542216274452, -0.35829684548359, 0.004340707104834252, 0.11441606546784655, 0.11945848943226167, 0.3706034854176288, -0.4643162198608053, -0.047720446486142265, -0.10900193868114982, -0.03522460819027984, -0.2781207104770047, 0.49150594401294256, 0.4814965178886297, 0.4468761306925302, -0.4177095451891617, 0.3382932840446351, 0.14285195841982912, 0.08841780823371082, 0.3781041938415939, -0.44607081183047725, 0.41132629098234474, -0.37178913337915986, 0.44493207735456863, 0.4413383368652397, 0.16574731062717163, -0.2636358117380446, 0.15396173955647896, 0.19511749309766913, -0.0854317187436564, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration14].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration14].json index 2c3c0da16..3452816f8 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration14].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration14].json @@ -1 +1 @@ -{"readout_seed_q4": [-1703976699851], "unitary_angle_offset": [78], "readout_source_unitaries_q4": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "current_seeds_q0": [11567936422990, 0], "pauli_seed_q4": [-132213089617295, -136889955735746], "unitaries_q4": [0.40234032300345746, 0.32971884186395783, -0.15518229722326993, 0.04151701288553511, 0.4149028637475425, -0.4395043820559579, 0.4439617577671342, -0.2877488688444849, -0.44591127561762534, 0.26107100081415524, -0.374690669539806, -0.060092742372248154, -0.4896137555816509, -0.09969150290183748, -0.09760467302807996, 0.22572790778548324, 0.11139547525634441, 0.06799602130666571, -0.1361132465678203, 0.21776550110714865, -0.37723253512500676, 0.4167878545740997, 0.049327067215809706, -0.004427030405253163, -0.3734479866783218, -0.26256977331275166, -0.03058157694307795, 0.09379952390239765, 0.1973131805413999, -0.38195938546995833, -0.05462618005151043, 0.07135232308423767, -0.2510814708904121, 0.360256209977063, 0.41662052915091863, 0.43181913228789526, 0.16721244956765702, -0.11279071962259124, 0.3882080460162669, -0.2139590450458222, -0.4285359332075629, 0.3426108370944938, 0.32558155777366693, -0.08123758838598505, 0.20547837357075238, 0.026388930267494004, -0.3783608350757284, -0.4215773447368427, 0.1074682243229077, 0.24049247889338332, 0.2576621611626244, 0.1429872906517069, 0.19320114364873575, 0.18916516162934727, 0.3602407422904079, 0.14025912357401893, 0.4089672758256242, 0.17685534791162993, 0.46825986056713376, -0.47190455232954776, -0.21121214619110518, 0.4746938851849194, 0.23576781990978546, -0.41683949717481283, 0.18151724721489515, 0.099786868240475, 0.3517301944760227, -0.4484182951348821, -0.12568734236262458, -0.4865840148088658, 0.16852369824665203, -0.021009841695313725, 0.47988603256257534, 0.4355275222892274, 0.08805243674673235, -0.1870609049750307, 0.3776046805460531, -0.1890155741254489, 0.25, 0.0, -0.25], "readout_source_unitaries_q1": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "readout_source_unitaries_q0": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "unitaries_q3": [-0.444153837704679, -0.2678503045730096, -0.20040028666454646, -0.2797248113332209, -0.28722577580825615, 0.051803177141760415, -0.18758437970965147, 0.025135451800657904, -0.41925850582989455, -0.08136501636392879, -0.445271186370789, 0.11199236531999546, 0.16895527186618509, 0.3038510777441168, -0.25635721054248606, 0.41373787501252934, -0.00924419505930274, -0.49500617846724637, 0.04517698380747248, 0.3736056255881408, -0.23042832066938956, 0.48660858755684444, 0.0644601318496747, -0.3651103820904211, -0.2813933307165257, -0.08633332620212997, -0.3576968962671607, -0.4681498348207711, 0.3784255819403306, -0.4021117303101249, -0.45182440906799926, 0.4487621872882883, 0.01829275539778763, 0.23451311792852536, 0.07076615400635333, -0.10022812594482033, -0.1703562718193048, 0.03370986586156732, -0.4221340290585829, 0.25690596776971475, -0.23734537253986687, 0.19190429382765473, -0.4098307847526783, -0.34710985644882797, -0.17828008632045567, -0.16558770752175178, 0.3960680926516851, -0.26237626860959296, 0.0613204268378027, -0.02917801601742198, 0.024064861372878, 0.22827181533629215, 0.39866618977662327, 0.22346762715176283, 0.20423403798586293, 0.30164309626368535, -0.4120386922431365, 0.14091562292604465, 0.4917113135520985, -0.3092717099731246, 0.4802307733810167, 0.0488876292027669, -0.41772138838907225, 0.0980209432009218, -0.20021451153449732, 0.2146600639917331, 0.20712762310916233, -0.3403026285684163, 0.4060575610720214, 0.258661210979799, 0.185835345332638, -0.12925917364796646, -0.1459133170689384, -0.004975097634783765, 0.016002911719024127, -0.4165459335296404, 0.4894086579308805, 0.012196213778462806, 0.0, 0.0, -0.5], "current_seeds_q1": [34869513621375, 0], "readout_seed_q0": [75062137625173], "break": [1], "readout_source_unitaries_q2": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "pauli_seed_q2": [-133056412874444, 54594642012057], "readout_source_unitaries_q5": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "current_seeds_q2": [13648660503014, 2], "pauli_seed_q1": [60017443263372, 139478054485503], "rc_seed_index": [2], "readout_seed_q1": [10652871225501], "current_seeds_q3": [31155819389228, 0], "readout_randomization_q1": [-0.25, 0.0, -0.25], "readout_randomization_q2": [0.0, -0.5, -0.5], "is_mod_zero": [0], "readout_seed_q5": [-2944130350512], "unitaries_q2": [-0.0859309855169279, 0.35029365642154886, -0.21420182853494651, 0.18760028191363887, -0.28485744721260886, 0.057318521323395544, 0.22201092389900978, 0.47367514134620947, 0.13755156757528653, 0.4512413528363055, -0.47065008790002594, 0.1734552494365822, -0.3177235489138397, -0.16885000522517402, -0.42061281807632867, 0.3911759845303031, -0.29308952850711734, 0.17600903158385606, -0.49089954872644626, 0.48333014377647743, 0.36823843839154335, -0.4642748186488568, -0.4296253413034954, 0.3395366446713197, -0.21022271480579136, -0.08722634311680011, -0.2284462147227977, -0.3062633617185391, 0.3866124655850989, 0.2184874815159965, 0.3822599408908971, 0.07358068439263832, 0.35911783302185896, 0.4980383678436553, -0.0769597740948278, 0.15377505192719454, -0.1375695796222196, -0.3886559574053656, -0.4641161820327113, -0.2877355696129733, 0.4151805693951154, 0.2542984989212549, 0.20076546001369877, -0.04042363460278864, -0.11804108316546547, -0.03859037256674469, -0.4102183234952257, 0.42191404860625425, -0.45834207293470186, 0.12756873876982056, 0.06256391649851878, -0.31177994003055787, -0.05615858277264607, -0.2722341089927305, 0.3855950011202296, -0.47395468114399364, 0.3880041097036475, -0.11709447484012614, 0.08105917778548744, 0.4452687082975473, 0.2319884785423838, -0.4357020266360898, -0.40176015336168547, -0.4720817472009138, 0.1352842273606072, -0.3337281049196612, 0.03836408176927364, 0.3662952235666772, 0.32533129436627917, -0.1765877048535387, -0.4361980782679602, -0.012161642034783426, 0.2611003790152928, 0.23903804718794674, 0.32494991468407974, -0.05117471301904075, 0.21751509762007615, -0.3802680530959428, -0.5, 0.0, 0.0], "pauli_seed_q3": [59797934191791, 124623277556914], "readout_source_unitaries_q3": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "readout_randomization_q3": [0.0, 0.0, -0.5], "pauli_seed_q5": [-133041699791850, 131854131899589], "modulo_counter": [49], "current_seeds_q5": [32963532974897, 2], "pauli_seed_q0": [56235133306163, 46271745691961], "rc_base_cycle_loop_index": [11], "unitaries_q1": [-0.015880959898169067, -0.3057762984495298, -0.4168508201115806, -0.31428850254358665, -0.21220376686260067, -0.160027087917328, 0.3520932401429775, -0.06995349644153848, 0.08771408961433025, -0.34981970641761606, -0.1274395008022431, -0.4927178803761194, 0.4925164648993672, -0.27899373485921686, -0.4663373044190351, 0.2347203298500311, -0.1940641530915279, 0.004259973013947871, -0.4206515507387678, 0.2999632650176842, 0.027557340987776513, -0.02030119259609009, -0.2288914205712942, 0.3572385478026021, 0.2606958900527516, 0.06832291882974673, -0.4324770402338274, 0.006259113990971343, 0.011725823508509592, -0.1904833928861862, 0.11847425931299327, 0.2762103529668707, -0.14045948982839107, -0.32226538703772434, -0.28766952015633507, -0.18236373147040297, 0.3830795306205417, -0.143632159637189, -0.05360593444192574, -0.22946508987948278, -0.2835965124238129, 0.0952356692211751, 0.22063635836623874, 0.24874871752243877, -0.4689717709380474, -0.3382588909775066, 0.21971830466915065, -0.4398136018251897, 0.4031368826142234, -0.4328245778372555, 0.14170315451641002, -0.49565929289516575, 0.38558393453215345, 0.38054151056773833, -0.3706034854176288, -0.03568378013919471, 0.45227955351385773, 0.3909980613188502, -0.46477539180972016, -0.2218792895229953, 0.008494055987057436, 0.4814965178886297, -0.4468761306925302, -0.0822904548108383, 0.1617067159553649, 0.14285195841982912, 0.08841780823371082, 0.3781041938415939, -0.44607081183047725, 0.41132629098234474, -0.37178913337915986, -0.055067922645431366, -0.05866166313476029, 0.33425268937282837, -0.23636418826195538, 0.34603826044352104, 0.19511749309766913, 0.0854317187436564, -0.25, 0.0, -0.25], "readout_randomization_q4": [-0.25, 0.0, -0.25], "current_seeds_q4": [36146255243727, 2], "readout_seed_q2": [-16410226418592], "readout_randomization_q5": [0.0, 0.25, -0.25], "unitaries_q5": [-0.3319088786549962, 0.36306701332482305, -0.29085071664499296, -0.13952487632665367, 0.35148149681080554, 0.057626007300324744, 0.20788732949937128, -0.07874238083052987, -0.26848903953135306, -0.05653346877788934, 0.1360182062364892, 0.2380340409652426, 0.3971106996721616, 0.14197951721286017, -0.1595395201287566, -0.15289293302358686, 0.37510373420446186, 0.3493587470698003, -0.3624805003573677, 0.008306765686334927, -0.008483669473928757, 0.19366711301472606, 0.1935118362602708, -0.17038852402531646, 0.4190199539448187, 0.19399838117309542, 0.46421182113421366, 0.0025530062334233605, 0.3195963535447355, -0.34197805774659074, 0.07742971955186206, 0.2133535953466037, 0.4519319428775823, 0.12794233735865745, -0.028811953574859217, 0.44868171025627746, -0.15650842079780958, -0.16903330759792823, 0.09463038726272543, -0.18783632090951485, 0.3609471078408468, 0.15978147959978628, -0.4438225748289497, -0.06458650101018293, 0.21016554839495427, -0.19045121571251045, -0.4245386550744783, 0.46306895003329274, 0.48442160523621425, -0.13476795769143735, 0.056311052859296495, -0.3715304328143034, -0.19139346063203533, 0.02053440149051511, -0.3608606100066396, 0.15008591523601922, 0.23649482115613196, -0.1472656749712904, 0.2676984602701111, 0.10812050711245647, -0.29619104176566324, 0.31659870927306955, -0.3039638195146246, 0.46737966354565685, -0.17676888165335924, 0.44602483355212996, -0.1921652859683043, 0.4328683952324681, 0.22181377205755837, -0.45050461907741024, 0.28147714842391025, -0.07161741018938628, -0.16208734362142252, 0.18432922293216691, 0.40276701807278315, -0.09105006943372729, 0.04559884867776631, 0.3713159707842202, 0.0, 0.25, 0.25], "unitaries_q0": [0.34215653660366385, 0.23888989776727243, 0.20147486932348357, 0.026809000875157807, -0.34828986034517584, -0.039234916317450796, -0.12315582717864615, 0.47110093793493135, 0.20420834050016623, -0.3197058603934231, 0.2479726770099262, 0.31375414547666836, 0.49105233325456865, 0.08201948178145457, -0.2163845393922088, -0.18180393326804634, 0.4447669819517266, 0.2926416855894409, -0.2567003523160629, -0.03291592648032449, -0.1566001925728422, -0.03297551316599012, -0.4871575226292144, -0.32926391538136457, -0.44990811567888755, 0.34029098228440446, -0.39341591753839467, -0.2551812027350344, 0.2828877981082272, -0.3225331758216612, 0.3927726383275072, -0.05240187483477854, 0.40011916609044107, -0.21533379611071268, 0.192623419867207, -0.4951949435326988, 0.49089066447141505, 0.4655014605768244, 0.17201116439296982, 0.18967701752599453, 0.07448506389936327, 0.29334057774597255, 0.41127481942283595, 0.42201221928209165, -0.03047247914082618, 0.1293619641527073, -0.33980968285915836, 0.3303966837243273, 0.3385085508172061, -0.3817490270312973, 0.3610912954963368, 0.24209820089131995, -0.49320924723211945, -0.4569557480242459, 0.17261399654285725, 0.25227068013025544, -0.19660653963240193, -0.114802418824965, -0.172704433349967, 0.3693422356873377, -0.44968060926099085, -0.42638081326169797, -0.26228990149481035, 0.1496960222960304, -0.21221815451668746, 0.43123595744645016, 0.23108886334528123, -0.4803542081018186, 0.026563378638172708, -0.3427234359697735, 0.27092919654169023, -0.2402723677717553, -0.3177048344177287, -0.06033192657007902, 0.447220912180196, 0.3829003034514109, 0.3948500346756276, 0.1185831188857982, 0.0, 0.25, 0.25], "readout_randomization_q0": [-0.5, 0.25, -0.25], "readout_seed_q3": [-25732983856346], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15]} \ No newline at end of file +{"pauli_seed_q3": [119595868383582, -32228421596828], "unitary_angle_offset": [78], "current_seeds_q0": [23135872845980, 1], "unitaries_q2": [0.4140690144830721, 0.14970634357845114, 0.21420182853494651, -0.18760028191363887, -0.28485744721260886, -0.057318521323395544, 0.2779890761009902, 0.47367514134620947, -0.13755156757528653, 0.04875864716369449, -0.47065008790002594, 0.3265447505634178, -0.1822764510861603, -0.16885000522517402, 0.42061281807632867, -0.3911759845303031, -0.20691047149288266, -0.32399096841614394, -0.49089954872644626, 0.016669856223522572, -0.36823843839154335, -0.03572518135114322, -0.07037465869650461, -0.16046335532868028, -0.21022271480579136, -0.4127736568831999, 0.2284462147227977, 0.3062633617185391, 0.11338753441490113, 0.2184874815159965, 0.3822599408908971, 0.07358068439263832, 0.35911783302185896, -0.001961632156344706, -0.4230402259051722, 0.34622494807280546, -0.3624304203777804, -0.11134404259463437, -0.4641161820327113, 0.2122644303870267, 0.08481943060488462, -0.2542984989212549, -0.20076546001369877, -0.45957636539721136, 0.38195891683453453, 0.4614096274332553, -0.4102183234952257, -0.07808595139374575, 0.04165792706529814, 0.12756873876982056, 0.06256391649851878, -0.31177994003055787, -0.44384141722735393, -0.22776589100726952, -0.3855950011202296, -0.02604531885600636, 0.3880041097036475, 0.38290552515987386, 0.08105917778548744, -0.05473129170245272, 0.2319884785423838, -0.06429797336391019, 0.40176015336168547, 0.4720817472009138, 0.3647157726393928, -0.3337281049196612, -0.46163591823072636, 0.3662952235666772, 0.32533129436627917, 0.3234122951464613, -0.4361980782679602, -0.012161642034783426, 0.2611003790152928, 0.26096195281205326, 0.17505008531592026, -0.44882528698095925, 0.28248490237992385, 0.1197319469040572, 0.2730510105090431, 0.1723272746916713, -0.13920345844470106], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "rc_seed_index": [2], "current_seeds_q3": [62311638778457, 1], "readout_seed_q3": [129378273583824], "readout_seed_q2": [17033306506441], "readout_seed_q1": [114697805194205], "unitaries_q3": [0.05584616229532102, -0.23214969542699038, -0.29959971333545354, 0.2797248113332209, -0.21277422419174385, 0.051803177141760415, -0.18758437970965147, 0.4748645481993421, 0.41925850582989455, 0.08136501636392879, -0.445271186370789, 0.38800763468000454, 0.3310447281338149, 0.3038510777441168, -0.24364278945751394, -0.41373787501252934, -0.00924419505930274, 0.49500617846724637, 0.4548230161925275, 0.3736056255881408, 0.23042832066938956, 0.01339141244315556, 0.0644601318496747, -0.13488961790957887, -0.21860666928347428, -0.41366667379787003, 0.14230310373283928, 0.031850165179228895, 0.3784255819403306, -0.4021117303101249, 0.048175590932000745, 0.4487621872882883, 0.01829275539778763, -0.26548688207147464, 0.42923384599364667, 0.10022812594482033, 0.1703562718193048, 0.03370986586156732, -0.07786597094141712, 0.24309403223028525, -0.23734537253986687, 0.3080957061723453, 0.4098307847526783, -0.34710985644882797, -0.32171991367954433, -0.3344122924782482, 0.3960680926516851, 0.26237626860959296, 0.4386795731621973, -0.02917801601742198, 0.475935138627122, 0.27172818466370785, 0.39866618977662327, 0.2765323728482372, -0.20423403798586293, 0.19835690373631465, 0.0879613077568635, 0.14091562292604465, 0.4917113135520985, 0.1907282900268754, 0.4802307733810167, 0.0488876292027669, -0.41772138838907225, -0.4019790567990782, -0.20021451153449732, -0.2853399360082669, 0.20712762310916233, -0.1596973714315837, 0.0939424389279786, -0.258661210979799, 0.185835345332638, -0.37074082635203354, 0.1459133170689384, -0.49502490236521624, -0.4839970882809759, -0.4165459335296404, 0.010591342069119491, -0.012196213778462806, 0.22934045114803325, -0.1442416045013175, 0.32767994031297576], "readout_seed_q5": [-73332466885869], "pauli_seed_q5": [15391577126957, -17766712911478], "readout_randomization_q1": [0.0, 0.25, -0.25], "readout_randomization_q3": [0.25, 0.25, -0.5], "readout_randomization_q5": [0.25, 0.25, -0.5], "pauli_seed_q2": [15362150961769, 109189284024114], "current_seeds_q1": [69739027242751, 1], "readout_randomization_q4": [0.25, -0.5, -0.25], "rc_base_cycle_loop_index": [11], "readout_randomization_q0": [0.25, 0.25, 0.0], "break": [1], "unitaries_q4": [0.40234032300345746, 0.32971884186395783, 0.3448177027767301, 0.04151701288553511, 0.4149028637475425, -0.4395043820559579, -0.0560382422328658, -0.21225113115551508, -0.054088724382374664, -0.26107100081415524, -0.125309330460194, -0.060092742372248154, -0.4896137555816509, -0.09969150290183748, -0.09760467302807996, -0.27427209221451676, 0.3886045247436556, -0.06799602130666571, -0.3638867534321797, 0.28223449889285135, -0.37723253512500676, 0.4167878545740997, 0.4506729327841903, 0.004427030405253163, -0.1265520133216782, -0.23743022668724834, 0.46941842305692205, -0.40620047609760235, 0.3026868194586001, 0.38195938546995833, 0.05462618005151043, 0.42864767691576233, 0.2489185291095879, -0.13974379002293702, 0.08337947084908137, 0.06818086771210474, -0.16721244956765702, -0.38720928037740876, 0.3882080460162669, 0.2860409549541778, -0.07146406679243711, 0.1573891629055062, -0.32558155777366693, -0.41876241161401495, 0.20547837357075238, -0.473611069732506, -0.12163916492427163, 0.4215773447368427, -0.1074682243229077, 0.24049247889338332, 0.24233783883737559, -0.1429872906517069, 0.30679885635126425, -0.31083483837065273, -0.13975925770959208, 0.14025912357401893, 0.4089672758256242, -0.32314465208837007, 0.03174013943286624, -0.028095447670452245, -0.2887878538088948, 0.025306114815080605, 0.23576781990978546, -0.41683949717481283, 0.18151724721489515, -0.400213131759525, -0.14826980552397728, -0.4484182951348821, -0.12568734236262458, -0.4865840148088658, 0.16852369824665203, -0.021009841695313725, -0.020113967437424662, 0.4355275222892274, 0.08805243674673235, 0.3129390950249693, 0.3776046805460531, 0.3109844258745511, 0.36390183284432354, 0.4611227243477174, -0.22440520452503776], "pauli_seed_q0": [112470266612326, 92543491383923], "readout_seed_q4": [-62630319121345], "readout_source_angles": [0.0, -0.5, -0.5, -0.25, 0.0, -0.25, 0.0, 0.0, -0.5, 0.25, -0.5, -0.25, 0.0, 0.25, -0.25, -0.5, 0.25, -0.25, -0.5, 0.25, 0.25, 0.0, 0.25, 0.25, -0.25, 0.25, 0.0, 0.25, 0.25, -0.5, -0.25, 0.25, -0.5, 0.25, 0.25, 0.0], "current_seeds_q2": [27297321006028, 0], "readout_randomization_q2": [-0.25, 0.0, -0.25], "modulo_counter": [49], "current_seeds_q4": [1923766309791, 0], "readout_seed_q0": [114829320934051], "unitaries_q5": [0.1680911213450038, 0.13693298667517695, 0.29085071664499296, 0.13952487632665367, 0.14851850318919446, 0.057626007300324744, 0.20788732949937128, -0.42125761916947013, -0.23151096046864694, 0.05653346877788934, 0.3639817937635108, -0.2619659590347574, 0.3971106996721616, 0.14197951721286017, -0.1595395201287566, 0.34710706697641314, 0.12489626579553814, 0.1506412529301997, -0.13751949964263233, 0.4916932343136651, -0.008483669473928757, 0.19366711301472606, 0.3064881637397292, -0.32961147597468354, 0.08098004605518128, 0.3060016188269046, -0.035788178865786335, 0.0025530062334233605, 0.3195963535447355, 0.15802194225340926, -0.42257028044813794, 0.2133535953466037, -0.048068057122417684, 0.12794233735865745, -0.4711880464251408, -0.44868171025627746, -0.3434915792021904, -0.16903330759792823, 0.40536961273727457, 0.18783632090951485, 0.13905289215915317, -0.3402185204002137, 0.05617742517105029, -0.43541349898981707, 0.28983445160504573, 0.19045121571251045, -0.4245386550744783, -0.46306895003329274, 0.015578394763785752, -0.36523204230856265, 0.056311052859296495, -0.3715304328143034, -0.19139346063203533, -0.4794655985094849, 0.1391393899933604, 0.15008591523601922, -0.26350517884386804, 0.3527343250287096, 0.2676984602701111, -0.39187949288754353, -0.29619104176566324, 0.18340129072693045, 0.3039638195146246, -0.46737966354565685, -0.32323111834664076, 0.44602483355212996, 0.3078347140316957, 0.4328683952324681, 0.22181377205755837, -0.45050461907741024, 0.28147714842391025, -0.07161741018938628, 0.3379126563785775, 0.3156707770678331, 0.09723298192721685, 0.09105006943372729, 0.04559884867776631, -0.3713159707842202, 0.21220693776629673, -0.38382575941465547, -0.11316011308353424], "unitaries_q1": [-0.015880959898169067, -0.3057762984495298, -0.4168508201115806, -0.31428850254358665, -0.2877962331373993, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, 0.41228591038566975, -0.15018029358238394, -0.3725604991977569, 0.00728211962388059, -0.007483535100632821, -0.27899373485921686, 0.03366269558096491, -0.2652796701499689, -0.3059358469084721, -0.004259973013947871, -0.07934844926123219, 0.2999632650176842, -0.027557340987776513, 0.02030119259609009, -0.2288914205712942, -0.3572385478026021, -0.2606958900527516, 0.06832291882974673, -0.06752295976617262, -0.006259113990971343, 0.011725823508509592, -0.3095166071138138, -0.11847425931299327, 0.2237896470331293, 0.35954051017160893, -0.32226538703772434, -0.28766952015633507, 0.31763626852959703, 0.3830795306205417, -0.143632159637189, -0.05360593444192574, 0.2705349101205172, -0.2835965124238129, -0.4047643307788249, 0.22063635836623874, 0.24874871752243877, -0.4689717709380474, -0.3382588909775066, 0.21971830466915065, 0.06018639817481031, -0.09686311738577658, -0.4328245778372555, -0.35829684548359, 0.004340707104834252, 0.11441606546784655, 0.11945848943226167, -0.12939651458237122, -0.03568378013919471, -0.45227955351385773, 0.10900193868114982, -0.03522460819027984, 0.2781207104770047, -0.49150594401294256, 0.018503482111370317, 0.4468761306925302, -0.4177095451891617, 0.3382932840446351, 0.14285195841982912, 0.08841780823371082, 0.12189580615840612, -0.053929188169522746, 0.08867370901765526, -0.37178913337915986, -0.44493207735456863, 0.05866166313476029, 0.16574731062717163, -0.23636418826195538, -0.15396173955647896, 0.19511749309766913, -0.4145682812563436, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353], "unitaries_q0": [-0.15784346339633615, 0.26111010223272757, 0.2985251306765164, -0.026809000875157807, -0.34828986034517584, -0.4607650836825492, -0.37684417282135385, 0.47110093793493135, -0.20420834050016623, -0.18029413960657692, 0.2479726770099262, 0.18624585452333164, 0.008947666745431349, 0.08201948178145457, 0.2163845393922088, 0.18180393326804634, 0.4447669819517266, -0.2926416855894409, -0.24329964768393708, -0.4670840735196755, 0.3433998074271578, 0.4670244868340099, -0.4871575226292144, -0.32926391538136457, 0.050091884321112445, 0.15970901771559554, -0.10658408246160533, -0.24481879726496558, 0.2828877981082272, 0.3225331758216612, 0.1072273616724928, -0.44759812516522146, -0.09988083390955893, 0.2846662038892873, 0.307376580132793, 0.4951949435326988, 0.00910933552858495, 0.4655014605768244, -0.17201116439296982, -0.18967701752599453, 0.07448506389936327, 0.20665942225402745, -0.41127481942283595, 0.07798778071790835, 0.4695275208591738, -0.3706380358472927, -0.16019031714084164, 0.1696033162756727, -0.3385085508172061, -0.3817490270312973, -0.3610912954963368, -0.24209820089131995, -0.49320924723211945, 0.4569557480242459, 0.32738600345714275, 0.24772931986974456, 0.30339346036759807, -0.114802418824965, -0.327295566650033, -0.3693422356873377, -0.05031939073900915, -0.42638081326169797, 0.26228990149481035, 0.3503039777039696, -0.21221815451668746, 0.06876404255354984, 0.2689111366547188, -0.4803542081018186, -0.026563378638172708, -0.1572765640302265, 0.27092919654169023, -0.2597276322282447, 0.3177048344177287, -0.439668073429921, 0.447220912180196, -0.1170996965485891, 0.3948500346756276, 0.1185831188857982, -0.26780126282373473, 0.2943348490020554, 0.30565501841008924], "pauli_seed_q4": [17048797476067, 7695065239164], "is_mod_zero": [0], "current_seeds_q5": [65927065949794, 0], "pauli_seed_q1": [120034886526744, -2518867739649]} \ No newline at end of file diff --git a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration15].json b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration15].json index 1bae5444c..eeebe56d5 100644 --- a/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration15].json +++ b/test/unit/__fixtures__/test_randomized_compiling_configuration[configuration15].json @@ -1 +1 @@ -{"pauli_seed_q2": [-50982158722643, 119343881614275], "unitaries_q2": [0.03836408176927364, 0.3662952235666772, -0.17466870563372083, 0.3234122951464613, -0.4361980782679602, -0.012161642034783426, 0.2611003790152928, 0.26096195281205326, 0.17505008531592026, 0.05117471301904075, 0.21751509762007615, 0.3802680530959428, -0.22694898949095688, 0.3276727253083287, 0.13920345844470106, -0.05584616229532102, -0.2678503045730096, -0.29959971333545354, -0.2202751886667791, -0.28722577580825615, -0.051803177141760415, -0.31241562029034853, 0.025135451800657904, 0.41925850582989455, -0.4186349836360712, -0.445271186370789, -0.11199236531999546, -0.16895527186618509, 0.1961489222558832, -0.25635721054248606, 0.41373787501252934, -0.00924419505930274, -0.49500617846724637, -0.4548230161925275, 0.1263943744118592, 0.23042832066938956, 0.01339141244315556, 0.4355398681503253, -0.3651103820904211, -0.2813933307165257, -0.08633332620212997, -0.3576968962671607, -0.4681498348207711, 0.3784255819403306, 0.09788826968987507, 0.048175590932000745, 0.05123781271171168, -0.01829275539778763, -0.23451311792852536, 0.42923384599364667, -0.10022812594482033, 0.3296437281806952, 0.4662901341384327, -0.07786597094141712, -0.25690596776971475, -0.23734537253986687, -0.19190429382765473, -0.09016921524732169, -0.15289014355117203, 0.32171991367954433, 0.3344122924782482, 0.10393190734831492, 0.26237626860959296, -0.0613204268378027, -0.02917801601742198, -0.024064861372878, -0.22827181533629215, 0.10133381022337673, -0.2765323728482372, -0.2957659620141371, 0.30164309626368535, 0.0879613077568635, -0.35908437707395535, 0.008288686447901483, -0.1907282900268754, 0.019769226618983282, 0.0488876292027669, -0.08227861161092775, -0.0980209432009218, -0.2997854884655027, 0.2146600639917331, 0.20712762310916233, -0.3403026285684163, -0.0939424389279786, -0.241338789020201, 0.314164654667362, -0.37074082635203354, -0.3540866829310616, -0.004975097634783765, -0.016002911719024127, -0.08345406647035958, 0.4894086579308805, 0.4878037862215372, 0.27065954885196675, -0.1442416045013175, 0.17232005968702424, -0.40234032300345746, 0.17028115813604217, 0.3448177027767301, 0.04151701288553511, 0.08509713625245752, 0.4395043820559579, -0.4439617577671342, -0.2877488688444849, 0.44591127561762534, -0.26107100081415524, -0.374690669539806, 0.060092742372248154, 0.4896137555816509, -0.09969150290183748, 0.09760467302807996, 0.27427209221451676, 0.3886045247436556, -0.4320039786933343, 0.3638867534321797, 0.21776550110714865, -0.37723253512500676, -0.08321214542590027, 0.4506729327841903, -0.49557296959474684], "rc_seed_index": [2], "pauli_seed_q1": [34470019755655, 27946020799016], "current_seeds_q2": [444590, 3], "unitaries_q1": [-0.006259113990971343, 0.011725823508509592, -0.3095166071138138, -0.11847425931299327, 0.2237896470331293, 0.35954051017160893, -0.32226538703772434, -0.21233047984366493, -0.31763626852959703, -0.3830795306205417, -0.143632159637189, -0.44639406555807426, -0.2705349101205172, -0.2835965124238129, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, -0.1617411090224934, 0.21971830466915065, -0.06018639817481031, 0.09686311738577658, -0.06717542216274452, 0.14170315451641002, 0.004340707104834252, 0.38558393453215345, -0.11945848943226167, -0.3706034854176288, -0.4643162198608053, 0.047720446486142265, -0.3909980613188502, -0.46477539180972016, -0.2781207104770047, -0.008494055987057436, 0.018503482111370317, -0.4468761306925302, 0.4177095451891617, 0.1617067159553649, 0.14285195841982912, 0.08841780823371082, 0.3781041938415939, 0.053929188169522746, -0.08867370901765526, -0.37178913337915986, 0.44493207735456863, -0.05866166313476029, 0.16574731062717163, -0.2636358117380446, -0.34603826044352104, 0.3048825069023309, 0.0854317187436564, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353, -0.0859309855169279, 0.35029365642154886, -0.21420182853494651, -0.31239971808636113, -0.21514255278739114, 0.44268147867660446, -0.22201092389900978, 0.47367514134620947, 0.3624484324247135, -0.4512413528363055, -0.47065008790002594, 0.3265447505634178, 0.3177235489138397, -0.331149994774826, -0.42061281807632867, 0.3911759845303031, -0.29308952850711734, -0.32399096841614394, 0.009100451273553745, 0.48333014377647743, 0.36823843839154335, -0.4642748186488568, -0.07037465869650461, -0.3395366446713197, 0.21022271480579136, -0.08722634311680011, -0.2715537852772023, 0.3062633617185391, 0.11338753441490113, -0.2815125184840035, 0.3822599408908971, 0.07358068439263832, -0.14088216697814104, -0.001961632156344706, -0.0769597740948278, -0.34622494807280546, 0.3624304203777804, -0.11134404259463437, -0.03588381796728868, 0.2877355696129733, 0.08481943060488462, -0.2457015010787451, -0.29923453998630123, -0.45957636539721136, -0.38195891683453453, -0.4614096274332553, -0.4102183234952257, -0.42191404860625425, 0.45834207293470186, 0.12756873876982056, 0.4374360835014812, -0.18822005996944213, -0.44384141722735393, 0.22776589100726952, -0.1144049988797704, -0.02604531885600636, -0.3880041097036475, 0.11709447484012614, 0.08105917778548744, -0.4452687082975473, 0.2680115214576162, -0.4357020266360898, 0.40176015336168547, -0.02791825279908622, 0.3647157726393928, -0.3337281049196612], "unitaries_q0": [0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, -0.12425959266423448, 0.34215653660366385, 0.23888989776727243, 0.20147486932348357, 0.026809000875157807, -0.15171013965482416, -0.4607650836825492, -0.37684417282135385, 0.028899062065068648, -0.29579165949983377, 0.18029413960657692, 0.2520273229900738, -0.31375414547666836, 0.008947666745431349, 0.08201948178145457, 0.2163845393922088, -0.31819606673195366, 0.4447669819517266, -0.2926416855894409, 0.2567003523160629, -0.4670840735196755, 0.3433998074271578, -0.03297551316599012, -0.4871575226292144, 0.17073608461863543, 0.050091884321112445, 0.34029098228440446, -0.39341591753839467, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, -0.2846662038892873, 0.192623419867207, -0.0048050564673012275, 0.00910933552858495, 0.0344985394231756, 0.17201116439296982, -0.31032298247400547, 0.07448506389936327, -0.20665942225402745, -0.08872518057716405, 0.42201221928209165, 0.4695275208591738, -0.3706380358472927, -0.16019031714084164, -0.3303966837243273, -0.3385085508172061, -0.11825097296870268, -0.13890870450366322, -0.25790179910868005, -0.006790752767880548, -0.04304425197575412, 0.32738600345714275, 0.25227068013025544, 0.19660653963240193, -0.385197581175035, -0.327295566650033, 0.3693422356873377, -0.44968060926099085, -0.07361918673830203, 0.26228990149481035, 0.3503039777039696, -0.28778184548331254, 0.43123595744645016, -0.2689111366547188, -0.4803542081018186, 0.026563378638172708, -0.3427234359697735, 0.22907080345830977, -0.2597276322282447, 0.3177048344177287, -0.06033192657007902, -0.447220912180196, 0.1170996965485891, 0.10514996532437237, 0.1185831188857982, -0.23219873717626527, 0.2943348490020554, -0.30565501841008924, -0.48411904010183093, -0.3057762984495298, 0.4168508201115806, -0.18571149745641335, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.3725604991977569, -0.4927178803761194, -0.007483535100632821, -0.27899373485921686, -0.4663373044190351, -0.2652796701499689, -0.1940641530915279, 0.004259973013947871, 0.07934844926123219, 0.20003673498231578, 0.4724426590122235, 0.02030119259609009, -0.2711085794287058, 0.3572385478026021, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262], "break": [1], "current_seeds_q1": [104107, 0], "rc_base_cycle_loop_index": [4], "pauli_seed_q0": [-13838434709596, 60576142310008], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "unitary_angle_offset": [117], "current_seeds_q0": [225663, 3]} \ No newline at end of file +{"current_seeds_q0": [225663, 3], "pauli_conjugates_map": [0, 13, 14, 3, 7, 10, 9, 4, 11, 6, 5, 8, 12, 1, 2, 15], "unitaries_q1": [-0.006259113990971343, 0.011725823508509592, -0.3095166071138138, -0.11847425931299327, 0.2237896470331293, 0.35954051017160893, -0.32226538703772434, -0.21233047984366493, -0.31763626852959703, -0.3830795306205417, -0.143632159637189, -0.44639406555807426, -0.2705349101205172, -0.2835965124238129, -0.0952356692211751, 0.27936364163376126, 0.24874871752243877, 0.4689717709380474, -0.1617411090224934, 0.21971830466915065, -0.06018639817481031, 0.09686311738577658, -0.06717542216274452, 0.14170315451641002, 0.004340707104834252, 0.38558393453215345, -0.11945848943226167, -0.3706034854176288, -0.4643162198608053, 0.047720446486142265, -0.3909980613188502, -0.46477539180972016, -0.2781207104770047, -0.008494055987057436, 0.018503482111370317, -0.4468761306925302, 0.4177095451891617, 0.1617067159553649, 0.14285195841982912, 0.08841780823371082, 0.3781041938415939, 0.053929188169522746, -0.08867370901765526, -0.37178913337915986, 0.44493207735456863, -0.05866166313476029, 0.16574731062717163, -0.2636358117380446, -0.34603826044352104, 0.3048825069023309, 0.0854317187436564, 0.4630714074908795, 0.059332429419090005, 0.2944662830567353, -0.0859309855169279, 0.35029365642154886, -0.21420182853494651, -0.31239971808636113, -0.21514255278739114, 0.44268147867660446, -0.22201092389900978, 0.47367514134620947, 0.3624484324247135, -0.4512413528363055, -0.47065008790002594, 0.3265447505634178, 0.3177235489138397, -0.331149994774826, -0.42061281807632867, 0.3911759845303031, -0.29308952850711734, -0.32399096841614394, 0.009100451273553745, 0.48333014377647743, 0.36823843839154335, -0.4642748186488568, -0.07037465869650461, -0.3395366446713197, 0.21022271480579136, -0.08722634311680011, -0.2715537852772023, 0.3062633617185391, 0.11338753441490113, -0.2815125184840035, 0.3822599408908971, 0.07358068439263832, -0.14088216697814104, -0.001961632156344706, -0.0769597740948278, -0.34622494807280546, 0.3624304203777804, -0.11134404259463437, -0.03588381796728868, 0.2877355696129733, 0.08481943060488462, -0.2457015010787451, -0.29923453998630123, -0.45957636539721136, -0.38195891683453453, -0.4614096274332553, -0.4102183234952257, -0.42191404860625425, 0.45834207293470186, 0.12756873876982056, 0.4374360835014812, -0.18822005996944213, -0.44384141722735393, 0.22776589100726952, -0.1144049988797704, -0.02604531885600636, -0.3880041097036475, 0.11709447484012614, 0.08105917778548744, -0.4452687082975473, 0.2680115214576162, -0.4357020266360898, 0.40176015336168547, -0.02791825279908622, 0.3647157726393928, -0.3337281049196612], "pauli_seed_q2": [-50982158722643, 119343881614275], "unitaries_q0": [0.23034835385360353, 0.010108661519272033, 0.2541627734809673, -0.06682331352363136, 0.28905450205887107, -0.33704238573828604, 0.4712154313820385, -0.42572259206511376, 0.07888407435634903, 0.2331221445808893, 0.13331130172538863, -0.12425959266423448, 0.34215653660366385, 0.23888989776727243, 0.20147486932348357, 0.026809000875157807, -0.15171013965482416, -0.4607650836825492, -0.37684417282135385, 0.028899062065068648, -0.29579165949983377, 0.18029413960657692, 0.2520273229900738, -0.31375414547666836, 0.008947666745431349, 0.08201948178145457, 0.2163845393922088, -0.31819606673195366, 0.4447669819517266, -0.2926416855894409, 0.2567003523160629, -0.4670840735196755, 0.3433998074271578, -0.03297551316599012, -0.4871575226292144, 0.17073608461863543, 0.050091884321112445, 0.34029098228440446, -0.39341591753839467, -0.2551812027350344, 0.2828877981082272, 0.1774668241783388, 0.3927726383275072, -0.44759812516522146, 0.09988083390955893, -0.2846662038892873, 0.192623419867207, -0.0048050564673012275, 0.00910933552858495, 0.0344985394231756, 0.17201116439296982, -0.31032298247400547, 0.07448506389936327, -0.20665942225402745, -0.08872518057716405, 0.42201221928209165, 0.4695275208591738, -0.3706380358472927, -0.16019031714084164, -0.3303966837243273, -0.3385085508172061, -0.11825097296870268, -0.13890870450366322, -0.25790179910868005, -0.006790752767880548, -0.04304425197575412, 0.32738600345714275, 0.25227068013025544, 0.19660653963240193, -0.385197581175035, -0.327295566650033, 0.3693422356873377, -0.44968060926099085, -0.07361918673830203, 0.26228990149481035, 0.3503039777039696, -0.28778184548331254, 0.43123595744645016, -0.2689111366547188, -0.4803542081018186, 0.026563378638172708, -0.3427234359697735, 0.22907080345830977, -0.2597276322282447, 0.3177048344177287, -0.06033192657007902, -0.447220912180196, 0.1170996965485891, 0.10514996532437237, 0.1185831188857982, -0.23219873717626527, 0.2943348490020554, -0.30565501841008924, -0.48411904010183093, -0.3057762984495298, 0.4168508201115806, -0.18571149745641335, -0.21220376686260067, -0.339972912082672, 0.1479067598570225, -0.06995349644153848, -0.08771408961433025, -0.15018029358238394, -0.3725604991977569, -0.4927178803761194, -0.007483535100632821, -0.27899373485921686, -0.4663373044190351, -0.2652796701499689, -0.1940641530915279, 0.004259973013947871, 0.07934844926123219, 0.20003673498231578, 0.4724426590122235, 0.02030119259609009, -0.2711085794287058, 0.3572385478026021, 0.2606958900527516, 0.4316770811702533, -0.06752295976617262], "pauli_seed_q0": [-13838434709596, 60576142310008], "pauli_seed_q1": [34470019755655, 27946020799016], "rc_seed_index": [2], "current_seeds_q2": [444590, 3], "unitaries_q2": [0.03836408176927364, 0.3662952235666772, -0.17466870563372083, 0.3234122951464613, -0.4361980782679602, -0.012161642034783426, 0.2611003790152928, 0.26096195281205326, 0.17505008531592026, 0.05117471301904075, 0.21751509762007615, 0.3802680530959428, -0.22694898949095688, 0.3276727253083287, 0.13920345844470106, -0.05584616229532102, -0.2678503045730096, -0.29959971333545354, -0.2202751886667791, -0.28722577580825615, -0.051803177141760415, -0.31241562029034853, 0.025135451800657904, 0.41925850582989455, -0.4186349836360712, -0.445271186370789, -0.11199236531999546, -0.16895527186618509, 0.1961489222558832, -0.25635721054248606, 0.41373787501252934, -0.00924419505930274, -0.49500617846724637, -0.4548230161925275, 0.1263943744118592, 0.23042832066938956, 0.01339141244315556, 0.4355398681503253, -0.3651103820904211, -0.2813933307165257, -0.08633332620212997, -0.3576968962671607, -0.4681498348207711, 0.3784255819403306, 0.09788826968987507, 0.048175590932000745, 0.05123781271171168, -0.01829275539778763, -0.23451311792852536, 0.42923384599364667, -0.10022812594482033, 0.3296437281806952, 0.4662901341384327, -0.07786597094141712, -0.25690596776971475, -0.23734537253986687, -0.19190429382765473, -0.09016921524732169, -0.15289014355117203, 0.32171991367954433, 0.3344122924782482, 0.10393190734831492, 0.26237626860959296, -0.0613204268378027, -0.02917801601742198, -0.024064861372878, -0.22827181533629215, 0.10133381022337673, -0.2765323728482372, -0.2957659620141371, 0.30164309626368535, 0.0879613077568635, -0.35908437707395535, 0.008288686447901483, -0.1907282900268754, 0.019769226618983282, 0.0488876292027669, -0.08227861161092775, -0.0980209432009218, -0.2997854884655027, 0.2146600639917331, 0.20712762310916233, -0.3403026285684163, -0.0939424389279786, -0.241338789020201, 0.314164654667362, -0.37074082635203354, -0.3540866829310616, -0.004975097634783765, -0.016002911719024127, -0.08345406647035958, 0.4894086579308805, 0.4878037862215372, 0.27065954885196675, -0.1442416045013175, 0.17232005968702424, -0.40234032300345746, 0.17028115813604217, 0.3448177027767301, 0.04151701288553511, 0.08509713625245752, 0.4395043820559579, -0.4439617577671342, -0.2877488688444849, 0.44591127561762534, -0.26107100081415524, -0.374690669539806, 0.060092742372248154, 0.4896137555816509, -0.09969150290183748, 0.09760467302807996, 0.27427209221451676, 0.3886045247436556, -0.4320039786933343, 0.3638867534321797, 0.21776550110714865, -0.37723253512500676, -0.08321214542590027, 0.4506729327841903, -0.49557296959474684], "rc_base_cycle_loop_index": [4], "current_seeds_q1": [104107, 0], "unitary_angle_offset": [117], "break": [1]} \ No newline at end of file diff --git a/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr index 79cfc5a9b..cdf4a49fa 100644 --- a/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr +++ b/test/unit/__snapshots__/test_qpu_randomized_compiling.ambr @@ -580,19 +580,6 @@ PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" - DECLARE readout_source_angles REAL[12] - DECLARE readout_seed_q0 INTEGER[1] - DECLARE readout_randomization_q0 REAL[3] - DECLARE readout_seed_q1 INTEGER[1] - DECLARE readout_randomization_q1 REAL[3] - DECLARE readout_seed_q2 INTEGER[1] - DECLARE readout_randomization_q2 REAL[3] - DECLARE readout_seed_q3 INTEGER[1] - DECLARE readout_randomization_q3 REAL[3] - DECLARE readout_seed_q4 INTEGER[1] - DECLARE readout_randomization_q4 REAL[3] - DECLARE readout_seed_q5 INTEGER[1] - DECLARE readout_randomization_q5 REAL[3] DECLARE pauli_conjugates_map INTEGER[16] DECLARE pauli_seed_q0 INTEGER[2] DECLARE pauli_seed_q1 INTEGER[2] @@ -616,30 +603,19 @@ DECLARE current_seeds_q3 INTEGER[2] DECLARE current_seeds_q4 INTEGER[2] DECLARE current_seeds_q5 INTEGER[2] - CALL choose_random_real_sub_regions readout_randomization_q0 readout_source_angles 3 readout_seed_q0[0] - CALL choose_random_real_sub_regions readout_randomization_q1 readout_source_angles 3 readout_seed_q1[0] - CALL choose_random_real_sub_regions readout_randomization_q2 readout_source_angles 3 readout_seed_q2[0] - CALL choose_random_real_sub_regions readout_randomization_q3 readout_source_angles 3 readout_seed_q3[0] - CALL choose_random_real_sub_regions readout_randomization_q4 readout_source_angles 3 readout_seed_q4[0] - CALL choose_random_real_sub_regions readout_randomization_q5 readout_source_angles 3 readout_seed_q5[0] - MOVE unitaries_q0[78] readout_randomization_q0[0] - MOVE unitaries_q0[79] readout_randomization_q0[1] - MOVE unitaries_q0[80] readout_randomization_q0[2] - MOVE unitaries_q1[78] readout_randomization_q1[0] - MOVE unitaries_q1[79] readout_randomization_q1[1] - MOVE unitaries_q1[80] readout_randomization_q1[2] - MOVE unitaries_q2[78] readout_randomization_q2[0] - MOVE unitaries_q2[79] readout_randomization_q2[1] - MOVE unitaries_q2[80] readout_randomization_q2[2] - MOVE unitaries_q3[78] readout_randomization_q3[0] - MOVE unitaries_q3[79] readout_randomization_q3[1] - MOVE unitaries_q3[80] readout_randomization_q3[2] - MOVE unitaries_q4[78] readout_randomization_q4[0] - MOVE unitaries_q4[79] readout_randomization_q4[1] - MOVE unitaries_q4[80] readout_randomization_q4[2] - MOVE unitaries_q5[78] readout_randomization_q5[0] - MOVE unitaries_q5[79] readout_randomization_q5[1] - MOVE unitaries_q5[80] readout_randomization_q5[2] + DECLARE readout_source_angles REAL[36] + DECLARE readout_seed_q0 INTEGER[1] + DECLARE readout_randomization_q0 REAL[3] + DECLARE readout_seed_q1 INTEGER[1] + DECLARE readout_randomization_q1 REAL[3] + DECLARE readout_seed_q2 INTEGER[1] + DECLARE readout_randomization_q2 REAL[3] + DECLARE readout_seed_q3 INTEGER[1] + DECLARE readout_randomization_q3 REAL[3] + DECLARE readout_seed_q4 INTEGER[1] + DECLARE readout_randomization_q4 REAL[3] + DECLARE readout_seed_q5 INTEGER[1] + DECLARE readout_randomization_q5 REAL[3] CALL prng_set_seed_and_step pauli_seed_q0[0] pauli_seed_q0[0] CALL prng_set_seed_and_step pauli_seed_q0[1] pauli_seed_q0[1] CALL prng_set_seed_and_step pauli_seed_q1[0] pauli_seed_q1[0] @@ -752,13 +728,19 @@ SHR current_seeds_q3[0] 2 SHR current_seeds_q4[0] 2 SHR current_seeds_q5[0] 2 - CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 FENCE 0 1 2 3 4 5 + CALL choose_random_real_sub_regions readout_randomization_q0 readout_source_angles 3 readout_seed_q0[0] + CALL choose_random_real_sub_regions readout_randomization_q1 readout_source_angles 3 readout_seed_q1[0] + CALL choose_random_real_sub_regions readout_randomization_q2 readout_source_angles 3 readout_seed_q2[0] + CALL choose_random_real_sub_regions readout_randomization_q3 readout_source_angles 3 readout_seed_q3[0] + CALL choose_random_real_sub_regions readout_randomization_q4 readout_source_angles 3 readout_seed_q4[0] + CALL choose_random_real_sub_regions readout_randomization_q5 readout_source_angles 3 readout_seed_q5[0] + CALL merge_zxzxz_unitary_with_paulis_literal_reference readout_randomization_q0 readout_randomization_q0 0 0 pauli_seed_q0[1] 1 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate readout_randomization_q1 readout_randomization_q1 0 0 pauli_seed_q1[1] 1 pauli_seed_q2[1] 1 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate readout_randomization_q2 readout_randomization_q2 0 0 pauli_seed_q1[1] 1 pauli_seed_q2[1] 1 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate readout_randomization_q3 readout_randomization_q3 0 0 pauli_seed_q3[1] 1 pauli_seed_q4[1] 1 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate readout_randomization_q4 readout_randomization_q4 0 0 pauli_seed_q3[1] 1 pauli_seed_q4[1] 1 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_reference readout_randomization_q5 readout_randomization_q5 0 0 pauli_seed_q5[1] 1 ''' # --- @@ -775,19 +757,6 @@ PRAGMA EXTERN if_then_else_integer "INTEGER (condition : BIT, true_value : INTEGER, false_value : INTEGER)" PRAGMA EXTERN if_then_else_real "REAL (condition : BIT, true_value : REAL, false_value : REAL)" PRAGMA EXTERN choose_random_real_sub_regions "(destination : mut REAL[], source : REAL[], sub_region_size : INTEGER, seed : mut INTEGER)" - DECLARE readout_source_angles REAL[12] - DECLARE readout_seed_q0 INTEGER[1] - DECLARE readout_randomization_q0 REAL[3] - DECLARE readout_seed_q1 INTEGER[1] - DECLARE readout_randomization_q1 REAL[3] - DECLARE readout_seed_q2 INTEGER[1] - DECLARE readout_randomization_q2 REAL[3] - DECLARE readout_seed_q3 INTEGER[1] - DECLARE readout_randomization_q3 REAL[3] - DECLARE readout_seed_q4 INTEGER[1] - DECLARE readout_randomization_q4 REAL[3] - DECLARE readout_seed_q5 INTEGER[1] - DECLARE readout_randomization_q5 REAL[3] DECLARE pauli_conjugates_map INTEGER[16] DECLARE pauli_seed_q0 INTEGER[2] DECLARE pauli_seed_q1 INTEGER[2] @@ -813,30 +782,19 @@ DECLARE current_seeds_q3 INTEGER[2] DECLARE current_seeds_q4 INTEGER[2] DECLARE current_seeds_q5 INTEGER[2] - CALL choose_random_real_sub_regions readout_randomization_q0 readout_source_angles 3 readout_seed_q0[0] - CALL choose_random_real_sub_regions readout_randomization_q1 readout_source_angles 3 readout_seed_q1[0] - CALL choose_random_real_sub_regions readout_randomization_q2 readout_source_angles 3 readout_seed_q2[0] - CALL choose_random_real_sub_regions readout_randomization_q3 readout_source_angles 3 readout_seed_q3[0] - CALL choose_random_real_sub_regions readout_randomization_q4 readout_source_angles 3 readout_seed_q4[0] - CALL choose_random_real_sub_regions readout_randomization_q5 readout_source_angles 3 readout_seed_q5[0] - MOVE unitaries_q0[78] readout_randomization_q0[0] - MOVE unitaries_q0[79] readout_randomization_q0[1] - MOVE unitaries_q0[80] readout_randomization_q0[2] - MOVE unitaries_q1[78] readout_randomization_q1[0] - MOVE unitaries_q1[79] readout_randomization_q1[1] - MOVE unitaries_q1[80] readout_randomization_q1[2] - MOVE unitaries_q2[78] readout_randomization_q2[0] - MOVE unitaries_q2[79] readout_randomization_q2[1] - MOVE unitaries_q2[80] readout_randomization_q2[2] - MOVE unitaries_q3[78] readout_randomization_q3[0] - MOVE unitaries_q3[79] readout_randomization_q3[1] - MOVE unitaries_q3[80] readout_randomization_q3[2] - MOVE unitaries_q4[78] readout_randomization_q4[0] - MOVE unitaries_q4[79] readout_randomization_q4[1] - MOVE unitaries_q4[80] readout_randomization_q4[2] - MOVE unitaries_q5[78] readout_randomization_q5[0] - MOVE unitaries_q5[79] readout_randomization_q5[1] - MOVE unitaries_q5[80] readout_randomization_q5[2] + DECLARE readout_source_angles REAL[36] + DECLARE readout_seed_q0 INTEGER[1] + DECLARE readout_randomization_q0 REAL[3] + DECLARE readout_seed_q1 INTEGER[1] + DECLARE readout_randomization_q1 REAL[3] + DECLARE readout_seed_q2 INTEGER[1] + DECLARE readout_randomization_q2 REAL[3] + DECLARE readout_seed_q3 INTEGER[1] + DECLARE readout_randomization_q3 REAL[3] + DECLARE readout_seed_q4 INTEGER[1] + DECLARE readout_randomization_q4 REAL[3] + DECLARE readout_seed_q5 INTEGER[1] + DECLARE readout_randomization_q5 REAL[3] ADD modulo_counter[0] 1 GE is_mod_zero[0] modulo_counter[0] 50 CALL if_then_else_integer modulo_counter[0] is_mod_zero[0] 0 modulo_counter[0] @@ -955,12 +913,6 @@ SHR current_seeds_q3[0] 2 SHR current_seeds_q4[0] 2 SHR current_seeds_q5[0] 2 - CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q0 unitaries_q0 unitary_angle_offset[0] 0 current_seeds_q0[0] 0 - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q1 unitaries_q1 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q2 unitaries_q2 unitary_angle_offset[0] 0 current_seeds_q1[0] 0 current_seeds_q2[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q3 unitaries_q3 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 1 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_conjugate unitaries_q4 unitaries_q4 unitary_angle_offset[0] 0 current_seeds_q3[0] 0 current_seeds_q4[0] 0 0 pauli_conjugates_map - CALL merge_zxzxz_unitary_with_paulis_literal_reference unitaries_q5 unitaries_q5 unitary_angle_offset[0] 0 current_seeds_q5[0] 0 LABEL @pulse_program DELAY 0 0.0002 DELAY 1 0.0002 @@ -968,6 +920,18 @@ DELAY 3 0.0002 DELAY 4 0.0002 DELAY 5 0.0002 + CALL choose_random_real_sub_regions readout_randomization_q0 readout_source_angles 3 readout_seed_q0[0] + CALL choose_random_real_sub_regions readout_randomization_q1 readout_source_angles 3 readout_seed_q1[0] + CALL choose_random_real_sub_regions readout_randomization_q2 readout_source_angles 3 readout_seed_q2[0] + CALL choose_random_real_sub_regions readout_randomization_q3 readout_source_angles 3 readout_seed_q3[0] + CALL choose_random_real_sub_regions readout_randomization_q4 readout_source_angles 3 readout_seed_q4[0] + CALL choose_random_real_sub_regions readout_randomization_q5 readout_source_angles 3 readout_seed_q5[0] + CALL merge_zxzxz_unitary_with_paulis_literal_reference readout_randomization_q0 readout_randomization_q0 0 0 pauli_seed_q0[1] 1 + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate readout_randomization_q1 readout_randomization_q1 0 0 pauli_seed_q1[1] 1 pauli_seed_q2[1] 1 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate readout_randomization_q2 readout_randomization_q2 0 0 pauli_seed_q1[1] 1 pauli_seed_q2[1] 1 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate readout_randomization_q3 readout_randomization_q3 0 0 pauli_seed_q3[1] 1 pauli_seed_q4[1] 1 1 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_conjugate readout_randomization_q4 readout_randomization_q4 0 0 pauli_seed_q3[1] 1 pauli_seed_q4[1] 1 0 pauli_conjugates_map + CALL merge_zxzxz_unitary_with_paulis_literal_reference readout_randomization_q5 readout_randomization_q5 0 0 pauli_seed_q5[1] 1 ''' # --- diff --git a/test/unit/test_qpu_randomized_compiling.py b/test/unit/test_qpu_randomized_compiling.py index 18594597c..8b2a54af0 100644 --- a/test/unit/test_qpu_randomized_compiling.py +++ b/test/unit/test_qpu_randomized_compiling.py @@ -22,7 +22,7 @@ from pyquil import Program, gates from pyquil._qpu import randomized_compiling as rc from pyquil.quilatom import MemoryReference -from pyquil.quilbase import Call, ClassicalMove, Declare +from pyquil.quilbase import Call, Declare from pyquil.simulation import matrices @@ -282,31 +282,6 @@ def test_pauli_cache_accumulation(configuration: rc.RandomizedCompilingConfigura _FIXTURE_DIRECTORY = Path(__file__).parent / "__fixtures__" _FIXTURE_DIRECTORY.mkdir(exist_ok=True) - -@dataclass(frozen=True) -class _U2Randomization: - random_indices: NDArray[np.int8] - source_unitary_angles: NDArray[np.float64] - qubit_index_map: dict[int, int] - final_layer_index: int - - def __getitem__(self, key: rc.PauliPairKey) -> NDArray[np.complex128]: - if key.layer_index != self.final_layer_index: - raise KeyError(f"Only the final layer index {self.final_layer_index} is valid for this provider, got {key.layer_index}") - qubit_index = self.qubit_index_map[key.qubit] - unitary_index = self.random_indices[qubit_index] - return rc._compute_unitary_from_zxzxz_angles(self.source_unitary_angles[unitary_index]) - - def __contains__(self, key: rc.PauliPairKey) -> bool: - return key.layer_index == self.final_layer_index and key.qubit in self.qubit_index_map - - def keys(self) -> tuple[rc.PauliPairKey, ...]: - return tuple( - rc.PauliPairKey(qubit=qubit, layer_index=self.final_layer_index) - for qubit in self.qubit_index_map - ) - - _TETRAHEDRAL_ANGLES = np.array([[ 0.0, 0.5, 0.5], [-1./4, 0.0, -1./4], [ 0.0, 0.0, 0.5], @@ -320,15 +295,15 @@ def keys(self) -> tuple[rc.PauliPairKey, ...]: [-1./4, 1./4, 0.5], [ 1./4, 1./4, 0.0]], dtype=np.float64) - @dataclass(frozen=True) class ReadoutRandomization: qubits_sorted: tuple[int, ...] readout_source_angles: NDArray[np.float64] = _TETRAHEDRAL_ANGLES + """Shape is (unitary_count, 3).""" def build_quil_program(self) -> Program: program = Program() - program += Declare("readout_source_angles", "REAL", len(self.readout_source_angles)) + program += Declare("readout_source_angles", "REAL", len(self.readout_source_angles) * rc._ANGLES_PER_UNITARY) for qubit in self.qubits_sorted: program += Declare(f"readout_seed_q{qubit}", "INTEGER", 1) program += Declare(f"readout_randomization_q{qubit}", "REAL", rc._ANGLES_PER_UNITARY) @@ -350,24 +325,36 @@ def generate_seeds(self, rng: np.random.Generator) -> dict[int, int]: def build_memory_map(self, seeds: Mapping[int, int]) -> dict[str, list[float]]: memory_map = {} - memory_map["readout_source_angles"] = list(self.readout_source_angles) + memory_map["readout_source_angles"] = self.readout_source_angles.flatten().tolist() for qubit in self.qubits_sorted: memory_map[f"readout_seed_q{qubit}"] = [seeds[qubit]] memory_map[f"readout_randomization_q{qubit}"] = [0.0] * rc._ANGLES_PER_UNITARY return memory_map - def build_final_source_unitaries(self, seeds: Mapping[int, int], shot_count: int, final_layer_index: int) -> _U2Randomization: - qubit_index_map = {qubit: index for index, qubit in enumerate(self.qubits_sorted)} - random_indices = np.asarray([ - choose_random_real_sub_region_indices(PrngSeedValue(seeds[qubit]), shot_count - 1, 1, len(self.readout_source_angles))[0] - for qubit in self.qubits_sorted - ], dtype=np.int8) - return _U2Randomization( - random_indices=random_indices, - source_unitary_angles=self.readout_source_angles, - qubit_index_map=qubit_index_map, - final_layer_index=final_layer_index - ) + def verify_final_memory( + self, + final_memory: dict[str, Union[list[int], list[float]]], + seeds: Mapping[int, int], + shot_count: int, + final_layer_index: int, + pauli_pairs: Mapping[rc.PauliPairKey, tuple[Optional[int], tuple[rc.PauliLiteral, rc.PauliLiteral]]] + ) -> None: + for qubit in self.qubits_sorted: + final_random_unitary_index = choose_random_real_sub_region_indices( + PrngSeedValue(seeds[qubit]), shot_count - 1, 1, len(self.readout_source_angles) + )[0] + final_random_unitary_angles = tuple(self.readout_source_angles[final_random_unitary_index].tolist()) + final_random_unitary = rc._compute_unitary_from_zxzxz_angles( + final_random_unitary_angles + ) + _, pauli_pair = pauli_pairs[rc.PauliPairKey(qubit=qubit, layer_index=final_layer_index)] + assert pauli_pair[1] == rc.PauliLiteral.I, f"Expected identity for final Pauli but found {pauli_pair[1]} for qubit {qubit} at layer {final_layer_index}" + expected_unitary = final_random_unitary @ pauli_pair[0].matrix + found_unitary_angles = tuple(final_memory[f"readout_randomization_q{qubit}"]) + found_unitary = rc._compute_unitary_from_zxzxz_angles(found_unitary_angles) + assert rc._unitary_equal( + found_unitary, expected_unitary + ), f"Final unitary mismatch for qubit {qubit}: expected {final_random_unitary_angles} @ {pauli_pair}, found {found_unitary_angles}" @dataclass(frozen=True) @@ -376,22 +363,26 @@ class ConfigurationTestCase: seed_loop_length: int = 0 seed_loop_inner_length: int = 0 base_cycle_loop_length: int = 0 - readout_randomization: Union[ReadoutRandomization, None] = None + readout_randomization: Optional[ReadoutRandomization] = None def build_quil_program(self) -> Program: program = Program() + program += self.configuration.build_quil_program() if self.readout_randomization is not None: program += self.readout_randomization.build_quil_program() for qubit in self.readout_randomization.qubits_sorted: - for angle_index in range(rc._ANGLES_PER_UNITARY): - program += ClassicalMove( - self.configuration.variables.source_unitaries_ref(qubit, self.configuration._cycle_count, angle_index), - MemoryReference(f"readout_randomization_q{qubit}", angle_index) - ) - program += self.configuration.build_quil_program() + call = self.configuration.apply_pauli_pair( + qubit, + self.configuration._cycle_count, + source_unitaries=f"readout_randomization_q{qubit}", + target_unitaries=f"readout_randomization_q{qubit}", + unitary_offset=0 + ) + if call is not None: + program += call return program - def generate_seeds_and_memory_map(self, rng: np.random.Generator) -> tuple[dict[str, Union[list[int], list[float]]], Optional[dict[int, int]]]: + def generate_seeds_and_memory_map(self, rng: np.random.Generator) -> tuple[dict[str, Union[list[int], list[float]]], NDArray[np.int64], Optional[dict[int, int]]]: memory_map: dict[str, Union[list[int], list[float]]] = {} rc_seeds = self.configuration.generate_seed_values(rng) memory_map.update(self.configuration.build_memory_map(rc_seeds, rc.build_memory_values_for_paulis_conjugates_map(rc.PAULI_CONJUGATES_MAPS["CZ"]))) @@ -401,7 +392,7 @@ def generate_seeds_and_memory_map(self, rng: np.random.Generator) -> tuple[dict[ else: readout_seeds = None memory_map.update(generate_source_unitaries(self.configuration, rng)) - return memory_map, readout_seeds + return memory_map, rc_seeds, readout_seeds CONFIGURATION_TEST_SEED = 156_548_857 @@ -412,22 +403,34 @@ def _sx(qubit: int) -> gates.Gate: return gates.RX(np.pi / 2, qubit) -def _zxzxz(configuration: rc.RandomizedCompilingConfiguration, layer_index: int) -> Program: +def _zxzxz(configuration: rc.RandomizedCompilingConfiguration, layer_index: int, readout_randomization: Optional[ReadoutRandomization] = None) -> Program: program = Program() for qubit in configuration.qubits_sorted: - program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 0), qubit) + if readout_randomization is None: + ref = configuration.variables.twirled_unitaries_ref(qubit, layer_index, 0) + else: + ref = MemoryReference(f"readout_randomization_q{qubit}", 0) + program += gates.RZ(2 * np.pi * ref, qubit) program += _sx(qubit) program += gates.FENCE(qubit) - program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 1), qubit) + if readout_randomization is None: + ref = configuration.variables.twirled_unitaries_ref(qubit, layer_index, 1) + else: + ref = MemoryReference(f"readout_randomization_q{qubit}", 1) + program += gates.RZ(2 * np.pi * ref, qubit) program += _sx(qubit) program += gates.FENCE(qubit) - program += gates.RZ(2 * np.pi * configuration.variables.twirled_unitaries_ref(qubit, layer_index, 2), qubit) + if readout_randomization is None: + ref = configuration.variables.twirled_unitaries_ref(qubit, layer_index, 2) + else: + ref = MemoryReference(f"readout_randomization_q{qubit}", 2) + program += gates.RZ(2 * np.pi * ref, qubit) return program -def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> Program: +def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration, readout_randomization: Optional[ReadoutRandomization]) -> Program: program = Program() cycle_count = configuration.base_cycle_repetitions * len(configuration.base_cycles) + 1 if not configuration.variables.twirled_overwrites_source_unitaries: @@ -442,7 +445,7 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P program += gates.CZ(edge[0], edge[1]) program += gates.FENCE(edge[0], edge[1]) - program += _zxzxz(configuration, configuration.base_cycle_repetitions * len(configuration.base_cycles)) + program += _zxzxz(configuration, configuration.base_cycle_repetitions * len(configuration.base_cycles), readout_randomization) return program @@ -567,6 +570,7 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P configuration=rc.RandomizedCompilingConfiguration( base_cycles=_ALTERNATING_BASE_CYCLES, base_cycle_repetitions=13, + skip_final_layer=True, ), seed_loop_length=1, seed_loop_inner_length=11, @@ -582,6 +586,7 @@ def build_cycle_program(configuration: rc.RandomizedCompilingConfiguration) -> P shots_per_randomization=rc.ShotsPerRandomization( shots_per_randomization=50, ), + skip_final_layer=True ), seed_loop_length=1, seed_loop_inner_length=11, @@ -649,22 +654,30 @@ def test_randomized_compiling_configuration( program = test_case.build_quil_program() assert program.out() == snapshot(name="quil") - program += build_cycle_program(test_case.configuration) + program += build_cycle_program(test_case.configuration, test_case.readout_randomization) rng = np.random.default_rng(seed=CONFIGURATION_TEST_SEED) - memory_map, readout_seeds = test_case.generate_seeds_and_memory_map(rng) + memory_map, rc_seeds,readout_seeds = test_case.generate_seeds_and_memory_map(rng) with open(_FIXTURE_DIRECTORY / f"{request.node.name}.json") as f: final_memory = json.load(f) - final_source_unitary_provider: rc._FinalSourceUnitaryProvider | None = None - if test_case.readout_randomization is not None: - if readout_seeds is None: - raise ValueError("Readout seeds should not be None if readout randomization is provided.") - final_source_unitary_provider = test_case.readout_randomization.build_final_source_unitaries(readout_seeds, TEST_SHOT_COUNT, test_case.configuration._cycle_count) + + pauli_conjugates_map = rc.PAULI_CONJUGATES_MAPS["CZ"] test_case.configuration.verify_final_memory( final_memory, memory_map, TEST_SHOT_COUNT, - rc.PAULI_CONJUGATES_MAPS["CZ"], - final_source_unitary_provider + pauli_conjugates_map, ) + + if test_case.readout_randomization is not None: + if readout_seeds is None: + raise ValueError("Readout seeds should not be None when readout randomization is provided.") + pauli_pairs = test_case.configuration.get_final_pauli_pairs(TEST_SHOT_COUNT, pauli_conjugates_map, rc_seeds, accumulate=False) + test_case.readout_randomization.verify_final_memory( + final_memory, + readout_seeds, + TEST_SHOT_COUNT, + test_case.configuration._cycle_count, + pauli_pairs, + ) diff --git a/uv.lock b/uv.lock new file mode 100644 index 000000000..c0ba0910c --- /dev/null +++ b/uv.lock @@ -0,0 +1,3 @@ +version = 1 +revision = 3 +requires-python = ">=3.9" From 49e65cd4ec4a8017f2c32ccc42dfa5e8d7e55da2 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Wed, 24 Jun 2026 15:10:10 -0700 Subject: [PATCH 58/59] fix: mypy types and other ci fixes --- .osv-scanner.toml | 4 ++++ pyquil/_qpu/randomized_compiling.py | 2 ++ test/unit/test_qpu_randomized_compiling.py | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.osv-scanner.toml b/.osv-scanner.toml index d93ccc821..333a753d8 100644 --- a/.osv-scanner.toml +++ b/.osv-scanner.toml @@ -66,3 +66,7 @@ reason = "bleach update requires python >= 3.10" [[IgnoredVulns]] id = "GHSA-gj48-438w-jh9v" reason = "bleach update requires python >= 3.10" + +[[IgnoredVulns]] +id = "GHSA-6v7p-g79w-8964" +reason = "requires dropping rpcq dependency" diff --git a/pyquil/_qpu/randomized_compiling.py b/pyquil/_qpu/randomized_compiling.py index 5f1e83929..cc0260500 100644 --- a/pyquil/_qpu/randomized_compiling.py +++ b/pyquil/_qpu/randomized_compiling.py @@ -1264,6 +1264,7 @@ def apply_pauli_pair( this does not step the PRNG. This is useful when `ShotsPerRandomization` is configured and we want to apply the existing twirl a freshly drawn unitary (typically by invoking `choose_random_real_sub_regions`). """ + previous_pauli: Union[_PauliReference, _PauliConjugate, PauliLiteral] if layer_index == 0 or not self.invert_random_paulis: previous_pauli = PauliLiteral.I else: @@ -1297,6 +1298,7 @@ def apply_pauli_pair( else: previous_pauli = PauliLiteral.I + next_pauli: Union[_PauliReference, PauliLiteral] if layer_index == self._cycle_count: next_pauli = PauliLiteral.I else: diff --git a/test/unit/test_qpu_randomized_compiling.py b/test/unit/test_qpu_randomized_compiling.py index 8b2a54af0..84666de70 100644 --- a/test/unit/test_qpu_randomized_compiling.py +++ b/test/unit/test_qpu_randomized_compiling.py @@ -7,7 +7,7 @@ import json from collections.abc import Mapping -from dataclasses import dataclass +from dataclasses import dataclass, field from itertools import product from pathlib import Path from typing import Optional, Union, cast @@ -298,7 +298,7 @@ def test_pauli_cache_accumulation(configuration: rc.RandomizedCompilingConfigura @dataclass(frozen=True) class ReadoutRandomization: qubits_sorted: tuple[int, ...] - readout_source_angles: NDArray[np.float64] = _TETRAHEDRAL_ANGLES + readout_source_angles: NDArray[np.float64] = field(default_factory=lambda: _TETRAHEDRAL_ANGLES) """Shape is (unitary_count, 3).""" def build_quil_program(self) -> Program: From 4a656a686d619ed23ed3b35a8e329412a9e5c0f9 Mon Sep 17 00:00:00 2001 From: Eric Hulburd Date: Wed, 24 Jun 2026 15:21:09 -0700 Subject: [PATCH 59/59] chore: bump release candidate version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 868466e9c..78a53d492 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pyquil" -version = "4.18.0-rc.3" +version = "4.18.0-rc.4" description = "A Python library for creating Quantum Instruction Language (Quil) programs." authors = ["Rigetti Computing "] readme = "README.md"