FermionCircuit

class FermionCircuit

Bases: object

A wrapper around QuantumCircuit for 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 FermionGate to this circuit.

Parameters:
Raises:

ValueError – if the provided gate is not an instance of FermionGate.

Return type:

None

draw(*args, **kwargs)

Directly exposes the inner circuit’s draw() method.

Return type:

Any