Skip to content

Stmts

Add

Bases: Statement


              flowchart TD
              bloqade.qasm2.dialects.expr.stmts.Add[Add]

              

              click bloqade.qasm2.dialects.expr.stmts.Add href "" "bloqade.qasm2.dialects.expr.stmts.Add"
            

Add two numbers.

lhs class-attribute instance-attribute

lhs: SSAValue = argument(PyNum)

lhs (Union[int, float]): The left-hand side of the addition.

result class-attribute instance-attribute

result: ResultValue = result(PyNum)

result (Union[int, float]): The result of the addition.

rhs class-attribute instance-attribute

rhs: SSAValue = argument(PyNum)

rhs (Union[int, float]): The right-hand side of the addition.

ConstFloat

Bases: Statement


              flowchart TD
              bloqade.qasm2.dialects.expr.stmts.ConstFloat[ConstFloat]

              

              click bloqade.qasm2.dialects.expr.stmts.ConstFloat href "" "bloqade.qasm2.dialects.expr.stmts.ConstFloat"
            

IR Statement representing a constant float value.

result class-attribute instance-attribute

result: ResultValue = result(Float)

result (Float): The result value.

value class-attribute instance-attribute

value: float = attribute(Float)

value (float): The constant float value.

ConstInt

Bases: Statement


              flowchart TD
              bloqade.qasm2.dialects.expr.stmts.ConstInt[ConstInt]

              

              click bloqade.qasm2.dialects.expr.stmts.ConstInt href "" "bloqade.qasm2.dialects.expr.stmts.ConstInt"
            

IR Statement representing a constant integer value.

result class-attribute instance-attribute

result: ResultValue = result(Int)

result (Int): The result value.

value class-attribute instance-attribute

value: int = attribute(Int)

value (int): The constant integer value.

ConstPI

Bases: Statement


              flowchart TD
              bloqade.qasm2.dialects.expr.stmts.ConstPI[ConstPI]

              

              click bloqade.qasm2.dialects.expr.stmts.ConstPI href "" "bloqade.qasm2.dialects.expr.stmts.ConstPI"
            

The constant value of PI.

result class-attribute instance-attribute

result: ResultValue = result(Float)

result (ConstPI): The result value.

Cos

Bases: Statement


              flowchart TD
              bloqade.qasm2.dialects.expr.stmts.Cos[Cos]

              

              click bloqade.qasm2.dialects.expr.stmts.Cos href "" "bloqade.qasm2.dialects.expr.stmts.Cos"
            

Take the cosine of a number.

result class-attribute instance-attribute

result: ResultValue = result(Float)

result (float): The cosine of the number.

value class-attribute instance-attribute

value: SSAValue = argument(PyNum)

value (Union[int, float]): The number to take the cosine of.

Div

Bases: Statement


              flowchart TD
              bloqade.qasm2.dialects.expr.stmts.Div[Div]

              

              click bloqade.qasm2.dialects.expr.stmts.Div href "" "bloqade.qasm2.dialects.expr.stmts.Div"
            

Divide two numbers.

lhs class-attribute instance-attribute

lhs: SSAValue = argument(PyNum)

lhs (Union[int, float]): The numerator.

result class-attribute instance-attribute

result: ResultValue = result(PyNum)

result (Union[int, float]): The result of the division.

rhs class-attribute instance-attribute

rhs: SSAValue = argument(PyNum)

rhs (Union[int, float]): The denominator.

Exp

Bases: Statement


              flowchart TD
              bloqade.qasm2.dialects.expr.stmts.Exp[Exp]

              

              click bloqade.qasm2.dialects.expr.stmts.Exp href "" "bloqade.qasm2.dialects.expr.stmts.Exp"
            

Take the exponential of a number.

result class-attribute instance-attribute

result: ResultValue = result(Float)

result (float): The exponential of the number.

value class-attribute instance-attribute

value: SSAValue = argument(PyNum)

value (Union[int, float]): The number to take the exponential of.

GateFunction

Bases: Function


              flowchart TD
              bloqade.qasm2.dialects.expr.stmts.GateFunction[GateFunction]

              

              click bloqade.qasm2.dialects.expr.stmts.GateFunction href "" "bloqade.qasm2.dialects.expr.stmts.GateFunction"
            

Special Function for qasm2 gate subroutine.

Log

Bases: Statement


              flowchart TD
              bloqade.qasm2.dialects.expr.stmts.Log[Log]

              

              click bloqade.qasm2.dialects.expr.stmts.Log href "" "bloqade.qasm2.dialects.expr.stmts.Log"
            

Take the natural log of a number.

result class-attribute instance-attribute

result: ResultValue = result(Float)

result (float): The natural log of the number.

value class-attribute instance-attribute

value: SSAValue = argument(PyNum)

value (Union[int, float]): The number to take the natural log of.

Mul

Bases: Statement


              flowchart TD
              bloqade.qasm2.dialects.expr.stmts.Mul[Mul]

              

              click bloqade.qasm2.dialects.expr.stmts.Mul href "" "bloqade.qasm2.dialects.expr.stmts.Mul"
            

Multiply two numbers.

lhs class-attribute instance-attribute

lhs: SSAValue = argument(PyNum)

lhs (Union[int, float]): The left-hand side of the multiplication.

result class-attribute instance-attribute

result: ResultValue = result(PyNum)

result (Union[int, float]): The result of the multiplication.

rhs class-attribute instance-attribute

rhs: SSAValue = argument(PyNum)

rhs (Union[int, float]): The right-hand side of the multiplication.

Neg

Bases: Statement


              flowchart TD
              bloqade.qasm2.dialects.expr.stmts.Neg[Neg]

              

              click bloqade.qasm2.dialects.expr.stmts.Neg href "" "bloqade.qasm2.dialects.expr.stmts.Neg"
            

Negate a number.

result class-attribute instance-attribute

result: ResultValue = result(PyNum)

result (Union[int, float]): The negated number.

value class-attribute instance-attribute

value: SSAValue = argument(PyNum)

value (Union[int, float]): The number to negate.

Pow

Bases: Statement


              flowchart TD
              bloqade.qasm2.dialects.expr.stmts.Pow[Pow]

              

              click bloqade.qasm2.dialects.expr.stmts.Pow href "" "bloqade.qasm2.dialects.expr.stmts.Pow"
            

Take the power of a number.

lhs class-attribute instance-attribute

lhs: SSAValue = argument(PyNum)

lhs (Union[int, float]): The base.

result class-attribute instance-attribute

result: ResultValue = result(PyNum)

result (Union[int, float]): The result of the power operation.

rhs class-attribute instance-attribute

rhs: SSAValue = argument(PyNum)

rhs (Union[int, float]): The exponent.

Sin

Bases: Statement


              flowchart TD
              bloqade.qasm2.dialects.expr.stmts.Sin[Sin]

              

              click bloqade.qasm2.dialects.expr.stmts.Sin href "" "bloqade.qasm2.dialects.expr.stmts.Sin"
            

Take the sine of a number.

result class-attribute instance-attribute

result: ResultValue = result(Float)

result (float): The sine of the number.

value class-attribute instance-attribute

value: SSAValue = argument(PyNum)

value (Union[int, float]): The number to take the sine of.

Sqrt

Bases: Statement


              flowchart TD
              bloqade.qasm2.dialects.expr.stmts.Sqrt[Sqrt]

              

              click bloqade.qasm2.dialects.expr.stmts.Sqrt href "" "bloqade.qasm2.dialects.expr.stmts.Sqrt"
            

Take the square root of a number.

result class-attribute instance-attribute

result: ResultValue = result(Float)

result (float): The square root of the number.

value class-attribute instance-attribute

value: SSAValue = argument(PyNum)

value (Union[int, float]): The number to take the square root of.

Sub

Bases: Statement


              flowchart TD
              bloqade.qasm2.dialects.expr.stmts.Sub[Sub]

              

              click bloqade.qasm2.dialects.expr.stmts.Sub href "" "bloqade.qasm2.dialects.expr.stmts.Sub"
            

Subtract two numbers.

lhs class-attribute instance-attribute

lhs: SSAValue = argument(PyNum)

lhs (Union[int, float]): The left-hand side of the subtraction.

result class-attribute instance-attribute

result: ResultValue = result(PyNum)

result (Union[int, float]): The result of the subtraction.

rhs class-attribute instance-attribute

rhs: SSAValue = argument(PyNum)

rhs (Union[int, float]): The right-hand side of the subtraction.

Tan

Bases: Statement


              flowchart TD
              bloqade.qasm2.dialects.expr.stmts.Tan[Tan]

              

              click bloqade.qasm2.dialects.expr.stmts.Tan href "" "bloqade.qasm2.dialects.expr.stmts.Tan"
            

Take the tangent of a number.

result class-attribute instance-attribute

result: ResultValue = result(Float)

result (float): The tangent of the number.

value class-attribute instance-attribute

value: SSAValue = argument(PyNum)

value (Union[int, float]): The number to take the tangent of.