Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Commit

Permalink
0.5.0 release notes (#516)
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseclectic authored Oct 15, 2020
1 parent be1312f commit 4bafe96
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 38 deletions.
5 changes: 5 additions & 0 deletions releasenotes/notes/0.5/0.5.0-release-fc8bd1c142b6f9d1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
prelude: >
This release includes a new module for expectation value measurement
error mitigation, improved plotting functionality for quantum volume
experiments, several bug fixes, and drops support for Python 3.5.
41 changes: 17 additions & 24 deletions test/characterization/generate_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,11 @@ def t1_circuit_execution() -> Tuple[qiskit.result.Result,

backend = qiskit.Aer.get_backend('qasm_simulator')
shots = 100
backend_result = qiskit.execute(
circs, backend,
shots=shots,
seed_simulator=SEED,
backend_options={'max_parallel_experiments': 0},
noise_model=noise_model,
optimization_level=0).result()
qobj = qiskit.assemble(
qiskit.transpile(circs, backend=backend, optimization_level=0),
backend=backend, shots=shots, seed_simulator=SEED,
noise_model=noise_model, max_parallel_experiments=0)
backend_result = backend.run(qobj).result()

return backend_result, xdata, qubits, t1_value

Expand Down Expand Up @@ -137,13 +135,11 @@ def t2_circuit_execution() -> Tuple[qiskit.result.Result,

backend = qiskit.Aer.get_backend('qasm_simulator')
shots = 100
backend_result = qiskit.execute(
circs, backend,
shots=shots,
seed_simulator=SEED,
backend_options={'max_parallel_experiments': 0},
noise_model=noise_model,
optimization_level=0).result()
qobj = qiskit.assemble(
qiskit.transpile(circs, backend=backend, optimization_level=0),
backend=backend, shots=shots, seed_simulator=SEED,
noise_model=noise_model, max_parallel_experiments=0)
backend_result = backend.run(qobj).result()

return backend_result, xdata, qubits, t2_value

Expand Down Expand Up @@ -207,16 +203,13 @@ def t2star_circuit_execution() -> Tuple[qiskit.result.Result,
shots = 200

# Estimate T2* via an oscilliator function
circs_osc, xdata, omega = t2star_circuits(num_of_gates, gate_time,
qubits, 5)

backend_result = qiskit.execute(
circs_osc, backend,
shots=shots,
seed_simulator=SEED,
backend_options={'max_parallel_experiments': 0},
noise_model=noise_model,
optimization_level=0).result()
circs, xdata, omega = t2star_circuits(num_of_gates, gate_time, qubits, 5)

qobj = qiskit.assemble(
qiskit.transpile(circs, backend=backend, optimization_level=0),
backend=backend, shots=shots, seed_simulator=SEED,
noise_model=noise_model, max_parallel_experiments=0)
backend_result = backend.run(qobj).result()

return backend_result, xdata, qubits, t2_value, omega

Expand Down
18 changes: 9 additions & 9 deletions test/mitigation/test_mitigators.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

from ddt import ddt, unpack, data

from qiskit import execute, QuantumCircuit
from qiskit import QuantumCircuit, assemble, transpile
from qiskit.result import Result
from qiskit.providers.aer import QasmSimulator, noise
from qiskit.ignis.mitigation import (
Expand Down Expand Up @@ -65,14 +65,14 @@ def execute_circs(self, qc_list: List[QuantumCircuit],
noise_model=None) -> Result:
"""Run circuits with the readout noise defined in this class
"""
return execute(
qc_list,
backend=self.sim,
seed_simulator=self.seed_simulator,
shots=self.shots,
noise_model=None if noise_model is None else self.noise_model,
backend_options={'method': 'density_matrix'}
).result()
backend = self.sim
qobj = assemble(transpile(qc_list, backend=backend),
backend=backend, shots=self.shots,
seed_simulator=self.seed_simulator,
noise_model=None if noise_model is None else self.noise_model,
method='density_matrix')

return backend.run(qobj).result()


@ddt
Expand Down
11 changes: 6 additions & 5 deletions test/quantum_volume/test_qv.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ def qv_circuit_execution(qubit_lists: list, ntrials: int, shots: int):
basis_gates = ['u1', 'u2', 'u3', 'cx'] # use U,CX for now
exp_results = []
for trial in range(ntrials):
exp_results.append(
qiskit.execute(qv_circs[trial], basis_gates=basis_gates, backend=backend,
noise_model=noise_model, shots=shots,
seed_simulator=SEED,
backend_options={'max_parallel_experiments': 0}).result())
qobj = qiskit.assemble(qiskit.transpile(qv_circs[trial],
backend=backend,
basis_gates=basis_gates),
backend=backend, shots=shots, seed_simulator=SEED,
noise_model=noise_model, max_parallel_experiments=0)
exp_results.append(backend.run(qobj).result())

return ideal_results, exp_results

Expand Down

0 comments on commit 4bafe96

Please sign in to comment.