Skip to content

Commit

Permalink
Update test imports for qiskit-aer 0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
wshanks committed Sep 16, 2022
1 parent 1f6d985 commit b065920
Show file tree
Hide file tree
Showing 18 changed files with 29 additions and 30 deletions.
2 changes: 1 addition & 1 deletion docs/tutorials/quantum_volume.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ z_value = 2), and at least 100 trials have been ran.
from qiskit_experiments.framework import BatchExperiment
from qiskit_experiments.library import QuantumVolume
from qiskit import Aer
from qiskit.providers.aer import AerSimulator
from qiskit_aer import AerSimulator

# For simulation
from qiskit.providers.fake_provider import FakeSydney
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/randomized_benchmarking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ for an explanation on the RB method, which is based on Ref. [1, 2].
import qiskit.circuit.library as circuits

# For simulation
from qiskit.providers.aer import AerSimulator
from qiskit_aer import AerSimulator
from qiskit.providers.fake_provider import FakeParis

backend = AerSimulator.from_backend(FakeParis())
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/readout_mitigation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ experiments to generate the corresponding mitigators.
from qiskit.visualization import plot_histogram
from qiskit_experiments.library import LocalReadoutError, CorrelatedReadoutError
# For simulation
from qiskit.providers.aer import AerSimulator
from qiskit_aer import AerSimulator
from qiskit.providers.fake_provider import FakeParis

