From 571ff174dbf14463434529e3205dbcc0973a181a Mon Sep 17 00:00:00 2001 From: Silas Dilkes <36165522+sjdilkes@users.noreply.github.com> Date: Wed, 4 Dec 2024 18:51:04 +0000 Subject: [PATCH] Update test_GreedyPauli.cpp --- tket/test/src/test_GreedyPauli.cpp | 73 +----------------------------- 1 file changed, 1 insertion(+), 72 deletions(-) diff --git a/tket/test/src/test_GreedyPauli.cpp b/tket/test/src/test_GreedyPauli.cpp index 78c3650fb2..1b04b2f2d1 100644 --- a/tket/test/src/test_GreedyPauli.cpp +++ b/tket/test/src/test_GreedyPauli.cpp @@ -825,82 +825,11 @@ SCENARIO("Test GreedyPauliSimp with multiple trials and threads") { 0.7, 0.3, 500, 500, 0, true, 1, 10) .apply(d)); REQUIRE(Transforms::greedy_pauli_optimisation( - 0.7, 0.3, 500, 500, 0, true, 10, 10) + 0.7, 0.3, 500, 500, 0, true, 100, 10) .apply(d)); REQUIRE(test_unitary_comparison(circ, d, true)); } } -SCENARIO( - "Test GreedyPauliSimp with large enough timeout to hit PauliGraph " - "construction") { - GIVEN("Large circuit") { - Circuit circ(6); - for (unsigned i = 0; i < 1000; i++) { - circ.add_box( - PauliExpBox(SymPauliTensor({Pauli::X, Pauli::X}, 0.3)), {0, 1}); - circ.add_box( - PauliExpBox(SymPauliTensor({Pauli::Z, Pauli::Y, Pauli::X}, 0.2)), - {0, 1, 2}); - circ.add_box( - PauliExpCommutingSetBox({ - {{Pauli::I, Pauli::Y, Pauli::I, Pauli::Z}, 1.2}, - {{Pauli::X, Pauli::Y, Pauli::Z, Pauli::I}, 0.8}, - {{Pauli::I, Pauli::I, Pauli::I, Pauli::Z}, 1.25}, - }), - {1, 2, 3, 4}); - circ.add_box( - PauliExpBox(SymPauliTensor({Pauli::Y, Pauli::X}, 0.1)), {2, 3}); - circ.add_box( - PauliExpBox(SymPauliTensor({Pauli::Z, Pauli::Y, Pauli::X}, 0.11)), - {1, 3, 4}); - circ.add_box( - PauliExpBox(SymPauliTensor({Pauli::Y, Pauli::Y}, 0.2)), {4, 5}); - circ.add_box( - PauliExpBox(SymPauliTensor({Pauli::Z, Pauli::Z, Pauli::X}, 0.15)), - {2, 4, 5}); - circ.add_box( - PauliExpBox( - SymPauliTensor({Pauli::X, Pauli::X, Pauli::X, Pauli::X}, 0.25)), - {2, 4, 5, 0}); - circ.add_box( - PauliExpBox( - SymPauliTensor({Pauli::Y, Pauli::Z, Pauli::Z, Pauli::X}, 0.125)), - {1, 3, 5, 0}); - - circ.add_box( - PauliExpBox(SymPauliTensor( - {Pauli::X, Pauli::Z, Pauli::Y, Pauli::Y, Pauli::Z, Pauli::X}, - 0.125)), - {1, 3, 5, 0, 2, 4}); - - circ.add_box( - PauliExpBox(SymPauliTensor( - {Pauli::Z, Pauli::Y, Pauli::Y, Pauli::Z, Pauli::Z, Pauli::X}, - 0.125)), - {0, 1, 2, 3, 4, 5}); - - circ.add_box( - PauliExpBox(SymPauliTensor( - {Pauli::X, Pauli::Z, Pauli::Y, Pauli::Z, Pauli::Z, Pauli::X}, - 0.125)), - {5, 2, 4, 1, 3, 0}); - - circ.add_box( - PauliExpBox(SymPauliTensor( - {Pauli::X, Pauli::Z, Pauli::Y, Pauli::Y, Pauli::Z, Pauli::X}, - 0.125)), - {0, 5, 1, 4, 3, 2}); - } - Circuit d(circ); - REQUIRE(!Transforms::greedy_pauli_optimisation( - 0.7, 0.3, 500, 500, 0, true, 1, 1) - .apply(d)); - REQUIRE(Transforms::greedy_pauli_optimisation( - 0.7, 0.3, 500, 500, 0, true, 100, 1) - .apply(d)); - REQUIRE(test_unitary_comparison(circ, d, true)); - } -} } // namespace test_GreedyPauliSimp } // namespace tket