Skip to content

Commit

Permalink
Pass seed_simulator through to sampler and fix shots in tphi test
Browse files Browse the repository at this point in the history
  • Loading branch information
wshanks committed Oct 14, 2024
1 parent 8bec802 commit b568115
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions qiskit_experiments/framework/base_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,8 @@ def _run_jobs(
raise QiskitError("Only meas level 1 + 2 supported by sampler")
if "noise_model" in run_options:
sampler.options.simulator.noise_model = run_options["noise_model"]
if "seed_simulator" in run_options:
sampler.options.simulator.seed_simulator = run_options["seed_simulator"]

if run_options.get("shots") is not None:
sampler.options.default_shots = run_options.get("shots")
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 @@ -374,7 +374,7 @@ def test_mitigated_full_qst(self, qubits):
target = qi.random_statevector(2 ** len(qubits), seed=seed)
exp = MitigatedStateTomography(target, physical_qubits=qubits, backend=backend)
exp.analysis.set_options(unmitigated_fit=True)
expdata = exp.run(analysis=None)
expdata = exp.run(analysis=None, shots=shots)
self.assertExperimentDone(expdata)

for fitter in FITTERS:
Expand Down

0 comments on commit b568115

Please sign in to comment.