QCANT.qscEOM#

QCANT.qscEOM(symbols: Sequence[str], geometry, active_electrons: int, active_orbitals: int, charge: int, params=None, ash_excitation=None, *, ansatz: Tuple[Any, Any, Any] | None = None, ansatz_type: str | None = None, basis: str = 'sto-3g', method: str = 'pyscf', shots: int = 0, device_name: str | None = None, include_identity: bool = True, max_states: int | None = None, state_seed: int | None = None, symmetric: bool = True, parallel_matrix: bool = False, parallel_backend: str = 'auto', max_workers: int | None = None, matrix_chunk_size: int | None = None, pauli_grouping: bool = False, grouping_type: str = 'qwc', device_kwargs: Mapping[str, Any] | None = None, brg_tolerance: float | None = None, projector_backend: str = 'auto', return_details: bool = False)[source]#

Compute qscEOM eigenvalues from an ansatz state.

Parameters:
  • symbols – Atomic symbols.

  • geometry – Nuclear coordinates (as an array-like object).

  • active_electrons – Number of active electrons.

  • active_orbitals – Number of active orbitals.

  • charge – Total molecular charge.

  • params – Ansatz parameters.

  • ash_excitation – Excitation list describing the ansatz.

  • ansatz_type – Ansatz gate family used to replay ash_excitation: "fermionic" (default) or "qubit_excitation" (alias "qe"). This controls only ansatz replay, not the qscEOM basis construction.

  • shots – If 0, run in analytic mode; otherwise use shot-based estimation.

  • device_name – Optional PennyLane device name (e.g. "lightning.qubit").

  • include_identity – If True (default), include the HF/reference state I in the qscEOM projected basis in addition to standard singles+doubles configurations.

  • max_states – Deprecated compatibility argument. qscEOM now always uses the full selected basis and rejects any non-None value.

  • state_seed – Deprecated compatibility argument kept only to avoid breaking older call sites. Ignored when max_states=None.

  • symmetric – If True, compute only the upper-triangular off-diagonal elements and mirror them to reduce circuit evaluations.

  • parallel_matrix – If True, evaluate independent qscEOM matrix elements concurrently.

  • parallel_backend – Parallel backend used when parallel_matrix=True: "process", "thread", or "auto" (default). "auto" selects processes on POSIX and threads on Windows.

  • max_workers – Maximum number of worker threads used when parallel_matrix=True. If omitted, os.cpu_count() is used.

  • matrix_chunk_size – Number of matrix entries per submitted worker task. If omitted, a balanced chunk size based on max_workers is used.

  • pauli_grouping – If True, pre-compute Pauli grouping metadata (e.g. QWC) for the Hamiltonian before shot-based measurements.

  • grouping_type – Grouping strategy passed to compute_grouping when pauli_grouping=True.

  • device_kwargs – Optional keyword arguments forwarded to qml.device. This is useful when selecting hardware/noise-model specific backends that require extra constructor parameters.

  • brg_tolerance – If provided, apply basis-rotation grouping (BRG) to the molecular Hamiltonian before the analytic projected-matrix construction. This is supported only when shots=0 and method='pyscf'.

  • projector_backend – Analytic projected-matrix backend. "dense" preserves the historical dense-Hamiltonian path. "sparse_number_preserving" restricts the molecular Hamiltonian to the fixed-electron Jordan-Wigner sector using OpenFermion sparse operators. "auto" selects the sparse backend for analytic method='pyscf' runs when OpenFermion is available.

  • return_details – If True, also return a details dictionary containing projected-matrix eigenvectors and basis metadata. Default False preserves historical return type.

Returns:

  • list – Sorted eigenvalues for the constructed effective matrix.

  • tuple – When return_details=True, returns (values, details) where details contains eigenvectors and matrix metadata.