qrunch.quantum.algorithms.second_quantization.quantum_selected_configuration_interaction.reference_circuit_providers.reference_circuit_provider

Interface for preparing the circuits of the reference states of a ground state problem.

Classes

ReferenceCircuitProvider

Prepare the circuits of one or more reference states, e.g. for quantum-selected configuration interaction.

class ReferenceCircuitProvider

Bases: Protocol

Prepare the circuits of one or more reference states, e.g. for quantum-selected configuration interaction.

A provider is configured before the problem is known and is then asked for its circuits once per problem. The circuits use the qubit mapping of the problem’s Hamiltonian. Without the paired-electron approximation this is the fermionic mapping: alpha spin orbitals on qubits 0 to N_s - 1 and beta spin orbitals on qubits N_s to 2 N_s - 1, where N_s is the number of spatial orbitals. With the paired-electron approximation it is the paired mapping: one qubit per spatial orbital, occupied by an electron pair.

__init__(*args, **kwargs)
create_circuits(ground_state_problem: RestrictedGroundStateProblem | UnrestrictedGroundStateProblem, *, number_of_states: int, paired_electron_approximation: bool) → tuple[Circuit, ...]

Create new circuits preparing the reference states of the given problem.

Parameters:
  • ground_state_problem (RestrictedGroundStateProblem | UnrestrictedGroundStateProblem) – The ground state problem whose reference states are prepared.

  • number_of_states (int) – Positive number of lowest states requested from the calculation, the ground state included. Providers may use it to choose how many references to prepare.

  • paired_electron_approximation (bool) – Whether to prepare the reference states in the paired-electron approximation. Only valid if supports_paired_approximation() is True.

Return type:

tuple[Circuit, …]

supports_paired_approximation() → bool

Whether the provider can create its reference circuits in the paired-electron approximation.

Return type:

bool