from qiskit.result.mitigation.utils import (
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/state_tomography.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Quantum State Tomography
from qiskit_experiments.library import StateTomography

# For simulation
from qiskit.providers.aer import AerSimulator
from qiskit_aer import AerSimulator
from qiskit.providers.fake_provider import FakeParis

# Noisy simulator backend
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/t1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ for qubit 0.

# A T1 simulator
from qiskit.providers.fake_provider import FakeVigo
from qiskit.providers.aer import AerSimulator
from qiskit.providers.aer.noise import NoiseModel
from qiskit_aer import AerSimulator
from qiskit_aer.noise import NoiseModel

# A kerneled data simulator
from qiskit_experiments.test.mock_iq_backend import MockIQBackend
Expand Down Expand Up @@ -167,4 +167,4 @@ that is close to a logical value '0'.
.. jupyter-execute::

import qiskit.tools.jupyter
%qiskit_copyright
%qiskit_copyright
4 changes: 2 additions & 2 deletions docs/tutorials/t2ramsey_characterization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ pure T1/T2 relaxation noise model.

# A T1 simulator
from qiskit.providers.fake_provider import FakeVigo
from qiskit.providers.aer import AerSimulator
from qiskit.providers.aer.noise import NoiseModel
from qiskit_aer import AerSimulator
from qiskit_aer.noise import NoiseModel

# Create a pure relaxation noise model for AerSimulator
noise_model = NoiseModel.from_backend(
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/tphi_characterization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ we compute the results for :math:`T_\varphi.`

# An Aer simulator
from qiskit.providers.fake_provider import FakeVigo
from qiskit.providers.aer import AerSimulator
from qiskit.providers.aer.noise import NoiseModel
from qiskit_aer import AerSimulator
from qiskit_aer.noise import NoiseModel

# Create a pure relaxation noise model for AerSimulator
noise_model = NoiseModel.from_backend(
Expand Down
2 changes: 1 addition & 1 deletion qiskit_experiments/library/quantum_volume/qv_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class QuantumVolume(BaseExperiment):
:math:`d` qubits, which contain :math:`d` layers, where each layer consists of random 2-qubit
unitary gates from :math:`SU(4)`, followed by a random permutation on the :math:`d` qubits.
Then these circuits run on the quantum backend and on an ideal simulator (either
:class:`~qiskit.providers.aer.AerSimulator` or :class:`~qiskit.quantum_info.Statevector`).
:class:`~qiskit_aer.AerSimulator` or :class:`~qiskit.quantum_info.Statevector`).
A depth :math:`d` QV circuit is successful if it has 'mean heavy-output probability' > 2/3 with
confidence level > 0.977 (corresponding to z_value = 2), and at least 100 trials have been ran.
Expand Down
2 changes: 1 addition & 1 deletion qiskit_experiments/test/mock_iq_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import numpy as np
from qiskit import QuantumCircuit
from qiskit.exceptions import QiskitError
from qiskit.providers.aer import AerSimulator
from qiskit_aer import AerSimulator
from qiskit_experiments.framework import BaseExperiment

# Define an IQ point typing class.
Expand Down
6 changes: 3 additions & 3 deletions qiskit_experiments/test/noisy_delay_aer_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
from typing import List

from qiskit import QuantumCircuit
from qiskit.providers.aer import AerSimulator
from qiskit.providers.aer.jobs.aerjob import AerJob
from qiskit.providers.aer.noise.passes import RelaxationNoisePass
from qiskit_aer import AerSimulator
from qiskit_aer.jobs.aerjob import AerJob
from qiskit_aer.noise.passes import RelaxationNoisePass
from qiskit.circuit import Delay
from qiskit_experiments.framework import BackendData

Expand Down
5 changes: 2 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ sphinx-panels
nbsphinx
arxiv
ddt~=1.4.2
# FIXME: Remove maximum version once bugs discussed in #909, #910, #911 have been fixed.
qiskit-aer>=0.10.0,<0.11
qiskit-aer>=0.11.0
pandas>=1.1.5
cvxpy>=1.1.15
pylatexenc
pylatexenc
2 changes: 1 addition & 1 deletion test/framework/test_composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from ddt import ddt, data

from qiskit import QuantumCircuit, Aer
from qiskit.providers.aer import noise
from qiskit_aer import noise
from qiskit.result import Result

from qiskit_ibm_experiment import IBMExperimentService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from qiskit import QuantumCircuit, pulse, quantum_info as qi
from qiskit.providers.fake_provider import FakeBogotaV2
from qiskit.extensions.hamiltonian_gate import HamiltonianGate
from qiskit.providers.aer import AerSimulator
from qiskit_aer import AerSimulator
from qiskit_experiments.library.characterization import cr_hamiltonian
from qiskit_experiments.framework import BackendData

Expand Down
8 changes: 4 additions & 4 deletions test/library/quantum_volume/qv_generate_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
import os
import sys
import json
from qiskit.providers.aer import AerSimulator
from qiskit.providers.aer.noise import NoiseModel
from qiskit.providers.aer.noise.errors.standard_errors import (
from qiskit_aer import AerSimulator
from qiskit_aer.noise import NoiseModel
from qiskit_aer.noise.errors.standard_errors import (
depolarizing_error,
thermal_relaxation_error,
)
from qiskit.providers.aer.noise.errors import readout_error
from qiskit_aer.noise.errors import readout_error
from qiskit_experiments.library import QuantumVolume
from qiskit_experiments.framework import ExperimentEncoder

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from qiskit.circuit import Delay, QuantumCircuit
from qiskit.circuit.library import SXGate, CXGate, TGate, XGate
from qiskit.exceptions import QiskitError
from qiskit.providers.aer import AerSimulator
from qiskit.providers.aer.noise import NoiseModel, depolarizing_error
from qiskit_aer import AerSimulator
from qiskit_aer.noise import NoiseModel, depolarizing_error
from qiskit.quantum_info import Clifford

from qiskit_experiments.library import randomized_benchmarking as rb
Expand Down
2 changes: 1 addition & 1 deletion test/library/tomography/test_composite_tomography.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from test.base import QiskitExperimentsTestCase
from qiskit import QuantumCircuit
import qiskit.quantum_info as qi
from qiskit.providers.aer import AerSimulator
from qiskit_aer import AerSimulator
from qiskit_experiments.framework import BatchExperiment, ParallelExperiment
from qiskit_experiments.library import StateTomography, ProcessTomography
from .tomo_utils import filter_results
Expand Down
2 changes: 1 addition & 1 deletion test/library/tomography/test_process_tomography.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from qiskit import QuantumCircuit
from qiskit.circuit.library import XGate, CXGate
import qiskit.quantum_info as qi
from qiskit.providers.aer import AerSimulator
from qiskit_aer import AerSimulator
from qiskit_experiments.library import ProcessTomography
from qiskit_experiments.library.tomography import ProcessTomographyAnalysis
from .tomo_utils import FITTERS, filter_results, teleport_circuit
Expand Down
2 changes: 1 addition & 1 deletion test/library/tomography/test_state_tomography.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from qiskit import QuantumCircuit
from qiskit.circuit.library import XGate
import qiskit.quantum_info as qi
from qiskit.providers.aer import AerSimulator
from qiskit_aer import AerSimulator
from qiskit_experiments.library import StateTomography
from qiskit_experiments.library.tomography import StateTomographyAnalysis
from .tomo_utils import FITTERS, filter_results, teleport_circuit
Expand Down

0 comments on commit b065920

Please sign in to comment.