FermionHamiltonianProblem
Defines an electronic-structure problem using a Fermionic operator and electron count. Can also be constructed from aMolecularData object using the from_molecule
method.
Methods:
Attributes:
from_molecule
from_molecule(
cls: ,
molecule: MolecularData,
first_active_index: int = 0,
remove_orbitals: Sequence[int] | None = None,
op_compression_tol: float = 1e-13
) -> FermionHamiltonianProblem
Constructs a FermionHamiltonianProblem from a molecule data.
Parameters:
Returns:
- Type:
FermionHamiltonianProblem - The fermion hamiltonian problem. Members:
FermionHamiltonianProblem
Defines an electronic-structure problem using a Fermionic operator and electron count. Can also be constructed from aMolecularData object using the from_molecule
method.
Methods:
Attributes:
from_molecule
from_molecule(
cls: ,
molecule: MolecularData,
first_active_index: int = 0,
remove_orbitals: Sequence[int] | None = None,
op_compression_tol: float = 1e-13
) -> FermionHamiltonianProblem
Constructs a FermionHamiltonianProblem from a molecule data.
Parameters:
Returns:
- Type:
FermionHamiltonianProblem - The fermion hamiltonian problem.
MappingMethod
Mapping methods from fermionic operators to qubits operators. Attributes:FermionToQubitMapper
Mapper between fermionic operators to qubits operators, using one of the supported mapping methods (seeMappingMethod).
Methods:
Attributes:
map
map(
self: ,
fermion_op: FermionOperator,
args: Any = (),
kwargs: Any =
) -> QubitOperator
Maps the given fermionic operator to a qubits operator using the mapper’s
configuration.
Parameters:
Returns:
- Type:
QubitOperator - The mapped qubits operator.
get_num_qubits
get_num_qubits(
self: ,
problem: FermionHamiltonianProblem
) -> int
Gets the number of qubits after mapping the given problem into qubits space.
Parameters:
Returns:
- Type:
int - The number of qubits. Members:
FermionToQubitMapper
Mapper between fermionic operators to qubits operators, using one of the supported mapping methods (seeMappingMethod).
Methods:
Attributes:
map
map(
self: ,
fermion_op: FermionOperator,
args: Any = (),
kwargs: Any =
) -> QubitOperator
Maps the given fermionic operator to a qubits operator using the mapper’s
configuration.
Parameters:
Returns:
- Type:
QubitOperator - The mapped qubits operator.
get_num_qubits
get_num_qubits(
self: ,
problem: FermionHamiltonianProblem
) -> int
Gets the number of qubits after mapping the given problem into qubits space.
Parameters:
Returns:
- Type:
int - The number of qubits.
MappingMethod
Mapping methods from fermionic operators to qubits operators. Attributes:FermionHamiltonianProblem
Defines an electronic-structure problem using a Fermionic operator and electron count. Can also be constructed from aMolecularData object using the from_molecule
method.
Methods:
Attributes:
from_molecule
from_molecule(
cls: ,
molecule: MolecularData,
first_active_index: int = 0,
remove_orbitals: Sequence[int] | None = None,
op_compression_tol: float = 1e-13
) -> FermionHamiltonianProblem
Constructs a FermionHamiltonianProblem from a molecule data.
Parameters:
Returns:
- Type:
FermionHamiltonianProblem - The fermion hamiltonian problem.
Z2SymTaperMapper
Mapper between fermionic operators to qubits operators, using one of the supported mapping methods (seeMappingMethod), and taking advantage of Z2 symmetries in
order to taper off qubits.
Methods:
Attributes:
set_sector
set_sector(
self: ,
sector: Sequence[int]
) -> None
Sets the symmetry sector coefficients.
Parameters:
map
map(
self: ,
fermion_op: FermionOperator,
args: Any = (),
is_invariant: bool = False,
kwargs: Any =
) -> QubitOperator
Maps the given fermionic operator to qubits operator by using the
mapper’s method, and subsequently by tapering off qubits according to Z2
symmetries.
Parameters:
Returns:
- Type:
QubitOperator - The mapped qubits operator.
get_num_qubits
get_num_qubits(
self: ,
problem: FermionHamiltonianProblem
) -> int
Gets the number of qubits after mapping the given problem into qubits space.
Parameters:
Returns:
- Type:
int - The number of qubits.
from_problem
from_problem(
cls: ,
problem: FermionHamiltonianProblem,
method: MappingMethod = MappingMethod.JORDAN_WIGNER,
sector_from_hartree_fock: bool = True,
tol: float = 1e-14
) -> Z2SymTaperMapper
Initializes a Z2SymTaperMapper object from a fermion problem (i.e. computing
the Z2 symmetries from the problem definition).
Parameters:
Returns:
- Type:
Z2SymTaperMapper - The Z2 symmetries taper mapper. Members:
FermionToQubitMapper
Mapper between fermionic operators to qubits operators, using one of the supported mapping methods (seeMappingMethod).
Methods:
Attributes:
map
map(
self: ,
fermion_op: FermionOperator,
args: Any = (),
kwargs: Any =
) -> QubitOperator
Maps the given fermionic operator to a qubits operator using the mapper’s
configuration.
Parameters:
Returns:
- Type:
QubitOperator - The mapped qubits operator.
get_num_qubits
get_num_qubits(
self: ,
problem: FermionHamiltonianProblem
) -> int
Gets the number of qubits after mapping the given problem into qubits space.
Parameters:
Returns:
- Type:
int - The number of qubits.
FermionHamiltonianProblem
Defines an electronic-structure problem using a Fermionic operator and electron count. Can also be constructed from aMolecularData object using the from_molecule
method.
Methods:
Attributes:
from_molecule
from_molecule(
cls: ,
molecule: MolecularData,
first_active_index: int = 0,
remove_orbitals: Sequence[int] | None = None,
op_compression_tol: float = 1e-13
) -> FermionHamiltonianProblem
Constructs a FermionHamiltonianProblem from a molecule data.
Parameters:
Returns:
- Type:
FermionHamiltonianProblem - The fermion hamiltonian problem.
get_hf_fermion_op
get_hf_fermion_op(
problem: FermionHamiltonianProblem
) -> FermionOperator
Constructs a fermion operator that creates the Hartree-Fock reference state in
block-spin ordering.
Parameters:
Returns:
- Type:
FermionOperator - The Hartree-Fock fermion operator.
get_hf_state
get_hf_state(
problem: FermionHamiltonianProblem,
mapper: FermionToQubitMapper
) -> list[bool]
Computes the qubits state after applying the Hartree-Fock operator defined by the
given problem and mapper.
The Qmod function prepare_basis_state can be used on the returned value to
allocate and initialize the qubits array.
Parameters:
Returns:
- Type:
list[bool] - The qubits state, given as a list of boolean values for each qubit. Members:
FermionToQubitMapper
Mapper between fermionic operators to qubits operators, using one of the supported mapping methods (seeMappingMethod).
Methods:
Attributes:
map
map(
self: ,
fermion_op: FermionOperator,
args: Any = (),
kwargs: Any =
) -> QubitOperator
Maps the given fermionic operator to a qubits operator using the mapper’s
configuration.
Parameters:
Returns:
- Type:
QubitOperator - The mapped qubits operator.
get_num_qubits
get_num_qubits(
self: ,
problem: FermionHamiltonianProblem
) -> int
Gets the number of qubits after mapping the given problem into qubits space.
Parameters:
Returns:
- Type:
int - The number of qubits.
FermionHamiltonianProblem
Defines an electronic-structure problem using a Fermionic operator and electron count. Can also be constructed from aMolecularData object using the from_molecule
method.
Methods:
Attributes:
from_molecule
from_molecule(
cls: ,
molecule: MolecularData,
first_active_index: int = 0,
remove_orbitals: Sequence[int] | None = None,
op_compression_tol: float = 1e-13
) -> FermionHamiltonianProblem
Constructs a FermionHamiltonianProblem from a molecule data.
Parameters:
Returns:
- Type:
FermionHamiltonianProblem - The fermion hamiltonian problem.
SparsePauliOp
Represents a collection of sparse Pauli operators. Methods:
Attributes:
get_tuples_representation
get_tuples_representation(
self: ,
reverse_order: bool
) -> list[tuple[str, int | float | complex]]
Parameters:
get_ucc_hamiltonians
get_ucc_hamiltonians(
problem: FermionHamiltonianProblem,
mapper: FermionToQubitMapper,
excitations: int | Sequence[int]
) -> list[SparsePauliOp]
Computes the UCC hamiltonians of the given problem in the desired excitations,
using the given mapper.
Parameters:
Returns:
- Type:
list[SparsePauliOp] - The UCC hamiltonians.
get_excitations
get_excitations(
problem: FermionHamiltonianProblem,
num_excitations: int
) -> set[tuple[tuple[int, …], tuple[int, …]]]
Gets all the possible excitations of the given problem according to the
given number of excitations, preserving the particles spin.
Parameters:
Returns:
- Type:
set[tuple[tuple[int, ...], tuple[int, ...]]] - A set of all possible excitations, specified as a pair of source and target indices. Members:
DFTState
Post-DFT handle returned to the user, recording the resolved spin mode, functional, and method. Threaded back into later stages. Attributes:EmbeddingCalculator
User-facing embedding driver, backed by queued backend jobs. Methods:
Attributes:
run_dft
run_dft(
self: ,
xc_functional: str = ‘B3LYP’,
method: CalculationMethod = CalculationMethod.DFT
) -> DFTState
Run the full-system mean field and cache the result.
Blocks until the backend job finishes. For a long run prefer
submit_dft(), which returns a handle you can poll later.
method selects DFT (default, using xc_functional) or Hartree-Fock
(xc_functional is then ignored).
Parameters:
submit_dft
submit_dft(
self: ,
xc_functional: str = ‘B3LYP’,
method: CalculationMethod = CalculationMethod.DFT
) -> ChemistryJob[DFTState]
Enqueue the full-system mean field and return a job handle.
The non-blocking counterpart to run_dft(): the DFT runs
server-side (it can take hours) while the client is free to exit. Call
.result() on the returned handle to fetch the DFTState once
ready — doing so also caches the state for run_dft_embedding(),
exactly as run_dft() does.
Parameters:
run_dft_embedding
run_dft_embedding(
self: ,
config: EmbeddingConfig
) -> tuple[MeanFieldData, QuantumData]
Run the full embedding pipeline in one backend call.
Blocks until the backend job finishes. For a long run prefer
submit_dft_embedding(), which returns a handle you can poll later.
Reuses the cached DFTState from a prior run_dft call if present;
otherwise the backend runs the full-system DFT first using
config.xc_functional. Auto-validations registered at construction are
computed in the same call and stored on self.validation_results.
Parameters:
submit_dft_embedding
submit_dft_embedding(
self: ,
config: EmbeddingConfig
) -> ChemistryJob[tuple[MeanFieldData, QuantumData]]
Enqueue the full embedding pipeline and return a job handle.
The non-blocking counterpart to run_dft_embedding(). Call
.result() on the returned handle to fetch the
(MeanFieldData, QuantumData) tuple once ready; doing so caches the
embedding state for subsequent run_validations() calls and emits
any n_active_virtuals warning, exactly as the blocking method does.
Parameters:
run_validations
run_validations(
self: ,
checks: Sequence[ValidationCheck]
) -> ValidationResults
Run a batch of post-hoc validations in a single backend call.
Parameters:
EmbeddingConfig
Embedding-method parameters. Attributes:MeanFieldData
Fragment / environment densities, electron counts, and active-MO basis. Attributes:MoleculeSpec
User-facing molecular description. Methods:
Attributes:
from_pdb_file
from_pdb_file(
cls: ,
path: str | Path,
basis: str = ‘cc-pVDZ’,
charge: int = 0,
spin: int = 0,
unit: str = ‘Angstrom’
) -> MoleculeSpec
Build a spec from a local .pdb file.
The file is read on the client; only its contents are sent to the
backend (the backend never opens paths). The remaining arguments mirror
the MoleculeSpec fields.
Parameters:
from_xyz_file
from_xyz_file(
cls: ,
path: str | Path,
basis: str = ‘cc-pVDZ’,
charge: int = 0,
spin: int = 0,
unit: str = ‘Angstrom’
) -> MoleculeSpec
Build a spec from a local .xyz file.
The file is read on the client; only its contents are sent to the
backend (the backend never opens paths). The remaining arguments mirror
the MoleculeSpec fields.
Parameters:
QuantumData
Solver-facing bundle: embedded + physical Hamiltonians and scalars. Attributes:SpinMode
Which mean-field treatment the backend should use. Attributes:ValidationCheck
Validation diagnostics the embedding pipeline can run. Attributes:embedding_calculator
User-facing API for projection-based WF-in-DFT embedding. Mirrors the local prototype: users build a MoleculeSpec and an EmbeddingConfig, then drive the pipeline through EmbeddingCalculator. Under the hood every stage is a queued backend job (the heavy pyscf / openfermion chemistry runs server-side and never ships to the client). The calculator exchanges the serializable wire models defined inclassiq.interface.applications.chemistry.embedding with the backend and
rehydrates the results into the dataclasses below.
The embedded / physical Hamiltonians come back as real
openfermion.FermionOperator objects, ready to feed into a quantum solver.
Methods:
Attributes:
run
run(
coro: Awaitable[T]
) -> T
Parameters:
embedding_calculator.ArrayModel
A numpy array flattened to(shape, data) for JSON transport.
Real-valued only (every array crossing the embedding boundary — densities,
MO coefficients, overlaps — is real). Rebuild with
np.asarray(data).reshape(shape).
Attributes:
embedding_calculator.CalculationMethod
Electronic-structure method for the mean-field stage.DFT runs Kohn-Sham with the configured xc_functional; HF runs
Hartree-Fock (realized by setting the PySCF SCF object’s xc to "HF",
which makes RKS/UKS reproduce RHF/UHF exactly). xc_functional
is ignored when method is HF.
Attributes:
embedding_calculator.DFTStateModel
SerializableDFTState — the serialized Mole + SCF bundle.
Attributes:
embedding_calculator.EmbeddingConfigModel
SerializableEmbeddingConfig (all primitives).
Attributes:
embedding_calculator.FermionOperatorModel
Serializableopenfermion.FermionOperator (its term -> coefficient map).
Attributes:
embedding_calculator.MeanFieldDataModel
SerializableMeanFieldData.
c_active holds one ArrayModel for the restricted backend or two
(alpha, beta) for the unrestricted backend; c_active_is_tuple records
which so it can be rebuilt to the right shape.
Attributes:
embedding_calculator.MoleculeSpecModel
SerializableMoleculeSpec.
Exactly one of atom or mol_dumps is populated. mol_dumps carries a
pre-built pyscf.gto.Mole serialized via Mole.dumps().
Attributes:
embedding_calculator.QuantumDataModel
SerializableQuantumData — the two fermion Hamiltonians + scalars.
Attributes:
embedding_calculator.SpinMode
Which mean-field treatment the backend should use. Attributes:embedding_calculator.ValidationCheck
Validation diagnostics the embedding pipeline can run. Attributes:embedding_calculator.ValidationResultModel
One validation check’s outcome: a pass/fail flag plus a JSON-safe info dict. Attributes:embedding_calculator.RunDftEmbeddingInput
Attributes:embedding_calculator.RunDftEmbeddingOutput
Attributes:embedding_calculator.RunDftInput
Attributes:embedding_calculator.RunDftOutput
Attributes:embedding_calculator.RunValidationsInput
Attributes:embedding_calculator.ApiWrapper
Methods:call_get_benchmark_classes
call_get_benchmark_classes(
cls:
) -> dict[BenchmarkClass, BenchmarkClassMetadata]
Parameters:
call_submit_benchmark
call_submit_benchmark(
cls: ,
request: BenchmarkRequest,
http_client: httpx.AsyncClient | None = None
) -> BenchmarkSession
Parameters:
call_get_benchmark_results
call_get_benchmark_results(
cls: ,
session: BenchmarkSession,
http_client: httpx.AsyncClient | None = None
) -> BenchmarkSession
Parameters:
call_list_benchmark_sessions
call_list_benchmark_sessions(
cls: ,
http_client: httpx.AsyncClient | None = None
) -> list[BenchmarkSession]
Parameters:
call_cancel_benchmark_session
call_cancel_benchmark_session(
cls: ,
session_id: str,
http_client: httpx.AsyncClient | None = None
) -> None
Parameters:
call_generation_task
call_generation_task(
cls: ,
model: Model,
http_client: httpx.AsyncClient | None = None
) -> generator_result.QuantumProgram
Parameters:
call_transpilation_task
call_transpilation_task(
cls: ,
params: TranspilationParams,
http_client: httpx.AsyncClient | None = None
) -> generator_result.QuantumProgram
Parameters:
call_assign_parameters_task
call_assign_parameters_task(
cls: ,
params: ParameterAssignmentsParams,
http_client: httpx.AsyncClient | None = None
) -> generator_result.QuantumProgram
Parameters:
call_export_task
call_export_task(
cls: ,
params: ExportParams,
http_client: httpx.AsyncClient | None = None
) -> TargetCode
Parameters:
call_transpiled_circuit_metrics_task
call_transpiled_circuit_metrics_task(
cls: ,
program: generator_result.QuantumProgram,
http_client: httpx.AsyncClient | None = None
) -> ProgramData
Parameters:
call_circuit_metrics_task
call_circuit_metrics_task(
cls: ,
program: generator_result.QuantumProgram,
http_client: httpx.AsyncClient | None = None
) -> CircuitMetrics
Parameters:
call_qasm_to_qmod_task
call_qasm_to_qmod_task(
cls: ,
params: QasmToQmodParams,
http_client: httpx.AsyncClient | None = None
) -> QmodCode
Parameters:
submit_chemistry_run_dft_task
submit_chemistry_run_dft_task(
cls: ,
params: RunDftInput,
http_client: httpx.AsyncClient | None = None
) -> JobID
Parameters:
submit_chemistry_run_dft_embedding_task
submit_chemistry_run_dft_embedding_task(
cls: ,
params: RunDftEmbeddingInput,
http_client: httpx.AsyncClient | None = None
) -> JobID
Parameters:
call_chemistry_run_dft_task
call_chemistry_run_dft_task(
cls: ,
params: RunDftInput,
http_client: httpx.AsyncClient | None = None
) -> RunDftOutput
Parameters:
call_chemistry_run_dft_embedding_task
call_chemistry_run_dft_embedding_task(
cls: ,
params: RunDftEmbeddingInput,
http_client: httpx.AsyncClient | None = None
) -> RunDftEmbeddingOutput
Parameters:
call_chemistry_run_validations_task
call_chemistry_run_validations_task(
cls: ,
params: RunValidationsInput,
http_client: httpx.AsyncClient | None = None
) -> RunValidationsOutput
Parameters:
call_get_visual_model
call_get_visual_model(
cls: ,
program_id: str,
http_client: httpx.AsyncClient | None = None
) -> ProgramVisualModel
Parameters:
call_visualization_task
call_visualization_task(
cls: ,
circuit: generator_result.QuantumProgram,
http_client: httpx.AsyncClient | None = None
) -> ProgramVisualModel
Parameters:
call_create_execution_session
call_create_execution_session(
cls: ,
circuit: generator_result.QuantumProgram,
http_client: httpx.AsyncClient | None = None
) -> str
Parameters:
call_create_openqasm_execution_session
call_create_openqasm_execution_session(
cls: ,
qasm: str,
execution_preferences: ExecutionPreferences,
http_client: httpx.AsyncClient | None = None
) -> str
Parameters:
call_close_execution_session
call_close_execution_session(
cls: ,
session_id: str,
http_client: httpx.AsyncClient | None = None
) -> None
Parameters:
call_create_session_job
call_create_session_job(
cls: ,
session_id: str,
primitives_input: PrimitivesInput,
http_client: httpx.AsyncClient | None = None
) -> execution_request.ExecutionJobDetails
Parameters:
call_convert_quantum_program
call_convert_quantum_program(
cls: ,
circuit: generator_result.QuantumProgram,
http_client: httpx.AsyncClient | None = None
) -> dict
Parameters:
call_execute_execution_input
call_execute_execution_input(
cls: ,
execution_input: dict,
http_client: httpx.AsyncClient | None = None
) -> execution_request.ExecutionJobDetails
Parameters:
call_estimate_sample_cost
call_estimate_sample_cost(
cls: ,
execution_input: dict,
batch_params: list[dict] | None = None,
http_client: httpx.AsyncClient | None = None
) -> dict
Parameters:
call_get_execution_job_details
call_get_execution_job_details(
cls: ,
job_id: JobID,
http_client: httpx.AsyncClient | None = None
) -> execution_request.ExecutionJobDetails
Parameters:
call_get_execution_job_result
call_get_execution_job_result(
cls: ,
job_id: JobID,
http_client: httpx.AsyncClient | None = None
) -> classiq.interface.executor.execution_result.ExecuteGeneratedCircuitResults
Parameters:
call_get_submitted_circuits
call_get_submitted_circuits(
cls: ,
job_id: JobID,
http_client: httpx.AsyncClient | None = None
) -> execution_request.SubmittedCircuitsResponse
Parameters:
call_patch_execution_job
call_patch_execution_job(
cls: ,
job_id: JobID,
name: str,
http_client: httpx.AsyncClient | None = None
) -> execution_request.ExecutionJobDetails
Parameters:
call_cancel_execution_job
call_cancel_execution_job(
cls: ,
job_id: JobID,
http_client: httpx.AsyncClient | None = None
) -> None
Parameters:
call_query_execution_jobs
call_query_execution_jobs(
cls: ,
offset: int,
limit: int,
http_client: httpx.AsyncClient | None = None,
extra_query_params: Any =
) -> execution_request.ExecutionJobsQueryResults
Parameters:
call_query_synthesis_actions
call_query_synthesis_actions(
cls: ,
offset: int,
limit: int,
http_client: httpx.AsyncClient | None = None,
extra_query_params: Any | None =
) -> SynthesisActionsQueryResults
Parameters:
call_analysis_task
call_analysis_task(
cls: ,
params: analysis_params.AnalysisParams,
http_client: httpx.AsyncClient | None = None
) -> analysis_result.Analysis
Parameters:
get_generated_circuit_from_qasm
get_generated_circuit_from_qasm(
cls: ,
params: analysis_result.QasmCode,
http_client: httpx.AsyncClient | None = None
) -> generator_result.QuantumProgram
Parameters:
get_analyzer_app_data
get_analyzer_app_data(
cls: ,
params: analysis_result.DataID,
http_client: httpx.AsyncClient | None = None
) -> generator_result.QuantumProgram
Parameters:
call_rb_analysis_task
call_rb_analysis_task(
cls: ,
params: AnalysisRBParams,
http_client: httpx.AsyncClient | None = None
) -> analysis_result.RbResults
Parameters:
call_hardware_connectivity_task
call_hardware_connectivity_task(
cls: ,
params: analysis_params.AnalysisHardwareParams,
http_client: httpx.AsyncClient | None = None
) -> analysis_result.GraphResult
Parameters:
call_table_graphs_task
call_table_graphs_task(
cls: ,
params: analysis_params.AnalysisHardwareListParams,
http_client: httpx.AsyncClient | None = None
) -> analysis_result.GraphResult
Parameters:
call_available_devices_task
call_available_devices_task(
cls: ,
params: analysis_params.AnalysisOptionalDevicesParams,
http_client: httpx.AsyncClient | None = None
) -> analysis_result.DevicesResult
Parameters:
call_get_all_hardware_devices
call_get_all_hardware_devices(
cls: ,
http_client: httpx.AsyncClient | None = None
) -> list[HardwareInformation]
Parameters:
call_get_all_budgets
call_get_all_budgets(
cls:
) -> list[UserBudget]
Parameters:
call_set_budget_limit
call_set_budget_limit(
cls: ,
provider: str,
budget_limit: float
) -> UserBudget
Parameters:
call_clear_budget_limit
call_clear_budget_limit(
cls: ,
provider: str
) -> UserBudget
Parameters:
call_initialize_logical_noise
call_initialize_logical_noise(
cls: ,
params: InitializeLogicalNoiseParams
) -> None
Parameters:
call_get_logical_noise
call_get_logical_noise(
cls: ,
name: str
) -> LogicalNoiseParameters
Parameters:
call_remove_logical_noise
call_remove_logical_noise(
cls: ,
name: str
) -> None
Parameters:
embedding_calculator.ChemistryJob
Methods:
Attributes:
from_id
from_id(
cls: ,
id: str,
job_route: str,
result_type: type[pydantic.BaseModel]
) -> ChemistryJob
Reconnect to a previously submitted job by its id.
The result is fetchable while the job’s result is still retained by the
backend (see MAX_KEEP_RESULT); reconnecting much later may fail.
Parameters:
status_async
status_async(
self: ,
_http_client: httpx.AsyncClient | None = None
) -> JobStatus
Parameters:
result_async
result_async(
self: ,
timeout_sec: float | None = None,
_http_client: httpx.AsyncClient | None = None
) -> ResultT
Wait for the job to finish and return its (transformed) result.
Raises ClassiqAPIError if the job failed or was cancelled, or if
polling exceeds timeout_sec (None waits indefinitely).
Parameters:
cancel_async
cancel_async(
self: ,
_http_client: httpx.AsyncClient | None = None
) -> None
Parameters:
embedding_calculator.MoleculeSpec
User-facing molecular description. Methods:
Attributes:
from_pdb_file
from_pdb_file(
cls: ,
path: str | Path,
basis: str = ‘cc-pVDZ’,
charge: int = 0,
spin: int = 0,
unit: str = ‘Angstrom’
) -> MoleculeSpec
Build a spec from a local .pdb file.
The file is read on the client; only its contents are sent to the
backend (the backend never opens paths). The remaining arguments mirror
the MoleculeSpec fields.
Parameters:
from_xyz_file
from_xyz_file(
cls: ,
path: str | Path,
basis: str = ‘cc-pVDZ’,
charge: int = 0,
spin: int = 0,
unit: str = ‘Angstrom’
) -> MoleculeSpec
Build a spec from a local .xyz file.
The file is read on the client; only its contents are sent to the
backend (the backend never opens paths). The remaining arguments mirror
the MoleculeSpec fields.
Parameters:
embedding_calculator.EmbeddingConfig
Embedding-method parameters. Attributes:embedding_calculator.DFTState
Post-DFT handle returned to the user, recording the resolved spin mode, functional, and method. Threaded back into later stages. Attributes:embedding_calculator.MeanFieldData
Fragment / environment densities, electron counts, and active-MO basis. Attributes:embedding_calculator.QuantumData
Solver-facing bundle: embedded + physical Hamiltonians and scalars. Attributes:embedding_calculator.EmbeddingCalculator
User-facing embedding driver, backed by queued backend jobs. Methods:
Attributes:
run_dft
run_dft(
self: ,
xc_functional: str = ‘B3LYP’,
method: CalculationMethod = CalculationMethod.DFT
) -> DFTState
Run the full-system mean field and cache the result.
Blocks until the backend job finishes. For a long run prefer
submit_dft(), which returns a handle you can poll later.
method selects DFT (default, using xc_functional) or Hartree-Fock
(xc_functional is then ignored).
Parameters:
submit_dft
submit_dft(
self: ,
xc_functional: str = ‘B3LYP’,
method: CalculationMethod = CalculationMethod.DFT
) -> ChemistryJob[DFTState]
Enqueue the full-system mean field and return a job handle.
The non-blocking counterpart to run_dft(): the DFT runs
server-side (it can take hours) while the client is free to exit. Call
.result() on the returned handle to fetch the DFTState once
ready — doing so also caches the state for run_dft_embedding(),
exactly as run_dft() does.
Parameters:
run_dft_embedding
run_dft_embedding(
self: ,
config: EmbeddingConfig
) -> tuple[MeanFieldData, QuantumData]
Run the full embedding pipeline in one backend call.
Blocks until the backend job finishes. For a long run prefer
submit_dft_embedding(), which returns a handle you can poll later.
Reuses the cached DFTState from a prior run_dft call if present;
otherwise the backend runs the full-system DFT first using
config.xc_functional. Auto-validations registered at construction are
computed in the same call and stored on self.validation_results.
Parameters:
submit_dft_embedding
submit_dft_embedding(
self: ,
config: EmbeddingConfig
) -> ChemistryJob[tuple[MeanFieldData, QuantumData]]
Enqueue the full embedding pipeline and return a job handle.
The non-blocking counterpart to run_dft_embedding(). Call
.result() on the returned handle to fetch the
(MeanFieldData, QuantumData) tuple once ready; doing so caches the
embedding state for subsequent run_validations() calls and emits
any n_active_virtuals warning, exactly as the blocking method does.
Parameters:
run_validations
run_validations(
self: ,
checks: Sequence[ValidationCheck]
) -> ValidationResults
Run a batch of post-hoc validations in a single backend call.
Parameters:
chemistry_job
Detached handle for a long-running chemistry backend job.EmbeddingCalculator.submit_* returns one of these instead of blocking: a
chemistry DFT run can take hours, so the SDK hands the user a job id and lets
them fetch the result later (result) — the job keeps running server-side
even if the client process exits. from_id reconnects to a job submitted by
an earlier process.
The handle is generic over the user-facing return type ResultT: a
transform callback maps the parsed wire output (result_type) to that type
(and, for the calculator, threads the freshly computed state back into the
calculator so a later stage can reuse it). Without a transform the parsed wire
model is returned as-is, which is what from_id does.
Methods:
Attributes:
syncify_function
syncify_function(
async_func: Callable[…, Awaitable[T]]
) -> Callable[…, T]
Parameters:
chemistry_job.ClassiqAPIError
Attributes:chemistry_job.JobDescription
Methods:
Attributes:
validate_status_and_fields
validate_status_and_fields(
self:
) -> Self
Parameters:
chemistry_job.JobID
Attributes:chemistry_job.JobStatus
Methods:
Attributes:
is_final
is_final(
self:
) -> bool
Parameters:
chemistry_job.JobPoller
Methods:
Attributes:
submit
submit(
self: ,
body: dict,
http_client: httpx.AsyncClient | None = None
) -> JobID
Enqueue a job and return its id without waiting for completion.
The detached counterpart to run: callers hold on to the returned
JobID and poll for the result later (e.g. via poll), so a
long-running job survives the client process exiting.
Parameters:
fetch_description
fetch_description(
self: ,
job_id: JobID,
http_client: httpx.AsyncClient | None = None
) -> GeneralJobDescription
Read a job’s current description with a single GET (no polling).
Parameters:
cancel
cancel(
self: ,
job_id: JobID,
http_client: httpx.AsyncClient | None = None
) -> None
Parameters:
poll
poll(
self: ,
job_id: JobID,
timeout_sec: float | None,
response_parser: Callable[[JSONObject], T | None] = _general_job_description_parser,
http_client: httpx.AsyncClient | None = None
) -> T
Parameters:
run
run(
self: ,
body: dict,
timeout_sec: float | None,
http_client: httpx.AsyncClient | None = None
) -> GeneralJobDescription
Parameters:
run_pydantic
run_pydantic(
self: ,
model: pydantic.BaseModel,
timeout_sec: float | None,
http_client: httpx.AsyncClient | None = None
) -> GeneralJobDescription
Parameters:
chemistry_job.ChemistryJob
Methods:
Attributes:
from_id
from_id(
cls: ,
id: str,
job_route: str,
result_type: type[pydantic.BaseModel]
) -> ChemistryJob
Reconnect to a previously submitted job by its id.
The result is fetchable while the job’s result is still retained by the
backend (see MAX_KEEP_RESULT); reconnecting much later may fail.
Parameters:
status_async
status_async(
self: ,
_http_client: httpx.AsyncClient | None = None
) -> JobStatus
Parameters:
result_async
result_async(
self: ,
timeout_sec: float | None = None,
_http_client: httpx.AsyncClient | None = None
) -> ResultT
Wait for the job to finish and return its (transformed) result.
Raises ClassiqAPIError if the job failed or was cancelled, or if
polling exceeds timeout_sec (None waits indefinitely).
Parameters:
cancel_async
cancel_async(
self: ,
_http_client: httpx.AsyncClient | None = None
) -> None
Parameters: