Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/api/qiskit-c/dev/qk-neighbors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ python_api_name: QkNeighbors

This object is read-only from C. To satisfy the safety guarantees of `qk_neighbors_clear`, you must not overwrite any data initialized by `qk_neighbors_from_target`, including any pointed-to data.

<span id="structQkNeighbors_1autotoc_md393" />
<span id="structQkNeighbors_1autotoc_md394" />

#### Representation

<span id="structQkNeighbors_1autotoc_md393" />
<span id="structQkNeighbors_1autotoc_md394" />

After initialization by `qk_neighbors_from_target`, the structure will be in one of two modes:

Expand Down
4 changes: 2 additions & 2 deletions docs/api/qiskit-c/dev/qk-obs-term.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ This is a group of functions for interacting with an opaque (Rust-space) SparseT

This contains the coefficient (`coeff`), the number of qubits of the observable (`num_qubits`) and pointers to the `bit_terms` and `indices` arrays, which have length `len`. It’s the responsibility of the user that the data is coherent, see also the below section on safety.

<span id="structQkObsTerm_1autotoc_md392" />
<span id="structQkObsTerm_1autotoc_md393" />

#### Safety

<span id="structQkObsTerm_1autotoc_md392" />
<span id="structQkObsTerm_1autotoc_md393" />

* `bit_terms` must be a non-null, aligned pointer to `len` elements of type `QkBitTerm`.
* `indices` must be a non-null, aligned pointer to `len` elements of type `uint32_t`.
Expand Down
36 changes: 18 additions & 18 deletions docs/api/qiskit-c/dev/qk-target-entry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003);
<Function id="qk_target_entry_new" signature="QkTargetEntry *qk_target_entry_new(QkGate operation)">
Creates an entry to the `QkTarget` based on a `QkGate` instance.

<span id="group__QkTargetEntry_1autotoc_md332" />
<span id="group__QkTargetEntry_1autotoc_md333" />

#### Example

Expand All @@ -63,7 +63,7 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003);
<Function id="qk_target_entry_new_measure" signature="QkTargetEntry *qk_target_entry_new_measure(void)">
Creates a new entry for adding a measurement instruction to a `QkTarget`.

<span id="group__QkTargetEntry_1autotoc_md333" />
<span id="group__QkTargetEntry_1autotoc_md334" />

#### Example

Expand Down Expand Up @@ -91,7 +91,7 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003);
<Function id="qk_target_entry_new_reset" signature="QkTargetEntry *qk_target_entry_new_reset(void)">
Creates a new entry for adding a reset instruction to a `QkTarget`.

<span id="group__QkTargetEntry_1autotoc_md334" />
<span id="group__QkTargetEntry_1autotoc_md335" />

#### Example

Expand Down Expand Up @@ -119,7 +119,7 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003);
<Function id="qk_target_entry_new_fixed" signature="QkTargetEntry *qk_target_entry_new_fixed(QkGate operation, double *params, const char *name)">
Creates an entry in the `QkTarget` based on a `QkGate` instance with no parameters.

<span id="group__QkTargetEntry_1autotoc_md335" />
<span id="group__QkTargetEntry_1autotoc_md336" />

#### Example

Expand All @@ -128,11 +128,11 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003);
QkTargetEntry *entry = qk_target_entry_new_fixed(QkGate_CRX, crx_params, "crx_fixed")";
```

<span id="group__QkTargetEntry_1autotoc_md336" />
<span id="group__QkTargetEntry_1autotoc_md337" />

#### Safety

<span id="group__QkTargetEntry_1autotoc_md336" />
<span id="group__QkTargetEntry_1autotoc_md337" />

The `params` type is expected to be a pointer to an array of `double` where the length matches the expectations of the `QkGate`. If the array is insufficiently long the behavior of this function is undefined as this will read outside the bounds of the array. It can be a null pointer if there are no params for a given gate. You can check `qk_gate_num_params` to determine how many qubits are required for a given gate.

Expand All @@ -158,7 +158,7 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003);
<Function id="qk_target_entry_num_properties" signature="size_t qk_target_entry_num_properties(const QkTargetEntry *entry)">
Retrieves the number of properties stored in the target entry.

<span id="group__QkTargetEntry_1autotoc_md337" />
<span id="group__QkTargetEntry_1autotoc_md338" />

#### Example

Expand All @@ -168,11 +168,11 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003);
size_t props_size = qk_target_entry_num_properties(entry);
```

<span id="group__QkTargetEntry_1autotoc_md338" />
<span id="group__QkTargetEntry_1autotoc_md339" />

#### Safety

<span id="group__QkTargetEntry_1autotoc_md338" />
<span id="group__QkTargetEntry_1autotoc_md339" />

The behavior is undefined if `entry` is not a valid, non-null pointer to a `QkTargetEntry` object.

Expand All @@ -190,7 +190,7 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003);
<Function id="qk_target_entry_free" signature="void qk_target_entry_free(QkTargetEntry *entry)">
Frees the entry.

<span id="group__QkTargetEntry_1autotoc_md339" />
<span id="group__QkTargetEntry_1autotoc_md340" />

#### Example

Expand All @@ -199,11 +199,11 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003);
qk_target_entry_free(entry);
```

<span id="group__QkTargetEntry_1autotoc_md340" />
<span id="group__QkTargetEntry_1autotoc_md341" />

#### Safety

<span id="group__QkTargetEntry_1autotoc_md340" />
<span id="group__QkTargetEntry_1autotoc_md341" />

The behavior is undefined if `entry` is not a valid, non-null pointer to a `QkTargetEntry` object.

Expand All @@ -221,7 +221,7 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003);
<Function id="qk_target_entry_add_property" signature="QkExitCode qk_target_entry_add_property(QkTargetEntry *entry, uint32_t *qargs, uint32_t num_qubits, double duration, double error)">
Adds an instruction property instance based on its assigned qargs.

<span id="group__QkTargetEntry_1autotoc_md341" />
<span id="group__QkTargetEntry_1autotoc_md342" />

#### Example

Expand All @@ -231,11 +231,11 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003);
qk_target_entry_add_property(entry, qargs, 2, 0.0, 0.1);
```

<span id="group__QkTargetEntry_1autotoc_md342" />
<span id="group__QkTargetEntry_1autotoc_md343" />

#### Safety

<span id="group__QkTargetEntry_1autotoc_md342" />
<span id="group__QkTargetEntry_1autotoc_md343" />

The behavior is undefined if `entry` is not a valid, non-null pointer to a `QkTargetEntry` object.

Expand All @@ -257,7 +257,7 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003);
<Function id="qk_target_entry_set_name" signature="QkExitCode qk_target_entry_set_name(QkTargetEntry *entry, const char *name)">
Sets a custom name to the target entry.

<span id="group__QkTargetEntry_1autotoc_md343" />
<span id="group__QkTargetEntry_1autotoc_md344" />

#### Example

Expand All @@ -266,11 +266,11 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003);
qk_target_entry_set_name(entry, "cx_gate");
```

<span id="group__QkTargetEntry_1autotoc_md344" />
<span id="group__QkTargetEntry_1autotoc_md345" />

#### Safety

<span id="group__QkTargetEntry_1autotoc_md344" />
<span id="group__QkTargetEntry_1autotoc_md345" />

The behavior is undefined if `entry` is not a valid, non-null pointer to a `QkTargetEntry` object. The `name` pointer is expected to be either a C string comprising of valid UTF-8 characters or a null pointer.

Expand Down
Loading
Loading