scikit_quri.state package#
Submodules#
scikit_quri.state.overlap_estimator module#
- class scikit_quri.state.overlap_estimator.overlap_estimator(concurrent_sampler, n_shots=1000)[source]#
Bases:
objectAlternative implementation of quri-parts’ overlap estimator.
- Parameters:
- create_overlap_circuit(ket_circuit, bra_circuit)[source]#
Create a circuit to compute the overlap between two quantum states. Operates non-destructively on the input circuits.
- Parameters:
ket_circuit (QuantumCircuit) – Quantum circuit representing the ket state.
bra_circuit (QuantumCircuit) – Quantum circuit representing the bra state.
- Returns:
A quantum circuit of the form U_ket U_bra†, whose |0⟩ measurement probability approximates |⟨ψ_ket|ψ_bra⟩|².
- Return type:
QuantumCircuit
- estimate(ket_circuit, bra_circuit)[source]#
Estimate the squared overlap |⟨ψ_ket|ψ_bra⟩|² between two quantum states. Operates non-destructively on the input circuits.
Module contents#
- class scikit_quri.state.overlap_estimator(concurrent_sampler, n_shots=1000)[source]#
Bases:
objectAlternative implementation of quri-parts’ overlap estimator.
- Parameters:
- create_overlap_circuit(ket_circuit, bra_circuit)[source]#
Create a circuit to compute the overlap between two quantum states. Operates non-destructively on the input circuits.
- Parameters:
ket_circuit (QuantumCircuit) – Quantum circuit representing the ket state.
bra_circuit (QuantumCircuit) – Quantum circuit representing the bra state.
- Returns:
A quantum circuit of the form U_ket U_bra†, whose |0⟩ measurement probability approximates |⟨ψ_ket|ψ_bra⟩|².
- Return type:
QuantumCircuit
- estimate(ket_circuit, bra_circuit)[source]#
Estimate the squared overlap |⟨ψ_ket|ψ_bra⟩|² between two quantum states. Operates non-destructively on the input circuits.