FermionicCircuit¶
- class FermionicCircuit¶
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
- modes¶
The fermionic mode
bitsthat this circuit acts upon.
- register: FermionicRegister¶
The inner circuit’s
FermionicRegister.
Methods
- append(gate, fargs, cargs=None, *, copy=True)¶
Appends a
FermionicGateto this circuit.- Parameters:
gate (FermionicGate) – 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 ofFermionicGate.- Return type:
None
- count_ops()¶
Re-exposes
count_ops().- Return type:
- decompose(gates_to_decompose=None, reps=1)¶
Re-exposes
decompose().- Parameters:
gates_to_decompose (str | type[Instruction] | Sequence[str | type[Instruction]] | None)
reps (int)
- Return type: