Skip to content

Stmts

Barrier

Bases: Statement


              flowchart TD
              bloqade.qasm3.dialects.core.stmts.Barrier[Barrier]

              

              click bloqade.qasm3.dialects.core.stmts.Barrier href "" "bloqade.qasm3.dialects.core.stmts.Barrier"
            

Barrier synchronization across a set of qubits.

qargs class-attribute instance-attribute

qargs: tuple[SSAValue, ...] = argument(QubitType)

qargs (Qubit...): The qubits to synchronize.

BitRegGet

Bases: Statement


              flowchart TD
              bloqade.qasm3.dialects.core.stmts.BitRegGet[BitRegGet]

              

              click bloqade.qasm3.dialects.core.stmts.BitRegGet href "" "bloqade.qasm3.dialects.core.stmts.BitRegGet"
            

Get a bit from a classical bit register.

idx class-attribute instance-attribute

idx: SSAValue = argument(Int)

idx (Int): The index of the bit in the register.

reg class-attribute instance-attribute

reg: SSAValue = argument(BitRegType)

reg (BitReg): The classical bit register.

result class-attribute instance-attribute

result: ResultValue = result(BitType)

result (Bit): The bit at position idx.

BitRegNew

Bases: Statement


              flowchart TD
              bloqade.qasm3.dialects.core.stmts.BitRegNew[BitRegNew]

              

              click bloqade.qasm3.dialects.core.stmts.BitRegNew href "" "bloqade.qasm3.dialects.core.stmts.BitRegNew"
            

Create a new classical bit register.

n_bits class-attribute instance-attribute

n_bits: SSAValue = argument(Int)

n_bits (Int): The number of bits in the register.

result class-attribute instance-attribute

result: ResultValue = result(BitRegType)

result (BitReg): The new bit register with all bits set to 0.

Measure

Bases: Statement


              flowchart TD
              bloqade.qasm3.dialects.core.stmts.Measure[Measure]

              

              click bloqade.qasm3.dialects.core.stmts.Measure href "" "bloqade.qasm3.dialects.core.stmts.Measure"
            

Measure a qubit (or register) and store the result in a bit (or register).

carg class-attribute instance-attribute

carg: SSAValue = argument(BitType | BitRegType)

carg (Bit | BitReg): The bit or register to store the result in.

qarg class-attribute instance-attribute

qarg: SSAValue = argument(QubitType | QRegType)

qarg (Qubit | QReg): The qubit or quantum register to measure.

QRegGet

Bases: Statement


              flowchart TD
              bloqade.qasm3.dialects.core.stmts.QRegGet[QRegGet]

              

              click bloqade.qasm3.dialects.core.stmts.QRegGet href "" "bloqade.qasm3.dialects.core.stmts.QRegGet"
            

Get a qubit from a quantum register.

idx class-attribute instance-attribute

idx: SSAValue = argument(Int)

idx (Int): The index of the qubit in the register.

reg class-attribute instance-attribute

reg: SSAValue = argument(QRegType)

reg (QReg): The quantum register.

result class-attribute instance-attribute

result: ResultValue = result(QubitType)

result (Qubit): The qubit at position idx.

QRegNew

Bases: Statement


              flowchart TD
              bloqade.qasm3.dialects.core.stmts.QRegNew[QRegNew]

              

              click bloqade.qasm3.dialects.core.stmts.QRegNew href "" "bloqade.qasm3.dialects.core.stmts.QRegNew"
            

Create a new quantum register.

n_qubits class-attribute instance-attribute

n_qubits: SSAValue = argument(Int)

n_qubits: The number of qubits in the register.

result class-attribute instance-attribute

result: ResultValue = result(QRegType)

A new quantum register with n_qubits set to |0>.

Reset

Bases: Statement


              flowchart TD
              bloqade.qasm3.dialects.core.stmts.Reset[Reset]

              

              click bloqade.qasm3.dialects.core.stmts.Reset href "" "bloqade.qasm3.dialects.core.stmts.Reset"
            

Reset a qubit to the |0> state.

qarg class-attribute instance-attribute

qarg: SSAValue = argument(QubitType)

qarg (Qubit): The qubit to reset.