From 91ec39f900e0eab7d6eb880f7671bc0aeeb1907a Mon Sep 17 00:00:00 2001 From: "Kevin J. Sung" Date: Thu, 15 Feb 2024 16:22:59 -0500 Subject: [PATCH 1/3] update to qiskit 0.46 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 74a79dd..4bfb339 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ requires-python = ">=3.8" dependencies = [ "mapomatic==0.9", "qiskit-aer", - "qiskit==0.42.1", + "qiskit==0.46.0", ] [project.optional-dependencies] From 9b36c5a3a2a8297e36eb894830c3e98a85777fca Mon Sep 17 00:00:00 2001 From: "Kevin J. Sung" Date: Thu, 9 May 2024 23:02:02 -0400 Subject: [PATCH 2/3] lint --- .pylintrc | 8 -------- qiskit_research/utils/backend.py | 4 ---- qiskit_research/utils/dynamical_decoupling.py | 12 +++++------- qiskit_research/utils/pulse_scaling.py | 2 +- 4 files changed, 6 insertions(+), 20 deletions(-) diff --git a/.pylintrc b/.pylintrc index aa3c5a2..e0bbf47 100644 --- a/.pylintrc +++ b/.pylintrc @@ -543,11 +543,3 @@ max-statements=50 # Minimum number of public methods for a class (see R0903). min-public-methods=2 - - -[EXCEPTIONS] - -# Exceptions that will emit a warning when being caught. Defaults to -# "BaseException, Exception". -overgeneral-exceptions=BaseException, - Exception diff --git a/qiskit_research/utils/backend.py b/qiskit_research/utils/backend.py index ba77859..d32c48b 100644 --- a/qiskit_research/utils/backend.py +++ b/qiskit_research/utils/backend.py @@ -10,10 +10,8 @@ """Utilities for dealing with backends.""" - from typing import Optional -from qiskit import BasicAer from qiskit.providers import Backend, Provider from qiskit_aer import AerSimulator @@ -26,6 +24,4 @@ def get_backend( return provider.get_backend(name) if name == "aer_simulator": return AerSimulator(seed_simulator=seed_simulator) - if name == "statevector_simulator": - return BasicAer.get_backend("statevector_simulator") raise ValueError("The given name does not match any supported backends.") diff --git a/qiskit_research/utils/dynamical_decoupling.py b/qiskit_research/utils/dynamical_decoupling.py index c71d10f..547a510 100644 --- a/qiskit_research/utils/dynamical_decoupling.py +++ b/qiskit_research/utils/dynamical_decoupling.py @@ -13,31 +13,29 @@ from __future__ import annotations from enum import Enum - from typing import Iterable, List, Optional, Sequence, Union +import numpy as np from qiskit import QuantumCircuit, pulse from qiskit.circuit import Gate, Qubit from qiskit.circuit.delay import Delay -from qiskit.circuit.library import XGate, YGate, UGate, U3Gate +from qiskit.circuit.library import U3Gate, UGate, XGate, YGate from qiskit.circuit.reset import Reset from qiskit.converters import circuit_to_dag from qiskit.dagcircuit import DAGCircuit, DAGInNode, DAGNode, DAGOpNode from qiskit.providers.backend import Backend from qiskit.pulse import Drag, Waveform from qiskit.qasm import pi -from qiskit.quantum_info import OneQubitEulerDecomposer +from qiskit.synthesis import OneQubitEulerDecomposer from qiskit.transpiler import InstructionDurations from qiskit.transpiler.basepasses import BasePass from qiskit.transpiler.exceptions import TranspilerError from qiskit.transpiler.instruction_durations import InstructionDurationsType -from qiskit.transpiler.passes import PadDynamicalDecoupling, Optimize1qGates +from qiskit.transpiler.passes import Optimize1qGates, PadDynamicalDecoupling from qiskit.transpiler.passes.scheduling import ALAPScheduleAnalysis from qiskit.transpiler.passes.scheduling.scheduling.base_scheduler import BaseScheduler -import numpy as np - -from qiskit_research.utils.gates import XmGate, XpGate, YmGate, YpGate, PiPhiGate +from qiskit_research.utils.gates import PiPhiGate, XmGate, XpGate, YmGate, YpGate from qiskit_research.utils.periodic_dynamical_decoupling import ( PeriodicDynamicalDecoupling, ) diff --git a/qiskit_research/utils/pulse_scaling.py b/qiskit_research/utils/pulse_scaling.py index d217ecf..449b3c8 100644 --- a/qiskit_research/utils/pulse_scaling.py +++ b/qiskit_research/utils/pulse_scaling.py @@ -263,7 +263,7 @@ def run(self, dag: DAGCircuit) -> DAGCircuit: return dag - +# pylint: disable-next=too-many-ancestors class SECRCalibrationBuilder(RZXCalibrationBuilderNoEcho): """ Creates calibrations for SECRGate(theta) by stretching and compressing From 866d77762b0adcc1e3d999c05096e4dbce62d296 Mon Sep 17 00:00:00 2001 From: "Kevin J. Sung" Date: Thu, 9 May 2024 23:08:05 -0400 Subject: [PATCH 3/3] format --- qiskit_research/utils/pulse_scaling.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qiskit_research/utils/pulse_scaling.py b/qiskit_research/utils/pulse_scaling.py index 449b3c8..7d74627 100644 --- a/qiskit_research/utils/pulse_scaling.py +++ b/qiskit_research/utils/pulse_scaling.py @@ -263,6 +263,7 @@ def run(self, dag: DAGCircuit) -> DAGCircuit: return dag + # pylint: disable-next=too-many-ancestors class SECRCalibrationBuilder(RZXCalibrationBuilderNoEcho): """