Skip to content

Commit

Permalink
Merge branch 'main' into cluster_backend
Browse files Browse the repository at this point in the history
  • Loading branch information
hitomitak authored Jul 27, 2021
2 parents d715065 + 6b89d7c commit a06090a
Show file tree
Hide file tree
Showing 27 changed files with 352 additions and 548 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/tests_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,11 @@ jobs:
- name: Run Tests
env:
QISKIT_SUPPRESS_PACKAGING_WARNINGS: Y
LANG: 'C.UTF-8'
PYTHONIOENCODING: 'utf-8:backslashreplace'
run: |
set -e
chcp.com 65001
pip check
stestr run --slowest
shell: bash
Expand Down Expand Up @@ -164,8 +167,11 @@ jobs:
- name: Run Tests
env:
QISKIT_SUPPRESS_PACKAGING_WARNINGS: Y
LANG: 'C.UTF-8'
PYTHONIOENCODING: 'utf-8:backslashreplace'
run: |
set -e
pip check
chcp.com 65001
stestr run --slowest
shell: bash
12 changes: 12 additions & 0 deletions qiskit/providers/aer/backends/pulse_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
from warnings import warn
from numpy import inf

from qiskit.circuit import QuantumCircuit
from qiskit.compiler import schedule
from qiskit.providers.options import Options
from qiskit.providers.models import BackendConfiguration, PulseDefaults
from qiskit.utils import deprecate_arguments
Expand Down Expand Up @@ -239,6 +241,16 @@ def run(self,
validate = args[0]
if len(args) > 1:
backend_options = args[1]
if isinstance(qobj, list):
new_qobj = []
for circuit in qobj:
if isinstance(circuit, QuantumCircuit):
new_qobj.append(schedule(circuit, self))
else:
new_qobj.append(circuit)
qobj = new_qobj
elif isinstance(qobj, QuantumCircuit):
qobj = schedule(qobj, self)
return super().run(qobj, backend_options=backend_options, validate=validate,
**run_options)

Expand Down
2 changes: 1 addition & 1 deletion qiskit/providers/aer/extensions/snapshot_statevector.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def snapshot_statevector(self, label):
:func:`qiskit.providers.aer.library.save_statevector` circuit
method.
"""
warn('`The `save_statevector` circuit method will be deprecated in the'
warn('`The `snapshot_statevector` circuit method will be deprecated in the'
' future. It has been superseded by the `save_statevector`'
' circuit method.', PendingDeprecationWarning)
# Statevector snapshot acts as a barrier across all qubits in the
Expand Down
2 changes: 1 addition & 1 deletion qiskit/providers/aer/noise/errors/standard_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

import numpy as np

from qiskit.quantum_info.operators.pauli import Pauli
from qiskit.quantum_info.operators.channel import Choi, Kraus
from qiskit.quantum_info.operators.predicates import is_unitary_matrix
from qiskit.quantum_info.operators.predicates import is_identity_matrix
from qiskit.quantum_info.operators.symplectic.pauli import Pauli

from ..noiseerror import NoiseError
from .errorutils import make_unitary_instruction
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
When required memory is smaller than the system memory, multi-chunk was enabled
and simulation was started though memory is short. This fix corrects this behavior
to throw an exception.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
other:
- |
Performance improvement in algorithm for measure in MPS: when all qubits are
measured, no need to propagate the effect of measuring a single qubit to
all the other qubits; it is sufficient to propagate to the nearest
neighbors, because these neighbors will be measured next.
26 changes: 26 additions & 0 deletions releasenotes/notes/pulse-sim-circuits-4b4b6f6a9f00dc77.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
features:
- |
The :class:`~qiskit.providers.aer.backends.PulseSimulator` can now take
:class:`~qiskit.circuit.QuantumCircuit` objects on the
:meth:`~qiskit.providers.aer.backends.PulseSimulator.run`. Previously,
it only would except :class:`~qiskit.pulse.Schedule` objects as input to
:meth:`~qiskit.providers.aer.backends.PulseSimulator.run`. When a circuit
or list of circuits is passed to the simulator it will call
:func:`~qiskit.compiler.schedule` to convert the circuits to a schedule
before executing the circuit. For example::
from qiskit.circuit import QuantumCircuit
from qiskit.compiler import transpile
from qiskit.test.mock import FakeVigo
from qiskit.providers.aer.backends import PulseSimulator
backend = PulseSimulator.from_backend(FakeVigo())
circuit = QuantumCircuit(2)
circuit.h(0)
circuit.cx(0, 1)
circuit.measure_all()
transpiled_circuit = transpile(circuit, backend)
backend.run(circuit)
Loading

0 comments on commit a06090a

Please sign in to comment.