From 86ab8b12d9756ae87af04e8344a019db123d2aaa Mon Sep 17 00:00:00 2001 From: AlexanderIvrii Date: Mon, 22 Jan 2024 14:02:43 +0200 Subject: [PATCH] better experiment --- .../transpiler/experiment_collect_stars.py | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/test/python/transpiler/experiment_collect_stars.py b/test/python/transpiler/experiment_collect_stars.py index c97e77a64ace..65edb9705b8a 100644 --- a/test/python/transpiler/experiment_collect_stars.py +++ b/test/python/transpiler/experiment_collect_stars.py @@ -129,20 +129,24 @@ def example1(): def example2(): """Showing off dag dependency""" - qc = QuantumCircuit(6) + + qc = QuantumCircuit(4) qc.cx(0, 1) qc.cx(0, 2) - qc.cx(0, 3) - - qc.cx(5, 1) - qc.cx(5, 2) - qc.cx(5, 3) - - qc.cx(0, 4) - qc.cx(5, 4) - - print(qc) - + qc.cx(3, 1) + qc.cx(3, 2) + qc.cx(0, 1) + qc.cx(0, 2) + qc.cx(3, 1) + qc.cx(3, 2) + qc.cx(0, 1) + qc.cx(0, 2) + qc.cx(3, 1) + qc.cx(3, 2) + qc.cx(0, 1) + qc.cx(0, 2) + qc.cx(3, 1) + qc.cx(3, 2) block_collector = BlockCollector(circuit_to_dag(qc)) blocks = block_collector.collect_all_matching_blocks(