diff --git a/docs/api/qiskit-c/dev/qk-neighbors.mdx b/docs/api/qiskit-c/dev/qk-neighbors.mdx index 8b03c8380db..3318d738411 100644 --- a/docs/api/qiskit-c/dev/qk-neighbors.mdx +++ b/docs/api/qiskit-c/dev/qk-neighbors.mdx @@ -17,11 +17,11 @@ python_api_name: QkNeighbors This object is read-only from C. To satisfy the safety guarantees of `qk_neighbors_clear`, you must not overwrite any data initialized by `qk_neighbors_from_target`, including any pointed-to data. - + #### Representation - + After initialization by `qk_neighbors_from_target`, the structure will be in one of two modes: diff --git a/docs/api/qiskit-c/dev/qk-obs-term.mdx b/docs/api/qiskit-c/dev/qk-obs-term.mdx index d8034a3b3d9..0a1ba6a7709 100644 --- a/docs/api/qiskit-c/dev/qk-obs-term.mdx +++ b/docs/api/qiskit-c/dev/qk-obs-term.mdx @@ -19,11 +19,11 @@ This is a group of functions for interacting with an opaque (Rust-space) SparseT This contains the coefficient (`coeff`), the number of qubits of the observable (`num_qubits`) and pointers to the `bit_terms` and `indices` arrays, which have length `len`. It’s the responsibility of the user that the data is coherent, see also the below section on safety. - + #### Safety - + * `bit_terms` must be a non-null, aligned pointer to `len` elements of type `QkBitTerm`. * `indices` must be a non-null, aligned pointer to `len` elements of type `uint32_t`. diff --git a/docs/api/qiskit-c/dev/qk-target-entry.mdx b/docs/api/qiskit-c/dev/qk-target-entry.mdx index a9909fb66d4..8c7dc8a73be 100644 --- a/docs/api/qiskit-c/dev/qk-target-entry.mdx +++ b/docs/api/qiskit-c/dev/qk-target-entry.mdx @@ -41,7 +41,7 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003); Creates an entry to the `QkTarget` based on a `QkGate` instance. - + #### Example @@ -63,7 +63,7 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003); Creates a new entry for adding a measurement instruction to a `QkTarget`. - + #### Example @@ -91,7 +91,7 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003); Creates a new entry for adding a reset instruction to a `QkTarget`. - + #### Example @@ -119,7 +119,7 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003); Creates an entry in the `QkTarget` based on a `QkGate` instance with no parameters. - + #### Example @@ -128,11 +128,11 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003); QkTargetEntry *entry = qk_target_entry_new_fixed(QkGate_CRX, crx_params, "crx_fixed")"; ``` - + #### Safety - + 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. @@ -158,7 +158,7 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003); Retrieves the number of properties stored in the target entry. - + #### Example @@ -168,11 +168,11 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003); size_t props_size = qk_target_entry_num_properties(entry); ``` - + #### Safety - + The behavior is undefined if `entry` is not a valid, non-null pointer to a `QkTargetEntry` object. @@ -190,7 +190,7 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003); Frees the entry. - + #### Example @@ -199,11 +199,11 @@ qk_target_entry_add_property(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. @@ -221,7 +221,7 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003); Adds an instruction property instance based on its assigned qargs. - + #### Example @@ -231,11 +231,11 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003); qk_target_entry_add_property(entry, qargs, 2, 0.0, 0.1); ``` - + #### Safety - + The behavior is undefined if `entry` is not a valid, non-null pointer to a `QkTargetEntry` object. @@ -257,7 +257,7 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003); Sets a custom name to the target entry. - + #### Example @@ -266,11 +266,11 @@ qk_target_entry_add_property(entry, NULL, 0, NAN, 0.003); qk_target_entry_set_name(entry, "cx_gate"); ``` - + #### Safety - + The behavior is undefined if `entry` is not a valid, non-null pointer to a `QkTargetEntry` object. The `name` pointer is expected to be either a C string comprising of valid UTF-8 characters or a null pointer. diff --git a/docs/api/qiskit-c/dev/qk-target.mdx b/docs/api/qiskit-c/dev/qk-target.mdx index 89515c4ad8c..dee3cd7046c 100644 --- a/docs/api/qiskit-c/dev/qk-target.mdx +++ b/docs/api/qiskit-c/dev/qk-target.mdx @@ -106,7 +106,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 @@ -134,11 +134,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei You can also use `qk_target_convert_from_python`, which is logically the exact same as this function, but can be directly used as a “converter” function for the `PyArg_Parse*` family of Python converter functions. - + #### Safety - + The caller must be attached to a Python interpreter. Behavior is undefined if `ob` is not a valid non-null pointer to a Python object. @@ -162,11 +162,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei You can also use `qk_target_borrow_from_python`, which is logically the exact same as this, but with a more natural signature for direct usage. - + #### Safety - + The caller must be attached to a Python interpreter. Behavior is undefined if `object` is not a valid non-null pointer to a Python object, or if `address` is not a pointer to writeable data of the correct type. @@ -185,7 +185,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Returns the number of qubits of this `QkTarget`. - + #### Example @@ -194,11 +194,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`. @@ -216,7 +216,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Returns the dt value of this `QkTarget`. - + #### Example @@ -226,11 +226,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`. @@ -248,7 +248,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Returns the granularity value of this `QkTarget`. - + #### Example @@ -258,11 +258,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`. @@ -280,7 +280,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Returns the `min_length` value of this `QkTarget`. - + #### Example @@ -290,11 +290,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`. @@ -312,7 +312,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Returns the `pulse_alignment` value of this `QkTarget`. - + #### Example @@ -322,11 +322,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`. @@ -344,7 +344,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Returns the `acquire_alignment` value of this `QkTarget`. - + #### Example @@ -354,11 +354,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`. @@ -376,7 +376,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Sets the dt value of this `QkTarget`. - + #### Example @@ -385,11 +385,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`. @@ -408,7 +408,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Sets the `granularity` value of this `QkTarget`. - + #### Example @@ -418,11 +418,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`. @@ -441,7 +441,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Sets the `min_length` value of this `QkTarget`. - + #### Example @@ -451,11 +451,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`. @@ -474,7 +474,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Returns the `pulse_alignment` value of this `QkTarget`. - + #### Example @@ -484,11 +484,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`. @@ -507,7 +507,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Sets the `acquire_alignment` value of this `QkTarget`. - + #### Example @@ -517,11 +517,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei qk_target_set_acquire_alignment(target, 5); ``` - + #### Safety - + Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`. @@ -540,7 +540,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Creates a copy of the `QkTarget`. - + #### Example @@ -554,11 +554,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`. @@ -576,7 +576,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Free the `QkTarget`. - + #### Example @@ -585,11 +585,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`. @@ -603,7 +603,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Adds a gate to the `QkTarget` through a `QkTargetEntry`. - + #### Example @@ -615,11 +615,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`. @@ -640,7 +640,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Modifies the properties of a gate in the `QkTarget`. - + #### Example @@ -655,11 +655,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei 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`. @@ -684,7 +684,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Returns the number of instructions tracked by a `QkTarget`. - + #### Example @@ -696,11 +696,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei 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`. @@ -718,7 +718,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Checks if the provided instruction and its qargs are supported by this `Target`. - + #### Example @@ -740,11 +740,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei qk_target_free(target); ``` - + #### Safety - + Behavior is undefined if `target` is not a valid, non-null pointer to a `QkTarget`. @@ -769,7 +769,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Return the index at which an operation is located based on its name. - + #### Example @@ -781,11 +781,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei size_t op_idx = qk_target_op_index(target, "h"); ``` - + #### Safety - + Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`. Behavior is undefined if `name` is not a pointer to a valid null-terminated string. @@ -804,7 +804,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Return the name of the operation stored at that index in the `QkTarget` instance’s gate map. - + #### Example @@ -818,11 +818,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei qk_str_free(op_name); ``` - + #### Safety - + Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`. @@ -841,7 +841,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Return the number of properties defined for the specified operation in the `QkTarget` instance, a.k.a. the length of the property map. Panics if the operation index is not present. - + #### Example @@ -853,11 +853,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei size_t num_props = qk_target_op_num_properties(target, 0); ``` - + #### Safety - + Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`. @@ -876,7 +876,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Retrieve the index at which some qargs are stored. Returns `SIZE_MAX` if not found. - + #### Example @@ -891,11 +891,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei size_t idx_0_1 = qk_target_op_qargs_index(target, 0, qargs); ``` - + #### Safety - + Behavior is undefined if `QkTarget` is not a valid, non-null pointer to a `QkTarget`. @@ -917,7 +917,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Panics if any of the indices are out of range. - + #### Example @@ -940,11 +940,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei } ``` - + #### Safety - + Behavior is undefined if `target` is not a valid, non-null pointer to a `QkTarget`. Behavior is undefined if each `qargs_out` or `qargs_len` are not aligned and writeable for a single value of the correct type. @@ -964,7 +964,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Panics if any of the indices are out of range. - + #### Example @@ -980,11 +980,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei qk_target_op_props(target, 0, 0, &inst_props); ``` - + #### Safety - + Behavior is undefined if `target` is not a valid, non-null pointer to a `QkTarget`. Behavior is undefined if `inst_props` does not point to an address of the correct size to store `QkInstructionProperties` in. @@ -1001,7 +1001,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Retrieves information about an operation in the Target via index. If the index is not present, this function will panic. You can check the `QkTarget` total number of instructions using `qk_target_num_instructions`. - + #### Example @@ -1020,11 +1020,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei qk_target_op_clear(&op); ``` - + #### Safety - + Behavior is undefined if `target` is not a valid, non-null pointer to a `QkTarget`. Behavior is undefined if `out_op` does not point to an address of the correct size to store `QkTargetOp` in. @@ -1040,7 +1040,7 @@ The Target C API currently only supports additions of `QkGate` instances with ei Tries to retrieve a `QkGate` based on the operation stored in an index. The user is responsible for checking whether this operation is a gate in the `QkTarget` via using `qk_target_op_get`. If not, this function will panic. - + #### Example @@ -1065,11 +1065,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei qk_target_op_clear(&op); ``` - + #### Safety - + Behavior is undefined if the `target` pointer is null or not aligned. @@ -1088,11 +1088,11 @@ The Target C API currently only supports additions of `QkGate` instances with ei Clears the `QkTargetOp` object. - + #### Safety - + The behavior will be undefined if the pointer is null or not-aligned. The data belonging to a `QkTargetOp` originates in Rust and can only be freed using this function. diff --git a/docs/api/qiskit-c/dev/qk-transpile-layout.mdx b/docs/api/qiskit-c/dev/qk-transpile-layout.mdx index 7d3add7097c..a57aa1c1154 100644 --- a/docs/api/qiskit-c/dev/qk-transpile-layout.mdx +++ b/docs/api/qiskit-c/dev/qk-transpile-layout.mdx @@ -79,11 +79,11 @@ The transpiler will also allocate ancilla qubits to the circuit if the target ha Return the number of qubits in the input circuit to the transpiler. - + #### Safety - + Behavior is undefined if `layout` is not a valid, non-null pointer to a `QkTranspileLayout`. @@ -101,11 +101,11 @@ The transpiler will also allocate ancilla qubits to the circuit if the target ha Return the number of qubits in the output circuit from the transpiler. - + #### Safety - + Behavior is undefined if `layout` is not a valid, non-null pointer to a `QkTranspileLayout`. @@ -131,11 +131,11 @@ The transpiler will also allocate ancilla qubits to the circuit if the target ha indicates that the layout maps virtual qubit 0 -> physical qubit 1, virtual qubit 1 -> physical qubit -> 0, and virtual qubit 2 -> physical qubit 2. - + #### Safety - + Behavior is undefined if `layout` is not a valid, non-null pointer to a `QkTranspileLayout`. `initial_layout` must be a valid, non-null pointer with a large enough allocation to store the size necessary for the initial layout. If `filter_ancillas` is true this will be number of input qubits (which can be checked with `qk_transpile_layout_num_input_qubits()`) or the number of output qubits if `filter_ancillas` is false (which can be queried with `qk_transpile_layout_num_output_qubits()`). @@ -163,11 +163,11 @@ The transpiler will also allocate ancilla qubits to the circuit if the target ha indicates that qubit 0 from the start of the circuit is at qubit 1 at the end of the circuit, 1 -> 2, and 2 -> 0. - + #### Safety - + Behavior is undefined if `layout` is not a valid, non-null pointer to a `QkTranspileLayout`. `output_permutation` must be a valid, non-null pointer with a large enough allocation to store the size necessary for the output\_permutation. This will always be the number of output qubits in the `QkTranspileLayout` which can be queried with `qk_transpile_layout_num_output_qubits()`. @@ -194,11 +194,11 @@ The transpiler will also allocate ancilla qubits to the circuit if the target ha indicates that virtual qubit 0’s state in the original circuit is on physical qubit 2 at the end of the transpiled circuit, 1 -> 0, and 2 -> 1. - + #### Safety - + Behavior is undefined if `layout` is not a valid, non-null pointer to a `QkTranspileLayout`. `final_layout` must be a valid, non-null pointer with a large enough allocation to store the size necessary for the final layout. If `filter_ancillas` is true this will be number of input qubits (which can be checked with `qk_transpile_layout_num_input_qubits()`) or the number of output qubits if `filter_ancillas` is false (which can be queried with `qk_transpile_layout_num_output_qubits()`). @@ -216,11 +216,11 @@ The transpiler will also allocate ancilla qubits to the circuit if the target ha This will generate a `QkTranspileLayout` with the initial layout set (and no ouptput permutation) from a provided mapping. The intent of this function is to enable creating a custom layout pass that also creates a `QkTranspileLayout` that you can use with subsequent stage functions such as `qk_transpile_stage_routing`. - + #### Safety - + Behavior is undefined if `original_dag` and target `target` are not a valid, aligned, non-null pointer to a `QkDag` or a `QkTarget` respectively. `qubit_mapping` must be a valid pointer to a contiguous array of `uint32_t` with enough space for the number of qubits indicated in `target`. @@ -240,11 +240,11 @@ The transpiler will also allocate ancilla qubits to the circuit if the target ha Free a `QkTranspileLayout` object - + #### Safety - + Behavior is undefined if `layout` is not a valid, non-null pointer to a `QkTranspileLayout`. @@ -260,11 +260,11 @@ The transpiler will also allocate ancilla qubits to the circuit if the target ha The created Python-space object is a copy of the `QkTranspileLayout` provided, the data representation is different between C and Python and the data is not moved to Python like for some other `*_to_python` functions. - + #### Safety - + Behavior is undefined if `layout` and `circuit` are not valid, non-null pointers to a `QkTranspileLayout` and `QkCircuit` respectively. It is assumed that the thread currently executing this function holds the Python GIL. This is required to create the Python object returned by this function. diff --git a/docs/api/qiskit-c/dev/qk-transpiler-passes.mdx b/docs/api/qiskit-c/dev/qk-transpiler-passes.mdx index 7ee30344669..ca8ff32f5f7 100644 --- a/docs/api/qiskit-c/dev/qk-transpiler-passes.mdx +++ b/docs/api/qiskit-c/dev/qk-transpiler-passes.mdx @@ -18,6 +18,55 @@ The Qiskit C API provides transpiler pass functions in two forms: ones that oper ## DAG-based Functions +### qk\_transpiler\_pass\_basis\_translator + + + Run the BasisTranslator transpiler pass on a DAG circuit. + + The BasisTranslator transpiler pass translates gates to a target basis by searching for a set of translations from the standard EquivalenceLibrary. The DAG will be mutated in-place, unless the DAG is already in the target basis, in which case the DAG remains unchanged. + + + + #### Example + + ```c + QkDag *dag = qk_dag_new(); + QkQuantumRegister *qr = qk_quantum_register_new(3, "qr"); + qk_dag_add_quantum_register(dag, qr); + uint32_t qargs[3] = {0, 1, 2}; + qk_dag_apply_gate(dag, QkGate_CCX, qargs, NULL, false); + + // Create a Target with global properties. + QkTarget *target = qk_target_new(3); + qk_target_add_instruction(target, qk_target_entry_new(QkGate_H)); + qk_target_add_instruction(target, qk_target_entry_new(QkGate_T)); + qk_target_add_instruction(target, qk_target_entry_new(QkGate_Tdg)); + qk_target_add_instruction(target, qk_target_entry_new(QkGate_CX)); + + // Run pass + qk_transpiler_pass_basis_translator(dag, target, 0); + + // Free the DAG and target pointers once you're done + qk_quantum_register_free(qr); + qk_dag_free(dag); + qk_target_free(target); + ``` + + + + #### Safety + + + + Behavior is undefined if `dag` and/or `target` are not valid, non-null pointers to a `QkDag` or `QkTarget`. + + **Parameters** + + * **dag** – A pointer to the DAG to run BasisTranslator on. + * **target** – The target where we will obtain basis gates from. + * **min\_qubits** – The minimum number of qubits for operations in the input DAG to translate. + + ### qk\_transpiler\_pass\_elide\_permutations @@ -27,7 +76,7 @@ The Qiskit C API provides transpiler pass functions in two forms: ones that oper 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 DAG and when a Swap gate is encountered it permutes the virtual qubits in the DAG and removes the swap gate. This will effectively remove any swap gates in the DAG prior to running layout. This optimization is not valid after a layout has been set and should not be run in this case. - + #### Example @@ -49,11 +98,11 @@ The Qiskit C API provides transpiler pass functions in two forms: ones that oper qk_dag_free(dag); ``` - + #### Safety - + Behavior is undefined if `dag` is not a valid, non-null pointer to a `QkDAG`. @@ -73,7 +122,7 @@ The Qiskit C API provides transpiler pass functions in two forms: ones that oper The pass checks if the directions of two-qubit gates comply with the gate directions specified in a given target. - + #### Example @@ -96,11 +145,11 @@ The Qiskit C API provides transpiler pass functions in two forms: ones that oper qk_target_free(target); ``` - + #### Safety - + Behavior is undefined if `dag` or `target` are not valid, non-null pointers to `QkDag` and `QkTarget` objects, respectively. @@ -121,7 +170,7 @@ The Qiskit C API provides transpiler pass functions in two forms: ones that oper The GateDirection pass modifies asymmetric gates to match the hardware coupling directions. This pass supports replacements for the `cx`, `cz`, `ecr`, `swap`, `rzx`, `rxx`, `ryy` and `rzz` gates, using predefined identities. - + #### Example @@ -145,11 +194,11 @@ The Qiskit C API provides transpiler pass functions in two forms: ones that oper qk_target_free(target); ``` - + #### Safety - + Behavior is undefined if `dag` or `target` are not valid, non-null pointers to `QkDag` and `QkTarget` objects, respectively. @@ -174,7 +223,7 @@ The Qiskit C API provides transpiler pass functions in two forms: ones that oper The error is the combined multiplication of the errors of individual gates on the qubit it operates on. - + #### Example @@ -206,11 +255,11 @@ The Qiskit C API provides transpiler pass functions in two forms: ones that oper qk_quantum_register_free(qr); ``` - + #### Safety - + Behavior is undefined if `dag` is not a valid, non-null pointer to a `QkDag` and if `target` is not a valid pointer to a `QkTarget`. @@ -227,7 +276,7 @@ The Qiskit C API provides transpiler pass functions in two forms: ones that oper Transpiler pass to remove diagonal gates (like RZ, T, Z, etc) before a measurement. Including diagonal 2Q gates. - + #### Example @@ -246,11 +295,11 @@ The Qiskit C API provides transpiler pass functions in two forms: ones that oper qk_classical_register_free(cr); ``` - + #### Safety - + Behavior is undefined if `dag` is not a valid, non-null pointer to a `QkDag`. @@ -279,7 +328,7 @@ $$ This function is multithreaded and will potentially launch a thread pool with threads equal to the number of CPUs by default. You can tune the number of threads with the RAYON\_NUM\_THREADS environment variable. For example, setting RAYON\_NUM\_THREADS=4 would limit the thread pool to 4 threads. - + #### Example @@ -312,11 +361,11 @@ $$ qk_target_free(target); ``` - + #### Safety - + Behavior is undefined if `dag` or `target` is not a valid, non-null pointer to a `QkDag` and `QkTarget`. @@ -332,11 +381,11 @@ $$ Run the Split2QUnitaries transpiler pass on a DAG Circuit - + #### Safety - + Behavior is undefined if `dag` is not a valid, non-null pointer to a `QkDAG`. @@ -358,38 +407,13 @@ $$ Run the BasisTranslator transpiler pass on a circuit. - The BasisTranslator transpiler pass translates gates to a target basis by searching for a set of translations from the standard EquivalenceLibrary. + Refer to the `qk_transpiler_pass_basis_translator` function for more details about the pass. - #### Example - - ```c - #include - - QkCircuit *circuit = qk_circuit_new(3, 0); - qk_circuit_gate(circuit, QkGate_CCX, (uint32_t[3]){0, 1, 2}, NULL); - - // Create a Target with global properties. - QkTarget *target = qk_target_new(3); - qk_target_add_instruction(target, qk_target_entry_new(QkGate_H)); - qk_target_add_instruction(target, qk_target_entry_new(QkGate_T)); - qk_target_add_instruction(target, qk_target_entry_new(QkGate_Tdg)); - qk_target_add_instruction(target, qk_target_entry_new(QkGate_CX)); - - // Run pass - qk_transpiler_pass_standalone_basis_translator(circuit, target, 0); - - // Free the circuit and target pointers once you're done - qk_circuit_free(circuit); - qk_target_free(target); - ``` - - - #### Safety - + Behavior is undefined if `circuit` and/or `target` are not valid, non-null pointers to a `QkCircuit` or `QkTarget`. @@ -409,7 +433,7 @@ $$ This function is multithreaded and will potentially launch a thread pool with threads equal to the number of CPUs by default. You can tune the number of threads with the `RAYON_NUM_THREADS` environment variable. For example, setting `RAYON_NUM_THREADS=4` would limit the thread pool to 4 threads. - + #### Example @@ -422,11 +446,11 @@ $$ qk_transpiler_pass_standalone_commutative_cancellation(qc, NULL, 1.0); ``` - + #### Safety - + Behavior is undefined if `circuit` or `target` is not a valid, `QkCircuit` and `QkTarget`. `QkCircuit` is not expected to be null and behavior is undefined if it is. @@ -448,11 +472,11 @@ $$ ConsolidateBlocks is a transpiler pass that consolidates consecutive blocks of gates operating on the same qubits into a Unitary gate, to later on be resynthesized, which leads to a more optimal subcircuit. - + #### Safety - + Behavior is undefined if `circuit` is not a valid, non-null pointer to a `QkCircuit` and if `target` is not a valid pointer to a `QkTarget`. @@ -471,11 +495,11 @@ $$ This pass converts all standard gates (with less than 4 qubits) in the circuit into a sequence of `QkPauliProductRotation` gates and measurements into `QkPauliProductMeasurement` instructions. Note that this pass panics if the circuit contains non-standard gates. The suggested workflow is to first transpile into a standard basis, keeping rotation gates (such as `QkGate_RXX` and others) intact where possible, and then call this pass. - + #### Safety - + Behavior is undefined if `circuit` is not valid, non-null pointers to a `QkCircuit`. @@ -491,11 +515,11 @@ $$ Refer to the `qk_transpiler_pass_elide_permutations` function for more details about the pass. - + #### Safety - + Behavior is undefined if `circuit` is not a valid, non-null pointer to a `QkCircuit`. @@ -515,11 +539,11 @@ $$ Refer to the `qk_transpiler_pass_check_gate_direction` function for more details about the pass. - + #### Safety - + Behavior is undefined if `circuit` or `target` are not valid, non-null pointers to `QkCircuit` and `QkTarget` objects, respectively. @@ -540,11 +564,11 @@ $$ Refer to the `qk_transpiler_pass_gate_direction` function for more details about the pass. - + #### Safety - + Behavior is undefined if `circuit` or `target` are not valid, non-null pointers to `QkCircuit` and `QkTarget` objects, respectively. @@ -584,7 +608,7 @@ $$ * (QkGate\_SX, QkGate\_SXdg) * (QkGate\_CS, QkGate\_CSdg) - + #### Example @@ -598,11 +622,11 @@ $$ qk_transpiler_pass_standalone_inverse_cancellation(qc); ``` - + #### Safety - + Behavior is undefined if `circuit` is not a valid, non-null pointer to a `QkCircuit`. @@ -618,11 +642,11 @@ $$ This pass commutes all Clifford gates to the end of the circuit, converting Pauli rotation gates into `QkPauliProductRotation` gates and measurements into `QkPauliProductMeasurement` instructions. Note that this pass currently only supports circuits that have `QkGate_T`, `QkGate_Tdg` or `QkGate_RZ` gates as non-Cliffords and panics otherwise. The suggested workflow is to first transpile into a Clifford+RZ basis and then call this pass. - + #### Safety - + Behavior is undefined if `circuit` is not valid, non-null pointers to a `QkCircuit`. @@ -641,11 +665,11 @@ $$ use [`qk_transpiler_pass_standalone_optimize_1q_sequences()`](#qk_transpiler_pass_standalone_optimize_1q_sequences "qk_transpiler_pass_standalone_optimize_1q_sequences") instead. - + #### Safety - + Behavior is undefined if `circuit` is not a valid, non-null pointer to a `QkCircuit` and if `target` is not a valid pointer to a `QkTarget`. @@ -662,11 +686,11 @@ $$ Refer to the `qk_transpiler_pass_optimize_1q_sequences` function for more details about the pass. - + #### Safety - + Behavior is undefined if `circuit` is not a valid, non-null pointer to a `QkCircuit` and if `target` is not a valid pointer to a `QkTarget`. @@ -683,11 +707,11 @@ $$ Refer to the `qk_transpiler_pass_remove_diagonal_gates_before_measure` function for more details about the pass. - + #### Safety - + Behavior is undefined if `circuit` is not a valid, non-null pointer to a `QkCircuit`. @@ -705,11 +729,11 @@ $$ This function is multithreaded and will potentially launch a thread pool with threads equal to the number of CPUs by default. You can tune the number of threads with the RAYON\_NUM\_THREADS environment variable. For example, setting RAYON\_NUM\_THREADS=4 would limit the thread pool to 4 threads. - + #### Safety - + Behavior is undefined if `circuit` or `target` is not a valid, non-null pointer to a `QkCircuit` and `QkTarget`. @@ -735,11 +759,11 @@ $$ This function is multithreaded and will launch a thread pool with threads equal to the number of CPUs by default. You can tune the number of threads with the `RAYON_NUM_THREADS` environment variable. For example, setting `RAYON_NUM_THREADS=4` would limit the thread pool to 4 threads. - + #### References - + \[1] Henry Zou and Matthew Treinish and Kevin Hartman and Alexander Ivrii and Jake Lishman. “LightSABRE: A Lightweight and Enhanced SABRE Algorithm” [arXiv:2409.08368](https://doi.org/10.48550/arXiv.2409.08368) @@ -749,11 +773,11 @@ $$ [arXiv:1809.02573](https://arxiv.org/pdf/1809.02573.pdf) - + #### Safety - + Behavior is undefined if `circuit` or `target` is not a valid, non-null pointer to a `QkCircuit` and `QkTarget`. @@ -775,11 +799,11 @@ $$ Refer to the `qk_transpiler_pass_split_2q_unitaries` function for more details about the pass. - + #### Safety - + Behavior is undefined if `circuit` is not a valid, non-null pointer to a `QkCircuit`. @@ -801,7 +825,7 @@ $$ The UnitarySynthesis transpiler pass will synthesize any UnitaryGates in the circuit into gates available in the target. - + #### Example @@ -828,11 +852,11 @@ $$ qk_transpiler_pass_standalone_unitary_synthesis(qc, target, 0, 1.0); ``` - + #### Safety - + Behavior is undefined if `circuit` or `target` is not a valid, non-null pointer to a `QkCircuit` and `QkTarget`. @@ -855,7 +879,7 @@ $$ If this pass finds a solution that means there is a “perfect layout” and that no further swap mapping or routing is needed. However, there is not always a possible solution, or a solution might exist but it is not found within the limits specified when the pass is called. - + #### Example @@ -884,11 +908,11 @@ $$ qk_vf2_layout_configuration_free(config); ``` - + #### Safety - + Behavior is undefined if `circuit` or `target` is not a valid, non-null pointer to a `QkCircuit` and `QkTarget`. Behavior is undefined if `config` is a non-null pointer that does not point to a valid `QkVF2LayoutConfiguration` object (but a null pointer is fine). @@ -921,7 +945,7 @@ $$ In both of the first two cases, `qk_vf2_layout_has_match` will return `true`. In only the first case, `qk_vf2_layout_has_improvement` will return `true`. - + #### Example @@ -949,11 +973,11 @@ $$ qk_vf2_layout_configuration_free(config); ``` - + #### Safety - + Behavior is undefined if `circuit` or `target` is not a valid, non-null pointer to a `QkCircuit` and `QkTarget`. Behavior is undefined if `config` is a non-null pointer that does not point to a valid `QkVF2LayoutConfiguration` object (but a null pointer is fine). @@ -979,11 +1003,11 @@ $$ Replaced by [`qk_transpiler_pass_standalone_vf2_layout_average()`](#qk_transpiler_pass_standalone_vf2_layout_average "qk_transpiler_pass_standalone_vf2_layout_average"). - + #### Safety - + The safety requirements of `qk_transpiler_pass_standalone_vf2_layout_average` must be respected for `circuit` and `target`. diff --git a/docs/api/qiskit-c/dev/qk-transpiler.mdx b/docs/api/qiskit-c/dev/qk-transpiler.mdx index 6a985e98bfd..68cfee470fd 100644 --- a/docs/api/qiskit-c/dev/qk-transpiler.mdx +++ b/docs/api/qiskit-c/dev/qk-transpiler.mdx @@ -67,11 +67,11 @@ A container collecting individual attributes shared by the transpiler stages. Wh > > Create a pointer to an empty `QkTranspilerStageState` object > -> +> > > #### Safety > -> +> > > Behavior is undefined if `state` is not a valid pointer allocated. > @@ -85,11 +85,11 @@ A container collecting individual attributes shared by the transpiler stages. Wh > > Free a `QkTranspilerStageState` object > -> +> > > #### Safety > -> +> > > Behavior is undefined if `state` is not a valid, non-null pointer to a `QkTranspilerStageState`. > @@ -105,11 +105,11 @@ A container collecting individual attributes shared by the transpiler stages. Wh > > This pointer is owned by the `state` object and should not be freed using `qk_transpile_layout_free`. Instead, free the original `state` object using `qk_transpile_state_free`. > -> +> > > #### Safety > -> +> > > Behavior is undefined if `state` is not a valid, non-null pointer to a `QkTranspilerStageState`. > @@ -129,11 +129,11 @@ A container collecting individual attributes shared by the transpiler stages. Wh > > Calling this method consumes the `QkTranspileLayout` object which means the user will not need to call `qk_transpile_layout_free`. The user should still de-allocate the space allotted for it using `free`. > -> +> > > #### Safety > -> +> > > Behavior is undefined if `state` is not a valid, non-null pointer to a `QkTranspilerStageState`. Behavior is undefined if `state` is not a valid pointer to a `QkTranspileLayout`. > @@ -168,11 +168,11 @@ A container collecting individual attributes shared by the transpiler stages. Wh This function is multithreaded internally and will launch a thread pool with threads equal to the number of CPUs reported by the operating system by default. This will include logical cores on CPUs with simultaneous multithreading. You can tune the number of threads with the `RAYON_NUM_THREADS` environment variable. For example, setting `RAYON_NUM_THREADS=4` would limit the thread pool to 4 threads. - + #### Safety - + Behavior is undefined if `dag`, `target`, or `state`, are not valid, non-null pointers to a `QkDag`, `QkTarget`, or a `QkTranspileLayout` pointer respectively. `options` must be a valid pointer a to a `QkTranspileOptions` or `NULL`. `error` must be a valid pointer to a `char` pointer or `NULL`. The value of the inner pointer for `state` will be overwritten by this function. If the value pointed to needs to be freed this must be done outside of this function as it will not be freed by this function. @@ -200,11 +200,11 @@ A container collecting individual attributes shared by the transpiler stages. Wh This function is multithreaded internally and will launch a thread pool with threads equal to the number of CPUs reported by the operating system by default. This will include logical cores on CPUs with simultaneous multithreading. You can tune the number of threads with the `RAYON_NUM_THREADS` environment variable. For example, setting `RAYON_NUM_THREADS=4` would limit the thread pool to 4 threads. - + #### Safety - + Behavior is undefined if `dag`, `target`, or `layout`, are not valid, non-null pointers to a `QkDag`, `QkTarget`, or a `QkTranspileLayout` pointer respectively. `options` must be a valid pointer a to a `QkTranspileOptions` or `NULL`. `error` must be a valid pointer to a `char` pointer or `NULL`. @@ -232,11 +232,11 @@ A container collecting individual attributes shared by the transpiler stages. Wh This function is multithreaded internally and will launch a thread pool with threads equal to the number of CPUs reported by the operating system by default. This will include logical cores on CPUs with simultaneous multithreading. You can tune the number of threads with the `RAYON_NUM_THREADS` environment variable. For example, setting `RAYON_NUM_THREADS=4` would limit the thread pool to 4 threads. - + #### Safety - + Behavior is undefined if `dag` and `target` are not valid, non-null pointers to a `QkDag`, or a `QkTarget` respectively. `options` must be a valid pointer a to a `QkTranspileOptions` or `NULL`. `error` must be a valid pointer to a `char` pointer or `NULL`. @@ -264,11 +264,11 @@ A container collecting individual attributes shared by the transpiler stages. Wh This function is multithreaded internally and will launch a thread pool with threads equal to the number of CPUs reported by the operating system by default. This will include logical cores on CPUs with simultaneous multithreading. You can tune the number of threads with the `RAYON_NUM_THREADS` environment variable. For example, setting `RAYON_NUM_THREADS=4` would limit the thread pool to 4 threads. - + #### Safety - + Behavior is undefined if `dag` and `target` are not valid, non-null pointers to a `QkDag`, `QkTarget` respectively. `options` must be a valid pointer a to a `QkTranspileOptions` or `NULL`. `error` must be a valid pointer to a `char` pointer or `NULL`. @@ -295,11 +295,11 @@ A container collecting individual attributes shared by the transpiler stages. Wh This function is multithreaded internally and will launch a thread pool with threads equal to the number of CPUs reported by the operating system by default. This will include logical cores on CPUs with simultaneous multithreading. You can tune the number of threads with the `RAYON_NUM_THREADS` environment variable. For example, setting `RAYON_NUM_THREADS=4` would limit the thread pool to 4 threads. - + #### Safety - + Behavior is undefined if `dag` or `target`, are not valid, non-null pointers to a `QkDag`, or a `QkTarget` respectively. Behavior is also undefined if `layout` is not a valid, aligned, pointer to a pointer to a `QkTranspileLayout` or a pointer to a `NULL` pointer. `options` must be a valid pointer a to a `QkTranspileOptions` or `NULL`. `error` must be a valid pointer to a `char` pointer or `NULL`. @@ -325,11 +325,11 @@ A container collecting individual attributes shared by the transpiler stages. Wh This function is multithreaded internally and will launch a thread pool with threads equal to the number of CPUs reported by the operating system by default. This will include logical cores on CPUs with simultaneous multithreading. You can tune the number of threads with the `RAYON_NUM_THREADS` environment variable. For example, setting `RAYON_NUM_THREADS=4` would limit the thread pool to 4 threads. - + #### Safety - + Behavior is undefined if `circuit`, `target`, or `result`, are not valid, non-null pointers to a `QkCircuit`, `QkTarget`, or `QkTranspileResult` respectively. `options` must be a valid pointer a to a `QkTranspileOptions` or `NULL`. `error` must be a valid pointer to a `char` pointer or `NULL`. diff --git a/docs/api/qiskit-c/dev/qk-vf-2-layout.mdx b/docs/api/qiskit-c/dev/qk-vf-2-layout.mdx index dd31f2141ff..ca0b71c05c0 100644 --- a/docs/api/qiskit-c/dev/qk-vf-2-layout.mdx +++ b/docs/api/qiskit-c/dev/qk-vf-2-layout.mdx @@ -33,11 +33,11 @@ The configuration for the VF2 layout passes. This is an encapsulated configurati Free a `QkVf2LayoutConfiguration` object. - + #### Safety - + Behavior is undefined if `config` is a non-null pointer, but does not point to a valid, aligned `QkVF2LayoutConfiguration` object. @@ -53,11 +53,11 @@ The configuration for the VF2 layout passes. This is an encapsulated configurati The VF2 algorithm keeps track of the number of steps it has taken, and terminates when it reaches the limit. After the first match is found, the limit swaps from the “before” limit to the “after” limit without resetting the number of steps taken. - + #### Safety - + Behavior is undefined if `config` is not a valid, aligned, non-null pointer to a `QkVF2LayoutConfiguration`. @@ -75,11 +75,11 @@ The configuration for the VF2 layout passes. This is an encapsulated configurati This is not a hard limit; it is only checked when an improved layout is encountered. Using this option also makes the pass non-deterministic. It is generally recommended to use `qk_vf2_layout_configuration_set_call_limit` instead. - + #### Safety - + Behavior is undefined if `config` is not a valid, aligned, non-null pointer to a `QkVF2LayoutConfiguration`. @@ -96,11 +96,11 @@ The configuration for the VF2 layout passes. This is an encapsulated configurati Since the VF2 search tree is pruned on-the-fly based on scoring in the `QkTarget`, this limit is not especially powerful. See `qk_vf2_layout_configuration_set_call_limit` for a tighter bound. - + #### Safety - + Behavior is undefined if `config` is not a valid, aligned, non-null pointer to a `QkVF2LayoutConfiguration`. @@ -119,11 +119,11 @@ The configuration for the VF2 layout passes. This is an encapsulated configurati If this function was not called, no node shuffling takes place. - + #### Safety - + Behavior is undefined if `config` is not a valid, aligned, non-null pointer to a `QkVF2LayoutConfiguration`. @@ -140,11 +140,11 @@ The configuration for the VF2 layout passes. This is an encapsulated configurati You typically want to set this `true` if you are using the VF2 passes to improve a circuit that is already lowered to hardware, in order to set a baseline for the score-based pruning. If not, you can leave this as `false` (the default), to avoid a calculation that likely will not have any impact. - + #### Safety - + Behavior is undefined if `config` is not a valid, aligned, non-null pointer to a `VF2LayoutConfiguration`. @@ -171,11 +171,11 @@ When running the `qk_transpiler_pass_standalone_vf2_layout` function it returns A `true` value includes the situation where the configuration specified to try the “trivial” layout and it was found to be the best (and consequently no qubit relabelling is necessary, other than ancilla expansion if appropriate). See `qk_vf2_layout_result_has_improvement` to distinguish whether an explicit remapping is stored. - + ##### Safety - + Behavior is undefined if `layout` is not a valid, non-null pointer to a `QkVF2LayoutResult`. @@ -193,11 +193,11 @@ When running the `qk_transpiler_pass_standalone_vf2_layout` function it returns Check whether the result is an improvement to the trivial layout. - + ##### Safety - + Behavior is undefined if `layout` is not a valid, non-null pointer to a `QkVF2LayoutResult`. @@ -215,11 +215,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` containing a result, or if the qubit is out of range for the initial circuit. @@ -238,7 +238,7 @@ When running the `qk_transpiler_pass_standalone_vf2_layout` function it returns Free a `QkVF2LayoutResult` object - + ##### Example @@ -246,11 +246,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/_toc.json b/docs/api/qiskit-ibm-runtime/dev/_toc.json index 93e2b97ca86..60ebdd3dff6 100644 --- a/docs/api/qiskit-ibm-runtime/dev/_toc.json +++ b/docs/api/qiskit-ibm-runtime/dev/_toc.json @@ -698,6 +698,11 @@ "title": "Module overview", "url": "/docs/api/qiskit-ibm-runtime/dev/quantum-program" }, + { + "title": "CircuitItem", + "url": "/docs/api/qiskit-ibm-runtime/dev/quantum-program-circuit-item", + "untranslatable": true + }, { "title": "QuantumProgram", "url": "/docs/api/qiskit-ibm-runtime/dev/quantum-program-quantum-program", @@ -707,6 +712,11 @@ "title": "QuantumProgramItem", "url": "/docs/api/qiskit-ibm-runtime/dev/quantum-program-quantum-program-item", "untranslatable": true + }, + { + "title": "SamplexItem", + "url": "/docs/api/qiskit-ibm-runtime/dev/quantum-program-samplex-item", + "untranslatable": true } ] }, diff --git a/docs/api/qiskit-ibm-runtime/dev/quantum-program-circuit-item.mdx b/docs/api/qiskit-ibm-runtime/dev/quantum-program-circuit-item.mdx new file mode 100644 index 00000000000..5f3fa80ba67 --- /dev/null +++ b/docs/api/qiskit-ibm-runtime/dev/quantum-program-circuit-item.mdx @@ -0,0 +1,42 @@ +--- +title: CircuitItem (dev version) +description: API reference for qiskit_ibm_runtime.quantum_program.CircuitItem in the dev version of qiskit-ibm-runtime +in_page_toc_min_heading_level: 1 +python_api_type: class +python_api_name: qiskit_ibm_runtime.quantum_program.CircuitItem +--- + +# CircuitItem + + + Bases: [`QuantumProgramItem`](quantum-program-quantum-program-item "qiskit_ibm_runtime.quantum_program.quantum_program.QuantumProgramItem") + + An item of a [`QuantumProgram`](quantum-program-quantum-program "qiskit_ibm_runtime.quantum_program.QuantumProgram") containing a circuit and its arguments. + + **Parameters** + + * **circuit** (*QuantumCircuit*) – The circuit to be executed. + * **circuit\_arguments** (*np.ndarray | None*) – A real-valued array of parameter values for the circuit. The last axis is intrinsic with size equal to the number of circuit parameters. Leading axes are extrinsic and define the sweep grid. For example, shape `(5, 3, n)` means 5×3=15 configurations for a circuit with `n` parameters. + * **chunk\_size** (*int | None*) – The maximum number of bound circuits in each shot loop execution, or `None` to use a server-side heuristic to optimize speed. When not executing in a session, the server-side heuristic is always used and this value is ignored. + + ## Attributes + + ### shape + + + The extrinsic shape of this item, i.e. the broadcasted extrinsic shapes of all inputs. + + + ## Methods + + ### size + + + The total number elements in this item; the product of the entries of [`shape`](#qiskit_ibm_runtime.quantum_program.CircuitItem.shape "qiskit_ibm_runtime.quantum_program.CircuitItem.shape"). + + **Return type** + + int + + + diff --git a/docs/api/qiskit-ibm-runtime/dev/quantum-program-quantum-program.mdx b/docs/api/qiskit-ibm-runtime/dev/quantum-program-quantum-program.mdx index 20fa3aa4214..85e89d52cee 100644 --- a/docs/api/qiskit-ibm-runtime/dev/quantum-program-quantum-program.mdx +++ b/docs/api/qiskit-ibm-runtime/dev/quantum-program-quantum-program.mdx @@ -28,7 +28,7 @@ python_api_name: qiskit_ibm_runtime.quantum_program.QuantumProgram ### append\_circuit\_item - Append a new `CircuitItem` to this program. + Append a new [`CircuitItem`](quantum-program-circuit-item "qiskit_ibm_runtime.quantum_program.CircuitItem") to this program. **Parameters** @@ -44,7 +44,7 @@ python_api_name: qiskit_ibm_runtime.quantum_program.QuantumProgram ### append\_samplex\_item - Append a new `SamplexItem` to this program. + Append a new [`SamplexItem`](quantum-program-samplex-item "qiskit_ibm_runtime.quantum_program.SamplexItem") to this program. **Parameters** diff --git a/docs/api/qiskit-ibm-runtime/dev/quantum-program-samplex-item.mdx b/docs/api/qiskit-ibm-runtime/dev/quantum-program-samplex-item.mdx new file mode 100644 index 00000000000..9b2030393f9 --- /dev/null +++ b/docs/api/qiskit-ibm-runtime/dev/quantum-program-samplex-item.mdx @@ -0,0 +1,44 @@ +--- +title: SamplexItem (dev version) +description: API reference for qiskit_ibm_runtime.quantum_program.SamplexItem in the dev version of qiskit-ibm-runtime +in_page_toc_min_heading_level: 1 +python_api_type: class +python_api_name: qiskit_ibm_runtime.quantum_program.SamplexItem +--- + +# SamplexItem + + + Bases: [`QuantumProgramItem`](quantum-program-quantum-program-item "qiskit_ibm_runtime.quantum_program.quantum_program.QuantumProgramItem") + + An item of a [`QuantumProgram`](quantum-program-quantum-program "qiskit_ibm_runtime.quantum_program.QuantumProgram") containing a circuit and samplex to feed it arguments. + + **Parameters** + + * **circuit** (*QuantumCircuit*) – The circuit to be executed. + * **samplex** (*Samplex*) – A samplex to draw random parameters for the circuit. + * **samplex\_arguments** (*dict\[str, Any] | None*) – A map from argument names to argument values for the samplex. Each argument array has intrinsic axes determined by its type (e.g., `parameter_values` has intrinsic shape `(n,)` for `n` parameters, while scalar inputs like `noise_scale` have intrinsic shape `()`). The extrinsic shapes of all arguments are broadcasted together following NumPy conventions. + * **shape** (*tuple\[int, ...] | None*) – A shape that the item’s extrinsic shape must be broadcastable to. Axes where `shape` exceeds the shape implicit in `samplex_arguments` enumerate independent randomizations. + * **chunk\_size** (*int | None*) – The maximum number of bound circuits in each shot loop execution, or `None` to use a server-side heuristic to optimize speed. When not executing in a session, the server-side heuristic is always used and this value is ignored. + + ## Attributes + + ### shape + + + The extrinsic shape of this item, i.e. the broadcasted extrinsic shapes of all inputs. + + + ## Methods + + ### size + + + The total number elements in this item; the product of the entries of [`shape`](#qiskit_ibm_runtime.quantum_program.SamplexItem.shape "qiskit_ibm_runtime.quantum_program.SamplexItem.shape"). + + **Return type** + + int + + + diff --git a/docs/api/qiskit-ibm-runtime/dev/quantum-program.mdx b/docs/api/qiskit-ibm-runtime/dev/quantum-program.mdx index 0c380f908b4..3689c1f8653 100644 --- a/docs/api/qiskit-ibm-runtime/dev/quantum-program.mdx +++ b/docs/api/qiskit-ibm-runtime/dev/quantum-program.mdx @@ -20,8 +20,10 @@ A quantum program consists of a list of ordered elements, each of which contains ## Classes -| | | -| -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| [`QuantumProgram`](quantum-program-quantum-program "qiskit_ibm_runtime.quantum_program.QuantumProgram") | A quantum runtime executable. | -| [`QuantumProgramItem`](quantum-program-quantum-program-item "qiskit_ibm_runtime.quantum_program.QuantumProgramItem") | An item of a [`QuantumProgram`](quantum-program-quantum-program "qiskit_ibm_runtime.quantum_program.QuantumProgram"). | +| | | +| -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [`QuantumProgram`](quantum-program-quantum-program "qiskit_ibm_runtime.quantum_program.QuantumProgram") | A quantum runtime executable. | +| [`QuantumProgramItem`](quantum-program-quantum-program-item "qiskit_ibm_runtime.quantum_program.QuantumProgramItem") | An item of a [`QuantumProgram`](quantum-program-quantum-program "qiskit_ibm_runtime.quantum_program.QuantumProgram"). | +| [`CircuitItem`](quantum-program-circuit-item "qiskit_ibm_runtime.quantum_program.CircuitItem") | An item of a [`QuantumProgram`](quantum-program-quantum-program "qiskit_ibm_runtime.quantum_program.QuantumProgram") containing a circuit and its arguments. | +| [`SamplexItem`](quantum-program-samplex-item "qiskit_ibm_runtime.quantum_program.SamplexItem") | An item of a [`QuantumProgram`](quantum-program-quantum-program "qiskit_ibm_runtime.quantum_program.QuantumProgram") containing a circuit and samplex to feed it arguments. | diff --git a/docs/api/qiskit/dev/_toc.json b/docs/api/qiskit/dev/_toc.json index fd89aaf4438..53d343407b5 100644 --- a/docs/api/qiskit/dev/_toc.json +++ b/docs/api/qiskit/dev/_toc.json @@ -1639,6 +1639,11 @@ "url": "/docs/api/qiskit/dev/qiskit.transpiler.CouplingMap", "untranslatable": true }, + { + "title": "generate_preset_clifford_t_pass_manager", + "url": "/docs/api/qiskit/dev/qiskit.transpiler.generate_preset_clifford_t_pass_manager", + "untranslatable": true + }, { "title": "generate_preset_pass_manager", "url": "/docs/api/qiskit/dev/qiskit.transpiler.generate_preset_pass_manager", @@ -1669,6 +1674,11 @@ "url": "/docs/api/qiskit/dev/qiskit.transpiler.PassManager", "untranslatable": true }, + { + "title": "PassManagerCliffordTConfig", + "url": "/docs/api/qiskit/dev/qiskit.transpiler.PassManagerCliffordTConfig", + "untranslatable": true + }, { "title": "PassManagerConfig", "url": "/docs/api/qiskit/dev/qiskit.transpiler.PassManagerConfig", @@ -2424,6 +2434,11 @@ "url": "/docs/api/qiskit/dev/qiskit.transpiler.passes.TrivialLayout", "untranslatable": true }, + { + "title": "TwoQubitPeepholeOptimization", + "url": "/docs/api/qiskit/dev/qiskit.transpiler.passes.TwoQubitPeepholeOptimization", + "untranslatable": true + }, { "title": "UnitarySynthesis", "url": "/docs/api/qiskit/dev/qiskit.transpiler.passes.UnitarySynthesis", diff --git a/docs/api/qiskit/dev/capi.mdx b/docs/api/qiskit/dev/capi.mdx index efb290ab025..f4de35c4eaa 100644 --- a/docs/api/qiskit/dev/capi.mdx +++ b/docs/api/qiskit/dev/capi.mdx @@ -77,7 +77,7 @@ The Python package [`qiskit`](index#module-qiskit "qiskit") contains all of the ## Native bindings to the C API -Additionally, this module contains [`ctypes`](https://docs.python.org/3/library/ctypes.html#module-ctypes) bindings to all Qiskit C API types and functions. These are available as module attributes on [`qiskit.capi`](#module-qiskit.capi "qiskit.capi") with the same name as they have in the C API. For example, `qiskit.capi.qk_circuit_new` corresponds to [`qk_circuit_new()`](/docs/api/qiskit-c/dev/qk-circuit#qk_circuit_new "qk_circuit_new"). +Additionally, this module contains [`ctypes`](https://docs.python.org/3/library/ctypes.html#module-ctypes) bindings to all Qiskit C API types and functions. These are avaialble as module attributes on [`qiskit.capi`](#module-qiskit.capi "qiskit.capi") with the same name as they have in the C API. For example, `qiskit.capi.qk_circuit_new` corresponds to [`qk_circuit_new()`](cdoc/qk-circuit#c.qk_circuit_new "qk_circuit_new"). ### qiskit.capi.LIB @@ -101,5 +101,5 @@ In places where the C API has an enumeration, this module declares a Python [`en All the public library functions in the Qiskit C API are fully typed, and re-exported in the module root with the same name as they have in C. You can also access the functions from [`LIB`](#qiskit.capi.LIB "qiskit.capi.LIB"), if you prefer. -Note that header-only functions, such as [`qk_import()`](/docs/api/qiskit-c/dev/config#qk_import "qk_import"), are not exported because they are not part of the C API library object. +Note that header-only functions, such as [`qk_import()`](cdoc/config#c.qk_import "qk_import"), are not exported because they are not part of the C API library object. diff --git a/docs/api/qiskit/dev/circuit.mdx b/docs/api/qiskit/dev/circuit.mdx index d56cf78b48e..aa31a5c38e5 100644 --- a/docs/api/qiskit/dev/circuit.mdx +++ b/docs/api/qiskit/dev/circuit.mdx @@ -598,7 +598,7 @@ You may want to use many parameters that are related to each other. To make this | | | | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| [`ParameterVector`](qiskit.circuit.ParameterVector "qiskit.circuit.ParameterVector")(name\[, length]) | A container of many related [`Parameter`](qiskit.circuit.Parameter "qiskit.circuit.Parameter") objects. | +| [`ParameterVector`](qiskit.circuit.ParameterVector "qiskit.circuit.ParameterVector")(name\[, length, uuid]) | A container of many related [`Parameter`](qiskit.circuit.Parameter "qiskit.circuit.Parameter") objects. | | [`ParameterVectorElement`](qiskit.circuit.ParameterVectorElement "qiskit.circuit.ParameterVectorElement")(vector, index\[, uuid]) | An element of a [`ParameterVector`](qiskit.circuit.ParameterVector "qiskit.circuit.ParameterVector"). | diff --git a/docs/api/qiskit/dev/qiskit.circuit.ParameterVector.mdx b/docs/api/qiskit/dev/qiskit.circuit.ParameterVector.mdx index 9b28f124441..caca7fec7f1 100644 --- a/docs/api/qiskit/dev/qiskit.circuit.ParameterVector.mdx +++ b/docs/api/qiskit/dev/qiskit.circuit.ParameterVector.mdx @@ -8,7 +8,7 @@ python_api_name: qiskit.circuit.ParameterVector # ParameterVector - + Bases: [`object`](https://docs.python.org/3/library/functions.html#object) A container of many related [`Parameter`](qiskit.circuit.Parameter "qiskit.circuit.Parameter") objects. @@ -19,6 +19,18 @@ python_api_name: qiskit.circuit.ParameterVector This class fulfills the [`collections.abc.Sequence`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence) interface. + + This class does not implement regular equality, but has historically been allowed to be used as a dictionary key for [`QuantumCircuit.assign_parameters()`](qiskit.circuit.QuantumCircuit#assign_parameters "qiskit.circuit.QuantumCircuit.assign_parameters"). The class is mutable via [`resize()`](#qiskit.circuit.ParameterVector.resize "qiskit.circuit.ParameterVector.resize"), so it generally cannot implement regular equality; for two [`ParameterVector`](#qiskit.circuit.ParameterVector "qiskit.circuit.ParameterVector") objects to compare equal, they must be literally the same Python instance. + + This restriction does not apply to the individual [`ParameterVectorElement`](qiskit.circuit.ParameterVectorElement "qiskit.circuit.ParameterVectorElement") instances; these must only match on name, index and UUID. + + + **Parameters** + + * **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – the base name of the vector + * **length** ([*int*](https://docs.python.org/3/library/functions.html#int)) – the number of elements in the vector + * **uuid** ([*UUID*](https://docs.python.org/3/library/uuid.html#uuid.UUID) *| None*) – (optional) the root UUID to use for the vector. This can be used to create a new vector whose elements will compare equal to a previous vector (such as in a deserialization process). + ## Attributes ### name @@ -35,11 +47,17 @@ python_api_name: qiskit.circuit.ParameterVector It is not safe to mutate this list. + ### uuid + + + Get the root UUID of this vector. + + ## Methods ### index - + Find the index of a [`ParameterVectorElement`](qiskit.circuit.ParameterVectorElement "qiskit.circuit.ParameterVectorElement") within the list. It is typically much faster to use the [`ParameterVectorElement.index`](qiskit.circuit.ParameterVectorElement#index "qiskit.circuit.ParameterVectorElement.index") property. @@ -47,7 +65,7 @@ python_api_name: qiskit.circuit.ParameterVector ### resize - + Resize the parameter vector. If necessary, new elements are generated. Note that the UUID of each [`Parameter`](qiskit.circuit.Parameter "qiskit.circuit.Parameter") element will be generated deterministically given the root UUID of the `ParameterVector` and the index of the element. In particular, if a `ParameterVector` is resized to be smaller and then later resized to be larger, the UUID of the later generated element at a given index will be the same as the UUID of the previous element at that index. This is to ensure that the parameter instances do not change. diff --git a/docs/api/qiskit/dev/qiskit.quantum_info.Statevector.mdx b/docs/api/qiskit/dev/qiskit.quantum_info.Statevector.mdx index 5e399ef9adf..7d89b7a9f2a 100644 --- a/docs/api/qiskit/dev/qiskit.quantum_info.Statevector.mdx +++ b/docs/api/qiskit/dev/qiskit.quantum_info.Statevector.mdx @@ -8,7 +8,7 @@ python_api_name: qiskit.quantum_info.Statevector # Statevector - + Bases: `QuantumState`, `TolerancesMixin` Statevector class diff --git a/docs/api/qiskit/dev/qiskit.transpiler.PassManagerCliffordTConfig.mdx b/docs/api/qiskit/dev/qiskit.transpiler.PassManagerCliffordTConfig.mdx new file mode 100644 index 00000000000..308668d88dd --- /dev/null +++ b/docs/api/qiskit/dev/qiskit.transpiler.PassManagerCliffordTConfig.mdx @@ -0,0 +1,33 @@ +--- +title: PassManagerCliffordTConfig (dev version) +description: API reference for qiskit.transpiler.PassManagerCliffordTConfig in the dev version of qiskit +in_page_toc_min_heading_level: 1 +python_api_type: class +python_api_name: qiskit.transpiler.PassManagerCliffordTConfig +--- + +# PassManagerCliffordTConfig + + + Bases: [`object`](https://docs.python.org/3/library/functions.html#object) + + Pass Manager Configuration for Clifford+T transpilation. + + **Parameters** + + * **initial\_layout** ([*Layout*](qiskit.transpiler.Layout "qiskit.transpiler.Layout") *| None*) – Initial position of virtual qubits on physical qubits. + * **basis\_gates** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*] | None*) – List of basis gate names to unroll to. + * **coupling\_map** ([*CouplingMap*](qiskit.transpiler.CouplingMap "qiskit.transpiler.CouplingMap") *| None*) – Directed graph representing a coupling map. + * **instruction\_durations** ([*InstructionDurations*](qiskit.transpiler.InstructionDurations "qiskit.transpiler.InstructionDurations") *| None*) – Dictionary of duration (in dt) for each instruction. + * **approximation\_degree** ([*float*](https://docs.python.org/3/library/functions.html#float) *| None*) – Heuristic dial used for circuit approximation, where `1.0` means no approximation (up to numerical tolerance) and `0.0` means the maximum approximation. If `target` is available, a value of `None` indicates that approximation is allowed up to the reported error rate for an operation in the target. + * **seed\_transpiler** ([*int*](https://docs.python.org/3/library/functions.html#int) *| None*) – Sets random seed for the stochastic parts of the transpiler. + * **timing\_constraints** (*TimingConstraints | None*) – Hardware time alignment restrictions. + * **unitary\_synthesis\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The string method to use for the [`UnitarySynthesis`](qiskit.transpiler.passes.UnitarySynthesis "qiskit.transpiler.passes.UnitarySynthesis") pass. Will search installed plugins for a valid method. You can see a list of installed plugins with [`unitary_synthesis_plugin_names()`](qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names "qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names"). + * **unitary\_synthesis\_plugin\_config** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict) *| None*) – The configuration dictionary that will be passed to the specified unitary synthesis plugin. Refer to the plugin documentation for how to use this. + * **target** ([*Target*](qiskit.transpiler.Target "qiskit.transpiler.Target") *| None*) – The backend target. + * **hls\_config** ([*HLSConfig*](qiskit.transpiler.passes.HLSConfig "qiskit.transpiler.passes.HLSConfig") *| None*) – An optional configuration class to use for [`HighLevelSynthesis`](qiskit.transpiler.passes.HighLevelSynthesis "qiskit.transpiler.passes.HighLevelSynthesis") pass. Specifies how to synthesize various high-level objects. + * **qubits\_initially\_zero** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – Indicates whether the input circuit is zero-initialized. + * **rz\_synthesis\_config** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict) *| None*) – An optional configuration class to use for [`SynthesizeRZRotations`](qiskit.transpiler.passes.SynthesizeRZRotations "qiskit.transpiler.passes.SynthesizeRZRotations") pass. Specifies how to synthesize RZ rotations in the circuit. + * **\_routing\_disabled** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) + + diff --git a/docs/api/qiskit/dev/qiskit.transpiler.generate_preset_clifford_t_pass_manager.mdx b/docs/api/qiskit/dev/qiskit.transpiler.generate_preset_clifford_t_pass_manager.mdx new file mode 100644 index 00000000000..491ee700726 --- /dev/null +++ b/docs/api/qiskit/dev/qiskit.transpiler.generate_preset_clifford_t_pass_manager.mdx @@ -0,0 +1,68 @@ +--- +title: generate_preset_clifford_t_pass_manager (dev version) +description: API reference for qiskit.transpiler.generate_preset_clifford_t_pass_manager in the dev version of qiskit +in_page_toc_min_heading_level: 1 +python_api_type: function +python_api_name: qiskit.transpiler.generate_preset_clifford_t_pass_manager +--- + + + +# qiskit.transpiler.generate\_preset\_clifford\_t\_pass\_manager + + + Generate a preset Clifford+T [`StagedPassManager`](qiskit.transpiler.StagedPassManager "qiskit.transpiler.StagedPassManager"). + + This function provides a convenient way to construct a preset pass manager for Clifford+T compilation. We recommend using this function instead of [`transpile()`](compiler#qiskit.compiler.transpile "qiskit.compiler.transpile") or [`generate_preset_pass_manager()`](qiskit.transpiler.generate_preset_pass_manager "qiskit.transpiler.generate_preset_pass_manager") with a Clifford+T basis, as it exposes arguments specifically tailored for Clifford+T compilations. + + The target constraints for the pass manager construction can be specified through a [`Target`](qiskit.transpiler.Target "qiskit.transpiler.Target") instance, or via loose constraints (`basis_gates`, `coupling_map`, or `dt`). + + If basis gates are not specified (neither via `target` nor via `basis_gates`), then basis gates default to all of the Clifford+T gates in Qiskit. Note, however, that if basis gates are specified but do not represent a Clifford+T basis, then an error will be raised. + + **Parameters** + + * **optimization\_level** ([*int*](https://docs.python.org/3/library/functions.html#int)) – The optimization level to generate a [`StagedPassManager`](qiskit.transpiler.StagedPassManager "qiskit.transpiler.StagedPassManager") for. By default optimization level 2 is used if this is not specified. This can be 0, 1, 2, or 3. Higher levels generate potentially more optimized circuits, at the expense of potentially longer transpilation time. + + * **target** ([*Target*](qiskit.transpiler.Target "qiskit.transpiler.Target") *| None*) – The [`Target`](qiskit.transpiler.Target "qiskit.transpiler.Target") representing a compilation target. The following attributes will be inferred from this argument if they are not set: `coupling_map` and `basis_gates`. + + * **basis\_gates** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*] | None*) – List of basis gate names to unroll to (e.g: `['cx', 's', 'sx', 't', 'tdg']`). If both `target` and `basis_gates` are `None`, `basis_gates` will be set to all of the standard Clifford gates together with `'t'` and `'tdg'`. + + * **coupling\_map** ([*CouplingMap*](qiskit.transpiler.CouplingMap "qiskit.transpiler.CouplingMap") *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list) *| None*) – + + Directed graph represented a coupling map. Multiple formats are supported: + + 1. `CouplingMap` instance + 2. List, must be given as an adjacency matrix, where each entry specifies all directed two-qubit interactions supported by backend, e.g: `[[0, 1], [0, 3], [1, 2], [1, 5], [2, 5], [4, 1], [5, 3]]` + + * **dt** ([*float*](https://docs.python.org/3/library/functions.html#float) *| None*) – Target sample time (resolution) in seconds. If `None` (default) and a target is provided, `target.dt` is used. + + * **initial\_layout** ([*Layout*](qiskit.transpiler.Layout "qiskit.transpiler.Layout") *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*]*) – Initial position of virtual qubits on physical qubits. + + * **approximation\_degree** ([*float*](https://docs.python.org/3/library/functions.html#float) *| None*) – Heuristic dial used for circuit approximation, where `1.0` means no approximation (up to numerical tolerance) and `0.0` means the maximum approximation. If `target` is available, a value of `None` indicates that approximation is allowed up to the reported error rate for an operation in the target. + + * **seed\_transpiler** ([*int*](https://docs.python.org/3/library/functions.html#int) *| None*) – Sets random seed for the stochastic parts of the transpiler. If it is not specified here it can also be specified via an environment variable: `QISKIT_TRANSPILER_SEED` or in a user configuration file. The priority order is: this argument, then the environment variable, and finally the user configuration option. So setting this argument will take precedence over the other methods of setting a seed. + + * **unitary\_synthesis\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The name of the unitary synthesis method to use. By default `'default'` is used. You can see a list of installed plugins with [`unitary_synthesis_plugin_names()`](qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names "qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names"). + + * **unitary\_synthesis\_plugin\_config** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict) *| None*) – An optional configuration dictionary that will be passed directly to the unitary synthesis plugin. By default this setting will have no effect as the default unitary synthesis method does not take custom configuration. This should only be necessary when a unitary synthesis plugin is specified with the `unitary_synthesis_method` argument. As this is custom for each unitary synthesis plugin refer to the plugin documentation for how to use this option. + + * **hls\_config** ([*HLSConfig*](qiskit.transpiler.passes.HLSConfig "qiskit.transpiler.passes.HLSConfig") *| None*) – An optional configuration class [`HLSConfig`](qiskit.transpiler.passes.HLSConfig "qiskit.transpiler.passes.HLSConfig") that will be passed directly to [`HighLevelSynthesis`](qiskit.transpiler.passes.HighLevelSynthesis "qiskit.transpiler.passes.HighLevelSynthesis") transformation pass. This configuration class allows to specify for various high-level objects the lists of synthesis algorithms and their parameters. + + * **qubits\_initially\_zero** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – Indicates whether the input circuit is zero-initialized. + + * **rz\_synthesis\_config** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict) *| None*) – An optional configuration class to use for [`SynthesizeRZRotations`](qiskit.transpiler.passes.SynthesizeRZRotations "qiskit.transpiler.passes.SynthesizeRZRotations") pass. Specifies how to synthesize RZ rotations in the circuit. + + **Returns** + + The preset pass manager for the given options. + + **Return type** + + [StagedPassManager](qiskit.transpiler.StagedPassManager "qiskit.transpiler.StagedPassManager") + + **Raises** + + * [**TranspilerError**](transpiler#qiskit.transpiler.TranspilerError "qiskit.transpiler.TranspilerError") – if a basis other than Clifford+T is specified. + * [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – if an invalid value for `optimization_level` is passed in. + + diff --git a/docs/api/qiskit/dev/qiskit.transpiler.generate_preset_pass_manager.mdx b/docs/api/qiskit/dev/qiskit.transpiler.generate_preset_pass_manager.mdx index 88a66c59523..58725ce7ea9 100644 --- a/docs/api/qiskit/dev/qiskit.transpiler.generate_preset_pass_manager.mdx +++ b/docs/api/qiskit/dev/qiskit.transpiler.generate_preset_pass_manager.mdx @@ -10,7 +10,7 @@ python_api_name: qiskit.transpiler.generate_preset_pass_manager # qiskit.transpiler.generate\_preset\_pass\_manager - + Generate a preset [`PassManager`](qiskit.transpiler.PassManager "qiskit.transpiler.PassManager") This function is used to quickly generate a preset pass manager. Preset pass managers are the default pass managers used by the [`transpile()`](compiler#qiskit.compiler.transpile "qiskit.compiler.transpile") function. This function provides a convenient and simple method to construct a standalone [`PassManager`](qiskit.transpiler.PassManager "qiskit.transpiler.PassManager") object that mirrors what the [`transpile()`](compiler#qiskit.compiler.transpile "qiskit.compiler.transpile") function internally builds and uses. @@ -63,7 +63,7 @@ python_api_name: qiskit.transpiler.generate_preset_pass_manager * **approximation\_degree** ([*float*](https://docs.python.org/3/library/functions.html#float) *| None*) – Heuristic dial used for circuit approximation, where `1.0` means no approximation (up to numerical tolerance) and `0.0` means the maximum approximation. If `target` is available, a value of `None` indicates that approximation is allowed up to the reported error rate for an operation in the target. - * **seed\_transpiler** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Sets random seed for the stochastic parts of the transpiler. If it is not specified here it can also be specified via an environment variable: `QISKIT_TRANSPILER_SEED` or in a user configuration file. The priority order is: this argument, then the environment variable, and finally the user configuration option. So setting this argument will take precedence over the other methods of setting a seed. + * **seed\_transpiler** ([*int*](https://docs.python.org/3/library/functions.html#int) *| None*) – Sets random seed for the stochastic parts of the transpiler. If it is not specified here it can also be specified via an environment variable: `QISKIT_TRANSPILER_SEED` or in a user configuration file. The priority order is: this argument, then the environment variable, and finally the user configuration option. So setting this argument will take precedence over the other methods of setting a seed. * **unitary\_synthesis\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The name of the unitary synthesis method to use. By default `'default'` is used. You can see a list of installed plugins with [`unitary_synthesis_plugin_names()`](qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names "qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names"). diff --git a/docs/api/qiskit/dev/qiskit.transpiler.passes.Commuting2qGateRouter.mdx b/docs/api/qiskit/dev/qiskit.transpiler.passes.Commuting2qGateRouter.mdx index 049d6e3b534..bbefbdde589 100644 --- a/docs/api/qiskit/dev/qiskit.transpiler.passes.Commuting2qGateRouter.mdx +++ b/docs/api/qiskit/dev/qiskit.transpiler.passes.Commuting2qGateRouter.mdx @@ -8,7 +8,7 @@ python_api_name: qiskit.transpiler.passes.Commuting2qGateRouter # Commuting2qGateRouter - + Bases: [`TransformationPass`](qiskit.transpiler.TransformationPass "qiskit.transpiler.basepasses.TransformationPass") A class to swap route one or more commuting gates to the coupling map. @@ -127,7 +127,7 @@ python_api_name: qiskit.transpiler.passes.Commuting2qGateRouter ### run - + Run the pass by decomposing the nodes it applies on. **Parameters** @@ -151,7 +151,7 @@ python_api_name: qiskit.transpiler.passes.Commuting2qGateRouter ### swap\_decompose - + Take an instance of `Commuting2qBlock` and map it to the coupling map. The mapping is done with the swap strategy. diff --git a/docs/api/qiskit/dev/qiskit.transpiler.passes.TwoQubitPeepholeOptimization.mdx b/docs/api/qiskit/dev/qiskit.transpiler.passes.TwoQubitPeepholeOptimization.mdx new file mode 100644 index 00000000000..5b717c3a72a --- /dev/null +++ b/docs/api/qiskit/dev/qiskit.transpiler.passes.TwoQubitPeepholeOptimization.mdx @@ -0,0 +1,143 @@ +--- +title: TwoQubitPeepholeOptimization (dev version) +description: API reference for qiskit.transpiler.passes.TwoQubitPeepholeOptimization in the dev version of qiskit +in_page_toc_min_heading_level: 1 +python_api_type: class +python_api_name: qiskit.transpiler.passes.TwoQubitPeepholeOptimization +--- + +# TwoQubitPeepholeOptimization + + + Bases: [`TransformationPass`](qiskit.transpiler.TransformationPass "qiskit.transpiler.basepasses.TransformationPass") + + Unified two qubit unitary peephole optimization + + This transpiler pass is designed to perform two qubit unitary peephole optimization. This pass finds all the 2 qubit blocks in the circuit, computes the unitary of that block, and then synthesizes that unitary. If the synthesized two qubit unitary is “better” than the original subcircuit that subcircuit is used to replace the original. The heuristic used to determine if it’s better first looks at the two qubit gate count in the circuit, and prefers the synthesis with fewer two qubit gates, if the two qubit gate counts are the same then it looks at the estimated fidelity of the circuit and picks the subcircuit with higher estimated fidelity, and finally if needed it picks the subcircuit with the fewest total gates. + + In case the target is overcomplete the pass will try all the decomposers supported for all the gates supported on a given qubit. The decomposition that has the best expected performance using the above heuristic will be selected and used to replace the block. + + This pass is designed to be run on a physical circuit and the details of operations on a given qubit is assumed to be the hardware qubit from the target. However, the output of the pass might not use hardware operations, specifically single qubit gates might be emitted outside the target’s supported operations, typically only if a parameterized gate supported by the [`TwoQubitControlledUDecomposer`](qiskit.synthesis.TwoQubitControlledUDecomposer "qiskit.synthesis.TwoQubitControlledUDecomposer") is used for synthesis. As such if running this pass in a physical optimization stage (such as [Optimization stage](transpiler#transpiler-preset-stage-optimization)) this should be paired with passes such as [`BasisTranslator`](qiskit.transpiler.passes.BasisTranslator "qiskit.transpiler.passes.BasisTranslator") and/or [`Optimize1qGatesDecomposition`](qiskit.transpiler.passes.Optimize1qGatesDecomposition "qiskit.transpiler.passes.Optimize1qGatesDecomposition") to ensure that these errant single qubit gates are replaced with hardware supported operations prior to exiting the stage. + + This pass is multithreaded, and will perform the analysis in parallel and use all the cores available on your local system. You can refer to the [configuration guide](/docs/guides/configure-qiskit-local) for details on how to control the threading behavior for Qiskit more broadly which will also control this pass + + This pass is similar in functionality to running [`ConsolidateBlocks`](qiskit.transpiler.passes.ConsolidateBlocks "qiskit.transpiler.passes.ConsolidateBlocks") and [`UnitarySynthesis`](qiskit.transpiler.passes.UnitarySynthesis "qiskit.transpiler.passes.UnitarySynthesis") sequentially in your pass manager. However, this pass offers improved runtime performance by performing the synthesis in parallel. It also has improved heuristics enabled by doing the optimization in a single step which can result in better quality output, especially in cases of overcomplete and/or heterogeneous targets. However, these heuristics and this pass as a whole are only valid for physical circuits. Additionally, unlike [`UnitarySynthesis`](qiskit.transpiler.passes.UnitarySynthesis "qiskit.transpiler.passes.UnitarySynthesis") pass this does not use [Unitary Synthesis Plugins](transpiler_synthesis_plugins#unitary-synth-plugin). This is a tradeoff for performance and it forgoes the pluggability exposed via that interface. Internally it currently only uses the [`TwoQubitBasisDecomposer`](qiskit.synthesis.TwoQubitBasisDecomposer "qiskit.synthesis.TwoQubitBasisDecomposer") and [`TwoQubitControlledUDecomposer`](qiskit.synthesis.TwoQubitControlledUDecomposer "qiskit.synthesis.TwoQubitControlledUDecomposer") for synthesizing the two qubit unitaries. You should not use this pass if you need to use the pluggable interface and the ability to use different synthesis algorithms, instead you should use a combination of [`ConsolidateBlocks`](qiskit.transpiler.passes.ConsolidateBlocks "qiskit.transpiler.passes.ConsolidateBlocks") and [`UnitarySynthesis`](qiskit.transpiler.passes.UnitarySynthesis "qiskit.transpiler.passes.UnitarySynthesis") to leverage the plugin mechanism in [`UnitarySynthesis`](qiskit.transpiler.passes.UnitarySynthesis "qiskit.transpiler.passes.UnitarySynthesis"). + + ```python + from qiskit.circuit import QuantumCircuit + from qiskit.transpiler.passes import TwoQubitPeepholeOptimization + from qiskit.providers.fake_provider import GenericBackendV2 + + # Build an unoptimized 2 qubit circuit + unoptimized = QuantumCircuit(2) + for i in range(10): + if i % 2: + unoptimized.cx(0, 1) + else: + unoptimized.cx(1, 0) + # Generate a target with random error rates + backend = GenericBackendV2(2, ["u", "cx"], coupling_map=[[0, 1], [1, 0]]) + # Instantiate pass + peephole_pass = TwoQubitPeepholeOptimization(backend.target) + # Run pass and visualize output + optimized = peephole_pass(unoptimized) + optimized.draw("mpl") + ``` + + ![Optimized circuit](/docs/images/api/qiskit/dev/qiskit-transpiler-passes-TwoQubitPeepholeOptimization-1.avif) + + Initialize the pass + + **Parameters** + + * **target** – The target to run the pass for + * **approximation\_degree** – heuristic dial used for circuit approximation (1.0=no approximation, 0.0=maximal approximation). Approximation can decrease the number of gates used in the synthesized unitaries smaller at the cost of straying from the original unitary. If `None`, approximation is done based on gate fidelities specified in the `target`. + + ## Attributes + + ### is\_analysis\_pass + + + Check if the pass is an analysis pass. + + If the pass is an AnalysisPass, that means that the pass can analyze the DAG and write the results of that analysis in the property set. Modifications on the DAG are not allowed by this kind of pass. + + + ### is\_transformation\_pass + + + Check if the pass is a transformation pass. + + If the pass is a TransformationPass, that means that the pass can manipulate the DAG, but cannot modify the property set (but it can be read). + + + ## Methods + + ### execute + + + Execute optimization task for input Qiskit IR. + + **Parameters** + + * **passmanager\_ir** ([*Any*](https://docs.python.org/3/library/typing.html#typing.Any)) – Qiskit IR to optimize. + * **state** ([*PassManagerState*](qiskit.passmanager.PassManagerState "qiskit.passmanager.compilation_status.PassManagerState")) – State associated with workflow execution by the pass manager itself. + * **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable) *| None*) – A callback function which is called per execution of optimization task. + + **Returns** + + Optimized Qiskit IR and state of the workflow. + + **Return type** + + [tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[[*Any*](https://docs.python.org/3/library/typing.html#typing.Any), [*PassManagerState*](qiskit.passmanager.PassManagerState "qiskit.passmanager.compilation_status.PassManagerState")] + + + ### name + + + Name of the pass. + + **Return type** + + [str](https://docs.python.org/3/library/stdtypes.html#str) + + + ### run + + + Run a pass on the DAGCircuit. This is implemented by the pass developer. + + **Parameters** + + **dag** ([*DAGCircuit*](qiskit.dagcircuit.DAGCircuit "qiskit._accelerate.circuit.DAGCircuit")) – the dag on which the pass is run. + + **Raises** + + [**NotImplementedError**](https://docs.python.org/3/library/exceptions.html#NotImplementedError) – when this is left unimplemented for a pass. + + **Return type** + + [*DAGCircuit*](qiskit.dagcircuit.DAGCircuit "qiskit._accelerate.circuit.DAGCircuit") + + + ### update\_status + + + Update workflow status. + + **Parameters** + + * **state** ([*PassManagerState*](qiskit.passmanager.PassManagerState "qiskit.passmanager.compilation_status.PassManagerState")) – Pass manager state to update. + * **run\_state** (*RunState*) – Completion status of current task. + + **Returns** + + Updated pass manager state. + + **Return type** + + [*PassManagerState*](qiskit.passmanager.PassManagerState "qiskit.passmanager.compilation_status.PassManagerState") + + + diff --git a/docs/api/qiskit/dev/qiskit.transpiler.passes.UnrollForLoops.mdx b/docs/api/qiskit/dev/qiskit.transpiler.passes.UnrollForLoops.mdx index 33c37982087..898856b9a6f 100644 --- a/docs/api/qiskit/dev/qiskit.transpiler.passes.UnrollForLoops.mdx +++ b/docs/api/qiskit/dev/qiskit.transpiler.passes.UnrollForLoops.mdx @@ -8,7 +8,7 @@ python_api_name: qiskit.transpiler.passes.UnrollForLoops # UnrollForLoops - + Bases: [`TransformationPass`](qiskit.transpiler.TransformationPass "qiskit.transpiler.basepasses.TransformationPass") `UnrollForLoops` transpilation pass unrolls for-loops when possible. @@ -75,7 +75,7 @@ python_api_name: qiskit.transpiler.passes.UnrollForLoops ### run - + Run the UnrollForLoops pass on `dag`. **Parameters** diff --git a/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPlugin.mdx b/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPlugin.mdx index 69904322c9e..e17e86a3d55 100644 --- a/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPlugin.mdx +++ b/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPlugin.mdx @@ -8,7 +8,7 @@ python_api_name: qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPlu # HighLevelSynthesisPlugin - + Bases: [`ABC`](https://docs.python.org/3/library/abc.html#abc.ABC) Abstract high-level synthesis plugin class. @@ -19,7 +19,7 @@ python_api_name: qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPlu ### run - + Run synthesis for the given Operation. **Parameters** diff --git a/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPluginManager.mdx b/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPluginManager.mdx index e7545bf3504..2e1fee94446 100644 --- a/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPluginManager.mdx +++ b/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPluginManager.mdx @@ -8,7 +8,7 @@ python_api_name: qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPlu # HighLevelSynthesisPluginManager - + Bases: [`object`](https://docs.python.org/3/library/functions.html#object) Class tracking the installed high-level-synthesis plugins. @@ -17,19 +17,19 @@ python_api_name: qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPlu ### method - + Returns the plugin for `op_name` and `method_name`. ### method\_names - + Returns plugin methods for op\_name. ### op\_names - + Returns the names of high-level-objects with available synthesis methods. diff --git a/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPlugin.mdx b/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPlugin.mdx index fd5fa803754..41b60a3f414 100644 --- a/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPlugin.mdx +++ b/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPlugin.mdx @@ -8,7 +8,7 @@ python_api_name: qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPlugi # UnitarySynthesisPlugin - + Bases: [`ABC`](https://docs.python.org/3/library/abc.html#abc.ABC) Abstract unitary synthesis plugin class @@ -176,7 +176,7 @@ python_api_name: qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPlugi ### run - + Run synthesis for the given unitary matrix **Parameters** diff --git a/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPluginManager.mdx b/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPluginManager.mdx index 77937bc4e82..af9fb0194e8 100644 --- a/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPluginManager.mdx +++ b/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPluginManager.mdx @@ -8,7 +8,7 @@ python_api_name: qiskit.transpiler.passes.synthesis.plugin.UnitarySynthesisPlugi # UnitarySynthesisPluginManager - + Bases: [`object`](https://docs.python.org/3/library/functions.html#object) Unitary Synthesis plugin manager class diff --git a/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.high_level_synthesis_plugin_names.mdx b/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.high_level_synthesis_plugin_names.mdx index 61033c45363..e60712afbfa 100644 --- a/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.high_level_synthesis_plugin_names.mdx +++ b/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.high_level_synthesis_plugin_names.mdx @@ -10,7 +10,7 @@ python_api_name: qiskit.transpiler.passes.synthesis.plugin.high_level_synthesis_ # qiskit.transpiler.passes.synthesis.plugin.high\_level\_synthesis\_plugin\_names - + Return a list of plugin names installed for a given high level object name **Parameters** diff --git a/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names.mdx b/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names.mdx index f2106750789..bf4cb10d525 100644 --- a/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names.mdx +++ b/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names.mdx @@ -10,7 +10,7 @@ python_api_name: qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plu # qiskit.transpiler.passes.synthesis.plugin.unitary\_synthesis\_plugin\_names - + Return a list of installed unitary synthesis plugin names **Returns** diff --git a/docs/api/qiskit/dev/qiskit.transpiler.preset_passmanagers.plugin.PassManagerStagePluginManager.mdx b/docs/api/qiskit/dev/qiskit.transpiler.preset_passmanagers.plugin.PassManagerStagePluginManager.mdx index f5941803788..def703ed3d2 100644 --- a/docs/api/qiskit/dev/qiskit.transpiler.preset_passmanagers.plugin.PassManagerStagePluginManager.mdx +++ b/docs/api/qiskit/dev/qiskit.transpiler.preset_passmanagers.plugin.PassManagerStagePluginManager.mdx @@ -8,7 +8,7 @@ python_api_name: qiskit.transpiler.preset_passmanagers.plugin.PassManagerStagePl # PassManagerStagePluginManager - + Bases: [`object`](https://docs.python.org/3/library/functions.html#object) Manager class for preset pass manager stage plugins. @@ -17,7 +17,7 @@ python_api_name: qiskit.transpiler.preset_passmanagers.plugin.PassManagerStagePl ### get\_passmanager\_stage - + Get a stage **Parameters** diff --git a/docs/api/qiskit/dev/transpiler.mdx b/docs/api/qiskit/dev/transpiler.mdx index 65159f1ffab..9fadf865857 100644 --- a/docs/api/qiskit/dev/transpiler.mdx +++ b/docs/api/qiskit/dev/transpiler.mdx @@ -994,12 +994,14 @@ The scheduling of a circuit involves two parts: analysis and constraint mapping, ### Pass Manager Definition -| | | -| ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | -| [`StagedPassManager`](qiskit.transpiler.StagedPassManager "qiskit.transpiler.StagedPassManager")(\[stages]) | A pass manager pipeline built from individual stages. | -| [`PassManager`](qiskit.transpiler.PassManager "qiskit.transpiler.PassManager")(\[passes, max\_iteration]) | Manager for a set of Passes and their scheduling during transpilation. | -| [`PassManagerConfig`](qiskit.transpiler.PassManagerConfig "qiskit.transpiler.PassManagerConfig")(\[initial\_layout, ...]) | Pass Manager Configuration. | -| [`generate_preset_pass_manager`](qiskit.transpiler.generate_preset_pass_manager "qiskit.transpiler.generate_preset_pass_manager")(\[...]) | Generate a preset [`PassManager`](qiskit.transpiler.PassManager "qiskit.transpiler.PassManager") | +| | | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | +| [`StagedPassManager`](qiskit.transpiler.StagedPassManager "qiskit.transpiler.StagedPassManager")(\[stages]) | A pass manager pipeline built from individual stages. | +| [`PassManager`](qiskit.transpiler.PassManager "qiskit.transpiler.PassManager")(\[passes, max\_iteration]) | Manager for a set of Passes and their scheduling during transpilation. | +| [`PassManagerConfig`](qiskit.transpiler.PassManagerConfig "qiskit.transpiler.PassManagerConfig")(\[initial\_layout, ...]) | Pass Manager Configuration. | +| [`PassManagerCliffordTConfig`](qiskit.transpiler.PassManagerCliffordTConfig "qiskit.transpiler.PassManagerCliffordTConfig")(\[initial\_layout, ...]) | Pass Manager Configuration for Clifford+T transpilation. | +| [`generate_preset_pass_manager`](qiskit.transpiler.generate_preset_pass_manager "qiskit.transpiler.generate_preset_pass_manager")(\[...]) | Generate a preset [`PassManager`](qiskit.transpiler.PassManager "qiskit.transpiler.PassManager") | +| [`generate_preset_clifford_t_pass_manager`](qiskit.transpiler.generate_preset_clifford_t_pass_manager "qiskit.transpiler.generate_preset_clifford_t_pass_manager")(\[...]) | Generate a preset Clifford+T [`StagedPassManager`](qiskit.transpiler.StagedPassManager "qiskit.transpiler.StagedPassManager"). | ### Layout and Topology diff --git a/docs/api/qiskit/dev/transpiler_passes.mdx b/docs/api/qiskit/dev/transpiler_passes.mdx index 483341a667e..579de1a0d88 100644 --- a/docs/api/qiskit/dev/transpiler_passes.mdx +++ b/docs/api/qiskit/dev/transpiler_passes.mdx @@ -90,6 +90,7 @@ python_api_name: qiskit.transpiler.passes | [`Split2QUnitaries`](qiskit.transpiler.passes.Split2QUnitaries "qiskit.transpiler.passes.Split2QUnitaries")(\*args, \*\*kwargs) | Attempt to split two-qubit unitaries in a [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") into two single-qubit gates. | | [`SubstitutePi4Rotations`](qiskit.transpiler.passes.SubstitutePi4Rotations "qiskit.transpiler.passes.SubstitutePi4Rotations")(\*args, \*\*kwargs) | Convert rotation gates whose angles are integer multiples of $\pi/4$ into discrete sets of Clifford, [`TGate`](qiskit.circuit.library.TGate "qiskit.circuit.library.TGate") and [`TdgGate`](qiskit.circuit.library.TdgGate "qiskit.circuit.library.TdgGate") gates. | | [`TemplateOptimization`](qiskit.transpiler.passes.TemplateOptimization "qiskit.transpiler.passes.TemplateOptimization")(\*args, \*\*kwargs) | Class for the template optimization pass. | +| [`TwoQubitPeepholeOptimization`](qiskit.transpiler.passes.TwoQubitPeepholeOptimization "qiskit.transpiler.passes.TwoQubitPeepholeOptimization")(\*args, \*\*kwargs) | Unified two qubit unitary peephole optimization | ## Scheduling diff --git a/docs/api/qiskit/dev/transpiler_plugins.mdx b/docs/api/qiskit/dev/transpiler_plugins.mdx index 6d1219154d8..b3a13c3e845 100644 --- a/docs/api/qiskit/dev/transpiler_plugins.mdx +++ b/docs/api/qiskit/dev/transpiler_plugins.mdx @@ -97,7 +97,7 @@ There isn’t a limit to the number of plugins a single package can include as l ### list\_stage\_plugins - + Get a list of installed plugins for a stage. **Parameters** @@ -119,7 +119,7 @@ There isn’t a limit to the number of plugins a single package can include as l ### passmanager\_stage\_plugins - + Return a dict with, for each stage name, the class type of the plugin. This function is useful for getting more information about a plugin: diff --git a/docs/api/qiskit/dev/transpiler_preset.mdx b/docs/api/qiskit/dev/transpiler_preset.mdx index 0a55dd6991b..774a4817b16 100644 --- a/docs/api/qiskit/dev/transpiler_preset.mdx +++ b/docs/api/qiskit/dev/transpiler_preset.mdx @@ -130,7 +130,7 @@ This module contains functions for generating the preset pass managers for the t ### clifford\_t\_pass\_manager - + Generate a staged pass manager for transpiling into Clifford+T basis. This function is invoked by [`generate_preset_pass_manager()`](qiskit.transpiler.generate_preset_pass_manager "qiskit.transpiler.generate_preset_pass_manager") when the target basis consists of Clifford+T gates. It generates a specialized transpilation pipeline consisting of the following stages: @@ -151,12 +151,12 @@ This module contains functions for generating the preset pass managers for the t ``` - These stages are still experimental and subject to change. In particular, they are not yet exposed as transpiler stage plugins (unlike the stages for continuous basis sets). In addition, the fields of `pass_manager_config` that apply for transpiling into continuous basis set are ignored by this pass manager. + These stages are still experimental and subject to change. In particular, they are not yet exposed as transpiler stage plugins (unlike the stages for continuous basis sets). **Parameters** - * **pass\_manager\_config** ([*PassManagerConfig*](qiskit.transpiler.PassManagerConfig "qiskit.transpiler.passmanager_config.PassManagerConfig")) – Configuration of the pass manager. + * **pass\_manager\_config** ([*PassManagerCliffordTConfig*](qiskit.transpiler.PassManagerCliffordTConfig "qiskit.transpiler.passmanager_config.PassManagerCliffordTConfig")) – Configuration of the pass manager. * **optimization\_level** ([*int*](https://docs.python.org/3/library/functions.html#int)) – The optimization level. By default optimization level 2 is used if this is not specified. This can be 0, 1, 2, or 3. Higher levels generate potentially more optimized circuits, at the expense of longer transpilation time. **Returns** diff --git a/docs/api/qiskit/dev/transpiler_synthesis_plugins.mdx b/docs/api/qiskit/dev/transpiler_synthesis_plugins.mdx index a89a5aa93b3..8a9c7d426dc 100644 --- a/docs/api/qiskit/dev/transpiler_synthesis_plugins.mdx +++ b/docs/api/qiskit/dev/transpiler_synthesis_plugins.mdx @@ -152,6 +152,8 @@ The `name` consists of two parts separated by dot “.”: the name of the type ## Using Plugins + + ### Unitary Synthesis Plugins diff --git a/public/docs/api/qiskit-c/dev/objects.inv b/public/docs/api/qiskit-c/dev/objects.inv index d3843dad91a..bd5ba32a25d 100644 Binary files a/public/docs/api/qiskit-c/dev/objects.inv and b/public/docs/api/qiskit-c/dev/objects.inv differ diff --git a/public/docs/api/qiskit-ibm-runtime/dev/objects.inv b/public/docs/api/qiskit-ibm-runtime/dev/objects.inv index 9a07309c0fc..e951cc8136c 100644 Binary files a/public/docs/api/qiskit-ibm-runtime/dev/objects.inv and b/public/docs/api/qiskit-ibm-runtime/dev/objects.inv differ diff --git a/public/docs/api/qiskit/dev/objects.inv b/public/docs/api/qiskit/dev/objects.inv index d6bf4a0b829..d1374c9104f 100644 Binary files a/public/docs/api/qiskit/dev/objects.inv and b/public/docs/api/qiskit/dev/objects.inv differ diff --git a/public/docs/images/api/qiskit-ibm-runtime/dev/fake_provider-2.avif b/public/docs/images/api/qiskit-ibm-runtime/dev/fake_provider-2.avif index 829abcfb3bc..414af0faae8 100644 Binary files a/public/docs/images/api/qiskit-ibm-runtime/dev/fake_provider-2.avif and b/public/docs/images/api/qiskit-ibm-runtime/dev/fake_provider-2.avif differ diff --git a/public/docs/images/api/qiskit-ibm-runtime/dev/fake_provider-3.avif b/public/docs/images/api/qiskit-ibm-runtime/dev/fake_provider-3.avif index 1076e406c11..80cce3d2bf7 100644 Binary files a/public/docs/images/api/qiskit-ibm-runtime/dev/fake_provider-3.avif and b/public/docs/images/api/qiskit-ibm-runtime/dev/fake_provider-3.avif differ diff --git a/public/docs/images/api/qiskit-ibm-runtime/dev/twirling_strategy_options.avif b/public/docs/images/api/qiskit-ibm-runtime/dev/twirling_strategy_options.avif index f9b363ceafb..da946bcc97b 100644 Binary files a/public/docs/images/api/qiskit-ibm-runtime/dev/twirling_strategy_options.avif and b/public/docs/images/api/qiskit-ibm-runtime/dev/twirling_strategy_options.avif differ diff --git a/public/docs/images/api/qiskit/dev/circuit_random-1.avif b/public/docs/images/api/qiskit/dev/circuit_random-1.avif index e241db5dc65..f246ded01df 100644 Binary files a/public/docs/images/api/qiskit/dev/circuit_random-1.avif and b/public/docs/images/api/qiskit/dev/circuit_random-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/circuit_random-3.avif b/public/docs/images/api/qiskit/dev/circuit_random-3.avif index 170e5ed80c2..2a613055d67 100644 Binary files a/public/docs/images/api/qiskit/dev/circuit_random-3.avif and b/public/docs/images/api/qiskit/dev/circuit_random-3.avif differ diff --git a/public/docs/images/api/qiskit/dev/providers_fake_provider-1_01.avif b/public/docs/images/api/qiskit/dev/providers_fake_provider-1_01.avif index e7ce5ff8f5b..d8d11ea9e1d 100644 Binary files a/public/docs/images/api/qiskit/dev/providers_fake_provider-1_01.avif and b/public/docs/images/api/qiskit/dev/providers_fake_provider-1_01.avif differ diff --git a/public/docs/images/api/qiskit/dev/providers_fake_provider-1_02.avif b/public/docs/images/api/qiskit/dev/providers_fake_provider-1_02.avif index 162a167b13a..5f7bd77bdb7 100644 Binary files a/public/docs/images/api/qiskit/dev/providers_fake_provider-1_02.avif and b/public/docs/images/api/qiskit/dev/providers_fake_provider-1_02.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-ControlledGate-1.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-ControlledGate-1.avif index 10b27dc7d29..b087ef66109 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-ControlledGate-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-ControlledGate-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-ControlledGate-2.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-ControlledGate-2.avif index 17edb3fb6c8..f1c2e0019fc 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-ControlledGate-2.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-ControlledGate-2.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-Parameter-1_00.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-Parameter-1_00.avif index eb5b18d1458..542abe798ba 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-Parameter-1_00.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-Parameter-1_00.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-15_00.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-15_00.avif index 9806bbb9254..2c472460977 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-15_00.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-15_00.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-15_01.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-15_01.avif index 026bc358166..db784f688fb 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-15_01.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-15_01.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-16_00.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-16_00.avif index 01a51f96202..2a5ad4591ab 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-16_00.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-16_00.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-16_01.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-16_01.avif index 54605df906d..35c6f0a5567 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-16_01.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-16_01.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-31.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-31.avif index 312ecc92535..ef2a55718f4 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-31.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-QuantumCircuit-31.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-AndGate-1.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-AndGate-1.avif index d3e7c5215ad..df241274a05 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-AndGate-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-AndGate-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-AndGate-2.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-AndGate-2.avif index f1111697f60..6427d16fb2f 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-AndGate-2.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-AndGate-2.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-BitwiseXorGate-1.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-BitwiseXorGate-1.avif index a97c845134c..1dac7fb65b3 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-BitwiseXorGate-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-BitwiseXorGate-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-InnerProductGate-1.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-InnerProductGate-1.avif index 8c438f89a51..267def85c30 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-InnerProductGate-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-InnerProductGate-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-OrGate-1.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-OrGate-1.avif index 52218b0fca9..904f2e9b3e0 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-OrGate-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-OrGate-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-OrGate-2.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-OrGate-2.avif index 48d6a4a5d1a..0cf51e5f3eb 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-OrGate-2.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-OrGate-2.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-PermutationGate-2.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-PermutationGate-2.avif index 8a8286026e1..593fb247445 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-PermutationGate-2.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-PermutationGate-2.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-PhaseEstimation-1.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-PhaseEstimation-1.avif index 64b9e4b4a69..6001a14feb6 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-PhaseEstimation-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-PhaseEstimation-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-random_iqp-1.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-random_iqp-1.avif index 27c6e67113c..36e4bff13d0 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-random_iqp-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-random_iqp-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-unitary_overlap-1.avif b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-unitary_overlap-1.avif index def2727b488..fea5a1bb623 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-circuit-library-unitary_overlap-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-circuit-library-unitary_overlap-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-quantum_info-Statevector-1.avif b/public/docs/images/api/qiskit/dev/qiskit-quantum_info-Statevector-1.avif index 08ebc9941c7..54b3ca0bfa5 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-quantum_info-Statevector-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-quantum_info-Statevector-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-transpiler-passes-FilterOpNodes-1.avif b/public/docs/images/api/qiskit/dev/qiskit-transpiler-passes-FilterOpNodes-1.avif index bc12466cf34..f05882d7e0a 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-transpiler-passes-FilterOpNodes-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-transpiler-passes-FilterOpNodes-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-transpiler-passes-RemoveBarriers-1.avif b/public/docs/images/api/qiskit/dev/qiskit-transpiler-passes-RemoveBarriers-1.avif index 76266f01989..3b0beee559c 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-transpiler-passes-RemoveBarriers-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-transpiler-passes-RemoveBarriers-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-transpiler-passes-TwoQubitPeepholeOptimization-1.avif b/public/docs/images/api/qiskit/dev/qiskit-transpiler-passes-TwoQubitPeepholeOptimization-1.avif new file mode 100644 index 00000000000..eea8d6ee931 Binary files /dev/null and b/public/docs/images/api/qiskit/dev/qiskit-transpiler-passes-TwoQubitPeepholeOptimization-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-transpiler-passes-WrapAngles-1.avif b/public/docs/images/api/qiskit/dev/qiskit-transpiler-passes-WrapAngles-1.avif index f77cfb219c1..d208631d5db 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-transpiler-passes-WrapAngles-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-transpiler-passes-WrapAngles-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-visualization-circuit_drawer-1.avif b/public/docs/images/api/qiskit/dev/qiskit-visualization-circuit_drawer-1.avif index 368ef900d65..68e55d26638 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-visualization-circuit_drawer-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-visualization-circuit_drawer-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_circuit_layout-1.avif b/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_circuit_layout-1.avif index e03e4fa4bed..8c8a14d36bc 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_circuit_layout-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_circuit_layout-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_error_map-1.avif b/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_error_map-1.avif index 971f555c96d..31ad2f02d78 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_error_map-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_error_map-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_histogram-1_01.avif b/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_histogram-1_01.avif index 8237aed7a9a..59696268e5d 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_histogram-1_01.avif and b/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_histogram-1_01.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_histogram-1_02.avif b/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_histogram-1_02.avif index 53d178bdb8f..6c7e21a9f61 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_histogram-1_02.avif and b/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_histogram-1_02.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_state_hinton-1.avif b/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_state_hinton-1.avif index 3096cce80cb..cc170d361ea 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_state_hinton-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_state_hinton-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_state_paulivec-1.avif b/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_state_paulivec-1.avif index 4e5bf5b4962..5b8527db195 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_state_paulivec-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-visualization-plot_state_paulivec-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-visualization-timeline_drawer-1.avif b/public/docs/images/api/qiskit/dev/qiskit-visualization-timeline_drawer-1.avif index 3fcba8340ad..a448fb10501 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-visualization-timeline_drawer-1.avif and b/public/docs/images/api/qiskit/dev/qiskit-visualization-timeline_drawer-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-visualization-timeline_drawer-2.avif b/public/docs/images/api/qiskit/dev/qiskit-visualization-timeline_drawer-2.avif index 08f26ef79d2..f38c92f0960 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-visualization-timeline_drawer-2.avif and b/public/docs/images/api/qiskit/dev/qiskit-visualization-timeline_drawer-2.avif differ diff --git a/public/docs/images/api/qiskit/dev/qiskit-visualization-timeline_drawer-3.avif b/public/docs/images/api/qiskit/dev/qiskit-visualization-timeline_drawer-3.avif index b59b29d48bf..760fa54e63c 100644 Binary files a/public/docs/images/api/qiskit/dev/qiskit-visualization-timeline_drawer-3.avif and b/public/docs/images/api/qiskit/dev/qiskit-visualization-timeline_drawer-3.avif differ diff --git a/public/docs/images/api/qiskit/dev/transpiler-10.avif b/public/docs/images/api/qiskit/dev/transpiler-10.avif index cb012779c1d..f3b2af320cf 100644 Binary files a/public/docs/images/api/qiskit/dev/transpiler-10.avif and b/public/docs/images/api/qiskit/dev/transpiler-10.avif differ diff --git a/public/docs/images/api/qiskit/dev/transpiler-9.avif b/public/docs/images/api/qiskit/dev/transpiler-9.avif index a6304feead6..ed26092683f 100644 Binary files a/public/docs/images/api/qiskit/dev/transpiler-9.avif and b/public/docs/images/api/qiskit/dev/transpiler-9.avif differ diff --git a/public/docs/images/api/qiskit/dev/visualization-1.avif b/public/docs/images/api/qiskit/dev/visualization-1.avif index 07ae3b61bea..759fdf6bc08 100644 Binary files a/public/docs/images/api/qiskit/dev/visualization-1.avif and b/public/docs/images/api/qiskit/dev/visualization-1.avif differ diff --git a/public/docs/images/api/qiskit/dev/visualization-3.avif b/public/docs/images/api/qiskit/dev/visualization-3.avif index 0298f7d66f3..72c229b4789 100644 Binary files a/public/docs/images/api/qiskit/dev/visualization-3.avif and b/public/docs/images/api/qiskit/dev/visualization-3.avif differ diff --git a/scripts/config/api-html-artifacts.json b/scripts/config/api-html-artifacts.json index 251b4abf5ff..80c54eaba82 100644 --- a/scripts/config/api-html-artifacts.json +++ b/scripts/config/api-html-artifacts.json @@ -1,6 +1,6 @@ { "qiskit": { - "dev": "https://api.github.com/repos/Qiskit/qiskit/actions/artifacts/7096557921/zip", + "dev": "https://api.github.com/repos/Qiskit/qiskit/actions/artifacts/7150553832/zip", "2.4": "https://ibm.box.com/shared/static/8dug8a79f1xdohccyasfaazxn0tejzg9.zip", "2.3": "https://ibm.box.com/shared/static/hu6gvj4857vb5sew5k98rr9yd7pxasqy.zip", "2.2": "https://ibm.box.com/shared/static/c1lktwwwo9zu4z5wxqg1xs9fj57oeoco.zip", @@ -36,7 +36,7 @@ "0.19": "https://ibm.box.com/shared/static/wjoea4x5tnxd0l4lgo2v3kxnx6btxvvl.zip" }, "qiskit-ibm-runtime": { - "dev": "https://api.github.com/repos/Qiskit/qiskit-ibm-runtime/actions/artifacts/7052144582/zip", + "dev": "https://api.github.com/repos/Qiskit/qiskit-ibm-runtime/actions/artifacts/7140076960/zip", "0.47": "https://ibm.box.com/shared/static/68x7u8qpr72id254w6hnjbgo7317hwjk.zip", "0.46": "https://ibm.box.com/shared/static/p2jntzpdwqa75i75d0sm5ltzbaaw5ksa.zip", "0.45": "https://ibm.box.com/shared/static/5o5rt86cc2ehvxmslleecat3iyob8igu.zip", diff --git a/scripts/config/historical-pages-to-latest.json b/scripts/config/historical-pages-to-latest.json index d0a88e62787..c87f93ed6b2 100644 --- a/scripts/config/historical-pages-to-latest.json +++ b/scripts/config/historical-pages-to-latest.json @@ -1120,7 +1120,11 @@ "2.1": {}, "2.2": {}, "2.3": {}, - "dev": {} + "dev": { + "qiskit.transpiler.PassManagerCliffordTConfig": "/", + "qiskit.transpiler.generate_preset_clifford_t_pass_manager": "/", + "qiskit.transpiler.passes.TwoQubitPeepholeOptimization": "/" + } }, "qiskit-ibm-runtime": { "0.25": { @@ -1462,7 +1466,10 @@ "0.44": {}, "0.45": {}, "0.46": {}, - "dev": {} + "dev": { + "quantum-program-circuit-item": "/", + "quantum-program-samplex-item": "/" + } }, "qiskit-ibm-transpiler": { "0.13": {},