Skip to content

Commit

Permalink
Add missing properties headers (Qiskit#1282)
Browse files Browse the repository at this point in the history
This PR adds headers to all properties in the API docs that didn't have
a dedicated page to match the design of the other components.

Closes Qiskit#1274
  • Loading branch information
arnaucasau authored May 2, 2024
1 parent 41383da commit 0dfa3b8
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp
<Class id="qiskit.optimization.applications.ising.tsp.TspData" signature="TspData(name, dim, coord, w)">
Create new instance of TspData(name, dim, coord, w)

### coord

<Attribute id="qiskit.optimization.applications.ising.tsp.TspData.coord">
Alias for field number 2
</Attribute>
Expand All @@ -43,6 +45,8 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp
Return number of occurrences of value.
</Function>

### dim

<Attribute id="qiskit.optimization.applications.ising.tsp.TspData.dim">
Alias for field number 1
</Attribute>
Expand All @@ -55,10 +59,14 @@ Convert symmetric TSP instances into Pauli list Deal with TSPLIB format. It supp
Raises ValueError if the value is not present.
</Function>

### name

<Attribute id="qiskit.optimization.applications.ising.tsp.TspData.name">
Alias for field number 0
</Attribute>

### w

<Attribute id="qiskit.optimization.applications.ising.tsp.TspData.w">
Alias for field number 3
</Attribute>
Expand Down
36 changes: 36 additions & 0 deletions docs/api/qiskit/0.19/qiskit.pulse.channels.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s

[**PulseError**](qiskit.pulse.PulseError "qiskit.pulse.PulseError") – If `index` is not a nonnegative integer.

### index

<Attribute id="qiskit.pulse.channels.AcquireChannel.index" signature="int">
Return the index of this channel. The index is a label for a control signal line typically mapped trivially to a qubit index. For instance, `DriveChannel(0)` labels the signal line driving the qubit labeled with index 0.

Expand All @@ -51,6 +53,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s
`int`
</Attribute>

### name

<Attribute id="qiskit.pulse.channels.AcquireChannel.name" signature="str">
Return the shorthand alias for this channel, which is based on its type and index.

Expand All @@ -73,6 +77,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s

[**PulseError**](qiskit.pulse.PulseError "qiskit.pulse.PulseError") – If `index` is not a nonnegative integer.

### index

<Attribute id="qiskit.pulse.channels.Channel.index" signature="int">
Return the index of this channel. The index is a label for a control signal line typically mapped trivially to a qubit index. For instance, `DriveChannel(0)` labels the signal line driving the qubit labeled with index 0.

Expand All @@ -81,6 +87,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s
`int`
</Attribute>

### name

<Attribute id="qiskit.pulse.channels.Channel.name" signature="str">
Return the shorthand alias for this channel, which is based on its type and index.

Expand Down Expand Up @@ -109,6 +117,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s

[**PulseError**](qiskit.pulse.PulseError "qiskit.pulse.PulseError") – If `index` is not a nonnegative integer.

### index

<Attribute id="qiskit.pulse.channels.ControlChannel.index" signature="int">
Return the index of this channel. The index is a label for a control signal line typically mapped trivially to a qubit index. For instance, `DriveChannel(0)` labels the signal line driving the qubit labeled with index 0.

Expand All @@ -117,6 +127,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s
`int`
</Attribute>

### name

<Attribute id="qiskit.pulse.channels.ControlChannel.name" signature="str">
Return the shorthand alias for this channel, which is based on its type and index.

Expand All @@ -139,6 +151,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s

[**PulseError**](qiskit.pulse.PulseError "qiskit.pulse.PulseError") – If `index` is not a nonnegative integer.

### index

<Attribute id="qiskit.pulse.channels.DriveChannel.index" signature="int">
Return the index of this channel. The index is a label for a control signal line typically mapped trivially to a qubit index. For instance, `DriveChannel(0)` labels the signal line driving the qubit labeled with index 0.

Expand All @@ -147,6 +161,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s
`int`
</Attribute>

### name

<Attribute id="qiskit.pulse.channels.DriveChannel.name" signature="str">
Return the shorthand alias for this channel, which is based on its type and index.

Expand All @@ -169,6 +185,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s

[**PulseError**](qiskit.pulse.PulseError "qiskit.pulse.PulseError") – If `index` is not a nonnegative integer.

### index

<Attribute id="qiskit.pulse.channels.MeasureChannel.index" signature="int">
Return the index of this channel. The index is a label for a control signal line typically mapped trivially to a qubit index. For instance, `DriveChannel(0)` labels the signal line driving the qubit labeled with index 0.

Expand All @@ -177,6 +195,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s
`int`
</Attribute>

### name

<Attribute id="qiskit.pulse.channels.MeasureChannel.name" signature="str">
Return the shorthand alias for this channel, which is based on its type and index.

Expand All @@ -199,6 +219,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s

[**PulseError**](qiskit.pulse.PulseError "qiskit.pulse.PulseError") – If `index` is not a nonnegative integer.

### index

<Attribute id="qiskit.pulse.channels.MemorySlot.index" signature="int">
Return the index of this channel. The index is a label for a control signal line typically mapped trivially to a qubit index. For instance, `DriveChannel(0)` labels the signal line driving the qubit labeled with index 0.

Expand All @@ -207,6 +229,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s
`int`
</Attribute>

### name

<Attribute id="qiskit.pulse.channels.MemorySlot.name" signature="str">
Return the shorthand alias for this channel, which is based on its type and index.

Expand All @@ -229,6 +253,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s

[**PulseError**](qiskit.pulse.PulseError "qiskit.pulse.PulseError") – If `index` is not a nonnegative integer.

### index

<Attribute id="qiskit.pulse.channels.PulseChannel.index" signature="int">
Return the index of this channel. The index is a label for a control signal line typically mapped trivially to a qubit index. For instance, `DriveChannel(0)` labels the signal line driving the qubit labeled with index 0.

Expand All @@ -237,6 +263,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s
`int`
</Attribute>

### name

<Attribute id="qiskit.pulse.channels.PulseChannel.name" signature="str">
Return the shorthand alias for this channel, which is based on its type and index.

Expand All @@ -259,6 +287,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s

[**PulseError**](qiskit.pulse.PulseError "qiskit.pulse.PulseError") – If `index` is not a nonnegative integer.

### index

<Attribute id="qiskit.pulse.channels.RegisterSlot.index" signature="int">
Return the index of this channel. The index is a label for a control signal line typically mapped trivially to a qubit index. For instance, `DriveChannel(0)` labels the signal line driving the qubit labeled with index 0.

Expand All @@ -267,6 +297,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s
`int`
</Attribute>

### name

<Attribute id="qiskit.pulse.channels.RegisterSlot.name" signature="str">
Return the shorthand alias for this channel, which is based on its type and index.

Expand All @@ -281,6 +313,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s

Create new snapshot channel.

### index

<Attribute id="qiskit.pulse.channels.SnapshotChannel.index" signature="int">
Return the index of this channel. The index is a label for a control signal line typically mapped trivially to a qubit index. For instance, `DriveChannel(0)` labels the signal line driving the qubit labeled with index 0.

Expand All @@ -289,6 +323,8 @@ Novel channel types can often utilize the `ControlChannel`, but if this is not s
`int`
</Attribute>

### name

<Attribute id="qiskit.pulse.channels.SnapshotChannel.name" signature="str">
Return the shorthand alias for this channel, which is based on its type and index.

Expand Down
4 changes: 4 additions & 0 deletions docs/api/qiskit/0.19/qiskit.scheduler.methods.basic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,14 @@ The most straightforward scheduling methods: scheduling **as early** or **as lat
Raises ValueError if the value is not present.
</Function>

### qubits

<Attribute id="qiskit.scheduler.methods.basic.CircuitPulseDef.qubits">
Alias for field number 1
</Attribute>

### schedule

<Attribute id="qiskit.scheduler.methods.basic.CircuitPulseDef.schedule">
Alias for field number 0
</Attribute>
Expand Down
8 changes: 8 additions & 0 deletions docs/api/qiskit/dev/circuit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,14 @@ A collection bits of the same type can be encapsulated in a register of the matc
Find the index of the provided bit within this register.
</Function>

### name

<Attribute id="qiskit.circuit.Register.name">
Get the register name.
</Attribute>

### size

<Attribute id="qiskit.circuit.Register.size">
Get the register size.
</Attribute>
Expand Down Expand Up @@ -512,10 +516,14 @@ The [`Store`](#qiskit.circuit.Store "qiskit.circuit.Store") instruction is parti
* **lvalue** ([*expr.Expr*](circuit_classical#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) – the memory location being stored into.
* **rvalue** ([*expr.Expr*](circuit_classical#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) – the expression result being stored.

### lvalue

<Attribute id="qiskit.circuit.Store.lvalue">
Get the l-value [`Expr`](circuit_classical#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr") node that is being stored to.
</Attribute>

### rvalue

<Attribute id="qiskit.circuit.Store.rvalue">
Get the r-value [`Expr`](circuit_classical#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr") node that is being written into the l-value.
</Attribute>
Expand Down
5 changes: 4 additions & 1 deletion scripts/lib/api/generateApiComponents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function prepareProps(
const preparePropsPerApiType: Record<string, () => ComponentProps> = {
class: () => prepareClassProps($child, $dl, githubSourceLink, id),
property: () =>
preparePropertyProps($child, $dl, priorApiType, githubSourceLink, id),
preparePropertyProps($, $child, $dl, priorApiType, githubSourceLink, id),
method: () =>
prepareMethodProps($, $child, $dl, priorApiType, githubSourceLink, id),
attribute: () =>
Expand Down Expand Up @@ -134,6 +134,7 @@ function prepareClassProps(
}

function preparePropertyProps(
$: CheerioAPI,
$child: Cheerio<any>,
$dl: Cheerio<any>,
priorApiType: string | undefined,
Expand All @@ -155,6 +156,8 @@ function preparePropertyProps(
};
}

$(`<h3>${getLastPartFromFullIdentifier(id)}</h3>`).insertBefore($dl);

return props;
}

Expand Down

0 comments on commit 0dfa3b8

Please sign in to comment.