You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new OpenQASM standard introduces many additional datatypes besides quantum and classical registers. This allows to describe classical components of quantum algorithms in a very intuitive way. As a first step, support for all kinds of new types should be added to the QFR library and, correspondingly, to the QuantumComputation class. For details on all the new typed provided by the standard, see https://qiskit.github.io/openqasm/language/classical.html.
Classical bits and registers could previously just be used as the target of a measurement and (in a very limited fashion) as the classical control in an if statement. The new OpenQASM 3.0 standard enriches these capabilities by allowing to:
assign bitstrings to classical registers, e.g., bit[8] a = "10001111";
execute bitwise operations such as and (&), or |, xor ^ and the corresponding assignment operators &=, |=, ^=
left and right shift << and >>, as well as <<= and >>= by an unsigned integer
not ~
circular shifts rotl and rotr
First of all, the QuantumComputation class needs to be capable of allocating and maintaining classical registers.
Most certainly, the manipulation of these registers will require the introduction of a new kind of operation, e.g., ClassicalOperation.
Such an operation will not be unitary. As a consequence, the concept of the NonUnitaryOperation as it is now may need to be revisited/refactored.
Depends on #28 for the availability of the bit keyword in the parser.
The text was updated successfully, but these errors were encountered:
The new OpenQASM standard introduces many additional datatypes besides quantum and classical registers. This allows to describe classical components of quantum algorithms in a very intuitive way. As a first step, support for all kinds of new types should be added to the QFR library and, correspondingly, to the
QuantumComputation
class. For details on all the new typed provided by the standard, see https://qiskit.github.io/openqasm/language/classical.html.Classical bits and registers could previously just be used as the target of a measurement and (in a very limited fashion) as the classical control in an
if
statement. The new OpenQASM 3.0 standard enriches these capabilities by allowing to:bit[8] a = "10001111";
&
), or|
, xor^
and the corresponding assignment operators&=
,|=
,^=
<<
and>>
, as well as<<=
and>>=
by an unsigned integer~
rotl
androtr
First of all, the
QuantumComputation
class needs to be capable of allocating and maintaining classical registers.Most certainly, the manipulation of these registers will require the introduction of a new kind of operation, e.g.,
ClassicalOperation
.Such an operation will not be unitary. As a consequence, the concept of the
NonUnitaryOperation
as it is now may need to be revisited/refactored.Depends on #28 for the availability of the
bit
keyword in the parser.The text was updated successfully, but these errors were encountered: