diff --git a/docs/api/qiskit-c/dev/_toc.json b/docs/api/qiskit-c/dev/_toc.json
index 60616db84ce..c27c9338bbb 100644
--- a/docs/api/qiskit-c/dev/_toc.json
+++ b/docs/api/qiskit-c/dev/_toc.json
@@ -21,6 +21,10 @@
"title": "QkComplex64",
"url": "/docs/api/qiskit-c/dev/qk-complex-64"
},
+ {
+ "title": "QkElidePermutationsResult",
+ "url": "/docs/api/qiskit-c/dev/qk-elide-permutations-result"
+ },
{
"title": "QkExitCode",
"url": "/docs/api/qiskit-c/dev/qk-exit-code"
diff --git a/docs/api/qiskit-c/dev/index.mdx b/docs/api/qiskit-c/dev/index.mdx
index 36a50cf31b4..93c921914f1 100644
--- a/docs/api/qiskit-c/dev/index.mdx
+++ b/docs/api/qiskit-c/dev/index.mdx
@@ -34,8 +34,9 @@ As this interface is still new in Qiskit it should be considered experimental an
Using the transpiler from the C API is intended to only cover circuits created solely via the C API. If you are in a hybrid mode where you’re using the C API with Python you should invoke the transpiler via the Python [`qiskit.transpiler`](/docs/api/qiskit/dev/transpiler#module-qiskit.transpiler "qiskit.transpiler") module instead; the functionality is the same Rust internals they just offer different entrypoints. The C API for transpilation makes assumptions about the input only using constructs exposed to the C Quantum Circuit API and you will potentially get incomplete results transpiling circuits from Python via the C API.
-* [Transpiler Passes](qk-transpiler-passes)
-* [QkVF2LayoutResult](qk-vf-2-layout-result)
* [QkTarget](qk-target)
* [QkTargetEntry](qk-target-entry)
+* [Transpiler Passes](qk-transpiler-passes)
+* [QkVF2LayoutResult](qk-vf-2-layout-result)
+* [QkElidePermutationsResult](qk-elide-permutations-result)
diff --git a/docs/api/qiskit-c/dev/qk-circuit.mdx b/docs/api/qiskit-c/dev/qk-circuit.mdx
index fac4a268ce3..e6b5b97eb22 100644
--- a/docs/api/qiskit-c/dev/qk-circuit.mdx
+++ b/docs/api/qiskit-c/dev/qk-circuit.mdx
@@ -26,11 +26,11 @@ $$
// Create a circuit with three qubits and 3 classical bits
QkCircuit *qc = qk_circuit_new(3, 0);
// H gate on qubit 0, putting this qubit in a superposition of |0> + |1>.
-qk_circuit_gate(qc, QkGate_H, {0}, NULL);
+qk_circuit_gate(qc, QkGate_H, (uint32_t[]){0}, NULL);
// A CX (CNOT) gate on control qubit 0 and target qubit 1 generating a Bell state.
-qk_circuit_gate(qc, QkGate_CX, {0, 1}, NULL);
+qk_circuit_gate(qc, QkGate_CX, (uint32_t[]){0, 1}, NULL);
// A CX (CNOT) gate on control qubit 0 and target qubit 2 generating a GHZ state.
-qk_circuit_gate(qc, QkGate_CX, {0, 2}, NULL);
+qk_circuit_gate(qc, QkGate_CX, (uint32_t[]){0, 2}, NULL);
// Free the created circuit.
qk_circuit_free(qc);
```
@@ -202,7 +202,7 @@ The circuit C API currently only supports creating circuits that contain operati
QkQuantumRegister *qr = qk_quantum_register_new(1024, "my_little_register");
qk_circuit_add_quantum_register(qc, qr);
qk_quantum_register_free(qr);
- qk_circuit_free(qc)
+ qk_circuit_free(qc);
```
@@ -233,7 +233,7 @@ The circuit C API currently only supports creating circuits that contain operati
QkClassicalRegister *cr = qk_classical_register_new(24, "my_big_register");
qk_circuit_add_classical_register(qc, cr);
qk_classical_register_free(cr);
- qk_circuit_free(qc)
+ qk_circuit_free(qc);
```
@@ -391,7 +391,7 @@ The circuit C API currently only supports creating circuits that contain operati
- The `qubits` and `params` types are expected to be a pointer to an array of `uint32_t` and `double` respectively where the length is matching the expectations for the standard gate. If the array is insufficently 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 qubits or params for a given gate. You can check `qk_gate_num_qubits` and `qk_gate_num_params` to determine how many qubits and params are required for a given gate.
+ The `qubits` and `params` types are expected to be a pointer to an array of `uint32_t` and `double` respectively where the length is matching the expectations for the standard gate. 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 qubits or params for a given gate. You can check `qk_gate_num_qubits` and `qk_gate_num_params` to determine how many qubits and params are required for a given gate.
Behavior is undefined if `circuit` is not a valid, non-null pointer to a `QkCircuit`.
@@ -562,17 +562,16 @@ The circuit C API currently only supports creating circuits that contain operati
#### Example
```c
- QkComplex64 c0 = qk_complex64_from_native(0); // 0+0i
- QkComplex64 c1 = qk_complex64_from_native(1); // 1+0i
+ QkComplex64 c0 = {0, 0}; // 0+0i
+ QkComplex64 c1 = {1, 0}; // 1+0i
const uint32_t num_qubits = 1;
- const uint32_t dim = 2;
- QkComplex64[dim * dim] unitary = {c0, c1, // row 0
+ QkComplex64 unitary[2*2] = {c0, c1, // row 0
c1, c0}; // row 1
QkCircuit *circuit = qk_circuit_new(1, 0); // 1 qubit circuit
- uint32_t qubit = {0}; // qubit to apply the unitary on
- qk_circuit_unitary(circuit, unitary, qubit, num_qubits);
+ uint32_t qubit[1] = {0}; // qubit to apply the unitary on
+ qk_circuit_unitary(circuit, unitary, qubit, num_qubits, true);
```
@@ -607,7 +606,7 @@ The circuit C API currently only supports creating circuits that contain operati
```c
QkCircuit *qc = qk_circuit_new(100, 0);
- uint32_t qubit[1] = {0};
+ uint32_t qubits[1] = {0};
qk_circuit_gate(qc, QkGate_H, qubits, NULL);
QkOpCounts counts = qk_circuit_count_ops(qc);
```
@@ -675,7 +674,7 @@ The circuit C API currently only supports creating circuits that contain operati
```c
QkCircuitInstruction inst;
- QkCircuit *qc = qk_circuit_new(100);
+ QkCircuit *qc = qk_circuit_new(100, 0);
uint32_t qubit[1] = {0};
qk_circuit_gate(qc, QkGate_H, qubit, NULL);
qk_circuit_get_instruction(qc, 0, &inst);
@@ -709,8 +708,8 @@ The circuit C API currently only supports creating circuits that contain operati
```c
QkCircuitInstruction *inst = malloc(sizeof(QkCircuitInstruction));
- QkCircuit *qc = qk_circuit_new(100);
- uint32_t q0 = {0};
+ QkCircuit *qc = qk_circuit_new(100, 0);
+ uint32_t q0[1] = {0};
qk_circuit_gate(qc, QkGate_H, q0, NULL);
qk_circuit_get_instruction(qc, 0, inst);
qk_circuit_instruction_clear(inst); // free the data
diff --git a/docs/api/qiskit-c/dev/qk-classical-register.mdx b/docs/api/qiskit-c/dev/qk-classical-register.mdx
index e2b8e525ab7..f9d2b96e74e 100644
--- a/docs/api/qiskit-c/dev/qk-classical-register.mdx
+++ b/docs/api/qiskit-c/dev/qk-classical-register.mdx
@@ -12,14 +12,26 @@ python_api_name: QkClassicalRegister
typedef struct QkClassicalRegister QkClassicalRegister
```
-A common way to instantiate several bits at once is to create a register. A register is a named collection of bits. Creating a register enables giving a collection of bits a name which can be use as metadata around specific bits in a circuit. This name will also typically be preseserved when exporting the circuit to interchange languages.
+A common way to instantiate several bits at once is to create a register. A register is a named collection of bits. Creating a register enables giving a collection of bits a name which can be use as metadata around specific bits in a circuit. This name will also typically be preserved when exporting the circuit to interchange languages.
You can create a register by calling `qk_classical_register_new()`, for example:
+```c
+#include
+
+QkClassicalRegister *creg = qk_classical_register_new(5, "my_creg");
+```
+
Which creates a new 5 classical bit register named `"my_creg"`.
Then to add the register to a circuit you use the `qk_circuit_add_classical_register()` function:
+```c
+QkCircuit *qc = qk_circuit_new(0, 0);
+qk_circuit_add_classical_register(qc, creg);
+uint32_t num_qubits = qk_circuit_num_qubits(qc); // 5
+```
+
While circuits track registers, the registers themselves impart almost no behavioral differences on circuits.
## Functions
diff --git a/docs/api/qiskit-c/dev/qk-complex-64.mdx b/docs/api/qiskit-c/dev/qk-complex-64.mdx
index 5c21017b5e1..43b2554fbc5 100644
--- a/docs/api/qiskit-c/dev/qk-complex-64.mdx
+++ b/docs/api/qiskit-c/dev/qk-complex-64.mdx
@@ -8,7 +8,7 @@ python_api_name: QkComplex64
# QkComplex64
-A complex, double-precision number representation. This data type is used to safely use complex numbers within Qiskit, but is not necessarily designed for easy manipulation on user-side. Instead, we provide functions to convert from compiler-native representation (e.g. `double complex` for GNU or Clang compilers), which allow for ergonomic handling, to Qiskit’s `QkComplex64` representation, which is meant for passing into Qiskit functions and structs.
+A complex, double-precision number representation. This data type is used to safely use complex numbers within Qiskit, but is not necessarily designed for easy manipulation on user-side. Instead, we provide functions to convert from compiler-native representation (e.g. `complex double` for GNU or Clang compilers), which allow for ergonomic handling, to Qiskit’s `QkComplex64` representation, which is meant for passing into Qiskit functions and structs.
Explicitly, Qiskit assumes the compiler-native complex number type in C to be `_Dcomplex` for Windows MSVC (if `_MSC_VER` is defined) and `double _Complex` otherwise. In C++ (if `__cplusplus` is defined), the complex number type is always `std::complex`.
@@ -38,11 +38,11 @@ Convert a `QkComplex64` to a compiler-native complex number representation. Note
### Example
-Assuming a GNU/clang compiler with `double complex` as native complex number, we have
+Assuming a GNU/clang compiler with `complex double` as native complex number, we have
```c
QkComplex64 qk_value = {1, 1}; // represents 1 + i
-double complex value = qk_complex64_to_native(&qk_value);
+complex double value = qk_complex64_to_native(&qk_value);
```
### Safety
@@ -65,10 +65,10 @@ Convert a compiler-native complex number to a `QkComplex64`. Note that `CMPLX_DO
### Example
-Assuming a GNU/clang compiler with `double complex` as native complex number, we have
+Assuming a GNU/clang compiler with `complex double` as native complex number, we have
```c
-double complex value = 1 + I;
+complex double value = 1 + I;
QkComplex64 qk_value = qk_complex64_from_native(&value);
```
diff --git a/docs/api/qiskit-c/dev/qk-elide-permutations-result.mdx b/docs/api/qiskit-c/dev/qk-elide-permutations-result.mdx
new file mode 100644
index 00000000000..76889e89fea
--- /dev/null
+++ b/docs/api/qiskit-c/dev/qk-elide-permutations-result.mdx
@@ -0,0 +1,102 @@
+---
+title: QkElidePermutationsResult (dev version)
+description: API reference for QkElidePermutationsResult in the dev version of qiskit-c
+in_page_toc_min_heading_level: 2
+python_api_type: module
+python_api_name: QkElidePermutationsResult
+---
+
+# QkElidePermutationsResult
+
+```c
+typedef struct QkElidePermutationsResult QkElidePermutationsResult
+```
+
+When running the `qk_transpiler_pass_standalone_elide_permutations` function it returns a modified circuit and a permutation array as a QkElidePermutationsResult object. This object contains the outcome of the transpiler pass, whether the pass was able to elide any gates or not, and what the results of that elision were.
+
+## Functions
+
+### qk\_elide\_permutations\_result\_elided\_gates
+
+
+ Check whether the elide permutations was able to elide anything
+
+
+
+ #### Safety
+
+
+
+ Behavior is undefined if `result` is not a valid, non-null pointer to a `QkElidePermutationsResult`.
+
+ **Parameters**
+
+ **result** – a pointer to the result
+
+ **Returns**
+
+ `true` if the `qk_transpiler_pass_standalone_elide_permutations()` run elided any gates
+
+
+### qk\_elide\_permutations\_result\_circuit
+
+
+ Get the circuit from the elide permutations result
+
+
+
+ #### Safety
+
+
+
+ Behavior is undefined if `result` is not a valid, non-null pointer to a `QkElidePermutationsResult`. The pointer to the returned circuit is owned by the result object, it should not be passed to `qk_circuit_free()` as it will be freed by `qk_elide_permutations_result_free()`.
+
+ **Parameters**
+
+ **result** – a pointer to the result of the pass. It must have elided gates as checked by `qk_elide_permutations_result_elided_gates()`
+
+ **Returns**
+
+ A pointer to the circuit with the permutation gates elided
+
+
+### qk\_elide\_permutations\_result\_permutation
+
+
+ Get the permutation array for the elided gates
+
+
+
+ #### Safety
+
+
+
+ Behavior is undefined if `layout` is not a valid, non-null pointer to a `QkElidePermutationsResult`. Also qubit must be a valid qubit for the circuit and there must be a result found. The pointer to the permutation array is owned by the result object, it should not be passed to `free()` as it will be freed by `qk_elide_permutations_result_free()` when that is called.
+
+ **Parameters**
+
+ **result** – a pointer to the result of the pass. It must have elided gates as checked by `qk_elide_permutations_result_elided_gates()`
+
+ **Returns**
+
+ A pointer to the permutation array caused by the swap elision performed by the pass. This array has a length equal to the number of qubits of the circuit returned by `qk_elide_permutations_result_elided_gates()` (or the circuit passed into `qk_transpiler_pass_standalone_elide_permutations()`). The permutation array maps the virtual qubit in the original circuit at each index to its new output position after all the elision performed by the pass. For example, and array of `[2, 1, 0]` means that qubit 0 is now in qubit 2 on the output of the circuit and qubit 2’s is now at 0 (qubit 1 remains unchanged)
+
+
+### qk\_elide\_permutations\_result\_free
+
+
+ Free a `QkElidePermutationsResult` object
+
+
+
+ #### Safety
+
+
+
+ Behavior is undefined if `layout` is not a valid, non-null pointer to a `QkElidePermutationsResult`.
+
+ **Parameters**
+
+ **result** – a pointer to the result object to free
+
+
diff --git a/docs/api/qiskit-c/dev/qk-obs.mdx b/docs/api/qiskit-c/dev/qk-obs.mdx
index a4d5f3ad998..c3d2c752df6 100644
--- a/docs/api/qiskit-c/dev/qk-obs.mdx
+++ b/docs/api/qiskit-c/dev/qk-obs.mdx
@@ -72,26 +72,26 @@ These cases are not special, they’re fully consistent with the rules and shoul
For any given mathematical observable, there are several ways of representing it with `QkObs`. For example, the same set of single-bit terms and their corresponding indices might appear multiple times in the observable. Mathematically, this is equivalent to having only a single term with all the coefficients summed. Similarly, the terms of the sum in a `QkObs` can be in any order while representing the same observable, since addition is commutative (although while floating-point addition is not associative, `QkObs` makes no guarantees about the summation order).
-These two categories of representation degeneracy can cause the operator equality, `qk_obs_equal`, to claim that two observables are not equal, despite representating the same object. In these cases, it can be convenient to define some *canonical form*, which allows observables to be compared structurally. You can put a `QkObs` in canonical form by using the `qk_obs_canonicalize` function. The precise ordering of terms in canonical ordering is not specified, and may change between versions of Qiskit. Within the same version of Qiskit, however, you can compare two observables structurally by comparing their simplified forms.
+These two categories of representation degeneracy can cause the operator equality, `qk_obs_equal`, to claim that two observables are not equal, despite representing the same object. In these cases, it can be convenient to define some *canonical form*, which allows observables to be compared structurally. You can put a `QkObs` in canonical form by using the `qk_obs_canonicalize` function. The precise ordering of terms in canonical ordering is not specified, and may change between versions of Qiskit. Within the same version of Qiskit, however, you can compare two observables structurally by comparing their simplified forms.
If you wish to account for floating-point tolerance in the comparison, it is safest to use a recipe such as:
```c
bool equivalent(QkObs *left, QkObs *right, double tol) {
- // compare a canonicalized version of left - right to the zero observable
- QkObs *neg_right = qk_obs_mul(right, -1);
- QkObs *diff = qk_obs_add(left, neg_right);
- QkObs *canonical = qk_obs_canonicalize(diff, tol);
-
- QkObs *zero = qk_obs_zero(qk_obs_num_qubits(left));
- bool equiv = qk_obs_equal(diff, zero);
- // free all temporary variables
- qk_obs_free(neg_right);
- qk_obs_free(diff);
- qk_obs_free(canonical);
- qk_obs_free(zero);
- return equiv;
+ // compare a canonicalized version of left - right to the zero observable
+ QkObs *neg_right = qk_obs_multiply(right, &(QkComplex64){-1, 0});
+ QkObs *diff = qk_obs_add(left, neg_right);
+ QkObs *canonical = qk_obs_canonicalize(diff, tol);
+
+ QkObs *zero = qk_obs_zero(qk_obs_num_qubits(left));
+ bool equiv = qk_obs_equal(diff, zero);
+ // free all temporary variables
+ qk_obs_free(neg_right);
+ qk_obs_free(diff);
+ qk_obs_free(canonical);
+ qk_obs_free(zero);
+ return equiv;
}
```
@@ -197,14 +197,13 @@ for (size_t i = 0; i < num_terms; i++) {
uint32_t num_qubits = 100;
uint64_t num_terms = 2; // we have 2 terms: |01><01|, -1 * |+-><+-|
uint64_t num_bits = 4; // we have 4 non-identity bits: 0, 1, +, -
-
- complex double coeffs[2] = {1, -1};
+ QkComplex64 coeffs = {1, -1};
QkBitTerm bits[4] = {QkBitTerm_Zero, QkBitTerm_One, QkBitTerm_Plus, QkBitTerm_Minus};
+
uint32_t indices[4] = {0, 1, 98, 99}; // <-- e.g. {1, 0, 99, 98} would be invalid
size_t boundaries[3] = {0, 2, 4};
-
QkObs *obs = qk_obs_new(
- num_qubits, num_terms, num_bits, coeffs, bits, indices, boundaries
+ num_qubits, num_terms, num_bits, &coeffs, bits, indices, boundaries
);
```
@@ -216,7 +215,7 @@ for (size_t i = 0; i < num_terms; i++) {
Behavior is undefined if any of the following conditions are violated:
- * `coeffs` is a pointer to a `complex double` array of length `num_terms`
+ * `coeffs` is a pointer to a `QkComplex64` array of length `num_terms`
* `bit_terms` is a pointer to an array of valid `QkBitTerm` elements of length `num_bits`
* `indices` is a pointer to a `uint32_t` array of length `num_bits`, which is term-wise sorted in strict ascending order, and every element is smaller than `num_qubits`
* `boundaries` is a pointer to a `size_t` array of length `num_terms + 1`, which is sorted in ascending order, the first element is 0 and the last element is smaller than `num_terms`
@@ -276,10 +275,10 @@ for (size_t i = 0; i < num_terms; i++) {
uint32_t num_qubits = 100;
QkObs *obs = qk_obs_zero(num_qubits);
- complex double coeff = 1;
+ QkComplex64 coeff = {1, 0};
QkBitTerm bit_terms[3] = {QkBitTerm_X, QkBitTerm_Y, QkBitTerm_Z};
uint32_t indices[3] = {0, 1, 2};
- QkObsTerm term = {&coeff, 3, bit_terms, indices, num_qubits};
+ QkObsTerm term = {coeff, 3, bit_terms, indices, num_qubits};
int exit_code = qk_obs_add_term(obs, &term);
```
@@ -444,7 +443,7 @@ for (size_t i = 0; i < num_terms; i++) {
Get a pointer to the coefficients.
- This can be used to read and modify the observable’s coefficients. The resulting pointer is valid to read for `qk_obs_num_terms(obs)` elements of `complex double`.
+ This can be used to read and modify the observable’s coefficients. The resulting pointer is valid to read for `qk_obs_num_terms(obs)` elements of `QkComplex64`.
@@ -453,10 +452,10 @@ for (size_t i = 0; i < num_terms; i++) {
```c
QkObs *obs = qk_obs_identity(100);
size_t num_terms = qk_obs_num_terms(obs);
- complex double *coeffs = qk_obs_coeffs(obs);
+ QkComplex64 *coeffs = qk_obs_coeffs(obs);
for (size_t i = 0; i < num_terms; i++) {
- printf("%f + i%f\n", creal(coeffs[i]), cimag(coeffs[i]));
+ printf("%f + i%f\n", coeffs[i].re, coeffs[i].im);
}
```
@@ -488,14 +487,16 @@ for (size_t i = 0; i < num_terms; i++) {
#### Example
+
+
```c
uint32_t num_qubits = 100;
QkObs *obs = qk_obs_zero(num_qubits);
- complex double coeff = 1;
+ QkComplex64 coeff = {1, 0};
QkBitTerm bit_terms[3] = {QkBitTerm_X, QkBitTerm_Y, QkBitTerm_Z};
- uint32_t indices[3] = {0, 1, 2};
- QkObsTerm term = {&coeff, 3, bit_terms, indices, num_qubits};
+ uint32_t term_indices[3] = {0, 1, 2};
+ QkObsTerm term = {coeff, 3, bit_terms, term_indices, num_qubits};
qk_obs_add_term(obs, &term);
size_t len = qk_obs_len(obs);
@@ -504,7 +505,9 @@ for (size_t i = 0; i < num_terms; i++) {
for (size_t i = 0; i < len; i++) {
printf("index %i: %i\n", i, indices[i]);
}
+ ```
+ ```c
qk_obs_free(obs);
```
@@ -540,14 +543,14 @@ for (size_t i = 0; i < num_terms; i++) {
uint32_t num_qubits = 100;
QkObs *obs = qk_obs_zero(num_qubits);
- complex double coeff = 1;
+ QkComplex64 coeff = {1, 0};
QkBitTerm bit_terms[3] = {QkBitTerm_X, QkBitTerm_Y, QkBitTerm_Z};
uint32_t indices[3] = {0, 1, 2};
- QkObsTerm term = {&coeff, 3, bit_terms, indices, num_qubits};
+ QkObsTerm term = {coeff, 3, bit_terms, indices, num_qubits};
qk_obs_add_term(obs, &term);
size_t num_terms = qk_obs_num_terms(obs);
- uint32_t *boundaries = qk_obs_boundaries(obs);
+ uintptr_t *boundaries = qk_obs_boundaries(obs);
for (size_t i = 0; i < num_terms + 1; i++) {
printf("boundary %i: %i\n", i, boundaries[i]);
@@ -586,10 +589,10 @@ for (size_t i = 0; i < num_terms; i++) {
uint32_t num_qubits = 100;
QkObs *obs = qk_obs_zero(num_qubits);
- complex double coeff = 1;
+ QkComplex64 coeff = {1, 0};
QkBitTerm bit_terms[3] = {QkBitTerm_X, QkBitTerm_Y, QkBitTerm_Z};
uint32_t indices[3] = {0, 1, 2};
- QkObsTerm term = {&coeff, 3, bit_terms, indices, num_qubits};
+ QkObsTerm term = {coeff, 3, bit_terms, indices, num_qubits};
qk_obs_add_term(obs, &term);
size_t len = qk_obs_len(obs);
@@ -630,7 +633,7 @@ for (size_t i = 0; i < num_terms; i++) {
```c
QkObs *obs = qk_obs_identity(100);
- complex double coeff = 2;
+ QkComplex64 coeff = {2, 0};
QkObs *result = qk_obs_multiply(obs, &coeff);
```
@@ -643,7 +646,7 @@ for (size_t i = 0; i < num_terms; i++) {
Behavior is undefined if any of the following is violated
* `obs` is a valid, non-null pointer to a `QkObs`
- * `coeff` is a valid, non-null pointer to a `complex double`
+ * `coeff` is a valid, non-null pointer to a `QkComplex64`
**Parameters**
@@ -770,7 +773,7 @@ for (size_t i = 0; i < num_terms; i++) {
QkObs *two = qk_obs_add(iden, iden);
double tol = 1e-6;
- QkObs *canonical = qk_obs_canonicalize(two);
+ QkObs *canonical = qk_obs_canonicalize(two, tol);
```
diff --git a/docs/api/qiskit-c/dev/qk-quantum-register.mdx b/docs/api/qiskit-c/dev/qk-quantum-register.mdx
index 882e9418f47..29d24ba39e2 100644
--- a/docs/api/qiskit-c/dev/qk-quantum-register.mdx
+++ b/docs/api/qiskit-c/dev/qk-quantum-register.mdx
@@ -16,10 +16,22 @@ A common way to instantiate several bits at once is to create a register. A regi
You can create a register by calling `qk_quantum_register_new()`, for example:
+```c
+#include
+
+QkQuantumRegister *qreg = qk_quantum_register_new(5, "my_qreg");
+```
+
Which creates a new 5 qubit register named `"my_qreg"`.
Then to add the register to a circuit you use the `qk_circuit_add_quantum_register()` function:
+```c
+QkCircuit *qc = qk_circuit_new(0, 0);
+qk_circuit_add_quantum_register(qc, qreg);
+uint32_t num_qubits = qk_circuit_num_qubits(qc); // 5
+```
+
While circuits track registers, the registers themselves impart almost no behavioral differences on circuits.
## Functions
diff --git a/docs/api/qiskit-c/dev/qk-target-entry.mdx b/docs/api/qiskit-c/dev/qk-target-entry.mdx
index e233cb11fd8..379e2da0ad1 100644
--- a/docs/api/qiskit-c/dev/qk-target-entry.mdx
+++ b/docs/api/qiskit-c/dev/qk-target-entry.mdx
@@ -25,10 +25,10 @@ QkTargetEntry *entry = qk_target_entry_new(QkGate_CX);
// Add mapping between (0,1) and properties duration of 10e-9 and unknown error.
uint32_t qargs[2] = {0, 1};
-qk_target_entry_add(entry, qargs, 2, 10e-9, NAN);
+qk_target_entry_add_property(entry, qargs, 2, 10e-9, NAN);
// Add mapping between Global, and no set duration NAN and error of 0.003)
-qk_target_entry_add(entry, NULL, 0, NAN, 0.003);
+qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003);
```
## Functions
@@ -36,9 +36,9 @@ qk_target_entry_add(entry, NULL, 0, NAN, 0.003);
### qk\_target\_entry\_new
- Creates an entry to the `QkTarget` based on a `QkGate` instance with no parameters.
+ Creates an entry to the `QkTarget` based on a `QkGate` instance.
-
+
#### Example
@@ -46,13 +46,9 @@ qk_target_entry_add(entry, NULL, 0, NAN, 0.003);
QkTargetEntry *entry = qk_target_entry_new(QkGate_H);
```
-
- If the instance of `QkGate` uses fixed parameters, use `qk_target_entry_new_fixed`. Regular parameters are not currently supported.
-
-
**Parameters**
- **operation** – The `QkGate` whose properties this target entry defines.
+ **operation** – The `QkGate` whose properties this target entry defines. If the `QkGate` takes parameters (which can be checked with `qk_gate_num_params`) it will be added as a an instruction on the target which accepts any parameter value. If the gate only accepts a fixed parameter value you can use `qk_target_entry_new_fixed` instead.
**Returns**
@@ -64,7 +60,7 @@ qk_target_entry_add(entry, NULL, 0, NAN, 0.003);
Creates a new entry for adding a measurement instruction to a `QkTarget`.
-
+
#### Example
@@ -92,7 +88,7 @@ qk_target_entry_add(entry, NULL, 0, NAN, 0.003);
Creates a new entry for adding a reset instruction to a `QkTarget`.
-
+
#### Example
@@ -118,24 +114,24 @@ qk_target_entry_add(entry, NULL, 0, NAN, 0.003);
### qk\_target\_entry\_new\_fixed
- Creates an entry to the `QkTarget` based on a `QkGate` instance with no parameters.
+ Creates an entry in the `QkTarget` based on a `QkGate` instance with no parameters.
-
+
#### Example
```c
double crx_params[1] = {3.14};
- QkTargetEntry *entry = qk_target_entry_new(QkGate_CRX, crx_params);
+ QkTargetEntry *entry = qk_target_entry_new_fixed(QkGate_CRX, crx_params);
```
-
+
#### Safety
-
+
- The `params` type is expected to be a pointer to an array of `double` where the length matches the the expectations of the `QkGate`. If the array is insufficently 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.
+ 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.
Adding a `QkGate` with regular parameters is not currently supported.
@@ -156,7 +152,7 @@ qk_target_entry_add(entry, NULL, 0, NAN, 0.003);
Retrieves the number of properties stored in the target entry.
-
+
#### Example
@@ -166,11 +162,11 @@ qk_target_entry_add(entry, NULL, 0, NAN, 0.003);
size_t props_size = qk_target_entry_num_properties(entry);
```
-
+
#### Safety
-
+
The behavior is undefined if `entry` is not a valid, non-null pointer to a `QkTargetEntry` object.
@@ -188,7 +184,7 @@ qk_target_entry_add(entry, NULL, 0, NAN, 0.003);
Frees the entry.
-
+
#### Example
@@ -197,11 +193,11 @@ qk_target_entry_add(entry, NULL, 0, NAN, 0.003);
qk_target_entry_free(entry);
```
-
+
#### Safety
-
+
The behavior is undefined if `entry` is not a valid, non-null pointer to a `QkTargetEntry` object.
@@ -219,7 +215,7 @@ qk_target_entry_add(entry, NULL, 0, NAN, 0.003);
Adds an instruction property instance based on its assigned qargs.
-
+
#### Example
@@ -229,11 +225,11 @@ qk_target_entry_add(entry, NULL, 0, NAN, 0.003);
qk_target_entry_add_property(entry, qargs, 2, 0.0, 0.1);
```
-
+
#### Safety
-
+
The behavior is undefined if `entry` is not a valid, non-null pointer to a `QkTargetEntry` object.
diff --git a/docs/api/qiskit-c/dev/qk-target.mdx b/docs/api/qiskit-c/dev/qk-target.mdx
index 775df13638d..40a9675b21e 100644
--- a/docs/api/qiskit-c/dev/qk-target.mdx
+++ b/docs/api/qiskit-c/dev/qk-target.mdx
@@ -12,7 +12,7 @@ python_api_name: QkTarget
typedef struct QkTarget QkTarget
```
-A mapping of instructions and properties representing the partiucular constraints of a backend. Its purpose is to provide the compiler with information that allows it to compile an input circuit into another that is optimized taking in consideration the `QkTarget`’s specifications. This structure represents a low level interface to the main Target data structure in Rust, which represents the base class for its Python counterpart, [`Target`](/docs/api/qiskit/dev/qiskit.transpiler.Target#qiskit.transpiler.Target "qiskit.transpiler.Target").
+A mapping of instructions and properties representing the particular constraints of a backend. Its purpose is to provide the compiler with information that allows it to compile an input circuit into another that is optimized taking in consideration the `QkTarget`’s specifications. This structure represents a low level interface to the main Target data structure in Rust, which represents the base class for its Python counterpart, [`Target`](/docs/api/qiskit/dev/qiskit.transpiler.Target#qiskit.transpiler.Target "qiskit.transpiler.Target").
Here’s an example of how this structure works:
@@ -27,7 +27,7 @@ QkTarget *target = qk_target_new(2);
// error = NaN
uint32_t qargs[2] = {0, 1};
QkTargetEntry *entry = qk_target_entry_new(QkGate_CX);
-qk_target_entry_add(entry, qargs, 2, 0.0123, NAN);
+qk_target_entry_add_property(entry, qargs, 2, 0.0123, NAN);
// Add a CX Gate to the target
qk_target_add_instruction(target, entry);
@@ -48,7 +48,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei
Construct a new `QkTarget` with the given number of qubits. The number of qubits is bound to change if an instruction is added with properties that apply to a collection of qargs in which any index is higher than the specified number of qubits
-
+
#### Example
@@ -70,7 +70,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei
Returns the number of qubits of this `QkTarget`.
-
+
#### Example
@@ -79,11 +79,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei
uint32_t num_qubits = qk_target_num_qubits(target);
```
-
+
#### Safety
-
+
Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`.
@@ -101,7 +101,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei
Returns the dt value of this `QkTarget`.
-
+
#### Example
@@ -111,11 +111,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei
double dt = qk_target_dt(target);
```
-
+
#### Safety
-
+
Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`.
@@ -125,7 +125,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei
**Returns**
- The dt value of this `QkTarget` or `NaN` if not assigned.
+ The dt value of this `QkTarget` or `NAN` if not assigned.
### qk\_target\_granularity
@@ -133,7 +133,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei
Returns the granularity value of this `QkTarget`.
-
+
#### Example
@@ -143,11 +143,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei
uint32_t granularity = qk_target_granularity(target);
```
-
+
#### Safety
-
+
Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`.
@@ -165,7 +165,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei
Returns the `min_length` value of this `QkTarget`.
-
+
#### Example
@@ -175,11 +175,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei
size_t min_length = qk_target_min_length(target);
```
-
+
#### Safety
-
+
Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`.
@@ -197,7 +197,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei
Returns the `pulse_alignment` value of this `QkTarget`.
-
+
#### Example
@@ -207,11 +207,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei
uint32_t pulse_alignment = qk_target_pulse_alignment(target);
```
-
+
#### Safety
-
+
Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`.
@@ -229,7 +229,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei
Returns the `acquire_alignment` value of this `QkTarget`.
-
+
#### Example
@@ -239,11 +239,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei
uint32_t acquire_alignment = qk_target_pulse_alignment(target);
```
-
+
#### Safety
-
+
Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`.
@@ -261,7 +261,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei
Sets the dt value of this `QkTarget`.
-
+
#### Example
@@ -270,11 +270,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei
double dt = qk_target_set_dt(target, 10e-9);
```
-
+
#### Safety
-
+
Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`.
@@ -293,7 +293,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei
Sets the `granularity` value of this `QkTarget`.
-
+
#### Example
@@ -303,11 +303,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei
qk_target_set_granularity(target, 2);
```
-
+
#### Safety
-
+
Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`.
@@ -326,7 +326,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei
Sets the `min_length` value of this `QkTarget`.
-
+
#### Example
@@ -336,11 +336,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei
qk_target_set_min_length(target, 3);
```
-
+
#### Safety
-
+
Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`.
@@ -359,7 +359,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei
Returns the `pulse_alignment` value of this `QkTarget`.
-
+
#### Example
@@ -369,11 +369,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei
qk_target_set_pulse_alignment(target, 4);
```
-
+
#### Safety
-
+
Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`.
@@ -392,19 +392,21 @@ The Target C API currently only supports additions of `QkGate` instances with ei
Sets the `acquire_alignment` value of this `QkTarget`.
-
+
#### Example
-
-
- QkTarget \*target = qk\_target\_new(5); // The value defaults to 0 qk\_target\_set\_acquire\_alignment(target, 5);
+ ```c
+ QkTarget *target = qk_target_new(5);
+ // The value defaults to 0
+ qk_target_set_acquire_alignment(target, 5);
+ ```
-
+
#### Safety
-
+
Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`.
@@ -423,7 +425,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei
Creates a copy of the `QkTarget`.
-
+
#### Example
@@ -437,11 +439,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei
QkTarget *copied = qk_target_copy(target);
```
-
+
#### Safety
-
+
Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`.
@@ -459,7 +461,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei
Free the `QkTarget`.
-
+
#### Example
@@ -468,11 +470,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei
qk_target_free(target);
```
-
+
#### Safety
-
+
Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`.
@@ -486,7 +488,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei
Adds a gate to the `QkTarget` through a `QkTargetEntry`.
-
+
#### Example
@@ -498,11 +500,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei
QkExitCode result = qk_target_add_instruction(target, entry);
```
-
+
#### Safety
-
+
Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`.
@@ -523,7 +525,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei
Modifies the properties of a gate in the `QkTarget`.
-
+
#### Example
@@ -535,18 +537,18 @@ The Target C API currently only supports additions of `QkGate` instances with ei
qk_target_entry_add_property(entry, qargs, 2, 0.0, 0.1);
qk_target_add_instruction(target, entry);
- qk_target_update_property(target, QkGate_CRX, qargs, 2, 0.0012, 1.1)
+ qk_target_update_property(target, QkGate_CRX, qargs, 2, 0.0012, 1.1);
```
-
+
#### Safety
-
+
Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`.
- The `qargs` type is expected to be a pointer to an array of `uint32_t` where the length matches is specified by `num_qubits` and has to match the expectation of the gate. If the array is insufficently 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 qubits for a given gate. You can check `qk_gate_num_qubits` to determine how many qubits are required for a given gate.
+ The `qargs` type is expected to be a pointer to an array of `uint32_t` where the length matches is specified by `num_qubits` and has to match the expectation of the gate. 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 qubits for a given gate. You can check `qk_gate_num_qubits` to determine how many qubits are required for a given gate.
**Parameters**
@@ -567,23 +569,23 @@ The Target C API currently only supports additions of `QkGate` instances with ei
Returns the number of instructions tracked by a `QkTarget`.
-
+
#### Example
```c
QkTarget *target = qk_target_new(5);
- QkTargetEntry *target_enty = qk_target_entry_new(QkGate_H);
+ QkTargetEntry *target_entry = qk_target_entry_new(QkGate_H);
qk_target_add_instruction(target, target_entry);
size_t num_instructions = qk_target_num_instructions(target);
```
-
+
#### Safety
-
+
Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`.
diff --git a/docs/api/qiskit-c/dev/qk-transpiler-passes.mdx b/docs/api/qiskit-c/dev/qk-transpiler-passes.mdx
index c562042800d..a40d8604643 100644
--- a/docs/api/qiskit-c/dev/qk-transpiler-passes.mdx
+++ b/docs/api/qiskit-c/dev/qk-transpiler-passes.mdx
@@ -18,6 +18,109 @@ The Qiskit C API provides functions that execute transpiler passes in a standalo
## Functions
+### qk\_transpiler\_pass\_standalone\_elide\_permutations
+
+
+ Run the ElidePermutations transpiler pass on a circuit.
+
+ The ElidePermutations transpiler pass removes any permutation operations from a pre-layout circuit.
+
+ This pass is intended to be run before a layout (mapping virtual qubits to physical qubits) is set during the transpilation pipeline. This pass iterates over the circuit and when a Swap gate is encountered it permutes the virtual qubits in the circuit and removes the swap gate. This will effectively remove any swap gates in the circuit prior to running layout. This optimization is not valid after a layout has been set and should not be run in this case.
+
+
+
+ #### Example
+
+ ```c
+ QkCircuit *qc = qk_circuit_new(4, 0);
+ for (uint32_t i = 0; i < qk_circuit_num_qubits(qc) - 1; i++) {
+ uint32_t qargs[2] = {i, i + 1};
+ for (uint32_t j = 0; j
+
+ #### Safety
+
+
+
+ Behavior is undefined if `circuit` is not a valid, non-null pointer to a `QkCircuit`.
+
+ **Parameters**
+
+ **circuit** – A pointer to the circuit to run ElidePermutations on
+
+ **Returns**
+
+ QkElidePermutationsResult object that contains the results of the pass
+
+
+### qk\_transpiler\_pass\_standalone\_remove\_identity\_equivalent
+
+
+ Run the RemoveIdentityEquivalent transpiler pass on a circuit.
+
+ Removes gates whose effect is close to an identity operation up to a global phase and up to the specified tolerance. Parameterized gates are not considered by this pass.
+
+ For a cutoff fidelity $f$, this pass removes gates whose average gate fidelity with respect to the identity is below $f$. Concretely, a gate $G$ is removed if $\bar F < f$ where
+
+$$
+
+bar{F} = \frac{1 + d F_{\text{process}}}{1 + d},\
+
+F_{\text{process}} = \frac{|\mathrm{Tr}(G)|^2}{d^2}
+
+$$
+
+ where $d = 2^n$ is the dimension of the gate for $n$ qubits.
+
+
+
+ #### Example
+
+ ```c
+ QkTarget *target = qk_target_new(5);
+ uint32_t current_num_qubits = qk_target_num_qubits(target);
+ QkTargetEntry *cx_entry = qk_target_entry_new(QkGate_CX);
+ for (uint32_t i = 0; i < current_num_qubits - 1; i++) {
+ uint32_t qargs[2] = {i, i + 1};
+ double inst_error = 0.0090393 * (current_num_qubits - i);
+ double inst_duration = 0.020039;
+ qk_target_entry_add_property(cx_entry, qargs, 2, inst_duration, inst_error);
+ }
+ QkExitCode result_cx = qk_target_add_instruction(target, cx_entry);
+ QkCircuit *qc = qk_circuit_new(4, 0);
+ for (uint32_t i = 0; i < qk_circuit_num_qubits(qc) - 1; i++) {
+ uint32_t qargs[2] = {i, i + 1};
+ for (uint32_t j = 0; j
+
+ #### Safety
+
+
+
+ Behavior is undefined if `circuit` or `target` is not a valid, non-null pointer to a `QkCircuit` and `QkTarget`.
+
+ **Parameters**
+
+ * **circuit** – A pointer to the circuit to run RemoveIdentityEquivalent on. This circuit pointed to will be updated with the modified circuit if the pass is able to remove any gates.
+ * **target** – The target for the RemoveIdentityEquivalent pass. If `approximation_degree` is set to `NAN` the tolerance for determining whether an operation is equivalent to identity will be set to the reported error rate in the target. Otherwise the `target` is not used as the tolerance is independent of the target.
+ * **approximation\_degree** – The degree to approximate for the equivalence check. This can be a floating point value between 0 and 1, or `NAN`. If the value is 1 this does not approximate above the floating point precision. For a value \< 1 this is used as a scaling factor for the cutoff fidelity. If the value is `NAN` this approximates up to the fidelity for the gate specified in `target`.
+
+
### qk\_transpiler\_pass\_standalone\_vf2\_layout
@@ -29,12 +132,13 @@ The Qiskit C API provides functions that execute transpiler passes in a standalo
By default, this pass will construct a heuristic scoring map based on the error rates in the provided `target` argument. The function will continue searching for layouts and use the heuristic scoring to return the layout which will run with the best estimated fidelity.
-
+
#### Example
```c
- QkTarget *target = qk_target_new(5)
+ QkTarget *target = qk_target_new(5);
+ uint32_t current_num_qubits = qk_target_num_qubits(target);
QkTargetEntry *cx_entry = qk_target_entry_new(QkGate_CX);
for (uint32_t i = 0; i < current_num_qubits - 1; i++) {
uint32_t qargs[2] = {i, i + 1};
@@ -54,11 +158,11 @@ The Qiskit C API provides functions that execute transpiler passes in a standalo
qk_vf2_layout_result_free(layout_result);
```
-
+
#### Safety
-
+
Behavior is undefined if `circuit` or `target` is not a valid, non-null pointer to a `QkCircuit` and `QkTarget`.
@@ -66,7 +170,7 @@ The Qiskit C API provides functions that execute transpiler passes in a standalo
* **circuit** – A pointer to the circuit to run VF2Layout on
* **target** – A pointer to the target to run the VF2Layout pass on
- * **strict\_direction** – If true the pass will consider the edge direction in the connectivity described in the `target`. Typically setting this to `false` is desireable as an undirected search has more degrees of freedom and is more likely to find a layout (or a better layout if there are multiple choices) and correcting directionality is a simple operation for later transpilation stages.
+ * **strict\_direction** – If true the pass will consider the edge direction in the connectivity described in the `target`. Typically setting this to `false` is desirable as an undirected search has more degrees of freedom and is more likely to find a layout (or a better layout if there are multiple choices) and correcting directionality is a simple operation for later transpilation stages.
* **call\_limit** – The number of state visits to attempt in each execution of the VF2 algorithm. If the value is set to a negative value the VF2 algorithm will run without any limit.
* **time\_limit** – The total time in seconds to run for `VF2Layout`. This is checked after each layout search so it is not a hard time limit, but a soft limit that when checked if the set time has elapsed the function will return the best layout it has found so far. Set this to a value less than or equal to 0.0 to run without any time limit.
* **max\_trials** – The maximum number of trials to run the VF2 algorithm to try and find layouts. If the value is negative this will be treated as unbounded which means the algorithm will run until all possible layouts are scored. If the value is 0 the number of trials will be limited based on the number of edges in the interaction or the coupling graph (whichever is larger).
diff --git a/docs/api/qiskit-c/dev/qk-vf-2-layout-result.mdx b/docs/api/qiskit-c/dev/qk-vf-2-layout-result.mdx
index 49b4838ca84..add6e944ab4 100644
--- a/docs/api/qiskit-c/dev/qk-vf-2-layout-result.mdx
+++ b/docs/api/qiskit-c/dev/qk-vf-2-layout-result.mdx
@@ -21,11 +21,11 @@ When running the `qk_transpiler_pass_standalone_vf2_layout` function it returns
Check whether a result was found.
-
+
#### Safety
-
+
Behavior is undefined if `layout` is not a valid, non-null pointer to a `QkVF2LayoutResult`.
@@ -43,11 +43,11 @@ When running the `qk_transpiler_pass_standalone_vf2_layout` function it returns
Get the number of virtual qubits in the layout.
-
+
#### Safety
-
+
Behavior is undefined if `layout` is not a valid, non-null pointer to a `QkVF2LayoutResult`. The result must have a layout found.
@@ -65,11 +65,11 @@ When running the `qk_transpiler_pass_standalone_vf2_layout` function it returns
Get the physical qubit for a given virtual qubit
-
+
#### Safety
-
+
Behavior is undefined if `layout` is not a valid, non-null pointer to a `QkVF2LayoutResult`. Also qubit must be a valid qubit for the circuit and there must be a result found.
@@ -88,7 +88,7 @@ When running the `qk_transpiler_pass_standalone_vf2_layout` function it returns
Free a `QkVF2LayoutResult` object
-
+
#### Example
@@ -96,11 +96,11 @@ When running the `qk_transpiler_pass_standalone_vf2_layout` function it returns
QkCircuit *qc = qk_circuit_new(1, 0);
```
-
+
#### Safety
-
+
Behavior is undefined if `layout` is not a valid, non-null pointer to a `QkVF2Layout`.
diff --git a/docs/api/qiskit-ibm-runtime/dev/execution-span-double-slice-span.mdx b/docs/api/qiskit-ibm-runtime/dev/execution-span-double-slice-span.mdx
index 659ec9a74c5..a40284d933b 100644
--- a/docs/api/qiskit-ibm-runtime/dev/execution-span-double-slice-span.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/execution-span-double-slice-span.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_runtime.execution_span.DoubleSliceSpan
# DoubleSliceSpan
-
+
Bases: [`ExecutionSpan`](execution-span-execution-span "qiskit_ibm_runtime.execution_span.execution_span.ExecutionSpan")
An [`ExecutionSpan`](execution-span-execution-span "qiskit_ibm_runtime.execution_span.ExecutionSpan") for data stored in a sliceable format.
@@ -53,7 +53,7 @@ python_api_name: qiskit_ibm_runtime.execution_span.DoubleSliceSpan
### contains\_pub
-
+
Return whether the pub with the given index has data with dependence on this span.
**Parameters**
@@ -71,7 +71,7 @@ python_api_name: qiskit_ibm_runtime.execution_span.DoubleSliceSpan
### filter\_by\_pub
-
+
Return a new span whose slices are filtered to the provided pub indices.
For example, if this span contains slice information for pubs with indices 1, 3, 4 and `[1, 4]` is provided, then the span returned by this method will contain slice information for only those two indices, but be identical otherwise.
@@ -91,7 +91,7 @@ python_api_name: qiskit_ibm_runtime.execution_span.DoubleSliceSpan
### mask
-
+
Return an array-valued mask specifying which parts of a pub result depend on this span.
**Parameters**
@@ -102,6 +102,10 @@ python_api_name: qiskit_ibm_runtime.execution_span.DoubleSliceSpan
An array with the same shape as the pub data.
+ **Raises**
+
+ **KeyError** – if the pub is not included in the span
+
**Return type**
[*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray "(in NumPy v2.3)")\[*Any*, [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype "(in NumPy v2.3)")\[[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool "(in NumPy v2.3)")]]
diff --git a/docs/api/qiskit-ibm-runtime/dev/execution-span-execution-span.mdx b/docs/api/qiskit-ibm-runtime/dev/execution-span-execution-span.mdx
index 8337b23d430..feec9309710 100644
--- a/docs/api/qiskit-ibm-runtime/dev/execution-span-execution-span.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/execution-span-execution-span.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_runtime.execution_span.ExecutionSpan
# ExecutionSpan
-
+
Bases: `ABC`
Abstract parent for classes that store an execution time span for a subset of job data.
@@ -66,7 +66,7 @@ python_api_name: qiskit_ibm_runtime.execution_span.ExecutionSpan
### contains\_pub
-
+
Return whether the pub with the given index has data with dependence on this span.
**Parameters**
@@ -84,7 +84,7 @@ python_api_name: qiskit_ibm_runtime.execution_span.ExecutionSpan
### filter\_by\_pub
-
+
Return a new span whose slices are filtered to the provided pub indices.
For example, if this span contains slice information for pubs with indices 1, 3, 4 and `[1, 4]` is provided, then the span returned by this method will contain slice information for only those two indices, but be identical otherwise.
@@ -104,7 +104,7 @@ python_api_name: qiskit_ibm_runtime.execution_span.ExecutionSpan
### mask
-
+
Return an array-valued mask specifying which parts of a pub result depend on this span.
**Parameters**
@@ -115,6 +115,10 @@ python_api_name: qiskit_ibm_runtime.execution_span.ExecutionSpan
An array with the same shape as the pub data.
+ **Raises**
+
+ **KeyError** – if the pub is not included in the span
+
**Return type**
[*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray "(in NumPy v2.3)")\[*Any*, [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype "(in NumPy v2.3)")\[[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool "(in NumPy v2.3)")]]
diff --git a/docs/api/qiskit-ibm-runtime/dev/execution-span-slice-span.mdx b/docs/api/qiskit-ibm-runtime/dev/execution-span-slice-span.mdx
index 0abc0fd67c7..ba38b3d53cb 100644
--- a/docs/api/qiskit-ibm-runtime/dev/execution-span-slice-span.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/execution-span-slice-span.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_runtime.execution_span.SliceSpan
# SliceSpan
-
+
Bases: [`ExecutionSpan`](execution-span-execution-span "qiskit_ibm_runtime.execution_span.execution_span.ExecutionSpan")
An [`ExecutionSpan`](execution-span-execution-span "qiskit_ibm_runtime.execution_span.ExecutionSpan") for data stored in a sliceable format.
@@ -53,7 +53,7 @@ python_api_name: qiskit_ibm_runtime.execution_span.SliceSpan
### contains\_pub
-
+
Return whether the pub with the given index has data with dependence on this span.
**Parameters**
@@ -71,7 +71,7 @@ python_api_name: qiskit_ibm_runtime.execution_span.SliceSpan
### filter\_by\_pub
-
+
Return a new span whose slices are filtered to the provided pub indices.
For example, if this span contains slice information for pubs with indices 1, 3, 4 and `[1, 4]` is provided, then the span returned by this method will contain slice information for only those two indices, but be identical otherwise.
@@ -91,7 +91,7 @@ python_api_name: qiskit_ibm_runtime.execution_span.SliceSpan
### mask
-
+
Return an array-valued mask specifying which parts of a pub result depend on this span.
**Parameters**
@@ -102,6 +102,10 @@ python_api_name: qiskit_ibm_runtime.execution_span.SliceSpan
An array with the same shape as the pub data.
+ **Raises**
+
+ **KeyError** – if the pub is not included in the span
+
**Return type**
[*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray "(in NumPy v2.3)")\[*Any*, [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype "(in NumPy v2.3)")\[[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool "(in NumPy v2.3)")]]
diff --git a/docs/api/qiskit-ibm-runtime/dev/execution-span-twirled-slice-span.mdx b/docs/api/qiskit-ibm-runtime/dev/execution-span-twirled-slice-span.mdx
index f8f7e2d55b3..3b6cc71807d 100644
--- a/docs/api/qiskit-ibm-runtime/dev/execution-span-twirled-slice-span.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/execution-span-twirled-slice-span.mdx
@@ -8,12 +8,12 @@ python_api_name: qiskit_ibm_runtime.execution_span.TwirledSliceSpan
# TwirledSliceSpan
-
+
Bases: [`ExecutionSpan`](execution-span-execution-span "qiskit_ibm_runtime.execution_span.execution_span.ExecutionSpan")
An [`ExecutionSpan`](execution-span-execution-span "qiskit_ibm_runtime.execution_span.ExecutionSpan") for data stored in a sliceable format when twirling.
- This type of execution span references pub result data that came from a twirled sampler experiment which was executed by either prepending or appending an axis to paramater values to account for twirling. Concretely, `data_slices` is a map from pub slices to tuples `(twirled_shape, at_front, shape_slice, shots_slice)` where
+ This type of execution span references pub result data that came from a twirled sampler experiment which was executed by either prepending or appending an axis to parameter values to account for twirling. Concretely, `data_slices` is a map from pub slices to tuples `(twirled_shape, at_front, shape_slice, shots_slice)` where
* `twirled_shape` is the shape tuple including a twirling axis, and where the last axis is shots per randomization,
* `at_front` is whether `num_randomizations` is at the front of the tuple, as opposed to right before the `shots` axis at the end,
@@ -24,7 +24,7 @@ python_api_name: qiskit_ibm_runtime.execution_span.TwirledSliceSpan
* **start** (*datetime*) – The start time of the span, in UTC.
* **stop** (*datetime*) – The stop time of the span, in UTC.
- * **data\_slices** (*dict\[int, tuple\[ShapeType, bool, slice, slice]]*) – A map from pub indices to length-4 tuples described above.
+ * **data\_slices** (*Mapping\[int, tuple\[ShapeType, bool, slice, slice]]*) – A map from pub indices to length-4 tuples described above.
## Attributes
@@ -58,7 +58,7 @@ python_api_name: qiskit_ibm_runtime.execution_span.TwirledSliceSpan
### contains\_pub
-
+
Return whether the pub with the given index has data with dependence on this span.
**Parameters**
@@ -76,7 +76,7 @@ python_api_name: qiskit_ibm_runtime.execution_span.TwirledSliceSpan
### filter\_by\_pub
-
+
Return a new span whose slices are filtered to the provided pub indices.
For example, if this span contains slice information for pubs with indices 1, 3, 4 and `[1, 4]` is provided, then the span returned by this method will contain slice information for only those two indices, but be identical otherwise.
@@ -96,7 +96,7 @@ python_api_name: qiskit_ibm_runtime.execution_span.TwirledSliceSpan
### mask
-
+
Return an array-valued mask specifying which parts of a pub result depend on this span.
**Parameters**
@@ -107,6 +107,10 @@ python_api_name: qiskit_ibm_runtime.execution_span.TwirledSliceSpan
An array with the same shape as the pub data.
+ **Raises**
+
+ **KeyError** – if the pub is not included in the span
+
**Return type**
[*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray "(in NumPy v2.3)")\[*Any*, [*dtype*](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype "(in NumPy v2.3)")\[[*bool*](https://numpy.org/doc/stable/reference/arrays.scalars.html#numpy.bool "(in NumPy v2.3)")]]
diff --git a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-algiers.mdx b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-algiers.mdx
index 833c02a3d17..b3bc9b497f0 100644
--- a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-algiers.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-algiers.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAlgiers
# FakeAlgiers
-
+
Bases: `FakeBackendV2`
A fake 27 qubit backend.
@@ -31,10 +31,6 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAlgiers
Return the [`CouplingMap`](/docs/api/qiskit/qiskit.transpiler.CouplingMap "(in Qiskit v2.1)") object
- ### defs\_filename
-
-
-
### dirname
@@ -181,7 +177,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAlgiers
### check\_faulty
-
+
Check if the input circuit uses faulty qubits or edges.
**Parameters**
@@ -199,7 +195,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAlgiers
### configuration
-
+
Return the backend configuration.
**Return type**
@@ -207,27 +203,9 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAlgiers
*QasmBackendConfiguration*
- ### defaults
-
-
- (DEPRECATED)Return the pulse defaults for the backend
-
- **Parameters**
-
- **refresh** (*bool*) – If `True`, re-retrieve the backend defaults from the local file.
-
- **Returns**
-
- The backend pulse defaults or `None` if the backend does not support pulse.
-
- **Return type**
-
- *PulseDefaults*
-
-
### properties
-
+
Return the backend properties
**Parameters**
@@ -269,7 +247,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAlgiers
### refresh
-
+
Update the data files from its real counterpart
This method pulls the latest backend data files from their real counterpart and overwrites the corresponding files in the local installation:
@@ -282,7 +260,8 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAlgiers
**Parameters**
- **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **use\_fractional\_gates** (*bool*) – Set True to allow for the backends to include fractional gates.
**Raises**
@@ -296,7 +275,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAlgiers
### run
-
+
Run on the fake backend using a simulator.
This method runs circuit jobs (an individual or a list of QuantumCircuit) using BasicSimulator or Aer simulator and returns a [`Job`](/docs/api/qiskit/qiskit.providers.Job "(in Qiskit v2.1)") object.
@@ -337,7 +316,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAlgiers
### status
-
+
Return the backend status.
**Returns**
diff --git a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-almaden-v2.mdx b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-almaden-v2.mdx
index 46c46f3bafd..00da1b5bde2 100644
--- a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-almaden-v2.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-almaden-v2.mdx
@@ -41,10 +41,6 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAlmadenV2
Return the [`CouplingMap`](/docs/api/qiskit/qiskit.transpiler.CouplingMap "(in Qiskit v2.1)") object
- ### defs\_filename
-
-
-
### dirname
@@ -191,7 +187,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAlmadenV2
### check\_faulty
-
+
Check if the input circuit uses faulty qubits or edges.
**Parameters**
@@ -209,7 +205,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAlmadenV2
### configuration
-
+
Return the backend configuration.
**Return type**
@@ -217,27 +213,9 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAlmadenV2
*QasmBackendConfiguration*
- ### defaults
-
-
- (DEPRECATED)Return the pulse defaults for the backend
-
- **Parameters**
-
- **refresh** (*bool*) – If `True`, re-retrieve the backend defaults from the local file.
-
- **Returns**
-
- The backend pulse defaults or `None` if the backend does not support pulse.
-
- **Return type**
-
- *PulseDefaults*
-
-
### properties
-
+
Return the backend properties
**Parameters**
@@ -279,7 +257,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAlmadenV2
### refresh
-
+
Update the data files from its real counterpart
This method pulls the latest backend data files from their real counterpart and overwrites the corresponding files in the local installation:
@@ -292,7 +270,8 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAlmadenV2
**Parameters**
- **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **use\_fractional\_gates** (*bool*) – Set True to allow for the backends to include fractional gates.
**Raises**
@@ -306,7 +285,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAlmadenV2
### run
-
+
Run on the fake backend using a simulator.
This method runs circuit jobs (an individual or a list of QuantumCircuit) using BasicSimulator or Aer simulator and returns a [`Job`](/docs/api/qiskit/qiskit.providers.Job "(in Qiskit v2.1)") object.
@@ -347,7 +326,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAlmadenV2
### status
-
+
Return the backend status.
**Returns**
diff --git a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-armonk-v2.mdx b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-armonk-v2.mdx
index 1d792739f85..433e8592558 100644
--- a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-armonk-v2.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-armonk-v2.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeArmonkV2
# FakeArmonkV2
-
+
Bases: `FakeBackendV2`
A fake 1 qubit backend.
@@ -35,10 +35,6 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeArmonkV2
Return the [`CouplingMap`](/docs/api/qiskit/qiskit.transpiler.CouplingMap "(in Qiskit v2.1)") object
- ### defs\_filename
-
-
-
### dirname
@@ -185,7 +181,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeArmonkV2
### check\_faulty
-
+
Check if the input circuit uses faulty qubits or edges.
**Parameters**
@@ -203,7 +199,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeArmonkV2
### configuration
-
+
Return the backend configuration.
**Return type**
@@ -211,27 +207,9 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeArmonkV2
*QasmBackendConfiguration*
- ### defaults
-
-
- (DEPRECATED)Return the pulse defaults for the backend
-
- **Parameters**
-
- **refresh** (*bool*) – If `True`, re-retrieve the backend defaults from the local file.
-
- **Returns**
-
- The backend pulse defaults or `None` if the backend does not support pulse.
-
- **Return type**
-
- *PulseDefaults*
-
-
### properties
-
+
Return the backend properties
**Parameters**
@@ -273,7 +251,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeArmonkV2
### refresh
-
+
Update the data files from its real counterpart
This method pulls the latest backend data files from their real counterpart and overwrites the corresponding files in the local installation:
@@ -286,7 +264,8 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeArmonkV2
**Parameters**
- **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **use\_fractional\_gates** (*bool*) – Set True to allow for the backends to include fractional gates.
**Raises**
@@ -300,7 +279,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeArmonkV2
### run
-
+
Run on the fake backend using a simulator.
This method runs circuit jobs (an individual or a list of QuantumCircuit) using BasicSimulator or Aer simulator and returns a [`Job`](/docs/api/qiskit/qiskit.providers.Job "(in Qiskit v2.1)") object.
@@ -341,7 +320,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeArmonkV2
### status
-
+
Return the backend status.
**Returns**
diff --git a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-athens-v2.mdx b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-athens-v2.mdx
index 7b336533326..9222a99ee80 100644
--- a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-athens-v2.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-athens-v2.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAthensV2
# FakeAthensV2
-
+
Bases: `FakeBackendV2`
A fake 5 qubit backend.
@@ -31,10 +31,6 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAthensV2
Return the [`CouplingMap`](/docs/api/qiskit/qiskit.transpiler.CouplingMap "(in Qiskit v2.1)") object
- ### defs\_filename
-
-
-
### dirname
@@ -181,7 +177,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAthensV2
### check\_faulty
-
+
Check if the input circuit uses faulty qubits or edges.
**Parameters**
@@ -199,7 +195,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAthensV2
### configuration
-
+
Return the backend configuration.
**Return type**
@@ -207,27 +203,9 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAthensV2
*QasmBackendConfiguration*
- ### defaults
-
-
- (DEPRECATED)Return the pulse defaults for the backend
-
- **Parameters**
-
- **refresh** (*bool*) – If `True`, re-retrieve the backend defaults from the local file.
-
- **Returns**
-
- The backend pulse defaults or `None` if the backend does not support pulse.
-
- **Return type**
-
- *PulseDefaults*
-
-
### properties
-
+
Return the backend properties
**Parameters**
@@ -269,7 +247,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAthensV2
### refresh
-
+
Update the data files from its real counterpart
This method pulls the latest backend data files from their real counterpart and overwrites the corresponding files in the local installation:
@@ -282,7 +260,8 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAthensV2
**Parameters**
- **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **use\_fractional\_gates** (*bool*) – Set True to allow for the backends to include fractional gates.
**Raises**
@@ -296,7 +275,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAthensV2
### run
-
+
Run on the fake backend using a simulator.
This method runs circuit jobs (an individual or a list of QuantumCircuit) using BasicSimulator or Aer simulator and returns a [`Job`](/docs/api/qiskit/qiskit.providers.Job "(in Qiskit v2.1)") object.
@@ -337,7 +316,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAthensV2
### status
-
+
Return the backend status.
**Returns**
diff --git a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-auckland.mdx b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-auckland.mdx
index e380ceb6be5..3c71ab59909 100644
--- a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-auckland.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-auckland.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAuckland
# FakeAuckland
-
+
Bases: `FakeBackendV2`
A fake 27 qubit backend.
@@ -31,10 +31,6 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAuckland
Return the [`CouplingMap`](/docs/api/qiskit/qiskit.transpiler.CouplingMap "(in Qiskit v2.1)") object
- ### defs\_filename
-
-
-
### dirname
@@ -181,7 +177,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAuckland
### check\_faulty
-
+
Check if the input circuit uses faulty qubits or edges.
**Parameters**
@@ -199,7 +195,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAuckland
### configuration
-
+
Return the backend configuration.
**Return type**
@@ -207,27 +203,9 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAuckland
*QasmBackendConfiguration*
- ### defaults
-
-
- (DEPRECATED)Return the pulse defaults for the backend
-
- **Parameters**
-
- **refresh** (*bool*) – If `True`, re-retrieve the backend defaults from the local file.
-
- **Returns**
-
- The backend pulse defaults or `None` if the backend does not support pulse.
-
- **Return type**
-
- *PulseDefaults*
-
-
### properties
-
+
Return the backend properties
**Parameters**
@@ -269,7 +247,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAuckland
### refresh
-
+
Update the data files from its real counterpart
This method pulls the latest backend data files from their real counterpart and overwrites the corresponding files in the local installation:
@@ -282,7 +260,8 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAuckland
**Parameters**
- **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **use\_fractional\_gates** (*bool*) – Set True to allow for the backends to include fractional gates.
**Raises**
@@ -296,7 +275,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAuckland
### run
-
+
Run on the fake backend using a simulator.
This method runs circuit jobs (an individual or a list of QuantumCircuit) using BasicSimulator or Aer simulator and returns a [`Job`](/docs/api/qiskit/qiskit.providers.Job "(in Qiskit v2.1)") object.
@@ -337,7 +316,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeAuckland
### status
-
+
Return the backend status.
**Returns**
diff --git a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-belem-v2.mdx b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-belem-v2.mdx
index 31a05bfff4c..48d19afae84 100644
--- a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-belem-v2.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-belem-v2.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBelemV2
# FakeBelemV2
-
+
Bases: `FakeBackendV2`
A fake 5 qubit backend.
@@ -31,10 +31,6 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBelemV2
Return the [`CouplingMap`](/docs/api/qiskit/qiskit.transpiler.CouplingMap "(in Qiskit v2.1)") object
- ### defs\_filename
-
-
-
### dirname
@@ -181,7 +177,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBelemV2
### check\_faulty
-
+
Check if the input circuit uses faulty qubits or edges.
**Parameters**
@@ -199,7 +195,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBelemV2
### configuration
-
+
Return the backend configuration.
**Return type**
@@ -207,27 +203,9 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBelemV2
*QasmBackendConfiguration*
- ### defaults
-
-
- (DEPRECATED)Return the pulse defaults for the backend
-
- **Parameters**
-
- **refresh** (*bool*) – If `True`, re-retrieve the backend defaults from the local file.
-
- **Returns**
-
- The backend pulse defaults or `None` if the backend does not support pulse.
-
- **Return type**
-
- *PulseDefaults*
-
-
### properties
-
+
Return the backend properties
**Parameters**
@@ -269,7 +247,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBelemV2
### refresh
-
+
Update the data files from its real counterpart
This method pulls the latest backend data files from their real counterpart and overwrites the corresponding files in the local installation:
@@ -282,7 +260,8 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBelemV2
**Parameters**
- **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **use\_fractional\_gates** (*bool*) – Set True to allow for the backends to include fractional gates.
**Raises**
@@ -296,7 +275,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBelemV2
### run
-
+
Run on the fake backend using a simulator.
This method runs circuit jobs (an individual or a list of QuantumCircuit) using BasicSimulator or Aer simulator and returns a [`Job`](/docs/api/qiskit/qiskit.providers.Job "(in Qiskit v2.1)") object.
@@ -337,7 +316,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBelemV2
### status
-
+
Return the backend status.
**Returns**
diff --git a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-boeblingen-v2.mdx b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-boeblingen-v2.mdx
index a75e9c1774f..b508752133e 100644
--- a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-boeblingen-v2.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-boeblingen-v2.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBoeblingenV2
# FakeBoeblingenV2
-
+
Bases: `FakeBackendV2`
A fake Boeblingen V2 backend.
@@ -41,10 +41,6 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBoeblingenV2
Return the [`CouplingMap`](/docs/api/qiskit/qiskit.transpiler.CouplingMap "(in Qiskit v2.1)") object
- ### defs\_filename
-
-
-
### dirname
@@ -191,7 +187,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBoeblingenV2
### check\_faulty
-
+
Check if the input circuit uses faulty qubits or edges.
**Parameters**
@@ -209,7 +205,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBoeblingenV2
### configuration
-
+
Return the backend configuration.
**Return type**
@@ -217,27 +213,9 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBoeblingenV2
*QasmBackendConfiguration*
- ### defaults
-
-
- (DEPRECATED)Return the pulse defaults for the backend
-
- **Parameters**
-
- **refresh** (*bool*) – If `True`, re-retrieve the backend defaults from the local file.
-
- **Returns**
-
- The backend pulse defaults or `None` if the backend does not support pulse.
-
- **Return type**
-
- *PulseDefaults*
-
-
### properties
-
+
Return the backend properties
**Parameters**
@@ -279,7 +257,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBoeblingenV2
### refresh
-
+
Update the data files from its real counterpart
This method pulls the latest backend data files from their real counterpart and overwrites the corresponding files in the local installation:
@@ -292,7 +270,8 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBoeblingenV2
**Parameters**
- **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **use\_fractional\_gates** (*bool*) – Set True to allow for the backends to include fractional gates.
**Raises**
@@ -306,7 +285,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBoeblingenV2
### run
-
+
Run on the fake backend using a simulator.
This method runs circuit jobs (an individual or a list of QuantumCircuit) using BasicSimulator or Aer simulator and returns a [`Job`](/docs/api/qiskit/qiskit.providers.Job "(in Qiskit v2.1)") object.
@@ -347,7 +326,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBoeblingenV2
### status
-
+
Return the backend status.
**Returns**
diff --git a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-bogota-v2.mdx b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-bogota-v2.mdx
index a901473ff4e..a4784842cf9 100644
--- a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-bogota-v2.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-bogota-v2.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBogotaV2
# FakeBogotaV2
-
+
Bases: `FakeBackendV2`
A fake 5 qubit backend.
@@ -31,10 +31,6 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBogotaV2
Return the [`CouplingMap`](/docs/api/qiskit/qiskit.transpiler.CouplingMap "(in Qiskit v2.1)") object
- ### defs\_filename
-
-
-
### dirname
@@ -181,7 +177,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBogotaV2
### check\_faulty
-
+
Check if the input circuit uses faulty qubits or edges.
**Parameters**
@@ -199,7 +195,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBogotaV2
### configuration
-
+
Return the backend configuration.
**Return type**
@@ -207,27 +203,9 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBogotaV2
*QasmBackendConfiguration*
- ### defaults
-
-
- (DEPRECATED)Return the pulse defaults for the backend
-
- **Parameters**
-
- **refresh** (*bool*) – If `True`, re-retrieve the backend defaults from the local file.
-
- **Returns**
-
- The backend pulse defaults or `None` if the backend does not support pulse.
-
- **Return type**
-
- *PulseDefaults*
-
-
### properties
-
+
Return the backend properties
**Parameters**
@@ -269,7 +247,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBogotaV2
### refresh
-
+
Update the data files from its real counterpart
This method pulls the latest backend data files from their real counterpart and overwrites the corresponding files in the local installation:
@@ -282,7 +260,8 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBogotaV2
**Parameters**
- **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **use\_fractional\_gates** (*bool*) – Set True to allow for the backends to include fractional gates.
**Raises**
@@ -296,7 +275,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBogotaV2
### run
-
+
Run on the fake backend using a simulator.
This method runs circuit jobs (an individual or a list of QuantumCircuit) using BasicSimulator or Aer simulator and returns a [`Job`](/docs/api/qiskit/qiskit.providers.Job "(in Qiskit v2.1)") object.
@@ -337,7 +316,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBogotaV2
### status
-
+
Return the backend status.
**Returns**
diff --git a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-brisbane.mdx b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-brisbane.mdx
index deda2c8baf2..8e478255e28 100644
--- a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-brisbane.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-brisbane.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrisbane
# FakeBrisbane
-
+
Bases: `FakeBackendV2`
A fake 127 qubit backend.
@@ -31,10 +31,6 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrisbane
Return the [`CouplingMap`](/docs/api/qiskit/qiskit.transpiler.CouplingMap "(in Qiskit v2.1)") object
- ### defs\_filename
-
-
-
### dirname
@@ -181,7 +177,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrisbane
### check\_faulty
-
+
Check if the input circuit uses faulty qubits or edges.
**Parameters**
@@ -199,7 +195,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrisbane
### configuration
-
+
Return the backend configuration.
**Return type**
@@ -207,27 +203,9 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrisbane
*QasmBackendConfiguration*
- ### defaults
-
-
- (DEPRECATED)Return the pulse defaults for the backend
-
- **Parameters**
-
- **refresh** (*bool*) – If `True`, re-retrieve the backend defaults from the local file.
-
- **Returns**
-
- The backend pulse defaults or `None` if the backend does not support pulse.
-
- **Return type**
-
- *PulseDefaults*
-
-
### properties
-
+
Return the backend properties
**Parameters**
@@ -269,7 +247,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrisbane
### refresh
-
+
Update the data files from its real counterpart
This method pulls the latest backend data files from their real counterpart and overwrites the corresponding files in the local installation:
@@ -282,7 +260,8 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrisbane
**Parameters**
- **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **use\_fractional\_gates** (*bool*) – Set True to allow for the backends to include fractional gates.
**Raises**
@@ -296,7 +275,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrisbane
### run
-
+
Run on the fake backend using a simulator.
This method runs circuit jobs (an individual or a list of QuantumCircuit) using BasicSimulator or Aer simulator and returns a [`Job`](/docs/api/qiskit/qiskit.providers.Job "(in Qiskit v2.1)") object.
@@ -337,7 +316,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrisbane
### status
-
+
Return the backend status.
**Returns**
diff --git a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-brooklyn-v2.mdx b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-brooklyn-v2.mdx
index 3a30c520cee..9e02870b8b3 100644
--- a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-brooklyn-v2.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-brooklyn-v2.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrooklynV2
# FakeBrooklynV2
-
+
Bases: `FakeBackendV2`
A fake Brooklyn V2 backend.
@@ -31,10 +31,6 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrooklynV2
Return the [`CouplingMap`](/docs/api/qiskit/qiskit.transpiler.CouplingMap "(in Qiskit v2.1)") object
- ### defs\_filename
-
-
-
### dirname
@@ -181,7 +177,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrooklynV2
### check\_faulty
-
+
Check if the input circuit uses faulty qubits or edges.
**Parameters**
@@ -199,7 +195,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrooklynV2
### configuration
-
+
Return the backend configuration.
**Return type**
@@ -207,27 +203,9 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrooklynV2
*QasmBackendConfiguration*
- ### defaults
-
-
- (DEPRECATED)Return the pulse defaults for the backend
-
- **Parameters**
-
- **refresh** (*bool*) – If `True`, re-retrieve the backend defaults from the local file.
-
- **Returns**
-
- The backend pulse defaults or `None` if the backend does not support pulse.
-
- **Return type**
-
- *PulseDefaults*
-
-
### properties
-
+
Return the backend properties
**Parameters**
@@ -269,7 +247,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrooklynV2
### refresh
-
+
Update the data files from its real counterpart
This method pulls the latest backend data files from their real counterpart and overwrites the corresponding files in the local installation:
@@ -282,7 +260,8 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrooklynV2
**Parameters**
- **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **use\_fractional\_gates** (*bool*) – Set True to allow for the backends to include fractional gates.
**Raises**
@@ -296,7 +275,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrooklynV2
### run
-
+
Run on the fake backend using a simulator.
This method runs circuit jobs (an individual or a list of QuantumCircuit) using BasicSimulator or Aer simulator and returns a [`Job`](/docs/api/qiskit/qiskit.providers.Job "(in Qiskit v2.1)") object.
@@ -337,7 +316,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBrooklynV2
### status
-
+
Return the backend status.
**Returns**
diff --git a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-burlington-v2.mdx b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-burlington-v2.mdx
index 8777d55254d..36329f4bcf6 100644
--- a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-burlington-v2.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-burlington-v2.mdx
@@ -37,10 +37,6 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBurlingtonV2
Return the [`CouplingMap`](/docs/api/qiskit/qiskit.transpiler.CouplingMap "(in Qiskit v2.1)") object
- ### defs\_filename
-
-
-
### dirname
@@ -187,7 +183,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBurlingtonV2
### check\_faulty
-
+
Check if the input circuit uses faulty qubits or edges.
**Parameters**
@@ -205,7 +201,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBurlingtonV2
### configuration
-
+
Return the backend configuration.
**Return type**
@@ -213,27 +209,9 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBurlingtonV2
*QasmBackendConfiguration*
- ### defaults
-
-
- (DEPRECATED)Return the pulse defaults for the backend
-
- **Parameters**
-
- **refresh** (*bool*) – If `True`, re-retrieve the backend defaults from the local file.
-
- **Returns**
-
- The backend pulse defaults or `None` if the backend does not support pulse.
-
- **Return type**
-
- *PulseDefaults*
-
-
### properties
-
+
Return the backend properties
**Parameters**
@@ -275,7 +253,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBurlingtonV2
### refresh
-
+
Update the data files from its real counterpart
This method pulls the latest backend data files from their real counterpart and overwrites the corresponding files in the local installation:
@@ -288,7 +266,8 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBurlingtonV2
**Parameters**
- **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **use\_fractional\_gates** (*bool*) – Set True to allow for the backends to include fractional gates.
**Raises**
@@ -302,7 +281,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBurlingtonV2
### run
-
+
Run on the fake backend using a simulator.
This method runs circuit jobs (an individual or a list of QuantumCircuit) using BasicSimulator or Aer simulator and returns a [`Job`](/docs/api/qiskit/qiskit.providers.Job "(in Qiskit v2.1)") object.
@@ -343,7 +322,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeBurlingtonV2
### status
-
+
Return the backend status.
**Returns**
diff --git a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-cairo-v2.mdx b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-cairo-v2.mdx
index 82d001430ec..ae0e51136b4 100644
--- a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-cairo-v2.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-cairo-v2.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCairoV2
# FakeCairoV2
-
+
Bases: `FakeBackendV2`
A fake 27 qubit backend.
@@ -31,10 +31,6 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCairoV2
Return the [`CouplingMap`](/docs/api/qiskit/qiskit.transpiler.CouplingMap "(in Qiskit v2.1)") object
- ### defs\_filename
-
-
-
### dirname
@@ -181,7 +177,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCairoV2
### check\_faulty
-
+
Check if the input circuit uses faulty qubits or edges.
**Parameters**
@@ -199,7 +195,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCairoV2
### configuration
-
+
Return the backend configuration.
**Return type**
@@ -207,27 +203,9 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCairoV2
*QasmBackendConfiguration*
- ### defaults
-
-
- (DEPRECATED)Return the pulse defaults for the backend
-
- **Parameters**
-
- **refresh** (*bool*) – If `True`, re-retrieve the backend defaults from the local file.
-
- **Returns**
-
- The backend pulse defaults or `None` if the backend does not support pulse.
-
- **Return type**
-
- *PulseDefaults*
-
-
### properties
-
+
Return the backend properties
**Parameters**
@@ -269,7 +247,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCairoV2
### refresh
-
+
Update the data files from its real counterpart
This method pulls the latest backend data files from their real counterpart and overwrites the corresponding files in the local installation:
@@ -282,7 +260,8 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCairoV2
**Parameters**
- **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **use\_fractional\_gates** (*bool*) – Set True to allow for the backends to include fractional gates.
**Raises**
@@ -296,7 +275,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCairoV2
### run
-
+
Run on the fake backend using a simulator.
This method runs circuit jobs (an individual or a list of QuantumCircuit) using BasicSimulator or Aer simulator and returns a [`Job`](/docs/api/qiskit/qiskit.providers.Job "(in Qiskit v2.1)") object.
@@ -337,7 +316,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCairoV2
### status
-
+
Return the backend status.
**Returns**
diff --git a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-cambridge-v2.mdx b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-cambridge-v2.mdx
index 7ef60ed0ddc..f36cd5bb425 100644
--- a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-cambridge-v2.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-cambridge-v2.mdx
@@ -43,10 +43,6 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCambridgeV2
Return the [`CouplingMap`](/docs/api/qiskit/qiskit.transpiler.CouplingMap "(in Qiskit v2.1)") object
- ### defs\_filename
-
-
-
### dirname
@@ -193,7 +189,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCambridgeV2
### check\_faulty
-
+
Check if the input circuit uses faulty qubits or edges.
**Parameters**
@@ -211,7 +207,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCambridgeV2
### configuration
-
+
Return the backend configuration.
**Return type**
@@ -219,27 +215,9 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCambridgeV2
*QasmBackendConfiguration*
- ### defaults
-
-
- (DEPRECATED)Return the pulse defaults for the backend
-
- **Parameters**
-
- **refresh** (*bool*) – If `True`, re-retrieve the backend defaults from the local file.
-
- **Returns**
-
- The backend pulse defaults or `None` if the backend does not support pulse.
-
- **Return type**
-
- *PulseDefaults*
-
-
### properties
-
+
Return the backend properties
**Parameters**
@@ -281,7 +259,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCambridgeV2
### refresh
-
+
Update the data files from its real counterpart
This method pulls the latest backend data files from their real counterpart and overwrites the corresponding files in the local installation:
@@ -294,7 +272,8 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCambridgeV2
**Parameters**
- **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **use\_fractional\_gates** (*bool*) – Set True to allow for the backends to include fractional gates.
**Raises**
@@ -308,7 +287,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCambridgeV2
### run
-
+
Run on the fake backend using a simulator.
This method runs circuit jobs (an individual or a list of QuantumCircuit) using BasicSimulator or Aer simulator and returns a [`Job`](/docs/api/qiskit/qiskit.providers.Job "(in Qiskit v2.1)") object.
@@ -349,7 +328,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCambridgeV2
### status
-
+
Return the backend status.
**Returns**
diff --git a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-casablanca-v2.mdx b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-casablanca-v2.mdx
index 978f335f135..42f07f6f171 100644
--- a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-casablanca-v2.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-casablanca-v2.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCasablancaV2
# FakeCasablancaV2
-
+
Bases: `FakeBackendV2`
A fake 7 qubit backend.
@@ -31,10 +31,6 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCasablancaV2
Return the [`CouplingMap`](/docs/api/qiskit/qiskit.transpiler.CouplingMap "(in Qiskit v2.1)") object
- ### defs\_filename
-
-
-
### dirname
@@ -181,7 +177,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCasablancaV2
### check\_faulty
-
+
Check if the input circuit uses faulty qubits or edges.
**Parameters**
@@ -199,7 +195,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCasablancaV2
### configuration
-
+
Return the backend configuration.
**Return type**
@@ -207,27 +203,9 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCasablancaV2
*QasmBackendConfiguration*
- ### defaults
-
-
- (DEPRECATED)Return the pulse defaults for the backend
-
- **Parameters**
-
- **refresh** (*bool*) – If `True`, re-retrieve the backend defaults from the local file.
-
- **Returns**
-
- The backend pulse defaults or `None` if the backend does not support pulse.
-
- **Return type**
-
- *PulseDefaults*
-
-
### properties
-
+
Return the backend properties
**Parameters**
@@ -269,7 +247,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCasablancaV2
### refresh
-
+
Update the data files from its real counterpart
This method pulls the latest backend data files from their real counterpart and overwrites the corresponding files in the local installation:
@@ -282,7 +260,8 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCasablancaV2
**Parameters**
- **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **use\_fractional\_gates** (*bool*) – Set True to allow for the backends to include fractional gates.
**Raises**
@@ -296,7 +275,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCasablancaV2
### run
-
+
Run on the fake backend using a simulator.
This method runs circuit jobs (an individual or a list of QuantumCircuit) using BasicSimulator or Aer simulator and returns a [`Job`](/docs/api/qiskit/qiskit.providers.Job "(in Qiskit v2.1)") object.
@@ -337,7 +316,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCasablancaV2
### status
-
+
Return the backend status.
**Returns**
diff --git a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-cusco.mdx b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-cusco.mdx
index e65c7acfc60..8cc557943d2 100644
--- a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-cusco.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-cusco.mdx
@@ -8,7 +8,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCusco
# FakeCusco
-
+
Bases: `FakeBackendV2`
A fake 127 qubit backend.
@@ -31,10 +31,6 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCusco
Return the [`CouplingMap`](/docs/api/qiskit/qiskit.transpiler.CouplingMap "(in Qiskit v2.1)") object
- ### defs\_filename
-
-
-
### dirname
@@ -181,7 +177,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCusco
### check\_faulty
-
+
Check if the input circuit uses faulty qubits or edges.
**Parameters**
@@ -199,7 +195,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCusco
### configuration
-
+
Return the backend configuration.
**Return type**
@@ -207,27 +203,9 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCusco
*QasmBackendConfiguration*
- ### defaults
-
-
- (DEPRECATED)Return the pulse defaults for the backend
-
- **Parameters**
-
- **refresh** (*bool*) – If `True`, re-retrieve the backend defaults from the local file.
-
- **Returns**
-
- The backend pulse defaults or `None` if the backend does not support pulse.
-
- **Return type**
-
- *PulseDefaults*
-
-
### properties
-
+
Return the backend properties
**Parameters**
@@ -269,7 +247,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCusco
### refresh
-
+
Update the data files from its real counterpart
This method pulls the latest backend data files from their real counterpart and overwrites the corresponding files in the local installation:
@@ -282,7 +260,8 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCusco
**Parameters**
- **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **service** ([*QiskitRuntimeService*](qiskit-runtime-service "qiskit_ibm_runtime.qiskit_runtime_service.QiskitRuntimeService")) – A `QiskitRuntimeService` instance
+ * **use\_fractional\_gates** (*bool*) – Set True to allow for the backends to include fractional gates.
**Raises**
@@ -296,7 +275,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCusco
### run
-
+
Run on the fake backend using a simulator.
This method runs circuit jobs (an individual or a list of QuantumCircuit) using BasicSimulator or Aer simulator and returns a [`Job`](/docs/api/qiskit/qiskit.providers.Job "(in Qiskit v2.1)") object.
@@ -337,7 +316,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeCusco
### status
-
+
Return the backend status.
**Returns**
diff --git a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-essex-v2.mdx b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-essex-v2.mdx
index 160f6642cae..f453a74697b 100644
--- a/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-essex-v2.mdx
+++ b/docs/api/qiskit-ibm-runtime/dev/fake-provider-fake-essex-v2.mdx
@@ -39,10 +39,6 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeEssexV2
Return the [`CouplingMap`](/docs/api/qiskit/qiskit.transpiler.CouplingMap "(in Qiskit v2.1)") object
- ### defs\_filename
-
-