Skip to content

Commit

Permalink
Fix accidental deletion of GitHub source links for methods (Qiskit#940)
Browse files Browse the repository at this point in the history
Part of Qiskit#517.

Turns out that we would accidentally delete all the GitHub links for
methods because we were using `closest().remove()` rather than
`.closest().first().remove()`. That means that we'd only have the link
for the class definition and not individual methods, which defeats the
point of precise source code links from
Qiskit#517.

## Historical API docs

However, the behavior to not show methods is actually quite sensible for
our API docs, where we were using `sphinx.ext.viewcode` rather than
`sphinx.ext.linkcode`. That meant that we could only link to the overall
file, rather than specific line numbers. So, it's not very useful to
keep linking to the overall file for every method since they will each
have the same value and the class definition already has the value. So,
we check if the link is for a method and proactively remove it if so.

This change to proactively remove method links changes some historical
API doc versions, but not others. Why? It only removes the links if we
were doing method inlining, where the method had a dedicated HTML page
originally. That's because the `.remove()` line wouldn't impat the
distinct HTML pages.
  • Loading branch information
Eric-Arellano authored Feb 29, 2024
1 parent 6b64016 commit e497785
Show file tree
Hide file tree
Showing 7,678 changed files with 31,075 additions and 31,045 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
28 changes: 14 additions & 14 deletions docs/api/qiskit-ibm-provider/0.7/qiskit_ibm_provider.IBMBackend.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ A [`qiskit.transpiler.Target`](/api/qiskit/qiskit.transpiler.Target "(in Qiskit

<span id="qiskit_ibm_provider.IBMBackend.acquire_channel" />

`IBMBackend.acquire_channel(qubit)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_backend.py "view source code")
`IBMBackend.acquire_channel(qubit)`

Return the acquisition channel for the given qubit.

Expand All @@ -390,7 +390,7 @@ AcquireChannel

<span id="qiskit_ibm_provider.IBMBackend.cancel_session" />

`IBMBackend.cancel_session()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_backend.py "view source code")
`IBMBackend.cancel_session()`

Cancel session. All pending jobs will be cancelled.

Expand All @@ -404,7 +404,7 @@ Cancel session. All pending jobs will be cancelled.

<span id="qiskit_ibm_provider.IBMBackend.close_session" />

`IBMBackend.close_session()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_backend.py "view source code")
`IBMBackend.close_session()`

Close the session so new jobs will no longer be accepted, but existing queued or running jobs will run to completion. The session will be terminated once there are no more pending jobs.

Expand All @@ -418,7 +418,7 @@ Close the session so new jobs will no longer be accepted, but existing queued or

<span id="qiskit_ibm_provider.IBMBackend.configuration" />

`IBMBackend.configuration()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_backend.py "view source code")
`IBMBackend.configuration()`

Return the backend configuration.

Expand All @@ -440,7 +440,7 @@ The configuration for the backend.

<span id="qiskit_ibm_provider.IBMBackend.control_channel" />

`IBMBackend.control_channel(qubits)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_backend.py "view source code")
`IBMBackend.control_channel(qubits)`

Return the secondary drive channel for the given qubit.

Expand All @@ -464,7 +464,7 @@ List\[ControlChannel]

<span id="qiskit_ibm_provider.IBMBackend.defaults" />

`IBMBackend.defaults(refresh=False)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_backend.py "view source code")
`IBMBackend.defaults(refresh=False)`

Return the pulse defaults for the backend.

Expand All @@ -488,7 +488,7 @@ The backend pulse defaults or `None` if the backend does not support pulse.

<span id="qiskit_ibm_provider.IBMBackend.drive_channel" />

`IBMBackend.drive_channel(qubit)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_backend.py "view source code")
`IBMBackend.drive_channel(qubit)`

Return the drive channel for the given qubit.

Expand All @@ -506,7 +506,7 @@ DriveChannel

<span id="qiskit_ibm_provider.IBMBackend.get_translation_stage_plugin" />

`classmethod IBMBackend.get_translation_stage_plugin()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_backend.py "view source code")
`classmethod IBMBackend.get_translation_stage_plugin()`

Return the default translation stage plugin name for IBM backends.

Expand All @@ -520,7 +520,7 @@ Return the default translation stage plugin name for IBM backends.

<span id="qiskit_ibm_provider.IBMBackend.measure_channel" />

