chemqulacs.vqe.vqeci module#
- class chemqulacs.vqe.vqeci.AWSBackend(arn: str, qubit_mapping: Optional[Mapping[int, int]] = None, **run_kwargs)[source]#
Bases:
BackendBackend class for AWS Braket
- Parameters:
arn (str) – ARN which specifies the device to use
qubit_mapping (Optional[Mapping[[int, int]]]) – Qubit mappings between the qubit indices used in the code and the qubit indices used in the backend.
- class chemqulacs.vqe.vqeci.Ansatz(value)[source]#
Bases:
EnumAn enum representing an ansatz for VQE
- AllSinglesDoubles = 3#
- GateFabric = 6#
- HardwareEfficient = 1#
- KUpCCGSD = 8#
- ParticleConservingU1 = 4#
- ParticleConservingU2 = 5#
- SymmetryPreserving = 2#
- UCCSD = 7#
- class chemqulacs.vqe.vqeci.QiskitBackend(backend_name: str, hub: str = 'ibm-q', group: str = 'open', project: str = 'main', qubit_mapping: Optional[Mapping[int, int]] = None, **run_kwargs)[source]#
Bases:
BackendBackend class for Qiskit
- Parameters:
backend_name (str) – Name of the qiskit backend
hub (str) –
group (str) –
project (str) –
qubit_mapping (Optional[Mapping[[int, int]]]) – Qubit mappings from the qubit indices used in the code to the backend qubit indices
- class chemqulacs.vqe.vqeci.VQECI(mol=None, fermion_qubit_mapping=<quri_parts.openfermion.transforms.OpenFermionJordanWignerFactory object>, optimizer=<quri_parts.algo.optimizer.adam.Adam object>, backend: ~chemqulacs.vqe.vqeci.Backend = <chemqulacs.vqe.vqeci.QulacsBackend object>, shots_per_iter: int = 10000, initial_states=None, ansatz: ~chemqulacs.vqe.vqeci.Ansatz = Ansatz.ParticleConservingU1, layers: int = 2, k: int = 1, trotter_number: int = 1, excitation_number: int = 0, weight_policy: str = 'exponential', include_pi: bool = False, use_singles: bool = True, delta_sz: int = 0, singlet_excitation: bool = False, is_init_random: bool = False, seed: int = 0)[source]#
Bases:
object- Parameters:
mol – SCF or Mole to define the problem size.
fermion_qubit_mapping (quri_parts.openfermion.transforms.OpenFermionQubitMapping) – Mapping from
FermionOperatororInteractionOperatortoOperatoroptimizer –
backend (Backend) –
shots_per_iter (int) –
initial_states (optional) – Initial states for VQE
ansatz – ansatz used for VQE
layers (int) – Layers of gate operations. Used for
HardwareEfficient,SymmetryPreserving,ParticleConservingU1,ParticleConservingU2, andGateFabric.k (int) – Number of repetitions of excitation gates. Used for
KUpCCGSD.trotter_number (int) – Number of trotter decomposition. Used for
UCCSDandkUpCCGSD.include_pi (bool) – If
True, the optional constant gate is inserted. Used forGateFabric.use_singles – (bool): If
True, single-excitation gates are applied. Used forUCCSD.delta_sz (int) – Changes of spin in the excitation. Used for
KUpCCGSD.singlet_excitation (bool) – If
True, the ansatz will be spin symmetric. Used forUCCSDandKUpCCGSD.is_init_random (bool) – If
False, initial parameters are initialized to 0s, else, initialized randomly.seeed (int) – Random seed.
- Returns:
None