change entanglement name circular -> sca
@@ -23,8 +23,12 @@ def get_entangler_map(map_type, num_qubits, offset=0):
Args:
map_type (str): 'full' entangles each qubit with all the subsequent ones
'linear' entangles each qubit with the next
+ 'sca' (shifted circular alternating entanglement) is a
+ circular entanglement where the 'long' entanglement is
+ shifted by one position every block and every block the
+ role or control/target qubits alternate
num_qubits (int): Number of qubits for which the map is needed
- offset (int): Some map_types (e.g. 'circular') can shift the gates in
+ offset (int): Some map_types (e.g. 'sca') can shift the gates in
the entangler map by the specified integer offset.
Returns:
@@ -40,7 +44,7 @@ def get_entangler_map(map_type, num_qubits, offset=0):
ret = [[i, j] for i in range(num_qubits) for j in range(i + 1, num_qubits)]
elif map_type == 'linear':
ret = [[i, i + 1] for i in range(num_qubits - 1)]
- elif map_type == 'circular':
+ elif map_type == 'sca':
offset_idx = offset % num_qubits
if offset_idx % 2 == 0: # even block numbers
for i in reversed(range(offset_idx)):
@@ -60,7 +64,7 @@ def get_entangler_map(map_type, num_qubits, offset=0):
for i in range(num_qubits - offset_idx - 1):
ret += [[i + 1, i]]
else:
- raise ValueError("map_type only supports 'full', 'linear' or 'circular' type.")
+ raise ValueError("map_type only supports 'full', 'linear' or 'sca' type.")
return ret
