Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.chemistry.components.initial_states.HartreeFock

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

GitHub

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.

__init__

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

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.

Methods

__init__(num_orbitals, num_particles[, …])type num_orbitalsint
construct_circuit([mode, register])Construct the statevector of desired initial state.

Attributes

bitstrGetter of the bit string represented the statevector.

bitstr

Getter of the bit string represented the statevector.

construct_circuit

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.