quri_parts.algo.ansatz.hardware_efficient module#
- class HardwareEfficient(qubit_count, reps, rotation_indices=None, entangler_map_seq=None, sub_width=0, sub_reps=0, sub_ent_map_seq=None)#
Bases:
ImmutableLinearMappedUnboundParametricQuantumCircuit
Hardware-efficient ansatz.
Ref: A. Kandala et. al., Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets, Nature 549, 242–246
For application of HWE ansatz to Subspace search VQE, see: Nakanishi et. al., Subspace-search variational quantum eigensolver for excited states, https://arxiv.org/abs/1810.09434
- Parameters:
qubit_count (int) – Number of qubits.
reps (int) – Number of repetitions of a single entanglement layer.
rotation_indices (Optional[Sequence[int]]) – Qubit indices specifying on which qubits each rotation layer acts.
entangler_map_seq (Optional[Sequence[Sequence[tuple[int, int]]]]) – Qubit index pairs specifying on which qubit pairs each entanglement layer acts.
sub_width (int) – Number of qubits in a subspace for SSVQE.
sub_reps (int) – Number of repetitions of a single entanglement layer in a subspace for SSVQE.
sub_ent_map_seq (Optional[Sequence[Sequence[tuple[int, int]]]]) – Qubit index pairs specifying on which qubit pairs each entanglement layer in a subspace for SSVQE acts.
- class HardwareEfficientReal(qubit_count, reps, rotation_indices=None, entangler_map_seq=None, sub_width=0, sub_reps=0, sub_ent_map_seq=None)#
Bases:
HardwareEfficient
Real-valued hardware-efficient ansatz.
Ref: A. Kandala et. al., Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets, Nature 549, 242–246
This implementation explicitly removes Rz gates ensuring real states.
For application of HWE ansatz to Subspace search VQE, see: Nakanishi et. al., Subspace-search variational quantum eigensolver for excited states, https://arxiv.org/abs/1810.09434
- Parameters:
qubit_count (int) – Number of qubits.
reps (int) – Number of repetitions of a single entanglement layer.
rotation_indices (Optional[Sequence[int]]) – Qubit indices specifying on which qubits each rotation layer acts.
entangler_map_seq (Optional[Sequence[Sequence[tuple[int, int]]]]) – Qubit index pairs specifying on which qubit pairs each entanglement layer acts.
sub_width (int) – Number of qubits in a subspace for SSVQE.
sub_reps (int) – Number of repetitions of a single entanglement layer in a subspace for SSVQE.
sub_ent_map_seq (Optional[Sequence[Sequence[tuple[int, int]]]]) – Qubit index pairs specifying on which qubit pairs each entanglement layer in a subspace for SSVQE acts.