Skip to content

Commit

Permalink
Remove signature for the Attribute component (Qiskit#1291)
Browse files Browse the repository at this point in the history
This PR removes the signature prop from the Attribute component and
instead, sets `attributeTypeHint` and `attributeValue`. This change
simplifies the script that was using different props for attributes
embedded in the class page and the rest.

As a side effect, this PR also fixes an issue with some default values
not showing correctly. These values were treated as signatures and
wrongly converted into HTML by a unified plugin.

Closes Qiskit#1217 Qiskit#1252
  • Loading branch information
arnaucasau authored May 3, 2024
1 parent 0dfa3b8 commit 22c71a4
Show file tree
Hide file tree
Showing 218 changed files with 1,085 additions and 1,115 deletions.
24 changes: 12 additions & 12 deletions docs/api/qiskit-ibm-provider/0.7/qiskit_ibm_provider.IBMBackend.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ python_api_name: qiskit_ibm_provider.IBMBackend

### dt

<Attribute id="qiskit_ibm_provider.IBMBackend.dt" signature="float | None">
<Attribute id="qiskit_ibm_provider.IBMBackend.dt" attributeTypeHint="float | None">
Return the system time resolution of input signals

This is required to be implemented if the backend supports Pulse scheduling.
Expand All @@ -193,15 +193,15 @@ python_api_name: qiskit_ibm_provider.IBMBackend

### dtm

<Attribute id="qiskit_ibm_provider.IBMBackend.dtm" signature="float">
<Attribute id="qiskit_ibm_provider.IBMBackend.dtm" attributeTypeHint="float">
Return the system time resolution of output signals :returns: The output signal timestep in seconds. :rtype: dtm
</Attribute>

<span id="ibmbackend-id-warning-issued" />

### id\_warning\_issued

<Attribute id="qiskit_ibm_provider.IBMBackend.id_warning_issued" signature="= False" />
<Attribute id="qiskit_ibm_provider.IBMBackend.id_warning_issued" attributeValue="False" />

<span id="ibmbackend-instruction-durations" />

Expand All @@ -223,7 +223,7 @@ python_api_name: qiskit_ibm_provider.IBMBackend

### instructions

<Attribute id="qiskit_ibm_provider.IBMBackend.instructions" signature="List[Tuple[Instruction, Tuple[int]]]">
<Attribute id="qiskit_ibm_provider.IBMBackend.instructions" attributeTypeHint="List[Tuple[Instruction, Tuple[int]]]">
A list of Instruction tuples on the backend of the form `(instruction, (qubits)`

**Return type**
Expand All @@ -235,7 +235,7 @@ python_api_name: qiskit_ibm_provider.IBMBackend

### max\_circuits

<Attribute id="qiskit_ibm_provider.IBMBackend.max_circuits" signature="int">
<Attribute id="qiskit_ibm_provider.IBMBackend.max_circuits" attributeTypeHint="int">
The maximum number of circuits The maximum number of circuits that can be run in a single job. If there is no limit this will return None.

**Return type**
Expand All @@ -247,7 +247,7 @@ python_api_name: qiskit_ibm_provider.IBMBackend

### meas\_map

<Attribute id="qiskit_ibm_provider.IBMBackend.meas_map" signature="List[List[int]]">
<Attribute id="qiskit_ibm_provider.IBMBackend.meas_map" attributeTypeHint="List[List[int]]">
Return the grouping of measurements which are multiplexed This is required to be implemented if the backend supports Pulse scheduling. :returns: The grouping of measurements which are multiplexed :rtype: meas\_map
</Attribute>

Expand All @@ -263,7 +263,7 @@ python_api_name: qiskit_ibm_provider.IBMBackend

### num\_qubits

<Attribute id="qiskit_ibm_provider.IBMBackend.num_qubits" signature="int">
<Attribute id="qiskit_ibm_provider.IBMBackend.num_qubits" attributeTypeHint="int">
Return the number of qubits the backend has.

**Return type**
Expand All @@ -283,7 +283,7 @@ python_api_name: qiskit_ibm_provider.IBMBackend

### operation\_names

<Attribute id="qiskit_ibm_provider.IBMBackend.operation_names" signature="List[str]">
<Attribute id="qiskit_ibm_provider.IBMBackend.operation_names" attributeTypeHint="List[str]">
A list of instruction names that the backend supports.

**Return type**
Expand All @@ -295,7 +295,7 @@ python_api_name: qiskit_ibm_provider.IBMBackend

### operations

<Attribute id="qiskit_ibm_provider.IBMBackend.operations" signature="List[Instruction]">
<Attribute id="qiskit_ibm_provider.IBMBackend.operations" attributeTypeHint="List[Instruction]">
A list of [`Instruction`](/api/qiskit/qiskit.circuit.Instruction "(in Qiskit v0.45)") instances that the backend supports.

**Return type**
Expand Down Expand Up @@ -333,7 +333,7 @@ python_api_name: qiskit_ibm_provider.IBMBackend

### session

<Attribute id="qiskit_ibm_provider.IBMBackend.session" signature="Session">
<Attribute id="qiskit_ibm_provider.IBMBackend.session" attributeTypeHint="Session">
Return session

**Return type**
Expand All @@ -345,15 +345,15 @@ python_api_name: qiskit_ibm_provider.IBMBackend

### target

<Attribute id="qiskit_ibm_provider.IBMBackend.target" signature="Target">
<Attribute id="qiskit_ibm_provider.IBMBackend.target" attributeTypeHint="Target">
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
</Attribute>

<span id="ibmbackend-version" />

### version

<Attribute id="qiskit_ibm_provider.IBMBackend.version" signature="= 2" />
<Attribute id="qiskit_ibm_provider.IBMBackend.version" attributeValue="2" />

## Methods

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ python_api_name: qiskit_ibm_provider.IBMProvider

### backend

<Attribute id="qiskit_ibm_provider.IBMProvider.backend" signature="IBMBackendService">
<Attribute id="qiskit_ibm_provider.IBMProvider.backend" attributeTypeHint="IBMBackendService">
Return the backend service.

**Return type**
Expand All @@ -128,7 +128,7 @@ python_api_name: qiskit_ibm_provider.IBMProvider

### version

<Attribute id="qiskit_ibm_provider.IBMProvider.version" signature="= 1" />
<Attribute id="qiskit_ibm_provider.IBMProvider.version" attributeValue="1" />

## Methods

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ python_api_name: qiskit_ibm_provider.Session

### active

<Attribute id="qiskit_ibm_provider.Session.active" signature="bool">
<Attribute id="qiskit_ibm_provider.Session.active" attributeTypeHint="bool">
Return the status of the session.

**Return type**
Expand All @@ -72,7 +72,7 @@ python_api_name: qiskit_ibm_provider.Session

### session\_id

<Attribute id="qiskit_ibm_provider.Session.session_id" signature="str">
<Attribute id="qiskit_ibm_provider.Session.session_id" attributeTypeHint="str">
Return the session ID.

**Return type**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ python_api_name: qiskit_ibm_provider.job.IBMCircuitJob

### client\_version

<Attribute id="qiskit_ibm_provider.job.IBMCircuitJob.client_version" signature="Dict[str, str]">
<Attribute id="qiskit_ibm_provider.job.IBMCircuitJob.client_version" attributeTypeHint="Dict[str, str]">
Return version of the client used for this job.

**Return type**
Expand All @@ -90,7 +90,7 @@ python_api_name: qiskit_ibm_provider.job.IBMCircuitJob

### usage\_estimation

<Attribute id="qiskit_ibm_provider.job.IBMCircuitJob.usage_estimation" signature="Dict[str, Any]">
<Attribute id="qiskit_ibm_provider.job.IBMCircuitJob.usage_estimation" attributeTypeHint="Dict[str, Any]">
Return usage estimation information for this job.

**Return type**
Expand All @@ -106,7 +106,7 @@ python_api_name: qiskit_ibm_provider.job.IBMCircuitJob

### version

<Attribute id="qiskit_ibm_provider.job.IBMCircuitJob.version" signature="= 1" />
<Attribute id="qiskit_ibm_provider.job.IBMCircuitJob.version" attributeValue="1" />

## Methods

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ python_api_name: qiskit_ibm_provider.job.IBMCompositeJob

### client\_version

<Attribute id="qiskit_ibm_provider.job.IBMCompositeJob.client_version" signature="Dict[str, str]">
<Attribute id="qiskit_ibm_provider.job.IBMCompositeJob.client_version" attributeTypeHint="Dict[str, str]">
Return version of the client used for this job.

**Return type**
Expand All @@ -66,7 +66,7 @@ python_api_name: qiskit_ibm_provider.job.IBMCompositeJob

### version

<Attribute id="qiskit_ibm_provider.job.IBMCompositeJob.version" signature="= 1" />
<Attribute id="qiskit_ibm_provider.job.IBMCompositeJob.version" attributeValue="1" />

## Methods

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ python_api_name: qiskit_ibm_provider.job.QueueInfo

### estimated\_complete\_time

<Attribute id="qiskit_ibm_provider.job.QueueInfo.estimated_complete_time" signature="datetime | None">
<Attribute id="qiskit_ibm_provider.job.QueueInfo.estimated_complete_time" attributeTypeHint="datetime | None">
Return estimated complete time in local time.

**Return type**
Expand All @@ -43,7 +43,7 @@ python_api_name: qiskit_ibm_provider.job.QueueInfo

### estimated\_start\_time

<Attribute id="qiskit_ibm_provider.job.QueueInfo.estimated_start_time" signature="datetime | None">
<Attribute id="qiskit_ibm_provider.job.QueueInfo.estimated_start_time" attributeTypeHint="datetime | None">
Return estimated start time in local time.

**Return type**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ python_api_name: qiskit_ibm_provider.transpiler.passes.scheduling.DynamicCircuit

### MEASURE\_PATCH\_CYCLES

<Attribute id="qiskit_ibm_provider.transpiler.passes.scheduling.DynamicCircuitInstructionDurations.MEASURE_PATCH_CYCLES" signature="= 160" />
<Attribute id="qiskit_ibm_provider.transpiler.passes.scheduling.DynamicCircuitInstructionDurations.MEASURE_PATCH_CYCLES" attributeValue="160" />

<span id="dynamiccircuitinstructiondurations-measure-patch-odd-offset" />

### MEASURE\_PATCH\_ODD\_OFFSET

<Attribute id="qiskit_ibm_provider.transpiler.passes.scheduling.DynamicCircuitInstructionDurations.MEASURE_PATCH_ODD_OFFSET" signature="= 64" />
<Attribute id="qiskit_ibm_provider.transpiler.passes.scheduling.DynamicCircuitInstructionDurations.MEASURE_PATCH_ODD_OFFSET" attributeValue="64" />

## Methods

Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit/0.19/qiskit.aqua.QuantumInstance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ python_api_name: qiskit.aqua.QuantumInstance

### BACKEND\_OPTIONS\_QASM\_ONLY

<Attribute id="qiskit.aqua.QuantumInstance.BACKEND_OPTIONS_QASM_ONLY" signature="= ['statevector_sample_measure_opt', 'max_parallel_shots']" />
<Attribute id="qiskit.aqua.QuantumInstance.BACKEND_OPTIONS_QASM_ONLY" attributeValue="['statevector_sample_measure_opt', 'max_parallel_shots']" />

### backend

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ python_api_name: qiskit.aqua.algorithms.AmplitudeEstimation

### backend

<Attribute id="qiskit.aqua.algorithms.AmplitudeEstimation.backend" signature="qiskit.providers.basebackend.BaseBackend">
<Attribute id="qiskit.aqua.algorithms.AmplitudeEstimation.backend" attributeTypeHint="qiskit.providers.basebackend.BaseBackend">
Returns backend.

**Return type**
Expand Down Expand Up @@ -98,7 +98,7 @@ python_api_name: qiskit.aqua.algorithms.AmplitudeEstimation

### quantum\_instance

<Attribute id="qiskit.aqua.algorithms.AmplitudeEstimation.quantum_instance" signature="Union[None, qiskit.aqua.quantum_instance.QuantumInstance]">
<Attribute id="qiskit.aqua.algorithms.AmplitudeEstimation.quantum_instance" attributeTypeHint="Union[None, qiskit.aqua.quantum_instance.QuantumInstance]">
Returns quantum instance.

**Return type**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ python_api_name: qiskit.aqua.algorithms.BernsteinVazirani

### backend

<Attribute id="qiskit.aqua.algorithms.BernsteinVazirani.backend" signature="qiskit.providers.basebackend.BaseBackend">
<Attribute id="qiskit.aqua.algorithms.BernsteinVazirani.backend" attributeTypeHint="qiskit.providers.basebackend.BaseBackend">
Returns backend.

**Return type**
Expand All @@ -32,7 +32,7 @@ python_api_name: qiskit.aqua.algorithms.BernsteinVazirani

### quantum\_instance

<Attribute id="qiskit.aqua.algorithms.BernsteinVazirani.quantum_instance" signature="Union[None, qiskit.aqua.quantum_instance.QuantumInstance]">
<Attribute id="qiskit.aqua.algorithms.BernsteinVazirani.quantum_instance" attributeTypeHint="Union[None, qiskit.aqua.quantum_instance.QuantumInstance]">
Returns quantum instance.

**Return type**
Expand Down
4 changes: 2 additions & 2 deletions docs/api/qiskit/0.19/qiskit.aqua.algorithms.DeutschJozsa.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ python_api_name: qiskit.aqua.algorithms.DeutschJozsa

### backend

<Attribute id="qiskit.aqua.algorithms.DeutschJozsa.backend" signature="qiskit.providers.basebackend.BaseBackend">
<Attribute id="qiskit.aqua.algorithms.DeutschJozsa.backend" attributeTypeHint="qiskit.providers.basebackend.BaseBackend">
Returns backend.

**Return type**
Expand All @@ -34,7 +34,7 @@ python_api_name: qiskit.aqua.algorithms.DeutschJozsa

### quantum\_instance

<Attribute id="qiskit.aqua.algorithms.DeutschJozsa.quantum_instance" signature="Union[None, qiskit.aqua.quantum_instance.QuantumInstance]">
<Attribute id="qiskit.aqua.algorithms.DeutschJozsa.quantum_instance" attributeTypeHint="Union[None, qiskit.aqua.quantum_instance.QuantumInstance]">
Returns quantum instance.

**Return type**
Expand Down
4 changes: 2 additions & 2 deletions docs/api/qiskit/0.19/qiskit.aqua.algorithms.EOH.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ python_api_name: qiskit.aqua.algorithms.EOH

### backend

<Attribute id="qiskit.aqua.algorithms.EOH.backend" signature="qiskit.providers.basebackend.BaseBackend">
<Attribute id="qiskit.aqua.algorithms.EOH.backend" attributeTypeHint="qiskit.providers.basebackend.BaseBackend">
Returns backend.

**Return type**
Expand All @@ -38,7 +38,7 @@ python_api_name: qiskit.aqua.algorithms.EOH

### quantum\_instance

<Attribute id="qiskit.aqua.algorithms.EOH.quantum_instance" signature="Union[None, qiskit.aqua.quantum_instance.QuantumInstance]">
<Attribute id="qiskit.aqua.algorithms.EOH.quantum_instance" attributeTypeHint="Union[None, qiskit.aqua.quantum_instance.QuantumInstance]">
Returns quantum instance.

**Return type**
Expand Down
4 changes: 2 additions & 2 deletions docs/api/qiskit/0.19/qiskit.aqua.algorithms.Grover.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ python_api_name: qiskit.aqua.algorithms.Grover

### backend

<Attribute id="qiskit.aqua.algorithms.Grover.backend" signature="qiskit.providers.basebackend.BaseBackend">
<Attribute id="qiskit.aqua.algorithms.Grover.backend" attributeTypeHint="qiskit.providers.basebackend.BaseBackend">
Returns backend.

**Return type**
Expand All @@ -56,7 +56,7 @@ python_api_name: qiskit.aqua.algorithms.Grover

### quantum\_instance

<Attribute id="qiskit.aqua.algorithms.Grover.quantum_instance" signature="Union[None, qiskit.aqua.quantum_instance.QuantumInstance]">
<Attribute id="qiskit.aqua.algorithms.Grover.quantum_instance" attributeTypeHint="Union[None, qiskit.aqua.quantum_instance.QuantumInstance]">
Returns quantum instance.

**Return type**
Expand Down
4 changes: 2 additions & 2 deletions docs/api/qiskit/0.19/qiskit.aqua.algorithms.HHL.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $$

### backend

<Attribute id="qiskit.aqua.algorithms.HHL.backend" signature="qiskit.providers.basebackend.BaseBackend">
<Attribute id="qiskit.aqua.algorithms.HHL.backend" attributeTypeHint="qiskit.providers.basebackend.BaseBackend">
Returns backend.

**Return type**
Expand All @@ -64,7 +64,7 @@ $$

### quantum\_instance

<Attribute id="qiskit.aqua.algorithms.HHL.quantum_instance" signature="Union[None, qiskit.aqua.quantum_instance.QuantumInstance]">
<Attribute id="qiskit.aqua.algorithms.HHL.quantum_instance" attributeTypeHint="Union[None, qiskit.aqua.quantum_instance.QuantumInstance]">
Returns quantum instance.

**Return type**
Expand Down
8 changes: 4 additions & 4 deletions docs/api/qiskit/0.19/qiskit.aqua.algorithms.IQPE.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ python_api_name: qiskit.aqua.algorithms.IQPE

### aux\_operators

<Attribute id="qiskit.aqua.algorithms.IQPE.aux_operators" signature="Optional[List[Union[qiskit.aqua.operators.operator_base.OperatorBase, qiskit.aqua.operators.legacy.base_operator.LegacyBaseOperator]]]">
<Attribute id="qiskit.aqua.algorithms.IQPE.aux_operators" attributeTypeHint="Optional[List[Union[qiskit.aqua.operators.operator_base.OperatorBase, qiskit.aqua.operators.legacy.base_operator.LegacyBaseOperator]]]">
Returns aux operators

**Return type**
Expand All @@ -44,7 +44,7 @@ python_api_name: qiskit.aqua.algorithms.IQPE

### backend

<Attribute id="qiskit.aqua.algorithms.IQPE.backend" signature="qiskit.providers.basebackend.BaseBackend">
<Attribute id="qiskit.aqua.algorithms.IQPE.backend" attributeTypeHint="qiskit.providers.basebackend.BaseBackend">
Returns backend.

**Return type**
Expand All @@ -54,7 +54,7 @@ python_api_name: qiskit.aqua.algorithms.IQPE

### operator

<Attribute id="qiskit.aqua.algorithms.IQPE.operator" signature="Optional[Union[qiskit.aqua.operators.operator_base.OperatorBase, qiskit.aqua.operators.legacy.base_operator.LegacyBaseOperator]]">
<Attribute id="qiskit.aqua.algorithms.IQPE.operator" attributeTypeHint="Optional[Union[qiskit.aqua.operators.operator_base.OperatorBase, qiskit.aqua.operators.legacy.base_operator.LegacyBaseOperator]]">
Returns operator

**Return type**
Expand All @@ -64,7 +64,7 @@ python_api_name: qiskit.aqua.algorithms.IQPE

### quantum\_instance

<Attribute id="qiskit.aqua.algorithms.IQPE.quantum_instance" signature="Union[None, qiskit.aqua.quantum_instance.QuantumInstance]">
<Attribute id="qiskit.aqua.algorithms.IQPE.quantum_instance" attributeTypeHint="Union[None, qiskit.aqua.quantum_instance.QuantumInstance]">
Returns quantum instance.

**Return type**
Expand Down
Loading

0 comments on commit 22c71a4

Please sign in to comment.