Skip to main content

View on GitHub

Open this notebook in GitHub to run it yourself
The minimum and maximum operators determine the smallest and largest input, respectively. Both functions receive two inputs. Each may be a fixed point number or a quantum register.

Examples

Example 1: Two Quantum Variables Minimum

This code example generates a quantum program that returns a minimum of two arguments. Both the left and right arguments are defined as quantum variables of size three.
Output:

Example 2: Float and Quantum Variable Maximum

This code example returns a quantum program with a maximum of two arguments. Here, the left arg is a fixed-point number (11.1)2(11.1)_2 (3.5), and the right arg is a quantum variable of size three.
Output: