Skip to content

Commit 517d715

Browse files
authored
Add cext slots added since last update (#15838)
While gh-15778 is not yet merged, we don't have CI enforcement that the vtable slots are always completely up-to-date. Several PRs adding new C API functions merged between the merge-base of gh-15761[^1] and `main` at its time of merge (and subsequently). This PR uses the machinery in gh-15778 to bring the slots completely up-to-date. [^1]: 888c877: Add C API vtable to `pyext`
1 parent 55f4eb1 commit 517d715

1 file changed

Lines changed: 28 additions & 3 deletions

File tree

crates/cext-vtable/src/lib.rs

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ mod circuit {
4747
#[cfg(feature = "addr")]
4848
use qiskit_cext::circuit::*;
4949

50+
#[rustfmt::skip] // Don't wrap long lines so everything stays on one line for counting.
5051
pub static FUNCTIONS: ExportedFunctions = ExportedFunctions::leaves(100, || {
5152
vec![
5253
export_fn!(qk_circuit_new),
@@ -78,10 +79,21 @@ mod circuit {
7879
export_fn!(qk_circuit_get_instruction),
7980
export_fn!(qk_circuit_instruction_clear),
8081
export_fn!(qk_opcounts_clear),
81-
export_fn!(qk_circuit_to_python, feature = "python_binding"),
8282
export_fn!(qk_circuit_delay),
8383
export_fn!(qk_circuit_to_dag),
8484
export_fn!(qk_circuit_copy_empty_like),
85+
export_fn!(qk_circuit_num_param_symbols),
86+
export_fn!(qk_circuit_parameterized_gate),
87+
export_fn!(qk_circuit_to_python, feature = "python_binding"),
88+
export_fn!(qk_circuit_to_python_full, feature = "python_binding"),
89+
export_fn!(qk_circuit_borrow_from_python, feature = "python_binding"),
90+
export_fn!(qk_circuit_convert_from_python, feature = "python_binding"),
91+
export_fn!(qk_quantum_register_to_python, feature = "python_binding"),
92+
export_fn!(qk_quantum_register_borrow_from_python, feature = "python_binding"),
93+
export_fn!(qk_quantum_register_convert_from_python, feature = "python_binding"),
94+
export_fn!(qk_classical_register_to_python, feature = "python_binding"),
95+
export_fn!(qk_classical_register_borrow_from_python, feature = "python_binding"),
96+
export_fn!(qk_classical_register_convert_from_python, feature = "python_binding"),
8597
export_fn!(qk_circuit_draw),
8698
]
8799
});
@@ -229,6 +241,8 @@ mod sparse_observable {
229241
export_fn!(qk_obsterm_str),
230242
export_fn!(qk_bitterm_label),
231243
export_fn!(qk_obs_to_python, feature = "python_binding"),
244+
export_fn!(qk_obs_borrow_from_python, feature = "python_binding"),
245+
export_fn!(qk_obs_convert_from_python, feature = "python_binding"),
232246
]
233247
});
234248
}
@@ -268,6 +282,14 @@ mod transpiler {
268282
export_fn!(qk_transpile_layout_to_python, feature = "python_binding"),
269283
]
270284
});
285+
pub static TRANSPILE_STATE: ExportedFunctions = ExportedFunctions::leaves(15, || {
286+
vec![
287+
export_fn!(qk_transpile_state_new),
288+
export_fn!(qk_transpile_state_free),
289+
export_fn!(qk_transpile_state_layout),
290+
export_fn!(qk_transpile_state_layout_set),
291+
]
292+
});
271293

272294
mod target {
273295
use crate::impl_::prelude::*;
@@ -357,6 +379,8 @@ mod transpiler {
357379
export_fn!(unitary_synthesis::qk_transpiler_pass_standalone_unitary_synthesis),
358380
export_fn!(vf2::qk_transpiler_pass_standalone_vf2_layout_average),
359381
export_fn!(vf2::qk_transpiler_pass_standalone_vf2_layout_exact),
382+
export_fn!(convert_to_pauli_rotations::qk_transpiler_pass_standalone_convert_to_pauli_rotations),
383+
export_fn!(litinski_transformation::qk_transpiler_pass_standalone_litinski_transformation),
360384
]
361385
});
362386
static FUNCTIONS_SABRE: ExportedFunctions = ExportedFunctions::leaves(5, || {
@@ -389,6 +413,7 @@ mod transpiler {
389413
.add_child(0, &TRANSPILE_FUNCTION)
390414
.add_child(20, &NEIGHBORS)
391415
.add_child(35, &TRANSPILE_LAYOUT)
392-
.add_child(50, &target::FUNCTIONS)
393-
.add_child(150, &passes::FUNCTIONS);
416+
.add_child(50, &TRANSPILE_STATE)
417+
.add_child(150, &target::FUNCTIONS)
418+
.add_child(250, &passes::FUNCTIONS);
394419
}

0 commit comments

Comments
 (0)