Skip to content

unpickling circuit from 0.16#5541

Closed
1ucian0 wants to merge 3 commits intoQiskit:masterfrom
1ucian0:_metadataAND_repr
Closed

unpickling circuit from 0.16#5541
1ucian0 wants to merge 3 commits intoQiskit:masterfrom
1ucian0:_metadataAND_repr

Conversation

@1ucian0
Copy link
Copy Markdown
Member

@1ucian0 1ucian0 commented Dec 17, 2020

I'm loading some circuits that have been pickled in 0.16 and try to load them in 0.17. Because they don't have Bit._repr and QuantumCircuit._metadata (added in #5272 and #5270 respectively), after loading it very hard to work with them without getting errors like:

AttributeError: 'QuantumCircuit' object has no attribute '_metadata'

This PR checks if the internal attribute exists at property calling time.

@1ucian0 1ucian0 requested a review from a team as a code owner December 17, 2020 09:43
@1ucian0
Copy link
Copy Markdown
Member Author

1ucian0 commented Dec 23, 2020

It seems that we don't have a well-defined policy on supporting serialized circuits with previous versions.

@1ucian0 1ucian0 closed this Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant