RealAmplitudes.add_layer¶
- RealAmplitudes.add_layer(other, entanglement=None, front=False)¶
Append another layer to the NLocal.
- Parameters
other (
Union
[NLocal
,Instruction
,QuantumCircuit
]) – The layer to compose, can be another NLocal, an Instruction or Gate, or a QuantumCircuit.entanglement (
Union
[List
[int
],str
,List
[List
[int
]],None
]) – The entanglement or qubit indices.front (
bool
) – If True,other
is appended to the front, else to the back.
- Return type
- Returns
self, such that chained composes are possible.
- Raises
TypeError – If other is not compatible, i.e. is no Instruction and does not have a to_instruction method.