qiskit_qm_provider.utils.compilation.qua_script.get_qua_script

get_qua_script(backend: QMBackend, circuit: QuantumCircuit, param_table: Mapping[Any, Any] | None = None) → str[source][source]

Compile a circuit on its own and return the QUA script that would run, to inspect its pulse sequence.

The circuit is compiled outside any QUA program, so no ParameterTable or Parameter can be declared for it: each circuit input instead starts from a plain Python value. Inputs missing from param_table start from a typed zero (0.0, 0 or False, or a list of those for an array input), so a parameterized circuit needs no bindings at all. To compile with real streamed parameters, call quantum_circuit_to_qua() inside with program(): instead.

Parameters:
  • backend – The QM backend (used for quantum_circuit_to_qua and generate_config).

  • circuit – The transpiled QuantumCircuit to compile to QUA.

  • param_table – Optional Python values for some circuit inputs, keyed like a quantum_circuit_to_qua dict (circuit objects or their names).

Returns:

The QUA script string (Python source of the program that would be executed).

Raises:

TypeError – if param_table is not a dict (a table cannot be declared outside a QUA program).