Skip to main contentIBM Quantum Documentation
You are viewing the API reference for an old version of Qiskit SDK. Switch to latest version

Barrier

Barrier(num_qubits)

GitHub(opens in a new tab)

Bases: qiskit.circuit.instruction.Instruction

Barrier instruction.

Create new barrier instruction.


Methods Defined Here

broadcast_arguments

Barrier.broadcast_arguments(qargs, cargs)

Validation of the arguments.

Parameters

  • qargs (List) – List of quantum bit arguments.
  • cargs (List) – List of classical bit arguments.

Yields

Tuple(List, List) – A tuple with single arguments.

Raises

CircuitError – If the input is not valid. For example, the number of arguments does not match the gate expectation.

c_if

Barrier.c_if(classical, val)

Set a classical equality condition on this instruction between the register or cbit classical and value val.

Note

This is a setter method, not an additive one. Calling this multiple times will silently override any previously set condition; it does not stack.

inverse

Barrier.inverse()

Special case. Return self.


Attributes

condition_bits

Get Clbits in condition.

Return type

List[Clbit]

decompositions

Get the decompositions of the instruction from the SessionEquivalenceLibrary.

definition

Return definition in terms of other basic gates.

duration

Get the duration.

label

Return instruction label

Return type

str

params

return instruction params.

unit

Get the time unit of duration.

Was this page helpful?
Report a bug or request content on GitHub.