Snowflurry/en: Difference between revisions

Created page with "Quantum Circuit Object: qubit_count: 2 q[1]:──H────*── ¦ q[2]:───────X── }} </noinclude> In the above code section, the Hadamard gate creates an equal superposition of |0⟩ and |1⟩ on the first qubit while the CNOT gate (controlled X gate) creates an entanglement between the two qubits. We find an equal superposition of states |00⟩ and |11⟩, which is the first Bell state. The <code>simulate</code> function allows..."
No edit summary
(Created page with "Quantum Circuit Object: qubit_count: 2 q[1]:──H────*── ¦ q[2]:───────X── }} </noinclude> In the above code section, the Hadamard gate creates an equal superposition of |0⟩ and |1⟩ on the first qubit while the CNOT gate (controlled X gate) creates an entanglement between the two qubits. We find an equal superposition of states |00⟩ and |11⟩, which is the first Bell state. The <code>simulate</code> function allows...")
Line 29: Line 29:
julia> print(circuit)
julia> print(circuit)


<div lang="fr" dir="ltr" class="mw-content-ltr">
Quantum Circuit Object:
Quantum Circuit Object:
   qubit_count: 2  
   qubit_count: 2  
Line 37: Line 36:
}}
}}
</noinclude>
</noinclude>
Dans la section de code ci-dessus, la porte de Hadamard crée une superposition égale de |0⟩ et |1⟩ sur le premier qubit tandis que la porte CNOT (porte X controllée) crée une intrication entre les deux qubits. On retrouve une superposition égale des états |00⟩ et |11⟩, soit le premier état de Bell. La fonction <code>simulate</code> permet de simuler l'état exact du système.
In the above code section, the Hadamard gate creates an equal superposition of |0⟩ and |1⟩ on the first qubit while the CNOT gate (controlled X gate) creates an entanglement between the two qubits. We find an equal superposition of states |00⟩ and |11⟩, which is the first Bell state. The <code>simulate</code> function allows us to simulate the exact state of the system.
<noinclude>
<noinclude>
   julia> state = simulate(circuit)
   julia> state = simulate(circuit)
Line 47: Line 46:
   0.7071067811865475 + 0.0im
   0.7071067811865475 + 0.0im
</noinclude>
</noinclude>
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
<div lang="fr" dir="ltr" class="mw-content-ltr">
rsnt_translations
56,430

edits