ブログ
5
9月
,
2024
Tamuz Danzig

量子回路の連結

記事をシェア
ライブラリ

The Classiq synthesis engine significantly improves the generation of quantum circuits. For example, starting from a functional model, the engine can produce a shallower circuit or with fewer two-qubit gates, which are difficult for the hardware to perform. 

 

Concatenating two quantum circuits can be beneficial when one circuit is very large. Synthesizing an optimized circuit takes a long time, but it only needs to be done once. The second circuit is smaller, and the synthesis process is faster, as it needs to be repeated multiple times.

 

To do so, we synthesize the big circuit and small circuit separately:


from classiq import *
big_qprog = synthesize(big_qmod)
small_qprog = synthesize(small_qmod)

 

If the circuits have a different number of qubits, we then connect the two circuits on the right register. Let's call this register “res”. First, we find this register after the synthesis by:


classiq_big_circuit = QuantumProgram.from_qprog(big_qprog)classiq_small_circuit = 
QuantumProgram.from_qprog(small_qprog)output_registers_big_circuit = 
classiq_big_circuit.data.qubit_mapping.physical_outputsres_register = 
list(output_registers_big_circuit["res"])

 

Similarly, we do the same to the small circuit. In this case, let’s assume the small circuit has only the “res” register. 

Then, we take the circuits' qasm files and connect the circuits using Qiskit:


big_qasm = classiq_big_circuit.qasmsmall_qasm = classiq_small_circuit.qasmfrom qiskit import 
QuantumCircuitqc = QuantumCircuit(classiq_big_circuit.data.width)
# The first part of qc is the small circuit connected to the “res” qubits.qc = 
qc.compose(QuantumCircuit.from_qasm_str(small_qasm), res_register)qc = 
qc.compose(QuantumCircuit.from_qasm_str(big_qasm))

 

Now, the quantum circuit `qc` is connected from the small and the big circuits. To execute the circuit, save its qasm file and upload it to the Classiq IDE. 

 

For a concrete example, the HHL algorithm finds x for Ax=b, for a given A and b. The difficult part of the algorithm deals with A and the easy block deals with only state preparation for b. For problems that b change iteratively, we can synthesize iteratively the state preparation block and keep using the circuit that deals with A. These kinds of problems are common in engineering, and in physical systems. 

 

 

This simulation was demonstrated together with Hewlett Packard Enterprise.

 

References:

https://arxiv.org/abs/2312.04933

https://www.computer.org/csdl/proceedings-article/qce/2023/432302a117/1SuQSLYiTT2 

 

The Classiq synthesis engine significantly improves the generation of quantum circuits. For example, starting from a functional model, the engine can produce a shallower circuit or with fewer two-qubit gates, which are difficult for the hardware to perform. 

 

Concatenating two quantum circuits can be beneficial when one circuit is very large. Synthesizing an optimized circuit takes a long time, but it only needs to be done once. The second circuit is smaller, and the synthesis process is faster, as it needs to be repeated multiple times.

 

To do so, we synthesize the big circuit and small circuit separately:


from classiq import *
big_qprog = synthesize(big_qmod)
small_qprog = synthesize(small_qmod)

 

If the circuits have a different number of qubits, we then connect the two circuits on the right register. Let's call this register “res”. First, we find this register after the synthesis by:


classiq_big_circuit = QuantumProgram.from_qprog(big_qprog)classiq_small_circuit = 
QuantumProgram.from_qprog(small_qprog)output_registers_big_circuit = 
classiq_big_circuit.data.qubit_mapping.physical_outputsres_register = 
list(output_registers_big_circuit["res"])

 

Similarly, we do the same to the small circuit. In this case, let’s assume the small circuit has only the “res” register. 

Then, we take the circuits' qasm files and connect the circuits using Qiskit:


big_qasm = classiq_big_circuit.qasmsmall_qasm = classiq_small_circuit.qasmfrom qiskit import 
QuantumCircuitqc = QuantumCircuit(classiq_big_circuit.data.width)
# The first part of qc is the small circuit connected to the “res” qubits.qc = 
qc.compose(QuantumCircuit.from_qasm_str(small_qasm), res_register)qc = 
qc.compose(QuantumCircuit.from_qasm_str(big_qasm))

 

Now, the quantum circuit `qc` is connected from the small and the big circuits. To execute the circuit, save its qasm file and upload it to the Classiq IDE. 

 

For a concrete example, the HHL algorithm finds x for Ax=b, for a given A and b. The difficult part of the algorithm deals with A and the easy block deals with only state preparation for b. For problems that b change iteratively, we can synthesize iteratively the state preparation block and keep using the circuit that deals with A. These kinds of problems are common in engineering, and in physical systems. 

 

 

This simulation was demonstrated together with Hewlett Packard Enterprise.

 

References:

https://arxiv.org/abs/2312.04933

https://www.computer.org/csdl/proceedings-article/qce/2023/432302a117/1SuQSLYiTT2 

 

"Qubit Guyのポッドキャスト "について

The Qubit Guy(弊社最高マーケティング責任者ユヴァル・ボーガー)がホストを務めるこのポッドキャストは、量子コンピューティングのオピニオンリーダーをゲストに迎え、量子コンピューティングのエコシステムに影響を与えるビジネスや技術的な疑問について議論します。ゲストは、量子コンピュータのソフトウェアやアルゴリズム、量子コンピュータのハードウェア、量子コンピューティングの主要なアプリケーション、量子産業の市場調査などについて興味深いインサイトを提供します。

ポッドキャストへのゲスト推薦をご希望の方は、こちらまでご連絡ください

さらに見る

見つかりませんでした。

量子ソフトウェア開発を開始

お問い合わせ