> ## Documentation Index
> Fetch the complete documentation index at: https://prod-mint.classiq.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Chemistry

Members:

| Name                        | Description                                                                            |
| --------------------------- | -------------------------------------------------------------------------------------- |
| `FermionHamiltonianProblem` | Defines an electronic-structure problem using a Fermionic operator and electron count. |

### FermionHamiltonianProblem

Defines an electronic-structure problem using a Fermionic operator and electron count.
Can also be constructed from a `MolecularData` object using the `from_molecule`
method.

**Methods:**

| Name                             | Description                                                    |
| -------------------------------- | -------------------------------------------------------------- |
| [from\_molecule](#from_molecule) | Constructs a `FermionHamiltonianProblem` from a molecule data. |

**Attributes:**

| Name                  | Type              | Description                                                                         |
| --------------------- | ----------------- | ----------------------------------------------------------------------------------- |
| `fermion_hamiltonian` | `FermionOperator` | The fermionic hamiltonian of the problem. Assumed to be in the block-spin labeling. |
| `n_orbitals`          | `int`             | Number of spatial orbitals.                                                         |
| `n_alpha`             | `int`             | Number of alpha particles.                                                          |
| `n_beta`              | `int`             | Number of beta particles.                                                           |
| `n_particles`         | `tuple[int, int]` | Number of alpha and beta particles.                                                 |

### fermion\_hamiltonian

`fermion_hamiltonian = fermion_hamiltonian`

### n\_particles

`n_particles = n_particles`

### n\_orbitals

`n_orbitals = min_n_orbitals`

### occupied\_alpha

`occupied_alpha: list[int]`

### virtual\_alpha

`virtual_alpha: list[int]`

### occupied\_beta

`occupied_beta: list[int]`

### virtual\_beta

`virtual_beta: list[int]`

### occupied

`occupied: list[int]`

### virtual

`virtual: list[int]`

#### from\_molecule

<pre><code>from\_molecule(
cls: ,
molecule: MolecularData,
first\_active\_index: int = 0,
remove\_orbitlas: Sequence\[int] | None = None,
remove\_orbitals: Sequence\[int] | None = None,
op\_compression\_tol: float = 1e-13
) -> FermionHamiltonianProblem</code></pre>

Constructs a `FermionHamiltonianProblem` from a molecule data.

**Parameters:**

| Name                 | Type                    | Description                                                      | Default    |
| -------------------- | ----------------------- | ---------------------------------------------------------------- | ---------- |
| `cls`                | \`\`                    |                                                                  | *required* |
| `molecule`           | `MolecularData`         | The molecule data.                                               | *required* |
| `first_active_index` | `int`                   | The first active index, indicates all prior indices are freezed. | 0          |
| `remove_orbitlas`    | `Sequence[int] \| None` |                                                                  | None       |
| `remove_orbitals`    | `Sequence[int] \| None` | Active indices to be removed.                                    | None       |
| `op_compression_tol` | `float`                 | Tolerance for trimming the fermion operator.                     | 1e-13      |

**Returns:**

* **Type:** `FermionHamiltonianProblem`
* The fermion hamiltonian problem.
  Members:

| Name                        | Description                                                                                                               |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `FermionHamiltonianProblem` | Defines an electronic-structure problem using a Fermionic operator and electron count.                                    |
| `MappingMethod`             | Mapping methods from fermionic operators to qubits operators.                                                             |
| `FermionToQubitMapper`      | Mapper between fermionic operators to qubits operators, using one of the supported mapping methods (see `MappingMethod`). |

### FermionHamiltonianProblem

Defines an electronic-structure problem using a Fermionic operator and electron count.
Can also be constructed from a `MolecularData` object using the `from_molecule`
method.

**Methods:**

| Name                             | Description                                                    |
| -------------------------------- | -------------------------------------------------------------- |
| [from\_molecule](#from_molecule) | Constructs a `FermionHamiltonianProblem` from a molecule data. |

**Attributes:**

| Name                  | Type              | Description                                                                         |
| --------------------- | ----------------- | ----------------------------------------------------------------------------------- |
| `fermion_hamiltonian` | `FermionOperator` | The fermionic hamiltonian of the problem. Assumed to be in the block-spin labeling. |
| `n_orbitals`          | `int`             | Number of spatial orbitals.                                                         |
| `n_alpha`             | `int`             | Number of alpha particles.                                                          |
| `n_beta`              | `int`             | Number of beta particles.                                                           |
| `n_particles`         | `tuple[int, int]` | Number of alpha and beta particles.                                                 |

### fermion\_hamiltonian

`fermion_hamiltonian = fermion_hamiltonian`

### n\_particles

`n_particles = n_particles`

### n\_orbitals

`n_orbitals = min_n_orbitals`

### occupied\_alpha

`occupied_alpha: list[int]`

### virtual\_alpha

`virtual_alpha: list[int]`

### occupied\_beta

`occupied_beta: list[int]`

### virtual\_beta

`virtual_beta: list[int]`

### occupied

`occupied: list[int]`

### virtual

`virtual: list[int]`

#### from\_molecule

<pre><code>from\_molecule(
cls: ,
molecule: MolecularData,
first\_active\_index: int = 0,
remove\_orbitlas: Sequence\[int] | None = None,
remove\_orbitals: Sequence\[int] | None = None,
op\_compression\_tol: float = 1e-13
) -> FermionHamiltonianProblem</code></pre>

Constructs a `FermionHamiltonianProblem` from a molecule data.

**Parameters:**

| Name                 | Type                    | Description                                                      | Default    |
| -------------------- | ----------------------- | ---------------------------------------------------------------- | ---------- |
| `cls`                | \`\`                    |                                                                  | *required* |
| `molecule`           | `MolecularData`         | The molecule data.                                               | *required* |
| `first_active_index` | `int`                   | The first active index, indicates all prior indices are freezed. | 0          |
| `remove_orbitlas`    | `Sequence[int] \| None` |                                                                  | None       |
| `remove_orbitals`    | `Sequence[int] \| None` | Active indices to be removed.                                    | None       |
| `op_compression_tol` | `float`                 | Tolerance for trimming the fermion operator.                     | 1e-13      |

**Returns:**

* **Type:** `FermionHamiltonianProblem`
* The fermion hamiltonian problem.

### MappingMethod

Mapping methods from fermionic operators to qubits operators.

**Attributes:**

| Name                             | Type | Description |
| -------------------------------- | ---- | ----------- |
| [JORDAN\_WIGNER](#jordan_wigner) |      |             |
| [BRAVYI\_KITAEV](#bravyi_kitaev) |      |             |

### JORDAN\_WIGNER

```python theme={null}
JORDAN_WIGNER = 'jw'
```

### BRAVYI\_KITAEV

```python theme={null}
BRAVYI_KITAEV = 'bk'
```

### FermionToQubitMapper

Mapper between fermionic operators to qubits operators, using one of the supported
mapping methods (see `MappingMethod`).

**Methods:**

| Name                                | Description                                                                              |
| ----------------------------------- | ---------------------------------------------------------------------------------------- |
| [map](#map)                         | Maps the given fermionic operator to a qubits operator using the mapper's configuration. |
| [get\_num\_qubits](#get_num_qubits) | Gets the number of qubits after mapping the given problem into qubits space.             |

**Attributes:**

| Name     | Type            | Description         |
| -------- | --------------- | ------------------- |
| `method` | `MappingMethod` | The mapping method. |

### method

`method = method`

#### map

<pre><code>map(
self: ,
fermion\_op: FermionOperator,
args: Any = (),
kwargs: Any = {}
) -> QubitOperator</code></pre>

Maps the given fermionic operator to a qubits operator using the mapper's
configuration.

**Parameters:**

| Name         | Type              | Description           | Default    |
| ------------ | ----------------- | --------------------- | ---------- |
| `self`       | \`\`              |                       | *required* |
| `fermion_op` | `FermionOperator` | A fermionic operator. | *required* |
| `args`       | `Any`             |                       | ()         |
| `kwargs`     | `Any`             |                       | {}         |

**Returns:**

* **Type:** `QubitOperator`
* The mapped qubits operator.

#### get\_num\_qubits

<pre><code>get\_num\_qubits(
self: ,
problem: FermionHamiltonianProblem
) -> int</code></pre>

Gets the number of qubits after mapping the given problem into qubits space.

**Parameters:**

| Name      | Type                        | Description          | Default    |
| --------- | --------------------------- | -------------------- | ---------- |
| `self`    | \`\`                        |                      | *required* |
| `problem` | `FermionHamiltonianProblem` | The fermion problem. | *required* |

**Returns:**

* **Type:** `int`
* The number of qubits.
  Members:

| Name                        | Description                                                                                                                                            |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `FermionToQubitMapper`      | Mapper between fermionic operators to qubits operators, using one of the supported mapping methods (see `MappingMethod`).                              |
| `MappingMethod`             | Mapping methods from fermionic operators to qubits operators.                                                                                          |
| `FermionHamiltonianProblem` | Defines an electronic-structure problem using a Fermionic operator and electron count.                                                                 |
| `Z2SymTaperMapper`          | Mapper between fermionic operators to qubits operators, using one of the supported mapping methods (see `MappingMethod`), and taking advantage of Z... |

### FermionToQubitMapper

Mapper between fermionic operators to qubits operators, using one of the supported
mapping methods (see `MappingMethod`).

**Methods:**

| Name                                | Description                                                                              |
| ----------------------------------- | ---------------------------------------------------------------------------------------- |
| [map](#map)                         | Maps the given fermionic operator to a qubits operator using the mapper's configuration. |
| [get\_num\_qubits](#get_num_qubits) | Gets the number of qubits after mapping the given problem into qubits space.             |

**Attributes:**

| Name     | Type            | Description         |
| -------- | --------------- | ------------------- |
| `method` | `MappingMethod` | The mapping method. |

### method

`method = method`

#### map

<pre><code>map(
self: ,
fermion\_op: FermionOperator,
args: Any = (),
kwargs: Any = {}
) -> QubitOperator</code></pre>

Maps the given fermionic operator to a qubits operator using the mapper's
configuration.

**Parameters:**

| Name         | Type              | Description           | Default    |
| ------------ | ----------------- | --------------------- | ---------- |
| `self`       | \`\`              |                       | *required* |
| `fermion_op` | `FermionOperator` | A fermionic operator. | *required* |
| `args`       | `Any`             |                       | ()         |
| `kwargs`     | `Any`             |                       | {}         |

**Returns:**

* **Type:** `QubitOperator`
* The mapped qubits operator.

#### get\_num\_qubits

<pre><code>get\_num\_qubits(
self: ,
problem: FermionHamiltonianProblem
) -> int</code></pre>

Gets the number of qubits after mapping the given problem into qubits space.

**Parameters:**

| Name      | Type                        | Description          | Default    |
| --------- | --------------------------- | -------------------- | ---------- |
| `self`    | \`\`                        |                      | *required* |
| `problem` | `FermionHamiltonianProblem` | The fermion problem. | *required* |

**Returns:**

* **Type:** `int`
* The number of qubits.

### MappingMethod

Mapping methods from fermionic operators to qubits operators.

**Attributes:**

| Name                             | Type | Description |
| -------------------------------- | ---- | ----------- |
| [JORDAN\_WIGNER](#jordan_wigner) |      |             |
| [BRAVYI\_KITAEV](#bravyi_kitaev) |      |             |

### JORDAN\_WIGNER

```python theme={null}
JORDAN_WIGNER = 'jw'
```

### BRAVYI\_KITAEV

```python theme={null}
BRAVYI_KITAEV = 'bk'
```

### FermionHamiltonianProblem

Defines an electronic-structure problem using a Fermionic operator and electron count.
Can also be constructed from a `MolecularData` object using the `from_molecule`
method.

**Methods:**

| Name                             | Description                                                    |
| -------------------------------- | -------------------------------------------------------------- |
| [from\_molecule](#from_molecule) | Constructs a `FermionHamiltonianProblem` from a molecule data. |

**Attributes:**

| Name                  | Type              | Description                                                                         |
| --------------------- | ----------------- | ----------------------------------------------------------------------------------- |
| `fermion_hamiltonian` | `FermionOperator` | The fermionic hamiltonian of the problem. Assumed to be in the block-spin labeling. |
| `n_orbitals`          | `int`             | Number of spatial orbitals.                                                         |
| `n_alpha`             | `int`             | Number of alpha particles.                                                          |
| `n_beta`              | `int`             | Number of beta particles.                                                           |
| `n_particles`         | `tuple[int, int]` | Number of alpha and beta particles.                                                 |

### fermion\_hamiltonian

`fermion_hamiltonian = fermion_hamiltonian`

### n\_particles

`n_particles = n_particles`

### n\_orbitals

`n_orbitals = min_n_orbitals`

### occupied\_alpha

`occupied_alpha: list[int]`

### virtual\_alpha

`virtual_alpha: list[int]`

### occupied\_beta

`occupied_beta: list[int]`

### virtual\_beta

`virtual_beta: list[int]`

### occupied

`occupied: list[int]`

### virtual

`virtual: list[int]`

#### from\_molecule

<pre><code>from\_molecule(
cls: ,
molecule: MolecularData,
first\_active\_index: int = 0,
remove\_orbitlas: Sequence\[int] | None = None,
remove\_orbitals: Sequence\[int] | None = None,
op\_compression\_tol: float = 1e-13
) -> FermionHamiltonianProblem</code></pre>

Constructs a `FermionHamiltonianProblem` from a molecule data.

**Parameters:**

| Name                 | Type                    | Description                                                      | Default    |
| -------------------- | ----------------------- | ---------------------------------------------------------------- | ---------- |
| `cls`                | \`\`                    |                                                                  | *required* |
| `molecule`           | `MolecularData`         | The molecule data.                                               | *required* |
| `first_active_index` | `int`                   | The first active index, indicates all prior indices are freezed. | 0          |
| `remove_orbitlas`    | `Sequence[int] \| None` |                                                                  | None       |
| `remove_orbitals`    | `Sequence[int] \| None` | Active indices to be removed.                                    | None       |
| `op_compression_tol` | `float`                 | Tolerance for trimming the fermion operator.                     | 1e-13      |

**Returns:**

* **Type:** `FermionHamiltonianProblem`
* The fermion hamiltonian problem.

### Z2SymTaperMapper

Mapper between fermionic operators to qubits operators, using one of the supported
mapping methods (see `MappingMethod`), and taking advantage of Z2 symmetries in
order to taper off qubits.

**Methods:**

| Name                                | Description                                                                                                                                            |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [set\_sector](#set_sector)          | Sets the symmetry sector coefficients.                                                                                                                 |
| [map](#map)                         | Maps the given fermionic operator to qubits operator by using the mapper's method, and subsequently by tapering off qubits according to Z2 symmetries. |
| [get\_num\_qubits](#get_num_qubits) | Gets the number of qubits after mapping the given problem into qubits space.                                                                           |
| [from\_problem](#from_problem)      | Initializes a `Z2SymTaperMapper` object from a fermion problem (i.e.                                                                                   |

**Attributes:**

| Name         | Type                        | Description                                                                                                                           |
| ------------ | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `method`     | `MappingMethod`             | The mapping method.                                                                                                                   |
| `generators` | `tuple[QubitOperator, ...]` | Generators representing the Z2 symmetries.                                                                                            |
| `x_ops`      | `tuple[QubitOperator, ...]` | Single-qubit X operations, such that each operation anti-commutes with its matching generator and commutes with all other generators. |

### generators

`generators: tuple[QubitOperator, ...]`

### x\_ops

`x_ops: tuple[QubitOperator, ...]`

#### set\_sector

<pre><code>set\_sector(
self: ,
sector: Sequence\[int]
) -> None</code></pre>

Sets the symmetry sector coefficients.

**Parameters:**

| Name     | Type            | Description                                                      | Default    |
| -------- | --------------- | ---------------------------------------------------------------- | ---------- |
| `self`   | \`\`            |                                                                  | *required* |
| `sector` | `Sequence[int]` | (Sequence\[int]): Symmetry sector coefficients, each is 1 or -1. | *required* |

#### map

<pre><code>map(
self: ,
fermion\_op: FermionOperator,
args: Any = (),
is\_invariant: bool = False,
kwargs: Any = {}
) -> QubitOperator</code></pre>

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:**

| Name           | Type              | Description                                                                                                            | Default    |
| -------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------- |
| `self`         | \`\`              |                                                                                                                        | *required* |
| `fermion_op`   | `FermionOperator` | A fermionic operator.                                                                                                  | *required* |
| `args`         | `Any`             |                                                                                                                        | ()         |
| `is_invariant` | `bool`            | If `False`, the operator is not necessarily in the symmetry subspace, and thus gets projected onto it before tapering. | False      |
| `kwargs`       | `Any`             |                                                                                                                        | {}         |

**Returns:**

* **Type:** `QubitOperator`
* The mapped qubits operator.

#### get\_num\_qubits

<pre><code>get\_num\_qubits(
self: ,
problem: FermionHamiltonianProblem
) -> int</code></pre>

Gets the number of qubits after mapping the given problem into qubits space.

**Parameters:**

| Name      | Type                        | Description          | Default    |
| --------- | --------------------------- | -------------------- | ---------- |
| `self`    | \`\`                        |                      | *required* |
| `problem` | `FermionHamiltonianProblem` | The fermion problem. | *required* |

**Returns:**

* **Type:** `int`
* The number of qubits.

#### from\_problem

<pre><code>from\_problem(
cls: ,
problem: FermionHamiltonianProblem,
method: MappingMethod = MappingMethod.JORDAN\_WIGNER,
sector\_from\_hartree\_fock: bool = True,
tol: float = 1e-14
) -> Z2SymTaperMapper</code></pre>

Initializes a `Z2SymTaperMapper` object from a fermion problem (i.e. computing
the Z2 symmetries from the problem definition).

**Parameters:**

| Name                       | Type                        | Description                                                                              | Default                      |
| -------------------------- | --------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------- |
| `cls`                      | \`\`                        |                                                                                          | *required*                   |
| `problem`                  | `FermionHamiltonianProblem` | The fermion problem.                                                                     | *required*                   |
| `method`                   | `MappingMethod`             | The mapping method.                                                                      | MappingMethod.JORDAN\_WIGNER |
| `sector_from_hartree_fock` | `bool`                      | Whether to compute the symmetry sector coefficients according to the Hartree-Fock state. | True                         |
| `tol`                      | `float`                     | Tolerance for trimming off terms.                                                        | 1e-14                        |

**Returns:**

* **Type:** `Z2SymTaperMapper`
* The Z2 symmetries taper mapper.
  Members:

| Name                        | Description                                                                                                               |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `FermionToQubitMapper`      | Mapper between fermionic operators to qubits operators, using one of the supported mapping methods (see `MappingMethod`). |
| `FermionHamiltonianProblem` | Defines an electronic-structure problem using a Fermionic operator and electron count.                                    |
| `get_hf_fermion_op`         | Constructs a fermion operator that creates the Hartree-Fock reference state in block-spin ordering.                       |
| `get_hf_state`              | Computes the qubits state after applying the Hartree-Fock operator defined by the given problem and mapper.               |

### FermionToQubitMapper

Mapper between fermionic operators to qubits operators, using one of the supported
mapping methods (see `MappingMethod`).

**Methods:**

| Name                                | Description                                                                              |
| ----------------------------------- | ---------------------------------------------------------------------------------------- |
| [map](#map)                         | Maps the given fermionic operator to a qubits operator using the mapper's configuration. |
| [get\_num\_qubits](#get_num_qubits) | Gets the number of qubits after mapping the given problem into qubits space.             |

**Attributes:**

| Name     | Type            | Description         |
| -------- | --------------- | ------------------- |
| `method` | `MappingMethod` | The mapping method. |

### method

`method = method`

#### map

<pre><code>map(
self: ,
fermion\_op: FermionOperator,
args: Any = (),
kwargs: Any = {}
) -> QubitOperator</code></pre>

Maps the given fermionic operator to a qubits operator using the mapper's
configuration.

**Parameters:**

| Name         | Type              | Description           | Default    |
| ------------ | ----------------- | --------------------- | ---------- |
| `self`       | \`\`              |                       | *required* |
| `fermion_op` | `FermionOperator` | A fermionic operator. | *required* |
| `args`       | `Any`             |                       | ()         |
| `kwargs`     | `Any`             |                       | {}         |

**Returns:**

* **Type:** `QubitOperator`
* The mapped qubits operator.

#### get\_num\_qubits

<pre><code>get\_num\_qubits(
self: ,
problem: FermionHamiltonianProblem
) -> int</code></pre>

Gets the number of qubits after mapping the given problem into qubits space.

**Parameters:**

| Name      | Type                        | Description          | Default    |
| --------- | --------------------------- | -------------------- | ---------- |
| `self`    | \`\`                        |                      | *required* |
| `problem` | `FermionHamiltonianProblem` | The fermion problem. | *required* |

**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 a `MolecularData` object using the `from_molecule`
method.

**Methods:**

| Name                             | Description                                                    |
| -------------------------------- | -------------------------------------------------------------- |
| [from\_molecule](#from_molecule) | Constructs a `FermionHamiltonianProblem` from a molecule data. |

**Attributes:**

| Name                  | Type              | Description                                                                         |
| --------------------- | ----------------- | ----------------------------------------------------------------------------------- |
| `fermion_hamiltonian` | `FermionOperator` | The fermionic hamiltonian of the problem. Assumed to be in the block-spin labeling. |
| `n_orbitals`          | `int`             | Number of spatial orbitals.                                                         |
| `n_alpha`             | `int`             | Number of alpha particles.                                                          |
| `n_beta`              | `int`             | Number of beta particles.                                                           |
| `n_particles`         | `tuple[int, int]` | Number of alpha and beta particles.                                                 |

### fermion\_hamiltonian

`fermion_hamiltonian = fermion_hamiltonian`

### n\_particles

`n_particles = n_particles`

### n\_orbitals

`n_orbitals = min_n_orbitals`

### occupied\_alpha

`occupied_alpha: list[int]`

### virtual\_alpha

`virtual_alpha: list[int]`

### occupied\_beta

`occupied_beta: list[int]`

### virtual\_beta

`virtual_beta: list[int]`

### occupied

`occupied: list[int]`

### virtual

`virtual: list[int]`

#### from\_molecule

<pre><code>from\_molecule(
cls: ,
molecule: MolecularData,
first\_active\_index: int = 0,
remove\_orbitlas: Sequence\[int] | None = None,
remove\_orbitals: Sequence\[int] | None = None,
op\_compression\_tol: float = 1e-13
) -> FermionHamiltonianProblem</code></pre>

Constructs a `FermionHamiltonianProblem` from a molecule data.

**Parameters:**

| Name                 | Type                    | Description                                                      | Default    |
| -------------------- | ----------------------- | ---------------------------------------------------------------- | ---------- |
| `cls`                | \`\`                    |                                                                  | *required* |
| `molecule`           | `MolecularData`         | The molecule data.                                               | *required* |
| `first_active_index` | `int`                   | The first active index, indicates all prior indices are freezed. | 0          |
| `remove_orbitlas`    | `Sequence[int] \| None` |                                                                  | None       |
| `remove_orbitals`    | `Sequence[int] \| None` | Active indices to be removed.                                    | None       |
| `op_compression_tol` | `float`                 | Tolerance for trimming the fermion operator.                     | 1e-13      |

**Returns:**

* **Type:** `FermionHamiltonianProblem`
* The fermion hamiltonian problem.

### get\_hf\_fermion\_op

<pre><code>get\_hf\_fermion\_op(
problem: FermionHamiltonianProblem
) -> FermionOperator</code></pre>

Constructs a fermion operator that creates the Hartree-Fock reference state in
block-spin ordering.

**Parameters:**

| Name      | Type                        | Description                                                                                                                                       | Default    |
| --------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| `problem` | `FermionHamiltonianProblem` | The fermion problem. The Hartree-Fock fermion operator depends only on the number of spatial orbitals and the number of alpha and beta particles. | *required* |

**Returns:**

* **Type:** `FermionOperator`
* The Hartree-Fock fermion operator.

### get\_hf\_state

<pre><code>get\_hf\_state(
problem: FermionHamiltonianProblem,
mapper: FermionToQubitMapper
) -> list\[bool]</code></pre>

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:**

| Name      | Type                        | Description                                          | Default    |
| --------- | --------------------------- | ---------------------------------------------------- | ---------- |
| `problem` | `FermionHamiltonianProblem` | The fermion problem.                                 | *required* |
| `mapper`  | `FermionToQubitMapper`      | The mapper from fermion operator to qubits operator. | *required* |

**Returns:**

* **Type:** `list[bool]`
* The qubits state, given as a list of boolean values for each qubit.
  Members:

| Name                        | Description                                                                                                                         |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `FermionToQubitMapper`      | Mapper between fermionic operators to qubits operators, using one of the supported mapping methods (see `MappingMethod`).           |
| `FermionHamiltonianProblem` | Defines an electronic-structure problem using a Fermionic operator and electron count.                                              |
| `SparsePauliOp`             | Represents a collection of sparse Pauli operators.                                                                                  |
| `get_ucc_hamiltonians`      | Computes the UCC hamiltonians of the given problem in the desired excitations, using the given mapper.                              |
| `get_excitations`           | Gets all the possible excitations of the given problem according to the given number of excitations, preserving the particles spin. |

### FermionToQubitMapper

Mapper between fermionic operators to qubits operators, using one of the supported
mapping methods (see `MappingMethod`).

**Methods:**

| Name                                | Description                                                                              |
| ----------------------------------- | ---------------------------------------------------------------------------------------- |
| [map](#map)                         | Maps the given fermionic operator to a qubits operator using the mapper's configuration. |
| [get\_num\_qubits](#get_num_qubits) | Gets the number of qubits after mapping the given problem into qubits space.             |

**Attributes:**

| Name     | Type            | Description         |
| -------- | --------------- | ------------------- |
| `method` | `MappingMethod` | The mapping method. |

### method

`method = method`

#### map

<pre><code>map(
self: ,
fermion\_op: FermionOperator,
args: Any = (),
kwargs: Any = {}
) -> QubitOperator</code></pre>

Maps the given fermionic operator to a qubits operator using the mapper's
configuration.

**Parameters:**

| Name         | Type              | Description           | Default    |
| ------------ | ----------------- | --------------------- | ---------- |
| `self`       | \`\`              |                       | *required* |
| `fermion_op` | `FermionOperator` | A fermionic operator. | *required* |
| `args`       | `Any`             |                       | ()         |
| `kwargs`     | `Any`             |                       | {}         |

**Returns:**

* **Type:** `QubitOperator`
* The mapped qubits operator.

#### get\_num\_qubits

<pre><code>get\_num\_qubits(
self: ,
problem: FermionHamiltonianProblem
) -> int</code></pre>

Gets the number of qubits after mapping the given problem into qubits space.

**Parameters:**

| Name      | Type                        | Description          | Default    |
| --------- | --------------------------- | -------------------- | ---------- |
| `self`    | \`\`                        |                      | *required* |
| `problem` | `FermionHamiltonianProblem` | The fermion problem. | *required* |

**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 a `MolecularData` object using the `from_molecule`
method.

**Methods:**

| Name                             | Description                                                    |
| -------------------------------- | -------------------------------------------------------------- |
| [from\_molecule](#from_molecule) | Constructs a `FermionHamiltonianProblem` from a molecule data. |

**Attributes:**

| Name                  | Type              | Description                                                                         |
| --------------------- | ----------------- | ----------------------------------------------------------------------------------- |
| `fermion_hamiltonian` | `FermionOperator` | The fermionic hamiltonian of the problem. Assumed to be in the block-spin labeling. |
| `n_orbitals`          | `int`             | Number of spatial orbitals.                                                         |
| `n_alpha`             | `int`             | Number of alpha particles.                                                          |
| `n_beta`              | `int`             | Number of beta particles.                                                           |
| `n_particles`         | `tuple[int, int]` | Number of alpha and beta particles.                                                 |

### fermion\_hamiltonian

`fermion_hamiltonian = fermion_hamiltonian`

### n\_particles

`n_particles = n_particles`

### n\_orbitals

`n_orbitals = min_n_orbitals`

### occupied\_alpha

`occupied_alpha: list[int]`

### virtual\_alpha

`virtual_alpha: list[int]`

### occupied\_beta

`occupied_beta: list[int]`

### virtual\_beta

`virtual_beta: list[int]`

### occupied

`occupied: list[int]`

### virtual

`virtual: list[int]`

#### from\_molecule

<pre><code>from\_molecule(
cls: ,
molecule: MolecularData,
first\_active\_index: int = 0,
remove\_orbitlas: Sequence\[int] | None = None,
remove\_orbitals: Sequence\[int] | None = None,
op\_compression\_tol: float = 1e-13
) -> FermionHamiltonianProblem</code></pre>

Constructs a `FermionHamiltonianProblem` from a molecule data.

**Parameters:**

| Name                 | Type                    | Description                                                      | Default    |
| -------------------- | ----------------------- | ---------------------------------------------------------------- | ---------- |
| `cls`                | \`\`                    |                                                                  | *required* |
| `molecule`           | `MolecularData`         | The molecule data.                                               | *required* |
| `first_active_index` | `int`                   | The first active index, indicates all prior indices are freezed. | 0          |
| `remove_orbitlas`    | `Sequence[int] \| None` |                                                                  | None       |
| `remove_orbitals`    | `Sequence[int] \| None` | Active indices to be removed.                                    | None       |
| `op_compression_tol` | `float`                 | Tolerance for trimming the fermion operator.                     | 1e-13      |

**Returns:**

* **Type:** `FermionHamiltonianProblem`
* The fermion hamiltonian problem.

### SparsePauliOp

Represents a collection of sparse Pauli operators.

**Methods:**

| Name                                                      | Description |
| --------------------------------------------------------- | ----------- |
| [get\_tuples\_representation](#get_tuples_representation) |             |

**Attributes:**

| Name         | Type                      | Description                                                                                     |
| ------------ | ------------------------- | ----------------------------------------------------------------------------------------------- |
| `terms`      | `CArray[SparsePauliTerm]` | The list of chosen sparse Pauli terms, corresponds to a product of them. (See: SparsePauliTerm) |
| `num_qubits` | `CInt`                    | The number of qubits in the Hamiltonian.                                                        |

### terms

`terms: list[SparsePauliTerm]`

### num\_qubits

`num_qubits: int`

### get\_ucc\_hamiltonians

<pre><code>get\_ucc\_hamiltonians(
problem: FermionHamiltonianProblem,
mapper: FermionToQubitMapper,
excitations: int | Sequence\[int]
) -> list\[SparsePauliOp]</code></pre>

Computes the UCC hamiltonians of the given problem in the desired excitations,
using the given mapper.

**Parameters:**

| Name          | Type                        | Description                                         | Default    |
| ------------- | --------------------------- | --------------------------------------------------- | ---------- |
| `problem`     | `FermionHamiltonianProblem` | The fermion problem.                                | *required* |
| `mapper`      | `FermionToQubitMapper`      | The mapper from fermion to qubits operators.        | *required* |
| `excitations` | `int \| Sequence[int]`      | A single desired excitation or an excitations list. | *required* |

**Returns:**

* **Type:** `list[SparsePauliOp]`
* The UCC hamiltonians.

### get\_excitations

<pre><code>get\_excitations(
problem: FermionHamiltonianProblem,
num\_excitations: int
) -> set\[tuple\[tuple\[int, ...], tuple\[int, ...]]]</code></pre>

Gets all the possible excitations of the given problem according to the
given number of excitations, preserving the particles spin.

**Parameters:**

| Name              | Type                        | Description            | Default    |
| ----------------- | --------------------------- | ---------------------- | ---------- |
| `problem`         | `FermionHamiltonianProblem` | The fermion problem.   | *required* |
| `num_excitations` | `int`                       | Number of excitations. | *required* |

**Returns:**

* **Type:** `set[tuple[tuple[int, ...], tuple[int, ...]]]`
* A set of all possible excitations, specified as a pair of source and target indices.
