We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from pytket.extensions.qiskit import AerBackend from pytket import Circuit, Qubit from pytket.predicates import CompilationUnit import qiskit_aer.noise as noise def spam_noise_model(n_qubits, prob_ro): noise_model = noise.NoiseModel() probabilities = [[1-prob_ro, prob_ro],[prob_ro, 1-prob_ro]] error_ro = noise.ReadoutError(probabilities) for i in range(n_qubits): noise_model.add_readout_error(error_ro, [i]) return noise_model backend = AerBackend( noise_model=spam_noise_model(n_qubits=4, prob_ro=0.1) ) qubit = Qubit(name='my_qubit', index=0) circuit = Circuit() circuit.add_qubit(qubit) circuit.X(qubit) cu = CompilationUnit(circuit) backend.default_compilation_pass( optimisation_level=1 ).apply(cu) print(cu.circuit.get_commands()) print(cu.final_map)
gives
[TK1(0, 1, 0) node[2];] {my_qubit[0]: my_qubit[0]}
whereas the final map should be (or with the key value reversed)
{my_qubit[0]: node[2]}
The text was updated successfully, but these errors were encountered:
sjdilkes
No branches or pull requests
gives
whereas the final map should be (or with the key value reversed)
The text was updated successfully, but these errors were encountered: