qat.purr.integrations.qiskit module
- class QatBackend(hardware=None, comp_config=None, **fields)
Bases:
BasicSimulator
Basic qiskit backend built to run QASM on our own target machines.
- TODO: Expand this to become a proper back-end, as I don’t believe we need to inherit
off the QASM simulator as it stands.
- Args:
- provider: An optional backwards reference to the
Provider
object that the backend is from.
target: An optional target to configure the simulator. fields: kwargs for the values to use to override the default
options.
- Raises:
- AttributeError: If a field is specified that’s outside the backend’s
options.
- run(qobj, **backend_options)
Run on the backend.
- Args:
run_input: payload of the experiment backend_options: backend options
- Returns:
BasicProviderJob: derived from BaseJob
- Additional Information:
- backend_options: Is a dict of options for the backend. It may contain
“initial_statevector”: vector_like
The “initial_statevector” option specifies a custom initial 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
run_input
parameter.Example:
backend_options = { "initial_statevector": np.array([1, 0, 0, 1j]) / math.sqrt(2), }
- run_qasm(qasm_str)
Runs the passed-in QASM string against the QASM state simulator.
- run_qasm_circuit(circuit)
- run_qasm_from_file(qasm_file)
Runs the passed-in QASM file against the QASM state simulator.