Package: quantastica-qiskit-toaster
Qubit Toaster backend for QiskitAllows running Qiskit code onQubit Toaster- a high performance quantum circuit simulator.Installpip install quantastica-qiskit-toasterUsageYou need to install and runQubit Toasterfirst. By default, this library expects Toaster running in server mode.Now import ToasterBackend into your Qiskit code:from quantastica.qiskit_toaster import ToasterBackendReplaceAer.get_backendwithToasterBackend.get_backend.ExamplefromqiskitimportQuantumRegister,ClassicalRegisterfromqiskitimportQuantumCircuit,execute# Instead:#from qiskit import Aer# Do:fromquantastica.qiskit_toasterimportToasterBackendqc=QuantumCircuit()q=QuantumRegister(2,"q")c=ClassicalRegister(2,"c")qc.add_register(q)qc.add_register(c)qc.h(q[0])qc.cx(q[0],q[1])qc.measure(q[0],c[0])qc.measure(q[1],c[1])# Instead:#backend = Aer.get_backend("qasm_simulator")# Use:backend=ToasterBackend.get_backend("qasm_simulator")# OR (to use statevector_simulator backend):# backend = ToasterBackend.get_backend("statevector_simulator")# OR (to specify custom toaster_host and toaster_port params# default values are 127.0.0.1 and 8001 respectively):# backend = ToasterBackend.get_backend(#            "statevector_simulator",#            toaster_host="192.168.1.2",#            toaster_port=8888,#        )# OR (to use it directly via CLI instead of HTTP API)# backend = ToasterBackend.get_backend(#            "qasm_simulator",#            use_cli=True)job=execute(qc,backend=backend)# To speed things up a little bit qiskit's optimization can be disabled# by setting optimization_level to 0 like following:#   job = execute(qc, backend=backend, optimization_level=0)## To pass different optimization level to qubit-toaster use backend_options:#   options = { "toaster_optimization": 3 }#   job = execute(qc, backend=backend, backend_options=options)job_result=job.result()print(job_result.get_counts(qc))DetailsSyntaxToasterBackend.get_backend( backend_name = None,
                            toaster_host=None, 
                            toaster_port=None, 
                            use_cli=False)Argumentsbackend_namecan be:qasm_simulatoronly counts will be returned (default)statevector_simulatorboth counts and state vector will be returnedIf backend name is not provided then it will act asqasm_simulatortoaster_host- ip address of machine runningqubit-toastersimulator (default: 127.0.0.1)toaster_port- port thatqubit-toasteris listening on (default: 8001)use_cli- if this param is set toTruethequbit-toasterwill be used directly (by invoking it as executable) instead via HTTP API. For this to work thequbit-toasterbinary must be available somewhere in system PATHToaster's backend_optionstoaster_optimization- integer from 0 to 70 - automatic optimization1 - optimization is off2..7 - optimization is on. 7 is highest optimization level.Running unit testsFirst startqubit-toasterin HTTP API mode:qubit-toaster -SRunning standard set of tests (excluding the slow ones):python -m unittest -vRunning all tests (including the slow ones):SLOW=1 python -m unittest -vSpecifying different toaster host/port:TOASTER_HOST=192.168.1.2 TOASTER_PORT=8001  python -m unittest -v -fRunning tests by using CLI interface instead of HTTP:USE_CLI=1 python -m unittest -v -fFind more goodies athttps://quantastica.comThat's it. Enjoy! :)