Skip to content

Commit

Permalink
Remove use of qiskit.test (#507)
Browse files Browse the repository at this point in the history
Closes #145. That issue also refers to
`docs/api/qiskit-ibm-runtime/runtime_service.md` but we can't fix that
as it's generated from the runtime repo (should be covered by
Qiskit/qiskit-ibm-runtime#1244).
  • Loading branch information
frankharkins authored Dec 11, 2023
1 parent c77eb47 commit 206ff0e
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions docs/start/setup-channel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,17 @@ You need access credentials to use cloud-based IBM Quantum systems.
1. Test your setup. Run a simple circuit using Sampler to ensure that your environment is set up properly:

```python
from qiskit.test.reference_circuits import ReferenceCircuits
from qiskit_ibm_runtime import QiskitRuntimeService, Sampler
from qiskit import QuantumCircuit
from qiskit_ibm_runtime import QiskitRuntimeService, Sampler

# Create empty circuit
example_circuit = QuantumCircuit(2)
example_circuit.measure_all()

# You'll need to specify the credentials when initializing QiskitRuntimeService, if they were not previously saved.
service = QiskitRuntimeService()
backend = service.backend("ibmq_qasm_simulator")
job = Sampler(backend).run(ReferenceCircuits.bell())
job = Sampler(backend).run(example_circuit)
print(f"job id: {job.job_id()}")
result = job.result()
print(result)
Expand Down Expand Up @@ -164,13 +168,17 @@ You need access credentials to use cloud-based IBM Quantum systems.
1. Test your setup. Run a simple circuit using Sampler to ensure that your environment is set up properly:

```python
from qiskit.test.reference_circuits import ReferenceCircuits
from qiskit_ibm_runtime import QiskitRuntimeService, Sampler
from qiskit import QuantumCircuit
from qiskit_ibm_runtime import QiskitRuntimeService, Sampler

# Create empty circuit
example_circuit = QuantumCircuit(2)
example_circuit.measure_all()

# You'll need to specify the credentials when initializing QiskitRuntimeService, if they were not previously saved.
service = QiskitRuntimeService()
backend = service.backend("ibmq_qasm_simulator")
job = Sampler(backend).run(ReferenceCircuits.bell())
job = Sampler(backend).run(example_circuit)
print(f"job id: {job.job_id()}")
result = job.result()
print(result)
Expand Down

0 comments on commit 206ff0e

Please sign in to comment.