qoqo.operations.ComplexPMInteraction

class qoqo.operations.ComplexPMInteraction

The complex hopping gate.

\(e^{-\mathrm{i} \left[ Re(\theta) \cdot (X_c X_t + Y_c Y_t) - Im(\theta) \cdot (X_c Y_t - Y_c X_t) \right] }\)

Where \(X_c\) is the Pauli matrix \(\sigma^x\) acting on the control qubit and \(Y_t\) is the Pauli matrix \(\sigma^y\) acting on the target qubit.

Parameters:
  • control (int) – The index of the most significant qubit in the unitary representation.

  • target (int) –

  • t_real (CalculatorFloat) – The real part of the strength of the rotation \(Re(\theta)\).

  • t_imag (CalculatorFloat) – The imaginary part of the strength of the rotation \(Im(\theta)\).

__init__()

Methods

__init__()

control()

Returns control qubit of the two-qubit operation

hqslang()

Returns hqslang name of Operation

involved_qubits()

List all involved Qubits

is_parametrized()

Returns true if operation contains symbolic parameters

remap_qubits(mapping)

Remap qubits

substitute_parameters(substitution_parameters)

Substitutes internal symbolic parameters with float values

t_imag()

Returns value of attribute t_imag

t_real()

Returns value of attribute t_real

tags()

Returns tags identifying the Operation

target()

Returns target qubit of the two-qubit operation

unitary_matrix()

Return unitary matrix of gate.

control()

Returns control qubit of the two-qubit operation

hqslang()

Returns hqslang name of Operation

Returns:

The name

Return type:

str

involved_qubits()

List all involved Qubits

Returns:

The involved qubits as a set or ‘ALL’ if all qubits are involved

Return type:

Union[set[int], str]

is_parametrized()

Returns true if operation contains symbolic parameters

Returns:

bool

remap_qubits(mapping)

Remap qubits

Parameters:

mapping (dict[int, int]) – The mapping

Returns:

The operation with the remapped qubits

Return type:

Operation

Raises:

RuntimeError – Qubit remapping failed

substitute_parameters(substitution_parameters)

Substitutes internal symbolic parameters with float values

Only available when all symbolic expressions can be evaluated to float with the provided parameters.

Parameters:

substitution_parameters (dict[str, float]) – The substituted free parameters

Returns:

The operation with the parameters substituted

Return type:

Operation

Raises:

RuntimeError – Parameter Substitution failed

t_imag()

Returns value of attribute t_imag

t_real()

Returns value of attribute t_real

tags()

Returns tags identifying the Operation

Returns:

The tags identifying the operation

Return type:

list[str]

target()

Returns target qubit of the two-qubit operation

unitary_matrix()

Return unitary matrix of gate.

Returns:

np.ndarray

Raises:

ValueError – Error symbolic operation cannot return float unitary matrix