qdk_chemistry.ui.tools module
MCP tools for the qdk_chemistry toolkit.
- qdk_chemistry.ui.tools.available_backends()
Return list of registered backend names.
- qdk_chemistry.ui.tools.get_mcp_safe_config_options(name)
Return MCP-safe constructor options for a registered backend.
Unknown backends and those without a direct declaration expose no configurable options to MCP clients.
- qdk_chemistry.ui.tools.available_caches()
Return list of registered cache backend names.
- qdk_chemistry.ui.tools.resolve_cache(cache, **kwargs)
Normalise a user-supplied cache argument.
Accepts any of the following:
NonereturnsNoneA
CacheBackendinstance → returned as-isA
Pathor path-like string →FolderCache(path=...)A registered name string → looked up in the registry; extra
kwargsare forwarded to the backend constructor.
- Parameters:
cache (
str|Path|CacheBackend|None) – Cache instance, registered backend name, filesystem path, orNone.**kwargs (
Any) – Backend-specific configuration for a name or filesystem path.
- Return type:
- class qdk_chemistry.ui.tools.FolderCache(path, *, is_shared=False, **_kwargs)
Bases:
CacheBackendContent-addressed folder cache.
- Parameters:
- __init__(path, *, is_shared=False, **_kwargs)
Initialise with the cache directory path.
- get_job(run_hash)
Retrieve job metadata by run_hash, or
Noneon miss.
- put_job(run_hash, job)
Store (or update) job metadata keyed by run_hash.
- get_data(content_hash)
Retrieve cached data by its content hash, or
None.
- put_data(content_hash, data, *, shared_only=False)
Store data by content hash unless shared storage is required but unavailable.
- has_data(content_hash, *, shared_only=False)
Fast existence check via glob (no deserialization).
- delete_job(run_hash)
Remove job metadata by run_hash.
Only the
.job.jsonfile is deleted. Data blobs are left intact because they may be referenced by other jobs.
- delete_data(content_hash)
Remove a DataClass blob (or list manifest and its items) by content hash.
- class qdk_chemistry.ui.tools.Job(*, job_id, backend, backend_config, backend_state, algorithm_info=None, status='submitted', submitted_at=None, file_path=None, run_hash=None, input_hashes=None, output_hashes=None, output_is_tuple=None, owner=None)
Bases:
objectPersistent handle for a cached computation.
Instances serialise to a JSON file on disk, making them the canonical record of a cached algorithm run.
- Parameters:
- job_id
Short unique identifier for this job.
- backend
Registered backend name (e.g.
"local").
- backend_config
Dict of configuration that was passed to the backend constructor (pool, gpus, host, …). Stored so the backend can be re-created from scratch.
- backend_state
Opaque dict written by the backend during submit. Contains whatever the backend needs to poll / cancel / fetch (operation IDs, remote paths, PIDs, …).
- algorithm_info
Dict with
type,name,settingsof the algorithm that was submitted.
- status
Last-known status string.
- submitted_at
ISO-8601 timestamp of submission.
- file_path
Path to the job file on disk (
Noneif not persisted yet).
- run_hash
Deterministic hash of the algorithm, settings, and inputs. Used for cache lookups.
Noneif not computed.
- input_hashes
Per-item content hashes of the submitted inputs, keyed by namespaced argument name (e.g.
"args.arg_0","kwargs.charge").Noneif not recorded.
- output_hashes
Per-item result descriptors. Each entry is a dict with
"hash"and"type"keys. Primitives also carry a"value"key so they can be reconstructed without a cache backend. Populated when results are fetched.Noneuntil results are retrieved.
- output_is_tuple
Whether the retrieved result is a tuple.
Noneuntil results are retrieved.
- owner
Workspace and project permitted to manage the job through MCP.
Nonefor unowned SDK jobs.
- __init__(*, job_id, backend, backend_config, backend_state, algorithm_info=None, status='submitted', submitted_at=None, file_path=None, run_hash=None, input_hashes=None, output_hashes=None, output_is_tuple=None, owner=None)
Initialise a Job from its constituent parts.
- Parameters:
job_id (
str) – Unique identifier assigned by the backend.backend (
str) – Registered backend name.backend_config (
dict[str,Any]) – Configuration used to reconstruct the backend.backend_state (
dict[str,Any]) – Persisted backend-specific job state.algorithm_info (
dict[str,Any] |None) – Submitted algorithm type, name, and settings.status (
str) – Initial job status.file_path (
str|Path|None) – Optional path for the persisted job record.run_hash (
str|None) – Deterministic hash used for cache lookup.input_hashes (
dict[str,str] |None) – Content hashes for submitted inputs.output_hashes (
list[dict[str,Any]] |None) – Content-hash descriptors for retrieved outputs.output_is_tuple (
bool|None) – Whether the retrieved result is a tuple.owner (
dict[str,str|None] |None) – Workspace and project permitted to manage this job through MCP.
- save(path=None)
Write the job file to disk atomically.
- classmethod load(path)
Reconstruct a
Jobfrom a previously saved file.
- classmethod discover(directory)
Find all job files in a directory.
- attach_backend(backend)
Associate this in-memory job with its submitting backend.
- Return type:
- Parameters:
backend (RemoteBackend)
- fetch(local_dir=None, *, cleanup=False)
Download and persist results, then optionally remove backend artifacts.
- cleanup()
Remove backend artifacts for this terminal job.
Repeated cleanup is safe when supported by the backend.
- Raises:
RuntimeError – If the job has not reached a terminal state.
- Return type:
- wait()
Block until the job reaches a terminal state.
- Return type:
- Returns:
The final status reported by the backend.
- Raises:
TimeoutError – If the configured timeout expires before completion.
- qdk_chemistry.ui.tools.compute_valence_space_parameters(wavefunction: qdk_chemistry.data.Wavefunction, charge: SupportsInt | SupportsIndex, include_double_d_shell: bool = False) tuple[int, int]
Get the default number of active electrons and active orbitals, which are obtained from the valence electrons and orbitals of the atomic element types in the structure. The structure is automatically extracted from the wavefunction.
- Parameters:
wavefunction – The input wavefunction (the molecular structure is taken from
wavefunction.orbitals.basis_set.structure).charge – The total charge of the molecular system. Should match the charge used in the upstream SCF calculation.
include_double_d_shell – When
True, add 5 correlating d’ orbitals per d-block atom (Sc-Zn, Y-Cd, Hf-Hg) to capture the strong nd / (n+1)d’ radial correlation in transition metals (the “double d-shell” effect). Defaults toFalseto preserve the historical sizing.
- Returns:
Pair of ( n_active_electrons, n_active_orbitals )
- Return type:
Examples
>>> nele, norb = compute_valence_space_parameters(wavefunction, charge) >>> nele, norb = compute_valence_space_parameters(wavefunction, charge, include_double_d_shell=True)
- qdk_chemistry.ui.tools.check_output_exists(filename, data_class=None)
Check if an output file already exists with valid content.
- Parameters:
- Returns:
A message if the file exists with valid content, None otherwise
- Return type:
- qdk_chemistry.ui.tools.check_output_path_exists(filename, data_class=None)
Check whether an exact output path already exists with valid content.
- qdk_chemistry.ui.tools.load_data_object(filename, data_class)
Load a data object from either json or hdf5 file based on extension.
- Parameters:
- Returns:
The loaded data object
- Raises:
ValueError – If file extension is not supported
- qdk_chemistry.ui.tools.save_data_object(data_obj, filename)
Save a data object to either json or hdf5 file based on extension.
- Parameters:
- Returns:
The filename where data was saved
- Return type:
- Raises:
ValueError – If file extension is not supported
- exception qdk_chemistry.ui.tools.FilenameFormatError
Bases:
ExceptionRaised when a filename has an invalid format for the expected data type.
- qdk_chemistry.ui.tools.current_project_name()
Return the project currently validated for this execution context.
- qdk_chemistry.ui.tools.ensure_filename_format(filename, data_type)
Ensure filename contains the correct type marker for the given data type.
- Parameters:
- Return type:
- Returns:
The corrected filename with proper type marker
- Raises:
FilenameFormatError – If the data type is unrecognized or the file extension is invalid
- qdk_chemistry.ui.tools.resolve_project_file(filename, *, allow_nested=False, allow_absolute=False)
Resolve a client-provided filename inside the current project sandbox.
Absolute paths, traversal components, Windows drive or UNC paths, and symlinks that resolve outside the project are rejected.
- Parameters:
- Return type:
- Returns:
An absolute path contained by the current project directory.
- Raises:
RuntimeError – If called outside a validated project context.
ValueError – If the filename is invalid or escapes the project.
- qdk_chemistry.ui.tools.resolve_project_path(project_name, projects_dir)
Resolve a single-component project name beneath the projects directory.
- qdk_chemistry.ui.tools.strip_filename_path(filename)
Return only the filename, accepting both POSIX and Windows separators.
- qdk_chemistry.ui.tools.validate_project(func)
Decorator to validate project before executing the function.
Validates that a project exists and exposes its absolute directory through the current execution context. The process working directory is unchanged.
It expects the decorated function to have
project_nameas its first parameter afterself(if applicable).- Parameters:
func (
TypeVar(F, bound=Callable[...,Any])) – The function to decorate. Must haveproject_name: stras a parameter.- Returns:
The decorated function with project validation logic, or str: a JSON string with error information.
- Return type:
Example:
@validate_project @app.tool() def my_function(project_name: str, other_param: int) -> str: # This function will only execute if project_name is valid return "success"
- qdk_chemistry.ui.tools.current_workspace_root()
Return the immutable workspace binding for this MCP process.
- async qdk_chemistry.ui.tools.workspace_binding_middleware(context, call_next)
Require a workspace binding before plugin tools resolve relative paths.
- Parameters:
- Return type:
- Returns:
The downstream handler result.
- Raises:
RuntimeError – If binding is required but neither an existing binding nor a single client workspace root is available.
- qdk_chemistry.ui.tools.register_visualization_tools(app)
Register interactive widget-based visualization tools on an MCP server.
Tools are registered only when
qsharp_widgetsis installed. Otherwise, this function is a no-op.- Parameters:
app – MCP server application that receives the widget resources and tools.
- Return type:
- async qdk_chemistry.ui.tools.bind_workspace(ctx, workspace_root=None)[source]
Bind this MCP process to a workspace root.
- qdk_chemistry.ui.tools.list_algorithms(algorithm_type=None)[source]
List registered algorithm implementations and defaults.
- qdk_chemistry.ui.tools.describe_algorithm(algorithm_type, algorithm_name=None)[source]
Describe a registered algorithm implementation and its settings.
- qdk_chemistry.ui.tools.list_remote_backends()[source]
List registered remote execution backend names.
- qdk_chemistry.ui.tools.create_project(project_name)[source]
Create a project directory and return its metadata.
- qdk_chemistry.ui.tools.list_project_files(project_name)[source]
List project files with sizes and inferred data types.
- qdk_chemistry.ui.tools.get_summary(project_name, filename)[source]
Load a supported data file and return its summary.
- qdk_chemistry.ui.tools.list_tools(category=None)[source]
List MCP tool names by functional category.
- qdk_chemistry.ui.tools.convert_coordinates(coordinates_json, to_unit)[source]
Convert Cartesian coordinates between Bohr and Angstrom.
- qdk_chemistry.ui.tools.convert_energy(value, from_unit, to_unit)[source]
Convert an energy value between supported units.
- qdk_chemistry.ui.tools.describe_backend(backend_type, name)[source]
Describe accepted configuration fields for a cache or remote backend.
- qdk_chemistry.ui.tools.create_structure(project_name, coordinates_json, symbols, nuclear_charges=None, masses=None, filename_to_save='structure.structure.json', overwrite=False)[source]
Create and save a Structure from Bohr coordinates; use convert_coordinates for Angstrom input.
- qdk_chemistry.ui.tools.get_algorithm_default_type(algorithm_type)[source]
Return the default implementation name for an algorithm type.
- qdk_chemistry.ui.tools.get_algorithm_default_settings(algorithm_type, algorithm_name=None)[source]
Return default settings for an algorithm implementation.
- qdk_chemistry.ui.tools.get_orbitals_from_input(project_name, input_filename, out_orbitals_filename, overwrite=False)[source]
Extract and save Orbitals from a supported electronic-structure object.
- qdk_chemistry.ui.tools.get_active_space_indices(project_name, input_filename)[source]
Return active, inactive, and virtual orbital indices from a supported object.
- qdk_chemistry.ui.tools.get_ansatz(project_name, wavefunction_filename, hamiltonian_filename, out_ansatz_filename, overwrite=False)[source]
Combine a saved Hamiltonian and Wavefunction into a saved Ansatz.
- qdk_chemistry.ui.tools.run_active_space_selector(project_name, wavefunction_filename, out_wavefunction_filename, charge=None, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Run an active-space selector on a Wavefunction and save the resulting Wavefunction.
- qdk_chemistry.ui.tools.run_dynamical_correlation_calculator(project_name, ansatz_filename, out_wavefunction_filename, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Run dynamical correlation for an Ansatz and save the resulting Wavefunction.
- qdk_chemistry.ui.tools.run_hamiltonian_constructor(project_name, orbitals_filename, out_hamiltonian_filename, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Build and save a fermionic Hamiltonian from molecular Orbitals.
- qdk_chemistry.ui.tools.create_model_hamiltonian(project_name, model, out_hamiltonian_filename, lattice_type, lattice_params, epsilon=0.0, t=1.0, u_coulomb=0.0, v_coulomb=None, z=1.0, potential=None, potential_params=None, overwrite=False)[source]
Construct and save a fermionic lattice-model Hamiltonian.
- qdk_chemistry.ui.tools.create_spin_model_hamiltonian(project_name, model, out_qubit_hamiltonian_filename, lattice_type, lattice_params, jx=0.0, jy=0.0, jz=0.0, hx=0.0, hy=0.0, hz=0.0, j=None, h=None, overwrite=False)[source]
Construct and save an Ising or Heisenberg QubitHamiltonian.
- qdk_chemistry.ui.tools.run_orbital_localization(project_name, wavefunction_filename, out_wavefunction_filename, loc_indices_alpha, loc_indices_beta=None, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Localize selected Wavefunction orbitals and save the resulting Wavefunction.
- qdk_chemistry.ui.tools.run_stability_checker(project_name, wavefunction_filename, out_stability_result_filename, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Evaluate orbital-rotation stability and save the StabilityResult.
- qdk_chemistry.ui.tools.run_term_grouper(project_name, qubit_hamiltonian_filename, out_qubit_hamiltonian_filename, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Partition a saved QubitOperator’s Pauli terms and save the grouped operator.
- qdk_chemistry.ui.tools.run_amplitude_amplification(project_name, state_prep_oracle_filename, good_state_oracle_filename, out_circuit_filename, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Build and save an amplitude-amplified Circuit from state-preparation and good-state oracle Circuits.
- Return type:
- Parameters:
- qdk_chemistry.ui.tools.run_hadamard_test(project_name, state_preparation_circuit_filename, unitary_filename, out_executor_data_filename, shots, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Run a Hadamard test for a saved state-preparation Circuit and UnitaryRepresentation.
- Return type:
- Parameters:
- qdk_chemistry.ui.tools.run_evolution_circuit_builder(project_name, base_hamiltonian_filename, drive_hamiltonian_filename, drive_times, drive_values, state_preparation_circuit_filename, out_circuit_filename, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Build a Circuit for H(t)=H0+f(t)H1 using a piecewise-linear drive schedule.
- Return type:
- Parameters:
project_name (str)
base_hamiltonian_filename (str)
drive_hamiltonian_filename (str)
state_preparation_circuit_filename (str)
out_circuit_filename (str)
algorithm_name (str | None)
settings (dict | None)
cache (str | None)
remote (str | None)
remote_config (dict | None)
remote_timeout (int)
overwrite (bool)
- qdk_chemistry.ui.tools.run_hamiltonian_simulation(project_name, base_hamiltonian_filename, drive_hamiltonian_filename, drive_times, drive_values, observable_filenames, state_preparation_circuit_filename, out_energy_result_filenames, out_measurement_data_filenames, shots=1000, noise_model=None, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Evolve H(t)=H0+f(t)H1, measure observables, and save each result pair.
- Return type:
- Parameters:
project_name (str)
base_hamiltonian_filename (str)
drive_hamiltonian_filename (str)
state_preparation_circuit_filename (str)
shots (int)
noise_model (Any | None)
algorithm_name (str | None)
settings (dict | None)
cache (str | None)
remote (str | None)
remote_config (dict | None)
remote_timeout (int)
overwrite (bool)
- qdk_chemistry.ui.tools.run_qubit_hamiltonian_solver(project_name, qubit_hamiltonian_filename, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None)[source]
Diagonalize a QubitHamiltonian and return its mapped energy, excluding core energy, and eigenstate.
- qdk_chemistry.ui.tools.run_energy_estimator(project_name, circuit_filename, qubit_hamiltonian_filename, out_energy_result_filename, out_measurement_data_filename, total_shots, noise_model=None, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Estimate a mapped Hamiltonian expectation value, excluding core energy, and variance from a Circuit.
- Return type:
- Parameters:
project_name (str)
circuit_filename (str)
qubit_hamiltonian_filename (str)
out_energy_result_filename (str)
out_measurement_data_filename (str)
total_shots (int)
noise_model (Any | None)
algorithm_name (str | None)
settings (dict | None)
cache (str | None)
remote (str | None)
remote_config (dict | None)
remote_timeout (int)
overwrite (bool)
- qdk_chemistry.ui.tools.create_majorana_mapping(project_name, out_mapping_filename, encoding='jordan-wigner', num_modes=None, hamiltonian_filename=None, overwrite=False)[source]
Create and save a MajoranaMapping for a mode count or Hamiltonian.
- qdk_chemistry.ui.tools.run_qubit_mapper(project_name, hamiltonian_filename, mapping_filename, out_qubit_hamiltonian_filename, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Save a mapped QubitHamiltonian excluding core energy and return its filename with the companion offset.
- Return type:
- Parameters:
- qdk_chemistry.ui.tools.run_state_preparation(project_name, wavefunction_filename, out_circuit_filename, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Compile a Wavefunction into a saved Circuit.
- qdk_chemistry.ui.tools.estimate_circuit(project_name, circuit_filename, params=None)[source]
Estimate a stored Circuit with its QDK estimator parameters and return the result inline.
- qdk_chemistry.ui.tools.run_time_evolution_builder(project_name, qubit_hamiltonian_filename, evolution_time, out_time_evolution_unitary_filename, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Build exp(-iHt) from a QubitHamiltonian and save the TimeEvolutionUnitary.
- Return type:
- Parameters:
- qdk_chemistry.ui.tools.run_controlled_evolution_circuit_mapper(project_name, time_evolution_unitary_filename, out_circuit_filename, control_indices=None, power=1, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Map a TimeEvolutionUnitary to a saved controlled Circuit.
- Return type:
- Parameters:
- qdk_chemistry.ui.tools.run_circuit_executor(project_name, circuit_filename, shots, out_executor_data_filename, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Execute a Circuit and save its CircuitExecutorData.
- qdk_chemistry.ui.tools.run_phase_estimation(project_name, state_prep_circuit_filename, qubit_hamiltonian_filename, out_qpe_result_filename, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Run phase estimation and save a QpeResult whose mapped energies exclude core energy.
- Return type:
- Parameters:
- qdk_chemistry.ui.tools.run_scf(project_name, structure_filename, out_wavefunction_filename, charge, spin_multiplicity, basis_set, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Run an HF or DFT self-consistent-field calculation and save its Wavefunction.
- Return type:
- Parameters:
- qdk_chemistry.ui.tools.run_population_analysis(project_name, wavefunction_filename, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Compute and return per-center populations from a Wavefunction.
- qdk_chemistry.ui.tools.run_nuclear_derivative_calculator(project_name, structure_filename, out_gradients_filename, charge, spin_multiplicity, seed_or_basis, n_inactive_orbitals=0, out_wavefunction_filename=None, out_hessian_filename=None, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Compute nuclear derivatives for a Structure and save requested outputs.
- Return type:
- Parameters:
project_name (str)
structure_filename (str)
out_gradients_filename (str)
charge (int)
spin_multiplicity (int)
seed_or_basis (str)
n_inactive_orbitals (int)
out_wavefunction_filename (str | None)
out_hessian_filename (str | None)
algorithm_name (str | None)
settings (dict | None)
cache (str | None)
remote (str | None)
remote_config (dict | None)
remote_timeout (int)
overwrite (bool)
- qdk_chemistry.ui.tools.run_geometry_optimization(project_name, structure_filename, out_structure_filename, charge, spin_multiplicity, seed_or_basis, n_inactive_orbitals=0, out_wavefunction_filename=None, out_hessian_filename=None, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Optimize molecular geometry and save the resulting Structure.
- Return type:
- Parameters:
project_name (str)
structure_filename (str)
out_structure_filename (str)
charge (int)
spin_multiplicity (int)
seed_or_basis (str)
n_inactive_orbitals (int)
out_wavefunction_filename (str | None)
out_hessian_filename (str | None)
algorithm_name (str | None)
settings (dict | None)
cache (str | None)
remote (str | None)
remote_config (dict | None)
remote_timeout (int)
overwrite (bool)
- qdk_chemistry.ui.tools.run_multi_configuration_calculation(project_name, hamiltonian_filename, out_wavefunction_filename, n_active_alpha_electrons, n_active_beta_electrons=None, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Run a multi-configuration calculation and save its Wavefunction.
- Return type:
- Parameters:
project_name (str)
hamiltonian_filename (str)
out_wavefunction_filename (str)
n_active_alpha_electrons (int)
n_active_beta_electrons (int | None)
algorithm_name (str | None)
settings (dict | None)
cache (str | None)
remote (str | None)
remote_config (dict | None)
remote_timeout (int)
overwrite (bool)
- qdk_chemistry.ui.tools.run_multi_configuration_scf(project_name, orbitals_filename, out_wavefunction_filename, n_active_alpha_electrons, n_active_beta_electrons=None, ham_constructor_algorithm_name=None, ham_constructor_settings=None, mc_calculator_algorithm_name=None, mc_calculator_settings=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Run MCSCF from active-space Orbitals and save the resulting Wavefunction.
- Return type:
- Parameters:
project_name (str)
orbitals_filename (str)
out_wavefunction_filename (str)
n_active_alpha_electrons (int)
n_active_beta_electrons (int | None)
ham_constructor_algorithm_name (str | None)
ham_constructor_settings (dict | None)
mc_calculator_algorithm_name (str | None)
mc_calculator_settings (dict | None)
settings (dict | None)
cache (str | None)
remote (str | None)
remote_config (dict | None)
remote_timeout (int)
overwrite (bool)
- qdk_chemistry.ui.tools.run_projected_multi_configuration_calculation(project_name, hamiltonian_filename, configurations_json, out_wavefunction_filename, algorithm_name=None, settings=None, cache=None, remote=None, remote_config=None, remote_timeout=120, overwrite=False)[source]
Solve a Hamiltonian in a supplied determinant subspace and save the Wavefunction.
- qdk_chemistry.ui.tools.get_top_determinants(project_name, wavefunction_filename, max_determinants=10)[source]
Return ranked determinants and CI coefficient data from a Wavefunction.
- qdk_chemistry.ui.tools.get_top_configurations(project_name, wavefunction_filename, max_determinants=None)[source]
Return configuration strings ranked by Wavefunction CI coefficient magnitude.
- qdk_chemistry.ui.tools.get_circuit_stats(project_name, circuit_filename)[source]
Return logical-qubit, gate-count, and depth metrics for a saved Circuit.
- qdk_chemistry.ui.tools.check_remote_job(project_name, job_id)[source]
Query a remote job and update its persisted status record.
- qdk_chemistry.ui.tools.retrieve_remote_results(project_name, job_id)[source]
Download a completed remote job’s outputs into its project directory.