View on GitHub
Open this notebook in GitHub to run it yourself
Comparators
The following comparators are supported:- Equal (denoted as ’==’)
- NotEqual (denoted as ’!=’)
- GreaterThan (denoted as ’>’)
- GreaterEqual (denoted as ’>=’)
- LessThan (denoted as ’<’)
- LessEqual (denoted as ’<=’)
Examples
Example 1: Comparing Two Quantum Variables
This example generates a quantum program that performs ‘equal’ between two variables. The left arg is a signed variable with 5 qubits and the right arg is an unsigned varialbe with 3 qubits.Example 2: Comparing Integer and Quantum Variable
This example generates a quantum program that performs ‘less equal’ between a quantum register and an integer. The left arg is an unsigned quantum variable with 3 qubits, and the right arg is an integer equal toOutput: