FermionicCircuit

class FermionicCircuit

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

metadata

Re-exposes metadata.

modes

The fermionic mode bits that this circuit acts upon.

register: FermionicRegister

The inner circuit’s FermionicRegister.

Methods

append(gate, fargs, cargs=None, *, copy=True)

Appends a FermionicGate to this circuit.

Parameters:
Raises:

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

Return type:

None

count_ops()

Re-exposes count_ops().

Return type:

OrderedDict[str, int]

decompose(gates_to_decompose=None, reps=1)

Re-exposes decompose().

Parameters:
Return type:

FermionicCircuit

draw(*args, **kwargs)

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

Return type:

Any