`IBMBackend.measure_channel(qubit)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_backend.py "view source code")
`IBMBackend.measure_channel(qubit)`

Return the measure stimulus channel for the given qubit.

Expand All @@ -538,7 +538,7 @@ MeasureChannel

<span id="qiskit_ibm_provider.IBMBackend.open_session" />

`IBMBackend.open_session(max_time=None)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_backend.py "view source code")
`IBMBackend.open_session(max_time=None)`

Open session

Expand All @@ -552,7 +552,7 @@ Open session

<span id="qiskit_ibm_provider.IBMBackend.properties" />

`IBMBackend.properties(refresh=False, datetime=None)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_backend.py "view source code")
`IBMBackend.properties(refresh=False, datetime=None)`

Return the backend properties, subject to optional filtering.

Expand Down Expand Up @@ -611,7 +611,7 @@ The `QubitProperties` object for the specified qubit. If a list of qubits is pro

<span id="qiskit_ibm_provider.IBMBackend.run" />

`IBMBackend.run(circuits, dynamic=None, job_tags=None, init_circuit=None, init_num_resets=None, header=None, shots=None, memory=None, meas_level=None, meas_return=None, rep_delay=None, init_qubits=None, use_measure_esp=None, noise_model=None, seed_simulator=None, **run_config)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_backend.py "view source code")
`IBMBackend.run(circuits, dynamic=None, job_tags=None, init_circuit=None, init_num_resets=None, header=None, shots=None, memory=None, meas_level=None, meas_return=None, rep_delay=None, init_qubits=None, use_measure_esp=None, noise_model=None, seed_simulator=None, **run_config)`

Run on the backend. If a keyword specified here is also present in the `options` attribute/object, the value specified here will be used for this run.

Expand Down Expand Up @@ -708,7 +708,7 @@ This method is used to update the options of a backend. If you need to change an

<span id="qiskit_ibm_provider.IBMBackend.status" />

`IBMBackend.status()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_backend.py "view source code")
`IBMBackend.status()`

Return the backend status.

Expand All @@ -734,7 +734,7 @@ The status of the backend.

<span id="qiskit_ibm_provider.IBMBackend.target_history" />

`IBMBackend.target_history(datetime=None)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_backend.py "view source code")
`IBMBackend.target_history(datetime=None)`

A [`qiskit.transpiler.Target`](/api/qiskit/qiskit.transpiler.Target "(in Qiskit v0.45)") object for the backend. :rtype: [`Target`](/api/qiskit/qiskit.transpiler.Target "(in Qiskit v0.45)") :returns: Target with properties found on datetime

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ IBMBackendService constructor.

<span id="qiskit_ibm_provider.IBMBackendService.backends" />

`IBMBackendService.backends(name=None, filters=None, min_num_qubits=None, instance=None, dynamic_circuits=None, **kwargs)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_backend_service.py "view source code")
`IBMBackendService.backends(name=None, filters=None, min_num_qubits=None, instance=None, dynamic_circuits=None, **kwargs)`

Return all backends accessible via this account, subject to optional filtering.

Expand Down Expand Up @@ -107,7 +107,7 @@ The list of available backends that match the filter.

<span id="qiskit_ibm_provider.IBMBackendService.jobs" />

`IBMBackendService.jobs(limit=10, skip=0, backend_name=None, status=None, start_datetime=None, end_datetime=None, job_tags=None, descending=True, instance=None, legacy=False)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_backend_service.py "view source code")
`IBMBackendService.jobs(limit=10, skip=0, backend_name=None, status=None, start_datetime=None, end_datetime=None, job_tags=None, descending=True, instance=None, legacy=False)`

Return a list of jobs, subject to optional filtering.

Expand Down Expand Up @@ -149,7 +149,7 @@ A list of `IBMJob` instances.

<span id="qiskit_ibm_provider.IBMBackendService.retrieve_job" />

`IBMBackendService.retrieve_job(job_id)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_backend_service.py "view source code")
`IBMBackendService.retrieve_job(job_id)`

Return a single job.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ The backend service instance.

<span id="qiskit_ibm_provider.IBMProvider.active_account" />

`IBMProvider.active_account()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_provider.py "view source code")
`IBMProvider.active_account()`

Return the IBM Quantum account currently in use for the session.

Expand All @@ -163,7 +163,7 @@ A dictionary with information about the account currently in the session.

<span id="qiskit_ibm_provider.IBMProvider.backends" />

