Skip to content

workbench_algorithms.subroutines.majorana_fermion_operator

Module containing Qubrick for the Majorana Fermion Operation.

MajoranaFermionOperator

MajoranaFermionOperator(
    operator, multiplexor_cls, **kwargs
)

Bases: Qubrick

The Majorana Fermion Operator shown in Fig. 9 of arXiv:1805.03662 .

Parameters:

Name Type Description Default
operator callable

A function implementing an operator taking in two arguments: (1) the qubit register (2) the control conditions. Typically either the x or y method of a QPU instance

required
multiplexor_cls Qubrick

The class for a Qubrick that implements multiplexing

required
**kwargs dict[str, Any]

Additional Qubrick kwargs

{}

compute

compute(
    index_reg: Qubits,
    target_reg: Qubits,
    ctrl: Qubits | int = 0,
)

Compute the Majorana Fermion Operation.

Parameters:

Name Type Description Default
index_reg Qubits

The qubit register that represents the indices to multiplex over

required
target_reg Qubits

The qubit register that the Majorana Fermion Operator gets applied onto.

required
ctrl Qubits or int

Additional classical or quantum control conditions. Defaults to 0 which performs the operation as if a control qubit were in the |1> state.

0