技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
analysis-and-measurements【数据与研究】Use OpenFermion for bounded sparse or dense operator analysis, Davidson and eigensolver workflows, RDM reconstruction and mapping, symmetry-sector restriction, measurement grouping and partitioning, VPE estimation, resource functionals, and grid or lattice numerical helpers.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this route when the task is to analyze an already constructed public OpenFermion operator or numerical tensor: obtain a sparse matrix, compute a small spectrum or ground state, restrict a Jordan–Wigner operator to a symmetry sector, map or validate RDMs, group compatible measurements, estimate a VPE functional, or use grid/lattice indexing helpers.
Read references/api-reference.md for signatures, shape conventions, and public import locations. Read references/workflows.md before doing a numerical workflow. Use references/troubleshooting.md when an import, dimension, backend, tensor, or solver check fails.
QubitOperator, FermionOperator, bosonic
operator, polynomial tensor, or an existing sparse/linear operator), the
qubit/mode count, and whether the operator is Hermitian.2**n_qubits; reject an underspecified n_qubits rather than silently
truncating. For bosons, provide a positive integer trunc and estimate the
dimension trunc**n_modes first.sparse_eigenspectrum converts the
entire matrix to dense form and is appropriate only for a deliberately tiny
matrix. Prefer get_ground_state, get_gap, or Davidson for larger but
still bounded sparse cases.expectation or variance.
These functions do not repair a wrong basis, wrong dimension, or an
unnormalized state.get_sparse_operator; inspect
.shape, .format, and .nnz; use get_ground_state for the lowest state,
get_gap for a Hermitian gap, and sparse_eigenspectrum only after a dense
memory bound. The bundled
sparse analysis smoke helper is a safe
tiny example and prints the matrix shape and ground energy.jw_number_restrict_operator or
jw_sz_restrict_operator on a Jordan–Wigner sparse matrix, or use
get_number_preserving_sparse_operator when constructing a fermionic matrix
directly in a bounded sector. Restricted state vectors are generally not
normalized; renormalize before interpreting expectations.SparseDavidson for a sparse matrix and QubitDavidson
for a QubitOperator without materializing its full matrix. Supply a
diagonal, a dimension-compatible initial guess, and bounded
DavidsonOptions; inspect the returned success flag and residual rather
than assuming convergence.get_interaction_rdm reconstructs an
InteractionRDM from measured qubit-term coefficients and can be
O(n_qubits**4); specify n_qubits when identity or trailing orbitals make
counting ambiguous. Equality projection is a resource-functional workflow,
not a generic RDM repair operation.QubitOperator; use qubit partition iterators for coverage families;
use fermion/Majorana pairings only when their combinatorial output is the
requested measurement schedule. They do not synthesize circuits or estimate
shot noise.PhaseFitEstimator requires known
eigenvalues and phase samples aligned to its simulation points. The one-norm
functions consume spatial-orbital integral tensors and distinguish inclusion
of the constant. is_contextual is imported from
openfermion.functionals.contextuality, not the root package.Grid for centered real-space and
reciprocal-space indexing, and HubbardSquareLattice for site, degree of
freedom, spin, and neighbor iteration. These helpers do not construct a
Hamiltonian; route model construction elsewhere.n_qubits/mode count, truncation or sector, matrix shape,
Hermiticity check, solver path, tolerance/iteration bound, and numerical
result.