`IBMProvider.backends(name=None, filters=None, min_num_qubits=None, instance=None, **kwargs)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_provider.py "view source code")
`IBMProvider.backends(name=None, filters=None, min_num_qubits=None, instance=None, **kwargs)`

Return all backends accessible via this account, subject to optional filtering.

Expand Down Expand Up @@ -213,7 +213,7 @@ The list of available backends that match the filter.

<span id="qiskit_ibm_provider.IBMProvider.delete_account" />

`static IBMProvider.delete_account(name=None)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_provider.py "view source code")
`static IBMProvider.delete_account(name=None)`

Delete a saved account from disk.

Expand All @@ -235,7 +235,7 @@ True if the account was deleted. False if no account was found.

<span id="qiskit_ibm_provider.IBMProvider.get_backend" />

`IBMProvider.get_backend(name=None, instance=None, **kwargs)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_provider.py "view source code")
`IBMProvider.get_backend(name=None, instance=None, **kwargs)`

Return a single backend matching the specified filtering.

Expand Down Expand Up @@ -264,7 +264,7 @@ Backend

<span id="qiskit_ibm_provider.IBMProvider.instances" />

`IBMProvider.instances()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_provider.py "view source code")
`IBMProvider.instances()`

Return the IBM Quantum instances list currently in use for the session.

Expand All @@ -282,7 +282,7 @@ A list with instances currently in the session.

<span id="qiskit_ibm_provider.IBMProvider.jobs" />

`IBMProvider.jobs(limit=10, skip=0, backend_name=None, status=None, start_datetime=None, end_datetime=None, job_tags=None, descending=True, instance=None, legacy=False)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_provider.py "view source code")
`IBMProvider.jobs(limit=10, skip=0, backend_name=None, status=None, start_datetime=None, end_datetime=None, job_tags=None, descending=True, instance=None, legacy=False)`

Return a list of jobs, subject to optional filtering.

Expand Down Expand Up @@ -317,7 +317,7 @@ A list of `IBMJob` instances.

<span id="qiskit_ibm_provider.IBMProvider.retrieve_job" />

`IBMProvider.retrieve_job(job_id)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_provider.py "view source code")
`IBMProvider.retrieve_job(job_id)`

Return a single job.

Expand All @@ -339,7 +339,7 @@ The job with the given id.

<span id="qiskit_ibm_provider.IBMProvider.save_account" />

`static IBMProvider.save_account(token=None, url=None, instance=None, name=None, proxies=None, verify=None, overwrite=False)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_provider.py "view source code")
`static IBMProvider.save_account(token=None, url=None, instance=None, name=None, proxies=None, verify=None, overwrite=False)`

Save the account to disk for future use.

Expand All @@ -363,7 +363,7 @@ Save the account to disk for future use.

<span id="qiskit_ibm_provider.IBMProvider.saved_accounts" />

`static IBMProvider.saved_accounts(default=None, name=None)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/ibm_provider.py "view source code")
`static IBMProvider.saved_accounts(default=None, name=None)`

List the accounts saved on disk.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Session ID. None until a job runs in the session.

<span id="qiskit_ibm_provider.Session.cancel" />

`Session.cancel()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/session.py "view source code")
`Session.cancel()`

Set the session.\_active status to False

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Return the backend where this job was executed.

<span id="qiskit_ibm_provider.job.IBMCircuitJob.backend_options" />

`IBMCircuitJob.backend_options()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/job/ibm_circuit_job.py "view source code")
`IBMCircuitJob.backend_options()`

Return the backend configuration options used for this job.

Expand All @@ -159,7 +159,7 @@ Backend options used for this job. An empty dictionary is returned if the option

<span id="qiskit_ibm_provider.job.IBMCircuitJob.cancel" />

`IBMCircuitJob.cancel()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/job/ibm_circuit_job.py "view source code")
`IBMCircuitJob.cancel()`

Attempt to cancel the job.

Expand Down Expand Up @@ -200,7 +200,7 @@ Return whether the job has been cancelled.

<span id="qiskit_ibm_provider.job.IBMCircuitJob.circuits" />

`IBMCircuitJob.circuits()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/job/ibm_circuit_job.py "view source code")
`IBMCircuitJob.circuits()`

Return the circuits for this job.

Expand All @@ -218,7 +218,7 @@ The circuits or for this job. An empty list is returned if the circuits cannot b

<span id="qiskit_ibm_provider.job.IBMCircuitJob.creation_date" />

`IBMCircuitJob.creation_date()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/job/ibm_circuit_job.py "view source code")
`IBMCircuitJob.creation_date()`

Return job creation date, in local time.

Expand Down Expand Up @@ -250,7 +250,7 @@ Return whether the job has successfully run.

<span id="qiskit_ibm_provider.job.IBMCircuitJob.error_message" />

`IBMCircuitJob.error_message()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/job/ibm_circuit_job.py "view source code")
`IBMCircuitJob.error_message()`

