From 02c1bc937a7d759d9c645e40d58eb34680df73e5 Mon Sep 17 00:00:00 2001 From: Will Shanks Date: Mon, 26 Aug 2024 12:16:28 -0400 Subject: [PATCH] wip --- qiskit_experiments/framework/transpilation.py | 8 ++++++++ .../library/calibration/fine_amplitude.py | 14 -------------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/qiskit_experiments/framework/transpilation.py b/qiskit_experiments/framework/transpilation.py index a9a45dcd27..30faa60a70 100644 --- a/qiskit_experiments/framework/transpilation.py +++ b/qiskit_experiments/framework/transpilation.py @@ -209,6 +209,14 @@ def minimal_transpile( if not full_transpile: full_transpile = check_transpilation_needed(circuits, backend) + import inspect + import unittest + try: + test_frame = next(f[0] for f in inspect.stack() if any(isinstance(l, unittest.TestCase) for n, l in f[0].f_locals.items())) + test = next(v for v in test_frame.f_locals.values()) + print(f"full_transpile={full_transpile} for {test.id()}") + except StopIteration: + pass if full_transpile: transpiled = transpile(circuits, backend, **options) else: diff --git a/qiskit_experiments/library/calibration/fine_amplitude.py b/qiskit_experiments/library/calibration/fine_amplitude.py index 8e3ff17972..f9af13cf29 100644 --- a/qiskit_experiments/library/calibration/fine_amplitude.py +++ b/qiskit_experiments/library/calibration/fine_amplitude.py @@ -182,20 +182,6 @@ def __init__( } ) - @classmethod - def _default_transpile_options(cls): - """Default transpile options. - - Transpile Options: - basis_gates (list(str)): A list of basis gates needed for this experiment. - The schedules for these basis gates will be provided by the instruction - schedule map from the calibrations. - """ - options = super()._default_transpile_options() - options.basis_gates = ["x", "sx"] - - return options - def _pre_circuit(self, num_clbits: int) -> QuantumCircuit: """The preparation circuit is an sx gate to move to the equator of the Bloch sphere.""" circuit = QuantumCircuit(self.num_qubits, num_clbits)