---
title: Operator Terms (latest version)
description: API reference for Operator Terms in the latest version of qiskit-fermions-c
source: https://quantum.cloud.ibm.com/docs/en/api/qiskit-fermions-c/qf-operators-terms
---

# Operator Terms

The C API provides various functions to operate on the individual terms of an operator, partitioning them based on their structure.

## Grouping

Refer to [Group operator terms: use the operator structure](/docs/addons/qiskit-fermions/guides/grouping#grouping-explanation) for a detailed explanation of this module’s functionality.

### Members

Rather than always relying on the user to provide the group indices themselves, the C API provides a collection of functions which determine the grouping information automatically.

|                                                                                                                                                                                                               |                                                                |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| [`qf_ferm_op_group_terms_by_electronic_structure()`](/docs/api/qiskit-fermions-c/qf-operators-terms-grouping#qf_ferm_op_group_terms_by_electronic_structure "qf_ferm_op_group_terms_by_electronic_structure") | Groups the terms of an operator by their electronic structure. |

## Filtering

The C API provides a collection of functions for removing terms from an operator that do not contribute meaningfully to a downstream computation.

### Members

|                                                                                                                                                                      |                                                         |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| [`qf_ferm_op_filter_diagonal_terms()`](/docs/api/qiskit-fermions-c/qf-operators-terms-filtering#qf_ferm_op_filter_diagonal_terms "qf_ferm_op_filter_diagonal_terms") | Filters out the terms of an operator that are diagonal. |

## Ordering

The C API provides functions to reorder the terms of an operator into a canonical, coefficient-independent order.

### Members

|                                                                                                                                                   |                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| [`qf_ferm_op_canonical_order()`](/docs/api/qiskit-fermions-c/qf-operators-terms-ordering#qf_ferm_op_canonical_order "qf_ferm_op_canonical_order") | Reorders the terms of a fermionic operator canonically. |
| [`qf_maj_op_canonical_order()`](/docs/api/qiskit-fermions-c/qf-operators-terms-ordering#qf_maj_op_canonical_order "qf_maj_op_canonical_order")    | Reorders the terms of a Majorana operator canonically.  |