Provide details about the reason of failure.

Expand All @@ -268,7 +268,7 @@ An error report if the job failed or `None` otherwise.

<span id="qiskit_ibm_provider.job.IBMCircuitJob.header" />

`IBMCircuitJob.header()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/job/ibm_circuit_job.py "view source code")
`IBMCircuitJob.header()`

Return the user header specified for this job.

Expand Down Expand Up @@ -300,7 +300,7 @@ Return whether the job is in a final job state such as `DONE` or `ERROR`.

<span id="qiskit_ibm_provider.job.IBMCircuitJob.job_id" />

`IBMCircuitJob.job_id()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/job/ibm_circuit_job.py "view source code")
`IBMCircuitJob.job_id()`

Return the job ID assigned by the server.

Expand Down Expand Up @@ -358,7 +358,7 @@ The backend properties used for this job, at the time the job was run, or `None`

<span id="qiskit_ibm_provider.job.IBMCircuitJob.queue_info" />

`IBMCircuitJob.queue_info()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/job/ibm_circuit_job.py "view source code")
`IBMCircuitJob.queue_info()`

Return queue information for this job.

Expand All @@ -382,7 +382,7 @@ A [`QueueInfo`](qiskit_ibm_provider.job.QueueInfo "qiskit_ibm_provider.job.Queue

<span id="qiskit_ibm_provider.job.IBMCircuitJob.queue_position" />

`IBMCircuitJob.queue_position(refresh=False)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/job/ibm_circuit_job.py "view source code")
`IBMCircuitJob.queue_position(refresh=False)`

Return the position of the job in the server queue.

Expand All @@ -408,7 +408,7 @@ Position in the queue or `None` if position is unknown or not applicable.

<span id="qiskit_ibm_provider.job.IBMCircuitJob.refresh" />

`IBMCircuitJob.refresh()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/job/ibm_circuit_job.py "view source code")
`IBMCircuitJob.refresh()`

Obtain the latest job information from the server.

Expand All @@ -428,7 +428,7 @@ This method may add additional attributes to this job instance, if new informati

<span id="qiskit_ibm_provider.job.IBMCircuitJob.result" />

`IBMCircuitJob.result(timeout=None, refresh=False)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/job/ibm_circuit_job.py "view source code")
`IBMCircuitJob.result(timeout=None, refresh=False)`

Return the result of the job.

Expand Down Expand Up @@ -510,7 +510,7 @@ The scheduling mode the job is in or `None` if the information is not available.

<span id="qiskit_ibm_provider.job.IBMCircuitJob.status" />

`IBMCircuitJob.status()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/job/ibm_circuit_job.py "view source code")
`IBMCircuitJob.status()`

Query the server for the latest job status.

Expand Down Expand Up @@ -540,7 +540,7 @@ The status of the job.

<span id="qiskit_ibm_provider.job.IBMCircuitJob.submit" />

`IBMCircuitJob.submit()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/job/ibm_circuit_job.py "view source code")
`IBMCircuitJob.submit()`

Unsupported method.

Expand Down Expand Up @@ -580,7 +580,7 @@ Tags assigned to this job.

<span id="qiskit_ibm_provider.job.IBMCircuitJob.time_per_step" />

`IBMCircuitJob.time_per_step()` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/job/ibm_circuit_job.py "view source code")
`IBMCircuitJob.time_per_step()`

Return the date and time information on each step of the job processing.

Expand Down Expand Up @@ -628,7 +628,7 @@ The new name associated with this job.

<span id="qiskit_ibm_provider.job.IBMCircuitJob.update_tags" />

`IBMCircuitJob.update_tags(new_tags)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/job/ibm_circuit_job.py "view source code")
`IBMCircuitJob.update_tags(new_tags)`

Update the tags associated with this job.

Expand All @@ -655,7 +655,7 @@ The new tags associated with this job.

<span id="qiskit_ibm_provider.job.IBMCircuitJob.wait_for_final_state" />

`IBMCircuitJob.wait_for_final_state(timeout=None, wait=3)` [GitHub](https://github.com/qiskit/qiskit-ibm-provider/tree/stable/0.7/qiskit_ibm_provider/job/ibm_circuit_job.py "view source code")
`IBMCircuitJob.wait_for_final_state(timeout=None, wait=3)`

#### Use the websocket server to wait for the final the state of a job. The server

Expand Down
Loading

0 comments on commit e497785

Please sign in to comment.