FermionCircuit¶
- class FermionCircuit¶
Bases:
objectA wrapper around
QuantumCircuitfor expressing fermionic circuits.This class maintains a reduced API compared to the full API of the underlying
QuantumCircuit. This is done to avoid exposing (amongst other methods) the ability to apply qubit-based gates onto a fermionic circuit, which would not be a well-defined operation in the general case.Attributes
- fermions¶
The fermionic mode bits that this circuit acts upon.
- register: FermionRegister¶
The inner circuit’s
FermionRegister.
Methods
- append(gate, fargs, cargs=None, *, copy=True)¶
Appends a
FermionGateto this circuit.- Parameters:
gate (FermionGate) – the fermionic gate to apply.
fargs (Qubit | QuantumRegister | int | slice | Sequence[Qubit | int]) – the fermionic modes on which this gate acts.
cargs (None) –
the classical bits on which this gate acts.
Warning
No gates of this kind are currently supported.
- Raises:
ValueError – if the provided
gateis not an instance ofFermionGate.- Return type:
None