Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add transpiler directory for pulse transforms #6724

Closed
wants to merge 10 commits into from
7 changes: 6 additions & 1 deletion qiskit/transpiler/passes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@
DynamicalDecoupling
AlignMeasures
ValidatePulseGates

Transformation
===============
RZXCalibrationBuilder
RZXCalibrationBuilderNoEcho

Expand Down Expand Up @@ -191,12 +194,14 @@
from .scheduling import TimeUnitConversion
from .scheduling import ALAPSchedule
from .scheduling import ASAPSchedule
from .scheduling import RZXCalibrationBuilder
from .scheduling import RZXCalibrationBuilderNoEcho
from .scheduling import DynamicalDecoupling
from .scheduling import AlignMeasures
from .scheduling import ValidatePulseGates

# circuit transformation
from .transformation import RZXCalibrationBuilder

# additional utility passes
from .utils import CheckMap
from .utils import CheckCXDirection # Deprecated
Expand Down
8 changes: 8 additions & 0 deletions qiskit/transpiler/passes/scheduling/calibration_creators.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

"""Calibration creators."""

import warnings
import math
from typing import List, Union
from abc import abstractmethod
Expand Down Expand Up @@ -103,6 +104,13 @@ def __init__(self, backend: basebackend):
self._config = backend.configuration()
self._channel_map = backend.configuration().qubit_channel_mapping

warnings.warn(
"The scheduling.calibration_creators.py has been deprecated "
"and replaced by transformation.calibration_creators.py.",
DeprecationWarning,
stacklevel=2,
)

def supported(self, node_op: DAGNode) -> bool:
"""
Args:
Expand Down
8 changes: 7 additions & 1 deletion qiskit/transpiler/passes/scheduling/rzx_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"""
Convenience function to load RZXGate based templates.
"""

import warnings
from typing import List

from qiskit.circuit.library.templates.rzx import rzx_zz1, rzx_zz2, rzx_zz3, rzx_yz, rzx_xz, rzx_cy
Expand Down Expand Up @@ -46,4 +46,10 @@ def rzx_templates(template_list: List[str] = None):

rzx_dict = {"template_list": templates, "user_cost_dict": cost_dict}

warnings.warn(
"The scheduling.rzx_templates.py has been deprecated "
"and replaced by transformation.rzx_templates.py.",
DeprecationWarning,
stacklevel=2,
)
return rzx_dict
16 changes: 16 additions & 0 deletions qiskit/transpiler/passes/transformation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""Module containing circuit transformation passes."""

from .calibration_creators import CalibrationCreator, RZXCalibrationBuilder
from .rzx_templates import rzx_templates
Loading