Qiskit / documentation

The documentation content home for https://docs.quantum.ibm.com.
https://docs.quantum.ibm.com
Apache License 2.0
38 stars 75 forks source link

Adding a comment about transpilation on simple example #2164

Open acastellane opened 4 days ago

acastellane commented 4 days ago

URL to the relevant documentation

in https://docs.quantum.ibm.com/guides/setup-channel#set-up-to-use-ibm-quantum-platform at Step 5. Test your setup. Run a simple circuit using Sampler to ensure that your environment is set up properly:

Select all that apply

Describe the fix.

Hi, In order to be consistent and didactic with the transpilation step, I suggest we add a comment in the provided examples.

# Create empty circuit
example_circuit = QuantumCircuit(2)
example_circuit.measure_all()
# ==>>> transpilation step is not required here as the simple example being empty is already ISA compatible. The goal is to generate the simplest code to check backend access.
# You'll need to specify the credentials when initializing QiskitRuntimeService, if they were not previously saved.
service = QiskitRuntimeService()
backend = service.least_busy(operational=True, simulator=False)
javabster commented 2 days ago

I think actually the better approach here is to just add an arbitrary transpilation step, that would more accurately represent a real (although trivial) example