qc2.ansatz.qiskit.gate_fabric
Classes
Gate Fabric ansatz implementation for Qiskit. |
Module Contents
- class qc2.ansatz.qiskit.gate_fabric.GateFabric(num_spatial_orbitals: int, num_particles: tuple, qubit_mapper: qiskit_nature.second_q.mappers.QubitMapper, initial_state: qiskit.circuit.QuantumCircuit | None = None, num_layers: int = 1, include_pi: bool = False, name: str | None = 'GateFabric')[source]
Bases:
qiskit.circuit.library.blueprintcircuit.BlueprintCircuitGate Fabric ansatz implementation for Qiskit.
- property qubit_mapper: qiskit_nature.second_q.mappers.QubitMapper | None[source]
The qubit operator mapper.
- _check_configuration(raise_on_failure: bool = True) bool[source]
Check if the configuration of the NLocal class is valid.
- Parameters:
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.
ValueError – If the number of spatial orbitals is lower than the number of particles
- _gate_fabric_layer(circuit: qiskit.circuit.QuantumCircuit, parameters: list, wires: list) None[source]
Implements a single layer of Gate Fabric