UnitarySimulatorPy¶
-
class
UnitarySimulatorPy
(configuration=None, provider=None, **fields)[source]¶ Bases:
qiskit.providers.backend.BackendV1
Python implementation of a unitary simulator.
Initialize a backend class
- Parameters
configuration (BackendConfiguration) – A backend configuration object for the backend object.
provider (qiskit.providers.Provider) – Optionally, the provider object that this Backend comes from.
fields – kwargs for the values to use to override the default options.
- Raises
AttributeError – if input field not a valid options
In addition to the public abstract methods, subclasses should also implement the following private methods:
-
classmethod
_default_options
()[source]¶ Return the default options
This method will return a
qiskit.providers.Options
subclass object that will be used for the default options. These should be the default parameters to use for the options of the backend.- Returns
- A options object with
default values set
- Return type
Methods
Return the backend configuration.
Return the backend name.
Return the backend properties.
Return the backend Provider.
Run qobj asynchronously.
Run an experiment (circuit) and return a single experiment result.
Set the options fields for the backend
Return the backend status.
Attributes
-
DEFAULT_CONFIGURATION
= {'backend_name': 'unitary_simulator', 'backend_version': '1.1.0', 'basis_gates': ['u1', 'u2', 'u3', 'rz', 'sx', 'x', 'cx', 'id', 'unitary'], 'conditional': False, 'coupling_map': None, 'description': 'A python simulator for unitary matrix corresponding to a circuit', 'gates': [{'name': 'u1', 'parameters': ['lambda'], 'qasm_def': 'gate u1(lambda) q { U(0,0,lambda) q; }'}, {'name': 'u2', 'parameters': ['phi', 'lambda'], 'qasm_def': 'gate u2(phi,lambda) q { U(pi/2,phi,lambda) q; }'}, {'name': 'u3', 'parameters': ['theta', 'phi', 'lambda'], 'qasm_def': 'gate u3(theta,phi,lambda) q { U(theta,phi,lambda) q; }'}, {'name': 'rz', 'parameters': ['phi'], 'qasm_def': 'gate rz(phi) q { U(0,0,phi) q; }'}, {'name': 'sx', 'parameters': [], 'qasm_def': 'gate sx(phi) q { U(pi/2,7*pi/2,pi/2) q; }'}, {'name': 'x', 'parameters': [], 'qasm_def': 'gate x q { U(pi,7*pi/2,pi/2) q; }'}, {'name': 'cx', 'parameters': [], 'qasm_def': 'gate cx c,t { CX c,t; }'}, {'name': 'id', 'parameters': [], 'qasm_def': 'gate id a { U(0,0,0) a; }'}, {'name': 'unitary', 'parameters': ['matrix'], 'qasm_def': 'unitary(matrix) q1, q2,...'}], 'local': True, 'max_shots': 65536, 'memory': False, 'n_qubits': 16, 'open_pulse': False, 'simulator': True, 'url': 'https://github.com/Qiskit/qiskit-terra'}¶
-
DEFAULT_OPTIONS
= {'chop_threshold': 1e-15, 'initial_unitary': None}¶
-
MAX_QUBITS_MEMORY
= 16¶
-
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
= 1¶