Run¶
-
load_IBMQ_account
()[source]¶ Loads the IMBQ account. If it fails a first time, the IBMQ token will be prompted and the account loading will be attempted a second time. If it fails a second time. Exits by letting the \(Error\) be raised.
- Raises:
- IBMQAccountCredentialsInvalidFormat: If the default provider stored on
- disk could not be parsed.
- IBMQAccountCredentialsNotFound: If no IBM Quantum Experience credentials
- can be found.
- IBMQAccountMultipleCredentialsFound: If multiple IBM Quantum Experience
- credentials are found.
- IBMQAccountCredentialsInvalidUrl: If invalid IBM Quantum Experience
- credentials are found.
- IBMQProviderError: If the default provider stored on disk could not
- be found.
-
runCircuit
(qc, simulation=True, return_count=True, monitor=False, local=True, shots=1024)[source]¶ Runs the QuantumCircuit \(qc\) in IBM Quantum Experience.
Parameters: - qc (QuantumCircuit) – Quantum circuit to be executed
- simulation (bool) – If \(True\), the experience runs on a simulator, which substantially faster than on a quantum processor (due to the demand on those). Otherwise, runs on one of the quantum processors.
- return_count (bool) – If the circuit contains measures, and return_count is set to \(True\), then the count of the result will be returned, otherwise, the result will be directly returned.
- monitor (bool) – If \(True\), a \(job_monitor\) will be displayed after the job is submitted.
TODO : add local and shots docs
Returns: dict[str:int] or Result – Depending on return_count, \(runCircuit\) either returns the result (of type Result) of the run or the count of this result, which would be the equivalent of calling \(result.get_counts()\).