FakeQasmSimulator
class FakeQasmSimulator
Bases: qiskit.providers.fake_provider.fake_backend.FakeBackend
A fake simulator backend.
FakeBackend initializer.
Parameters
- configuration (BackendConfiguration) – backend configuration
- time_alive (int) – time to wait before returning result
Methods
configuration
FakeQasmSimulator.configuration()
Return the backend configuration.
Returns
the configuration for the backend.
Return type
name
FakeQasmSimulator.name()
Return the backend name.
Returns
the name of the backend.
Return type
str
properties
FakeQasmSimulator.properties()
Return backend properties
provider
FakeQasmSimulator.provider()
Return the backend Provider.
Returns
the Provider responsible for the backend.
Return type
run
FakeQasmSimulator.run(run_input, **kwargs)
Main job in simulator
set_options
FakeQasmSimulator.set_options(**fields)
Set the options fields for the backend
This method is used to update the options of a backend. If you need to change any of the options prior to running just pass in the kwarg with the new value for the options.
Parameters
fields – The fields to update the options
Raises
AttributeError – If the field passed in is not part of the options
status
FakeQasmSimulator.status()
Return the backend status.
Returns
the status of the backend.
Return type
Attributes
options
Return the options for the backend
The options of a backend are the dynamic parameters defining how the backend is used. These are used to control the run()
method.
version
Default value: 1