diff --git a/cirq-core/cirq/contrib/svg/svg.py b/cirq-core/cirq/contrib/svg/svg.py index 6e4aa541e23..a522d82de41 100644 --- a/cirq-core/cirq/contrib/svg/svg.py +++ b/cirq-core/cirq/contrib/svg/svg.py @@ -183,13 +183,31 @@ def tdd_to_svg( t = ( f'' + ''' + + + + + + + + + + ''' ) # Developers: uncomment below to draw green lines to debug # col_starts and row_starts # t += _debug_spacing(col_starts, row_starts) - for yi, xi1, xi2, _, _ in tdd.horizontal_lines: + for yi, xi1, xi2, _, doubled in tdd.horizontal_lines: xi1 = cast(int, xi1) xi2 = cast(int, xi2) x1 = col_starts[xi1] + col_widths[xi1] / 2 @@ -203,9 +221,13 @@ def tdd_to_svg( stroke = QBLUE else: stroke = 'black' # pragma: no cover - t += f'' + t += f'' + t += f' None: cirq.PhasedXPowGate(exponent=0.123, phase_exponent=0.456).on(c), cirq.Z(a), cirq.measure(a, b, c, key='z'), - cirq.MatrixGate(np.eye(2)).on(a), + cirq.MatrixGate(np.eye(2)).on(a).with_classical_controls('z'), ) ) assert '?' in svg_text assert '' in svg_text + assert 'double' in svg_text + assert 'arrow' in svg_text def test_svg_noise() -> None: diff --git a/cirq-core/cirq/ops/classically_controlled_operation.py b/cirq-core/cirq/ops/classically_controlled_operation.py index a3fb99d84e7..0b834979c53 100644 --- a/cirq-core/cirq/ops/classically_controlled_operation.py +++ b/cirq-core/cirq/ops/classically_controlled_operation.py @@ -49,7 +49,7 @@ class ClassicallyControlledOperation(raw_types.Operation): ║ 1: ─────────────╫───X─── ║ ║ - control_key: ═══@═══^═══ + control_key: ═══V═══@═══ >>> circuit2 = cirq.Circuit([ ... cirq.measure(a, key='control_key1'), ... cirq.measure(b, key='control_key2'), @@ -62,9 +62,9 @@ class ClassicallyControlledOperation(raw_types.Operation): ║║ 2: ───────────────╫╫────X─── ║║ ║ - control_key1: ════@╬════^═══ + control_key1: ════V╬════@═══ ║ ║ - control_key2: ═════@════^═══ + control_key2: ═════V════@═══ └──┘ """ @@ -180,7 +180,7 @@ def _circuit_diagram_info_( control_label_count = 0 if args.label_map is not None: control_label_count = len({k for c in self._conditions for k in c.keys}) - wire_symbols = sub_info.wire_symbols + ('^',) * control_label_count + wire_symbols = sub_info.wire_symbols + ('@',) * control_label_count if control_label_count == 0 or any( not isinstance(c, value.KeyCondition) for c in self._conditions ): diff --git a/cirq-core/cirq/ops/classically_controlled_operation_test.py b/cirq-core/cirq/ops/classically_controlled_operation_test.py index 0e690707abd..0456c5bae29 100644 --- a/cirq-core/cirq/ops/classically_controlled_operation_test.py +++ b/cirq-core/cirq/ops/classically_controlled_operation_test.py @@ -35,7 +35,7 @@ def test_diagram() -> None: ║ 1: ───╫───X─── ║ ║ -a: ═══@═══^═══ +a: ═══V═══@═══ """, use_unicode_characters=True, ) @@ -55,7 +55,7 @@ def test_diagram_pauli() -> None: ║ 1: ───╫──────X─── ║ ║ -a: ═══@══════^═══ +a: ═══V══════@═══ """, use_unicode_characters=True, ) @@ -76,7 +76,7 @@ def test_diagram_extra_measurements() -> None: ║ 1: ───╫───X──────── ║ ║ -a: ═══@═══^════════ +a: ═══V═══@════════ """, use_unicode_characters=True, ) @@ -93,7 +93,7 @@ def test_diagram_extra_controlled_bits() -> None: ║ ║ 1: ───╫───X─── ║ ║ -a: ═══@═══^═══ +a: ═══V═══@═══ """, use_unicode_characters=True, ) @@ -114,9 +114,9 @@ def test_diagram_extra_control_bits() -> None: ║ ║ 1: ───╫───╫───X─── ║ ║ ║ -a: ═══@═══╬═══^═══ +a: ═══V═══╬═══@═══ ║ ║ -b: ═══════@═══^═══ +b: ═══════V═══@═══ """, use_unicode_characters=True, ) @@ -139,9 +139,9 @@ def test_diagram_multiple_ops_single_moment() -> None: ║ ║ 1: ────╫M─────╫X──── ║║ ║║ -a: ════@╬═════^╬════ +a: ════V╬═════@╬════ ║ ║ -b: ═════@══════^════ +b: ═════V══════@════ └──┘ └──┘ """, use_unicode_characters=True, @@ -163,7 +163,7 @@ def test_diagram_subcircuit() -> None: [ ║ ] 0: ───[ 1: ───╫───X─── ]─── [ ║ ║ ] - [ a: ═══@═══^═══ ] + [ a: ═══V═══@═══ ] │ 1: ───#2─────────────────── """, @@ -188,11 +188,11 @@ def test_diagram_subcircuit_layered() -> None: [ ║ ] 0: ───M───[ 1: ───╫───X─── ]─────── ║ [ ║ ║ ] - ║ [ a: ═══@═══^═══ ] + ║ [ a: ═══V═══@═══ ] ║ ║ 1: ───╫───#2───────────────────X─── ║ ║ ║ -a: ═══@═══╩════════════════════^═══ +a: ═══V═══╩════════════════════@═══ """, use_unicode_characters=True, ) @@ -510,7 +510,7 @@ def test_scope_local() -> None: """ [ [ 0: ───M───X─── ] ] 0: ───[ 0: ───[ ║ ║ ]───────────────────────────────────── ]───────────────────────────────────── - [ [ a: ═══@═══^═══ ](loops=2, use_repetition_ids=True) ](loops=2, use_repetition_ids=True) + [ [ a: ═══V═══@═══ ](loops=2, use_repetition_ids=True) ](loops=2, use_repetition_ids=True) """, # noqa: E501 use_unicode_characters=True, ) @@ -519,13 +519,13 @@ def test_scope_local() -> None: """ 0: ───────M───X───M───X───M───X───M───X─── ║ ║ ║ ║ ║ ║ ║ ║ -0:0:a: ═══@═══^═══╬═══╬═══╬═══╬═══╬═══╬═══ +0:0:a: ═══V═══@═══╬═══╬═══╬═══╬═══╬═══╬═══ ║ ║ ║ ║ ║ ║ -0:1:a: ═══════════@═══^═══╬═══╬═══╬═══╬═══ +0:1:a: ═══════════V═══@═══╬═══╬═══╬═══╬═══ ║ ║ ║ ║ -1:0:a: ═══════════════════@═══^═══╬═══╬═══ +1:0:a: ═══════════════════V═══@═══╬═══╬═══ ║ ║ -1:1:a: ═══════════════════════════@═══^═══ +1:1:a: ═══════════════════════════V═══@═══ """, use_unicode_characters=True, ) @@ -553,7 +553,7 @@ def test_scope_flatten_both() -> None: """ [ [ 0: ───M───X─── ] ] 0: ───[ 0: ───[ ║ ║ ]──────────── ]──────────── - [ [ a: ═══@═══^═══ ](loops=2) ](loops=2) + [ [ a: ═══V═══@═══ ](loops=2) ](loops=2) """, use_unicode_characters=True, ) @@ -562,7 +562,7 @@ def test_scope_flatten_both() -> None: """ 0: ───M───X───M───X───M───X───M───X─── ║ ║ ║ ║ ║ ║ ║ ║ -a: ═══@═══^═══@═══^═══@═══^═══@═══^═══ +a: ═══V═══@═══V═══@═══V═══@═══V═══@═══ """, use_unicode_characters=True, ) @@ -587,7 +587,7 @@ def test_scope_flatten_inner() -> None: """ [ [ 0: ───M───X─── ] ] 0: ───[ 0: ───[ ║ ║ ]──────────── ]───────────────────────────────────── - [ [ a: ═══@═══^═══ ](loops=2) ](loops=2, use_repetition_ids=True) + [ [ a: ═══V═══@═══ ](loops=2) ](loops=2, use_repetition_ids=True) """, use_unicode_characters=True, ) @@ -596,9 +596,9 @@ def test_scope_flatten_inner() -> None: """ 0: ─────M───X───M───X───M───X───M───X─── ║ ║ ║ ║ ║ ║ ║ ║ -0:a: ═══@═══^═══@═══^═══╬═══╬═══╬═══╬═══ +0:a: ═══V═══@═══V═══@═══╬═══╬═══╬═══╬═══ ║ ║ ║ ║ -1:a: ═══════════════════@═══^═══@═══^═══ +1:a: ═══════════════════V═══@═══V═══@═══ """, use_unicode_characters=True, ) @@ -623,7 +623,7 @@ def test_scope_flatten_outer() -> None: """ [ [ 0: ───M───X─── ] ] 0: ───[ 0: ───[ ║ ║ ]───────────────────────────────────── ]──────────── - [ [ a: ═══@═══^═══ ](loops=2, use_repetition_ids=True) ](loops=2) + [ [ a: ═══V═══@═══ ](loops=2, use_repetition_ids=True) ](loops=2) """, use_unicode_characters=True, ) @@ -632,9 +632,9 @@ def test_scope_flatten_outer() -> None: """ 0: ─────M───X───M───X───M───X───M───X─── ║ ║ ║ ║ ║ ║ ║ ║ -0:a: ═══@═══^═══╬═══╬═══@═══^═══╬═══╬═══ +0:a: ═══V═══@═══╬═══╬═══V═══@═══╬═══╬═══ ║ ║ ║ ║ -1:a: ═══════════@═══^═══════════@═══^═══ +1:a: ═══════════V═══@═══════════V═══@═══ """, use_unicode_characters=True, ) @@ -662,9 +662,9 @@ def test_scope_extern() -> None: """ [ [ 0: ───M('a')───X─── ] ] [ 0: ───M───[ ║ ]───────────────────────────────────── ] -0: ───[ ║ [ b: ════════════^═══ ](loops=2, use_repetition_ids=True) ]───────────────────────────────────── +0: ───[ ║ [ b: ════════════@═══ ](loops=2, use_repetition_ids=True) ]───────────────────────────────────── [ ║ ║ ] - [ b: ═══@═══╩═══════════════════════════════════════════════════════════ ](loops=2, use_repetition_ids=True) + [ b: ═══V═══╩═══════════════════════════════════════════════════════════ ](loops=2, use_repetition_ids=True) """, # noqa: E501 use_unicode_characters=True, ) @@ -673,9 +673,9 @@ def test_scope_extern() -> None: """ 0: ─────M───M('0:0:a')───X───M('0:1:a')───X───M───M('1:0:a')───X───M('1:1:a')───X─── ║ ║ ║ ║ ║ ║ -0:b: ═══@════════════════^════════════════^═══╬════════════════╬════════════════╬═══ +0:b: ═══V════════════════@════════════════@═══╬════════════════╬════════════════╬═══ ║ ║ ║ -1:b: ═════════════════════════════════════════@════════════════^════════════════^═══ +1:b: ═════════════════════════════════════════V════════════════@════════════════@═══ """, use_unicode_characters=True, ) @@ -710,9 +710,9 @@ def wrap_frozen(*ops): """ 0: ─────M───M('0:0:a')───X───M('0:1:a')───X───M───M('1:0:a')───X───M('1:1:a')───X─── ║ ║ ║ ║ ║ ║ -0:b: ═══@════════════════^════════════════^═══╬════════════════╬════════════════╬═══ +0:b: ═══V════════════════@════════════════@═══╬════════════════╬════════════════╬═══ ║ ║ ║ -1:b: ═════════════════════════════════════════@════════════════^════════════════^═══ +1:b: ═════════════════════════════════════════V════════════════@════════════════@═══ """, use_unicode_characters=True, ) @@ -739,7 +739,7 @@ def test_scope_root() -> None: """ [ [ 0: ───M('a')───X─── ] ] [ 0: ───M('c')───[ ║ ]──────────── ] -0: ───[ [ b: ════════════^═══ ](loops=2) ]──────────── +0: ───[ [ b: ════════════@═══ ](loops=2) ]──────────── [ ║ ] [ b: ════════════╩══════════════════════════════════ ](loops=2) ║ @@ -752,7 +752,7 @@ def test_scope_root() -> None: """ 0: ───M('c')───M('a')───X───M('a')───X───M('c')───M('a')───X───M('a')───X─── ║ ║ ║ ║ -b: ═════════════════════^════════════^═════════════════════^════════════^═══ +b: ═════════════════════@════════════@═════════════════════@════════════@═══ """, use_unicode_characters=True, ) @@ -781,7 +781,7 @@ def test_scope_extern_mismatch() -> None: """ [ [ 0: ───M('a')───X─── ] ] [ 0: ───M('0:b')───[ ║ ]───────────────────────────────────── ] -0: ───[ [ b: ════════════^═══ ](loops=2, use_repetition_ids=True) ]───────────────────────────────────── +0: ───[ [ b: ════════════@═══ ](loops=2, use_repetition_ids=True) ]───────────────────────────────────── [ ║ ] [ b: ══════════════╩═══════════════════════════════════════════════════════════ ](loops=2, use_repetition_ids=True) ║ @@ -794,7 +794,7 @@ def test_scope_extern_mismatch() -> None: """ 0: ───M('0:0:b')───M('0:0:a')───X───M('0:1:a')───X───M('1:0:b')───M('1:0:a')───X───M('1:1:a')───X─── ║ ║ ║ ║ -b: ═════════════════════════════^════════════════^═════════════════════════════^════════════════^═══ +b: ═════════════════════════════@════════════════@═════════════════════════════@════════════════@═══ """, use_unicode_characters=True, ) @@ -861,7 +861,7 @@ def test_layered_circuit_operations_with_controls_in_between() -> None: """ 0: ───X───Y─── ║ ║ -m: ═══^═══^═══ +m: ═══@═══@═══ """, use_unicode_characters=True, ) @@ -957,15 +957,15 @@ def test_sympy_scope() -> None: """ [ [ 0: ───M───X(conditions=[c | d, a & b])─── ] ] [ [ ║ ║ ] ] - [ [ a: ═══@═══^══════════════════════════════ ] ] + [ [ a: ═══V═══@══════════════════════════════ ] ] [ [ ║ ] ] - [ 0: ───M───M('0:c')───[ b: ═══════^══════════════════════════════ ]──────────── ] + [ 0: ───M───M('0:c')───[ b: ═══════@══════════════════════════════ ]──────────── ] [ ║ [ ║ ] ] - [ ║ [ c: ═══════^══════════════════════════════ ] ] + [ ║ [ c: ═══════@══════════════════════════════ ] ] 0: ───[ ║ [ ║ ] ]──────────── - [ ║ [ d: ═══════^══════════════════════════════ ](loops=2) ] + [ ║ [ d: ═══════@══════════════════════════════ ](loops=2) ] [ ║ ║ ] - [ b: ═══@══════════════╬════════════════════════════════════════════════════════ ] + [ b: ═══V══════════════╬════════════════════════════════════════════════════════ ] [ ║ ] [ c: ══════════════════╬════════════════════════════════════════════════════════ ] [ ║ ] @@ -983,13 +983,13 @@ def test_sympy_scope() -> None: """ 0: ───M───M('0:c')───M───X(conditions=[c | d, a & b])───M───X(conditions=[c | d, a & b])───M───M('0:c')───M───X(conditions=[c | d, a & b])───M───X(conditions=[c | d, a & b])─── ║ ║ ║ ║ ║ ║ ║ ║ ║ ║ -a: ═══╬══════════════@═══^══════════════════════════════@═══^══════════════════════════════╬══════════════@═══^══════════════════════════════@═══^══════════════════════════════ +a: ═══╬══════════════V═══@══════════════════════════════V═══@══════════════════════════════╬══════════════V═══@══════════════════════════════V═══@══════════════════════════════ ║ ║ ║ ║ ║ ║ -b: ═══@══════════════════^══════════════════════════════════^══════════════════════════════@══════════════════^══════════════════════════════════^══════════════════════════════ +b: ═══V══════════════════@══════════════════════════════════@══════════════════════════════V══════════════════@══════════════════════════════════@══════════════════════════════ ║ ║ ║ ║ -c: ══════════════════════^══════════════════════════════════^═════════════════════════════════════════════════^══════════════════════════════════^══════════════════════════════ +c: ══════════════════════@══════════════════════════════════@═════════════════════════════════════════════════@══════════════════════════════════@══════════════════════════════ ║ ║ ║ ║ -d: ══════════════════════^══════════════════════════════════^═════════════════════════════════════════════════^══════════════════════════════════^══════════════════════════════ +d: ══════════════════════@══════════════════════════════════@═════════════════════════════════════════════════@══════════════════════════════════@══════════════════════════════ """, # noqa: E501 use_unicode_characters=True, ) @@ -1074,7 +1074,7 @@ def test_diagram_exponents() -> None: ║ 1: ───╫───X^0.5─── ║ ║ -m: ═══@═══^═══════ +m: ═══V═══@═══════ """, ) @@ -1093,7 +1093,7 @@ def test_diagram_exponents_cx() -> None: ║ ║ 2: ───╫───@─────── ║ ║ -m: ═══@═══^═══════ +m: ═══V═══@═══════ """, ) @@ -1115,9 +1115,9 @@ def test_diagram_exponents_multiple_keys() -> None: ║║ 2: ─────╫╫────X^0.5─── ║║ ║ -m0: ════@╬════^═══════ +m0: ════V╬════@═══════ ║ ║ -m1: ═════@════^═══════ +m1: ═════V════@═══════ └──┘ """, ) @@ -1145,7 +1145,7 @@ def test_sympy_indexed_condition_circuit() -> None: ║ 3: ───╫───X(conditions=[a[1] ^ a[2]])───M('b')─── ║ ║ -a: ═══@═══^══════════════════════════════════════ +a: ═══V═══@══════════════════════════════════════ """, ) result = sim.sample(circuit) diff --git a/cirq-core/cirq/ops/measurement_gate.py b/cirq-core/cirq/ops/measurement_gate.py index fbc400587fa..824b4aec8b6 100644 --- a/cirq-core/cirq/ops/measurement_gate.py +++ b/cirq-core/cirq/ops/measurement_gate.py @@ -209,7 +209,7 @@ def _circuit_diagram_info_(self, args: cirq.CircuitDiagramInfoArgs) -> cirq.Circ if self.key not in label_map: symbols[0] += f"('{self.key}')" if self.key in label_map: - symbols += '@' + symbols += 'V' return protocols.CircuitDiagramInfo(symbols) diff --git a/cirq-core/cirq/ops/pauli_measurement_gate.py b/cirq-core/cirq/ops/pauli_measurement_gate.py index 72a2ba23493..aa64265b194 100644 --- a/cirq-core/cirq/ops/pauli_measurement_gate.py +++ b/cirq-core/cirq/ops/pauli_measurement_gate.py @@ -160,7 +160,7 @@ def _circuit_diagram_info_(self, args: cirq.CircuitDiagramInfoArgs) -> cirq.Circ if self.key not in label_map: symbols[0] += f"('{self.key}')" if self.key in label_map: - symbols += '@' + symbols += 'V' return protocols.CircuitDiagramInfo(tuple(symbols)) diff --git a/cirq-core/cirq/transformers/merge_k_qubit_gates_test.py b/cirq-core/cirq/transformers/merge_k_qubit_gates_test.py index c2e98902167..95a9d53d08d 100644 --- a/cirq-core/cirq/transformers/merge_k_qubit_gates_test.py +++ b/cirq-core/cirq/transformers/merge_k_qubit_gates_test.py @@ -126,7 +126,7 @@ def test_merge_complex_circuit_preserving_moment_structure() -> None: │ │ ║ 2: ───H───X───────────────────────────X───────────────Z───────────M───╫─── ║ ║ -a: ═══════════════════════════════════════════════════════════════@═══^═══ +a: ═══════════════════════════════════════════════════════════════V═══@═══ ''', ) component_id = 0 @@ -153,8 +153,7 @@ def rewriter_merge_to_circuit_op(op: cirq.CircuitOperation) -> cirq.OP_TREE: │ │ ║ 2: ───#2──────────────────────────────────────────────────────────────────X───────────[ 2: ───Z─── ][3]───M───────────────────────╫─── ║ ║ -a: ═══════════════════════════════════════════════════════════════════════════════════════════════════════@═══════════════════════^═══ - ''', # noqa: E501 +a: ═══════════════════════════════════════════════════════════════════════════════════════════════════════V═══════════════════════@═══''', # noqa: E501 ) component_id = 0 @@ -184,8 +183,7 @@ def rewriter_replace_with_decomp(op: cirq.CircuitOperation) -> cirq.OP_TREE: │ │ ║ 2: ───T[1]───iSwap^0.5───T[1]─────────────────────────────X───────────T[3]────────M─────────────────────────╫─── ║ ║ -a: ═══════════════════════════════════════════════════════════════════════════════@═════════════════════════^═══ - ''', # noqa: E501 +a: ═══════════════════════════════════════════════════════════════════════════════V═════════════════════════@═══''', # noqa: E501 ) diff --git a/cirq-core/cirq/transformers/merge_single_qubit_gates_test.py b/cirq-core/cirq/transformers/merge_single_qubit_gates_test.py index 10a78a5830e..bc63e987620 100644 --- a/cirq-core/cirq/transformers/merge_single_qubit_gates_test.py +++ b/cirq-core/cirq/transformers/merge_single_qubit_gates_test.py @@ -163,7 +163,7 @@ def test_merge_single_qubit_moments_to_phxz(): ║ ║ 2: ───────T───────Y───────T───────Z──────────────────╫───╫─────── ║ ║ -a: ══════════════════════════════════════════════════@═══^═══════ +a: ══════════════════════════════════════════════════V═══@═══════ ''', ) context = cirq.TransformerContext(tags_to_ignore=("nocompile",)) @@ -177,7 +177,7 @@ def test_merge_single_qubit_moments_to_phxz(): ║ ║ 2: ───PhXZ(a=0.25,x=0,z=0.25)────Y───PhXZ(a=0.25,x=0,z=0.25)────Z──────────────────╫───╫─────── ║ ║ -a: ════════════════════════════════════════════════════════════════════════════════@═══^═══════ +a: ════════════════════════════════════════════════════════════════════════════════V═══@═══════ ''', ) diff --git a/cirq-core/cirq/transformers/optimize_for_target_gateset_test.py b/cirq-core/cirq/transformers/optimize_for_target_gateset_test.py index 2cc515bedd9..01c12b26119 100644 --- a/cirq-core/cirq/transformers/optimize_for_target_gateset_test.py +++ b/cirq-core/cirq/transformers/optimize_for_target_gateset_test.py @@ -61,7 +61,7 @@ def test_decompose_operations_to_target_gateset_default(): │ │ ║ │ 1: ───────×───────×───────────╫───X───T───×───T─── ║ ║ -m: ═══════════════════════════@═══^═══════════════''', +m: ═══════════════════════════V═══@═══════════════''', ) context = cirq.TransformerContext(tags_to_ignore=("ignore",)) c_new = _decompose_operations_to_target_gateset(c_orig, context=context) @@ -72,7 +72,7 @@ def test_decompose_operations_to_target_gateset_default(): │ │ │ │ ║ │ │ │ 1: ───────Y^-0.5───@───Y^0.5────@───Y^-0.5───@───Y^0.5───────×───────────╫───X───T───Y^-0.5───@───Y^0.5────@───Y^-0.5───@───Y^0.5───T─── ║ ║ -m: ══════════════════════════════════════════════════════════════════════@═══^══════════════════════════════════════════════════════════ +m: ══════════════════════════════════════════════════════════════════════V═══@══════════════════════════════════════════════════════════ ''', # noqa: E501 ) @@ -107,7 +107,7 @@ def test_decompose_operations_to_target_gateset(): │ │ │ │ ║ │ │ │ 1: ───────X───@───X───────×───────────╫───X───H───X───@───X───H─── ║ ║ -m: ═══════════════════════════════════@═══^═══════════════════════''', +m: ═══════════════════════════════════V═══@═══════════════════════''', ) with pytest.raises(ValueError, match="Unable to convert"): @@ -171,7 +171,7 @@ def test_optimize_for_target_gateset(): │ │ ║ ║ │ 3: ───#4────X───────────╫───@───#4─────── ║ ║ -m: ═════════════════════@═══^════════════ +m: ═════════════════════V═══@════════════ ''', ) gateset = MatrixGateTargetGateset() @@ -189,7 +189,7 @@ def test_optimize_for_target_gateset(): │ │ │ │ ║ ║ │ │ │ │ 3: ────────────────────────M[2]───M[2]────────M[2]────X───────────╫───@────────M[2]────M[2]───M[2]────M[2]────────────────────── ║ ║ -m: ═══════════════════════════════════════════════════════════════@═══^═════════════════════════════════════════════════════════ +m: ═══════════════════════════════════════════════════════════════V═══@═════════════════════════════════════════════════════════ └────────┘ └────────┘ └────────┘ ''', # noqa: E501 ) diff --git a/cirq-core/cirq/transformers/stratify_test.py b/cirq-core/cirq/transformers/stratify_test.py index 9d6286bcd6c..60134738bd0 100644 --- a/cirq-core/cirq/transformers/stratify_test.py +++ b/cirq-core/cirq/transformers/stratify_test.py @@ -291,7 +291,7 @@ def test_does_not_move_ccos_behind_measurement(): ║ ║ 2: ───╫───╫───X─── ║ ║ -m: ═══@═══^═══════ +m: ═══V═══@═══════ ''', ) c_out = cirq.stratified_circuit( @@ -307,7 +307,7 @@ def test_does_not_move_ccos_behind_measurement(): ║ ║ 2: ────╫X────╫─────── ║ ║ -m: ════@═════^═══════ +m: ════V═════@═══════ └──┘ ''', ) diff --git a/cirq-core/cirq/transformers/target_gatesets/compilation_target_gateset_test.py b/cirq-core/cirq/transformers/target_gatesets/compilation_target_gateset_test.py index cc4de49d7fd..31324523302 100644 --- a/cirq-core/cirq/transformers/target_gatesets/compilation_target_gateset_test.py +++ b/cirq-core/cirq/transformers/target_gatesets/compilation_target_gateset_test.py @@ -188,7 +188,7 @@ def test_two_qubit_compilation_merge_and_replace_inefficient_component() -> None │ │ │ │ │ ║ 1: ───────X───────@───────────────Z───────X───X───Z───────X───╫───X─── ║ ║ -m: ═══════════════════════════════════════════════════════════@═══^═══ +m: ═══════════════════════════════════════════════════════════V═══@═══ ''', ) c_new = cirq.optimize_for_target_gateset( @@ -203,7 +203,7 @@ def test_two_qubit_compilation_merge_and_replace_inefficient_component() -> None │ │ │ │ ║ 1: ───────X───────@───────────────X───X───Y───X───Z───╫───X─── ║ ║ -m: ═══════════════════════════════════════════════════@═══^═══ +m: ═══════════════════════════════════════════════════V═══@═══ ''', ) diff --git a/examples/quantum_teleportation.py b/examples/quantum_teleportation.py index a48b6742276..d0385ca6fc5 100644 --- a/examples/quantum_teleportation.py +++ b/examples/quantum_teleportation.py @@ -27,9 +27,9 @@ │ ║ ║ 2: ─────────────────X─────────────╫────╫X────Z─── ║ ║║ ║ -alice: ═══════════════════════════@════╬^════╬═══ +alice: ═══════════════════════════V════╬@════╬═══ ║ ║ -msg: ══════════════════════════════════@═════^═══ +msg: ══════════════════════════════════V═════@═══ └──┘ Bloch Sphere of Message After Random X and Y Gates: