{"abstract":"SWAP(0,2) after X on qubit 0 leaves the excitation on qubit 0; the gate acts as identity.","category":"Quantum circuit simulation","checks":7,"contract":"Input [n, gates]; start in |0...0>, apply gates h,x,y,z,s,sdg,t ([\"g\", q]) and cx,cz,swap ([\"g\", a, b]) with qubit 0 as the least significant bit of the basis index; return the statevector as [re, im] pairs rounded to 6 decimals.","evaluation_group":"w2-quantum_circuit_simulation-statevector-gates","failed_approach":"The attempted repair visits indices with b set and a clear but still forms the partner as (i ^ a) | b, which pairs with an index that has both bits set.","family":"w2-quantum_circuit_simulation-statevector-gates-swap-pair-selection","id":"FA-90866","implementations":{"attempt":{"sha256":"42ab3454a5834eb02616158c1abb4c8a078c39de893a670958b0f27c53bfe38c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport cmath\nN = 1\nobservations = []\ndef solve(x):\n    n, gates = x\n    dim = 1 << n\n    st = [0j] * dim\n    st[0] = 1 + 0j\n    r = 1 / math.sqrt(2)\n    for g in gates:\n        op = g[0]\n        if op in ('h', 'x', 'y', 'z', 's', 'sdg', 't'):\n            m = 1 << g[1]\n            for i in range(dim):\n                if i & m:\n                    continue\n                a, b = st[i], st[i | m]\n                if op == 'h':\n                    st[i], st[i | m] = (a + b) * r, (a - b) * r\n                elif op == 'x':\n                    st[i], st[i | m] = b, a\n                elif op == 'y':\n                    st[i], st[i | m] = -1j * b, 1j * a\n                elif op == 'z':\n                    st[i | m] = -b\n                elif op == 's':\n                    st[i | m] = 1j * b\n                elif op == 'sdg':\n                    st[i | m] = -1j * b\n                else:\n                    st[i | m] = b * cmath.exp(1j * math.pi / 4)\n        elif op == 'cx':\n            c, t = 1 << g[1], 1 << g[2]\n            for i in range(dim):\n                if i & c and not i & t:\n                    st[i], st[i | t] = st[i | t], st[i]\n        elif op == 'cz':\n            both = (1 << g[1]) | (1 << g[2])\n            for i in range(dim):\n                if i & both == both:\n                    st[i] = -st[i]\n        elif op == 'swap':\n            a, b = 1 << g[1], 1 << g[2]\n            for i in range(dim):\n                if i & b and not i & a:\n                    j = (i ^ a) | b\n                    st[i], st[j] = st[j], st[i]\n    return [[round(v.real, 6) + 0.0, round(v.imag, 6) + 0.0] for v in st]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: swap moves excitation', [3, [['x', 0], ['swap', 0, 2]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['regression: random circuit 7', [2, [['s', 0], ['cz', 1, 0], ['x', 1], ['cx', 1, 0], ['swap', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]], ['repair check: random circuit 0', [3, [['swap', 2, 1], ['cx', 2, 0], ['z', 2], ['y', 1], ['cx', 0, 2], ['s', 1], ['swap', 1, 0]]], [[0.0, 0.0], [-1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: empty circuit on two qubits', [2, []], [[1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: bell pair', [2, [['h', 0], ['cx', 0, 1]]], [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]]], ['control: ghz three qubits', [3, [['h', 0], ['cx', 0, 1], ['cx', 1, 2]]], [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]]], ['control: cx with control on high qubit', [2, [['x', 1], ['cx', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]]], [['regression: random circuit 7', [2, [['s', 0], ['cz', 1, 0], ['x', 1], ['cx', 1, 0], ['swap', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]], ['regression: swap moves excitation', [3, [['x', 0], ['swap', 0, 2]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['repair check: random circuit 4', [2, [['cx', 0, 1], ['cz', 0, 1], ['h', 1], ['x', 1], ['y', 0], ['swap', 0, 1]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.707107], [0.0, 0.707107]]], ['control: y on ground state', [1, [['y', 0]]], [[0.0, 0.0], [0.0, 1.0]]], ['control: y after x', [1, [['x', 0], ['y', 0]]], [[0.0, -1.0], [0.0, 0.0]]], ['control: t after h', [1, [['h', 0], ['t', 0]]], [[0.707107, 0.0], [0.5, 0.5]]], ['control: sdg after h', [2, [['h', 1], ['sdg', 1]]], [[0.707107, 0.0], [0.0, 0.0], [0.0, -0.707107], [0.0, 0.0]]]], [['regression: swap moves excitation', [3, [['x', 0], ['swap', 0, 2]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['regression: random circuit 7', [2, [['s', 0], ['cz', 1, 0], ['x', 1], ['cx', 1, 0], ['swap', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]], ['repair check: random circuit 0', [3, [['swap', 2, 1], ['cx', 2, 0], ['z', 2], ['y', 1], ['cx', 0, 2], ['s', 1], ['swap', 1, 0]]], [[0.0, 0.0], [-1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: h on excited qubit', [1, [['x', 0], ['h', 0]]], [[0.707107, 0.0], [-0.707107, 0.0]]], ['control: single x on qubit 0 of three', [3, [['x', 0]]], [[0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 1', [3, [['cx', 1, 2], ['cz', 2, 1]]], [[1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 2', [3, [['z', 0], ['sdg', 1], ['cx', 1, 0], ['cz', 0, 1], ['cx', 2, 0], ['y', 0], ['z', 2]]], [[0.0, 0.0], [0.0, 1.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]], [['regression: random circuit 7', [2, [['s', 0], ['cz', 1, 0], ['x', 1], ['cx', 1, 0], ['swap', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]], ['regression: swap moves excitation', [3, [['x', 0], ['swap', 0, 2]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['repair check: random circuit 4', [2, [['cx', 0, 1], ['cz', 0, 1], ['h', 1], ['x', 1], ['y', 0], ['swap', 0, 1]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.707107], [0.0, 0.707107]]], ['control: random circuit 3', [2, [['x', 1], ['s', 1], ['x', 0], ['h', 0], ['s', 1], ['h', 1]]], [[-0.5, 0.0], [0.5, 0.0], [0.5, 0.0], [-0.5, 0.0]]], ['control: random circuit 5', [2, [['cx', 1, 0], ['cx', 0, 1], ['t', 1], ['h', 1]]], [[0.707107, 0.0], [0.0, 0.0], [0.707107, 0.0], [0.0, 0.0]]], ['control: random circuit 6', [2, [['cz', 0, 1], ['cz', 0, 1], ['z', 1], ['sdg', 0], ['x', 0], ['x', 1], ['cx', 0, 1]]], [[0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 8', [1, [['s', 0], ['h', 0], ['s', 0]]], [[0.707107, 0.0], [0.0, 0.707107]]]], [['regression: swap moves excitation', [3, [['x', 0], ['swap', 0, 2]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['regression: random circuit 7', [2, [['s', 0], ['cz', 1, 0], ['x', 1], ['cx', 1, 0], ['swap', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]], ['repair check: random circuit 0', [3, [['swap', 2, 1], ['cx', 2, 0], ['z', 2], ['y', 1], ['cx', 0, 2], ['s', 1], ['swap', 1, 0]]], [[0.0, 0.0], [-1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 9', [1, [['z', 0], ['t', 0], ['z', 0], ['h', 0]]], [[0.707107, 0.0], [0.707107, 0.0]]], ['control: random circuit 10', [3, [['cz', 0, 1], ['h', 0], ['z', 0], ['cx', 0, 1], ['s', 0], ['sdg', 0]]], [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [-0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 11', [2, [['s', 0], ['h', 0]]], [[0.707107, 0.0], [0.707107, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 12', [3, [['sdg', 2], ['h', 2], ['h', 1], ['s', 0], ['z', 0], ['cx', 0, 1]]], [[0.5, 0.0], [0.0, 0.0], [0.5, 0.0], [0.0, 0.0], [0.5, 0.0], [0.0, 0.0], [0.5, 0.0], [0.0, 0.0]]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"9d126dee09fa98ab61963d4e4a393895e680602ae8433b40ffd3240e05ded25b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport cmath\nN = 1\nobservations = []\ndef solve(x):\n    n, gates = x\n    dim = 1 << n\n    st = [0j] * dim\n    st[0] = 1 + 0j\n    r = 1 / math.sqrt(2)\n    for g in gates:\n        op = g[0]\n        if op in ('h', 'x', 'y', 'z', 's', 'sdg', 't'):\n            m = 1 << g[1]\n            for i in range(dim):\n                if i & m:\n                    continue\n                a, b = st[i], st[i | m]\n                if op == 'h':\n                    st[i], st[i | m] = (a + b) * r, (a - b) * r\n                elif op == 'x':\n                    st[i], st[i | m] = b, a\n                elif op == 'y':\n                    st[i], st[i | m] = -1j * b, 1j * a\n                elif op == 'z':\n                    st[i | m] = -b\n                elif op == 's':\n                    st[i | m] = 1j * b\n                elif op == 'sdg':\n                    st[i | m] = -1j * b\n                else:\n                    st[i | m] = b * cmath.exp(1j * math.pi / 4)\n        elif op == 'cx':\n            c, t = 1 << g[1], 1 << g[2]\n            for i in range(dim):\n                if i & c and not i & t:\n                    st[i], st[i | t] = st[i | t], st[i]\n        elif op == 'cz':\n            both = (1 << g[1]) | (1 << g[2])\n            for i in range(dim):\n                if i & both == both:\n                    st[i] = -st[i]\n        elif op == 'swap':\n            a, b = 1 << g[1], 1 << g[2]\n            for i in range(dim):\n                if bool(i & a) != bool(i & b):\n                    j = (i ^ a) | b\n                    st[i], st[j] = st[j], st[i]\n    return [[round(v.real, 6) + 0.0, round(v.imag, 6) + 0.0] for v in st]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: swap moves excitation', [3, [['x', 0], ['swap', 0, 2]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['regression: random circuit 7', [2, [['s', 0], ['cz', 1, 0], ['x', 1], ['cx', 1, 0], ['swap', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]], ['repair check: random circuit 0', [3, [['swap', 2, 1], ['cx', 2, 0], ['z', 2], ['y', 1], ['cx', 0, 2], ['s', 1], ['swap', 1, 0]]], [[0.0, 0.0], [-1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: empty circuit on two qubits', [2, []], [[1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: bell pair', [2, [['h', 0], ['cx', 0, 1]]], [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]]], ['control: ghz three qubits', [3, [['h', 0], ['cx', 0, 1], ['cx', 1, 2]]], [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]]], ['control: cx with control on high qubit', [2, [['x', 1], ['cx', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]]], [['regression: random circuit 7', [2, [['s', 0], ['cz', 1, 0], ['x', 1], ['cx', 1, 0], ['swap', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]], ['regression: swap moves excitation', [3, [['x', 0], ['swap', 0, 2]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['repair check: random circuit 4', [2, [['cx', 0, 1], ['cz', 0, 1], ['h', 1], ['x', 1], ['y', 0], ['swap', 0, 1]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.707107], [0.0, 0.707107]]], ['control: y on ground state', [1, [['y', 0]]], [[0.0, 0.0], [0.0, 1.0]]], ['control: y after x', [1, [['x', 0], ['y', 0]]], [[0.0, -1.0], [0.0, 0.0]]], ['control: t after h', [1, [['h', 0], ['t', 0]]], [[0.707107, 0.0], [0.5, 0.5]]], ['control: sdg after h', [2, [['h', 1], ['sdg', 1]]], [[0.707107, 0.0], [0.0, 0.0], [0.0, -0.707107], [0.0, 0.0]]]], [['regression: swap moves excitation', [3, [['x', 0], ['swap', 0, 2]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['regression: random circuit 7', [2, [['s', 0], ['cz', 1, 0], ['x', 1], ['cx', 1, 0], ['swap', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]], ['repair check: random circuit 0', [3, [['swap', 2, 1], ['cx', 2, 0], ['z', 2], ['y', 1], ['cx', 0, 2], ['s', 1], ['swap', 1, 0]]], [[0.0, 0.0], [-1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: h on excited qubit', [1, [['x', 0], ['h', 0]]], [[0.707107, 0.0], [-0.707107, 0.0]]], ['control: single x on qubit 0 of three', [3, [['x', 0]]], [[0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 1', [3, [['cx', 1, 2], ['cz', 2, 1]]], [[1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 2', [3, [['z', 0], ['sdg', 1], ['cx', 1, 0], ['cz', 0, 1], ['cx', 2, 0], ['y', 0], ['z', 2]]], [[0.0, 0.0], [0.0, 1.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]], [['regression: random circuit 7', [2, [['s', 0], ['cz', 1, 0], ['x', 1], ['cx', 1, 0], ['swap', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]], ['regression: swap moves excitation', [3, [['x', 0], ['swap', 0, 2]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['repair check: random circuit 4', [2, [['cx', 0, 1], ['cz', 0, 1], ['h', 1], ['x', 1], ['y', 0], ['swap', 0, 1]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.707107], [0.0, 0.707107]]], ['control: random circuit 3', [2, [['x', 1], ['s', 1], ['x', 0], ['h', 0], ['s', 1], ['h', 1]]], [[-0.5, 0.0], [0.5, 0.0], [0.5, 0.0], [-0.5, 0.0]]], ['control: random circuit 5', [2, [['cx', 1, 0], ['cx', 0, 1], ['t', 1], ['h', 1]]], [[0.707107, 0.0], [0.0, 0.0], [0.707107, 0.0], [0.0, 0.0]]], ['control: random circuit 6', [2, [['cz', 0, 1], ['cz', 0, 1], ['z', 1], ['sdg', 0], ['x', 0], ['x', 1], ['cx', 0, 1]]], [[0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 8', [1, [['s', 0], ['h', 0], ['s', 0]]], [[0.707107, 0.0], [0.0, 0.707107]]]], [['regression: swap moves excitation', [3, [['x', 0], ['swap', 0, 2]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['regression: random circuit 7', [2, [['s', 0], ['cz', 1, 0], ['x', 1], ['cx', 1, 0], ['swap', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]], ['repair check: random circuit 0', [3, [['swap', 2, 1], ['cx', 2, 0], ['z', 2], ['y', 1], ['cx', 0, 2], ['s', 1], ['swap', 1, 0]]], [[0.0, 0.0], [-1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 9', [1, [['z', 0], ['t', 0], ['z', 0], ['h', 0]]], [[0.707107, 0.0], [0.707107, 0.0]]], ['control: random circuit 10', [3, [['cz', 0, 1], ['h', 0], ['z', 0], ['cx', 0, 1], ['s', 0], ['sdg', 0]]], [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [-0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 11', [2, [['s', 0], ['h', 0]]], [[0.707107, 0.0], [0.707107, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 12', [3, [['sdg', 2], ['h', 2], ['h', 1], ['s', 0], ['z', 0], ['cx', 0, 1]]], [[0.5, 0.0], [0.0, 0.0], [0.5, 0.0], [0.0, 0.0], [0.5, 0.0], [0.0, 0.0], [0.5, 0.0], [0.0, 0.0]]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"efca990bb7bfebba83116a8d2b7299a0e9e3a585c9a8741054c979c13fdb77b3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport cmath\nN = 1\nobservations = []\ndef solve(x):\n    n, gates = x\n    dim = 1 << n\n    st = [0j] * dim\n    st[0] = 1 + 0j\n    r = 1 / math.sqrt(2)\n    for g in gates:\n        op = g[0]\n        if op in ('h', 'x', 'y', 'z', 's', 'sdg', 't'):\n            m = 1 << g[1]\n            for i in range(dim):\n                if i & m:\n                    continue\n                a, b = st[i], st[i | m]\n                if op == 'h':\n                    st[i], st[i | m] = (a + b) * r, (a - b) * r\n                elif op == 'x':\n                    st[i], st[i | m] = b, a\n                elif op == 'y':\n                    st[i], st[i | m] = -1j * b, 1j * a\n                elif op == 'z':\n                    st[i | m] = -b\n                elif op == 's':\n                    st[i | m] = 1j * b\n                elif op == 'sdg':\n                    st[i | m] = -1j * b\n                else:\n                    st[i | m] = b * cmath.exp(1j * math.pi / 4)\n        elif op == 'cx':\n            c, t = 1 << g[1], 1 << g[2]\n            for i in range(dim):\n                if i & c and not i & t:\n                    st[i], st[i | t] = st[i | t], st[i]\n        elif op == 'cz':\n            both = (1 << g[1]) | (1 << g[2])\n            for i in range(dim):\n                if i & both == both:\n                    st[i] = -st[i]\n        elif op == 'swap':\n            a, b = 1 << g[1], 1 << g[2]\n            for i in range(dim):\n                if i & a and not i & b:\n                    j = (i ^ a) | b\n                    st[i], st[j] = st[j], st[i]\n    return [[round(v.real, 6) + 0.0, round(v.imag, 6) + 0.0] for v in st]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: swap moves excitation', [3, [['x', 0], ['swap', 0, 2]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['regression: random circuit 7', [2, [['s', 0], ['cz', 1, 0], ['x', 1], ['cx', 1, 0], ['swap', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]], ['repair check: random circuit 0', [3, [['swap', 2, 1], ['cx', 2, 0], ['z', 2], ['y', 1], ['cx', 0, 2], ['s', 1], ['swap', 1, 0]]], [[0.0, 0.0], [-1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: empty circuit on two qubits', [2, []], [[1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: bell pair', [2, [['h', 0], ['cx', 0, 1]]], [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]]], ['control: ghz three qubits', [3, [['h', 0], ['cx', 0, 1], ['cx', 1, 2]]], [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]]], ['control: cx with control on high qubit', [2, [['x', 1], ['cx', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]]], [['regression: random circuit 7', [2, [['s', 0], ['cz', 1, 0], ['x', 1], ['cx', 1, 0], ['swap', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]], ['regression: swap moves excitation', [3, [['x', 0], ['swap', 0, 2]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['repair check: random circuit 4', [2, [['cx', 0, 1], ['cz', 0, 1], ['h', 1], ['x', 1], ['y', 0], ['swap', 0, 1]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.707107], [0.0, 0.707107]]], ['control: y on ground state', [1, [['y', 0]]], [[0.0, 0.0], [0.0, 1.0]]], ['control: y after x', [1, [['x', 0], ['y', 0]]], [[0.0, -1.0], [0.0, 0.0]]], ['control: t after h', [1, [['h', 0], ['t', 0]]], [[0.707107, 0.0], [0.5, 0.5]]], ['control: sdg after h', [2, [['h', 1], ['sdg', 1]]], [[0.707107, 0.0], [0.0, 0.0], [0.0, -0.707107], [0.0, 0.0]]]], [['regression: swap moves excitation', [3, [['x', 0], ['swap', 0, 2]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['regression: random circuit 7', [2, [['s', 0], ['cz', 1, 0], ['x', 1], ['cx', 1, 0], ['swap', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]], ['repair check: random circuit 0', [3, [['swap', 2, 1], ['cx', 2, 0], ['z', 2], ['y', 1], ['cx', 0, 2], ['s', 1], ['swap', 1, 0]]], [[0.0, 0.0], [-1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: h on excited qubit', [1, [['x', 0], ['h', 0]]], [[0.707107, 0.0], [-0.707107, 0.0]]], ['control: single x on qubit 0 of three', [3, [['x', 0]]], [[0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 1', [3, [['cx', 1, 2], ['cz', 2, 1]]], [[1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 2', [3, [['z', 0], ['sdg', 1], ['cx', 1, 0], ['cz', 0, 1], ['cx', 2, 0], ['y', 0], ['z', 2]]], [[0.0, 0.0], [0.0, 1.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]]], [['regression: random circuit 7', [2, [['s', 0], ['cz', 1, 0], ['x', 1], ['cx', 1, 0], ['swap', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]], ['regression: swap moves excitation', [3, [['x', 0], ['swap', 0, 2]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['repair check: random circuit 4', [2, [['cx', 0, 1], ['cz', 0, 1], ['h', 1], ['x', 1], ['y', 0], ['swap', 0, 1]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.707107], [0.0, 0.707107]]], ['control: random circuit 3', [2, [['x', 1], ['s', 1], ['x', 0], ['h', 0], ['s', 1], ['h', 1]]], [[-0.5, 0.0], [0.5, 0.0], [0.5, 0.0], [-0.5, 0.0]]], ['control: random circuit 5', [2, [['cx', 1, 0], ['cx', 0, 1], ['t', 1], ['h', 1]]], [[0.707107, 0.0], [0.0, 0.0], [0.707107, 0.0], [0.0, 0.0]]], ['control: random circuit 6', [2, [['cz', 0, 1], ['cz', 0, 1], ['z', 1], ['sdg', 0], ['x', 0], ['x', 1], ['cx', 0, 1]]], [[0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 8', [1, [['s', 0], ['h', 0], ['s', 0]]], [[0.707107, 0.0], [0.0, 0.707107]]]], [['regression: swap moves excitation', [3, [['x', 0], ['swap', 0, 2]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['regression: random circuit 7', [2, [['s', 0], ['cz', 1, 0], ['x', 1], ['cx', 1, 0], ['swap', 1, 0]]], [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]]], ['repair check: random circuit 0', [3, [['swap', 2, 1], ['cx', 2, 0], ['z', 2], ['y', 1], ['cx', 0, 2], ['s', 1], ['swap', 1, 0]]], [[0.0, 0.0], [-1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 9', [1, [['z', 0], ['t', 0], ['z', 0], ['h', 0]]], [[0.707107, 0.0], [0.707107, 0.0]]], ['control: random circuit 10', [3, [['cz', 0, 1], ['h', 0], ['z', 0], ['cx', 0, 1], ['s', 0], ['sdg', 0]]], [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [-0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 11', [2, [['s', 0], ['h', 0]]], [[0.707107, 0.0], [0.707107, 0.0], [0.0, 0.0], [0.0, 0.0]]], ['control: random circuit 12', [3, [['sdg', 2], ['h', 2], ['h', 1], ['s', 0], ['z', 0], ['cx', 0, 1]]], [[0.5, 0.0], [0.0, 0.0], [0.5, 0.0], [0.0, 0.0], [0.5, 0.0], [0.0, 0.0], [0.5, 0.0], [0.0, 0.0]]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"A deterministic bounded teaching model with a stipulated toy contract; amplitudes are rounded to fixed decimals for strict JSON output. It is not a production quantum SDK and claims no standards conformance. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-quantum_circuit_simulation-statevector-gates-swap-pair-selection","generated_at":"2026-09-29T14:51:30.607922+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Statevector simulators underpin circuit unit tests; a gate-kernel slip silently corrupts every downstream amplitude.","repair":"Visit only indices with bit a set and bit b clear, and swap with the partner that has a clear and b set.","root_cause":"The swap loop selects every index whose two bits differ, so each pair is visited from both sides and swapped back.","sha256":"319e303d2aa8898281d6f600b81bb4ff22fc994aed8790ee0ff73761036288f5","title":"Statevector SWAP exchanges every differing pair twice · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.251,"exit_code":1,"observations":[{"actual":[[0.0,0.0],[1.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]],"check":"regression: swap moves excitation","expected":[[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[1.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]],"passed":false},{"actual":[[0.0,0.0],[1.0,0.0],[0.0,0.0],[0.0,0.0]],"check":"regression: random circuit 7","expected":[[0.0,0.0],[0.0,0.0],[0.0,0.0],[1.0,0.0]],"passed":false},{"actual":[[0.0,0.0],[0.0,0.0],[-1.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]],"check":"repair check: random circuit 0","expected":[[0.0,0.0],[-1.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]],"passed":false},{"actual":[[1.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]],"check":"control: empty circuit on two qubits","expected":[[1.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]],"passed":true},{"actual":[[0.707107,0.0],[0.0,0.0],[0.0,0.0],[0.707107,0.0]],"check":"control: bell pair","expected":[[0.707107,0.0],[0.0,0.0],[0.0,0.0],[0.707107,0.0]],"passed":true},{"actual":[[0.707107,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.707107,0.0]],"check":"control: ghz three qubits","expected":[[0.707107,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.707107,0.0]],"passed":true},{"actual":[[0.0,0.0],[0.0,0.0],[0.0,0.0],[1.0,0.0]],"check":"control: cx with control on high qubit","expected":[[0.0,0.0],[0.0,0.0],[0.0,0.0],[1.0,0.0]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: swap moves excitation\", \"actual\": [[0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"expected\": [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"passed\": false}, {\"check\": \"regression: random circuit 7\", \"actual\": [[0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"expected\": [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]], \"passed\": false}, {\"check\": \"repair check: random circuit 0\", \"actual\": [[0.0, 0.0], [0.0, 0.0], [-1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"expected\": [[0.0, 0.0], [-1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"passed\": false}, {\"check\": \"control: empty circuit on two qubits\", \"actual\": [[1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"expected\": [[1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"passed\": true}, {\"check\": \"control: bell pair\", \"actual\": [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]], \"expected\": [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]], \"passed\": true}, {\"check\": \"control: ghz three qubits\", \"actual\": [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]], \"expected\": [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]], \"passed\": true}, {\"check\": \"control: cx with control on high qubit\", \"actual\": [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]], \"expected\": [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.231,"exit_code":1,"observations":[{"actual":[[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[1.0,0.0],[0.0,0.0],[0.0,0.0]],"check":"regression: swap moves excitation","expected":[[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[1.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]],"passed":false},{"actual":[[0.0,0.0],[0.0,0.0],[1.0,0.0],[0.0,0.0]],"check":"regression: random circuit 7","expected":[[0.0,0.0],[0.0,0.0],[0.0,0.0],[1.0,0.0]],"passed":false},{"actual":[[0.0,0.0],[-1.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]],"check":"repair check: random circuit 0","expected":[[0.0,0.0],[-1.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]],"passed":true},{"actual":[[1.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]],"check":"control: empty circuit on two qubits","expected":[[1.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]],"passed":true},{"actual":[[0.707107,0.0],[0.0,0.0],[0.0,0.0],[0.707107,0.0]],"check":"control: bell pair","expected":[[0.707107,0.0],[0.0,0.0],[0.0,0.0],[0.707107,0.0]],"passed":true},{"actual":[[0.707107,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.707107,0.0]],"check":"control: ghz three qubits","expected":[[0.707107,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.707107,0.0]],"passed":true},{"actual":[[0.0,0.0],[0.0,0.0],[0.0,0.0],[1.0,0.0]],"check":"control: cx with control on high qubit","expected":[[0.0,0.0],[0.0,0.0],[0.0,0.0],[1.0,0.0]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: swap moves excitation\", \"actual\": [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"expected\": [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"passed\": false}, {\"check\": \"regression: random circuit 7\", \"actual\": [[0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0]], \"expected\": [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]], \"passed\": false}, {\"check\": \"repair check: random circuit 0\", \"actual\": [[0.0, 0.0], [-1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"expected\": [[0.0, 0.0], [-1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"passed\": true}, {\"check\": \"control: empty circuit on two qubits\", \"actual\": [[1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"expected\": [[1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"passed\": true}, {\"check\": \"control: bell pair\", \"actual\": [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]], \"expected\": [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]], \"passed\": true}, {\"check\": \"control: ghz three qubits\", \"actual\": [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]], \"expected\": [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]], \"passed\": true}, {\"check\": \"control: cx with control on high qubit\", \"actual\": [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]], \"expected\": [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.152,"exit_code":0,"observations":[{"actual":[[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[1.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]],"check":"regression: swap moves excitation","expected":[[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[1.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]],"passed":true},{"actual":[[0.0,0.0],[0.0,0.0],[0.0,0.0],[1.0,0.0]],"check":"regression: random circuit 7","expected":[[0.0,0.0],[0.0,0.0],[0.0,0.0],[1.0,0.0]],"passed":true},{"actual":[[0.0,0.0],[-1.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]],"check":"repair check: random circuit 0","expected":[[0.0,0.0],[-1.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]],"passed":true},{"actual":[[1.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]],"check":"control: empty circuit on two qubits","expected":[[1.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]],"passed":true},{"actual":[[0.707107,0.0],[0.0,0.0],[0.0,0.0],[0.707107,0.0]],"check":"control: bell pair","expected":[[0.707107,0.0],[0.0,0.0],[0.0,0.0],[0.707107,0.0]],"passed":true},{"actual":[[0.707107,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.707107,0.0]],"check":"control: ghz three qubits","expected":[[0.707107,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.707107,0.0]],"passed":true},{"actual":[[0.0,0.0],[0.0,0.0],[0.0,0.0],[1.0,0.0]],"check":"control: cx with control on high qubit","expected":[[0.0,0.0],[0.0,0.0],[0.0,0.0],[1.0,0.0]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: swap moves excitation\", \"actual\": [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"expected\": [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"passed\": true}, {\"check\": \"regression: random circuit 7\", \"actual\": [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]], \"expected\": [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]], \"passed\": true}, {\"check\": \"repair check: random circuit 0\", \"actual\": [[0.0, 0.0], [-1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"expected\": [[0.0, 0.0], [-1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"passed\": true}, {\"check\": \"control: empty circuit on two qubits\", \"actual\": [[1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"expected\": [[1.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], \"passed\": true}, {\"check\": \"control: bell pair\", \"actual\": [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]], \"expected\": [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]], \"passed\": true}, {\"check\": \"control: ghz three qubits\", \"actual\": [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]], \"expected\": [[0.707107, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.707107, 0.0]], \"passed\": true}, {\"check\": \"control: cx with control on high qubit\", \"actual\": [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]], \"expected\": [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [1.0, 0.0]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}