project_to_qubit_subspace
- Model.project_to_qubit_subspace(unitary, only_diagonal=False)
Project an operator or batch of operators into the qubit subspace.
The projection uses the cached qubit-subspace basis indices derived from the model’s static Hamiltonian. For batched inputs, the last one or two axes are interpreted as Hilbert-space axes.
- Parameters:
- Return type:
ndarray|Array- Returns:
Operator represented in the tensor-product qubit subspace.