Skip to main contentIBM Quantum Documentation
You are viewing the API reference for an old version of Qiskit SDK. Switch to latest version

HartreeFock

HartreeFock(num_orbitals, num_particles, qubit_mapping='parity', two_qubit_reduction=True, sq_list=None)

GitHub(opens in a new tab)

A Hartree-Fock initial state.

Parameters

  • num_orbitals (int) – number of spin orbitals, has a min. value of 1.
  • num_particles (Union[List[int], int]) – number of particles, if it is a list, the first number is alpha and the second number if beta.
  • qubit_mapping (str) – mapping type for qubit operator
  • two_qubit_reduction (bool) – flag indicating whether or not two qubit is reduced
  • sq_list (Optional[List[int]]) – position of the single-qubit operators that anticommute with the cliffords

Raises

  • ValueError – wrong setting in num_particles and num_orbitals.
  • ValueError – wrong setting for computed num_qubits and supplied num_qubits.

Attributes

bitstr

Getter of the bit string represented the statevector.


Methods

construct_circuit

HartreeFock.construct_circuit(mode='circuit', register=None)

Construct the statevector of desired initial state.

Parameters

  • mode (string) – vector or circuit. The vector mode produces the vector. While the circuit constructs the quantum circuit corresponding that vector.
  • register (QuantumRegister) – register for circuit construction.

Returns

statevector.

Return type

QuantumCircuit or numpy.ndarray

Raises

ValueError – when mode is not ‘vector’ or ‘circuit’.

Was this page helpful?
Report a bug or request content on GitHub.