paddle_quantum.biocomputing.operators

various indicators used to build the protein Hamiltonian

paddle_quantum.biocomputing.operators.edge_direction_indicator(edge, affected_qubits=None, direction=None)

Calculate the direction indicate operator for a given edge at given affected qubits.

I0(e)=(1q0)(1q1)I1(e)=(1q0)q1I2(e)=q0(1q1)I3(e)=q0q1satisfieskIk(e)==1
Parameters:
  • edge (Tuple[int]) – Edge index in protein’s directed graph.

  • affected_qubits (List[int] | None) – The indices of qubits used to encode the indicator.

  • direction (int | None) – Direction of edge in the diamond lattice, valid values 0, 1, 2, 3.

Returns:

A tuple contains the sign and indicator operator corresponds to that edge.

Return type:

Tuple[float, Dict]

paddle_quantum.biocomputing.operators.contact_indicator(qindex)

The indicator which indicates whether two nodes in the protein are contact.

qindex=contactorstart+indexofcontactpair
Parameters:

qindex (int) – index of qubit used as indicator of whether two nodes in the protein chain contact.

Returns:

Contact indicator in QubitOperator form.

Return type:

QubitOperator

paddle_quantum.biocomputing.operators.backwalk_indicator(e0_attrs, e1_attrs)

Indicator of whether two consecutive bonds in protein overlap.

a=03Ia(ei)Ia(ei+1)
Parameters:
  • e0_attrs (Dict) – Attributes of e0 edge.

  • e1_attrs (Dict) – Attributes of e1 (edge next to e0) edge.

Returns:

Backwalk indicator in QubitOperator form.

Return type:

QubitOperator