0 44 0
Released on 2024-08-04.
Upgrade Instructions
- Python SDK
- The IDE upgrades automatically.
Bug Fixes
- Fixed a bug related to nested control operations.
- Fixed a bug related to boolean arithmetic expressions with invert.
- Fixed a bug related to arithmetic expressions inside within-apply.
IDE
- Add back improved circuit nodes search.
- Fix bug in Quantum Program page .qprog file extensions uploads.
- New Quantum Program export option: Quantum programs can now be exported as .qprog files.
- Poll all active jobs in the job list, not just the selected job.
- Add support for Alice & Bob hardware configurations in the IDE.
Enhancements
- Add support for arithmetic boolean expressions as conditionals for control statements; see here.
- Add quantum structs.
- The element type of quantum arrays can be any quantum type. N-dimensional quantum arrays are supported.
- Operand parameter names are optional in both Native
(
qfunc (indicator: qbit)
->qfunc (qbit)
) and Python (QCallable[QBit]
->QCallable[Annotated[QBit, "indicator"]]
) Qmod. - Improve error messages.
- Provide better circuits for certain boolean arithmetic expressions.
- Improved qubit reuse and runtime performance for model without constraints.
- Add
solovay_kitaev_max_iterations
field to the synthesis preferences, allowing for tuning the accuracy of the Solovay-Kitaev algorithm. - Built-in classical functions to decompose/compose a matrix into/from a Hamiltonian. Example of usage:
mat = np.array([[0, 1, 2, 3], [1, 4, 5, 6], [2, 5, 7, 8], [3, 6, 8, 9]])
hamiltonian = matrix_to_hamiltonian(mat)
mat = hamiltonian_to_matrix(hamiltonian)
- parsed_states, parsed_counts, parsed_state_vector will contain the parsed execution details as lists if a quantum array was used in the model.
@qfunc
def main(qna: Output[QArray[QNum[3, True, 0]]]) -> None:
allocate(6, qna)
hadamard_transform(qna)
qp = synthesize(create_model(main))
res = execute(qp).result()
print(res[0].value.parsed_counts[0])
previously this would print -> state={'qna': 43} shots=27 now it prints -> state={'qna': [-2, 3]} shots=27
Library and Documentation
- A new tutorial on Hamiltonian simulation for block-encoded Hamiltonians, using QSVT and Qubitization, was added to the library.
- A new tutorial on solving the discrete Poisson's equation using the HHL algorithm, combined with quantum sine and cosine transforms, was added to the library; see here.
- New state preparation functions -
prepare_unifrom_trimmed_state
,prepare_unifrom_interval_state
, see here. - Enhanced the Discrete logarithm example to the case where the order is not power of 2, see here.
- Updated the Quantum Types documentation page.
Interface Changes
- Some builtin operations parameters have been renamed:
control(ctrl=..., operand=...)
=>control(ctrl=..., stmt_block=...)
within_apply(compute=..., action=...)
=>within_apply(within=..., apply=...)
power(power=..., operand=...)
=>power(exponent=..., stmt_block=...)
invert(operand=)
=>invert(stmt_block=...)
Deprecations
- SDK: The
@struct
decorator has been removed. Define classical structs using@dataclass
. - The field
variance
inEstimationResult
is deprecated, and will be populated with the value-1
until removed. - The field
timeout_sec
inExecutionPreferences
, and the fieldjob_timeout
inAwsBackendPreferences
, have been removed. - classical arguments in the native language are now inside the parentheses
section (
(...)
) alongside quantum variables and not inside the angle brackets (<...>
), the angle brackets section is now considered deprecated. For example, you should migrate:qfunc <a: real> main{...}
->qfunc main(a: real) {...}
for info refer to the language reference about functions. A Warning was added to the IDE in the case it is used.