qc2.ansatz.qiskit.gate_fabric ============================= .. py:module:: qc2.ansatz.qiskit.gate_fabric Classes ------- .. autoapisummary:: qc2.ansatz.qiskit.gate_fabric.GateFabric Module Contents --------------- .. py:class:: GateFabric(num_spatial_orbitals: int, num_particles: tuple, qubit_mapper: qiskit_nature.second_q.mappers.QubitMapper, initial_state: Optional[qiskit.circuit.QuantumCircuit] = None, num_layers: int = 1, include_pi: bool = False, name: str | None = 'GateFabric') Bases: :py:obj:`qiskit.circuit.library.blueprintcircuit.BlueprintCircuit` Gate Fabric ansatz implementation for Qiskit. .. py:attribute:: _num_qubits .. py:attribute:: _num_spatial_orbitals .. py:attribute:: _num_particles .. py:attribute:: _qubit_mapper .. py:attribute:: _num_layers :value: 1 .. py:attribute:: _include_pi :value: False .. py:attribute:: _initial_state .. py:property:: qubit_mapper :type: qiskit_nature.second_q.mappers.QubitMapper | None The qubit operator mapper. .. py:property:: num_qubits :type: int The number of qubits. .. py:property:: num_spatial_orbitals :type: int The number of spatial orbitals. .. py:property:: num_particles :type: tuple[int, int] The number of particles. .. py:method:: _check_configuration(raise_on_failure: bool = True) -> bool Check if the configuration of the NLocal class is valid. :param raise_on_failure: Whether to raise on failure. :returns: True, if the configuration is valid and the circuit can be constructed. Otherwise an ValueError is raised. :raises ValueError: If the numbr fo qubit is not set. :raises ValueError: If the number of spatial orbitals is lower than the number of particles .. py:method:: _build() -> None Builds the Gate Fabric circuit .. py:method:: _gate_fabric_layer(circuit: qiskit.circuit.QuantumCircuit, parameters: list, wires: list) -> None Implements a single layer of Gate Fabric .. py:method:: _orbital_rotation(circuit: qiskit.circuit.QuantumCircuit, theta: qiskit.circuit.Parameter, qubits: list) -> None Implements the orbital rotation gate .. py:method:: _double_excitation(circuit: qiskit.circuit.QuantumCircuit, phi: qiskit.circuit.Parameter, qubits: list) -> None Implements the double excitation gate