Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ElePT committed Jan 30, 2025
1 parent e14ae50 commit 0bc13b7
Showing 1 changed file with 33 additions and 23 deletions.
56 changes: 33 additions & 23 deletions qiskit/providers/basic_provider/basic_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ def __init__(
self._number_of_cmembits = 0
self._number_of_qubits = 0
self._local_rng = None
self._sample_measure = False
self._shots = self.options.get("shots")
self._memory = self.options.get("memory")
self._initial_statevector = self.options.get("initial_statevector")
self._seed_simulator = self.options.get("seed_simulator")

@property
def max_circuits(self) -> None:
Expand Down Expand Up @@ -421,29 +426,34 @@ def run(
) -> BasicProviderJob:
"""Run on the backend.
Args:
run_input (QuantumCircuit or list): the QuantumCircuit (or list
of QuantumCircuit objects) to run
run_options (kwargs): additional runtime backend options
Returns:
BasicProviderJob: derived from BaseJob
Additional Information:
* kwarg options specified in ``run_options`` will temporarily override
any set options of the same name for the current run. These may include:
* "initial_statevector": vector_like. The "initial_statevector" option specifies a custom
initial statevector for the simulator to be used instead of the all
zero state. This size of this vector must be correct for the number
of qubits in the ``run_input`` parameter.
* "seed_simulator": int. This is the internal seed for sample generation.
* "shots": int. number of shots used in the simulation.
* "memory": bool. If True, the result will contained the results of every individual shot
simulation.
Example::
D
backend.run(circuit, initial_statevector = np.array([1, 0, 0, 1j]) / math.sqrt(2))
Args:
run_input (QuantumCircuit or list): the QuantumCircuit (or list
of QuantumCircuit objects) to run
run_options (kwargs): additional runtime backend options
Returns:
BasicProviderJob: derived from BaseJob
Additional Information:
* kwarg options specified in ``run_options`` will temporarily override
any set options of the same name for the current run. These may include:
* "initial_statevector": vector_like. The "initial_statevector"
option specifies a custom initial statevector for the simulator
to be used instead of the all zero state. The size of this
vector must be correct for the number of qubits in the
``run_input`` argument.
* "seed_simulator": int. This is the internal seed for sample
generation.
* "shots": int. number of shots used in the simulation.
* "memory": bool. If True, the result will contained the results
of every individual shotsimulation.
Example::
backend.run(
circuit,
initial_statevector = np.array([1, 0, 0, 1j]) / math.sqrt(2)
)
"""
out_options = {}
for key, value in run_options.items():
Expand Down

0 comments on commit 0bc13b7

Please sign in to comment.